claude-code-best 2.8.2 → 2.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{AddWorkspaceDirectory-BCCbaWoh.js → AddWorkspaceDirectory-CM5PYqoF.js} +1 -1
  3. package/dist/chunks/{App-BIAYUFvT.js → App-BLLQEMkd.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-AMXQPmfE.js +1 -0
  5. package/dist/chunks/{ApproveApiKey-DRARgWX3.js → ApproveApiKey-DrflOSA-.js} +1 -1
  6. package/dist/chunks/{AssistantSessionChooser-eUrEGDlX.js → AssistantSessionChooser-SlRne98s.js} +1 -1
  7. package/dist/chunks/BackgroundTasksDialog-Cciww_FF.js +2 -0
  8. package/dist/chunks/{BypassPermissionsModeDialog-8z7R5EpU.js → BypassPermissionsModeDialog-HaciDdx0.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-B7mDm5Hb.js → ClaudeInChromeOnboarding-EA3k_q2M.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-C-T8G8O7.js +1 -0
  11. package/dist/chunks/{ClaudeMdExternalIncludesDialog-DE9dpWtg.js → ClaudeMdExternalIncludesDialog-xBclyqKk.js} +1 -1
  12. package/dist/chunks/ConsoleOAuthFlow-BTN62PKj.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-Ce0nE7D6.js → DesktopHandoff-BhY_F3Ob.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-mt0lA5wR.js → DevChannelsDialog-DU5komVT.js} +1 -1
  15. package/dist/chunks/DiffDialog-D_-znREV.js +3 -0
  16. package/dist/chunks/Doctor-BhrEYzPO.js +3 -0
  17. package/dist/chunks/Doctor-CjnUU1CY.js +1 -0
  18. package/dist/chunks/{ExitFlow-C3BGvwv-.js → ExitFlow-cRfxceuS.js} +2 -2
  19. package/dist/chunks/{Feedback-BtZb1A8b.js → Feedback-BMv8Kt05.js} +2 -2
  20. package/dist/chunks/Grove-CRAZGlvf.js +1 -0
  21. package/dist/chunks/{Grove-HpMLktXp.js → Grove-CjfR7Acp.js} +1 -1
  22. package/dist/chunks/{HybridTransport-COk7jAC7.js → HybridTransport-D32dn9xc.js} +1 -1
  23. package/dist/chunks/{ITermBackend-BlwyeN8U.js → ITermBackend-BxjzkptA.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-QVIRDXwA.js → InvalidConfigDialog-CnCOCqMT.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-CZRZm0oa.js → InvalidSettingsDialog-CLOgpfR2.js} +1 -1
  26. package/dist/chunks/MCPConnectionManager-BhbT4Sah.js +1 -0
  27. package/dist/chunks/{McpParsingWarnings-DWMO0bV6.js → McpParsingWarnings-B5X5HVnQ.js} +1 -1
  28. package/dist/chunks/MessageSelector-DLofsxam.js +3 -0
  29. package/dist/chunks/Messages-D1-i4MMT.js +11 -0
  30. package/dist/chunks/{Onboarding-CHcND5Tt.js → Onboarding-Co5P3gZs.js} +1 -1
  31. package/dist/chunks/{OverageCreditUpsell-CMBqZrnz.js → OverageCreditUpsell-DjgcfVt2.js} +1 -1
  32. package/dist/chunks/PluginSettings-NB-Wod-9.js +17 -0
  33. package/dist/chunks/{PromptInputHelpMenu-CAwbW7z2.js → PromptInputHelpMenu-BDI5IF1s.js} +1 -1
  34. package/dist/chunks/QueryEngine-B217mLel.js +1 -0
  35. package/dist/chunks/REPL-BfprHNDt.js +1 -0
  36. package/dist/chunks/{REPL-Dx3SPe95.js → REPL-DCm_BFr_.js} +36 -36
  37. package/dist/chunks/{RemoteCallout-CwI1mLQ9.js → RemoteCallout-dGnKRIDB.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-BXMBhfQD.js → RemoteSessionManager-BidAIOqZ.js} +2 -2
  39. package/dist/chunks/ResumeConversation-SDRT6hO3.js +1 -0
  40. package/dist/chunks/{SSETransport-Co-0nMlR.js → SSETransport-BM2xz03M.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-DCSReOsq.js +1 -0
  42. package/dist/chunks/{SentryErrorBoundary-kEgE7qeH.js → SentryErrorBoundary-D5niZGEU.js} +1 -1
  43. package/dist/chunks/SentryErrorBoundary-DzwCuftg.js +1 -0
  44. package/dist/chunks/Settings-D3ds_WCz.js +2 -0
  45. package/dist/chunks/{TeleportProgress--n-u7MYY.js → TeleportProgress-Dg6HcEO9.js} +1 -1
  46. package/dist/chunks/{TeleportRepoMismatchDialog-CzQzdYb2.js → TeleportRepoMismatchDialog-BUKNU2jx.js} +1 -1
  47. package/dist/chunks/{TeleportResumeWrapper-CtANoO1Z.js → TeleportResumeWrapper-5FTzA9R_.js} +1 -1
  48. package/dist/chunks/{ThemePicker-kBt6obJb.js → ThemePicker-Bdm12PmJ.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-Q5xdOkW4.js → TmuxBackend-CYx3Hdf1.js} +2 -2
  50. package/dist/chunks/{TrustDialog-CoCFqyRD.js → TrustDialog-DGKf4iwh.js} +1 -1
  51. package/dist/chunks/{ValidationErrorsList-CL42YlaS.js → ValidationErrorsList-BP7vG1uX.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-B0d9sH1c.js → WelcomeV2-k_969SnB.js} +1 -1
  53. package/dist/chunks/{WindowsTerminalBackend-CLSeqqHh.js → WindowsTerminalBackend-K_zVZBSP.js} +2 -2
  54. package/dist/chunks/{add-dir-IrADCHV-.js → add-dir-DnfUkb1n.js} +1 -1
  55. package/dist/chunks/{agentDisplay-BUXpQhYh.js → agentDisplay-DT04Kqdm.js} +1 -1
  56. package/dist/chunks/{agents-Cx0f6suK.js → agents-ELZyUElQ.js} +7 -7
  57. package/dist/chunks/{agents-BqQtaTaM.js → agents-hh7Zcqm6.js} +1 -1
  58. package/dist/chunks/{ant-BUkS8Em4.js → ant-CuQC6xHS.js} +1 -1
  59. package/dist/chunks/api-BY3NFL4L.js +1 -0
  60. package/dist/chunks/{api-Cy1N7XAQ.js → api-C-KY7A3r.js} +1 -1
  61. package/dist/chunks/asciicast-BeEmDIKr.js +1 -0
  62. package/dist/chunks/{asciicast-C_1Pi99k.js → asciicast-C0fPsv7_.js} +1 -1
  63. package/dist/chunks/assistant-C669PK45.js +1 -0
  64. package/dist/chunks/{assistant-C3dP-BSJ.js → assistant-DbtrknMt.js} +1 -1
  65. package/dist/chunks/{assistant-BGzd9a5x.js → assistant-Z-xFHPiY.js} +1 -1
  66. package/dist/chunks/{auth-DVtMm7Hj.js → auth-Bo_eeRO9.js} +1 -1
  67. package/dist/chunks/auth-C-rD91K7.js +1 -0
  68. package/dist/chunks/{autoMode-ThlM20qr.js → autoMode-BhsFtU8_.js} +6 -6
  69. package/dist/chunks/{autonomy-B637YdCF.js → autonomy-B-d3Xamr.js} +1 -1
  70. package/dist/chunks/{autonomy-B_vxYZbV.js → autonomy-C5wE-5B8.js} +12 -12
  71. package/dist/chunks/{autonomyPanel-BM2VhTsn.js → autonomyPanel-CMy4Zs1a.js} +1 -1
  72. package/dist/chunks/backgroundHousekeeping-YAOGWoo4.js +17 -0
  73. package/dist/chunks/backgroundHousekeeping-xFmPDL7y.js +1 -0
  74. package/dist/chunks/{branch-BlH5WYNu.js → branch-DoV3sEJf.js} +2 -2
  75. package/dist/chunks/{bridge-QRFJRzVG.js → bridge-8RYx23zW.js} +2 -2
  76. package/dist/chunks/{bridgeConfig-Di9LziJ3.js → bridgeConfig-C8tQXEsd.js} +1 -1
  77. package/dist/chunks/bridgeConfig-D5awYlvd.js +1 -0
  78. package/dist/chunks/bridgeEnabled-0tZw2TlM.js +1 -0
  79. package/dist/chunks/{bridgeEnabled-z1fPRzzV.js → bridgeEnabled-B3KTIVe4.js} +1 -1
  80. package/dist/chunks/bridgeMain-DKkE8RYG.js +1 -0
  81. package/dist/chunks/bridgeMain-Ssp8HRcV.js +68 -0
  82. package/dist/chunks/{bridgeMessaging-BG8fNZac.js → bridgeMessaging-DGTm_wDk.js} +1 -1
  83. package/dist/chunks/{btw-DpeWZQbf.js → btw-Du0mHeiD.js} +1 -1
  84. package/dist/chunks/{buddy-Bni2g0Km.js → buddy-D04AYSW6.js} +1 -1
  85. package/dist/chunks/{bypassPermissionsKillswitch-7e56Rquc.js → bypassPermissionsKillswitch-CRYkShwu.js} +1 -1
  86. package/dist/chunks/caches-Byd8SjTZ.js +1 -0
  87. package/dist/chunks/{caches-CzEBsMvP.js → caches-DYf69-N9.js} +2 -2
  88. package/dist/chunks/{ccrClient-iR6zwGb1.js → ccrClient-CDrBxSox.js} +1 -1
  89. package/dist/chunks/changeDetector-CGzGs92S.js +1 -0
  90. package/dist/chunks/{channelNotification-CSmLgwtO.js → channelNotification-CtA9HHFW.js} +1 -1
  91. package/dist/chunks/channelNotification-DOvTvOGt.js +1 -0
  92. package/dist/chunks/{chrome-BO1vbvZ0.js → chrome-BHbT4cc4.js} +1 -1
  93. package/dist/chunks/clear-BGLxPs_B.js +1 -0
  94. package/dist/chunks/client-CtOmoNuQ.js +1 -0
  95. package/dist/chunks/color-MOZYZ1cM.js +1 -0
  96. package/dist/chunks/commands-B3XpQmEm.js +1 -0
  97. package/dist/chunks/{commitAttribution-Djh1ZpYH.js → commitAttribution-BTtCTr8c.js} +1 -1
  98. package/dist/chunks/commitAttribution-CXNK79GW.js +1 -0
  99. package/dist/chunks/compact-CMqxm2yG.js +3 -0
  100. package/dist/chunks/{companion-C-jfFhlz.js → companion-ChxkOPHB.js} +1 -1
  101. package/dist/chunks/{config-DwsIX0hc.js → config-cRyRIPI7.js} +1 -1
  102. package/dist/chunks/{config-CloXpblh.js → config-wvQYYbwU.js} +1 -1
  103. package/dist/chunks/{context-DdwMoH4j.js → context-7ds9guuJ.js} +1 -1
  104. package/dist/chunks/{context-noninteractive-BWbEqad6.js → context-noninteractive-CISZymIU.js} +2 -2
  105. package/dist/chunks/context-noninteractive-CwJBBF8h.js +1 -0
  106. package/dist/chunks/conversation-Bgsdn99n.js +1 -0
  107. package/dist/chunks/conversation-D30CU_jS.js +1 -0
  108. package/dist/chunks/{copy-tl-41wwU.js → copy-Dvz2Mge4.js} +2 -2
  109. package/dist/chunks/{createSSHSession-B_IyqOll.js → createSSHSession-Befx8LiM.js} +1 -1
  110. package/dist/chunks/createSession-Cp0KTjPL.js +1 -0
  111. package/dist/chunks/{createSession-Csaqw8kb.js → createSession-CsZGoika.js} +1 -1
  112. package/dist/chunks/{cronJitterConfig-2sHTXBLu.js → cronJitterConfig-Dfl7iZqE.js} +3 -3
  113. package/dist/chunks/{crossProjectResume-C1I0X__e.js → crossProjectResume-DK8nt_cn.js} +3 -3
  114. package/dist/chunks/{datadog-BzkFYNcv.js → datadog-2vPhbh6g.js} +1 -1
  115. package/dist/chunks/datadog-DLTYg-S2.js +1 -0
  116. package/dist/chunks/{desktop-oTXppB2O.js → desktop-DY9Nw2Fi.js} +1 -1
  117. package/dist/chunks/{diff-B23DUoT8.js → diff-Ci6rs6S6.js} +1 -1
  118. package/dist/chunks/{directoryCompletion-DqtWZsoW.js → directoryCompletion-DLxCFk_m.js} +1 -1
  119. package/dist/chunks/{doctor-o2MJvjAE.js → doctor-DBYGgS-y.js} +1 -1
  120. package/dist/chunks/{effort-B1X_S_oa.js → effort-Bi_t4J_o.js} +2 -2
  121. package/dist/chunks/{entry-BAXMpXJ0.js → entry-p_5l64_p.js} +4 -4
  122. package/dist/chunks/{envLessBridgeConfig-YNTOVEqU.js → envLessBridgeConfig-C_sqoGX6.js} +1 -1
  123. package/dist/chunks/envLessBridgeConfig-Cfbqwjew.js +1 -0
  124. package/dist/chunks/exit-Bc8L5oQT.js +1 -0
  125. package/dist/chunks/{export-CqbYdFmJ.js → export-kvnEu9Iw.js} +1 -1
  126. package/dist/chunks/{exportRenderer-DP_z8YD1.js → exportRenderer-DmpMgUiv.js} +1 -1
  127. package/dist/chunks/extra-usage-BnO6knuC.js +1 -0
  128. package/dist/chunks/{extra-usage-BQ5Z1wJb.js → extra-usage-CmP6V7HX.js} +1 -1
  129. package/dist/chunks/{extra-usage-core-B1oJoxYa.js → extra-usage-core-BqJClmf4.js} +1 -1
  130. package/dist/chunks/{extra-usage-noninteractive-BV_6cpdd.js → extra-usage-noninteractive-BWyPFx53.js} +1 -1
  131. package/dist/chunks/extraUsage-DgMspmL4.js +1 -0
  132. package/dist/chunks/extractMemories-uQJS_i6E.js +1 -0
  133. package/dist/chunks/fast-Bunl4ivM.js +1 -0
  134. package/dist/chunks/{fast-BJMGfO_S.js → fast-Dd2jZVF-.js} +1 -1
  135. package/dist/chunks/{feedback-O0Gushxg.js → feedback-8UeDx3Yc.js} +1 -1
  136. package/dist/chunks/{firstPartyEventLogger-0s2WJ6SR.js → firstPartyEventLogger-cKEuzfyR.js} +1 -1
  137. package/dist/chunks/{flushGate-CLjpgnG6.js → flushGate-B3upNVdV.js} +1 -1
  138. package/dist/chunks/{gates-C5y8P5t9.js → gates-lWoKqpJ1.js} +1 -1
  139. package/dist/chunks/gates-uo2owWkc.js +1 -0
  140. package/dist/chunks/{gemini-D6lfJRGH.js → gemini-DDSP4ArG.js} +1 -1
  141. package/dist/chunks/{generateRecap-AYujRzfu.js → generateRecap-DCBzHqag.js} +1 -1
  142. package/dist/chunks/{generateSessionName-CXg1uVLN.js → generateSessionName-Db5pZ3cL.js} +1 -1
  143. package/dist/chunks/{githubRepoPathMapping-CdjkMIX3.js → githubRepoPathMapping-v_U9b0Fe.js} +1 -1
  144. package/dist/chunks/{goal-BGr-SlcA.js → goal-EZCOCHZa.js} +3 -3
  145. package/dist/chunks/{grok-DxyRt4Jq.js → grok-H8K_fDKF.js} +1 -1
  146. package/dist/chunks/{growthbook-D93ZmHUL.js → growthbook-mMD0jkbu.js} +1 -1
  147. package/dist/chunks/{heapdump-DZz5qnZg.js → heapdump-CbVvtQuH.js} +1 -1
  148. package/dist/chunks/{help-C8HhaC70.js → help-Bq4jxCSJ.js} +1 -1
  149. package/dist/chunks/hooks-CVlFJfV0.js +1 -0
  150. package/dist/chunks/{hooks-De2yBPig.js → hooks-DbKUS0fN.js} +2 -2
  151. package/dist/chunks/{hostAdapter-CZdJUeS1.js → hostAdapter-BhVpIn1Y.js} +1 -1
  152. package/dist/chunks/{ide-GnSLasRI.js → ide-DZJheXyl.js} +2 -2
  153. package/dist/chunks/{inboundAttachments-C8y3D5mp.js → inboundAttachments-B9NxWIDx.js} +1 -1
  154. package/dist/chunks/inboundAttachments-_vhgWPEL.js +1 -0
  155. package/dist/chunks/initReplBridge-BCIaWf78.js +1 -0
  156. package/dist/chunks/{insights-23tyPxXV.js → insights-D1BFvhw_.js} +68 -68
  157. package/dist/chunks/{install-BXi4d63r.js → install-D_xm-9s1.js} +1 -1
  158. package/dist/chunks/{install-github-app-D2X7BgzJ.js → install-github-app-CUEACXdr.js} +2 -2
  159. package/dist/chunks/{install-slack-app-_J1t0kSP.js → install-slack-app-DGV6l9wy.js} +1 -1
  160. package/dist/chunks/{instrumentation-C9WDRy-K.js → instrumentation-CEfWNakt.js} +3 -3
  161. package/dist/chunks/{job-DXX7dNN_.js → job-BeeAFieV.js} +1 -1
  162. package/dist/chunks/{keybindings-CChhkkE0.js → keybindings-CeYhuE5G.js} +2 -2
  163. package/dist/chunks/{lang-COIVItM_.js → lang-BmwAsgo1.js} +1 -1
  164. package/dist/chunks/{language-DzWvcLCu.js → language-BcWiv2lr.js} +1 -1
  165. package/dist/chunks/language-BnQye2Mx.js +1 -0
  166. package/dist/chunks/{launchAgentsPlatform-Du_WvKeU.js → launchAgentsPlatform-DqQzwcqV.js} +1 -1
  167. package/dist/chunks/{launchAutofixPr-CypNniKH.js → launchAutofixPr-XltBpICW.js} +3 -3
  168. package/dist/chunks/{launchLocalMemory-GkqB_Gcr.js → launchLocalMemory-CHSU4_or.js} +2 -2
  169. package/dist/chunks/{launchLocalVault-CBihJDzq.js → launchLocalVault-CnvCdQ1M.js} +3 -3
  170. package/dist/chunks/{launchMemoryStores-BkK0wwq0.js → launchMemoryStores-DD2duIDU.js} +1 -1
  171. package/dist/chunks/{launchOnboarding-BubTG5vY.js → launchOnboarding-JTKef_jU.js} +1 -1
  172. package/dist/chunks/{launchSchedule-CkV6Ai-0.js → launchSchedule-BVtfNQtS.js} +1 -1
  173. package/dist/chunks/{launchSkillStore-DIrFg_WZ.js → launchSkillStore-TisTmZ3O.js} +1 -1
  174. package/dist/chunks/{launchTeleport-DFrgN9sU.js → launchTeleport-BO_V6ggj.js} +3 -3
  175. package/dist/chunks/{launchVault-CIiNsg91.js → launchVault-Civro2KB.js} +1 -1
  176. package/dist/chunks/{loadAgentsDir-DC4jN6-f.js → loadAgentsDir-BfEZacjM.js} +740 -690
  177. package/dist/chunks/loadAgentsDir-rYxb2igq.js +1 -0
  178. package/dist/chunks/loadPluginHooks-Cniyh-tZ.js +1 -0
  179. package/dist/chunks/localSearch-C0J7ETJQ.js +1 -0
  180. package/dist/chunks/{localSearch-But4wyLg.js → localSearch-COJcqOWl.js} +1 -1
  181. package/dist/chunks/login-B4wjtpEU.js +1 -0
  182. package/dist/chunks/{login-ajsn1Sg7.js → login-SuUxFLIY.js} +1 -1
  183. package/dist/chunks/{logoV2Utils-CpeUvaOM.js → logoV2Utils-DvjpZkyF.js} +1 -1
  184. package/dist/chunks/logout-o16yNWNB.js +1 -0
  185. package/dist/chunks/{magicDocs-TF6U6QoB.js → magicDocs-BZBrH9zB.js} +2 -2
  186. package/dist/chunks/{main-bjQRqaUr.js → main-p9Tke3lb.js} +90 -63
  187. package/dist/chunks/{mappers-Bg-xtimK.js → mappers-BcXg_fI3.js} +1 -1
  188. package/dist/chunks/mcp-BFxLEf3X.js +1 -0
  189. package/dist/chunks/{mcp-i8lqdWTr.js → mcp-CIJL0PTq.js} +2 -2
  190. package/dist/chunks/mcp-DfuQ1MJu.js +6 -0
  191. package/dist/chunks/{mcpServer-CuqaXxiJ.js → mcpServer-D2kI_m2H.js} +1 -1
  192. package/dist/chunks/{mcpServer-Dr9UfcEd.js → mcpServer-DPk-oJOU.js} +1 -1
  193. package/dist/chunks/{memory-DVJxsbcO.js → memory-CJOtY_Uv.js} +1 -1
  194. package/dist/chunks/{mode-C9yWWppB.js → mode-DkpKiyTE.js} +1 -1
  195. package/dist/chunks/{model-Dq-13vaB.js → model-DZyzd39E.js} +1 -1
  196. package/dist/chunks/model-De0AGQ3F.js +1 -0
  197. package/dist/chunks/{onChangeAppState-Cc4zOnqx.js → onChangeAppState-CvtxqUDG.js} +1 -1
  198. package/dist/chunks/{openai-DMCGGZts.js → openai-B888nVou.js} +3 -3
  199. package/dist/chunks/{overageCreditGrant-CzkWDmsQ.js → overageCreditGrant-BOSyVk3U.js} +1 -1
  200. package/dist/chunks/{panelCall-D36EWzwF.js → panelCall-BVdu8oii.js} +1 -1
  201. package/dist/chunks/{passes-CPAwB9_F.js → passes-DeSsjipz.js} +1 -1
  202. package/dist/chunks/{path-BE28AJwZ.js → path-Cit7LKW-.js} +1 -1
  203. package/dist/chunks/{paths-CEAy4QCs.js → paths-nIHVpTn2.js} +3 -3
  204. package/dist/chunks/permissions-DGdr-wOj.js +3 -0
  205. package/dist/chunks/{pipeTransport-7auNUakO.js → pipeTransport-ClZYq1sd.js} +1 -1
  206. package/dist/chunks/{plan-pCEs76NM.js → plan-D9bnkDwv.js} +1 -1
  207. package/dist/chunks/{plugin-BSC-7wQh.js → plugin-BE0r1g1g.js} +1 -1
  208. package/dist/chunks/{pluginAutoupdate-Cre72Rtf.js → pluginAutoupdate-xyXksEJv.js} +1 -1
  209. package/dist/chunks/pluginBlocklist-Dd7XBe8U.js +1 -0
  210. package/dist/chunks/{pluginCliCommands-CTxmCPph.js → pluginCliCommands-8MJCk1nq.js} +1 -1
  211. package/dist/chunks/{pluginFlagging-C5EGcjZe.js → pluginFlagging-7zuXXBD5.js} +1 -1
  212. package/dist/chunks/pluginOperations-DFzbASMD.js +2 -0
  213. package/dist/chunks/{pluginStartupCheck-B3QqfRt6.js → pluginStartupCheck-BC5npqdw.js} +1 -1
  214. package/dist/chunks/pluginStartupCheck-C6IH0haF.js +1 -0
  215. package/dist/chunks/plugins-Bhc2pbAj.js +4 -0
  216. package/dist/chunks/policyLimits-CfrU0rIR.js +1 -0
  217. package/dist/chunks/{pollConfig-CyO4Ycwc.js → pollConfig-B3hNYQ_n.js} +1 -1
  218. package/dist/chunks/{poor-eRoBwI0Z.js → poor-BjTGCuqc.js} +1 -1
  219. package/dist/chunks/{poorMode-BdNsLBQ-.js → poorMode-CGVMMLlz.js} +1 -1
  220. package/dist/chunks/poorMode-DWLhTldO.js +1 -0
  221. package/dist/chunks/{print-Ogibzjap.js → print-BJkyuCzw.js} +11 -11
  222. package/dist/chunks/{privacy-settings-Dd7PtKbY.js → privacy-settings-BDVjqVcX.js} +1 -1
  223. package/dist/chunks/processBashCommand-DnzyTwtS.js +1 -0
  224. package/dist/chunks/processSlashCommand-BGBRvSCA.js +6 -0
  225. package/dist/chunks/prompt-BXrvaHyx.js +1 -0
  226. package/dist/chunks/{prompt-BHI7PZe4.js → prompt-DgIuTC6Q.js} +1 -1
  227. package/dist/chunks/prompt-Fax-fxAf.js +1 -0
  228. package/dist/chunks/{promptEditor-DoJ-xPi4.js → promptEditor-BkHY_Vzb.js} +2 -2
  229. package/dist/chunks/{protocolHandler-Dgzu5UWb.js → protocolHandler-CrXWRkxh.js} +1 -1
  230. package/dist/chunks/rate-limit-options-skMSi19l.js +1 -0
  231. package/dist/chunks/{rcDebugLog-C0Bam8V9.js → rcDebugLog-Bv_x5w_B.js} +1 -1
  232. package/dist/chunks/{referral-B10JtHMk.js → referral-DfKWr4Jf.js} +1 -1
  233. package/dist/chunks/refresh-zosTlttX.js +1 -0
  234. package/dist/chunks/{registerProtocol-CQjmvg7a.js → registerProtocol-De6y1iOi.js} +1 -1
  235. package/dist/chunks/registry-C8JbYbJI.js +1 -0
  236. package/dist/chunks/{release-notes-dxng0ob_.js → release-notes-Su1UPyE4.js} +1 -1
  237. package/dist/chunks/{releaseNotes-CS5L5W0H.js → releaseNotes-C7-JnhrH.js} +2 -2
  238. package/dist/chunks/{reload-plugins-CgzAjBDp.js → reload-plugins-C8lWCq8M.js} +1 -1
  239. package/dist/chunks/{remote-env-BasfU8Ra.js → remote-env-tQuvJmrt.js} +1 -1
  240. package/dist/chunks/{remoteBridgeCore-IJI5koHz.js → remoteBridgeCore-CwOTDmNP.js} +1 -1
  241. package/dist/chunks/{remoteControlServer-BBCt7ySV.js → remoteControlServer-DIKi-0lr.js} +2 -2
  242. package/dist/chunks/rename-Trg9EHjT.js +1 -0
  243. package/dist/chunks/{resume-DjnfattK.js → resume-Nt_EbjKh.js} +2 -2
  244. package/dist/chunks/{runtimeObserver-ByTBtmBf.js → runtimeObserver-CyWhTJpz.js} +4 -4
  245. package/dist/chunks/{runtimeObserver-COpkJmg-.js → runtimeObserver-T9QERJ_O.js} +1 -1
  246. package/dist/chunks/sandbox-adapter-BDGhDrPl.js +1 -0
  247. package/dist/chunks/{sandbox-toggle-CQohaYND.js → sandbox-toggle-C6v31S7-.js} +1 -1
  248. package/dist/chunks/searchExtraTools-C8ehknh0.js +1 -0
  249. package/dist/chunks/{sentry-C0bQlih_.js → sentry-CK_GHX79.js} +1 -1
  250. package/dist/chunks/{session-Dx_ODOHl.js → session-Ys3KvmQ0.js} +1 -1
  251. package/dist/chunks/{sessionDiscovery-DAqs0Ra6.js → sessionDiscovery-Cg3X2fKe.js} +1 -1
  252. package/dist/chunks/sessionFileAccessHooks-vthxapHk.js +1 -0
  253. package/dist/chunks/sessionMemory-ek1SfYG_.js +1 -0
  254. package/dist/chunks/sessionMemory-l-S0jpuk.js +1 -0
  255. package/dist/chunks/sessionMemoryUtils-BGJeJyKn.js +1 -0
  256. package/dist/chunks/sessionObserver-COTvvM3Z.js +1 -0
  257. package/dist/chunks/{sessionObserver-rd6RRTzc.js → sessionObserver-DvAdG6vQ.js} +2 -2
  258. package/dist/chunks/sessionStorage-GKe4ALVr.js +1 -0
  259. package/dist/chunks/{sessionTitle-1k_2BhFL.js → sessionTitle-DJMmUKBJ.js} +2 -2
  260. package/dist/chunks/{sessionTracing-DNSDPYdR.js → sessionTracing-DuQ3kbq6.js} +1 -1
  261. package/dist/chunks/{settingsSync-3xG2A_wN.js → settingsSync-1mhDakFG.js} +1 -1
  262. package/dist/chunks/{setup-Hlga8GJ_.js → setup-CAy0HkI3.js} +1 -1
  263. package/dist/chunks/setup-CGxUKG8x.js +3 -0
  264. package/dist/chunks/{setup-CY808VaY.js → setup-D5ioKRsS.js} +1 -1
  265. package/dist/chunks/{shadowedRuleDetection-BdBNo5eP.js → shadowedRuleDetection-Cq0y9pLR.js} +1 -1
  266. package/dist/chunks/{sideQuestion-DWOCUKMh.js → sideQuestion-ZII6LMSM.js} +3 -3
  267. package/dist/chunks/{sink-DCh0VJ4g.js → sink-Cd5g6Qqh.js} +1 -1
  268. package/dist/chunks/sink-Df9tds-b.js +1 -0
  269. package/dist/chunks/sinks-C4DwU8Xs.js +1 -0
  270. package/dist/chunks/{sinks-_9T2oPB_.js → sinks-DZlIEjLZ.js} +2 -2
  271. package/dist/chunks/{skill-learning-CzZFGFZO.js → skill-learning-DO21PjpF.js} +1 -1
  272. package/dist/chunks/skillChangeDetector-B6tL2yC9.js +1 -0
  273. package/dist/chunks/{skillGapStore-DJm3SULe.js → skillGapStore-B_xv3GUy.js} +1 -1
  274. package/dist/chunks/{skillGapStore-Bz_qbwI1.js → skillGapStore-CTD8MYTx.js} +2 -2
  275. package/dist/chunks/{skillGenerator-BcNv-VZ5.js → skillGenerator-CO9r-gft.js} +2 -2
  276. package/dist/chunks/skillLearning-BJS4lsNk.js +1 -0
  277. package/dist/chunks/skillLearning-C2NmdcYQ.js +1 -0
  278. package/dist/chunks/{skillPanel-Q85P-Gg4.js → skillPanel-DSumFGKN.js} +3 -3
  279. package/dist/chunks/{skillSearchPanel-CMCQDAcX.js → skillSearchPanel-SqkfYBjV.js} +4 -4
  280. package/dist/chunks/{skills-D3eUg3HG.js → skills-Bj3g5apl.js} +1 -1
  281. package/dist/chunks/{sprites-ChoMSqpa.js → sprites-CxMz3tIE.js} +1 -1
  282. package/dist/chunks/{stats-DdhEa_6-.js → stats-D1wYx84O.js} +1 -1
  283. package/dist/chunks/{status-CX7Kgn21.js → status-BWCqbeJ3.js} +1 -1
  284. package/dist/chunks/statusNoticeHelpers-DY0Cblkd.js +1 -0
  285. package/dist/chunks/{tag-BJ_u3aJm.js → tag-Hc7nOYm5.js} +2 -2
  286. package/dist/chunks/{tasks-DeEWOchP.js → tasks-BSqecqVm.js} +1 -1
  287. package/dist/chunks/{teamHelpers-WmWa_h3B.js → teamHelpers-BOmVFTLS.js} +1 -1
  288. package/dist/chunks/teamHelpers-BueGmQcw.js +1 -0
  289. package/dist/chunks/{teammateModeSnapshot-DZ6ulELC.js → teammateModeSnapshot-DhXjREuo.js} +1 -1
  290. package/dist/chunks/teammateModeSnapshot-_MCm6NGJ.js +1 -0
  291. package/dist/chunks/teleport-W2iPwivh.js +1 -0
  292. package/dist/chunks/{templateJobs-nFBp68za.js → templateJobs-1oMC9yLQ.js} +1 -1
  293. package/dist/chunks/{terminalSetup-DULcnnWe.js → terminalSetup-Bkml3uSP.js} +1 -1
  294. package/dist/chunks/{terminalSetup-BORjK3qH.js → terminalSetup-DJX1hqKs.js} +1 -1
  295. package/dist/chunks/{theme-Bf2QD0ja.js → theme-ia4cIc4d.js} +1 -1
  296. package/dist/chunks/thinkback-1NYskewu.js +1 -0
  297. package/dist/chunks/{thinkback-DZEhr3Ii.js → thinkback-DWLUXUQC.js} +1 -1
  298. package/dist/chunks/thinkback-play-DZmXMRtq.js +1 -0
  299. package/dist/chunks/{toolEventObserver-DMdrez6V.js → toolEventObserver-Ci0BECRu.js} +1 -1
  300. package/dist/chunks/{toolEventObserver-CNZy5TpN.js → toolEventObserver-nPwMQ5Vf.js} +1 -1
  301. package/dist/chunks/toolPool-ByCdlOak.js +1 -0
  302. package/dist/chunks/toolPool-IkNWjuk2.js +1 -0
  303. package/dist/chunks/{trustedDevice-Dw2crViN.js → trustedDevice-BynTLVs4.js} +1 -1
  304. package/dist/chunks/{trustedDevice-DWb5CPB_.js → trustedDevice-CtL2IGDX.js} +1 -1
  305. package/dist/chunks/{ultrareviewCommand-BfN25zni.js → ultrareviewCommand-DN-QhQ-f.js} +2 -2
  306. package/dist/chunks/undercover-CqJzV_Ar.js +1 -0
  307. package/dist/chunks/{undercover-rcR56jZx.js → undercover-DLr5xI3K.js} +1 -1
  308. package/dist/chunks/{updateCCB-DlTAqQJq.js → updateCCB-C6Ov8SNx.js} +4 -4
  309. package/dist/chunks/{upgrade-ClLcX7zy.js → upgrade-CVM1ffhq.js} +1 -1
  310. package/dist/chunks/upgrade-d40dVpDc.js +1 -0
  311. package/dist/chunks/{upload-BqEzK59v.js → upload-DSNwGLNd.js} +1 -1
  312. package/dist/chunks/{usage-BgKDh8pQ.js → usage-BRv8mBDf.js} +1 -1
  313. package/dist/chunks/{usage-DW-akzSR.js → usage-GMw8NiO_.js} +1 -1
  314. package/dist/chunks/{useMainLoopModel-BTpZ8k3k.js → useMainLoopModel-CEM_50a0.js} +1 -1
  315. package/dist/chunks/{useManagePlugins-z0qezP5r.js → useManagePlugins-hCqb5F5n.js} +1 -1
  316. package/dist/chunks/{useMergedTools-B78rAreW.js → useMergedTools-DxvRmxVF.js} +1 -1
  317. package/dist/chunks/{useSearchInput-CwxF3CHN.js → useSearchInput-BCErnYur.js} +1 -1
  318. package/dist/chunks/useSettingsErrors-BwNeCSA6.js +1 -0
  319. package/dist/chunks/{useVoice-X5WSnyed.js → useVoice-Cu39ifSa.js} +1 -1
  320. package/dist/chunks/{util-CP-_gsEO.js → util-DYuasrIE.js} +1 -1
  321. package/dist/chunks/utils-DSGFJaZ_.js +1 -0
  322. package/dist/chunks/{validatePlugin-DUuaprqR.js → validatePlugin-b1ec7M7n.js} +1 -1
  323. package/dist/chunks/{vim-BfmsdxOa.js → vim-CrAzv4cM.js} +1 -1
  324. package/dist/chunks/{voice-B3GIfFlB.js → voice-DKG3SYqi.js} +2 -2
  325. package/dist/chunks/{voiceModeEnabled-C1Q9j5q6.js → voiceModeEnabled-By2qa3A2.js} +1 -1
  326. package/dist/chunks/voiceModeEnabled-DwYcj-FH.js +1 -0
  327. package/dist/chunks/voiceStreamSTT-DD8ulbg1.js +1 -0
  328. package/dist/chunks/{voiceStreamSTT-BguyxdrW.js → voiceStreamSTT-DEV82xnN.js} +1 -1
  329. package/dist/chunks/{web-tools-qf_VwWRn.js → web-tools-8QRyE7va.js} +1 -1
  330. package/dist/chunks/windowsPaths-CRq9Bt5c.js +1 -0
  331. package/dist/chunks/windowsPaths-jbJ-skB_.js +1 -0
  332. package/dist/chunks/{workerRegistry-SbiLJIsG.js → workerRegistry-S7pO5khK.js} +1 -1
  333. package/dist/chunks/worktree-CfXrXsQ2.js +1 -0
  334. package/dist/chunks/{xml-D7-jJqSA.js → xml-CPJXOUFt.js} +1 -1
  335. package/dist/cli.js +1 -1
  336. package/package.json +1 -1
  337. package/dist/chunks/ApproveApiKey-Do-Qth0X.js +0 -1
  338. package/dist/chunks/BackgroundTasksDialog-DSeAqhMC.js +0 -2
  339. package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +0 -1
  340. package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +0 -1
  341. package/dist/chunks/DiffDialog-BfSnz8L-.js +0 -3
  342. package/dist/chunks/Doctor-BOVjkAKn.js +0 -3
  343. package/dist/chunks/Doctor-osWC5WVY.js +0 -1
  344. package/dist/chunks/Grove-DyC_Wrfx.js +0 -1
  345. package/dist/chunks/MCPConnectionManager-2Fulnp8q.js +0 -1
  346. package/dist/chunks/MessageSelector-B4jJQ-KQ.js +0 -3
  347. package/dist/chunks/Messages-ltcn1Qkf.js +0 -11
  348. package/dist/chunks/PluginSettings-DIS_qrVA.js +0 -17
  349. package/dist/chunks/QueryEngine-BQs519Rb.js +0 -1
  350. package/dist/chunks/REPL-DJh_wVWI.js +0 -1
  351. package/dist/chunks/ResumeConversation-BK7L_YBI.js +0 -1
  352. package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +0 -1
  353. package/dist/chunks/SentryErrorBoundary-DLML64E_.js +0 -1
  354. package/dist/chunks/Settings-DOve7mW1.js +0 -2
  355. package/dist/chunks/api-CoBZPEi-.js +0 -1
  356. package/dist/chunks/asciicast-DA6TudSH.js +0 -1
  357. package/dist/chunks/assistant-B2_c5C4T.js +0 -1
  358. package/dist/chunks/auth-CRVuUNwf.js +0 -1
  359. package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +0 -1
  360. package/dist/chunks/backgroundHousekeeping-Cll7XHG1.js +0 -17
  361. package/dist/chunks/bridgeConfig-pVTHa_ED.js +0 -1
  362. package/dist/chunks/bridgeEnabled-c_BeJX3S.js +0 -1
  363. package/dist/chunks/bridgeMain-CHk_DCxy.js +0 -1
  364. package/dist/chunks/bridgeMain-DVoobI7G.js +0 -68
  365. package/dist/chunks/caches-3byHT6VF.js +0 -1
  366. package/dist/chunks/changeDetector-Cg75mKOu.js +0 -1
  367. package/dist/chunks/channelNotification-BSmZprUZ.js +0 -1
  368. package/dist/chunks/clear-CTOCrXv_.js +0 -1
  369. package/dist/chunks/client-BgdjJNnC.js +0 -1
  370. package/dist/chunks/color-BP4FmcMn.js +0 -1
  371. package/dist/chunks/commands-CkfOhzGE.js +0 -1
  372. package/dist/chunks/commitAttribution-DKvggTZx.js +0 -1
  373. package/dist/chunks/compact-BtAvCkY0.js +0 -3
  374. package/dist/chunks/context-noninteractive-DNOyQYnM.js +0 -1
  375. package/dist/chunks/conversation-DR4MFYYi.js +0 -1
  376. package/dist/chunks/conversation-DVhyJA1O.js +0 -1
  377. package/dist/chunks/createSession-CIM50iEU.js +0 -1
  378. package/dist/chunks/datadog-vQKKqB6Z.js +0 -1
  379. package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +0 -1
  380. package/dist/chunks/exit-CwGJifQF.js +0 -1
  381. package/dist/chunks/extra-usage-1FUBiJOE.js +0 -1
  382. package/dist/chunks/extraUsage-Ca_6qcke.js +0 -1
  383. package/dist/chunks/extractMemories-B-yrLjpP.js +0 -1
  384. package/dist/chunks/fast-CFtN26up.js +0 -1
  385. package/dist/chunks/gates-4fq2Ws2D.js +0 -1
  386. package/dist/chunks/hooks-CmW7bdtz.js +0 -1
  387. package/dist/chunks/inboundAttachments-DZiITyN8.js +0 -1
  388. package/dist/chunks/initReplBridge-YGXqLbNZ.js +0 -1
  389. package/dist/chunks/language-CiMwEWO-.js +0 -1
  390. package/dist/chunks/loadAgentsDir-CjhNkoq0.js +0 -1
  391. package/dist/chunks/loadPluginHooks-DukITDP2.js +0 -1
  392. package/dist/chunks/localSearch-D8FFon8N.js +0 -1
  393. package/dist/chunks/login-B3TV33p4.js +0 -1
  394. package/dist/chunks/logout-BqbTEPv9.js +0 -1
  395. package/dist/chunks/mcp-DtHGTZUo.js +0 -1
  396. package/dist/chunks/mcp-Vj0ijoSq.js +0 -6
  397. package/dist/chunks/model-BYSyXf9-.js +0 -1
  398. package/dist/chunks/permissions-B39hfy0O.js +0 -3
  399. package/dist/chunks/pluginBlocklist-D2Cj4TR2.js +0 -1
  400. package/dist/chunks/pluginOperations-DDI1CG0K.js +0 -2
  401. package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +0 -1
  402. package/dist/chunks/plugins-Bz7JxD43.js +0 -4
  403. package/dist/chunks/policyLimits-C-oHygGe.js +0 -1
  404. package/dist/chunks/poorMode-D2-4vRxb.js +0 -1
  405. package/dist/chunks/processBashCommand-BjdUo_Na.js +0 -1
  406. package/dist/chunks/processSlashCommand-tetvMLMl.js +0 -6
  407. package/dist/chunks/prompt-DZ1EAUlC.js +0 -1
  408. package/dist/chunks/prompt-DeRHlPn1.js +0 -1
  409. package/dist/chunks/rate-limit-options-B6QH2-xn.js +0 -1
  410. package/dist/chunks/refresh-DmEsCaJ0.js +0 -1
  411. package/dist/chunks/registry-CLaXh4Gk.js +0 -1
  412. package/dist/chunks/rename-eEdSZsJ2.js +0 -1
  413. package/dist/chunks/sandbox-adapter-DagBhoTC.js +0 -1
  414. package/dist/chunks/searchExtraTools-kk-wV-cC.js +0 -1
  415. package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +0 -1
  416. package/dist/chunks/sessionMemory-BMtFup-Y.js +0 -1
  417. package/dist/chunks/sessionMemory-Bq3ECr1S.js +0 -1
  418. package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +0 -1
  419. package/dist/chunks/sessionObserver-BwAfzGUg.js +0 -1
  420. package/dist/chunks/sessionStorage-X2u45U9z.js +0 -1
  421. package/dist/chunks/setup-C2V4elOv.js +0 -3
  422. package/dist/chunks/sink-nZmawD5W.js +0 -1
  423. package/dist/chunks/sinks-BTZnXPr_.js +0 -1
  424. package/dist/chunks/skillChangeDetector-345QNWDp.js +0 -1
  425. package/dist/chunks/skillLearning-BJAfTX2G.js +0 -1
  426. package/dist/chunks/skillLearning-DPhuKS4j.js +0 -1
  427. package/dist/chunks/statusNoticeHelpers-AibXOONm.js +0 -1
  428. package/dist/chunks/teamHelpers-CxoQp7OY.js +0 -1
  429. package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +0 -1
  430. package/dist/chunks/teleport-CuDXJj_f.js +0 -1
  431. package/dist/chunks/thinkback-C1nnGg5r.js +0 -1
  432. package/dist/chunks/thinkback-play-BtEBESXM.js +0 -1
  433. package/dist/chunks/toolPool-DDj2TbY6.js +0 -1
  434. package/dist/chunks/toolPool-DHQyHmDY.js +0 -1
  435. package/dist/chunks/undercover-DSp7SB7e.js +0 -1
  436. package/dist/chunks/upgrade-kf1QWUo7.js +0 -1
  437. package/dist/chunks/useSettingsErrors-CjDaon07.js +0 -1
  438. package/dist/chunks/utils-CULcnflj.js +0 -1
  439. package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +0 -1
  440. package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +0 -1
  441. package/dist/chunks/windowsPaths-BeDSnJ23.js +0 -2
  442. package/dist/chunks/windowsPaths-ttHiMKpR.js +0 -1
  443. package/dist/chunks/worktree-Djga1wtm.js +0 -1
@@ -1,6 +0,0 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./p-map-D7WEmnBE.js";import{Mt as r,Rn as i,T as a,b as o,f as s,g as c,h as ee,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Sc as p,dc as m,lc as h,yc as g}from"./paths-CEAy4QCs.js";import{K as _,U as v}from"./debug-otxXY3j-.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{n as x,o as S}from"./process-DMKLUQIO.js";import{i as C,o as w}from"./platform-mh9ypxS8.js";import{s as T,u as te}from"./types-KeqFPzY5.js";import{l as E,o as ne}from"./stringUtils-KZoO4GUd.js";import{$C as re,$x as ie,By as ae,DC as oe,Dw as D,EC as O,Fy as k,Gw as A,Iw as j,Ow as M,Py as N,QC as P,Rw as F,SE as I,Vw as L,XC as R,Yx as z,ZC as B,_w as V,cC as H,gw as U,jw as W,lC as G,rw as K,tS as se,tw as ce,wE as q,zw as le,zy as ue}from"./loadAgentsDir-DC4jN6-f.js";import{n as J,t as Y}from"./exit-DOBLl8jN.js";import{stat as de}from"fs/promises";import{cwd as fe}from"process";n();var X=e(i(),1);q(),x(),l(),L(),ne(),oe(),ae();var Z=f();function pe({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,l]=(0,X.useState)({});(0,X.useEffect)(()=>{j().then(({servers:e})=>l(e))},[]);let f=r.filter(e=>i[e]!==void 0);async function p(n){let r=0;for(let a of n){let n=e[a];if(n){let e=a;if(i[e]!==void 0){let t=1;for(;i[`${a}_${t}`]!==void 0;)t++;e=`${a}_${t}`}await W(e,n,t),r++}}h(r)}let[m]=a(),h=(0,X.useCallback)(e=>{S(e>0?`\n${u(`success`,m)(`Successfully imported ${e} MCP ${E(e,`server`)} to ${t} config.`)}\n`:`
2
- No servers were imported.`),n(),I()},[m,t,n]),g=(0,X.useCallback)(()=>{h(0)},[h]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(s,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${r.length} MCP ${E(r.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:g,hideInputGuide:!0,children:[f.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(ue,{options:r.map(e=>({label:`${e}${f.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:r.filter(e=>!f.includes(e)),onSubmit:p,onCancel:g,hideIndexes:!0})]}),(0,Z.jsx)(d,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(ee,{children:[(0,Z.jsx)(c,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}l(),k(),y(),re(),se(),L(),M(),G(),g(),v(),q(),T(),w();async function Q(e,t){try{let n=await z(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function me({debug:e,verbose:t}){let n=fe();b(`tengu_mcp_start`,{});try{await de(n)}catch(e){throw _(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-C2V4elOv.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-i8lqdWTr.js`);await i(n,e??!1,t??!1)}catch(e){Y(`Error: Failed to start MCP server: ${e}`)}}async function he(e,t){let n=F(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(B(e,n),R(e,n))};try{if(t.scope){let n=V(t.scope);b(`tengu_mcp_delete`,{name:e,scope:n}),await A(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),J(`File modified: ${U(n)}`)}let n=h(),i=m(),{servers:a}=le(`project`),o=!!a[e],s=[];if(n.mcpServers?.[e]&&s.push(`local`),o&&s.push(`project`),i.mcpServers?.[e]&&s.push(`user`),s.length===0)Y(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];b(`tengu_mcp_delete`,{name:e,scope:t}),await A(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),J(`File modified: ${U(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${D(e)} (${U(e)})\n`)}),process.stderr.write(`
3
- To remove from a specific scope, use:
4
- `),s.forEach(t=>{process.stderr.write(` claude mcp remove "${e}" -s ${t}\n`)}),Y()}catch(e){Y(e.message)}}async function ge(){b(`tengu_mcp_list`,{});let{servers:e}=await j();if(Object.keys(e).length===0)console.log("No MCP servers configured. Use `claude mcp add` to add a server.");else{console.log(`Checking MCP server health...
5
- `);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await Q(e,t)}),{concurrency:ie()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await I(0)}async function $(e){b(`tengu_mcp_get`,{name:e});let t=F(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${D(t.scope)}`);let n=await Q(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),P(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),P(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await I(0)}async function _e(e,t,n){try{let r=V(n.scope),i=te(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await ce():void 0;await W(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&K(e,{type:i.type,url:i.url},a),b(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function ve(e){try{let t=V(e.scope);b(`tengu_mcp_add`,{scope:t,platform:C(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-BqTW_pbB.js`),i=await n();Object.keys(i).length===0&&J(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:a}=await r((0,Z.jsx)(H,{children:(0,Z.jsx)(N,{children:(0,Z.jsx)(pe,{servers:i,scope:t,onDone:()=>{a()}})})}),{exitOnCtrlC:!0})}catch(e){Y(e.message)}}async function ye(){b(`tengu_mcp_reset_mcpjson_choices`,{}),p(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),J(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
6
- You will be prompted for approval next time you start Claude Code.`)}export{ve as mcpAddFromDesktopHandler,_e as mcpAddJsonHandler,$ as mcpGetHandler,ge as mcpListHandler,he as mcpRemoveHandler,ye as mcpResetChoicesHandler,me as mcpServeHandler};
@@ -1 +0,0 @@
1
- import{Dr as e,Pr as t}from"./paths-CEAy4QCs.js";t();export{e as getMainLoopModel};
@@ -1,3 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,J as o,Ln as s,Rn as c,Ut as l,_ as u,a as d,b as f,f as p,i as m,n as h,o as g,p as ee,r as te,t as _,tt as ne,x as v,xt as y}from"./src-Di342QoJ.js";import{t as b}from"./jsx-runtime-D-D469L8.js";import{cn as re,ot as x}from"./state-sIHsFpDu.js";import{Ao as S,Do as C,Gs as w,Xa as T,ko as E,oo as D,zs as O}from"./paths-CEAy4QCs.js";import{E as k,O as A}from"./debug-otxXY3j-.js";import{l as j,o as M}from"./stringUtils-KZoO4GUd.js";import{Dp as ie,FA as ae,FD as N,H as oe,ID as se,K as ce,MA as P,Op as le,U as ue,Uo as F,V as de,W as fe,aS as I,bo as L,dS as pe,fC as me,fS as R,jD as z,lC as he,oS as B,q as ge,uC as _e,vu as V,yu as ve}from"./loadAgentsDir-DC4jN6-f.js";import{t as ye}from"./useKeybinding-DPOUuymz.js";import{t as be}from"./useTerminalSize-Du-EamDN.js";import{n as xe,t as Se}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as Ce,t as we}from"./AddWorkspaceDirectory-BCCbaWoh.js";import{t as Te}from"./SearchBox-Bu4gYF0J.js";import{n as Ee,t as De}from"./useSearchInput-CwxF3CHN.js";import{n as H,t as Oe}from"./shadowedRuleDetection-BdBNo5eP.js";import{n as ke,t as Ae}from"./autoModeDenials-BDpcFLb7.js";function je({ruleValue:e}){switch(e.toolName){case V.name:return e.ruleContent?e.ruleContent.endsWith(`:*`)?(0,U.jsxs)(f,{dimColor:!0,children:[`Any Bash command starting with `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent.slice(0,-2)})]}):(0,U.jsxs)(f,{dimColor:!0,children:[`The Bash command `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent})]}):(0,U.jsx)(f,{dimColor:!0,children:`Any Bash command`});default:return e.ruleContent?null:(0,U.jsxs)(f,{dimColor:!0,children:[`Any use of the `,(0,U.jsx)(f,{bold:!0,children:e.toolName}),` tool`]})}}var U,Me=e((()=>{c(),_(),ve(),U=b()}));function Ne(e){switch(e){case`localSettings`:return{label:`Project settings (local)`,description:`Saved in ${T(`localSettings`)}`,value:e};case`projectSettings`:return{label:`Project settings`,description:`Checked in at ${T(`projectSettings`)}`,value:e};case`userSettings`:return{label:`User settings`,description:`Saved in at ~/.claude/settings.json`,value:e}}}function Pe({onAddRules:e,onCancel:t,ruleValues:n,ruleBehavior:r,initialContext:i,setToolPermissionContext:a}){let o=O.map(Ne),s=(0,Fe.useCallback)(o=>{if(o===`cancel`){t();return}else if(O.includes(o)){let t=o,s=z(i,{type:`addRules`,rules:n,behavior:r,destination:t});se({type:`addRules`,rules:n,behavior:r,destination:t}),a(s);let c=n.map(e=>({ruleValue:e,ruleBehavior:r,source:t})),l=Oe(s,{sandboxAutoAllowEnabled:P.isSandboxingEnabled()&&P.isAutoAllowBashIfSandboxedEnabled()}).filter(e=>n.some(t=>t.toolName===e.rule.ruleValue.toolName&&t.ruleContent===e.rule.ruleValue.ruleContent));e(c,l.length>0?l:void 0)}},[e,t,n,r,i,a]);return(0,W.jsxs)(p,{title:`Add ${r} permission ${j(n.length,`rule`)}`,onCancel:t,color:`permission`,children:[(0,W.jsx)(v,{flexDirection:`column`,paddingX:2,children:n.map(e=>(0,W.jsxs)(v,{flexDirection:`column`,children:[(0,W.jsx)(f,{bold:!0,children:S(e)}),(0,W.jsx)(je,{ruleValue:e})]},S(e)))}),(0,W.jsxs)(v,{flexDirection:`column`,marginY:1,children:[(0,W.jsx)(f,{children:n.length===1?`Where should this rule be saved?`:`Where should these rules be saved?`}),(0,W.jsx)(I,{options:o,onChange:s})]})]})}var Fe,W,Ie=e((()=>{c(),Fe=t(c(),1),B(),_(),N(),C(),H(),ae(),w(),D(),M(),Me(),W=b()}));function Le({onCancel:e,onSubmit:t,ruleBehavior:n}){let[a,s]=(0,Re.useState)(``),[c,l]=(0,Re.useState)(0),u=xe();ne(`confirm:no`,e,{context:`Settings`});let{columns:d}=i(),p=d-6;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,G.jsxs)(f,{bold:!0,color:`permission`,children:[`Add `,n,` permission rule`]}),(0,G.jsxs)(v,{flexDirection:`column`,children:[(0,G.jsxs)(f,{children:[`Permission rules are a tool name, optionally followed by a specifier in parentheses.`,(0,G.jsx)(o,{}),`e.g., `,(0,G.jsx)(f,{bold:!0,children:S({toolName:ie.name})}),(0,G.jsx)(f,{bold:!1,children:` or `}),(0,G.jsx)(f,{bold:!0,children:S({toolName:V.name,ruleContent:`ls:*`})})]}),(0,G.jsx)(v,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,G.jsx)(pe,{showCursor:!0,value:a,onChange:s,onSubmit:e=>{let r=e.trim();r.length!==0&&t(E(r),n)},placeholder:`Enter permission rule${r.ellipsis}`,columns:p,cursorOffset:c,onChangeCursorOffset:l})})]})]}),(0,G.jsx)(v,{marginLeft:3,children:u.pending?(0,G.jsxs)(f,{dimColor:!0,children:[`Press `,u.keyName,` again to exit`]}):(0,G.jsx)(f,{dimColor:!0,children:`Enter to submit · Esc to cancel`})})]})}var Re,G,ze=e((()=>{n(),c(),Re=t(c(),1),R(),Se(),be(),_(),ye(),ve(),le(),C(),G=b()}));function Be({onHeaderFocusChange:e,onStateChange:t}){let{headerFocused:n,focusHeader:r}=m();(0,K.useEffect)(()=>{e?.(n)},[n,e]);let[i]=(0,K.useState)(()=>Ae()),[a,o]=(0,K.useState)(()=>new Set),[s,c]=(0,K.useState)(()=>new Set),[l,u]=(0,K.useState)(0);(0,K.useEffect)(()=>{t({approved:a,retry:s,denials:i})},[a,s,i,t]);let d=(0,K.useCallback)(e=>{let t=Number(e);o(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),p=(0,K.useCallback)(e=>{u(Number(e))},[]);if(y((e,t)=>{e===`r`&&(c(e=>{let t=new Set(e);return t.has(l)?t.delete(l):t.add(l),t}),o(e=>{if(e.has(l))return e;let t=new Set(e);return t.add(l),t}))},{isActive:i.length>0}),i.length===0)return(0,q.jsx)(f,{dimColor:!0,children:`No recent denials. Commands denied by the auto mode classifier will appear here.`});let h=i.map((e,t)=>{let n=a.has(t),r=s.has(t)?` (retry)`:``;return{label:(0,q.jsxs)(f,{children:[(0,q.jsx)(g,{status:n?`success`:`error`,withSpace:!0}),e.display,(0,q.jsx)(f,{dimColor:!0,children:r})]}),value:String(t)}});return(0,q.jsxs)(v,{flexDirection:`column`,children:[(0,q.jsx)(f,{children:`Commands recently denied by the auto mode classifier.`}),(0,q.jsx)(v,{marginTop:1,children:(0,q.jsx)(I,{options:h,onChange:d,onFocus:p,visibleOptionCount:Math.min(10,h.length),isDisabled:n,onUpFromFirstItem:r})})]})}var K,q,Ve=e((()=>{c(),K=t(c(),1),_(),ke(),B(),q=b()}));function He({directoryPath:e,onRemove:t,onCancel:n,permissionContext:r,setPermissionContext:i}){let a=(0,J.useCallback)(()=>{i(z(r,{type:`removeDirectories`,directories:[e],destination:`session`})),t()},[e,r,i,t]),o=(0,J.useCallback)(e=>{e===`yes`?a():n()},[a,n]);return(0,Y.jsxs)(p,{title:`Remove directory from workspace?`,onCancel:n,color:`error`,children:[(0,Y.jsx)(v,{marginX:2,flexDirection:`column`,children:(0,Y.jsx)(f,{bold:!0,children:e})}),(0,Y.jsx)(f,{children:`Claude Code will no longer have access to files in this directory.`}),(0,Y.jsx)(I,{onChange:o,onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]})}var J,Y,Ue=e((()=>{c(),J=t(c(),1),B(),_(),N(),Y=b()}));function We({onExit:e,toolPermissionContext:t,onRequestAddDirectory:n,onRequestRemoveDirectory:i,onHeaderFocusChange:a}){let{headerFocused:o,focusHeader:s}=m();(0,X.useEffect)(()=>{a?.(o)},[o,a]);let c=Ge.useMemo(()=>Array.from(t.additionalWorkingDirectories.keys()).map(e=>({path:e,isCurrent:!1,isDeletable:!0})),[t.additionalWorkingDirectories]),l=(0,X.useCallback)(e=>{if(e===`add-directory`){n();return}let t=c.find(t=>t.path===e);t&&t.isDeletable&&i(t.path)},[c,n,i]),u=(0,X.useCallback)(()=>e(`Workspace dialog dismissed`,{display:`system`}),[e]),d=Ge.useMemo(()=>{let e=c.map(e=>({label:e.path,value:e.path}));return e.push({label:`Add directory${r.ellipsis}`,value:`add-directory`}),e},[c]);return(0,Z.jsxs)(v,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(v,{flexDirection:`row`,marginTop:1,marginLeft:2,gap:1,children:[(0,Z.jsx)(f,{children:`- ${x()}`}),(0,Z.jsx)(f,{dimColor:!0,children:`(Original working directory)`})]}),(0,Z.jsx)(I,{options:d,onChange:l,onCancel:u,visibleOptionCount:Math.min(10,d.length),onUpFromFirstItem:s,isDisabled:o})]})}var Ge,X,Z,Ke=e((()=>{n(),Ge=t(c(),1),X=t(c(),1),re(),B(),_(),Z=b()}));function qe({rule:e}){return(0,$.jsx)(f,{dimColor:!0,children:`From ${ge(e.source)}`})}function Je(e){switch(e){case`allow`:return`allowed`;case`deny`:return`denied`;case`ask`:return`ask`}}function Ye({rule:e,onDelete:t,onCancel:n}){let r=xe();ne(`confirm:no`,n,{context:`Confirmation`});let i=(0,$.jsxs)(v,{flexDirection:`column`,marginX:2,children:[(0,$.jsx)(f,{bold:!0,children:S(e.ruleValue)}),(0,$.jsx)(je,{ruleValue:e.ruleValue}),(0,$.jsx)(qe,{rule:e})]}),a=(0,$.jsx)(v,{marginLeft:3,children:r.pending?(0,$.jsxs)(f,{dimColor:!0,children:[`Press `,r.keyName,` again to exit`]}):(0,$.jsx)(f,{dimColor:!0,children:`Esc to cancel`})});return e.source===`policySettings`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,$.jsx)(f,{bold:!0,color:`permission`,children:`Rule details`}),i,(0,$.jsxs)(f,{italic:!0,children:[`This rule is configured by managed settings and cannot be modified.`,`
2
- `,`Contact your system administrator for more information.`]})]}),a]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`error`,children:[(0,$.jsxs)(f,{bold:!0,color:`error`,children:[`Delete `,Je(e.ruleBehavior),` tool?`]}),i,(0,$.jsx)(f,{children:`Are you sure you want to delete this permission rule?`}),(0,$.jsx)(I,{onChange:e=>e===`yes`?t():n(),onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]}),a]})}function Xe(e){let{options:t,searchQuery:n,isSearchMode:r,isFocused:i,onSelect:a,onCancel:o,lastFocusedRuleKey:s,cursorOffset:c,onHeaderFocusChange:l}=e,f=d(),{headerFocused:p,focusHeader:h,blurHeader:g}=m();return(0,Q.useEffect)(()=>{r&&p&&g()},[r,p,g]),(0,Q.useEffect)(()=>{l?.(p)},[p,l]),(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(v,{marginBottom:1,flexDirection:`column`,children:(0,$.jsx)(u,{query:n,isFocused:r&&!p,isTerminalFocused:i,width:f,cursorOffset:c})}),(0,$.jsx)(I,{options:t,onChange:a,onCancel:o,visibleOptionCount:Math.min(10,t.length),isDisabled:r||p,defaultFocusValue:s,onUpFromFirstItem:h})]})}function Ze({tab:e,getRulesOptions:t,handleToolSelect:n,...r}){return(0,$.jsxs)(v,{flexDirection:`column`,flexShrink:e===`allow`?0:void 0,children:[(0,$.jsx)(f,{children:{allow:`Claude Code won't ask before using allowed tools.`,ask:`Claude Code will always ask for confirmation before using these tools.`,deny:`Claude Code will always reject requests to use denied tools.`}[e]}),(0,$.jsx)(Xe,{options:t(e,r.searchQuery).options,onSelect:t=>n(t,e),...r})]})}function Qe({onExit:e,initialTab:t,onRetryDenials:n}){let i=Ae().length>0,o=t??(i?`recent`:`allow`),[s,c]=(0,Q.useState)([]),u=_e(e=>e.toolPermissionContext),d=me(),p=l(),m=(0,Q.useRef)({approved:new Set,retry:new Set,denials:[]}),g=(0,Q.useCallback)(e=>{m.current=e},[]),[_,y]=(0,Q.useState)(),[b,re]=(0,Q.useState)(),[x,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(!1),[ie,ae]=(0,Q.useState)(!0),N=(0,Q.useCallback)(e=>{ae(e)},[]),ce=(0,Q.useMemo)(()=>{let e=new Map;return oe(u).forEach(t=>{e.set(A(t),t)}),e},[u]),P=(0,Q.useMemo)(()=>{let e=new Map;return fe(u).forEach(t=>{e.set(A(t),t)}),e},[u]),le=(0,Q.useMemo)(()=>{let e=new Map;return ue(u).forEach(t=>{e.set(A(t),t)}),e},[u]),F=(0,Q.useCallback)((e,t=``)=>{let n=(()=>{switch(e){case`allow`:return ce;case`deny`:return P;case`ask`:return le;case`workspace`:case`recent`:return new Map}})(),i=[];e!==`workspace`&&e!==`recent`&&!t&&i.push({label:`Add a new rule${r.ellipsis}`,value:`add-new-rule`});let a=Array.from(n.keys()).sort((e,t)=>{let r=n.get(e),i=n.get(t);if(r&&i){let e=S(r.ruleValue).toLowerCase(),t=S(i.ruleValue).toLowerCase();return e.localeCompare(t)}return 0}),o=t.toLowerCase();for(let e of a){let r=n.get(e);if(r){let n=S(r.ruleValue);if(t&&!n.toLowerCase().includes(o))continue;i.push({label:n,value:e})}}return{options:i,rulesByKey:n}},[ce,P,le]),I=xe(),L=!_&&!x&&!w&&!E&&!O,{query:pe,setQuery:R,cursorOffset:he}=Ee({isActive:L&&j,onExit:()=>{M(!1)}}),B=(0,Q.useCallback)(e=>{L&&(j||e.ctrl||e.meta||(e.key===`/`?(e.preventDefault(),M(!0),R(``)):e.key.length===1&&e.key!==`j`&&e.key!==`k`&&e.key!==`m`&&e.key!==`i`&&e.key!==`r`&&e.key!==` `&&(e.preventDefault(),M(!0),R(e.key))))},[L,j,R]),ge=(0,Q.useCallback)((e,t)=>{let{rulesByKey:n}=F(t);if(e===`add-new-rule`){C(t);return}else{y(n.get(e));return}},[F]),V=(0,Q.useCallback)(()=>{C(null)},[]),ve=(0,Q.useCallback)((e,t)=>{T({ruleValue:e,ruleBehavior:t}),C(null)},[]),ye=(0,Q.useCallback)((e,t)=>{T(null);for(let t of e)c(e=>[...e,`Added ${t.ruleBehavior} rule ${a.bold(S(t.ruleValue))}`]);if(t&&t.length>0)for(let e of t){let t=e.shadowType===`deny`?`blocked`:`shadowed`;c(n=>[...n,a.yellow(`${r.warning} Warning: ${S(e.rule.ruleValue)} is ${t}`),a.dim(` ${e.reason}`),a.dim(` Fix: ${e.fix}`)])}},[]),be=(0,Q.useCallback)(()=>{T(null)},[]),Se=(0,Q.useCallback)(()=>D(!0),[]),Ce=(0,Q.useCallback)(e=>k(e),[]),Te=(0,Q.useCallback)(()=>{let t=m.current,r=e=>Array.from(e).map(e=>t.denials[e]).filter(e=>e!==void 0),i=r(t.retry);if(i.length>0){let t=i.map(e=>e.display);n?.(t),e(void 0,{shouldQuery:!0,metaMessages:[`Permission granted for: ${t.join(`, `)}. You may now retry ${t.length===1?`this command`:`these commands`} if you would like.`]});return}let o=r(t.approved);o.length>0||s.length>0?e([...o.length>0?[`Approved ${o.map(e=>a.bold(e.display)).join(`, `)}`]:[],...s].join(`
3
- `)):e(`Permissions dialog dismissed`,{display:`system`})},[s,e,n]);ne(`confirm:no`,Te,{context:`Settings`,isActive:L&&!j});let De=()=>{if(!_)return;let{options:e}=F(_.ruleBehavior),t=A(_),n=e.filter(e=>e.value!==`add-new-rule`).map(e=>e.value),r=n.indexOf(t),i;r!==-1&&(r<n.length-1?i=n[r+1]:r>0&&(i=n[r-1])),re(i),de({rule:_,initialContext:u,setToolPermissionContext(e){d(t=>({...t,toolPermissionContext:e}))}}),c(e=>[...e,`Deleted ${_.ruleBehavior} rule ${a.bold(S(_.ruleValue))}`]),y(void 0)};if(_)return(0,$.jsx)(Ye,{rule:_,onDelete:De,onCancel:()=>y(void 0)});if(x&&x!==`workspace`&&x!==`recent`)return(0,$.jsx)(Le,{onCancel:V,onSubmit:ve,ruleBehavior:x});if(w)return(0,$.jsx)(Pe,{onAddRules:ye,onCancel:be,ruleValues:[w.ruleValue],ruleBehavior:w.ruleBehavior,initialContext:u,setToolPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});if(E)return(0,$.jsx)(we,{onAddDirectory:(e,t)=>{let n={type:`addDirectories`,directories:[e],destination:t?`localSettings`:`session`},r=z(u,n);d(e=>({...e,toolPermissionContext:r})),t&&se(n),c(n=>[...n,`Added directory ${a.bold(e)} to workspace${t?` and saved to local settings`:` for this session`}`]),D(!1)},onCancel:()=>D(!1),permissionContext:u});if(O)return(0,$.jsx)(He,{directoryPath:O,onRemove:()=>{c(e=>[...e,`Removed directory ${a.bold(O)} from workspace`]),k(null)},onCancel:()=>k(null),permissionContext:u,setPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});let H={searchQuery:pe,isSearchMode:j,isFocused:p,onCancel:Te,lastFocusedRuleKey:b,cursorOffset:he,getRulesOptions:F,handleToolSelect:ge,onHeaderFocusChange:N};return(0,$.jsx)(v,{flexDirection:`column`,onKeyDown:B,children:(0,$.jsxs)(ee,{color:`permission`,children:[(0,$.jsxs)(te,{title:`Permissions:`,color:`permission`,defaultTab:o,hidden:!!_||!!x||!!w||E||!!O,initialHeaderFocused:!i,navFromContent:!j,children:[(0,$.jsx)(h,{id:`recent`,title:`Recently denied`,children:(0,$.jsx)(Be,{onHeaderFocusChange:N,onStateChange:g})}),(0,$.jsx)(h,{id:`allow`,title:`Allow`,children:(0,$.jsx)(Ze,{tab:`allow`,...H})}),(0,$.jsx)(h,{id:`ask`,title:`Ask`,children:(0,$.jsx)(Ze,{tab:`ask`,...H})}),(0,$.jsx)(h,{id:`deny`,title:`Deny`,children:(0,$.jsx)(Ze,{tab:`deny`,...H})}),(0,$.jsx)(h,{id:`workspace`,title:`Workspace`,children:(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(f,{children:`Claude Code can read files in the workspace, and make edits when auto-accept edits is on.`}),(0,$.jsx)(We,{onExit:e,toolPermissionContext:u,onRequestAddDirectory:Se,onRequestRemoveDirectory:Ce,onHeaderFocusChange:N})]})})]}),(0,$.jsx)(v,{marginTop:1,paddingLeft:1,children:(0,$.jsx)(f,{dimColor:!0,children:I.pending?(0,$.jsxs)($.Fragment,{children:[`Press `,I.keyName,` again to exit`]}):ie?(0,$.jsx)($.Fragment,{children:`←/→ tab switch · ↓ return · Esc cancel`}):j?(0,$.jsx)($.Fragment,{children:`Type to filter · Enter/↓ select · ↑ tabs · Esc clear`}):i&&o===`recent`?(0,$.jsx)($.Fragment,{children:`Enter approve · r retry · ↑↓ navigate · ←/→ switch · Esc cancel`}):(0,$.jsx)($.Fragment,{children:`↑↓ navigate · Enter select · Type to search · ←/→ switch · Esc cancel`})})})]})})}var Q,$,$e=e((()=>{s(),n(),c(),Q=t(c(),1),he(),N(),B(),Se(),De(),_(),ye(),ke(),C(),ce(),k(),Te(),Ie(),Ce(),Me(),ze(),Ve(),Ue(),Ke(),$=b()})),et,tt;e((()=>{$e(),F(),et=b(),tt=async(e,t)=>(0,et.jsx)(Qe,{onExit:e,onRetryDenials:e=>{t.setMessages(t=>[...t,L(e)])}})}))();export{tt as call};
@@ -1 +0,0 @@
1
- import{U as e,l as t,p as n,z as r}from"./debug-otxXY3j-.js";import{Ms as i,Rs as a,Ws as o,Ys as s,qs as c}from"./loadAgentsDir-DC4jN6-f.js";import{d as l,s as u}from"./pluginOperations-DDI1CG0K.js";import{i as d,n as f,r as p,t as m}from"./pluginFlagging-C5EGcjZe.js";u(),t(),e(),i(),c(),p();function h(e,t,n){let r=new Set(t.plugins.map(e=>e.name)),i=`@${n}`,a=[];for(let t of Object.keys(e.plugins)){if(!t.endsWith(i))continue;let e=t.slice(0,-i.length);r.has(e)||a.push(t)}return a}async function g(){await d();let e=a(),t=f(),i=await s(),c=[];for(let a of Object.keys(i))try{let i=await o(a);if(!i.forceRemoveDeletedPlugins)continue;let s=h(e,i,a);for(let i of s){if(i in t)continue;let a=e.plugins[i]??[];if(a.some(e=>e.scope===`user`||e.scope===`project`||e.scope===`local`)){for(let e of a){let{scope:t}=e;if(!(t!==`user`&&t!==`project`&&t!==`local`))try{await l(i,t)}catch(e){n(`Failed to auto-uninstall delisted plugin ${i} from ${t}: ${r(e)}`,{level:`error`})}}await m(i),c.push(i)}}}catch(e){n(`Failed to check for delisted plugins in "${a}": ${r(e)}`,{level:`warn`})}return c}export{g as t};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{Qa as r,lo as i,oo as a}from"./paths-CEAy4QCs.js";import{G as o,J as s,U as c,_ as l,h as u}from"./debug-otxXY3j-.js";import{o as d,s as f}from"./log-DSV4Ht5l.js";import{l as p,o as m}from"./stringUtils-KZoO4GUd.js";import{AA as h,Bs as g,Cs as _,EA as v,Es as y,Js as b,Ks as x,Ls as S,Ms as ee,Oh as C,Os as w,Rs as T,Ws as te,_c as E,_s as D,aT as O,gc as k,gs as A,hc as j,hs as ne,ij as re,kh as ie,ks as ae,nj as M,ps as oe,qs as se,rT as ce,rj as N,vs as P,ws as F,xs as I,ys as L,zs as R}from"./loadAgentsDir-DC4jN6-f.js";import{i as z,m as B,o as V,p as H,s as U}from"./xml-D7-jJqSA.js";import{n as W,t as G}from"./pluginStartupCheck-B3QqfRt6.js";import{dirname as le,join as K}from"path";function q(e){if(!Q.includes(e))throw Error(`Invalid scope "${e}". Must be one of: ${Q.join(`, `)}`)}function ue(e){return Q.includes(e)}function J(e){return e===`project`||e===`local`?n():void 0}function de(e){return r(`projectSettings`)?.enabledPlugins?.[e]===!0}function fe(e){let t=e.includes(`@`);for(let n of[`local`,`project`,`user`]){let i=r(U(n))?.enabledPlugins;if(i){for(let r of Object.keys(i))if(t?r===e:r.startsWith(`${e}@`))return{pluginId:r,scope:n}}}return null}function pe(e,t){let{name:n,marketplace:r}=V(e);return t.find(t=>t.name===e||t.name===n?!0:r&&t.source?t.name===n&&t.source.includes(`@${r}`):!1)}function me(e){let{name:t}=V(e),n=T();if(n.plugins[e]?.length)return{pluginId:e,pluginName:t};let r=Object.keys(n.plugins).find(e=>{let{name:r}=V(e);return r===t&&(n.plugins[e]?.length??0)>0});return r?{pluginId:r,pluginName:t}:null}function Y(e){let t=T().plugins[e];if(!t||t.length===0)return{scope:`user`};let r=n(),i=t.find(e=>e.scope===`local`&&e.projectPath===r);if(i)return{scope:i.scope,projectPath:i.projectPath};let a=t.find(e=>e.scope===`project`&&e.projectPath===r);if(a)return{scope:a.scope,projectPath:a.projectPath};let o=t.find(e=>e.scope===`user`);return o?{scope:o.scope}:{scope:t[0].scope,projectPath:t[0].projectPath}}async function he(e,t=`user`){q(t);let{name:n,marketplace:r}=V(e),i,a,o;if(r){let t=await x(e);t&&(i=t.entry,a=r,o=t.marketplaceInstallLocation)}else{let e=await b();for(let[t,r]of Object.entries(e))try{let e=(await te(t)).plugins.find(e=>e.name===n);if(e){i=e,a=t,o=r.installLocation;break}}catch(e){f(s(e))}}if(!i||!a)return{success:!1,message:`Plugin "${n}" not found in ${r?`marketplace "${r}"`:`any configured marketplace`}`};let c=i,l=`${c.name}@${a}`,u=await y({pluginId:l,entry:c,scope:t,marketplaceInstallLocation:o});if(!u.ok){let e=u;switch(e.reason){case`local-source-no-location`:return{success:!1,message:`Cannot install local plugin "${e.pluginName}" without marketplace install location`};case`settings-write-failed`:return{success:!1,message:`Failed to update settings: ${e.message}`};case`resolution-failed`:return{success:!1,message:_(e.resolution)};case`blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" is blocked by your organization's policy and cannot be installed`};case`dependency-blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" depends on "${e.blockedDependency}", which is blocked by your organization's policy`}}}return{success:!0,message:`Successfully installed plugin: ${l} (scope: ${t})${u.depNote}`,pluginId:l,pluginName:c.name,scope:t}}async function ge(e,t=`user`,n=!0){q(t);let{enabled:a,disabled:o}=await L(),s=[...a,...o],c=pe(e,s),l=U(t),u=r(l),d,f;if(c)d=Object.keys(u?.enabledPlugins??{}).find(t=>t===e||t===c.name||t.startsWith(`${c.name}@`))??(e.includes(`@`)?e:c.name),f=c.name;else{let t=me(e);if(!t)return{success:!1,message:`Plugin "${e}" not found in installed plugins`};d=t.pluginId,f=t.pluginName}let p=J(t),m=T().plugins[d],h=m?.find(e=>e.scope===t&&e.projectPath===p);if(!h){let{scope:n}=Y(d);return n!==t&&m&&m.length>0?n===`project`?{success:!1,message:`Plugin "${e}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${e} --scope local`}:{success:!1,message:`Plugin "${e}" is installed in ${n} scope, not ${t}. Use --scope ${n} to uninstall.`}:{success:!1,message:`Plugin "${e}" is not installed in ${t} scope. Use --scope to specify the correct scope.`}}let g=h.installPath,_={...u?.enabledPlugins};_[d]=void 0,i(l,{enabledPlugins:_}),j(),R(d,t,p);let y=T().plugins[d],b=!y||y.length===0;b&&g&&await E(g),b&&(ce(d),n&&await v(d));let x=M(d,s),S=N(x);return{success:!0,message:`Successfully uninstalled plugin: ${f} (scope: ${t})${S}`,pluginId:d,pluginName:f,scope:t,reverseDependents:x.length>0?x:void 0}}async function X(e,t,n){let a=t?`enable`:`disable`;if(B(e)){let{error:n}=i(`userSettings`,{enabledPlugins:{...r(`userSettings`)?.enabledPlugins,[e]:t}});if(n)return{success:!1,message:`Failed to ${a} built-in plugin: ${n.message}`};j();let{name:o}=V(e);return{success:!0,message:`Successfully ${a}d built-in plugin: ${o}`,pluginId:e,pluginName:o,scope:`user`}}n&&q(n);let o,s,c=fe(e);if(n)if(s=n,c)o=c.pluginId;else if(e.includes(`@`))o=e;else return{success:!1,message:`Plugin "${e}" not found in settings. Use plugin@marketplace format.`};else if(c)o=c.pluginId,s=c.scope;else if(e.includes(`@`))o=e,s=`user`;else return{success:!1,message:`Plugin "${e}" not found in any editable settings scope. Use plugin@marketplace format.`};if(t&&ie(o))return{success:!1,message:`Plugin "${o}" is blocked by your organization's policy and cannot be enabled`};let l=U(s),u=r(l)?.enabledPlugins?.[o],d={user:0,project:1,local:2},f=n&&c&&d[n]>d[c.scope];if(n&&u===void 0&&c&&c.scope!==n&&!f)return{success:!1,message:`Plugin "${e}" is installed at ${c.scope} scope, not ${n}. Use --scope ${c.scope} or omit --scope to auto-detect.`};if(t===(n&&!f?u===!0:G().has(o)))return{success:!1,message:`Plugin "${e}" is already ${t?`enabled`:`disabled`}${n?` at ${n} scope`:``}`};let p;if(!t){let{enabled:e,disabled:t}=await L(),n=M(o,[...e,...t]);n.length>0&&(p=n)}let{error:m}=i(l,{enabledPlugins:{...r(l)?.enabledPlugins,[o]:t}});if(m)return{success:!1,message:`Failed to ${a} plugin: ${m.message}`};j();let{name:h}=V(o),g=N(p);return{success:!0,message:`Successfully ${a}d plugin: ${h} (scope: ${s})${g}`,pluginId:o,pluginName:h,scope:s,reverseDependents:p}}async function _e(e,t){return X(e,!0,t)}async function ve(e,t){return X(e,!1,t)}async function Z(){let e=G();if(e.size===0)return{success:!0,message:`No enabled plugins to disable`};let t=[],n=[];for(let[r]of e){let e=await X(r,!1);e.success?t.push(r):n.push(`${r}: ${e.message}`)}return n.length>0?{success:!1,message:`Disabled ${t.length} ${p(t.length,`plugin`)}, ${n.length} failed:\n${n.join(`
2
- `)}`}:{success:!0,message:`Disabled ${t.length} ${p(t.length,`plugin`)}`}}async function ye(e,t){let{name:n,marketplace:r}=V(e),i=r?`${n}@${r}`:e,a=await x(e);if(!a)return{success:!1,message:`Plugin "${n}" not found`,pluginId:i,scope:t};let{entry:o,marketplaceInstallLocation:s}=a,c=S().plugins[i];if(!c||c.length===0)return{success:!1,message:`Plugin "${n}" is not installed`,pluginId:i,scope:t};let l=J(t),u=c.find(e=>e.scope===t&&e.projectPath===l);return u?be({pluginId:i,pluginName:n,entry:o,marketplaceInstallLocation:s,installation:u,scope:t,projectPath:l}):{success:!1,message:`Plugin "${n}" is not installed at scope ${l?`${t} (${l})`:t}`,pluginId:i,scope:t}}async function be({pluginId:e,pluginName:t,entry:n,marketplaceInstallLocation:r,installation:i,scope:a,projectPath:s}){let c=u(),l=i.version,d,f,p=!1,m;if(typeof n.source!=`string`){let t=await oe(n.source,{manifest:{name:n.name}});d=t.path,p=!0,m=t.gitCommitSha,f=await w(e,n.source,t.manifest,t.path,n.version,t.gitCommitSha)}else{let t;try{t=await c.stat(r)}catch(t){if(o(t))return{success:!1,message:`Marketplace directory not found at ${r}`,pluginId:e,scope:a};throw t}d=K(t.isDirectory()?r:le(r),n.source);try{await c.stat(d)}catch(t){if(o(t))return{success:!1,message:`Plugin source not found at ${d}`,pluginId:e,scope:a};throw t}let i,s=K(d,`.claude-plugin`,`plugin.json`);try{i=await I(s,n.name,n.source)}catch{}f=await w(e,n.source,i,d,n.version)}try{let r=A(e,f),o=D(e,f);if(i.version===f||i.installPath===r||i.installPath===o)return{success:!0,message:`${t} is already at the latest version (${f}).`,pluginId:e,newVersion:f,oldVersion:l,alreadyUpToDate:!0,scope:a};r=await ne(d,e,f,n);let c=i.installPath;if(g(e,a,s,r,f,m),c&&c!==r){let e=S();Object.values(e.plugins).some(e=>e.some(e=>e.installPath===c))||await E(c)}let u=s?`${a} (${s})`:a;return{success:!0,message:`Plugin "${t}" updated from ${l||`unknown`} to ${f} for scope ${u}. Restart to apply changes.`,pluginId:e,newVersion:f,oldVersion:l,scope:a}}finally{p&&d!==A(e,f)&&await c.rm(d,{recursive:!0,force:!0})}}var Q,$,xe=e((()=>{t(),H(),c(),l(),d(),k(),re(),ee(),se(),h(),z(),F(),P(),O(),C(),W(),ae(),a(),m(),Q=[`user`,`project`,`local`],$=[`user`,`project`,`local`,`managed`]}));export{_e as a,he as c,ge as d,ye as f,ve as i,ue as l,$ as n,Y as o,Z as r,xe as s,Q as t,de as u};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./pluginStartupCheck-B3QqfRt6.js";e();export{t as getPluginEditableScopes};
@@ -1,4 +0,0 @@
1
- import{n as e,t}from"./figures-gfT9mM8P.js";import{Or as n,cn as r}from"./state-sIHsFpDu.js";import{E as i,O as a,U as o,z as s}from"./debug-otxXY3j-.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{o as u,s as d}from"./log-DSV4Ht5l.js";import{l as f,o as p}from"./stringUtils-KZoO4GUd.js";import{$s as m,Is as h,Js as g,Ms as _,Rs as v,Vs as y,Xs as ee,Zs as te,ac as b,cj as x,dc as S,gc as C,hc as w,nT as T,pc as ne,qs as E,sj as D,tT as O,tc as k,vs as A,ys as j}from"./loadAgentsDir-DC4jN6-f.js";import{i as M,o as N,s as P}from"./xml-D7-jJqSA.js";import{n as F,t as I}from"./exit-DOBLl8jN.js";import{n as L,t as R}from"./pluginOperations-DDI1CG0K.js";import{a as z,i as B,n as V,o as H,r as U,t as W}from"./pluginCliCommands-CTxmCPph.js";import{a as re,c as G,i as K,n as q,r as J,s as Y,t as X}from"./validatePlugin-DUuaprqR.js";import{basename as ie,dirname as Z}from"path";e(),r(),c(),x(),o(),u(),C(),G(),_(),S(),E(),O(),K(),M(),A(),X(),i(),p();function Q(e,n){d(e),I(`${t.cross} Failed to ${n}: ${s(e)}`)}function $(e){e.errors.length>0&&(console.log(`${t.cross} Found ${e.errors.length} ${f(e.errors.length,`error`)}:\n`),e.errors.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``)),e.warnings.length>0&&(console.log(`${t.warning} Found ${e.warnings.length} ${f(e.warnings.length,`warning`)}:\n`),e.warnings.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``))}async function ae(e,r){r.cowork&&n(!0);try{let n=await q(e);console.log(`Validating ${n.fileType} manifest: ${n.filePath}\n`),$(n);let r=[];if(n.fileType===`plugin`){let e=Z(n.filePath);if(ie(e)===`.claude-plugin`){r=await J(Z(e));for(let e of r)console.log(`Validating ${e.fileType}: ${e.filePath}\n`),$(e)}}let i=n.success&&r.every(e=>e.success),a=n.warnings.length>0||r.some(e=>e.warnings.length>0);i?F(a?`${t.tick} Validation passed with warnings`:`${t.tick} Validation passed`):(console.log(`${t.cross} Validation failed`),process.exit(1))}catch(e){d(e),console.error(`${t.cross} Unexpected error during validation: ${s(e)}`),process.exit(2)}}async function oe(e){e.cowork&&n(!0),l(`tengu_plugin_list_command`,{});let r=v(),{getPluginEditableScopes:i}=await import(`./pluginStartupCheck-DYC8CWxw.js`),o=i(),s=Object.keys(r.plugins),{enabled:c,disabled:u,errors:d}=await j(),f=[...c,...u],p=f.filter(e=>e.source.endsWith(`@inline`)),m=d.filter(e=>e.source.endsWith(`@inline`)||e.source.startsWith(`inline[`));if(e.json){let t=new Map(f.map(e=>[e.source,e])),n=[];for(let e of s.sort()){let i=r.plugins[e];if(!i||i.length===0)continue;let a=N(e).name,s=d.filter(t=>t.source===e||`plugin`in t&&t.plugin===a).map(D);for(let r of i){let i=t.get(e),a;if(i){let e=i.mcpServers||await T(i);e&&Object.keys(e).length>0&&(a=e)}n.push({id:e,version:r.version||`unknown`,scope:r.scope,enabled:o.has(e),installPath:r.installPath,installedAt:r.installedAt,lastUpdated:r.lastUpdated,projectPath:r.projectPath,mcpServers:a,errors:s.length>0?s:void 0})}}for(let e of p){let t=e.mcpServers||await T(e),r=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name).map(D);n.push({id:e.source,version:e.manifest.version??`unknown`,scope:`session`,enabled:e.enabled!==!1,installPath:e.path,mcpServers:t&&Object.keys(t).length>0?t:void 0,errors:r.length>0?r:void 0})}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))n.push({id:e.source,version:`unknown`,scope:`session`,enabled:!1,installPath:`path`in e?e.path:``,errors:[D(e)]});if(e.available){let e=[];try{let[t,n]=await Promise.all([g(),Y()]),{marketplaces:r}=await ne(t);for(let{name:t,data:i}of r)if(i)for(let r of i.plugins){let i=b(r.name,t);h(i)||e.push({pluginId:i,name:r.name,description:r.description,marketplaceName:t,version:r.version,source:r.source,installCount:n?.get(i)})}}catch{}F(a({installed:n,available:e},null,2))}else F(a(n,null,2))}s.length===0&&p.length===0&&m.length===0&&F("No plugins installed. Use `claude plugin install` to install a plugin."),s.length>0&&console.log(`Installed plugins:
2
- `);for(let e of s.sort()){let n=r.plugins[e];if(!n||n.length===0)continue;let i=N(e).name,a=d.filter(t=>t.source===e||`plugin`in t&&t.plugin===i);for(let r of n){let n=o.has(e),i=a.length>0?`${t.cross} failed to load`:n?`${t.tick} enabled`:`${t.cross} disabled`,s=r.version||`unknown`,c=r.scope;console.log(` ${t.pointer} ${e}`),console.log(` Version: ${s}`),console.log(` Scope: ${c}`),console.log(` Status: ${i}`);for(let e of a)console.log(` Error: ${D(e)}`);console.log(``)}}if(p.length>0||m.length>0){console.log(`Session-only plugins (--plugin-dir):
3
- `);for(let e of p){let n=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name),r=n.length>0?`${t.cross} loaded with errors`:`${t.tick} loaded`;console.log(` ${t.pointer} ${e.source}`),console.log(` Version: ${e.manifest.version??`unknown`}`),console.log(` Path: ${e.path}`),console.log(` Status: ${r}`);for(let e of n)console.log(` Error: ${D(e)}`);console.log(``)}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))console.log(` ${t.pointer} ${e.source}: ${t.cross} ${D(e)}\n`)}F()}async function se(e,r){r.cowork&&n(!0);try{let n=await re(e);n||I(`${t.cross} Invalid marketplace source format. Try: owner/repo, https://..., or ./path`),`error`in n&&I(`${t.cross} ${n.error}`);let i=r.scope??`user`;i!==`user`&&i!==`project`&&i!==`local`&&I(`${t.cross} Invalid scope '${i}'. Use: user, project, or local`);let a=P(i),o=n;r.sparse&&r.sparse.length>0&&(o.source===`github`||o.source===`git`?o={...o,sparsePaths:r.sparse}:I(`${t.cross} --sparse is only supported for github and git marketplace sources (got: ${o.source})`)),console.log(`Adding marketplace...`);let{name:s,alreadyMaterialized:c,resolvedSource:u}=await y(o,e=>{console.log(e)});k(s,{source:u},a),w();let d=o.source;o.source===`github`&&(d=o.repo),l(`tengu_marketplace_added`,{source_type:d}),F(c?`${t.tick} Marketplace '${s}' already on disk — declared in ${i} settings`:`${t.tick} Successfully added marketplace: ${s} (declared in ${i} settings)`)}catch(e){Q(e,`add marketplace`)}}async function ce(e){e.cowork&&n(!0);try{let n=await g(),r=Object.keys(n);e.json&&F(a(r.sort().map(e=>{let t=n[e],r=t?.source;return{name:e,source:r?.source,...r?.source===`github`&&{repo:r.repo},...r?.source===`git`&&{url:r.url},...r?.source===`url`&&{url:r.url},...r?.source===`directory`&&{path:r.path},...r?.source===`file`&&{path:r.path},installLocation:t?.installLocation}}),null,2)),r.length===0&&F(`No marketplaces configured`),console.log(`Configured marketplaces:
4
- `),r.forEach(e=>{let r=n[e];if(console.log(` ${t.pointer} ${e}`),r?.source){let e=r.source;e.source===`github`?console.log(` Source: GitHub (${e.repo})`):e.source===`git`?console.log(` Source: Git (${e.url})`):e.source===`url`?console.log(` Source: URL (${e.url})`):e.source===`directory`?console.log(` Source: Directory (${e.path})`):e.source===`file`&&console.log(` Source: File (${e.path})`)}console.log(``)}),F()}catch(e){Q(e,`list marketplaces`)}}async function le(e,r){r.cowork&&n(!0);try{await m(e),w(),l(`tengu_marketplace_removed`,{marketplace_name:e}),F(`${t.tick} Successfully removed marketplace: ${e}`)}catch(e){Q(e,`remove marketplace`)}}async function ue(e,r){r.cowork&&n(!0);try{if(e)console.log(`Updating marketplace: ${e}...`),await te(e,e=>{console.log(e)}),w(),l(`tengu_marketplace_updated`,{marketplace_name:e}),F(`${t.tick} Successfully updated marketplace: ${e}`);else{let e=await g(),n=Object.keys(e);n.length===0&&F(`No marketplaces configured`),console.log(`Updating ${n.length} marketplace(s)...`),await ee(),w(),l(`tengu_marketplace_updated_all`,{count:n.length}),F(`${t.tick} Successfully updated ${n.length} marketplace(s)`)}}catch(e){Q(e,`update marketplace(s)`)}}async function de(e,t){t.cowork&&n(!0);let r=t.scope||`user`;t.cowork&&r!==`user`&&I(`--cowork can only be used with user scope`),R.includes(r)||I(`Invalid scope: ${r}. Must be one of: ${R.join(`, `)}.`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_install_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r}),await B(e,r)}async function fe(e,t){t.cowork&&n(!0);let r=t.scope||`user`;t.cowork&&r!==`user`&&I(`--cowork can only be used with user scope`),R.includes(r)||I(`Invalid scope: ${r}. Must be one of: ${R.join(`, `)}.`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_uninstall_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r}),await z(e,r,t.keepData)}async function pe(e,t){t.cowork&&n(!0);let r;t.scope&&(R.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${R.join(`, `)}`),r=t.scope),t.cowork&&r!==void 0&&r!==`user`&&I(`--cowork can only be used with user scope`),t.cowork&&r===void 0&&(r=`user`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_enable_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r??`auto`}),await U(e,r)}async function me(e,t){if(t.all&&e&&I(`Cannot use --all with a specific plugin`),!t.all&&!e&&I(`Please specify a plugin name or use --all to disable all plugins`),t.cowork&&n(!0),t.all){t.scope&&I(`Cannot use --scope with --all`),l(`tengu_plugin_disable_command`,{}),await W();return}let r;t.scope&&(R.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${R.join(`, `)}`),r=t.scope),t.cowork&&r!==void 0&&r!==`user`&&I(`--cowork can only be used with user scope`),t.cowork&&r===void 0&&(r=`user`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_disable_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r??`auto`}),await V(e,r)}async function he(e,t){t.cowork&&n(!0);let{name:r,marketplace:i}=N(e);l(`tengu_plugin_update_command`,{_PROTO_plugin_name:r,...i&&{_PROTO_marketplace_name:i}});let a=`user`;t.scope&&(L.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${L.join(`, `)}`),a=t.scope),t.cowork&&a!==`user`&&I(`--cowork can only be used with user scope`),await H(e,a)}export{se as marketplaceAddHandler,ce as marketplaceListHandler,le as marketplaceRemoveHandler,ue as marketplaceUpdateHandler,me as pluginDisableHandler,pe as pluginEnableHandler,de as pluginInstallHandler,oe as pluginListHandler,fe as pluginUninstallHandler,he as pluginUpdateHandler,ae as pluginValidateHandler};
@@ -1 +0,0 @@
1
- import{Ka as e,Qa as t,Wa as n}from"./loadAgentsDir-DC4jN6-f.js";n();export{e as isPolicyAllowed,t as waitForPolicyLimitsToLoad};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./poorMode-BdNsLBQ-.js";t();export{e as isPoorModeActive};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-DR8-3Aex.js";import{Rn as t,t as n,x as r}from"./src-Di342QoJ.js";import{t as i}from"./jsx-runtime-D-D469L8.js";import{Ka as a,oo as o}from"./paths-CEAy4QCs.js";import{F as s,U as c,z as l}from"./debug-otxXY3j-.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{$g as f,$m as p,$o as m,Eo as h,GC as g,Qg as _,Qm as v,So as y,To as b,Uo as x,WC as S,dh as C,uh as w,vu as T,yu as E}from"./loadAgentsDir-DC4jN6-f.js";import{Gt as D,Kt as O}from"./prompt-BHI7PZe4.js";import{r as k,t as A}from"./xml-D7-jJqSA.js";import{randomUUID as j}from"crypto";t(),n(),E(),f(),C();var M=i();function N({input:e,progress:t,verbose:n}){return(0,M.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,M.jsx)(_,{addMargin:!1,param:{text:`<bash-input>${e}</bash-input>`,type:`text`}}),t?(0,M.jsx)(w,{fullOutput:t.fullOutput,output:t.output,elapsedTimeSeconds:t.elapsedTimeSeconds,totalLines:t.totalLines,verbose:n}):T.renderToolUseProgressMessage?.([],{verbose:n,tools:[],terminalSize:void 0})]})}u(),c(),S(),x(),o();function P(){return a().defaultShell??`bash`}E(),D(),k();async function F(t,n,r,i,a){let o=O()&&P()===`powershell`;d(`tengu_input_bash`,{powershell:o});let c=h({content:m({inputString:`<bash-input>${t}</bash-input>`,precedingInputBlocks:n})}),u;a({jsx:(0,M.jsx)(N,{input:t,progress:null,verbose:i.options.verbose}),shouldHidePromptInput:!1});try{let n={...i,setToolJSX:e=>{u=e?.jsx}},s=e=>{a({jsx:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N,{input:t,progress:e.data,verbose:i.options.verbose}),u]}),shouldHidePromptInput:!1,showSpinner:!1})},l=null;o&&(l=(p(),e(v)).PowerShellTool);let d=l??T,f=(l?await l.call({command:t,dangerouslyDisableSandbox:!0},n,void 0,void 0,s):await T.call({command:t,dangerouslyDisableSandbox:!0},n,void 0,void 0,s)).data;if(!f)throw Error(`No result received from shell command`);let m=f.stderr,_=await g(d,{...f,stderr:``},j()),b=typeof _.content==`string`?_.content:A(f.stdout);return{messages:[y(),c,...r,h({content:`<bash-stdout>${b}</bash-stdout><bash-stderr>${A(m)}</bash-stderr>`})],shouldQuery:!1}}catch(e){return e instanceof s?e.interrupted?{messages:[y(),c,b({toolUse:!1}),...r],shouldQuery:!1}:{messages:[y(),c,...r,h({content:`<bash-stdout>${A(e.stdout)}</bash-stdout><bash-stderr>${A(e.stderr)}</bash-stderr>`})],shouldQuery:!1}:{messages:[y(),c,...r,h({content:`<bash-stderr>Command failed: ${A(l(e))}</bash-stderr>`})],shouldQuery:!1}}finally{a(null)}}export{F as processBashCommand};
@@ -1,6 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{Ct as r,cn as i,mr as a,t as o}from"./state-sIHsFpDu.js";import{$ as s,Bc as c,Dt as l,Ot as u,Uc as d,tt as f,vs as p,ys as m}from"./paths-CEAy4QCs.js";import{P as h,U as g,_,h as v,j as y,l as b,p as x}from"./debug-otxXY3j-.js";import{n as S,r as C}from"./analytics-DqMQntaB.js";import{O as w,et as T,k as E,o as D,s as O}from"./log-DSV4Ht5l.js";import{n as k,t as ee}from"./sleep-C6koP5Ka.js";import{$D as te,$_ as ne,$o as A,$w as re,A as ie,Ao as ae,BO as oe,CS as se,Co as ce,Dl as le,Eo as j,Fc as ue,Fk as de,G as fe,Il as M,Jo as pe,K as me,KO as he,Mc as N,Nc as P,O_ as F,Q_ as I,Qw as L,Rk as R,Rl as ge,So as z,TS as _e,To as ve,Ui as ye,Uo as be,Wo as xe,Xi as Se,Z_ as Ce,Zo as we,Zw as Te,_D as Ee,aA as De,bO as Oe,cp as ke,eO as Ae,gD as je,ha as B,hv as V,k_ as H,kl as Me,lj as Ne,lv as Pe,mv as Fe,nO as Ie,na as Le,pv as Re,qi as ze,rA as Be,rO as Ve,sp as He,ta as Ue,uj as We,uv as Ge,vo as U,vv as Ke,w as qe,wO as Je,xO as Ye,zO as Xe,zl as Ze}from"./loadAgentsDir-DC4jN6-f.js";import{a as W,i as Qe,o as G}from"./xml-D7-jJqSA.js";import{E as $e,T as et,w as tt}from"./sessionTracing-DNSDPYdR.js";import{n as nt,t as rt}from"./slashCommandParsing-BfanVchF.js";import{randomUUID as K}from"crypto";function it(e,t,n,r,i){let a=0;for(let o of p){let s=n[o];if(s)for(let n of s)for(let s of n.hooks){let c=s.once?()=>{x(`Removing one-shot hook for event ${o} in skill '${r}'`),ne(e,t,o,s)}:void 0;Ce(e,t,o,n.matcher||``,s,c,i),a++}}a>0&&x(`Registered ${a} hooks from skill '${r}'`)}var at=e((()=>{m(),b(),I()}));function ot(){return!1}function st(){if(!ot())throw Error(`ToolUseContext.options.allowBackgroundForkedSlashCommands is test-only and cannot be enabled outside NODE_ENV=test.`)}async function q(e,t,n,r,i,a,o){let s=Pe(),u=e.pluginInfo?G(e.pluginInfo.repository).marketplace:void 0;C(`tengu_slash_command_forked`,{command_name:e.name,invocation_trigger:`user-slash`,...e.pluginInfo&&{_PROTO_plugin_name:e.pluginInfo.pluginManifest.name,...u&&{_PROTO_marketplace_name:u},...V(e.pluginInfo)}});let{skillContent:d,modifiedGetAppState:f,baseAgent:p,promptMessages:m}=await Ze(e,t,n),h=e.effort===void 0?p:{...p,effort:e.effort};x(`Executing forked slash command /${e.name} with agent ${h.agentType}`);let g=await n.getAppState();n.options.allowBackgroundForkedSlashCommands===!0&&st();let _=!1;if(g.kairosEnabled&&(_=!0),_){let t=te(),r=B(e),i=l(),c=e=>oe({value:e,mode:`prompt`,priority:`later`,isMeta:!0,skipSlashCommands:!0,workload:i}),u=async()=>{if(!o?.runId)return;let e=await Oe({runId:o.runId,rootDir:o.rootDir,priority:`later`,workload:i});for(let t of e)Xe(t)},d=async e=>{o?.runId&&await Ye({runId:o.runId,rootDir:o.rootDir,error:e instanceof Error?e.message:String(e)})};return(async()=>{let i=Date.now()+$;for(;Date.now()<i&&n.getAppState().mcp.clients.some(e=>e.type===`pending`);)await k(Q);let o=n.options.refreshTools?.()??n.options.tools,l=[];for await(let r of H({agentDefinition:h,promptMessages:m,toolUseContext:{...n,getAppState:f,abortController:t},canUseTool:a,isAsync:!0,querySource:`agent:custom`,model:e.model,availableTools:o,override:{agentId:s}}))l.push(r);let d=M(l,`Command completed`);x(`Background forked command /${r} completed (agent ${s})`),c(`<scheduled-task-result command="/${r}">\n${d}\n</scheduled-task-result>`);try{await u()}catch(e){O(e)}})().catch(async e=>{O(e),c(`<scheduled-task-result command="/${r}" status="failed">\n${e instanceof Error?e.message:String(e)}\n</scheduled-task-result>`),await d(e)}),{messages:[],shouldQuery:!1,command:e,deferAutonomyCompletion:!!o?.runId}}let v=[],y=[],b=`forked-command-${e.name}`,S=0,w=e=>(S++,{type:`progress`,data:{message:e,type:`agent_progress`,prompt:d,agentId:s},parentToolUseID:b,toolUseID:`${b}-${S}`,timestamp:new Date().toISOString(),uuid:K()}),T=()=>{i({jsx:ke(y,{tools:n.options.tools,verbose:!1}),shouldHidePromptInput:!1,shouldContinueAnimation:!0,showSpinner:!0})};T();try{for await(let t of H({agentDefinition:h,promptMessages:m,toolUseContext:{...n,getAppState:f},canUseTool:a,isAsync:!1,querySource:`agent:custom`,model:e.model,availableTools:n.options.tools})){v.push(t);let e=we([t]);if(t.type===`assistant`){let r=de(t);r>0&&n.setResponseLength(e=>e+r);let i=e[0];i&&i.type===`assistant`&&(y.push(w(t)),T())}if(t.type===`user`){let t=e[0];t&&t.type===`user`&&(y.push(w(t)),T())}}}finally{i(null)}let E=M(v,`Command completed`);return x(`Forked slash command /${e.name} completed with agent ${s}`),process.env.USER_TYPE===`ant`&&(E=`[ANT-ONLY] API calls: ${c(Ie(s))}\n${E}`),{messages:[j({content:A({inputString:`/${B(e)} ${t}`.trim(),precedingInputBlocks:r})}),j({content:`<local-command-stdout>\n${E}\n</local-command-stdout>`})],shouldQuery:!1,command:e,resultText:E}}function ct(e){return!/[^a-zA-Z0-9:\-_]/.test(e)}async function lt(e,t,n,r,i,o,s,c,l,u){let d=nt(e);if(!d){C(`tengu_input_slash_missing`,{});let e="Commands are in the form `/command [args]`";return{messages:[z(),...r,j({content:A({inputString:e,precedingInputBlocks:t})})],shouldQuery:!1,resultText:e}}let{commandName:f,args:p,isMcp:m}=d,h=m?`mcp`:ye().has(f)?f:`custom`;if(!Ue(f,i.options.commands)){let n=!1;try{await v().stat(`/${f}`),n=!0}catch{}if(ct(f)&&!n){C(`tengu_input_slash_invalid`,{input:f});let e=`Unknown skill: ${f}`;return{messages:[z(),...r,j({content:A({inputString:e,precedingInputBlocks:t})}),...p?[ce(`Args from unknown skill: ${p}`,`warning`)]:[]],shouldQuery:!1,resultText:e}}let i=K();return a(i),C(`tengu_input_prompt`,{}),et(`user_prompt`,{prompt_length:String(e.length),prompt:$e(e),"prompt.id":i}),{messages:[j({content:A({inputString:e,precedingInputBlocks:t}),uuid:s}),...r],shouldQuery:!0}}let{messages:g,shouldQuery:_,allowedTools:y,model:b,effort:x,command:S,resultText:w,nextInput:T,submitNextInput:E,deferAutonomyCompletion:D}=await ut(f,p,o,i,t,n,c,l,s,u);if(g.length===0){let e={input:h};if(S.type===`prompt`&&S.pluginInfo){let{pluginManifest:t,repository:n}=S.pluginInfo,{marketplace:r}=G(n),i=W(r);e._PROTO_plugin_name=t.name,r&&(e._PROTO_marketplace_name=r),e.plugin_repository=i?n:`third-party`,e.plugin_name=i?t.name:`third-party`,i&&t.version&&(e.plugin_version=t.version),Object.assign(e,V(S.pluginInfo))}return C(`tengu_input_command`,{...e,invocation_trigger:`user-slash`,...process.env.USER_TYPE===`ant`&&{skill_name:f,...S.type===`prompt`&&{skill_source:S.source},...S.loadedFrom&&{skill_loaded_from:S.loadedFrom},...S.kind&&{skill_kind:S.kind}}}),{messages:[],shouldQuery:!1,model:b,nextInput:T,submitNextInput:E,deferAutonomyCompletion:D}}if(g.length===2&&g[1].type===`user`&&typeof g[1].message.content==`string`&&g[1].message.content.startsWith(`Unknown command:`))return e.startsWith(`/var`)||e.startsWith(`/tmp`)||e.startsWith(`/private`)||C(`tengu_input_slash_invalid`,{input:f}),{messages:[z(),...g],shouldQuery:_,allowedTools:y,model:b};let O={input:h};if(S.type===`prompt`&&S.pluginInfo){let{pluginManifest:e,repository:t}=S.pluginInfo,{marketplace:n}=G(t),r=W(n);O._PROTO_plugin_name=e.name,n&&(O._PROTO_marketplace_name=n),O.plugin_repository=r?t:`third-party`,O.plugin_name=r?e.name:`third-party`,r&&e.version&&(O.plugin_version=e.version),Object.assign(O,V(S.pluginInfo))}C(`tengu_input_command`,{...O,invocation_trigger:`user-slash`,...process.env.USER_TYPE===`ant`&&{skill_name:f,...S.type===`prompt`&&{skill_source:S.source},...S.loadedFrom&&{skill_loaded_from:S.loadedFrom},...S.kind&&{skill_kind:S.kind}}});let k=g.length>0&&g[0]&&xe(g[0]);return{messages:_||g.every(pe)||k?g:[z(),...g],shouldQuery:_,allowedTools:y,model:b,effort:x,resultText:w,nextInput:T,submitNextInput:E,deferAutonomyCompletion:D}}async function ut(e,t,n,r,i,a,o,s,c,l){let u=Se(e,r.options.commands);if(u.type===`prompt`&&u.userInvocable!==!1&&Fe(e),u.userInvocable===!1)return{messages:[j({content:A({inputString:`/${e}`,precedingInputBlocks:i})}),j({content:`This skill can only be invoked by Claude, not directly by users. Ask Claude to use the "${e}" skill for you.`})],shouldQuery:!1,command:u};try{switch(u.type){case`local-jsx`:return new Promise(e=>{let a=!1,o=(n,r)=>{if(a=!0,r?.display===`skip`){e({messages:[],shouldQuery:!1,command:u,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput});return}let o=(r?.metaMessages??[]).map(e=>j({content:e,isMeta:!0})),s=_e()&&typeof n==`string`&&n.endsWith(` dismissed`),c=r?.displayArgs??t;e({messages:r?.display===`system`?s?o:[U(J(u,c)),U(`<local-command-stdout>${n}</local-command-stdout>`),...o]:[j({content:A({inputString:J(u,c),precedingInputBlocks:i})}),j(n?{content:`<local-command-stdout>${n}</local-command-stdout>`}:{content:`<local-command-stdout>${Ne}</local-command-stdout>`}),...o],shouldQuery:r?.shouldQuery??!1,command:u,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput})};u.load().then(e=>e.call(o,{...r,canUseTool:s},t)).then(t=>{if(t!=null){if(r.options.isNonInteractiveSession){e({messages:[],shouldQuery:!1,command:u});return}a||n({jsx:t,shouldHidePromptInput:!0,showSpinner:!1,isLocalJSXCommand:!0,isImmediate:u.immediate===!0})}}).catch(t=>{O(t),!a&&(a=!0,n({jsx:null,shouldHidePromptInput:!1,clearLocalJSX:!0}),e({messages:[],shouldQuery:!1,command:u}))})});case`local`:{let e=j({content:A({inputString:J(u,u.isSensitive&&t.trim()?`***`:t),precedingInputBlocks:i})});try{let n=z(),i=await(await u.load()).call(t,r);if(i.type===`skip`)return{messages:[],shouldQuery:!1,command:u};if(i.type===`compact`){let t=[n,e,...i.displayText?[j({content:`<local-command-stdout>${i.displayText}</local-command-stdout>`,timestamp:new Date(Date.now()+100).toISOString()})]:[]],r={...i.compactionResult,messagesToKeep:[...i.compactionResult.messagesToKeep??[],...t]};return De(),{messages:le(r),shouldQuery:!1,command:u}}return{messages:[e,U(`<local-command-stdout>${i.value}</local-command-stdout>`)],shouldQuery:!1,command:u,resultText:i.value}}catch(t){return O(t),{messages:[e,U(`<local-command-stderr>${String(t)}</local-command-stderr>`)],shouldQuery:!1,command:u}}}case`prompt`:try{return u.context===`fork`?await q(u,t,r,i,n,s??fe,l):await Z(u,t,r,i,a,c)}catch(e){return e instanceof y?{messages:[j({content:A({inputString:J(u,t),precedingInputBlocks:i})}),ve({toolUse:!1})],shouldQuery:!1,command:u}:{messages:[j({content:A({inputString:J(u,t),precedingInputBlocks:i})}),j({content:`<local-command-stderr>${String(e)}</local-command-stderr>`})],shouldQuery:!1,command:u}}}}catch(e){if(e instanceof h)return{messages:[j({content:A({inputString:e.message,precedingInputBlocks:i})})],shouldQuery:!1,command:u};throw e}}function J(e,t){return ae(B(e),t)}function Y(e,t=`loading`){return[`<${w}>${e}</${w}>`,`<${E}>${e}</${E}>`,`<skill-format>true</skill-format>`].join(`
2
- `)}function dt(e,t){return[`<${w}>${e}</${w}>`,`<${E}>/${e}</${E}>`,t?`<command-args>${t}</command-args>`:null].filter(Boolean).join(`
3
- `)}function X(e,t){return e.userInvocable===!1&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)?Y(e.name,e.progressMessage):dt(e.name,t)}async function ft(e,t,n,r,i=[]){let a=ze(e,n);if(!a)throw new h(`Unknown command: ${e}`);if(a.type!==`prompt`)throw Error(`Unexpected ${a.type} command. Expected 'prompt' command. Use /${e} directly in the main conversation.`);return Z(a,t,r,[],i)}async function Z(e,t,i,a=[],c=[],l){if(n(process.env.CLAUDE_CODE_COORDINATOR_MODE)&&!i.agentId){let n=X(e,t),r=[`Skill "/${e.name}" is available for workers.`];e.description&&r.push(`Description: ${e.description}`),e.whenToUse&&r.push(`When to use: ${e.whenToUse}`);let i=e.allowedTools??[];i.length>0&&r.push(`This skill grants workers additional tool permissions: ${i.join(`, `)}`),r.push(`\nInstruct a worker to use this skill by including "Use the /${e.name} skill" in your Agent prompt. The worker has access to the Skill tool and will receive the skill's content and permissions when it invokes it.`);let a=[{type:`text`,text:r.join(`
4
- `)}];return{messages:[j({content:n,uuid:l}),j({content:a,isMeta:!0})],shouldQuery:!0,model:e.model,effort:e.effort,command:e}}let u=await e.getPromptForCommand(t,i),d=!L(`hooks`)||re(e.source);if(e.hooks&&d){let t=r();it(i.setAppState,t,e.hooks,e.name,e.type===`prompt`?e.skillRoot:void 0)}let f=e.source?`${e.source}:${e.name}`:e.name,p=u.filter(e=>e.type===`text`).map(e=>e.text).join(`
5
-
6
- `);o(e.name,f,p,s()?.agentId??null);let m=X(e,t),h=ie(e.allowedTools??[]),g=c.length>0||a.length>0?[...c,...a,...u]:u,_=await Ee(P(u.filter(e=>e.type===`text`).map(e=>e.text).join(` `),i,null,[],i.messages,`repl_main_thread`,{skipSkillDiscovery:!0}));return{messages:[j({content:m,uuid:l}),j({content:g,isMeta:!0}),..._,N({type:`command_permissions`,allowedTools:h,model:e.model})],shouldQuery:!0,allowedTools:h,model:e.model,effort:e.effort,command:e}}var Q,$;e((()=>{i(),Le(),We(),T(),S(),Ve(),Me(),Be(),F(),He(),Ae(),f(),ue(),b(),t(),g(),d(),ge(),_(),se(),je(),at(),D(),he(),be(),qe(),me(),Qe(),Te(),rt(),ee(),Re(),tt(),Ke(),R(),Ge(),Je(),u(),Q=200,$=1e4}))();export{Y as formatSkillLoadingMetadata,ft as processPromptSlashCommand,lt as processSlashCommand};
@@ -1 +0,0 @@
1
- import{TA as e,yA as t}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as clearPromptCache};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./prompt-BHI7PZe4.js";t();export{e as isDeferredTool};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,f as r,t as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$t as o,Da as s,S as c,Zt as l,_ as u,ka as d,on as f,tn as p}from"./paths-CEAy4QCs.js";import{n as m,r as h}from"./analytics-DqMQntaB.js";import{_a as g,aS as _,c_ as v,l_ as y,oS as b,s_ as x,u_ as S,va as C}from"./loadAgentsDir-DC4jN6-f.js";import{n as w,t as T}from"./extra-usage-BQ5Z1wJb.js";import{n as E,t as D}from"./upgrade-ClLcX7zy.js";function O({onDone:e,context:t}){let[n,i]=(0,A.useState)(null),a=v(),c=p(),d=o(),f=l()?.hasExtraUsageEnabled===!0,m=c===`max`&&d===`default_claude_max_20x`,g=c===`team`||c===`enterprise`,b=u(`tengu_jade_anvil_4`,!1),x=(0,A.useMemo)(()=>{let e=[];if(y.isEnabled()){let t=s(),n=g&&!t,r=a.overageDisabledReason===`out_of_credits`||a.overageDisabledReason===`org_level_disabled_until`||a.overageDisabledReason===`org_service_zero_credit_limit`;if(!(n&&r)){let t=a.overageStatus===`rejected`||a.overageStatus===`allowed_warning`,r;r=n?t?`Request more`:`Request extra usage`:f?`Add funds to continue with extra usage`:`Switch to extra usage`,e.push({label:r,value:`extra-usage`})}}!m&&!g&&C.isEnabled()&&e.push({label:`Upgrade your plan`,value:`upgrade`});let t={label:`Stop and wait for limit to reset`,value:`cancel`};return b?[...e,t]:[t,...e]},[b,m,g,f,a.overageStatus,a.overageDisabledReason]);function S(){h(`tengu_rate_limit_options_menu_cancel`,{}),e(void 0,{display:`skip`})}function w(n){n===`upgrade`?(h(`tengu_rate_limit_options_menu_select_upgrade`,{}),D(e,t).then(e=>{e&&i(e)})):n===`extra-usage`?(h(`tengu_rate_limit_options_menu_select_extra_usage`,{}),T(e,t).then(e=>{e&&i(e)})):n===`cancel`&&S()}return n||(0,j.jsx)(r,{title:`What do you want to do?`,onCancel:S,color:`suggestion`,children:(0,j.jsx)(_,{options:x,onChange:w,visibleOptionCount:x.length})})}async function k(e,t){return(0,j.jsx)(O,{onDone:e,context:t})}var A,j;e((()=>{A=t(n(),1),b(),i(),c(),m(),x(),f(),d(),w(),S(),g(),E(),j=a()}))();export{k as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{U as r,l as i,p as a,z as o}from"./debug-otxXY3j-.js";import{o as s,s as c}from"./log-DSV4Ht5l.js";import{Bh as l,Gh as u,Hh as d,Oc as f,Wh as p,Yp as m,ay as h,gc as g,hc as _,i as v,iy as y,kc as b,nT as x,o as S,qp as C,tT as w,vs as T,ys as E}from"./loadAgentsDir-DC4jN6-f.js";async function D(e){a(`refreshActivePlugins: clearing all plugin caches`),_(),C();let t=await E(),[r,i]=await Promise.all([f(),v(n())]),{enabled:s,disabled:l,errors:p}=t,[m,g]=await Promise.all([Promise.all(s.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await x(e,p);return t&&(e.mcpServers=t),t?Object.keys(t).length:0})),Promise.all(s.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await u(e,p);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))]),y=m.reduce((e,t)=>e+t,0),b=g.reduce((e,t)=>e+t,0);e(e=>({...e,plugins:{...e.plugins,enabled:s,disabled:l,commands:r,errors:O(e.plugins.errors,p),needsRefresh:!1},agentDefinitions:i,mcp:{...e.mcp,pluginReconnectKey:e.mcp.pluginReconnectKey+1}})),d();let S=!1;try{await h()}catch(e){S=!0,c(e),a(`refreshActivePlugins: loadPluginHooks failed: ${o(e)}`)}let w=s.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return a(`refreshActivePlugins: ${s.length} enabled, ${r.length} commands, ${i.allAgents.length} agents, ${w} hooks, ${y} MCP, ${b} LSP`),{enabled_count:s.length,disabled_count:l.length,command_count:r.length,agent_count:i.allAgents.length,hook_count:w,mcp_count:y,lsp_count:b,error_count:p.length+ +!!S,agentDefinitions:i,pluginCommands:r}}function O(e,t){let n=e.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(t.map(k));return[...n.filter(e=>!r.has(k(e))),...t]}function k(e){return e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`}var A=e((()=>{t(),l(),S(),i(),r(),s(),g(),b(),y(),p(),w(),m(),T()}));export{D as n,A as t};
@@ -1 +0,0 @@
1
- import{Ad as e,Dd as t,Ed as n,Fd as r,Id as i,Ld as a,Md as o,Nd as s,Od as c,Pd as l,Rd as u,Td as d,jd as f,kd as p,zd as m}from"./loadAgentsDir-DC4jN6-f.js";s();export{d as detectAndGetBackend,n as ensureBackendsRegistered,t as getBackendByType,c as getCachedBackend,p as getCachedDetectionResult,e as getInProcessBackend,f as getResolvedTeammateMode,o as getTeammateExecutor,l as isInProcessEnabled,r as markInProcessFallback,i as registerITermBackend,a as registerTmuxBackend,u as registerWindowsTerminalBackend,m as resetBackendDetection};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-CbskW5G9.js";import{Ar as a,Fr as o,Po as s,Si as c,Uo as l,yi as u}from"./loadAgentsDir-DC4jN6-f.js";import{a as d,i as f,r as p}from"./bridgeConfig-Di9LziJ3.js";import{n as m,t as h}from"./generateSessionName-CXg1uVLN.js";async function g(e,n,i){if(r())return e(`Cannot rename: This session is a swarm teammate. Teammate names are set by the team leader.`,{display:`system`}),null;let o;if(!i||i.trim()===``){let t=await h(s(n.messages),n.abortController.signal);if(!t)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;o=t}else o=i.trim();let l=t(),d=a();await c(l,o,d);let m=n.getAppState().replBridgeSessionId;if(m){let e=f();import(`./createSession-CIM50iEU.js`).then(({updateBridgeSessionTitle:t})=>t(m,o,{baseUrl:p(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await u(l,o,d),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:o}})),e(`Session renamed to: ${o}`,{display:`system`}),null}e((()=>{n(),d(),l(),o(),i(),m()}))();export{g as call};
@@ -1 +0,0 @@
1
- import{FA as e,MA as t}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as SandboxManager};
@@ -1 +0,0 @@
1
- import{rl as e,tl as t}from"./loadAgentsDir-DC4jN6-f.js";t();export{e as isSearchExtraToolsEnabled};
@@ -1 +0,0 @@
1
- import{Su as e,bu as t}from"./loadAgentsDir-DC4jN6-f.js";t();export{e as registerSessionFileAccessHooks};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./sessionMemory-Bq3ECr1S.js";t();export{e as manuallyExtractSessionMemory};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{W as r,cn as i}from"./state-sIHsFpDu.js";import{S as a,_ as o,g as s,nc as c,rc as l}from"./paths-CEAy4QCs.js";import{B as u,U as d,_ as ee,h as te,z as ne}from"./debug-otxXY3j-.js";import{n as re,r as f}from"./analytics-DqMQntaB.js";import{b as p,x as ie}from"./teammate-CbskW5G9.js";import{Ak as m,Bk as h,Bl as g,Bn as ae,Ck as oe,Dk as _,Ek as v,Eo as y,Fl as b,Hk as se,Hn as ce,Kc as le,Lk as ue,Mk as de,Ok as x,Pl as fe,Rk as S,Rl as C,Sk as w,Tk as T,Uk as E,Uo as D,Vn as O,Vo as k,Wk as A,aO as j,bk as M,bl as N,ck as P,dt as F,ft as I,iO as L,jk as R,kk as z,ml as B,pl as pe,qc as me,vk as V,vl as H,wk as he,yl as ge}from"./loadAgentsDir-DC4jN6-f.js";import{Hn as _e,zn as U}from"./prompt-BHI7PZe4.js";import{X as ve}from"./rcDebugLog-C0Bam8V9.js";import{writeFile as W}from"fs/promises";function ye(){return o(`tengu_session_memory`,!1)}function G(){return s(`tengu_sm_config`,{})}function be(e,t){let n=0,r=t==null;for(let i of e){if(!r){i.uuid===t&&(r=!0);continue}if(i.type===`assistant`){let e=i.message.content;Array.isArray(e)&&(n+=p(e,e=>e.type===`tool_use`))}}return n}function K(e){let t=h(e);if(!v()){if(!oe(t))return!1;z()}let n=he(t),r=be(e,X)>=w(),i=k(e);if(n&&r||n&&!i){let t=e[e.length-1];return t?.uuid&&(X=t.uuid),!0}return!1}async function q(e){let t=te(),n=ae();await t.mkdir(n,{mode:448});let r=O();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await N(),{encoding:`utf-8`,mode:384})}catch(e){if(u(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await le.call({file_path:r},e),a=``,o=i.data;return o.type===`text`&&(a=o.file.content),f(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function xe(){if(r())return;let e=B();process.env.USER_TYPE===`ant`&&f(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&j($)}async function Se(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};x();try{let n=b(t),{memoryPath:r,currentMemory:i}=await q(n),a=await H(i,r),{tools:o,mainLoopModel:s}=t.options,[c,l,u]=await Promise.all([F(o,s),E(),se()]),d=ve(c);return await g({promptMessages:[y({content:a})],cacheSafeParams:{systemPrompt:d,userContext:l,systemContext:u,toolUseContext:n,forkContextMessages:e},canUseTool:J(r),querySource:`session_memory`,forkLabel:`session_memory_manual`,overrides:{readFileState:n.readFileState}}),f(`tengu_session_memory_manual_extraction`,{}),m(h(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:ne(e)}}finally{_()}}function J(e){return 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)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${U} on ${e} is allowed`,decisionReason:{type:`other`,reason:`only ${U} on ${e} is allowed`}}}}function Y(e){if(!k(e)){let t=e[e.length-1];t?.uuid&&R(t.uuid)}}var X,Z,Q,$,Ce=e((()=>{n(),i(),I(),A(),_e(),me(),ie(),C(),ee(),L(),D(),ce(),c(),P(),S(),re(),pe(),ge(),T(),d(),a(),Z=t(()=>{let e=G();de({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:V.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:V.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:V.toolCallsBetweenUpdates})}),Q=!1,$=l(async function(e){let{messages:t,toolUseContext:n,querySource:r}=e;if(r!==`repl_main_thread`)return;{let{isPoorModeActive:e}=await import(`./poorMode-D2-4vRxb.js`);if(e())return}if(!ye()){process.env.USER_TYPE===`ant`&&!Q&&(Q=!0,f(`tengu_session_memory_gate_disabled`,{}));return}if(Z(),!K(t))return;x();let i=b(n),{memoryPath:a,currentMemory:o}=await q(i);await g({promptMessages:[y({content:await H(o,a)})],cacheSafeParams:fe(e),canUseTool:J(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],c=s?ue(s):void 0,l=M();f(`tengu_session_memory_extraction`,{input_tokens:c?.input_tokens,output_tokens:c?.output_tokens,cache_read_input_tokens:c?.cache_read_input_tokens??void 0,cache_creation_input_tokens:c?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:l.minimumMessageTokensToInit,config_min_tokens_between_update:l.minimumTokensBetweenUpdate,config_tool_calls_between_updates:l.toolCallsBetweenUpdates}),m(h(t)),Y(t),_()})}));export{K as a,Se as i,xe as n,Ce as r,J as t};
@@ -1 +0,0 @@
1
- import{Tk as e,xk as t}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as getSessionMemoryContent};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./sessionObserver-rd6RRTzc.js";e();export{t as heuristicObserverBackend};
@@ -1 +0,0 @@
1
- import{Fr as e,Hr as t,di as n}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as linkSessionToPR,n as recordTranscript};
@@ -1,3 +0,0 @@
1
- import{c as e,s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{In as r,Ln as i}from"./src-Di342QoJ.js";import{Ct as ee,U as a,cn as o,dr as s,jr as c,lr as l,ut as te}from"./state-sIHsFpDu.js";import{Cc as u,Cn as ne,at as d,dc as f,it as p,lc as re,on as m,rt as h,st as g,yc as _}from"./paths-CEAy4QCs.js";import{U as v,z as y}from"./debug-otxXY3j-.js";import{n as b,r as x}from"./analytics-DqMQntaB.js";import{n as S,t as C}from"./cwd--iizewsn.js";import{F as w,P as T,f as ie,n as E,r as D,v as O}from"./git-C0IuvuIy.js";import{a as k,n as A}from"./env-C2A9gV_G.js";import{o as j,s as M}from"./log-DSV4Ht5l.js";import{i as N,n as P}from"./startupProfiler-CBcN1Chw.js";import{Cn as F,Di as I,Fr as L,It as R,KE as z,Ot as B,Qk as V,Sn as H,St as U,Zi as W,_C as G,cy as K,gC as q,gx as J,gy as Y,hC as ae,ly as oe,mh as X,na as se,ph as ce,qE as le,qk as ue,ux as de,vy as fe,wt as Z,xt as pe}from"./loadAgentsDir-DC4jN6-f.js";import{l as me,u as he}from"./terminalSetup-DULcnnWe.js";import{c as ge,n as _e}from"./releaseNotes-CS5L5W0H.js";import{s as ve,u as ye}from"./logoV2Utils-CpeUvaOM.js";import{i as be,r as xe}from"./runtimeObserver-ByTBtmBf.js";import{n as Q,r as Se}from"./sessionMemory-Bq3ECr1S.js";import{t as Ce}from"./sinks-_9T2oPB_.js";import{homedir as we}from"os";import{join as Te}from"path";import{copyFile as Ee,stat as De}from"fs/promises";t(),i(),o(),b(),S(),v(),T(),k(),O(),m(),g(),h(),V(),le(),q(),he(),K(),ce(),se(),L(),F(),ge(),be(),Se(),_(),j();function $(){u(e=>({...e,iterm2SetupInProgress:!1}))}function Oe(){let e=f();return{inProgress:e.iterm2SetupInProgress??!1,backupPath:e.iterm2BackupPath||null}}function ke(){return Te(we(),`Library`,`Preferences`,`com.googlecode.iterm2.plist`)}async function Ae(){let{inProgress:e,backupPath:t}=Oe();if(!e)return{status:`no_backup`};if(!t)return $(),{status:`no_backup`};try{await De(t)}catch{return $(),{status:`no_backup`}}try{return await Ee(t,ke()),$(),{status:`restored`}}catch(e){return M(Error(`Failed to restore iTerm2 settings with: ${e}`)),$(),{status:`failed`,backupPath:t}}}_(),j(),ye(),de(),fe(),P(),B();async function je(t,i,o,u,m,h,g,_,v){w(`info`,`setup_started`);let b=process.version.match(/^v(\d+)\./)?.[1];if((!b||parseInt(b,10)<18)&&(console.error(r.bold.red(`Error: Claude Code requires Node.js version 18 or higher.`)),process.exit(1)),g&&c(z(g)),e(),!e()&&p()){let{captureTeammateModeSnapshot:e}=await import(`./teammateModeSnapshot-KWxn1jxl.js`);e()}if(!a()){if(p()){let e=await Ae();e.status===`restored`?console.log(r.yellow(`Detected an interrupted iTerm2 setup. Your original settings have been restored. You may need to restart iTerm2 for the changes to take effect.`)):e.status===`failed`&&console.error(r.red(`Failed to restore iTerm2 settings. Please manually restore your original settings with: defaults import com.googlecode.iterm2 ${e.backupPath}.`))}try{let e=await me();e.status===`restored`?console.log(r.yellow(`Detected an interrupted Terminal.app setup. Your original settings have been restored. You may need to restart Terminal.app for the changes to take effect.`)):e.status===`failed`&&console.error(r.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${e.backupPath}.`))}catch(e){M(e)}}X(t);let S=Date.now();if(ae(),w(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-S}),oe(t),u){let e=H(),n=await ie();!e&&!n&&(process.stderr.write(r.red(`Error: Can only use --worktree in a git repository, but ${r.bold(t)} is not a git repository. Configure a WorktreeCreate hook in settings.json to use --worktree with other VCS systems.\n`)),process.exit(1));let i=_?`pr-${_}`:m??Y(),a;if(n){let e=E(C());e||(process.stderr.write(r.red(`Error: Could not determine the main git repository root.
2
- `)),process.exit(1)),e!==(D(C())??C())&&(w(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),X(e)),a=h?Z(e,R(i)):void 0}else a=h?Z(C(),R(i)):void 0;let o;try{o=await U(ee(),i,a,_?{prNumber:_}:void 0)}catch(e){process.stderr.write(r.red(`Error creating worktree: ${y(e)}\n`)),process.exit(1)}if(x(`tengu_worktree_created`,{tmux_enabled:h}),h&&a){let e=await pe(a,o.worktreePath);e.created?console.log(r.green(`Created tmux session: ${r.bold(a)}\nTo attach: ${r.bold(`tmux attach -t ${a}`)}`)):console.error(r.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(o.worktreePath),X(o.worktreePath),l(C()),s(C()),I(o),ue(),G()}w(`info`,`setup_background_jobs_starting`),e()||(Q(),xe()),J(),w(`info`,`setup_background_jobs_launched`),N(`setup_before_prefetch`),w(`info`,`setup_prefetch_starting`);let T=a()&&n(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||e();if(T||W(te()),import(`./loadPluginHooks-DukITDP2.js`).then(e=>{T||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),e()||(process.env.USER_TYPE===`ant`&&import(`./commitAttribution-DKvggTZx.js`).then(async e=>{if(await e.isInternalModelRepo()){let{clearSystemPromptSections:e}=await import(`./systemPromptSections-CVpefuSD.js`);e()}}),setImmediate(()=>{import(`./attributionHooks-COqmxGy1.js`).then(({registerAttributionHooks:e})=>{e()})}),import(`./sessionFileAccessHooks-C-Ic-0Ry.js`).then(e=>e.registerSessionFileAccessHooks())),Ce(),x(`tengu_started`,{}),ne(a()),N(`setup_after_prefetch`),!e()){let{hasReleaseNotes:e}=await _e(f().lastReleaseNotesSeen);e&&await ve()}if(i===`bypassPermissions`||o){if(process.platform!==`win32`&&typeof process.getuid==`function`&&process.getuid()===0&&process.env.IS_SANDBOX!==`1`&&!n(process.env.CLAUDE_CODE_BUBBLEWRAP))if(process.stdin.isTTY){console.error(r.bold.red(`WARNING: Running as root/sudo with bypass permissions mode is dangerous.`)),console.error(r.yellow(`Bypass mode skips ALL permission checks. Combined with root, any command (rm -rf /, chmod, dd) executes without review.`));let e=(await import(`readline`)).createInterface({input:process.stdin,output:process.stdout}),t=await new Promise(t=>{e.question(`
3
- I understand the risks. Continue? [y/N] `,t)});e.close(),t.trim().toLowerCase()!==`y`&&(console.error(`Aborted.`),process.exit(1))}else console.error(`--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`),process.exit(1);if(process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`claude-desktop`){let[e,t]=await Promise.all([d.getIsDocker(),A.hasInternetAccess()]),n=d.getIsBubblewrapSandbox(),r=process.env.IS_SANDBOX===`1`;(!(e||n||r)||t)&&(console.error(`--dangerously-skip-permissions can only be used in Docker/sandbox containers with no internet access but got Docker: ${e}, Bubblewrap: ${n}, IS_SANDBOX: ${r}, hasInternet: ${t}`),process.exit(1))}}let O=re();O.lastCost!==void 0&&O.lastDuration!==void 0&&x(`tengu_exit`,{last_session_cost:O.lastCost,last_session_api_duration:O.lastAPIDuration,last_session_tool_duration:O.lastToolDuration,last_session_duration:O.lastDuration,last_session_lines_added:O.lastLinesAdded,last_session_lines_removed:O.lastLinesRemoved,last_session_total_input_tokens:O.lastTotalInputTokens,last_session_total_output_tokens:O.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:O.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:O.lastTotalCacheReadInputTokens,last_session_fps_average:O.lastFpsAverage,last_session_fps_low_1_pct:O.lastFpsLow1Pct,last_session_id:O.lastSessionId,...O.lastSessionMetrics})}export{je as setup};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./sink-DCh0VJ4g.js";t();export{e as initializeAnalyticsSink};
@@ -1 +0,0 @@
1
- import{t as e}from"./sinks-_9T2oPB_.js";export{e as initSinks};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-DR8-3Aex.js";import{i as t,r as n}from"./chokidar-SzksMqYp.js";import{Ct as r,Fr as i,Pr as a,cn as o,et as s,g as c,jr as ee,lr as l,nr as u,tr as te}from"./state-sIHsFpDu.js";import{Br as ne,Pr as re}from"./paths-CEAy4QCs.js";import{Q as ie,Z as ae,_ as oe,h as se,l as d,p as f}from"./debug-otxXY3j-.js";import{n as p,r as ce}from"./analytics-DqMQntaB.js";import{n as le,t as m}from"./cwd--iizewsn.js";import{$n as h,Am as g,Cn as _,Co as ue,Di as v,FE as de,Fc as fe,Fr as pe,Gi as me,Ic as he,Jm as y,KE as ge,Km as _e,Ot as ve,PE as ye,Pt as b,Qk as x,Rt as S,Tt as C,Uo as w,Wi as T,Xm as E,Ym as D,_i as O,_y as k,ai as A,bn as j,gi as M,i as N,id as P,jy as be,km as xe,ky as Se,mh as F,na as Ce,o as we,ph as Te,qE as Ee,qk as I,r as De,rd as Oe,vy as ke,wd as Ae,wi as je,yd as Me}from"./loadAgentsDir-DC4jN6-f.js";import{Xt as L}from"./prompt-BHI7PZe4.js";import{f as Ne,l as Pe,t as Fe}from"./commitAttribution-Djh1ZpYH.js";import{F as Ie,P as Le}from"./teamHelpers-WmWa_h3B.js";import{n as R,r as Re}from"./systemPromptSections-DY7epA2Y.js";import{r as ze}from"./asciicast-C_1Pi99k.js";import*as z from"path";import{dirname as Be}from"path";o(),Re(),xe(),we(),L(),Ee(),x(),Pe(),Me(),le(),d(),be(),w(),re(),ke(),Te(),pe(),Le(),de(),ve();function Ve(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type!==`assistant`)continue;let r=n.message.content.find(e=>e.type===`tool_use`&&e.name===`TodoWrite`);if(!r||r.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=ye().safeParse(i.todos);return a.success?a.data:[]}return[]}function He(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&Se(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),e.attributionSnapshots&&e.attributionSnapshots.length>0&&Fe(e.attributionSnapshots,e=>{t(t=>({...t,attribution:e}))}),!Ie()&&e.messages&&e.messages.length>0){let n=Ve(e.messages);if(n.length>0){let e=r();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function Ue(e){if(e.attributionSnapshots&&e.attributionSnapshots.length>0)return Ne(e.attributionSnapshots)}function B(e,t){if(!(!e&&!t))return{name:e??``,color:t===`default`?void 0:t}}function V(e,t,n){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return u(void 0),{agentDefinition:void 0,agentType:void 0};let r=n.activeAgents.find(t=>t.agentType===e);return r?(u(r.agentType),!s()&&r.model&&r.model!==`inherit`&&te(ne(r.model)),{agentDefinition:r,agentType:r.agentType}):(f(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),u(void 0),{agentDefinition:void 0,agentType:void 0})}async function We(e,t,n,r){if(!e)return r;N.cache.clear?.();let i=await N(t),a=[...i.allAgents,...n];return{...i,allAgents:a,activeAgents:De(a)}}function H(e){let t=C();if(t){v(t);return}if(e){try{process.chdir(e.worktreePath)}catch{v(null);return}F(e.worktreePath),l(m()),b(e),I(),R(),k.cache.clear?.()}}function Ge(){let e=C();if(e){b(null),I(),R(),k.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}F(e.originalCwd),l(m())}}async function Ke(t,n,i){let a;if(a=i.modeApi?.matchSessionMode(t.mode),a&&t.messages.push(ue(a,`warning`)),n.forkSession)t.contentReplacements?.length&&await A(t.contentReplacements);else{let e=n.sessionIdOverride??t.sessionId;e&&(ee(ge(e),n.transcriptPath?Be(n.transcriptPath):null),await ze(),await M(),g(e))}if(O(n.forkSession?{...t,worktreeSession:void 0}:t),t.goal){let{hydrateGoalFromTranscript:i}=(P(),e(Oe)),a=new Map,o=n.sessionIdOverride??t.sessionId??r();a.set(o,t.goal),i(a,o)}n.forkSession||(H(t.worktreeSession),h());let{agentDefinition:o,agentType:s}=V(t.agentSetting,i.mainThreadAgentDefinition,i.agentDefinitions);je(i.modeApi?.isCoordinatorMode()?`coordinator`:`normal`);let c=n.includeAttribution?Ue(t):void 0,l=B(t.agentName,t.agentColor);Ae(t.agentName);let u=await We(!!a,i.currentCwd,i.cliAgents,i.agentDefinitions);return{messages:t.messages,fileHistorySnapshots:t.fileHistorySnapshots,contentReplacements:t.contentReplacements,agentName:t.agentName,agentColor:t.agentColor===`default`?void 0:t.agentColor,restoredAgentDef:o,initialState:{...i.initialState,...s&&{agent:s},...c&&{attribution:c},...l&&{standaloneAgentContext:l},agentDefinitions:u}}}t(),o(),Ce(),p(),D(),fe(),ae(),d(),oe(),_(),i();var qe=1e3,Je=500,Ye=300,Xe=2e3,Ze=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=a(),Z=null;async function Qe(){if(K||q)return;K=!0,J||(J=!0,E(()=>{T(),X.emit()}));let e=await et();e.length!==0&&(f(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=n.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??qe,pollInterval:Z?.pollInterval??Je},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Ze,interval:Z?.chokidarInterval??Xe,atomic:!0}),U.on(`add`,$),U.on(`change`,$),U.on(`unlink`,$),Y=ie(async()=>{await Q()}))}function Q(){q=!0,Y&&(Y(),Y=null);let e=Promise.resolve();return U&&(e=U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),e}var $e=X.subscribe;async function et(){let e=se(),t=[],n=y(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=y(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=y(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=y(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of c()){let r=z.join(n,`.claude`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){f(`Detected skill change: ${e}`),ce(`tengu_skill_file_changed`,{source:`chokidar`}),tt(e)}function tt(e){G.add(e),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let e=[...G];if(G.clear(),j(await S(`skills`,e[0]))){f(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}_e(),me(),he(),X.emit()},Z?.reloadDebounce??Ye)}async function nt(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var rt={initialize:Qe,dispose:Q,subscribe:$e,resetForTesting:nt};export{V as a,Ke as i,B as n,He as o,Ge as r,H as s,rt as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./featureCheck-j7P30mry.js";import{b as n,m as r,o as i}from"./skillGenerator-BcNv-VZ5.js";import{S as a,T as o,f as s,i as c,k as l,u}from"./runtimeObserver-ByTBtmBf.js";import{i as d}from"./observationStore-Bi1rRKcD.js";import{a as f}from"./projectContext-2CzYVggO.js";import{a as p,c as m,d as h,i as g}from"./sessionObserver-rd6RRTzc.js";import{n as _}from"./toolEventObserver-DMdrez6V.js";import{n as v}from"./skillGapStore-Bz_qbwI1.js";var y=e((()=>{t(),a(),n(),s(),d(),u(),f(),c(),h(),p(),l(),o(),_(),g(),v(),i(),r(),m()}));export{y as t};
@@ -1 +0,0 @@
1
- import"./featureCheck-j7P30mry.js";import"./instinctParser-BMtAMLSx.js";import"./skillGenerator-BcNv-VZ5.js";import{p as e}from"./runtimeObserver-ByTBtmBf.js";import{o as t}from"./observationStore-Bi1rRKcD.js";import{s as n}from"./projectContext-2CzYVggO.js";import"./sessionObserver-rd6RRTzc.js";import"./toolEventObserver-DMdrez6V.js";import"./skillGapStore-Bz_qbwI1.js";import{t as r}from"./skillLearning-BJAfTX2G.js";r();export{e as loadInstincts,t as readObservations,n as resolveProjectContext};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Xc as t,Yc as n}from"./loadAgentsDir-DC4jN6-f.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,n)=>e+t(`${n.agentType}: ${n.whenToUse}`),0):0}var i,a=e((()=>{n(),i=15e3}));export{r as n,a as r,i as t};
@@ -1 +0,0 @@
1
- import{a as e,t}from"./teamHelpers-WmWa_h3B.js";e();export{t as cleanupSessionTeams};
@@ -1 +0,0 @@
1
- import{a as e,t}from"./teammateModeSnapshot-DZ6ulELC.js";e();export{t as captureTeammateModeSnapshot};
@@ -1 +0,0 @@
1
- import{Bv as e,Fv as t,Lv as n,Mv as r,Nv as i}from"./loadAgentsDir-DC4jN6-f.js";i();export{r as checkOutTeleportedSessionBranch,t as processMessagesForTeleportResume,n as teleportResumeCodeSession,e as validateGitState};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./thinkback-DZEhr3Ii.js";e();export{n as call,t as playAnimation};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{$A as t,Ms as n,Rs as r,tj as i}from"./loadAgentsDir-DC4jN6-f.js";import{n as a,r as o}from"./thinkback-DZEhr3Ii.js";import{join as s}from"path";function c(){return`thinkback@${process.env.USER_TYPE===`ant`?u:t}`}async function l(){let e=r(),t=c(),n=e.plugins[t];if(!n||n.length===0)return{type:`text`,value:`Thinkback plugin not installed. Run /think-back first to install it.`};let i=n[0];return i?.installPath?{type:`text`,value:(await o(s(i.installPath,`skills`,d))).message}:{type:`text`,value:`Thinkback plugin installation path not found.`}}var u,d;e((()=>{n(),i(),a(),u=`claude-code-marketplace`,d=`thinkback`}))();export{l as call};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./toolPool-DHQyHmDY.js";e();export{t as applyCoordinatorToolFilter};
@@ -1 +0,0 @@
1
- import{a as e,n as t}from"./chunk-DR8-3Aex.js";import{_l as n,cl as r,gl as i,ll as a}from"./paths-CEAy4QCs.js";import{Ow as o,RE as s,kw as c,zE as l}from"./loadAgentsDir-DC4jN6-f.js";import{s as u,u as d}from"./prompt-BHI7PZe4.js";function f(e){return h.some(t=>e.endsWith(t))}function p(e){return e.filter(e=>u.has(e.name)||f(e.name))}function m(e,t,r){let[i,o]=n(a([...e,...t],`name`),c),s=(e,t)=>e.name.localeCompare(t.name),l=[...o.sort(s),...i.sort(s)];return g&&g.isCoordinatorMode()?p(l):l}var h,g,_=t((()=>{i(),r(),d(),o(),h=[`subscribe_pr_activity`,`unsubscribe_pr_activity`],g=(l(),e(s))}));export{m as i,_ as n,f as r,p as t};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./undercover-rcR56jZx.js";t();export{e as shouldShowUndercoverAutoNotice};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./upgrade-ClLcX7zy.js";e();export{t as call};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{W as r,cn as i}from"./state-sIHsFpDu.js";import{cx as a,lx as o,oC as s,sC as c,vC as l,yC as u}from"./loadAgentsDir-DC4jN6-f.js";function d(){let{addNotification:e,removeNotification:t}=c(),[n,i]=(0,f.useState)(()=>{let{errors:e}=a();return e});return u((0,f.useCallback)(()=>{let{errors:e}=a();i(e)},[])),(0,f.useEffect)(()=>{r()||(n.length>0?e({key:p,text:`Found ${n.length} settings ${n.length===1?`issue`:`issues`} · /doctor for details`,color:`warning`,priority:`high`,timeoutMs:6e4}):t(p))},[n,e,t]),n}var f,p,m=e((()=>{f=t(n()),s(),i(),o(),l(),p=`settings-errors`}));export{d as n,m as t};
@@ -1 +0,0 @@
1
- import{Fp as e,jp as t}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as clearWebFetchCache};
@@ -1 +0,0 @@
1
- import{a as e,i as t,n}from"./voiceModeEnabled-C1Q9j5q6.js";n();export{t as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./voiceStreamSTT-BguyxdrW.js";t();export{e as isVoiceStreamAvailable};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{n as a,t as o}from"./cwd--iizewsn.js";import{n as s,t as c}from"./execSyncWrapper-Bn7EJqtD.js";import{i as l,o as u}from"./platform-mh9ypxS8.js";import{n as d,t as f}from"./memoize-DJ1XCN-z.js";import*as p from"path";import{existsSync as m}from"fs";import*as h from"path/win32";function g(e){return m(e)}function _(e){if(e===`git`){for(let e of[`C:\\Program Files\\Git\\cmd\\git.exe`,`C:\\Program Files (x86)\\Git\\cmd\\git.exe`])if(g(e))return e}try{let t=c(`where.exe ${e}`,{stdio:`pipe`,encoding:`utf8`}).trim().split(`\r
2
- `).filter(Boolean),n=o().toLowerCase();for(let e of t){let t=p.resolve(e).toLowerCase();if(p.dirname(t).toLowerCase()===n||t.startsWith(n+p.sep)){i(`Skipping potentially malicious executable in current directory: ${e}`);continue}return e}return null}catch{return null}}function v(){if(l()===`windows`){let e=y();process.env.SHELL=e,process.env.CLAUDE_CODE_GIT_BASH_PATH=e,i(`Using bash path: "${e}"`)}}var y,b,x,S=e((()=>{n(),a(),r(),s(),f(),u(),y=t(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(g(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let e=_(`git`);if(e){let t=h.join(e,`..`,`..`,`bin`,`bash.exe`);if(g(t))return t}console.error(`Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe`),process.exit(1)}),b=d(e=>{if(e.startsWith(`\\\\`))return e.replace(/\\/g,`/`);let t=e.match(/^([A-Za-z]):[/\\]/);return t?`/`+t[1].toLowerCase()+e.slice(2).replace(/\\/g,`/`):e.replace(/\\/g,`/`)},e=>e,500),x=d(e=>{if(e.startsWith(`//`))return e.replace(/\//g,`\\`);let t=e.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(t){let n=t[1].toUpperCase(),r=e.slice((`/cygdrive/`+t[1]).length);return n+`:`+(r||`\\`).replace(/\//g,`\\`)}let n=e.match(/^\/([A-Za-z])(\/|$)/);if(n){let t=n[1].toUpperCase(),r=e.slice(2);return t+`:`+(r||`\\`).replace(/\//g,`\\`)}return e.replace(/\//g,`\\`)},e=>e,500)}));export{b as a,v as i,S as n,x as r,y as t};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./windowsPaths-BeDSnJ23.js";t();export{e as setShellIfWindows};
@@ -1 +0,0 @@
1
- import{Ct as e,Ot as t}from"./loadAgentsDir-DC4jN6-f.js";t();export{e as execIntoTmuxWorktree};