claude-code-best 2.8.0 → 2.8.2

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 (453) hide show
  1. package/README.md +3 -0
  2. package/dist/chunks/{AddWorkspaceDirectory-DRO4tbYd.js → AddWorkspaceDirectory-BCCbaWoh.js} +1 -1
  3. package/dist/chunks/{App-DJyiiVKi.js → App-BIAYUFvT.js} +1 -1
  4. package/dist/chunks/{ApproveApiKey-DygOEAkM.js → ApproveApiKey-DRARgWX3.js} +1 -1
  5. package/dist/chunks/ApproveApiKey-Do-Qth0X.js +1 -0
  6. package/dist/chunks/{AssistantSessionChooser-C67mOxVi.js → AssistantSessionChooser-eUrEGDlX.js} +1 -1
  7. package/dist/chunks/{BackgroundTasksDialog-Bqk_Cn3j.js → BackgroundTasksDialog-DSeAqhMC.js} +2 -2
  8. package/dist/chunks/{BypassPermissionsModeDialog-C4z7RkFV.js → BypassPermissionsModeDialog-8z7R5EpU.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-CyVFdjBe.js → ClaudeInChromeOnboarding-B7mDm5Hb.js} +1 -1
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-IpqqBuJs.js → ClaudeMdExternalIncludesDialog-DE9dpWtg.js} +1 -1
  11. package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +1 -0
  12. package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-CJpa8Xy-.js → DesktopHandoff-Ce0nE7D6.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-CfAuHVRL.js → DevChannelsDialog-mt0lA5wR.js} +1 -1
  15. package/dist/chunks/Dialog-91X6ZGg9.js +1 -0
  16. package/dist/chunks/{DiffDialog-CV3brWsG.js → DiffDialog-BfSnz8L-.js} +2 -2
  17. package/dist/chunks/{Doctor-D3GysagF.js → Doctor-BOVjkAKn.js} +1 -1
  18. package/dist/chunks/Doctor-osWC5WVY.js +1 -0
  19. package/dist/chunks/{ExitFlow-L2sh80sm.js → ExitFlow-C3BGvwv-.js} +1 -1
  20. package/dist/chunks/{Feedback-DfkBCvva.js → Feedback-BtZb1A8b.js} +1 -1
  21. package/dist/chunks/Grove-DyC_Wrfx.js +1 -0
  22. package/dist/chunks/{Grove-Bo74aZx-.js → Grove-HpMLktXp.js} +1 -1
  23. package/dist/chunks/{HybridTransport-BItIDJyC.js → HybridTransport-COk7jAC7.js} +1 -1
  24. package/dist/chunks/{ITermBackend-3iS8Bvmo.js → ITermBackend-BlwyeN8U.js} +1 -1
  25. package/dist/chunks/{InvalidConfigDialog-6lPGcuOX.js → InvalidConfigDialog-QVIRDXwA.js} +1 -1
  26. package/dist/chunks/{InvalidSettingsDialog-D8DwHiys.js → InvalidSettingsDialog-CZRZm0oa.js} +1 -1
  27. package/dist/chunks/ListItem-DCQhApdJ.js +1 -0
  28. package/dist/chunks/{MCPConnectionManager-CsPizxTx.js → MCPConnectionManager-2Fulnp8q.js} +1 -1
  29. package/dist/chunks/{McpParsingWarnings-Cepe7RPZ.js → McpParsingWarnings-DWMO0bV6.js} +1 -1
  30. package/dist/chunks/{MessageSelector-BzUQUeDn.js → MessageSelector-B4jJQ-KQ.js} +2 -2
  31. package/dist/chunks/Messages-ltcn1Qkf.js +11 -0
  32. package/dist/chunks/{Onboarding-BZUXID6q.js → Onboarding-CHcND5Tt.js} +1 -1
  33. package/dist/chunks/{OverageCreditUpsell-Dhm7HBuD.js → OverageCreditUpsell-CMBqZrnz.js} +1 -1
  34. package/dist/chunks/{PermissionDialog-BrRBxx5o.js → PermissionDialog-R-Vl4Tk-.js} +1 -1
  35. package/dist/chunks/{PluginSettings-BZ-PX9Tg.js → PluginSettings-DIS_qrVA.js} +1 -1
  36. package/dist/chunks/{PressEnterToContinue-DtA_p3X6.js → PressEnterToContinue-BYdiZwYD.js} +1 -1
  37. package/dist/chunks/{PromptInputFooterSuggestions-Da8Fty6P.js → PromptInputFooterSuggestions-DAFZfAT0.js} +1 -1
  38. package/dist/chunks/{PromptInputHelpMenu-Bz7EPzzq.js → PromptInputHelpMenu-CAwbW7z2.js} +1 -1
  39. package/dist/chunks/{QueryEngine-CmJK27jU.js → QueryEngine-BQs519Rb.js} +1 -1
  40. package/dist/chunks/REPL-DJh_wVWI.js +1 -0
  41. package/dist/chunks/{REPL-DxEJZpIp.js → REPL-Dx3SPe95.js} +13 -13
  42. package/dist/chunks/{RemoteCallout-DONJj8l2.js → RemoteCallout-CwI1mLQ9.js} +1 -1
  43. package/dist/chunks/{RemoteSessionManager-BvvNspY8.js → RemoteSessionManager-BXMBhfQD.js} +1 -1
  44. package/dist/chunks/{ResumeConversation-EpjJdFHu.js → ResumeConversation-BK7L_YBI.js} +1 -1
  45. package/dist/chunks/{SSETransport-D51Jfdaj.js → SSETransport-Co-0nMlR.js} +1 -1
  46. package/dist/chunks/SearchBox-Bu4gYF0J.js +1 -0
  47. package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +1 -0
  48. package/dist/chunks/SentryErrorBoundary-DLML64E_.js +1 -0
  49. package/dist/chunks/{SentryErrorBoundary-nYTimi4l.js → SentryErrorBoundary-kEgE7qeH.js} +1 -1
  50. package/dist/chunks/{Settings-C2vEJjLx.js → Settings-DOve7mW1.js} +2 -2
  51. package/dist/chunks/{TeleportProgress--jgrqIfW.js → TeleportProgress--n-u7MYY.js} +1 -1
  52. package/dist/chunks/{TeleportRepoMismatchDialog-BKDaFT_L.js → TeleportRepoMismatchDialog-CzQzdYb2.js} +1 -1
  53. package/dist/chunks/{TeleportResumeWrapper-CxlpiHIz.js → TeleportResumeWrapper-CtANoO1Z.js} +1 -1
  54. package/dist/chunks/{ThemePicker-CYL4C-F-.js → ThemePicker-kBt6obJb.js} +1 -1
  55. package/dist/chunks/{TmuxBackend-C_N4ww8i.js → TmuxBackend-Q5xdOkW4.js} +1 -1
  56. package/dist/chunks/{TrustDialog-CYdftZ1M.js → TrustDialog-CoCFqyRD.js} +1 -1
  57. package/dist/chunks/{ValidationErrorsList-CaTwOP3f.js → ValidationErrorsList-CL42YlaS.js} +1 -1
  58. package/dist/chunks/{WelcomeV2-5rgKm4Mz.js → WelcomeV2-B0d9sH1c.js} +1 -1
  59. package/dist/chunks/{WindowsTerminalBackend-BzoSs0VA.js → WindowsTerminalBackend-CLSeqqHh.js} +1 -1
  60. package/dist/chunks/{add-dir-RNzFR3XZ.js → add-dir-IrADCHV-.js} +1 -1
  61. package/dist/chunks/{agentDisplay-DgeOQY1E.js → agentDisplay-BUXpQhYh.js} +1 -1
  62. package/dist/chunks/{agents-iMtFurok.js → agents-BqQtaTaM.js} +1 -1
  63. package/dist/chunks/{agents-D7cgzb3f.js → agents-Cx0f6suK.js} +1 -1
  64. package/dist/chunks/{ant-CF1iRpXD.js → ant-BUkS8Em4.js} +1 -1
  65. package/dist/chunks/api-CoBZPEi-.js +1 -0
  66. package/dist/chunks/{api-DMbWqJlK.js → api-Cy1N7XAQ.js} +1 -1
  67. package/dist/chunks/{artifacts-D2kY_AMp.js → artifacts-DH8c2yG0.js} +1 -1
  68. package/dist/chunks/assistant-B2_c5C4T.js +1 -0
  69. package/dist/chunks/{assistant-CZ4VXgzH.js → assistant-BGzd9a5x.js} +1 -1
  70. package/dist/chunks/{assistant-JAqAZqaE.js → assistant-C3dP-BSJ.js} +1 -1
  71. package/dist/chunks/auth-CRVuUNwf.js +1 -0
  72. package/dist/chunks/{auth-BemPA3ot.js → auth-DVtMm7Hj.js} +1 -1
  73. package/dist/chunks/{autoMode-CGovMAzJ.js → autoMode-ThlM20qr.js} +1 -1
  74. package/dist/chunks/{autonomy-BVXyNEj0.js → autonomy-B637YdCF.js} +1 -1
  75. package/dist/chunks/{autonomy-BnAHLZWH.js → autonomy-B_vxYZbV.js} +1 -1
  76. package/dist/chunks/{autonomyPanel-COMI2iR0.js → autonomyPanel-BM2VhTsn.js} +1 -1
  77. package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +1 -0
  78. package/dist/chunks/{backgroundHousekeeping-BRtG20l2.js → backgroundHousekeeping-Cll7XHG1.js} +2 -2
  79. package/dist/chunks/{banner-D_rqe2XQ.js → banner-DUL-7A0b.js} +1 -1
  80. package/dist/chunks/{branch-BnKwIQtC.js → branch-BlH5WYNu.js} +1 -1
  81. package/dist/chunks/{break-cache-CDzQDHwY.js → break-cache-DjCRzxDv.js} +1 -1
  82. package/dist/chunks/{bridge-ChVjEHVq.js → bridge-QRFJRzVG.js} +2 -2
  83. package/dist/chunks/{bridgeConfig-e0MGfed6.js → bridgeConfig-Di9LziJ3.js} +1 -1
  84. package/dist/chunks/bridgeConfig-pVTHa_ED.js +1 -0
  85. package/dist/chunks/bridgeEnabled-c_BeJX3S.js +1 -0
  86. package/dist/chunks/{bridgeEnabled-DR-v8AXw.js → bridgeEnabled-z1fPRzzV.js} +1 -1
  87. package/dist/chunks/bridgeMain-CHk_DCxy.js +1 -0
  88. package/dist/chunks/{bridgeMain-OsR-_PRp.js → bridgeMain-DVoobI7G.js} +11 -11
  89. package/dist/chunks/{bridgeMessaging-BvBnxgD4.js → bridgeMessaging-BG8fNZac.js} +1 -1
  90. package/dist/chunks/{btw-_b16RGoh.js → btw-DpeWZQbf.js} +1 -1
  91. package/dist/chunks/{buddy-DJ3QSQyd.js → buddy-Bni2g0Km.js} +1 -1
  92. package/dist/chunks/{bypassPermissionsKillswitch-OhGSWZrB.js → bypassPermissionsKillswitch-7e56Rquc.js} +1 -1
  93. package/dist/chunks/caches-3byHT6VF.js +1 -0
  94. package/dist/chunks/{caches-Bp4F7tZ5.js → caches-CzEBsMvP.js} +2 -2
  95. package/dist/chunks/{ccrClient-D7pEGzQa.js → ccrClient-iR6zwGb1.js} +1 -1
  96. package/dist/chunks/changeDetector-Cg75mKOu.js +1 -0
  97. package/dist/chunks/channelNotification-BSmZprUZ.js +1 -0
  98. package/dist/chunks/{channelNotification-BZFMAWln.js → channelNotification-CSmLgwtO.js} +1 -1
  99. package/dist/chunks/{chrome-B5IxDA16.js → chrome-BO1vbvZ0.js} +1 -1
  100. package/dist/chunks/clear-CTOCrXv_.js +1 -0
  101. package/dist/chunks/client-BgdjJNnC.js +1 -0
  102. package/dist/chunks/{color-BYVWpzI8.js → color-BP4FmcMn.js} +1 -1
  103. package/dist/chunks/commands-CkfOhzGE.js +1 -0
  104. package/dist/chunks/commitAttribution-DKvggTZx.js +1 -0
  105. package/dist/chunks/{commitAttribution-ClSlXMPG.js → commitAttribution-Djh1ZpYH.js} +1 -1
  106. package/dist/chunks/{compact-B9c12JXf.js → compact-BtAvCkY0.js} +1 -1
  107. package/dist/chunks/{companion-C8e7dVlu.js → companion-C-jfFhlz.js} +1 -1
  108. package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
  109. package/dist/chunks/{completionCache-Br6OwASx.js → completionCache-C7hDqIDL.js} +1 -1
  110. package/dist/chunks/{config-Bxgfx_nO.js → config-CloXpblh.js} +1 -1
  111. package/dist/chunks/{config-C-yz-f4W.js → config-DwsIX0hc.js} +1 -1
  112. package/dist/chunks/{context-Bf5t6C-a.js → context-DdwMoH4j.js} +1 -1
  113. package/dist/chunks/{context-noninteractive-CJu7hZCM.js → context-noninteractive-BWbEqad6.js} +13 -13
  114. package/dist/chunks/context-noninteractive-DNOyQYnM.js +1 -0
  115. package/dist/chunks/{conversation-BYMS5Hqa.js → conversation-DR4MFYYi.js} +1 -1
  116. package/dist/chunks/conversation-DVhyJA1O.js +1 -0
  117. package/dist/chunks/{copy-C0BZ7Gm0.js → copy-tl-41wwU.js} +1 -1
  118. package/dist/chunks/{createSSHSession-DNXCWneI.js → createSSHSession-B_IyqOll.js} +1 -1
  119. package/dist/chunks/createSession-CIM50iEU.js +1 -0
  120. package/dist/chunks/{createSession-DjM6Ev45.js → createSession-Csaqw8kb.js} +1 -1
  121. package/dist/chunks/{cronJitterConfig-CaFkPXKB.js → cronJitterConfig-2sHTXBLu.js} +1 -1
  122. package/dist/chunks/crossProjectResume-C1I0X__e.js +40 -0
  123. package/dist/chunks/{datadog-ClZjR-jM.js → datadog-BzkFYNcv.js} +1 -1
  124. package/dist/chunks/datadog-vQKKqB6Z.js +1 -0
  125. package/dist/chunks/desktop-oTXppB2O.js +1 -0
  126. package/dist/chunks/{diff-D9hjPq4W.js → diff-B23DUoT8.js} +1 -1
  127. package/dist/chunks/{doctor-4-im_J_h.js → doctor-o2MJvjAE.js} +1 -1
  128. package/dist/chunks/{effort-Bz-9GIpe.js → effort-B1X_S_oa.js} +1 -1
  129. package/dist/chunks/entry-BAXMpXJ0.js +14 -0
  130. package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +1 -0
  131. package/dist/chunks/{envLessBridgeConfig-DW4-nPbZ.js → envLessBridgeConfig-YNTOVEqU.js} +1 -1
  132. package/dist/chunks/{exit-DBNDTR4b.js → exit-CwGJifQF.js} +1 -1
  133. package/dist/chunks/{export-CQHUM_Nv.js → export-CqbYdFmJ.js} +1 -1
  134. package/dist/chunks/{exportRenderer-CuIDQBLH.js → exportRenderer-DP_z8YD1.js} +1 -1
  135. package/dist/chunks/extra-usage-1FUBiJOE.js +1 -0
  136. package/dist/chunks/{extra-usage-DTr6gExD.js → extra-usage-BQ5Z1wJb.js} +1 -1
  137. package/dist/chunks/{extra-usage-core-D3CwYO_8.js → extra-usage-core-B1oJoxYa.js} +1 -1
  138. package/dist/chunks/{extra-usage-noninteractive-d-QVg1D5.js → extra-usage-noninteractive-BV_6cpdd.js} +1 -1
  139. package/dist/chunks/{extraUsage-BNRQOkgU.js → extraUsage-Ca_6qcke.js} +1 -1
  140. package/dist/chunks/extractMemories-B-yrLjpP.js +1 -0
  141. package/dist/chunks/{fast-bkGXbuHX.js → fast-BJMGfO_S.js} +1 -1
  142. package/dist/chunks/fast-CFtN26up.js +1 -0
  143. package/dist/chunks/{feedback-BvFgE_FF.js → feedback-O0Gushxg.js} +1 -1
  144. package/dist/chunks/{firstPartyEventLogger-D-ifHvWu.js → firstPartyEventLogger-0s2WJ6SR.js} +1 -1
  145. package/dist/chunks/{flushGate-BA24vFBg.js → flushGate-CLjpgnG6.js} +1 -1
  146. package/dist/chunks/{fpsMetrics-CBFlAGTS.js → fpsMetrics-DH78PzGr.js} +1 -1
  147. package/dist/chunks/gates-4fq2Ws2D.js +1 -0
  148. package/dist/chunks/{gates-C66Nz9b2.js → gates-C5y8P5t9.js} +1 -1
  149. package/dist/chunks/{gemini-DuQl4hTA.js → gemini-D6lfJRGH.js} +1 -1
  150. package/dist/chunks/{generateRecap-CwBU76xi.js → generateRecap-AYujRzfu.js} +1 -1
  151. package/dist/chunks/{generateSessionName-LnmjE9jh.js → generateSessionName-CXg1uVLN.js} +1 -1
  152. package/dist/chunks/{githubRepoPathMapping-DrreQj47.js → githubRepoPathMapping-CdjkMIX3.js} +1 -1
  153. package/dist/chunks/{goal-BIvjF6B7.js → goal-BGr-SlcA.js} +1 -1
  154. package/dist/chunks/{grok-KNLYSRBQ.js → grok-DxyRt4Jq.js} +1 -1
  155. package/dist/chunks/{growthbook-ksjGAskq.js → growthbook-D93ZmHUL.js} +1 -1
  156. package/dist/chunks/{heapdump-Cz8vkcOr.js → heapdump-DZz5qnZg.js} +1 -1
  157. package/dist/chunks/{help-Cx9OordP.js → help-C8HhaC70.js} +1 -1
  158. package/dist/chunks/hooks-CmW7bdtz.js +1 -0
  159. package/dist/chunks/{hooks-BW-d9Bdu.js → hooks-De2yBPig.js} +1 -1
  160. package/dist/chunks/{hostAdapter-DLmaB6eN.js → hostAdapter-CZdJUeS1.js} +1 -1
  161. package/dist/chunks/{ide-CECrIg1r.js → ide-GnSLasRI.js} +1 -1
  162. package/dist/chunks/{inboundAttachments-B0sGIu79.js → inboundAttachments-C8y3D5mp.js} +1 -1
  163. package/dist/chunks/inboundAttachments-DZiITyN8.js +1 -0
  164. package/dist/chunks/{initReplBridge-BAEMZEcg.js → initReplBridge-YGXqLbNZ.js} +1 -1
  165. package/dist/chunks/{insights-DeWggLxC.js → insights-23tyPxXV.js} +1 -1
  166. package/dist/chunks/{install-pxH_HR1p.js → install-BXi4d63r.js} +1 -1
  167. package/dist/chunks/{install-github-app-DqKEiHQ1.js → install-github-app-D2X7BgzJ.js} +1 -1
  168. package/dist/chunks/{install-slack-app-P1L9x-YI.js → install-slack-app-_J1t0kSP.js} +1 -1
  169. package/dist/chunks/{instrumentation-Dx0s2jzr.js → instrumentation-C9WDRy-K.js} +3 -3
  170. package/dist/chunks/{job-CbxxkPgE.js → job-DXX7dNN_.js} +1 -1
  171. package/dist/chunks/{keybindings-BBPC7FAc.js → keybindings-CChhkkE0.js} +1 -1
  172. package/dist/chunks/{lang-CKp0Tn76.js → lang-COIVItM_.js} +1 -1
  173. package/dist/chunks/language-CiMwEWO-.js +1 -0
  174. package/dist/chunks/{language-iERMuOEu.js → language-DzWvcLCu.js} +1 -1
  175. package/dist/chunks/{launchAgentsPlatform-DQvKVtl2.js → launchAgentsPlatform-Du_WvKeU.js} +1 -1
  176. package/dist/chunks/{launchAutofixPr-B7hu9C8h.js → launchAutofixPr-CypNniKH.js} +1 -1
  177. package/dist/chunks/{launchCommand-CJsikSlW.js → launchCommand-9eYsPG7W.js} +1 -1
  178. package/dist/chunks/{launchLocalMemory-Cpz7L5j5.js → launchLocalMemory-GkqB_Gcr.js} +1 -1
  179. package/dist/chunks/{launchLocalVault-XLfOQtP7.js → launchLocalVault-CBihJDzq.js} +1 -1
  180. package/dist/chunks/{launchMemoryStores-Cz04PaDE.js → launchMemoryStores-BkK0wwq0.js} +1 -1
  181. package/dist/chunks/{launchOnboarding-XPbUNdHS.js → launchOnboarding-BubTG5vY.js} +1 -1
  182. package/dist/chunks/{launchSchedule-B1VEe3o-.js → launchSchedule-CkV6Ai-0.js} +1 -1
  183. package/dist/chunks/{launchSkillStore-Cy59z5xx.js → launchSkillStore-DIrFg_WZ.js} +1 -1
  184. package/dist/chunks/{launchTeleport-ZPM_DvzK.js → launchTeleport-DFrgN9sU.js} +1 -1
  185. package/dist/chunks/{launchVault-BhnTOZq8.js → launchVault-CIiNsg91.js} +1 -1
  186. package/dist/chunks/loadAgentsDir-CjhNkoq0.js +1 -0
  187. package/dist/chunks/{loadAgentsDir-CQF8qhne.js → loadAgentsDir-DC4jN6-f.js} +777 -777
  188. package/dist/chunks/{loadPluginHooks-TyULD8KH.js → loadPluginHooks-DukITDP2.js} +1 -1
  189. package/dist/chunks/{localSearch-BNYypHsK.js → localSearch-But4wyLg.js} +1 -1
  190. package/dist/chunks/localSearch-D8FFon8N.js +1 -0
  191. package/dist/chunks/login-B3TV33p4.js +1 -0
  192. package/dist/chunks/{login-CxbcJk9_.js → login-ajsn1Sg7.js} +1 -1
  193. package/dist/chunks/{logoV2Utils-Br_w1z39.js → logoV2Utils-CpeUvaOM.js} +1 -1
  194. package/dist/chunks/logout-BqbTEPv9.js +1 -0
  195. package/dist/chunks/{magicDocs-DnxdS9yV.js → magicDocs-TF6U6QoB.js} +1 -1
  196. package/dist/chunks/{main-FBmdv32j.js → main-bjQRqaUr.js} +31 -31
  197. package/dist/chunks/mappers-Bg-xtimK.js +1 -0
  198. package/dist/chunks/{mcp-BhAGhDQE.js → mcp-DtHGTZUo.js} +1 -1
  199. package/dist/chunks/{mcp-esqdO_lV.js → mcp-Vj0ijoSq.js} +3 -3
  200. package/dist/chunks/{mcp-DbqUZ1Cf.js → mcp-i8lqdWTr.js} +1 -1
  201. package/dist/chunks/{mcpServer-DeL2ADSF.js → mcpServer-CuqaXxiJ.js} +1 -1
  202. package/dist/chunks/{mcpServer-Ct-GVL-y.js → mcpServer-Dr9UfcEd.js} +1 -1
  203. package/dist/chunks/{memory-DwapBEsD.js → memory-DVJxsbcO.js} +1 -1
  204. package/dist/chunks/{mobile-D7MSmMhc.js → mobile-DLGq6g08.js} +1 -1
  205. package/dist/chunks/{modalContext-DxfeT_3m.js → modalContext-CuTwi_eD.js} +1 -1
  206. package/dist/chunks/{mode-B5cmHCvz.js → mode-C9yWWppB.js} +1 -1
  207. package/dist/chunks/model-BYSyXf9-.js +1 -0
  208. package/dist/chunks/{model-BePO0VaC.js → model-Dq-13vaB.js} +1 -1
  209. package/dist/chunks/{onChangeAppState-B3d5iy6T.js → onChangeAppState-Cc4zOnqx.js} +1 -1
  210. package/dist/chunks/{openai-fRhGOIQq.js → openai-DMCGGZts.js} +1 -1
  211. package/dist/chunks/{overageCreditGrant-B6sx7IFi.js → overageCreditGrant-CzkWDmsQ.js} +1 -1
  212. package/dist/chunks/{panel-CAVG5BOM.js → panel-BY6q16am.js} +1 -1
  213. package/dist/chunks/{panel-DU8y_jcf.js → panel-BdRBXAv3.js} +1 -1
  214. package/dist/chunks/panelCall-D36EWzwF.js +1 -0
  215. package/dist/chunks/{passes-CWPPUigp.js → passes-CPAwB9_F.js} +1 -1
  216. package/dist/chunks/{paths-4ZWdjPP4.js → paths-CEAy4QCs.js} +3 -3
  217. package/dist/chunks/{permissions-DW8CRuJp.js → permissions-B39hfy0O.js} +1 -1
  218. package/dist/chunks/{pipeTransport-CUeYRWJn.js → pipeTransport-7auNUakO.js} +1 -1
  219. package/dist/chunks/{plan-Cf-tHvGq.js → plan-pCEs76NM.js} +1 -1
  220. package/dist/chunks/plugin-BSC-7wQh.js +1 -0
  221. package/dist/chunks/{pluginAutoupdate-CdmKzIRf.js → pluginAutoupdate-Cre72Rtf.js} +1 -1
  222. package/dist/chunks/{pluginBlocklist-C9XwbFSo.js → pluginBlocklist-D2Cj4TR2.js} +1 -1
  223. package/dist/chunks/{pluginCliCommands-CmY_maYg.js → pluginCliCommands-CTxmCPph.js} +1 -1
  224. package/dist/chunks/{pluginFlagging-DyzxZolj.js → pluginFlagging-C5EGcjZe.js} +1 -1
  225. package/dist/chunks/{pluginOperations-mr4I7Jw9.js → pluginOperations-DDI1CG0K.js} +1 -1
  226. package/dist/chunks/{pluginStartupCheck-B6OdK29Z.js → pluginStartupCheck-B3QqfRt6.js} +1 -1
  227. package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +1 -0
  228. package/dist/chunks/{plugins-rdPgpjF8.js → plugins-Bz7JxD43.js} +1 -1
  229. package/dist/chunks/policyLimits-C-oHygGe.js +1 -0
  230. package/dist/chunks/{pollConfig-DLbuHBse.js → pollConfig-CyO4Ycwc.js} +1 -1
  231. package/dist/chunks/{poor-pmz2b7zu.js → poor-eRoBwI0Z.js} +1 -1
  232. package/dist/chunks/{poorMode-DD-q_w6Z.js → poorMode-BdNsLBQ-.js} +1 -1
  233. package/dist/chunks/poorMode-D2-4vRxb.js +1 -0
  234. package/dist/chunks/{print-luaON-Cg.js → print-Ogibzjap.js} +4 -4
  235. package/dist/chunks/{privacy-settings-BpigC4oX.js → privacy-settings-Dd7PtKbY.js} +1 -1
  236. package/dist/chunks/{processBashCommand-f_84bSlP.js → processBashCommand-BjdUo_Na.js} +1 -1
  237. package/dist/chunks/{processSlashCommand-BkBqV3Jd.js → processSlashCommand-tetvMLMl.js} +1 -1
  238. package/dist/chunks/projectContext-2CzYVggO.js +1 -0
  239. package/dist/chunks/projectContext-CVk2Ix1r.js +1 -0
  240. package/dist/chunks/prompt-BHI7PZe4.js +227 -0
  241. package/dist/chunks/prompt-DZ1EAUlC.js +1 -0
  242. package/dist/chunks/prompt-DeRHlPn1.js +1 -0
  243. package/dist/chunks/{promptEditor-C___2FFs.js → promptEditor-DoJ-xPi4.js} +1 -1
  244. package/dist/chunks/{protocolHandler-qwll5gSY.js → protocolHandler-Dgzu5UWb.js} +1 -1
  245. package/dist/chunks/{rate-limit-options-nQcTipEp.js → rate-limit-options-B6QH2-xn.js} +1 -1
  246. package/dist/chunks/{rcDebugLog-DOXxIr8l.js → rcDebugLog-C0Bam8V9.js} +1 -1
  247. package/dist/chunks/{referral-CMPZjf3I.js → referral-B10JtHMk.js} +1 -1
  248. package/dist/chunks/{refresh-CP7Dnjp4.js → refresh-DmEsCaJ0.js} +1 -1
  249. package/dist/chunks/{registerProtocol-DCNuqdCC.js → registerProtocol-CQjmvg7a.js} +1 -1
  250. package/dist/chunks/{registry-DLqZJleQ.js → registry-CLaXh4Gk.js} +1 -1
  251. package/dist/chunks/{release-notes-BsDW6T9f.js → release-notes-dxng0ob_.js} +1 -1
  252. package/dist/chunks/{releaseNotes-Tbd018Qz.js → releaseNotes-CS5L5W0H.js} +2 -2
  253. package/dist/chunks/{reload-plugins-iG9ZE9wF.js → reload-plugins-CgzAjBDp.js} +1 -1
  254. package/dist/chunks/{remote-env-BFntnltf.js → remote-env-BasfU8Ra.js} +1 -1
  255. package/dist/chunks/{remoteBridgeCore-Dpko9c-J.js → remoteBridgeCore-IJI5koHz.js} +1 -1
  256. package/dist/chunks/{remoteControlServer-D3P82kVF.js → remoteControlServer-BBCt7ySV.js} +1 -1
  257. package/dist/chunks/{rename-Codm2nfB.js → rename-eEdSZsJ2.js} +1 -1
  258. package/dist/chunks/{resume-BB1ceL_x.js → resume-DjnfattK.js} +1 -1
  259. package/dist/chunks/{runtimeObserver-D6aF77Dq.js → runtimeObserver-ByTBtmBf.js} +2 -2
  260. package/dist/chunks/{runtimeObserver-BpRn0RiL.js → runtimeObserver-COpkJmg-.js} +1 -1
  261. package/dist/chunks/sandbox-adapter-DagBhoTC.js +1 -0
  262. package/dist/chunks/{sandbox-toggle-DZ-8qXDS.js → sandbox-toggle-CQohaYND.js} +1 -1
  263. package/dist/chunks/searchExtraTools-kk-wV-cC.js +1 -0
  264. package/dist/chunks/{sentry-CVdHlmNQ.js → sentry-C0bQlih_.js} +1 -1
  265. package/dist/chunks/{session-B4j1ViVc.js → session-Dx_ODOHl.js} +1 -1
  266. package/dist/chunks/{sessionDiscovery-DkIIFsWX.js → sessionDiscovery-DAqs0Ra6.js} +1 -1
  267. package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +1 -0
  268. package/dist/chunks/sessionMemory-BMtFup-Y.js +1 -0
  269. package/dist/chunks/{sessionMemory-CnT3-Mj7.js → sessionMemory-Bq3ECr1S.js} +1 -1
  270. package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +1 -0
  271. package/dist/chunks/sessionObserver-BwAfzGUg.js +1 -0
  272. package/dist/chunks/{sessionObserver-gjdJ91cv.js → sessionObserver-rd6RRTzc.js} +1 -1
  273. package/dist/chunks/sessionStorage-X2u45U9z.js +1 -0
  274. package/dist/chunks/{sessionTitle-CSU5-VK9.js → sessionTitle-1k_2BhFL.js} +1 -1
  275. package/dist/chunks/{sessionTracing-BDN64fWh.js → sessionTracing-DNSDPYdR.js} +1 -1
  276. package/dist/chunks/{settingsSync-Nixbcaox.js → settingsSync-3xG2A_wN.js} +1 -1
  277. package/dist/chunks/{setup-n3Ixr_gs.js → setup-C2V4elOv.js} +2 -2
  278. package/dist/chunks/{setup-CZxLEcQh.js → setup-CY808VaY.js} +1 -1
  279. package/dist/chunks/{setup-9nXlu56r.js → setup-Hlga8GJ_.js} +1 -1
  280. package/dist/chunks/{shadowedRuleDetection-CCS7R7F1.js → shadowedRuleDetection-BdBNo5eP.js} +1 -1
  281. package/dist/chunks/{sideQuestion-MzExGTvn.js → sideQuestion-DWOCUKMh.js} +1 -1
  282. package/dist/chunks/{sink-BL75jACh.js → sink-DCh0VJ4g.js} +1 -1
  283. package/dist/chunks/sink-nZmawD5W.js +1 -0
  284. package/dist/chunks/sinks-BTZnXPr_.js +1 -0
  285. package/dist/chunks/{sinks-C-gxj_Eu.js → sinks-_9T2oPB_.js} +2 -2
  286. package/dist/chunks/{skill-learning-B9Msm4jG.js → skill-learning-CzZFGFZO.js} +2 -2
  287. package/dist/chunks/{skillChangeDetector-DlWPJTny.js → skillChangeDetector-345QNWDp.js} +1 -1
  288. package/dist/chunks/{skillGapStore-CsADiV5a.js → skillGapStore-Bz_qbwI1.js} +2 -2
  289. package/dist/chunks/{skillGapStore-Cpmbwyo3.js → skillGapStore-DJm3SULe.js} +1 -1
  290. package/dist/chunks/{skillGenerator-_khb-Gmc.js → skillGenerator-BcNv-VZ5.js} +2 -2
  291. package/dist/chunks/skillLearning-BJAfTX2G.js +1 -0
  292. package/dist/chunks/skillLearning-DPhuKS4j.js +1 -0
  293. package/dist/chunks/{skillPanel-DQmj3Yh1.js → skillPanel-Q85P-Gg4.js} +3 -3
  294. package/dist/chunks/{skillSearchPanel-6w_zzoI3.js → skillSearchPanel-CMCQDAcX.js} +2 -2
  295. package/dist/chunks/{skills-B3LN9tp9.js → skills-D3eUg3HG.js} +1 -1
  296. package/dist/chunks/{sprites-8JVWnXzp.js → sprites-ChoMSqpa.js} +1 -1
  297. package/dist/chunks/{src-KjMLauwe.js → src-Di342QoJ.js} +1 -1
  298. package/dist/chunks/{src-BJM0zMNO.js → src-poaoYkuc.js} +1 -1
  299. package/dist/chunks/startupProfiler-CBcN1Chw.js +3 -0
  300. package/dist/chunks/startupProfiler-DtTgsdnI.js +1 -0
  301. package/dist/chunks/{staticRender-DboURbK0.js → staticRender-DKFIRhkH.js} +1 -1
  302. package/dist/chunks/{stats-BDlygx5X.js → stats-DdhEa_6-.js} +1 -1
  303. package/dist/chunks/status-CX7Kgn21.js +1 -0
  304. package/dist/chunks/{statusNoticeHelpers-Cd_LDPvn.js → statusNoticeHelpers-AibXOONm.js} +1 -1
  305. package/dist/chunks/{tag-BLPgXlQZ.js → tag-BJ_u3aJm.js} +1 -1
  306. package/dist/chunks/tasks-DeEWOchP.js +1 -0
  307. package/dist/chunks/teamHelpers-CxoQp7OY.js +1 -0
  308. package/dist/chunks/{teamHelpers-B-poMJeE.js → teamHelpers-WmWa_h3B.js} +1 -1
  309. package/dist/chunks/{teammateModeSnapshot-B1_3D1CQ.js → teammateModeSnapshot-DZ6ulELC.js} +1 -1
  310. package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +1 -0
  311. package/dist/chunks/{teleport-CSo3PT05.js → teleport-CuDXJj_f.js} +1 -1
  312. package/dist/chunks/{templateJobs-BVebX2BK.js → templateJobs-nFBp68za.js} +1 -1
  313. package/dist/chunks/{terminalSetup-DZTEKKne.js → terminalSetup-BORjK3qH.js} +1 -1
  314. package/dist/chunks/{terminalSetup-DHWL0gnz.js → terminalSetup-DULcnnWe.js} +1 -1
  315. package/dist/chunks/{theme-BHQSNwSe.js → theme-Bf2QD0ja.js} +1 -1
  316. package/dist/chunks/thinkback-C1nnGg5r.js +1 -0
  317. package/dist/chunks/{thinkback-DOzxcgMy.js → thinkback-DZEhr3Ii.js} +1 -1
  318. package/dist/chunks/{thinkback-play-CK1C_F7G.js → thinkback-play-BtEBESXM.js} +1 -1
  319. package/dist/chunks/{toolEventObserver-XPorjjtG.js → toolEventObserver-CNZy5TpN.js} +1 -1
  320. package/dist/chunks/{toolEventObserver-BIjUIh4k.js → toolEventObserver-DMdrez6V.js} +1 -1
  321. package/dist/chunks/toolPool-DDj2TbY6.js +1 -0
  322. package/dist/chunks/{toolPool-hQlvQn-j.js → toolPool-DHQyHmDY.js} +1 -1
  323. package/dist/chunks/{trustedDevice-D-L5uAor.js → trustedDevice-DWb5CPB_.js} +1 -1
  324. package/dist/chunks/{trustedDevice-CyfQd_GU.js → trustedDevice-Dw2crViN.js} +1 -1
  325. package/dist/chunks/{tui-C7aBeORE.js → tui-DcXIK0fP.js} +1 -1
  326. package/dist/chunks/{ultrareviewCommand-rnMsUWTn.js → ultrareviewCommand-BfN25zni.js} +1 -1
  327. package/dist/chunks/undercover-DSp7SB7e.js +1 -0
  328. package/dist/chunks/{undercover-ClLYK52H.js → undercover-rcR56jZx.js} +1 -1
  329. package/dist/chunks/{updateCCB-pqkACWbs.js → updateCCB-DlTAqQJq.js} +1 -1
  330. package/dist/chunks/{upgrade-DpfZlPyC.js → upgrade-ClLcX7zy.js} +1 -1
  331. package/dist/chunks/upgrade-kf1QWUo7.js +1 -0
  332. package/dist/chunks/{upload-D98tqZnO.js → upload-BqEzK59v.js} +1 -1
  333. package/dist/chunks/{usage-CRquq5_O.js → usage-BgKDh8pQ.js} +1 -1
  334. package/dist/chunks/{usage-BWd5R6DU.js → usage-DW-akzSR.js} +1 -1
  335. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js → useExitOnCtrlCDWithKeybindings-BHi41Ku_.js} +1 -1
  336. package/dist/chunks/useKeybinding-DPOUuymz.js +1 -0
  337. package/dist/chunks/useMainLoopModel-BTpZ8k3k.js +1 -0
  338. package/dist/chunks/{useManagePlugins-DMY74XAk.js → useManagePlugins-z0qezP5r.js} +1 -1
  339. package/dist/chunks/{useMergedTools-NN58Kguw.js → useMergedTools-B78rAreW.js} +1 -1
  340. package/dist/chunks/{useSearchInput-CodP_5SB.js → useSearchInput-CwxF3CHN.js} +1 -1
  341. package/dist/chunks/{useSettingsErrors-BRxaYl6B.js → useSettingsErrors-CjDaon07.js} +1 -1
  342. package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
  343. package/dist/chunks/{useVoice-ByU-q_w4.js → useVoice-X5WSnyed.js} +1 -1
  344. package/dist/chunks/{util-SpgBY5_I.js → util-CP-_gsEO.js} +1 -1
  345. package/dist/chunks/utils-CULcnflj.js +1 -0
  346. package/dist/chunks/{validatePlugin-CxCXNV8o.js → validatePlugin-DUuaprqR.js} +1 -1
  347. package/dist/chunks/{vim-ByXlYzf9.js → vim-BfmsdxOa.js} +1 -1
  348. package/dist/chunks/{voice-BnLS_SdQ.js → voice-B3GIfFlB.js} +1 -1
  349. package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +1 -0
  350. package/dist/chunks/{voiceModeEnabled-D070o6QK.js → voiceModeEnabled-C1Q9j5q6.js} +1 -1
  351. package/dist/chunks/{voiceStreamSTT-vkQ-Aop7.js → voiceStreamSTT-BguyxdrW.js} +1 -1
  352. package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +1 -0
  353. package/dist/chunks/{web-tools-1yM0ZBfA.js → web-tools-qf_VwWRn.js} +1 -1
  354. package/dist/chunks/{workerRegistry-7xGv_sNB.js → workerRegistry-SbiLJIsG.js} +1 -1
  355. package/dist/chunks/worktree-Djga1wtm.js +1 -0
  356. package/dist/chunks/{xml-BUaEXGXx.js → xml-D7-jJqSA.js} +1 -1
  357. package/dist/cli.js +1 -1
  358. package/package.json +1 -1
  359. package/dist/chunks/ApproveApiKey-oTZKoMvB.js +0 -1
  360. package/dist/chunks/ClaudeMdExternalIncludesDialog-5FCT81WS.js +0 -1
  361. package/dist/chunks/ConsoleOAuthFlow-BmGziW64.js +0 -1
  362. package/dist/chunks/Dialog-C8eGKH-e.js +0 -1
  363. package/dist/chunks/Doctor-DohPtIKu.js +0 -1
  364. package/dist/chunks/Grove-C_ocvHd3.js +0 -1
  365. package/dist/chunks/ListItem-DDMe4CJ3.js +0 -1
  366. package/dist/chunks/Messages-KmeXIJqL.js +0 -11
  367. package/dist/chunks/REPL-BBmn_itf.js +0 -1
  368. package/dist/chunks/SearchBox-CciJ8giD.js +0 -1
  369. package/dist/chunks/SearchExtraToolsTool-kjVFsFkT.js +0 -1
  370. package/dist/chunks/SentryErrorBoundary-DsrmgmKF.js +0 -1
  371. package/dist/chunks/api-DkgaFAzq.js +0 -1
  372. package/dist/chunks/assistant-CiNV3Q0f.js +0 -1
  373. package/dist/chunks/auth-CbQCc9vz.js +0 -1
  374. package/dist/chunks/backgroundHousekeeping-LYpOamcN.js +0 -1
  375. package/dist/chunks/bridgeConfig-Budgp2Go.js +0 -1
  376. package/dist/chunks/bridgeEnabled-DmvmwuUY.js +0 -1
  377. package/dist/chunks/bridgeMain-KYR5iq6H.js +0 -1
  378. package/dist/chunks/caches-CkH9F-Fd.js +0 -1
  379. package/dist/chunks/ccshareResume-DPP1blaU.js +0 -1
  380. package/dist/chunks/changeDetector-IFbty4jj.js +0 -1
  381. package/dist/chunks/channelNotification-CIyWY0hs.js +0 -1
  382. package/dist/chunks/clear-BVjSQsUL.js +0 -1
  383. package/dist/chunks/client-BUUsZdSe.js +0 -1
  384. package/dist/chunks/commands-pTQdOvN6.js +0 -1
  385. package/dist/chunks/commitAttribution-QPrKt_BF.js +0 -1
  386. package/dist/chunks/completionCache-BB7-y2BX.js +0 -1
  387. package/dist/chunks/context-noninteractive-OUTZ6BKj.js +0 -1
  388. package/dist/chunks/conversation-Bs8l0KNl.js +0 -1
  389. package/dist/chunks/createSession-DpqtD4ML.js +0 -1
  390. package/dist/chunks/crossProjectResume-BCr6jfGz.js +0 -40
  391. package/dist/chunks/datadog-DlzPb5oG.js +0 -1
  392. package/dist/chunks/desktop-WH8s-9-6.js +0 -1
  393. package/dist/chunks/entry-CEBaLwEG.js +0 -14
  394. package/dist/chunks/envLessBridgeConfig-izoVnE8s.js +0 -1
  395. package/dist/chunks/extra-usage-VSASGlte.js +0 -1
  396. package/dist/chunks/extractMemories-hQlhiVOD.js +0 -1
  397. package/dist/chunks/fast-2gWrhEFZ.js +0 -1
  398. package/dist/chunks/gates-dO6m4Hdp.js +0 -1
  399. package/dist/chunks/hooks-BWoN0nQP.js +0 -1
  400. package/dist/chunks/inboundAttachments-D8vq1NQO.js +0 -1
  401. package/dist/chunks/language-CSDpzbTz.js +0 -1
  402. package/dist/chunks/loadAgentsDir-B-4D2dVE.js +0 -1
  403. package/dist/chunks/localSearch-DsFH9yls.js +0 -1
  404. package/dist/chunks/login-CEJEl2mW.js +0 -1
  405. package/dist/chunks/logout-BXr4jzNY.js +0 -1
  406. package/dist/chunks/mappers-BNI_df3v.js +0 -1
  407. package/dist/chunks/model-CgH43-hO.js +0 -1
  408. package/dist/chunks/panelCall-DUQdjDee.js +0 -1
  409. package/dist/chunks/plugin-DXhCgoNC.js +0 -1
  410. package/dist/chunks/pluginStartupCheck-BFuZqpnX.js +0 -1
  411. package/dist/chunks/policyLimits-B3dtp_Fe.js +0 -1
  412. package/dist/chunks/poorMode-BPIUnFFi.js +0 -1
  413. package/dist/chunks/projectContext-2Z2w8AI8.js +0 -1
  414. package/dist/chunks/projectContext-fS1t-xRh.js +0 -1
  415. package/dist/chunks/prompt-CogZQuTN.js +0 -227
  416. package/dist/chunks/prompt-CriAIdkT.js +0 -1
  417. package/dist/chunks/prompt-TGc_H1cL.js +0 -1
  418. package/dist/chunks/sandbox-adapter-DrHD1mch.js +0 -1
  419. package/dist/chunks/searchExtraTools-Dwg6ZafS.js +0 -1
  420. package/dist/chunks/sessionFileAccessHooks-n7HcOfZ7.js +0 -1
  421. package/dist/chunks/sessionMemory-DVq43VXP.js +0 -1
  422. package/dist/chunks/sessionMemoryUtils-BjkdLRvh.js +0 -1
  423. package/dist/chunks/sessionObserver-CrfmnMzL.js +0 -1
  424. package/dist/chunks/sessionStorage-BTbr9wkZ.js +0 -1
  425. package/dist/chunks/sink-CoUVbLFs.js +0 -1
  426. package/dist/chunks/sinks-wuo1yQ_m.js +0 -1
  427. package/dist/chunks/skillLearning-CFnZiM5J.js +0 -1
  428. package/dist/chunks/skillLearning-D6mvGN90.js +0 -1
  429. package/dist/chunks/startupProfiler-BmnoJtfF.js +0 -1
  430. package/dist/chunks/startupProfiler-rCtNuhXz.js +0 -3
  431. package/dist/chunks/status-DlT1tUmc.js +0 -1
  432. package/dist/chunks/tasks-Bf1Nf3WX.js +0 -1
  433. package/dist/chunks/teamHelpers-DeQCfdgu.js +0 -1
  434. package/dist/chunks/teammateModeSnapshot-BRuKcJNr.js +0 -1
  435. package/dist/chunks/thinkback-CVYpxAyO.js +0 -1
  436. package/dist/chunks/toolPool-CDEeuQd2.js +0 -1
  437. package/dist/chunks/undercover-BviGW-bQ.js +0 -1
  438. package/dist/chunks/upgrade-DAuhXFVI.js +0 -1
  439. package/dist/chunks/useKeybinding-DOjEx42R.js +0 -1
  440. package/dist/chunks/useMainLoopModel-BZoZdEdj.js +0 -1
  441. package/dist/chunks/useTerminalSize-mqo2Swmk.js +0 -1
  442. package/dist/chunks/utils-CM5oEyAY.js +0 -1
  443. package/dist/chunks/voiceModeEnabled-B3njLfhA.js +0 -1
  444. package/dist/chunks/voiceStreamSTT-BkeyhhFJ.js +0 -1
  445. package/dist/chunks/worktree-UA9gKCwL.js +0 -1
  446. /package/dist/chunks/{chromeNativeHost-DfYuJafI.js → chromeNativeHost-BldB1Zzi.js} +0 -0
  447. /package/dist/chunks/{claudeDesktop-CEQCLZmG.js → claudeDesktop-BqTW_pbB.js} +0 -0
  448. /package/dist/chunks/{cleanup-DUVwlFl7.js → cleanup-rCLlo4w8.js} +0 -0
  449. /package/dist/chunks/{eventLoopStallDetector-MNrFR4OH.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
  450. /package/dist/chunks/{postCommitAttribution-Br4g4R6h.js → postCommitAttribution-D8MoHFoz.js} +0 -0
  451. /package/dist/chunks/{sdkHeapDumpMonitor-DTHI5WbD.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
  452. /package/dist/chunks/{sessionDataUploader-BgmJTXQr.js → sessionDataUploader-CsNePsOb.js} +0 -0
  453. /package/dist/chunks/{udsClient-B85rNglp.js → udsClient-CBF_cZFW.js} +0 -0
@@ -1,4 +1,4 @@
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-4ZWdjPP4.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-CQF8qhne.js";import{a as W,i as Qe,o as G}from"./xml-BUaEXGXx.js";import{E as $e,T as et,w as tt}from"./sessionTracing-BDN64fWh.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(`
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
2
  `)}function dt(e,t){return[`<${w}>${e}</${w}>`,`<${E}>/${e}</${E}>`,t?`<command-args>${t}</command-args>`:null].filter(Boolean).join(`
3
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
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(`
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{basename as r,join as i,resolve as a}from"path";import{existsSync as o,mkdirSync as s,readFileSync as c,realpathSync as l,writeFileSync as u}from"fs";import{createHash as d}from"crypto";import{execFileSync as f}from"child_process";function p(){return i(t(),`skill-learning`)}function m(){return i(p(),`projects.json`)}function h(e){return e===j?i(p(),`global`):i(p(),`projects`,e)}function g(e){return i(h(e),`project.json`)}function _(e,t){if(F.has(e)&&F.delete(e),F.set(e,t),F.size>N){let e=F.size-P,t=F.keys();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;F.delete(e.value)}}}function v(e=process.cwd()){let t=F.get(e);if(t){F.delete(e),F.set(e,t);let n=Date.now();return n-L>I&&(L=n,S(t)),t}let n=b(e);return _(e,n),S(n),L=Date.now(),n}function y(){let e=C(m());return Object.values(e.projects).sort((e,t)=>e.projectName.localeCompare(t.projectName))}function b(e){let t=process.env.CLAUDE_PROJECT_DIR?.trim();if(t){let n=E(t);return x({source:`claude_project_dir`,scope:`project`,cwd:e,projectRoot:n,identity:`claude-project-dir:${n}`,projectName:r(n)||`project`})}let n=T([`remote`,`get-url`,`origin`],e);if(n){let t=T([`rev-parse`,`--show-toplevel`],e),r=D(n);return x({source:`git_remote`,scope:`project`,cwd:e,projectRoot:E(t||e),gitRemote:r,identity:`git-remote:${r}`,projectName:O(r)})}let i=T([`rev-parse`,`--show-toplevel`],e);if(i){let t=E(i);return x({source:`git_root`,scope:`project`,cwd:e,projectRoot:t,identity:`git-root:${t}`,projectName:r(t)||`project`})}return x({source:`global`,scope:`global`,cwd:e,projectRoot:void 0,identity:`global`,projectName:M})}function x(e){let t=e.scope===`global`?j:k(e.identity);return{projectId:t,projectName:e.projectName,scope:e.scope,source:e.source,cwd:E(e.cwd),projectRoot:e.projectRoot,gitRemote:e.gitRemote,storageDir:h(t)}}function S(e){let t=new Date().toISOString(),n=m(),r=C(n),i=r.projects[e.projectId],a={...e,firstSeenAt:i?.firstSeenAt??t,lastSeenAt:t};r.projects[e.projectId]=a,r.updatedAt=t,s(e.storageDir,{recursive:!0}),s(p(),{recursive:!0}),w(n,r),w(g(e.projectId),a)}function C(e){if(!o(e))return{version:A,updatedAt:new Date(0).toISOString(),projects:{}};try{let t=JSON.parse(c(e,`utf8`));if(t.version===A&&typeof t.projects==`object`&&t.projects)return{version:A,updatedAt:typeof t.updatedAt==`string`?t.updatedAt:new Date(0).toISOString(),projects:t.projects}}catch{}return{version:A,updatedAt:new Date(0).toISOString(),projects:{}}}function w(e,t){u(e,`${JSON.stringify(t,null,2)}\n`,`utf8`)}function T(e,t){try{return f(`git`,[`-C`,t,...e],{encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()||null}catch{return null}}function E(e){let t=a(e);try{return l.native(t).normalize(`NFC`)}catch{return t.normalize(`NFC`)}}function D(e){let t=e.trim().replace(/\\/g,`/`);return t=t.replace(/\.git$/i,``),t=t.replace(/\/+$/g,``),t.toLowerCase()}function O(e){return e.match(/[:/]([^/:]+?)(?:\.git)?$/)?.[1]||`project`}function k(e){return`project-${d(`sha256`).update(e).digest(`hex`).slice(0,16)}`}var A,j,M,N,P,F,I,L,R=e((()=>{n(),A=1,j=`global`,M=`Global`,N=32,P=24,F=new Map,I=300*1e3,L=0}));export{R as a,p as i,h as n,y as o,m as r,v as s,g as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./projectContext-2CzYVggO.js";e();export{o as getProjectContextPath,n as getProjectStorageDir,i as getProjectsRegistryPath,t as getSkillLearningRootDir,r as listKnownProjects,a as resolveProjectContext};
@@ -0,0 +1,227 @@
1
+ import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./memoize-DNnuA2aU.js";import{l as a,s as o,u as s}from"./envUtils-BWeoiL4Y.js";import{n as c,t as l}from"./defineProperty-80gRi2ZW.js";import{Cn as u,Ln as d,Xn as f,wn as p}from"./schemas-BGAvj1T4.js";import{t as ee}from"./v4-f1i_CNUT.js";import{t as te}from"./ajv-B_OpU_Uh.js";import{St as ne,cn as re,n as ie,ut as ae,vn as oe}from"./state-sIHsFpDu.js";import{Bo as se,Dr as ce,Ho as m,Ko as le,Pr as ue,Ro as de,S as fe,Vo as pe,_ as me,v as he,zo as ge}from"./paths-CEAy4QCs.js";import{E as _e,I as ve,K as ye,O as be,U as xe,_ as Se,h as Ce,l as we,p as Te}from"./debug-otxXY3j-.js";import{J as Ee,et as De,o as Oe,s as ke}from"./log-DSV4Ht5l.js";import{i as Ae,o as je}from"./platform-mh9ypxS8.js";import{s as Me,u as Ne}from"./types-KeqFPzY5.js";import{n as Pe,t as Fe}from"./lazySchema-B0QShMaQ.js";import{i as Ie,r as Le,t as Re}from"./cron-DwR6OJuW.js";import{join as ze}from"path";import{join as h,parse as Be,resolve as Ve,sep as He}from"node:path";import{readFileSync as Ue}from"fs";import{createHash as We}from"node:crypto";import{randomUUID as Ge}from"crypto";import{mkdir as Ke,writeFile as qe}from"fs/promises";import{appendFile as Je,mkdir as Ye,readFile as Xe,readdir as Ze,rm as Qe,writeFile as $e}from"node:fs/promises";function et(e){return e.filter(e=>e.data?.type!==`hook_progress`)}function tt(e,t){return e.name===t||(e.aliases?.includes(t)??!1)}function nt(e,t){return e.find(e=>tt(e,t))}function rt(e){return{...at,userFacingName:()=>e.name,...e}}var it,at,ot=e((()=>{it=()=>({mode:`default`,additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!0}),at={isEnabled:()=>!0,isConcurrencySafe:e=>!1,isReadOnly:e=>!1,isDestructive:e=>!1,checkPermissions:(e,t)=>Promise.resolve({behavior:`allow`,updatedInput:e}),toAutoClassifierInput:e=>``,userFacingName:e=>``}})),g,_=e((()=>{g=`Bash`}));function st(){return`A powerful search tool built on ripgrep
2
+
3
+ Usage:
4
+ - ALWAYS use ${v} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${g} command. The ${v} tool has been optimized for correct permissions and access.
5
+ - Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
6
+ - Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
7
+ - Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
8
+ - Use ${m} tool for open-ended searches requiring multiple rounds
9
+ - Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
10
+ - Multiline matching: By default patterns match within single lines only. For cross-line patterns like \`struct \\{[\\s\\S]*?field\`, use \`multiline: true\`
11
+ `}var v,ct=e((()=>{le(),_(),v=`Grep`})),y,lt,ut,dt,ft=e((()=>{y=`Edit`,lt=`/.claude/**`,ut=`~/.claude/**`,dt=`File has been unexpectedly modified. Read it again before attempting to write it.`}));function pt(e){let t=e.trim();if(!t)return null;if(t.endsWith(`-`)){let e=parseInt(t.slice(0,-1),10);return isNaN(e)||e<1?null:{firstPage:e,lastPage:1/0}}let n=t.indexOf(`-`);if(n===-1){let e=parseInt(t,10);return isNaN(e)||e<1?null:{firstPage:e,lastPage:e}}let r=parseInt(t.slice(0,n),10),i=parseInt(t.slice(n+1),10);return isNaN(r)||isNaN(i)||r<1||i<1||i<r?null:{firstPage:r,lastPage:i}}function mt(){return!ce().toLowerCase().includes(`claude-3-haiku`)}function ht(e){let t=e.startsWith(`.`)?e.slice(1):e;return gt.has(t.toLowerCase())}var gt,_t=e((()=>{ue(),gt=new Set([`pdf`])}));function vt(e,t,n){return`Reads a file from the local filesystem. You can access any file directly by using this tool.
12
+ Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
13
+
14
+ Usage:
15
+ - The file_path parameter must be an absolute path, not a relative path
16
+ - By default, it reads up to ${bt} lines starting from the beginning of the file${t}
17
+ ${n}
18
+ ${e}
19
+ - This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.${mt()?`
20
+ - This tool can read PDF files (.pdf). For large PDFs (more than 10 pages), you MUST provide the pages parameter to read specific page ranges (e.g., pages: "1-5"). Reading a large PDF without the pages parameter will fail. Maximum 20 pages per request.`:``}
21
+ - This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
22
+ - This tool can only read files, not directories. To read a directory, use an ls command via the ${g} tool.
23
+ - You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
24
+ - If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`}var b,yt,bt,xt,St,Ct,wt,Tt=e((()=>{_t(),_(),b=`Read`,yt=`File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current — refer to that instead of re-reading.`,bt=2e3,xt=`Read a file from the local filesystem.`,St=`- Results are returned using cat -n format, with line numbers starting at 1`,Ct=`- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters`,wt=`- When you already know which part of the file you need, only read that part. This can be important for larger files.`}));function Et(){return`\n- If this is an existing file, you MUST use the ${b} tool first to read the file's contents. This tool will fail if you did not read the file first.`}function Dt(){return`Writes a file to the local filesystem.
25
+
26
+ Usage:
27
+ - This tool will overwrite the existing file if there is one at the provided path.${Et()}
28
+ - Prefer the Edit tool for modifying existing files \u2014 it only sends the diff. Only use this tool to create new files or for complete rewrites.
29
+ - NEVER create documentation files (*.md) or README files unless explicitly requested by the User.
30
+ - Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`}var x,Ot=e((()=>{Tt(),x=`Write`})),S,kt,At=e((()=>{S=`Glob`,kt=`- Fast file pattern matching tool that works with any codebase size
31
+ - Supports glob patterns like "**/*.js" or "src/**/*.ts"
32
+ - Returns matching file paths sorted by modification time
33
+ - Use this tool when you need to find files by name patterns
34
+ - When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead`})),C,jt=e((()=>{C=`NotebookEdit`}));function Mt(e,t,n){return`
35
+ Web page content:
36
+ ---
37
+ ${e}
38
+ ---
39
+
40
+ ${t}
41
+
42
+ ${n?`Provide a concise response based on the content above. Include relevant details, code examples, and documentation excerpts as needed.`:`Provide a concise response based only on the content above. In your response:
43
+ - Enforce a strict 125-character maximum for quotes from any source document. Open Source Software is ok as long as we respect the license.
44
+ - Use quotation marks for exact language from articles; any language outside of the quotation should never be word-for-word the same.
45
+ - You are not a lawyer and never comment on the legality of your own prompts and responses.
46
+ - Never produce or reproduce exact song lyrics.`}
47
+ `}var w,Nt,Pt=e((()=>{w=`WebFetch`,Nt=`
48
+ - Fetches content from a specified URL and processes it using an AI model
49
+ - Takes a URL and a prompt as input
50
+ - Fetches the URL content, converts HTML to markdown
51
+ - Processes the content with the prompt using a small, fast model
52
+ - Returns the model's response about the content
53
+ - Use this tool when you need to retrieve and analyze web content
54
+
55
+ Usage notes:
56
+ - IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
57
+ - The URL must be a fully-formed valid URL
58
+ - HTTP URLs will be automatically upgraded to HTTPS
59
+ - The prompt should describe what information you want to extract from the page
60
+ - This tool is read-only and does not modify any files
61
+ - Results may be summarized if the content is very large
62
+ - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
63
+ - When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
64
+ - For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
65
+ `})),T,E,Ft=e((()=>{T=`ExitPlanMode`,E=`ExitPlanMode`})),D,It=e((()=>{D=`EnterPlanMode`})),O,Lt,Rt,zt,Bt=e((()=>{Ft(),O=`AskUserQuestion`,Lt=`Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.`,Rt={markdown:`
66
+ Preview feature:
67
+ Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
68
+ - ASCII mockups of UI layouts or components
69
+ - Code snippets showing different implementations
70
+ - Diagram variations
71
+ - Configuration examples
72
+
73
+ Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
74
+ `,html:`
75
+ Preview feature:
76
+ Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
77
+ - HTML mockups of UI layouts or components
78
+ - Formatted code snippets showing different implementations
79
+ - Visual comparisons or diagrams
80
+
81
+ Preview content must be a self-contained HTML fragment (no <html>/<body> wrapper, no <script> or <style> tags — use inline style attributes instead). Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
82
+ `},zt=`Use this tool when you need to ask the user questions during execution. This allows you to:
83
+ 1. Gather user preferences or requirements
84
+ 2. Clarify ambiguous instructions
85
+ 3. Get decisions on implementation choices as you work
86
+ 4. Offer choices to the user about what direction to take.
87
+
88
+ Usage notes:
89
+ - Users will always be able to select "Other" to provide custom text input
90
+ - Use multiSelect: true to allow multiple answers to be selected for a question
91
+ - If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
92
+
93
+ Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${T} for plan approval. IMPORTANT: Do not reference "the plan" in your questions (e.g., "Do you have feedback about the plan?", "Does the plan look good?") because the user cannot see the plan in the UI until you call ${T}. If you need plan approval, use ${T} instead.
94
+ `}));function Vt(){if(process.env.CLAUDE_CODE_OVERRIDE_DATE)return process.env.CLAUDE_CODE_OVERRIDE_DATE;let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function Ht(){return(process.env.CLAUDE_CODE_OVERRIDE_DATE?new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE):new Date).toLocaleString(`en-US`,{month:`long`,year:`numeric`})}var Ut,Wt=e((()=>{i(),Ut=r(Vt)}));function Gt(){return`
95
+ - Allows Claude to search the web and use the results to inform responses
96
+ - Provides up-to-date information for current events and recent data
97
+ - Returns search result information formatted as search result blocks, including links as markdown hyperlinks
98
+ - Use this tool for accessing information beyond Claude's knowledge cutoff
99
+ - Searches are performed automatically within a single API call
100
+
101
+ CRITICAL REQUIREMENT - You MUST follow this:
102
+ - After answering the user's question, you MUST include a "Sources:" section at the end of your response
103
+ - In the Sources section, list all relevant URLs from the search results as markdown hyperlinks: [Title](URL)
104
+ - This is MANDATORY - never skip including sources in your response
105
+ - Example format:
106
+
107
+ [Your answer here]
108
+
109
+ Sources:
110
+ - [Source Title 1](https://example.com/1)
111
+ - [Source Title 2](https://example.com/2)
112
+
113
+ Usage notes:
114
+ - Domain filtering is supported to include or block specific websites
115
+ - Web search is only available in the US
116
+
117
+ IMPORTANT - Use the correct year in search queries:
118
+ - The current month is ${Ht()}. You MUST use this year when searching for recent information, documentation, or current events.
119
+ - Example: If the user asks for "latest React docs", search for "React documentation" with the current year, NOT last year
120
+ `}var k,Kt=e((()=>{Wt(),k=`WebSearch`})),A,qt=e((()=>{A=`TodoWrite`})),Jt,Yt=e((()=>{Jt=`PowerShell`}));function Xt(){return Ae()===`windows`?process.env.USER_TYPE===`ant`?!a(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL):s(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL):!1}var j,Zt=e((()=>{_(),Yt(),o(),je(),j=[g,Jt]})),M,Qt=e((()=>{M=`Skill`})),N,$t=e((()=>{N=`SendMessage`})),P,en=e((()=>{P=`TaskCreate`})),F,tn=e((()=>{F=`TaskGet`})),I,nn=e((()=>{I=`TaskList`})),L,rn=e((()=>{L=`TaskUpdate`})),R,an=e((()=>{R=`SearchExtraTools`}));function on(e){return e.isNonInteractiveSession}function sn(e){let t=pn.get(e);if(t)return t;let n=cn(e);return pn.set(e,n),n}function cn(e){try{let t=new ln.Ajv({allErrors:!0});if(!t.validateSchema(e))return{error:t.errorsText(t.errors)};let n=t.compile(e);return{tool:{...fn,inputJSONSchema:e,async call(e){if(!n(e)){let e=n.errors?.map(e=>`${e.instancePath||`root`}: ${e.message}`).join(`, `);throw new ve(`Output does not match required schema: ${e}`,`StructuredOutput schema mismatch: ${(e??``).slice(0,150)}`)}return{data:`Structured output provided successfully`,structured_output:e}}}}}catch(e){return{error:e instanceof Error?e.message:String(e)}}}var ln,un,dn,z,fn,pn,mn=e((()=>{ln=t(te(),1),ee(),ot(),xe(),Fe(),_e(),un=Pe(()=>p({}).passthrough()),dn=Pe(()=>d().describe(`Structured output tool result`)),z=`StructuredOutput`,fn=rt({isMcp:!1,isEnabled(){return!0},isConcurrencySafe(){return!0},isReadOnly(){return!0},isOpenWorld(){return!1},name:z,searchHint:`return the final response as structured JSON`,maxResultSizeChars:1e5,async description(){return`Return structured output in the requested format`},async prompt(){return`Use this tool to return your final response in the requested structured format. You MUST call this tool exactly once at the end of your response to provide the structured output.`},get inputSchema(){return un()},get outputSchema(){return dn()},async call(e){return{data:`Structured output provided successfully`,structured_output:e}},async checkPermissions(e){return{behavior:`allow`,updatedInput:e}},renderToolUseMessage(e){let t=Object.keys(e);return t.length===0?null:t.length<=3?t.map(t=>`${t}: ${be(e[t])}`).join(`, `):`${t.length} fields: ${t.slice(0,3).join(`, `)}…`},renderToolUseRejectedMessage(){return`Structured output rejected`},renderToolUseErrorMessage(){return`Structured output error`},renderToolUseProgressMessage(){return null},renderToolResultMessage(e){return e},mapToolResultToToolResultBlockParam(e,t){return{tool_use_id:t,type:`tool_result`,content:e}}}),pn=new WeakMap})),hn,gn,_n,vn=e((()=>{De(),hn=`Sleep`,gn=`Wait for a specified duration`,_n=`Wait for a specified duration. The user can interrupt the sleep at any time.
121
+
122
+ Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something.
123
+
124
+ You may receive <${Ee}> prompts — these are periodic check-ins. Look for useful work to do before sleeping.
125
+
126
+ You can call this concurrently with other tools — it won't interfere with them.
127
+
128
+ Prefer this over \`Bash(sleep ...)\` — it doesn't hold a shell process.
129
+
130
+ Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity — balance accordingly.`})),yn,bn=e((()=>{yn=`Interact with Language Server Protocol (LSP) servers to get code intelligence features.
131
+
132
+ Supported operations:
133
+ - goToDefinition: Find where a symbol is defined
134
+ - findReferences: Find all references to a symbol
135
+ - hover: Get hover information (documentation, type info) for a symbol
136
+ - documentSymbol: Get all symbols (functions, classes, variables) in a document
137
+ - workspaceSymbol: Search for symbols across the entire workspace
138
+ - goToImplementation: Find implementations of an interface or abstract method
139
+ - prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
140
+ - incomingCalls: Find all functions/methods that call the function at a position
141
+ - outgoingCalls: Find all functions/methods called by the function at a position
142
+
143
+ All operations require:
144
+ - filePath: The file to operate on
145
+ - line: The line number (1-based, as shown in editors)
146
+ - character: The character offset (1-based, as shown in editors)
147
+
148
+ Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.`})),xn=n({VERIFY_PLAN_EXECUTION_TOOL_NAME:()=>B}),B,Sn=e((()=>{B=`VerifyPlanExecution`})),Cn,wn=e((()=>{Cn=`ExecuteExtraTool`})),Tn,En=e((()=>{Tn=`EnterWorktree`})),Dn,On=e((()=>{Dn=`ExitWorktree`})),kn=e((()=>{})),V,H,An,jn,Mn,Nn,U=e((()=>{V=`Workflow`,H=`.claude/workflows`,An=`.claude/workflow-runs`,jn=[`.ts`,`.js`,`.mjs`],Mn=1e3,Nn=4096}));function Pn(e){return{[Ln]:e}}function Fn(e){return typeof e==`object`&&!!e&&Ln in e}function In(e){return e[Ln]}var Ln,Rn=e((()=>{Ln=Symbol(`workflow.hostHandle`)}));function zn(e,t){return e.kind===`agentType`?t.agentType===e.agentType:e.kind===`model`?typeof t.model==`string`&&t.model.startsWith(e.pattern):e.match(t)}var Bn,Vn,Hn=e((()=>{c(),Bn=class extends Error{constructor(e){super(e),this.name=`AdapterNotFoundError`}},Vn=class{constructor(){l(this,`adapters`,new Map),l(this,`rules`,[]),l(this,`defaultId`,null)}register(e){return this.adapters.set(e.id,e),this}default(e){return this.defaultId=e,this}route(e){return this.rules.push(e),this}has(e){return this.adapters.has(e)}get(e){return this.adapters.get(e)}resolve(e){for(let t of this.rules)if(zn(t,e)){let e=this.adapters.get(t.adapter);if(e)return e}if(this.defaultId){let e=this.adapters.get(this.defaultId);if(e)return e}throw new Bn(`No adapter matched (rules=${this.rules.length}, default=${this.defaultId??`none`})`)}async initializeAll(){for(let e of this.adapters.values())await e.initialize?.()}async disposeAll(){for(let e of this.adapters.values())await e.dispose?.()}}}));function Un(){return 3}function Wn(e){return e===void 0||Number.isNaN(e)?3:Math.max(1,Math.min(Math.trunc(e),16))}var Gn,Kn=e((()=>{U(),c(),Gn=class{constructor(e){l(this,`available`,void 0),l(this,`waiters`,[]),this.available=Math.max(1,Math.floor(e))}async acquire(e){if(e?.aborted)throw Error(`Semaphore.acquire aborted (signal already aborted)`);return this.available>0?(--this.available,()=>this.release()):new Promise((t,n)=>{let r=()=>{let e=this.waiters.indexOf(i);e>=0&&this.waiters.splice(e,1),n(Error(`Semaphore.acquire aborted`))},i={wake:()=>{e?.removeEventListener(`abort`,r),t(()=>this.release())},cleanup:()=>e?.removeEventListener(`abort`,r)};e?.addEventListener(`abort`,r,{once:!0}),this.waiters.push(i)})}release(){let e=this.waiters.shift();e?e.wake():this.available+=1}}}));function qn(e){let t=Qn.exec(e);if(!t)return{meta:null,body:e};let n=t.index+t[0].length;for(;n<e.length&&/\s/.test(e[n]);)n++;if(e[n]!==`{`)throw new G("meta must be an object literal `{ ... }`");let r=0,i=n,a=null;for(;n<e.length;n++){let t=e[n];if(a){if(t===`\\`){n++;continue}t===a&&(a=null);continue}if(t===`"`||t===`'`||t==="`"){a=t;continue}if(t===`{`)r++;else if(t===`}`&&(r--,r===0)){n++;break}}if(r!==0)throw new G(`meta literal braces are not closed`);let o=e.slice(i,n),s;try{s=Function(`return (${o})`)()}catch(e){throw new G(`meta must be a plain literal (no variable/function calls/interpolation): ${e.message}`)}return{meta:Jn(s),body:e.slice(0,t.index)+e.slice(n).replace(/^[ \t]*;[ \t]*\n/,`
149
+ `)}}function Jn(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new G(`meta must be an object`);let t=e;if(typeof t.name!=`string`||typeof t.description!=`string`)throw new G(`meta must include string name and description`);return t}function Yn(){let e=function(...e){if(e.length===0)throw new $n(`Date.now()/new Date()`);return new Date(...e)};return e.now=()=>{throw new $n(`Date.now()`)},e.parse=Date.parse,e.UTC=Date.UTC,e}function Xn(){return new Proxy(Math,{get(e,t,n){return t===`random`?()=>{throw new $n(`Math.random()`)}:Reflect.get(e,t,n)}})}function Zn(e){if(/^\s*import\b/m.test(e))throw new G(`workflow scripts are the body of new AsyncFunction (not ESM modules); import is not supported. agent / parallel / pipeline / phase / log / workflow / args / budget are injected as parameters — use them directly.`);if(/\bimport\s*\(/m.test(e))throw new G(`dynamic import(...) is forbidden in workflow scripts: it bypasses the Date/Math sandbox and breaks resume determinism. The sandbox does not guarantee security (same trust level as the LLM), but explicit escapes are prohibited. Inject external dependencies via args.`);if(/^\s*export\b/m.test(e))throw new G(`workflow scripts allow only one export const meta = {...} (already extracted by the engine). Remove other export / export default statements; use top-level return for the result.`)}function W(e){let{meta:t,body:n}=qn(e);Zn(n);let r;try{r=new er(`agent`,`parallel`,`pipeline`,`phase`,`log`,`workflow`,`args`,`budget`,`Date`,`Math`,n)}catch(e){throw new G(`Script syntax error: ${e.message}`)}let i=Yn(),a=Xn();return{meta:t,async execute(e,t,n){return r(e.agent,e.parallel,e.pipeline,e.phase,e.log,e.workflow,t,n,i,a)}}}var G,Qn,$n,er,tr=e((()=>{G=class extends Error{constructor(e){super(e),this.name=`ScriptError`}},Qn=/export\s+const\s+meta\s*=\s*/,$n=class extends Error{constructor(e){super(`${e} is not available in workflow scripts (would break resume determinism). Pass timestamps/random seeds via args.`),this.name=`NonDeterministicError`}},er=Object.getPrototypeOf(async function(){}).constructor}));function nr(e){let{label:t,phase:n,...r}=e,i=Object.keys(r).sort(),a={};for(let e of i)a[e]=r[e];return JSON.stringify(a)}function rr(e,t){return We(`sha256`).update(e+`
150
+ `+nr(t)).digest(`hex`)}function ir(e){let t=t=>h(e,t,`journal.jsonl`);return{async read(e){try{return(await Xe(t(e),`utf-8`)).split(`
151
+ `).filter(e=>e.trim().length>0).map(e=>JSON.parse(e)).sort((e,t)=>(e.seq??0)-(t.seq??0))}catch{return[]}},async append(n,r){await Ye(h(e,n),{recursive:!0}),await Je(t(n),JSON.stringify(r)+`
152
+ `,`utf-8`)},async truncate(t){await Qe(h(e,t),{recursive:!0,force:!0})}}}var ar=e((()=>{})),or,sr,cr=e((()=>{c(),or=class extends Error{constructor(){super(`workflow token budget exhausted (budget.total reached the cap)`),this.name=`BudgetExhaustedError`}},sr=class{constructor(e){l(this,`spentTokens`,0),this.total=e}spent(){return this.spentTokens}remaining(){return this.total==null?1/0:Math.max(0,this.total-this.spentTokens)}addOutputTokens(e){e>0&&(this.spentTokens+=e)}assertCanSpend(){if(this.total!=null&&this.spentTokens>=this.total)throw new or}}}));function lr(e,t){let n=dr.get(t);n||(n=new ur.Ajv({allErrors:!0,strict:!1}).compile(t),dr.set(t,n));let r=n(e);return{valid:r,errors:r?[]:(n.errors??[]).map(e=>e.message??`validation error`)}}var ur,dr,fr=e((()=>{ur=t(te(),1),dr=new WeakMap}));function pr(e,t){let n=Ve(e),r=Ve(n,t);return r===n?!0:r.startsWith(n+He)}function mr(e){return typeof e!=`string`||e.length===0||e.includes(`/`)||e.includes(`\\`)||e.includes(`\0`)||e===`.`||e===`..`?null:e}var hr=e((()=>{}));function gr(e){return jn.includes(e.toLowerCase())}async function _r(e,t){for(let n of jn){let r=Ve(e,t+n);if(!pr(e,r))return null;try{return{path:r,content:await Xe(r,`utf-8`)}}catch{}}return null}async function vr(e){let t;try{t=await Ze(e)}catch{return[]}return t.filter(e=>gr(Be(e).ext)).map(e=>Be(e).name).sort()}var yr=e((()=>{U(),hr()})),K,q,br=e((()=>{K=class extends Error{constructor(e){super(e),this.name=`WorkflowError`}},q=class extends Error{constructor(){super(`workflow has been aborted`),this.name=`WorkflowAbortedError`}}}));function xr(e,t){return{semaphore:new Gn(Wn(t)),budget:new sr(e),agentCountBox:{value:0},agentIdSeq:{value:0},depth:0}}function Sr(e){let t=xr(e.budgetTotal,e.maxConcurrency);return{ports:e.ports,host:e.host,signal:e.signal,runId:e.runId,workflowName:e.workflowName,cwd:e.cwd,resources:t,journal:e.journal?[...e.journal]:[],journalIndex:0,journalInvalidated:!1,currentPhase:null}}var Cr=e((()=>{cr(),Kn()}));function wr(e,t){let n=t=>{e.ports.progressEmitter.emit({runId:e.runId,...t})};return{agent:async(t,r={})=>{let i=e.resources;if(i.agentCountBox.value>=1e3)throw new K(`workflow exceeds total agent cap (${Mn})`);let a=i.agentIdSeq.value++,o={prompt:t,...r},s=rr(t,o),c=r.label,l=r.phase??e.currentPhase??void 0;if(!e.journalInvalidated&&e.journalIndex<e.journal.length){let t=e.journal[e.journalIndex];if(t.key===s)return e.journalIndex++,n({type:`agent_done`,agentId:a,label:c,phase:l,result:t.result}),Tr(t.result);e.journalInvalidated=!0,e.journal=e.journal.slice(0,e.journalIndex),await e.ports.journalStore.truncate(e.runId)}let u;try{u=await e.resources.semaphore.acquire(e.signal)}catch{throw new q}try{if(e.signal.aborted)throw new q;if(i.budget.assertCanSpend(),e.ports.taskRegistrar.pendingAction(e.runId)?.kind===`skip`)return n({type:`agent_done`,agentId:a,label:c,phase:l,result:{kind:`skipped`}}),null;e.resources.agentCountBox.value++,n({type:`agent_started`,agentId:a,label:c,phase:l});let t=e.ports.agentAdapterRegistry,r=t?{host:e.host,signal:e.signal,runId:e.runId,agentId:a,onProgress:e=>{n({type:`agent_progress`,agentId:a,label:c,phase:l,...e})},...e.ports.taskRegistrar.registerAgentAbort?{registerAgentAbort:(t,n)=>{e.ports.taskRegistrar.registerAgentAbort?.(e.runId,t,n)}}:{},...e.ports.taskRegistrar.unregisterAgentAbort?{unregisterAgentAbort:t=>{e.ports.taskRegistrar.unregisterAgentAbort?.(e.runId,t)}}:{}}:null,u=t?t.resolve(o):null,d=()=>u?u.run(o,r):e.ports.agentRunner.runAgentToResult(o,e.host),f;try{if(f=await d(),f.kind===`dead`){let t=typeof f.detail==`string`?f.detail:``;e.ports.logger.warn?.(`agent "${c??`#${a}`}" returned dead`+(f.reason?` (${f.reason})`:``)+(t?`: ${t.slice(0,150)}`:``)+`; retrying once`),f=await d()}}catch(t){if(t instanceof q)throw t;let n=t instanceof Error?t.message:String(t);e.ports.logger.warn?.(`agent "${c??`#${a}`}" threw (${n}); retrying once`);try{f=await d()}catch(e){if(e instanceof q)throw e;f={kind:`dead`,reason:`runagent-threw`,detail:e instanceof Error?e.message:String(e)}}}f.kind===`ok`&&e.resources.budget.addOutputTokens(f.usage.outputTokens),n({type:`agent_done`,agentId:a,label:c,phase:l,result:f});let p={key:s,seq:a,result:f};return e.journal.push(p),e.journalIndex++,await e.ports.journalStore.append(e.runId,p),Tr(f)}finally{u()}},parallel:async t=>{if(t.length>4096)throw new K(`parallel exceeds the per-call items cap (${Nn})`);return Promise.all(t.map(async(t,n)=>{try{return await t()}catch(t){return e.ports.logger.warn?.(`parallel thunk #${n} failed: ${t.message}`),null}}))},pipeline:async(t,...n)=>{if(t.length>4096)throw new K(`pipeline exceeds the per-call items cap (${Nn})`);return Promise.all(t.map(async(t,r)=>{try{let e=t;for(let i of n)e=await i(e,t,r);return e}catch(t){return e.ports.logger.warn?.(`pipeline item #${r} failed: ${t.message}`),null}}))},phase:t=>{e.currentPhase&&n({type:`phase_done`,phase:e.currentPhase}),e.currentPhase=t,n({type:`phase_started`,phase:t})},log:e=>{n({type:`log`,message:e})},workflow:async(n,r)=>{if(e.resources.depth>=1)throw new K(`workflow() nesting allows only one level`);return t({...typeof n==`string`?{name:n}:{scriptPath:n.scriptPath},args:r})}}}function Tr(e){return e.kind===`ok`?e.output:null}var Er=e((()=>{U(),br(),ar()}));async function Dr(e){let{ports:t}=e,n;try{n=W(e.script)}catch(n){let r=n.message;return t.progressEmitter.emit({type:`run_done`,runId:e.runId,status:`failed`,error:r}),{status:`failed`,error:r}}let r=e.workflowName??n.meta?.name??`workflow`,i=[],a=!1;e.resume&&!e.scriptChanged?i=await t.journalStore.read(e.runId):e.scriptChanged&&(await t.journalStore.truncate(e.runId),a=!0);let o=Sr({ports:t,host:e.host,signal:e.signal,runId:e.runId,workflowName:r,cwd:e.cwd,budgetTotal:e.budgetTotal,maxConcurrency:e.maxConcurrency,journal:i});a&&(o.journalInvalidated=!0),t.progressEmitter.emit({type:`run_started`,runId:e.runId,workflowName:r,meta:n.meta});let s=async t=>{let n=await Or(t,e.cwd),r;try{r=W(n)}catch(e){throw new K(`Sub-workflow script error: ${e.message}`)}let i=o.resources.depth;o.resources.depth+=1;try{let e=wr(o,s);return await r.execute(e,t.args,o.resources.budget)}finally{o.resources.depth=i}},c=wr(o,s),l=()=>{o.currentPhase&&t.progressEmitter.emit({type:`phase_done`,runId:e.runId,phase:o.currentPhase})},u;try{u={status:`completed`,returnValue:await n.execute(c,e.args,o.resources.budget)}}catch(e){u=e instanceof q?{status:`killed`}:{status:`failed`,error:e.message}}return l(),t.progressEmitter.emit({type:`run_done`,runId:e.runId,...u}),u}async function Or(e,t){if(e.script)return e.script;if(e.scriptPath)return await Xe(e.scriptPath,`utf-8`);if(e.name){let n=await _r(h(t,H),e.name);if(!n)throw new K(`Sub-workflow "${e.name}" not found`);return n.content}throw new K(`workflow() requires name or scriptPath`)}var kr=e((()=>{U(),Cr(),br(),Er(),yr(),tr()}));function Ar(e){return{emit:e}}function jr(){let e=[];return{emitter:{emit:t=>void e.push(t)},events:e}}var Mr=e((()=>{})),Nr,Pr=e((()=>{ee(),Nr=p({script:d().optional().describe(`Self-contained workflow script source (inline)`),name:d().optional().describe(`Named workflow, resolved to .claude/workflows/<name>.ts|js|mjs`),scriptPath:d().optional().describe(`Absolute path to an existing script file`),args:f().optional().describe(`The args global variable passed through to the script. Pass a real JSON value (object/array/string), not a JSON string.`),resumeFromRunId:d().optional().describe(`Resume the specified run, replaying the journal`),description:d().optional().describe(`A short description of this invocation (3-5 words)`),title:d().optional().describe(`Progress viewer title`),maxConcurrency:u().int().min(1).max(16).optional().describe(`Concurrency cap for agent(). Defaults to 3 (max 16). When the workflow contains heavy parallel/pipeline fan-out, you may confirm the desired concurrency with the user via AskUserQuestion before launching.`)})}));async function Fr(e,t,n){let r=h(n,An,t);await Ye(r,{recursive:!0});let i=h(r,`script.js`);return await $e(i,e,`utf-8`),i}var Ir=e((()=>{U()}));function Lr(e){return{name:V,inputSchema:Nr,isEnabled:()=>!0,isReadOnly:()=>!1,async description(){return`Execute a workflow script that orchestrates multiple subagents to complete a task`},async prompt(){return Hr},renderToolUseMessage(e){return e.resumeFromRunId?`Workflow resume: ${e.resumeFromRunId}`:`Workflow: ${e.name??e.scriptPath??(e.script?`inline`:`unknown`)}`},async call(t,n,r,i){let a=e.hostFactory({context:n,canUseTool:r,parentMessage:i}),o,s;try{let e=await Vr(t,a.cwd);o=e.script,s=e.workflowFile}catch(e){return{data:{output:`Error: ${e.message}`}}}try{W(o)}catch(e){return{data:{output:`Error: script validation failed: ${e.message}`}}}let c=t.name??t.title??`workflow`,{runId:l,signal:u}=e.taskRegistrar.register({workflowName:c,...s?{workflowFile:s}:{},...t.description?{summary:t.description}:{},...a.toolUseId?{toolUseId:a.toolUseId}:{},...t.resumeFromRunId?{runId:t.resumeFromRunId}:{}},a.handle);if(!s&&t.script)try{s=await Fr(t.script,l,a.cwd)}catch(t){e.logger.warn?.(`inline script persist failed: ${t.message}`)}Dr({script:o,...t.args===void 0?{}:{args:Br(t.args)},runId:l,workflowName:c,ports:e,host:a.handle,signal:u,cwd:a.cwd,budgetTotal:a.budgetTotal,...t.maxConcurrency===void 0?{}:{maxConcurrency:t.maxConcurrency},...t.resumeFromRunId?{resume:!0}:{}}).then(t=>Rr(e,t,l)).catch(t=>e.taskRegistrar.fail(l,t.message));let d=s??`<inline run ${l}>`;return{data:{output:[`Workflow started (running in the background).`,`run_id: ${l}`,`workflow: ${c}`,`script: ${d}`,``,`You will be notified on completion. Use /workflows to view live progress.`].join(`
153
+ `)}}},mapToolResultToToolResultBlockParam(e,t){return{tool_use_id:t,type:`tool_result`,content:[{type:`text`,text:e.output}]}}}}function Rr(e,t,n){if(t.status===`completed`){let r=t.returnValue==null?`(no return value)`:zr(t.returnValue);e.taskRegistrar.complete(n,r)}else t.status===`failed`?e.taskRegistrar.fail(n,t.error??`workflow failed`):e.taskRegistrar.kill(n)}function zr(e){if(typeof e==`string`)return e.slice(0,500);try{return JSON.stringify(e).slice(0,500)}catch{return String(e)}}function Br(e){if(typeof e!=`string`)return e;try{let t=JSON.parse(e);return typeof t==`object`&&t?t:e}catch{return e}}async function Vr(e,t){if(e.script)return{script:e.script};if(e.scriptPath){let n=Ve(t,e.scriptPath);if(!pr(t,n))throw Error(`scriptPath "${e.scriptPath}" is out of bounds (after resolve, ${n} is not within cwd ${t})`);return{script:await Xe(n,`utf-8`),workflowFile:n}}if(e.name){if(mr(e.name)===null)throw Error(`Named workflow name "${e.name}" is invalid (contains path separators or is . / ..)`);let n=await _r(h(t,H),e.name);if(!n)throw Error(`Named workflow "${e.name}" not found (looked in ${H}/)`);return{script:n.content,workflowFile:n.path}}throw Error(`One of script, name, or scriptPath must be provided`)}var Hr,Ur=e((()=>{U(),yr(),kr(),tr(),hr(),Pr(),Ir(),Hr='Use the Workflow tool to execute a workflow script that orchestrates multiple subagents deterministically. The script runs in the background; you receive a run_id immediately and are notified on completion.\n\nProvide the script inline via "script", or reference a named workflow via "name" (resolved from .claude/workflows/), or an existing file via "scriptPath". Pass "args" as a real JSON value (object/array/string), not a stringified string.\n\nUse "resumeFromRunId" to resume a prior run — completed agent() calls replay from the journal instantly.\n\nConcurrency: default is 3 (hard ceiling 16). OMIT maxConcurrency to use 3. To set maxConcurrency to ANY value other than 3, you MUST first ask the user via AskUserQuestion — propose 3 / 6 / 9 (or other tiers matching the fan-out width) with 3 marked "(Recommended)". The ONLY exception: the user has ALREADY specified a concurrency number in this session ("use 6", "maxConcurrency 9") — then honor it without re-asking. Never silently raise concurrency above 3 just because the workflow fans out; 3 is the recommended default.\n\nScript execution model (common pitfalls — getting these wrong is the #1 cause of script errors): the script is the body of `new AsyncFunction` — NOT an ESM module, and TypeScript is NOT transpiled. Therefore:\n- Do NOT use `import` — `agent`, `parallel`, `pipeline`, `phase`, `log`, `workflow`, `args`, and `budget` are injected as parameters; reference them directly.\n- Do NOT use TS type annotations, `interface`, `enum`, `as`, or generics — the engine does not transpile, so even a .ts file with type syntax fails to parse.\n- Keep EXACTLY ONE `export const meta = {...}` (plain literal) and remove every other `export` / `export default`.\n- Return the result with a top-level `return`.\nPrefer .js / .mjs. See /ultracode for the full playbook and quality patterns.'})),Wr=n({AdapterNotFoundError:()=>Bn,AgentAdapterRegistry:()=>Vn,Budget:()=>sr,BudgetExhaustedError:()=>or,DEFAULT_MAX_CONCURRENCY:()=>3,MAX_CONCURRENCY_CAP:()=>16,MAX_ITEMS_PER_CALL:()=>Nn,MAX_TOTAL_AGENTS:()=>Mn,ScriptError:()=>G,Semaphore:()=>Gn,WORKFLOW_DIR_NAME:()=>H,WORKFLOW_RUNS_DIR:()=>An,WORKFLOW_SCRIPT_EXTENSIONS:()=>jn,WORKFLOW_TOOL_NAME:()=>V,WorkflowAbortedError:()=>q,WorkflowError:()=>K,agentCallKey:()=>rr,clampMaxConcurrency:()=>Wn,createBufferingEmitter:()=>jr,createEngineContext:()=>Sr,createFileJournalStore:()=>ir,createHostHandle:()=>Pn,createProgressEmitter:()=>Ar,createSharedResources:()=>xr,createWorkflowTool:()=>Lr,extractMeta:()=>qn,isHostHandle:()=>Fn,listNamedWorkflows:()=>vr,makeHooks:()=>wr,maxConcurrency:()=>Un,parseScript:()=>W,persistInlineScript:()=>Fr,resolveNamedWorkflow:()=>_r,runWorkflow:()=>Dr,unwrapHostHandle:()=>In,validateAgainstSchema:()=>lr,workflowInputSchema:()=>Nr}),Gr=e((()=>{kn(),U(),Rn(),Hn(),Kn(),tr(),ar(),cr(),fr(),yr(),br(),Cr(),Er(),kr(),Mr(),Ur(),Pr(),Ir()}));function Kr(e){return ze(e??ae(),ri)}async function J(e){let t=Ce(),n;try{n=await t.readFile(Kr(e),{encoding:`utf-8`})}catch(e){return ye(e)||ke(e),[]}let r=Ne(n,!1);if(!r||typeof r!=`object`)return[];let i=r;if(!Array.isArray(i.tasks))return[];let a=[];for(let e of i.tasks){if(!e||typeof e.id!=`string`||typeof e.cron!=`string`||typeof e.prompt!=`string`||typeof e.createdAt!=`number`){Te(`[ScheduledTasks] skipping malformed task: ${be(e)}`);continue}if(!Ie(e.cron)){Te(`[ScheduledTasks] skipping task ${e.id} with invalid cron '${e.cron}'`);continue}a.push({id:e.id,cron:e.cron,prompt:e.prompt,createdAt:e.createdAt,...typeof e.lastFiredAt==`number`?{lastFiredAt:e.lastFiredAt}:{},...e.recurring?{recurring:!0}:{},...e.permanent?{permanent:!0}:{}})}return a}function qr(e){let t;try{t=Ue(Kr(e),`utf-8`)}catch{return!1}let n=Ne(t,!1);if(!n||typeof n!=`object`)return!1;let r=n.tasks;return Array.isArray(r)&&r.length>0}async function Jr(e,t){let n=t??ae();await Ke(ze(n,`.claude`),{recursive:!0});let r={tasks:e.map(({durable:e,...t})=>t)};await qe(Kr(n),be(r,null,2)+`
154
+ `,`utf-8`)}async function Yr(e,t,n,r,i){let a=Ge().slice(0,8),o={id:a,cron:e,prompt:t,createdAt:Date.now(),...n?{recurring:!0}:{}};if(!r)return ie({...o,...i?{agentId:i}:{}}),a;let s=await J();return s.push(o),await Jr(s),a}async function Xr(e,t){if(e.length===0||t===void 0&&oe(e)===e.length)return;let n=new Set(e),r=await J(t),i=r.filter(e=>!n.has(e.id));i.length!==r.length&&await Jr(i,t)}async function Zr(e,t,n){if(e.length===0)return;let r=new Set(e),i=await J(n),a=!1;for(let e of i)r.has(e.id)&&(e.lastFiredAt=t,a=!0);a&&await Jr(i,n)}async function Qr(e){let t=await J(e);if(e!==void 0)return t;let n=ne().map(e=>({...e,durable:!1}));return[...t,...n]}function Y(e,t){let n=Ie(e);if(!n)return null;let r=Re(n,new Date(t));return r?r.getTime():null}function $r(e){let t=parseInt(e.slice(0,8),16)/4294967296;return Number.isFinite(t)?t:0}function ei(e,t,n,r=X){let i=Y(e,t);if(i===null)return null;let a=Y(e,i);return a===null?i:i+Math.min($r(n)*r.recurringFrac*(a-i),r.recurringCapMs)}function ti(e,t,n,r=X){let i=Y(e,t);if(i===null)return null;if(new Date(i).getMinutes()%r.oneShotMinuteMod!==0)return i;let a=r.oneShotFloorMs+$r(n)*(r.oneShotMaxMs-r.oneShotFloorMs);return Math.max(i-a,t)}function ni(e,t){return e.filter(e=>{let n=Y(e.cron,e.createdAt);return n!==null&&n<t})}var ri,X,ii=e((()=>{re(),Le(),we(),xe(),Se(),Me(),Oe(),_e(),ri=ze(`.claude`,`scheduled_tasks.json`),X={recurringFrac:.1,recurringCapMs:900*1e3,oneShotMaxMs:90*1e3,oneShotFloorMs:0,oneShotMinuteMod:30,recurringMaxAgeMs:10080*60*1e3}})),ai=n({CRON_CREATE_TOOL_NAME:()=>Q,CRON_DELETE_DESCRIPTION:()=>mi,CRON_DELETE_TOOL_NAME:()=>$,CRON_LIST_DESCRIPTION:()=>hi,CRON_LIST_TOOL_NAME:()=>pi,DEFAULT_MAX_AGE_DAYS:()=>Z,buildCronCreateDescription:()=>ci,buildCronCreatePrompt:()=>li,buildCronDeletePrompt:()=>ui,buildCronListPrompt:()=>di,isDurableCronEnabled:()=>si,isKairosCronEnabled:()=>oi});function oi(){return!s(process.env.CLAUDE_CODE_DISABLE_CRON)}function si(){return he(`tengu_kairos_cron_durable`,!0,fi)}function ci(e){return e?`Schedule a prompt to run at a future time — either recurring on a cron schedule, or once at a specific time. Pass durable: true to persist to .claude/scheduled_tasks.json; otherwise session-only.`:`Schedule a prompt to run at a future time within this Claude session — either recurring on a cron schedule, or once at a specific time.`}function li(e){return`Schedule a prompt to be enqueued at a future time. Use for both recurring schedules and one-shot reminders.
155
+
156
+ Uses standard 5-field cron in the user's local timezone: minute hour day-of-month month day-of-week. "0 9 * * *" means 9am local — no timezone conversion needed.
157
+
158
+ ## One-shot tasks (recurring: false)
159
+
160
+ For "remind me at X" or "at <time>, do Y" requests — fire once then auto-delete.
161
+ Pin minute/hour/day-of-month/month to specific values:
162
+ "remind me at 2:30pm today to check the deploy" → cron: "30 14 <today_dom> <today_month> *", recurring: false
163
+ "tomorrow morning, run the smoke test" → cron: "57 8 <tomorrow_dom> <tomorrow_month> *", recurring: false
164
+
165
+ ## Recurring jobs (recurring: true, the default)
166
+
167
+ For "every N minutes" / "every hour" / "weekdays at 9am" requests:
168
+ "*/5 * * * *" (every 5 min), "0 * * * *" (hourly), "0 9 * * 1-5" (weekdays at 9am local)
169
+
170
+ ## Avoid the :00 and :30 minute marks when the task allows it
171
+
172
+ Every user who asks for "9am" gets \`0 9\`, and every user who asks for "hourly" gets \`0 *\` — which means requests from across the planet land on the API at the same instant. When the user's request is approximate, pick a minute that is NOT 0 or 30:
173
+ "every morning around 9" → "57 8 * * *" or "3 9 * * *" (not "0 9 * * *")
174
+ "hourly" → "7 * * * *" (not "0 * * * *")
175
+ "in an hour or so, remind me to..." → pick whatever minute you land on, don't round
176
+
177
+ Only use minute 0 or 30 when the user names that exact time and clearly means it ("at 9:00 sharp", "at half past", coordinating with a meeting). When in doubt, nudge a few minutes early or late — the user will not notice, and the fleet will.
178
+
179
+ ${e?`## Durability
180
+
181
+ By default (durable: false) the job lives only in this Claude session — nothing is written to disk, and the job is gone when Claude exits. Pass durable: true to write to .claude/scheduled_tasks.json so the job survives restarts. Only use durable: true when the user explicitly asks for the task to persist ("keep doing this every day", "set this up permanently"). Most "remind me in 5 minutes" / "check back in an hour" requests should stay session-only.`:`## Session-only
182
+
183
+ Jobs live only in this Claude session — nothing is written to disk, and the job is gone when Claude exits.`}
184
+
185
+ ## Runtime behavior
186
+
187
+ Jobs only fire while the REPL is idle (not mid-query). ${e?`Durable jobs persist to .claude/scheduled_tasks.json and survive session restarts — on next launch they resume automatically. One-shot durable tasks that were missed while the REPL was closed are surfaced for catch-up. Session-only jobs die with the process. `:``}The scheduler adds a small deterministic jitter on top of whatever you pick: recurring tasks fire up to 10% of their period late (max 15 min); one-shot tasks landing on :00 or :30 fire up to 90 s early. Picking an off-minute is still the bigger lever.
188
+
189
+ Recurring tasks auto-expire after ${Z} days — they fire one final time, then are deleted. This bounds session lifetime. Tell the user about the ${Z}-day limit when scheduling recurring jobs.
190
+
191
+ Returns a job ID you can pass to ${$}.`}function ui(e){return e?`Cancel a cron job previously scheduled with ${Q}. Removes it from .claude/scheduled_tasks.json (durable jobs) or the in-memory session store (session-only jobs).`:`Cancel a cron job previously scheduled with ${Q}. Removes it from the in-memory session store.`}function di(e){return e?`List all cron jobs scheduled via ${Q}, both durable (.claude/scheduled_tasks.json) and session-only.`:`List all cron jobs scheduled via ${Q} in this session.`}var fi,Z,Q,$,pi,mi,hi,gi=e((()=>{fe(),ii(),o(),fi=300*1e3,Z=X.recurringMaxAgeMs/(1440*60*1e3),Q=`CronCreate`,$=`CronDelete`,pi=`CronList`,mi=`Cancel a scheduled cron job by ID`,hi=`List scheduled cron jobs`})),_i,vi,yi,bi,xi,Si,Ci=e((()=>{_i=`LocalMemoryRecall`,vi=100*1024,yi=2*1024,bi=50*1024,xi=4*1024,Si=8*1024})),wi,Ti,Ei,Di=e((()=>{wi=`VaultHttpFetch`,Ti=1048576,Ei=3e4})),Oi,ki,Ai,ji,Mi,Ni,Pi=e((()=>{pe(),Ft(),It(),le(),Bt(),ge(),Tt(),Kt(),qt(),ct(),Pt(),At(),Zt(),ft(),Ot(),jt(),Qt(),$t(),en(),tn(),nn(),rn(),an(),mn(),vn(),bn(),Sn(),wn(),En(),On(),Gr(),gi(),Ci(),Di(),Oi=new Set([se,E,D,...process.env.USER_TYPE===`ant`?[]:[m],O,de,...[V],_i,wi]),ki=new Set([...Oi]),Ai=new Set([b,k,A,v,w,S,...j,y,x,C,M,z,R,Cn,Tn,Dn]),ji=new Set([P,F,I,L,N,Q,$,pi]),Mi=new Set([m,de,N,z]),Ni=new Set([...j,b,y,x,S,v,C,m,O,se,de,P,F,I,L,A,D,E,B,w,k,`LSP`,M,V,hn,R,Cn,z])}));function Fi(){return process.env.USER_TYPE===`ant`||me(`tengu_glacier_2xr`,!1)?`Deferred tools appear by name in <system-reminder> messages.`:`Deferred tools appear by name in <available-deferred-tools> messages.`}function Ii(e){return!(e.alwaysLoad===!0||Ni.has(e.name))}function Li(e){return e.name}function Ri(){return zi+Fi()+Bi}var zi,Bi,Vi=e((()=>{fe(),Pi(),an(),zi=`Search for deferred tools by name or keyword. LOW PRIORITY — only use this tool when no core tool can accomplish the task. Core tools (Read, Edit, Write, Bash, Glob, Grep, Agent, WebFetch, WebSearch, Skill) are always available and should be used directly. This tool is for discovering additional capabilities like MCP tools, cron scheduling, worktree management, agent teams (TeamCreate, TeamDelete, SendMessage), etc.
192
+
193
+ `,Bi=` Returns matching tool names.
194
+
195
+ ## Two-step workflow (MUST follow exactly)
196
+
197
+ Deferred tools CANNOT be called directly. You MUST use this two-step pattern:
198
+
199
+ Step 1 — Search: Call this tool (SearchExtraTools) to discover the target tool.
200
+ Input: {"query": "select:CronCreate"}
201
+ Response: "Found 1 deferred tool(s): CronCreate. Use ExecuteExtraTool with {"tool_name": "<name>", "params": {...}} to invoke."
202
+
203
+ Step 2 — Execute: Call ExecuteExtraTool to run the discovered tool.
204
+ Input: {"tool_name": "CronCreate", "params": {"schedule": "*/5 * * * *", "prompt": "check the deploy"}}
205
+ Response: the actual tool result.
206
+
207
+ ## Example: user asks "schedule a cron to check deploy every 5 minutes"
208
+
209
+ 1. SearchExtraTools({"query": "select:CronCreate"})
210
+ → Response: Found deferred tool CronCreate
211
+ 2. ExecuteExtraTool({"tool_name": "CronCreate", "params": {"schedule": "*/5 * * * *", "prompt": "check the deploy"}})
212
+ → Response: Cron job created successfully
213
+
214
+ If you don't know the exact tool name, use keyword search first:
215
+ 1. SearchExtraTools({"query": "cron schedule"})
216
+ → Response: Found deferred tool(s): CronCreate
217
+ 2. ExecuteExtraTool({"tool_name": "CronCreate", "params": {...}})
218
+
219
+ ## Query forms
220
+ - "select:CronCreate" — exact tool name (fastest, preferred when you know the name from <available-deferred-tools>)
221
+ - "select:CronCreate,CronList" — comma-separated multi-select
222
+ - "discover:schedule cron job" — returns tool name + description + schema without loading. Use to understand a tool before calling it.
223
+ - "notebook jupyter" — keyword search, up to max_results best matches
224
+ - "+slack send" — require "slack" in the name, rank by remaining terms
225
+
226
+ ## Failure policy
227
+ If ExecuteExtraTool fails, do NOT re-search for the same tool — it will loop. Stop and tell the user what failed.`}));export{Nr as $,tt as $n,Kt as $t,ui as A,Ct as An,on as At,qr as B,dt as Bn,N as Bt,mi as C,Dt as Cn,hn as Ct,Z as D,yt as Dn,fn as Dt,pi as E,b as En,z as Et,ai as F,ht as Fn,nn as Ft,Y as G,ct as Gn,Zt as Gt,ei as H,ft as Hn,M as Ht,X as I,mt as In,F as It,Xr as J,rt as Jn,Yt as Jt,ti as K,g as Kn,Xt as Kt,Yr as L,pt as Ln,tn as Lt,gi as M,Tt as Mn,L as Mt,si as N,vt as Nn,rn as Nt,ci as O,St as On,sn as Ot,oi as P,_t as Pn,I as Pt,Fr as Q,ot as Qn,Gt as Qt,ni as R,lt as Rn,P as Rt,Q as S,x as Sn,gn as St,hi as T,xt as Tn,vn as Tt,Qr as U,v as Un,Qt as Ut,ii as V,ut as Vn,$t as Vt,Zr as W,st as Wn,j as Wt,Wr as X,nt as Xn,qt as Xt,Gr as Y,et as Yn,A as Yt,Lr as Z,it as Zn,k as Zt,xi as _,C as _n,B as _t,Oi as a,Lt as an,W as at,yi as b,S as bn,yn as bt,ki as c,D as cn,In as ct,Ei as d,E as dn,Dn as dt,Vt as en,Dr as et,Ti as f,Ft as fn,On as ft,Si as g,Mt as gn,wn as gt,bi as h,Pt as hn,Cn as ht,Ii as i,zt as in,ir as it,di as j,wt as jn,R as jt,li as k,bt as kn,mn as kt,ji as l,It as ln,H as lt,Di as m,w as mn,En as mt,Ri as n,Wt as nn,vr as nt,Ai as o,Rt as on,Vn as ot,wi as p,Nt as pn,Tn as pt,J as q,_ as qn,Jt as qt,Vi as r,O as rn,_r as rt,Mi as s,Bt as sn,Pn as st,Li as t,Ut as tn,q as tt,Pi as u,T as un,V as ut,_i as v,jt as vn,xn as vt,$ as w,Ot as wn,_n as wt,Ci as x,At as xn,bn as xt,vi as y,kt as yn,Sn as yt,Kr as z,y as zn,en as zt};
@@ -0,0 +1 @@
1
+ import{TA as e,yA as t}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as clearPromptCache};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./prompt-BHI7PZe4.js";t();export{e as isDeferredTool};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{Lt as r,t as i}from"./src-KjMLauwe.js";import{A as a,E as o,_ as s,h as c,l,p as u}from"./debug-otxXY3j-.js";import{n as d,t as f}from"./execSyncWrapper-Bn7EJqtD.js";import{r as p,t as m}from"./which-BnEnzWhs.js";import{Ax as h,GS as g,Hv as _,KS as v,US as y,Uv as b,VS as x,zx as S}from"./loadAgentsDir-CQF8qhne.js";import{basename as C}from"path";import{spawn as w,spawnSync as T}from"child_process";function E(e){return!!p(e)}function D(e){let t=C(e.split(` `)[0]??``);return A.find(e=>t.includes(e))}function O(e,t,n){return n?M.has(e)?[`-g`,`${t}:${n}`]:e===`subl`?[`${t}:${n}`]:[t]:[t]}function k(e,t){let n=N();if(!n)return!1;let i=n.split(` `),a=i[0]??n,o=i.slice(1),s=D(n);if(s){let r=O(s,e,t),i={detached:!0,stdio:`ignore`},c;return c=process.platform===`win32`?w(`${n} ${r.map(e=>`"${e}"`).join(` `)}`,{...i,shell:!0}):w(a,[...o,...r],i),c.on(`error`,e=>u(`editor spawn failed: ${e}`,{level:`error`})),c.unref(),!0}let c=r.get(process.stdout);if(!c)return!1;let l=t&&j.test(C(a));c.enterAlternateScreen();try{let r={stdio:`inherit`},i;return i=process.platform===`win32`?T(`${n} ${l?`+${t} `:``}"${e}"`,{...r,shell:!0}):T(a,[...o,...l?[`+${t}`,e]:[e]],r),i.error?(u(`editor spawn failed: ${i.error}`,{level:`error`}),!1):!0}finally{c.exitAlternateScreen()}}var A,j,M,N,P=e((()=>{n(),i(),l(),m(),A=[`code`,`cursor`,`windsurf`,`codium`,`subl`,`atom`,`gedit`,`notepad++`,`notepad`],j=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,M=new Set([`code`,`cursor`,`windsurf`,`codium`]),N=t(()=>process.env.VISUAL?.trim()?process.env.VISUAL.trim():process.env.EDITOR?.trim()?process.env.EDITOR.trim():process.platform===`win32`?`start /wait notepad`:[`code`,`vi`,`nano`].find(e=>E(e)))}));function F(e){return D(e)!==void 0}function I(e){let t=c(),n=r.get(process.stdout);if(!n)throw Error(`Ink instance not found - cannot pause rendering`);let i=N();if(!i)return{content:null};try{t.statSync(e)}catch{return{content:null}}let a=!F(i);a?n.enterAlternateScreen():(n.pause(),n.suspendStdin());try{return f(`${z[i]??i} "${e}"`,{stdio:`inherit`}),{content:t.readFileSync(e,{encoding:`utf-8`})}}catch(e){if(typeof e==`object`&&e&&`status`in e&&typeof e.status==`number`){let t=e.status;if(t!==0)return{content:null,error:`${S(i)} exited with code ${t}`}}return{content:null}}finally{a?n.exitAlternateScreen():(n.resumeStdin(),n.resume())}}function L(e,t,n){let r=e;for(let[e,t]of Object.entries(n))if(t.type===`text`){let n=parseInt(e,10),i=t.content,a=r.indexOf(i);if(a!==-1){let e=y(n,g(i));r=r.slice(0,a)+e+r.slice(a+i.length)}}return r}function R(e,t){let n=c(),r=_();try{a(r,t?x(e,t):e,{encoding:`utf-8`,flush:!0});let n=I(r);if(n.content===null)return n;let i=n.content;return i.endsWith(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{Lt as r,t as i}from"./src-Di342QoJ.js";import{A as a,E as o,_ as s,h as c,l,p as u}from"./debug-otxXY3j-.js";import{n as d,t as f}from"./execSyncWrapper-Bn7EJqtD.js";import{r as p,t as m}from"./which-BnEnzWhs.js";import{Ax as h,GS as g,Hv as _,KS as v,US as y,Uv as b,VS as x,zx as S}from"./loadAgentsDir-DC4jN6-f.js";import{basename as C}from"path";import{spawn as w,spawnSync as T}from"child_process";function E(e){return!!p(e)}function D(e){let t=C(e.split(` `)[0]??``);return A.find(e=>t.includes(e))}function O(e,t,n){return n?M.has(e)?[`-g`,`${t}:${n}`]:e===`subl`?[`${t}:${n}`]:[t]:[t]}function k(e,t){let n=N();if(!n)return!1;let i=n.split(` `),a=i[0]??n,o=i.slice(1),s=D(n);if(s){let r=O(s,e,t),i={detached:!0,stdio:`ignore`},c;return c=process.platform===`win32`?w(`${n} ${r.map(e=>`"${e}"`).join(` `)}`,{...i,shell:!0}):w(a,[...o,...r],i),c.on(`error`,e=>u(`editor spawn failed: ${e}`,{level:`error`})),c.unref(),!0}let c=r.get(process.stdout);if(!c)return!1;let l=t&&j.test(C(a));c.enterAlternateScreen();try{let r={stdio:`inherit`},i;return i=process.platform===`win32`?T(`${n} ${l?`+${t} `:``}"${e}"`,{...r,shell:!0}):T(a,[...o,...l?[`+${t}`,e]:[e]],r),i.error?(u(`editor spawn failed: ${i.error}`,{level:`error`}),!1):!0}finally{c.exitAlternateScreen()}}var A,j,M,N,P=e((()=>{n(),i(),l(),m(),A=[`code`,`cursor`,`windsurf`,`codium`,`subl`,`atom`,`gedit`,`notepad++`,`notepad`],j=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,M=new Set([`code`,`cursor`,`windsurf`,`codium`]),N=t(()=>process.env.VISUAL?.trim()?process.env.VISUAL.trim():process.env.EDITOR?.trim()?process.env.EDITOR.trim():process.platform===`win32`?`start /wait notepad`:[`code`,`vi`,`nano`].find(e=>E(e)))}));function F(e){return D(e)!==void 0}function I(e){let t=c(),n=r.get(process.stdout);if(!n)throw Error(`Ink instance not found - cannot pause rendering`);let i=N();if(!i)return{content:null};try{t.statSync(e)}catch{return{content:null}}let a=!F(i);a?n.enterAlternateScreen():(n.pause(),n.suspendStdin());try{return f(`${z[i]??i} "${e}"`,{stdio:`inherit`}),{content:t.readFileSync(e,{encoding:`utf-8`})}}catch(e){if(typeof e==`object`&&e&&`status`in e&&typeof e.status==`number`){let t=e.status;if(t!==0)return{content:null,error:`${S(i)} exited with code ${t}`}}return{content:null}}finally{a?n.exitAlternateScreen():(n.resumeStdin(),n.resume())}}function L(e,t,n){let r=e;for(let[e,t]of Object.entries(n))if(t.type===`text`){let n=parseInt(e,10),i=t.content,a=r.indexOf(i);if(a!==-1){let e=y(n,g(i));r=r.slice(0,a)+e+r.slice(a+i.length)}}return r}function R(e,t){let n=c(),r=_();try{a(r,t?x(e,t):e,{encoding:`utf-8`,flush:!0});let n=I(r);if(n.content===null)return n;let i=n.content;return i.endsWith(`
2
2
  `)&&!i.endsWith(`
3
3
 
4
4
  `)&&(i=i.slice(0,-1)),t&&(i=L(i,e,t)),{content:i}}finally{try{n.unlinkSync(r)}catch{}}}var z,B=e((()=>{v(),i(),P(),d(),s(),h(),o(),b(),z={code:`code -w`,subl:`subl --wait`}}));export{P as a,N as i,R as n,k as o,B as r,I as t};
@@ -1,4 +1,4 @@
1
- import{dc as e,yc as t}from"./paths-4ZWdjPP4.js";import{E as n,O as r,l as i,p as a}from"./debug-otxXY3j-.js";import{n as o,t as s}from"./which-BnEnzWhs.js";import{r as c,t as l}from"./execFileNoThrow-azCkYhmF.js";import{n as u,t as d}from"./githubRepoPathMapping-DrreQj47.js";import{n as f}from"./banner-D_rqe2XQ.js";import{a as p,i as m,n as h}from"./registerProtocol-DCNuqdCC.js";import{homedir as g}from"os";import{basename as _}from"path";import{spawn as v}from"child_process";n(),m(),h(),t(),i(),c(),s();var y=[{name:`iTerm2`,bundleId:`com.googlecode.iterm2`,app:`iTerm`},{name:`Ghostty`,bundleId:`com.mitchellh.ghostty`,app:`Ghostty`},{name:`Kitty`,bundleId:`net.kovidgoyal.kitty`,app:`kitty`},{name:`Alacritty`,bundleId:`org.alacritty`,app:`Alacritty`},{name:`WezTerm`,bundleId:`com.github.wez.wezterm`,app:`WezTerm`},{name:`Terminal.app`,bundleId:`com.apple.Terminal`,app:`Terminal`}],b=[`ghostty`,`kitty`,`alacritty`,`wezterm`,`gnome-terminal`,`konsole`,`xfce4-terminal`,`mate-terminal`,`tilix`,`xterm`];async function x(){let t=e().deepLinkTerminal;if(t){let e=y.find(e=>e.app===t);if(e)return{name:e.name,command:e.app}}let n=process.env.TERM_PROGRAM;if(n){let e=n.replace(/\.app$/i,``).toLowerCase(),t=y.find(t=>t.app.toLowerCase()===e||t.name.toLowerCase()===e);if(t)return{name:t.name,command:t.app}}for(let e of y){let{code:t,stdout:n}=await l(`mdfind`,[`kMDItemCFBundleIdentifier == "${e.bundleId}"`],{timeout:5e3,useCwd:!1});if(t===0&&n.trim().length>0)return{name:e.name,command:e.app}}for(let e of y){let{code:t}=await l(`ls`,[`/Applications/${e.app}.app`],{timeout:1e3,useCwd:!1});if(t===0)return{name:e.name,command:e.app}}return{name:`Terminal.app`,command:`Terminal`}}async function S(){let e=process.env.TERMINAL;if(e){let t=await o(e);if(t)return{name:_(e),command:t}}let t=await o(`x-terminal-emulator`);if(t)return{name:`x-terminal-emulator`,command:t};for(let e of b){let t=await o(e);if(t)return{name:e,command:t}}return null}async function C(){let e=await o(`wt.exe`);if(e)return{name:`Windows Terminal`,command:e};let t=await o(`pwsh.exe`);if(t)return{name:`PowerShell`,command:t};let n=await o(`powershell.exe`);return n?{name:`PowerShell`,command:n}:{name:`Command Prompt`,command:`cmd.exe`}}async function w(){switch(process.platform){case`darwin`:return x();case`linux`:return S();case`win32`:return C();default:return null}}async function T(e,t){let n=await w();if(!n)return a(`No terminal emulator detected`,{level:`error`}),!1;a(`Launching in terminal: ${n.name} (${n.command})`);let r=[`--deep-link-origin`];switch(t.repo&&(r.push(`--deep-link-repo`,t.repo),t.lastFetchMs!==void 0&&r.push(`--deep-link-last-fetch`,String(t.lastFetchMs))),t.query&&r.push(`--prefill`,t.query),process.platform){case`darwin`:return E(n,e,r,t.cwd);case`linux`:return D(n,e,r,t.cwd);case`win32`:return O(n,e,r,t.cwd);default:return!1}}async function E(e,t,n,r){switch(e.command){case`iTerm`:{let{code:e}=await l(`osascript`,[`-e`,`tell application "iTerm"
1
+ import{dc as e,yc as t}from"./paths-CEAy4QCs.js";import{E as n,O as r,l as i,p as a}from"./debug-otxXY3j-.js";import{n as o,t as s}from"./which-BnEnzWhs.js";import{r as c,t as l}from"./execFileNoThrow-azCkYhmF.js";import{n as u,t as d}from"./githubRepoPathMapping-CdjkMIX3.js";import{n as f}from"./banner-DUL-7A0b.js";import{a as p,i as m,n as h}from"./registerProtocol-CQjmvg7a.js";import{homedir as g}from"os";import{basename as _}from"path";import{spawn as v}from"child_process";n(),m(),h(),t(),i(),c(),s();var y=[{name:`iTerm2`,bundleId:`com.googlecode.iterm2`,app:`iTerm`},{name:`Ghostty`,bundleId:`com.mitchellh.ghostty`,app:`Ghostty`},{name:`Kitty`,bundleId:`net.kovidgoyal.kitty`,app:`kitty`},{name:`Alacritty`,bundleId:`org.alacritty`,app:`Alacritty`},{name:`WezTerm`,bundleId:`com.github.wez.wezterm`,app:`WezTerm`},{name:`Terminal.app`,bundleId:`com.apple.Terminal`,app:`Terminal`}],b=[`ghostty`,`kitty`,`alacritty`,`wezterm`,`gnome-terminal`,`konsole`,`xfce4-terminal`,`mate-terminal`,`tilix`,`xterm`];async function x(){let t=e().deepLinkTerminal;if(t){let e=y.find(e=>e.app===t);if(e)return{name:e.name,command:e.app}}let n=process.env.TERM_PROGRAM;if(n){let e=n.replace(/\.app$/i,``).toLowerCase(),t=y.find(t=>t.app.toLowerCase()===e||t.name.toLowerCase()===e);if(t)return{name:t.name,command:t.app}}for(let e of y){let{code:t,stdout:n}=await l(`mdfind`,[`kMDItemCFBundleIdentifier == "${e.bundleId}"`],{timeout:5e3,useCwd:!1});if(t===0&&n.trim().length>0)return{name:e.name,command:e.app}}for(let e of y){let{code:t}=await l(`ls`,[`/Applications/${e.app}.app`],{timeout:1e3,useCwd:!1});if(t===0)return{name:e.name,command:e.app}}return{name:`Terminal.app`,command:`Terminal`}}async function S(){let e=process.env.TERMINAL;if(e){let t=await o(e);if(t)return{name:_(e),command:t}}let t=await o(`x-terminal-emulator`);if(t)return{name:`x-terminal-emulator`,command:t};for(let e of b){let t=await o(e);if(t)return{name:e,command:t}}return null}async function C(){let e=await o(`wt.exe`);if(e)return{name:`Windows Terminal`,command:e};let t=await o(`pwsh.exe`);if(t)return{name:`PowerShell`,command:t};let n=await o(`powershell.exe`);return n?{name:`PowerShell`,command:n}:{name:`Command Prompt`,command:`cmd.exe`}}async function w(){switch(process.platform){case`darwin`:return x();case`linux`:return S();case`win32`:return C();default:return null}}async function T(e,t){let n=await w();if(!n)return a(`No terminal emulator detected`,{level:`error`}),!1;a(`Launching in terminal: ${n.name} (${n.command})`);let r=[`--deep-link-origin`];switch(t.repo&&(r.push(`--deep-link-repo`,t.repo),t.lastFetchMs!==void 0&&r.push(`--deep-link-last-fetch`,String(t.lastFetchMs))),t.query&&r.push(`--prefill`,t.query),process.platform){case`darwin`:return E(n,e,r,t.cwd);case`linux`:return D(n,e,r,t.cwd);case`win32`:return O(n,e,r,t.cwd);default:return!1}}async function E(e,t,n,r){switch(e.command){case`iTerm`:{let{code:e}=await l(`osascript`,[`-e`,`tell application "iTerm"
2
2
  if running then
3
3
  create window with default profile
4
4
  else
@@ -1 +1 @@
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-KjMLauwe.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-4ZWdjPP4.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-CQF8qhne.js";import{n as w,t as T}from"./extra-usage-DTr6gExD.js";import{n as E,t as D}from"./upgrade-DpfZlPyC.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
+ 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,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{Ct as i,U as a,br as o,cn as s,wt as c}from"./state-sIHsFpDu.js";import{ea as l,na as u,ra as d,ta as f}from"./paths-4ZWdjPP4.js";import{Q as p,U as m,Z as h,_ as g,h as _,l as ee,p as v,z as te}from"./debug-otxXY3j-.js";import{F as y,P as ne}from"./git-C0IuvuIy.js";import{join as re}from"node:path";import{appendFileSync as ie,existsSync as ae,mkdirSync as oe}from"node:fs";import{homedir as se}from"node:os";import{randomUUID as b}from"crypto";var ce=e((()=>{})),le,ue=e((()=>{le={input_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,output_tokens:0,server_tool_use:{web_search_requests:0,web_fetch_requests:0},service_tier:`standard`,cache_creation:{ephemeral_1h_input_tokens:0,ephemeral_5m_input_tokens:0},inference_geo:``,iterations:[],speed:`standard`}})),de=e((()=>{}));function fe(e){return e}var pe=e((()=>{})),me=e((()=>{ce(),ue(),de(),pe()}));function he(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function ge(e){if(process.env.OPENAI_MODEL)return process.env.OPENAI_MODEL;let t=e.replace(/\[1m\]$/,``),n=he(t);if(n){let e=`OPENAI_DEFAULT_${n.toUpperCase()}_MODEL`,t=process.env[e];if(t)return t;let r=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i}return _e[t]??t}var _e,ve=e((()=>{_e={"claude-sonnet-4-20250514":`gpt-4o`,"claude-sonnet-4-5-20250929":`gpt-4o`,"claude-sonnet-4-6":`gpt-4o`,"claude-opus-4-20250514":`o3`,"claude-opus-4-1-20250805":`o3`,"claude-opus-4-5-20251101":`o3`,"claude-opus-4-6":`o3`,"claude-haiku-4-5-20251001":`gpt-4o-mini`,"claude-3-5-haiku-20241022":`gpt-4o-mini`,"claude-3-7-sonnet-20250219":`gpt-4o`,"claude-3-5-sonnet-20241022":`gpt-4o`}}));function ye(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function be(){let e=process.env.GROK_MODEL_MAP;if(!e)return null;try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t}catch{}return null}function xe(e){if(process.env.GROK_MODEL)return process.env.GROK_MODEL;let t=e.replace(/\[1m\]$/,``),n=ye(t),r=be();if(r&&n&&r[n])return r[n];if(n){let e=`GROK_DEFAULT_${n.toUpperCase()}_MODEL`,t=process.env[e];if(t)return t;let r=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i}return x[t]?x[t]:n&&S[n]?S[n]:t}var x,S,Se=e((()=>{x={"claude-sonnet-4-20250514":`grok-3-mini-fast`,"claude-sonnet-4-5-20250929":`grok-3-mini-fast`,"claude-sonnet-4-6":`grok-3-mini-fast`,"claude-opus-4-20250514":`grok-4.20-reasoning`,"claude-opus-4-1-20250805":`grok-4.20-reasoning`,"claude-opus-4-5-20251101":`grok-4.20-reasoning`,"claude-opus-4-6":`grok-4.20-reasoning`,"claude-haiku-4-5-20251001":`grok-3-mini-fast`,"claude-3-5-haiku-20241022":`grok-3-mini-fast`,"claude-3-7-sonnet-20250219":`grok-3-mini-fast`,"claude-3-5-sonnet-20241022":`grok-3-mini-fast`},S={opus:`grok-4.20-reasoning`,sonnet:`grok-3-mini-fast`,haiku:`grok-3-mini-fast`}}));function Ce(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function we(e){if(process.env.GEMINI_MODEL)return process.env.GEMINI_MODEL;let t=e.replace(/\[1m\]$/i,``),n=Ce(t);if(!n)return t;let r=`GEMINI_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i;let a=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,o=process.env[a];if(o)return o;throw Error(`Gemini provider requires GEMINI_MODEL or ${r} (or ${a} for backward compatibility) to be configured.`)}var Te=e((()=>{})),C,Ee=e((()=>{C=`_geminiThoughtSignature`}));function w(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function De(e,t){let n=[],r=new Map;for(let t of e){if(t.type===`assistant`){let e=je(t);e.parts.length>0&&n.push(e);let i=t.message.content;if(Array.isArray(i))for(let e of i)typeof e!=`string`&&e.type===`tool_use`&&r.set(e.id,e.name);continue}if(t.type===`user`){let e=ke(t,r);e.parts.length>0&&n.push(e)}}let i=Oe(t);return{contents:n,...i?{systemInstruction:{parts:[{text:i}]}}:{}}}function Oe(e){return!e||e.length===0?``:e.filter(Boolean).join(`
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{Ct as i,U as a,br as o,cn as s,wt as c}from"./state-sIHsFpDu.js";import{ea as l,na as u,ra as d,ta as f}from"./paths-CEAy4QCs.js";import{Q as p,U as m,Z as h,_ as g,h as _,l as ee,p as v,z as te}from"./debug-otxXY3j-.js";import{F as y,P as ne}from"./git-C0IuvuIy.js";import{join as re}from"node:path";import{appendFileSync as ie,existsSync as ae,mkdirSync as oe}from"node:fs";import{homedir as se}from"node:os";import{randomUUID as b}from"crypto";var ce=e((()=>{})),le,ue=e((()=>{le={input_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,output_tokens:0,server_tool_use:{web_search_requests:0,web_fetch_requests:0},service_tier:`standard`,cache_creation:{ephemeral_1h_input_tokens:0,ephemeral_5m_input_tokens:0},inference_geo:``,iterations:[],speed:`standard`}})),de=e((()=>{}));function fe(e){return e}var pe=e((()=>{})),me=e((()=>{ce(),ue(),de(),pe()}));function he(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function ge(e){if(process.env.OPENAI_MODEL)return process.env.OPENAI_MODEL;let t=e.replace(/\[1m\]$/,``),n=he(t);if(n){let e=`OPENAI_DEFAULT_${n.toUpperCase()}_MODEL`,t=process.env[e];if(t)return t;let r=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i}return _e[t]??t}var _e,ve=e((()=>{_e={"claude-sonnet-4-20250514":`gpt-4o`,"claude-sonnet-4-5-20250929":`gpt-4o`,"claude-sonnet-4-6":`gpt-4o`,"claude-opus-4-20250514":`o3`,"claude-opus-4-1-20250805":`o3`,"claude-opus-4-5-20251101":`o3`,"claude-opus-4-6":`o3`,"claude-haiku-4-5-20251001":`gpt-4o-mini`,"claude-3-5-haiku-20241022":`gpt-4o-mini`,"claude-3-7-sonnet-20250219":`gpt-4o`,"claude-3-5-sonnet-20241022":`gpt-4o`}}));function ye(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function be(){let e=process.env.GROK_MODEL_MAP;if(!e)return null;try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t}catch{}return null}function xe(e){if(process.env.GROK_MODEL)return process.env.GROK_MODEL;let t=e.replace(/\[1m\]$/,``),n=ye(t),r=be();if(r&&n&&r[n])return r[n];if(n){let e=`GROK_DEFAULT_${n.toUpperCase()}_MODEL`,t=process.env[e];if(t)return t;let r=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i}return x[t]?x[t]:n&&S[n]?S[n]:t}var x,S,Se=e((()=>{x={"claude-sonnet-4-20250514":`grok-3-mini-fast`,"claude-sonnet-4-5-20250929":`grok-3-mini-fast`,"claude-sonnet-4-6":`grok-3-mini-fast`,"claude-opus-4-20250514":`grok-4.20-reasoning`,"claude-opus-4-1-20250805":`grok-4.20-reasoning`,"claude-opus-4-5-20251101":`grok-4.20-reasoning`,"claude-opus-4-6":`grok-4.20-reasoning`,"claude-haiku-4-5-20251001":`grok-3-mini-fast`,"claude-3-5-haiku-20241022":`grok-3-mini-fast`,"claude-3-7-sonnet-20250219":`grok-3-mini-fast`,"claude-3-5-sonnet-20241022":`grok-3-mini-fast`},S={opus:`grok-4.20-reasoning`,sonnet:`grok-3-mini-fast`,haiku:`grok-3-mini-fast`}}));function Ce(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function we(e){if(process.env.GEMINI_MODEL)return process.env.GEMINI_MODEL;let t=e.replace(/\[1m\]$/i,``),n=Ce(t);if(!n)return t;let r=`GEMINI_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i;let a=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,o=process.env[a];if(o)return o;throw Error(`Gemini provider requires GEMINI_MODEL or ${r} (or ${a} for backward compatibility) to be configured.`)}var Te=e((()=>{})),C,Ee=e((()=>{C=`_geminiThoughtSignature`}));function w(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function De(e,t){let n=[],r=new Map;for(let t of e){if(t.type===`assistant`){let e=je(t);e.parts.length>0&&n.push(e);let i=t.message.content;if(Array.isArray(i))for(let e of i)typeof e!=`string`&&e.type===`tool_use`&&r.set(e.id,e.name);continue}if(t.type===`user`){let e=ke(t,r);e.parts.length>0&&n.push(e)}}let i=Oe(t);return{contents:n,...i?{systemInstruction:{parts:[{text:i}]}}:{}}}function Oe(e){return!e||e.length===0?``:e.filter(Boolean).join(`
2
2
 
3
3
  `)}function ke(e,t){let n=e.message.content;return typeof n==`string`?{role:`user`,parts:T(n)}:Array.isArray(n)?{role:`user`,parts:n.flatMap(e=>Ae(e,t))}:{role:`user`,parts:[]}}function Ae(e,t){if(typeof e==`string`)return T(e);if(e.type===`text`)return T(e.text);if(e.type===`tool_result`){let n=e;return[{functionResponse:{name:t.get(n.tool_use_id)??n.tool_use_id,response:Pe(n)}}]}if(e.type===`image`){let t=e.source;if(t?.type===`base64`&&typeof t.data==`string`)return[{inlineData:{mimeType:t.media_type||`image/png`,data:t.data}}];if(t?.type===`url`&&typeof t.url==`string`)return T(`[image: ${t.url}]`)}return[]}function je(e){let t=e.message.content;if(typeof t==`string`)return{role:`model`,parts:T(t)};if(!Array.isArray(t))return{role:`model`,parts:[]};let n=[];for(let e of t){if(typeof e==`string`){n.push(...T(e));continue}if(e.type===`text`){n.push(...T(e.text,E(e)));continue}if(e.type===`thinking`){let t=Me(e.thinking,e.signature);t&&n.push(t);continue}if(e.type===`tool_use`){let t=e;n.push({functionCall:{name:t.name,args:Ne(t.input)},...E(e)&&{thoughtSignature:E(e)}})}}return{role:`model`,parts:n}}function T(e,t){return typeof e!=`string`||e.length===0?[]:[{text:e,...t&&{thoughtSignature:t}}]}function Me(e,t){if(!(typeof e!=`string`||e.length===0))return{text:e,thought:!0,...t&&{thoughtSignature:t}}}function Ne(e){if(typeof e==`string`){let t=w(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:t===null?{}:{value:t}}return e&&typeof e==`object`&&!Array.isArray(e)?e:e===void 0?{}:{value:e}}function Pe(e){let t=Fe(e.content);return t&&typeof t==`object`&&!Array.isArray(t)?e.is_error?{...t,is_error:!0}:t:{result:t,...e.is_error?{is_error:!0}:{}}}function Fe(e){if(typeof e==`string`)return w(e)??e;if(Array.isArray(e)){let t=e.map(e=>typeof e==`string`?e:e&&typeof e==`object`&&`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
4
4
  `);return w(t)??t}return e??``}function E(e){let t=e[C];return typeof t==`string`&&t.length>0?t:void 0}var Ie=e((()=>{Ee()}));function Le(e){if(typeof e==`string`)return O.has(e)?e:void 0;if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`&&O.has(e)),n=Array.from(new Set(t));return n.length===0?void 0:n.length===1?n[0]:n}}function Re(e){if(e===null)return`null`;if(Array.isArray(e))return`array`;if(typeof e==`string`)return`string`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`number`)return Number.isInteger(e)?`integer`:`number`;if(typeof e==`object`)return`object`}function ze(e){let t=e.map(Re).filter(e=>e!==void 0),n=Array.from(new Set(t));if(n.length!==0)return n.length===1?n[0]:n}function Be(e){return e===void 0?[`null`]:Array.isArray(e)?e.includes(`null`)?e:[...e,`null`]:e===`null`?e:[e,`null`]}function Ve(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=Object.entries(e).map(([e,t])=>[e,D(t)]).filter(([,e])=>Object.keys(e).length>0);if(t.length!==0)return Object.fromEntries(t)}function He(e){if(!Array.isArray(e))return;let t=e.map(e=>D(e)).filter(e=>Object.keys(e).length>0);return t.length>0?t:void 0}function D(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t=e,n={},r=Le(t.type);t.const===void 0?Array.isArray(t.enum)&&t.enum.length>0&&(n.enum=t.enum,r=r??ze(t.enum)):(n.enum=[t.const],r=r??Re(t.const)),r||(t.properties&&typeof t.properties==`object`?r=`object`:(t.items!==void 0||t.prefixItems!==void 0)&&(r=`array`)),t.nullable===!0&&(r=Be(r)),r&&(n.type=r),typeof t.title==`string`&&(n.title=t.title),typeof t.description==`string`&&(n.description=t.description),typeof t.format==`string`&&(n.format=t.format),typeof t.pattern==`string`&&(n.pattern=t.pattern),typeof t.minimum==`number`?n.minimum=t.minimum:typeof t.exclusiveMinimum==`number`&&(n.minimum=t.exclusiveMinimum),typeof t.maximum==`number`?n.maximum=t.maximum:typeof t.exclusiveMaximum==`number`&&(n.maximum=t.exclusiveMaximum),typeof t.minItems==`number`&&(n.minItems=t.minItems),typeof t.maxItems==`number`&&(n.maxItems=t.maxItems),typeof t.minLength==`number`&&(n.minLength=t.minLength),typeof t.maxLength==`number`&&(n.maxLength=t.maxLength),typeof t.minProperties==`number`&&(n.minProperties=t.minProperties),typeof t.maxProperties==`number`&&(n.maxProperties=t.maxProperties);let i=Ve(t.properties);if(i&&(n.properties=i,n.propertyOrdering=Object.keys(i)),Array.isArray(t.required)){let e=t.required.filter(e=>typeof e==`string`);e.length>0&&(n.required=e)}if(typeof t.additionalProperties==`boolean`)n.additionalProperties=t.additionalProperties;else{let e=D(t.additionalProperties);Object.keys(e).length>0&&(n.additionalProperties=e)}let a=D(t.items);Object.keys(a).length>0&&(n.items=a);let o=He(t.prefixItems);o&&(n.prefixItems=o);let s=He(t.anyOf??t.oneOf);return s&&(n.anyOf=s),n}function Ue(e){let t=D(e);return Object.keys(t).length>0?t:{type:`object`,properties:{}}}function We(e){let t=e.filter(e=>{let t=e.type;return e.type===`custom`||!(`type`in e)||t!==`server`}).map(e=>{let t=e;return{name:t.name||``,description:t.description||``,parametersJsonSchema:Ue(t.input_schema??{type:`object`,properties:{}})}});return t.length>0?[{functionDeclarations:t}]:[]}function Ge(e){if(!e||typeof e!=`object`)return;let t=e;switch(t.type){case`auto`:return{mode:`AUTO`};case`any`:return{mode:`ANY`};case`tool`:return{mode:`ANY`,allowedFunctionNames:typeof t.name==`string`?[t.name]:void 0};default:return}}var O,Ke=e((()=>{O=new Set([`string`,`number`,`integer`,`boolean`,`object`,`array`,`null`])}));async function*qe(e,t){let n=`msg_${b().replace(/-/g,``).slice(0,24)}`,r=!1,i=!1,a=0,o=null,s=!1,c,l=0,u=0,d=0;for await(let i of e){let e=i.usageMetadata;e&&(l=e.promptTokenCount??l,u=(e.candidatesTokenCount??0)+(e.thoughtsTokenCount??0),d=e.cachedContentTokenCount??d),r||(r=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:l,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:d}}});let f=i.candidates?.[0],p=f?.content?.parts??[];for(let e of p){if(e.functionCall){o&&(yield{type:`content_block_stop`,index:o.index},o=null),s=!0;let t=a++;yield{type:`content_block_start`,index:t,content_block:{type:`tool_use`,id:`toolu_${b().replace(/-/g,``).slice(0,24)}`,name:e.functionCall.name||``,input:{}}},e.thoughtSignature&&(yield{type:`content_block_delta`,index:t,delta:{type:`signature_delta`,signature:e.thoughtSignature}}),e.functionCall.args&&Object.keys(e.functionCall.args).length>0&&(yield{type:`content_block_delta`,index:t,delta:{type:`input_json_delta`,partial_json:JSON.stringify(e.functionCall.args)}}),yield{type:`content_block_stop`,index:t};continue}let t=Je(e);if(t){(!o||o.type!==t)&&(o&&(yield{type:`content_block_stop`,index:o.index}),o={index:a++,type:t},yield{type:`content_block_start`,index:o.index,content_block:t===`thinking`?{type:`thinking`,thinking:``,signature:``}:{type:`text`,text:``}}),e.text&&(yield{type:`content_block_delta`,index:o.index,delta:t===`thinking`?{type:`thinking_delta`,thinking:e.text}:{type:`text_delta`,text:e.text}}),e.thoughtSignature&&(yield{type:`content_block_delta`,index:o.index,delta:{type:`signature_delta`,signature:e.thoughtSignature}});continue}e.thoughtSignature&&o&&(yield{type:`content_block_delta`,index:o.index,delta:{type:`signature_delta`,signature:e.thoughtSignature}})}f?.finishReason&&(c=f.finishReason)}r&&(o&&(yield{type:`content_block_stop`,index:o.index}),i||(yield{type:`message_delta`,delta:{stop_reason:Ye(c,s),stop_sequence:null},usage:{input_tokens:l,output_tokens:u,cache_creation_input_tokens:0,cache_read_input_tokens:d}},yield{type:`message_stop`},i=!0))}function Je(e){return typeof e.text==`string`?e.thought?`thinking`:`text`:null}function Ye(e,t){switch(e){case`MAX_TOKENS`:return`max_tokens`;default:return t?`tool_use`:`end_turn`}}var Xe=e((()=>{}));function k(e){if(!e||typeof e!=`object`)return null;let t=e,n=0;for(;t&&n<5;){if(t instanceof Error&&`code`in t&&typeof t.code==`string`){let e=t.code,n=nt.has(e);return{code:e,message:t.message,isSSLError:n}}if(t instanceof Error&&`cause`in t&&t.cause!==t)t=t.cause,n++;else break}return null}function Ze(e){let t=k(e);return t?.isSSLError?`SSL certificate error (${t.code}). If you are behind a corporate proxy or TLS-intercepting firewall, set NODE_EXTRA_CA_CERTS to your CA bundle path, or ask IT to allowlist *.anthropic.com. Run /doctor for details.`:null}function A(e){if(e.includes(`<!DOCTYPE html`)||e.includes(`<html`)){let t=e.match(/<title>([^<]+)<\/title>/);return t&&t[1]?t[1].trim():``}return e}function Qe(e){let t=e.message;return t?A(t):``}function $e(e){return typeof e==`object`&&!!e&&`error`in e&&typeof e.error==`object`&&e.error!==null}function et(e){if(!$e(e))return null;let t=e.error,n=t?.error?.message;if(typeof n==`string`&&n.length>0){let e=A(n);if(e.length>0)return e}let r=t?.message;if(typeof r==`string`&&r.length>0){let e=A(r);if(e.length>0)return e}return null}function tt(e){let t=k(e);if(t){let{code:e,isSSLError:n}=t;if(e===`ETIMEDOUT`)return`Request timed out. Check your internet connection and proxy settings`;if(n)switch(e){case`UNABLE_TO_VERIFY_LEAF_SIGNATURE`:case`UNABLE_TO_GET_ISSUER_CERT`:case`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`:return`Unable to connect to API: SSL certificate verification failed. Check your proxy or corporate SSL certificates`;case`CERT_HAS_EXPIRED`:return`Unable to connect to API: SSL certificate has expired`;case`CERT_REVOKED`:return`Unable to connect to API: SSL certificate has been revoked`;case`DEPTH_ZERO_SELF_SIGNED_CERT`:case`SELF_SIGNED_CERT_IN_CHAIN`:return`Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates`;case`ERR_TLS_CERT_ALTNAME_INVALID`:case`HOSTNAME_MISMATCH`:return`Unable to connect to API: SSL certificate hostname mismatch`;case`CERT_NOT_YET_VALID`:return`Unable to connect to API: SSL certificate is not yet valid`;default:return`Unable to connect to API: SSL error (${e})`}}if(e.message===`Connection error.`)return t?.code?`Unable to connect to API (${t.code})`:`Unable to connect to API. Check your internet connection`;if(!e.message)return et(e)??`API error (status ${e.status??`unknown`})`;let n=Qe(e);return n!==e.message&&n.length>0?n:e.message}var nt,rt=e((()=>{nt=new Set([`UNABLE_TO_VERIFY_LEAF_SIGNATURE`,`UNABLE_TO_GET_ISSUER_CERT`,`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`,`CERT_SIGNATURE_FAILURE`,`CERT_NOT_YET_VALID`,`CERT_HAS_EXPIRED`,`CERT_REVOKED`,`CERT_REJECTED`,`CERT_UNTRUSTED`,`DEPTH_ZERO_SELF_SIGNED_CERT`,`SELF_SIGNED_CERT_IN_CHAIN`,`CERT_CHAIN_TOO_LONG`,`PATH_LENGTH_EXCEEDED`,`ERR_TLS_CERT_ALTNAME_INVALID`,`HOSTNAME_MISMATCH`,`ERR_TLS_HANDSHAKE_TIMEOUT`,`ERR_SSL_WRONG_VERSION_NUMBER`,`ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC`])}));function it(e,t,n){let r=[],i=at(t);i&&r.push({role:`system`,content:i});for(let t of e)switch(t.type){case`user`:r.push(...ot(t));break;case`assistant`:r.push(...ct(t));break;default:break}return r}function at(e){return!e||e.length===0?``:e.filter(Boolean).join(`
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Zt as i,dc as a,dn as o,on as s,tn as c,yc as l}from"./paths-4ZWdjPP4.js";import{l as u,p as d}from"./debug-otxXY3j-.js";import{l as f,u as p}from"./oauth-CdZEzMww.js";import{d as m,f as h,o as g,s as _}from"./log-DSV4Ht5l.js";import{a as v,l as y,o as b}from"./api-DMbWqJlK.js";async function x(e=`claude_code_guest_pass`){let{accessToken:n,orgUUID:r}=await y(),i={...v(n),"x-organization-uuid":r},a=`${f().BASE_API_URL}/api/oauth/organizations/${r}/referral/eligibility`;return(await t.get(a,{headers:i,params:{campaign:e},timeout:5e3})).data}async function S(e=`claude_code_guest_pass`){let{accessToken:n,orgUUID:r}=await y(),i={...v(n),"x-organization-uuid":r},a=`${f().BASE_API_URL}/api/oauth/organizations/${r}/referral/redemptions`;return(await t.get(a,{headers:i,params:{campaign:e},timeout:1e4})).data}function C(){return!!(i()?.organizationUuid&&o()&&c()===`max`)}function w(){if(!C())return{eligible:!1,needsRefresh:!1,hasCache:!1};let e=i()?.organizationUuid;if(!e)return{eligible:!1,needsRefresh:!1,hasCache:!1};let t=a().passesEligibilityCache?.[e];if(!t)return{eligible:!1,needsRefresh:!0,hasCache:!1};let{eligible:n,timestamp:r}=t;return{eligible:n,needsRefresh:Date.now()-r>j,hasCache:!0}}function T(e){let t=N[e.currency]??`${e.currency} `,n=e.amount_minor_units/100;return`${t}${n%1==0?n.toString():n.toFixed(2)}`}function E(){let e=i()?.organizationUuid;return e?a().passesEligibilityCache?.[e]?.referrer_reward??null:null}function D(){let e=i()?.organizationUuid;return e?a().passesEligibilityCache?.[e]?.remaining_passes??null:null}async function O(){if(M)return d(`Passes: Reusing in-flight eligibility fetch`),M;let e=i()?.organizationUuid;return e?(M=(async()=>{try{let t=await x(),n={...t,timestamp:Date.now()};return r(t=>({...t,passesEligibilityCache:{...t.passesEligibilityCache,[e]:n}})),d(`Passes eligibility cached for org ${e}: ${t.eligible}`),t}catch(e){return d(`Failed to fetch and cache passes eligibility`),_(e),null}finally{M=null}})(),M):null}async function k(){if(!C())return null;let e=i()?.organizationUuid;if(!e)return null;let t=a().passesEligibilityCache?.[e],n=Date.now();if(!t)return d(`Passes: No cache, fetching eligibility in background (command unavailable this session)`),O(),null;if(n-t.timestamp>j){d(`Passes: Cache stale, returning cached data and refreshing in background`),O();let{timestamp:e,...n}=t;return n}d(`Passes: Using fresh cached eligibility data`);let{timestamp:r,...o}=t;return o}async function A(){h()||k()}var j,M,N,P=e((()=>{n(),p(),s(),l(),u(),g(),m(),b(),j=1440*60*1e3,M=null,N={USD:`$`,EUR:`€`,GBP:`£`,BRL:`R$`,CAD:`CA$`,AUD:`A$`,NZD:`NZ$`,SGD:`S$`}}));export{E as a,A as c,k as i,S as n,D as o,T as r,P as s,w as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Zt as i,dc as a,dn as o,on as s,tn as c,yc as l}from"./paths-CEAy4QCs.js";import{l as u,p as d}from"./debug-otxXY3j-.js";import{l as f,u as p}from"./oauth-CdZEzMww.js";import{d as m,f as h,o as g,s as _}from"./log-DSV4Ht5l.js";import{a as v,l as y,o as b}from"./api-Cy1N7XAQ.js";async function x(e=`claude_code_guest_pass`){let{accessToken:n,orgUUID:r}=await y(),i={...v(n),"x-organization-uuid":r},a=`${f().BASE_API_URL}/api/oauth/organizations/${r}/referral/eligibility`;return(await t.get(a,{headers:i,params:{campaign:e},timeout:5e3})).data}async function S(e=`claude_code_guest_pass`){let{accessToken:n,orgUUID:r}=await y(),i={...v(n),"x-organization-uuid":r},a=`${f().BASE_API_URL}/api/oauth/organizations/${r}/referral/redemptions`;return(await t.get(a,{headers:i,params:{campaign:e},timeout:1e4})).data}function C(){return!!(i()?.organizationUuid&&o()&&c()===`max`)}function w(){if(!C())return{eligible:!1,needsRefresh:!1,hasCache:!1};let e=i()?.organizationUuid;if(!e)return{eligible:!1,needsRefresh:!1,hasCache:!1};let t=a().passesEligibilityCache?.[e];if(!t)return{eligible:!1,needsRefresh:!0,hasCache:!1};let{eligible:n,timestamp:r}=t;return{eligible:n,needsRefresh:Date.now()-r>j,hasCache:!0}}function T(e){let t=N[e.currency]??`${e.currency} `,n=e.amount_minor_units/100;return`${t}${n%1==0?n.toString():n.toFixed(2)}`}function E(){let e=i()?.organizationUuid;return e?a().passesEligibilityCache?.[e]?.referrer_reward??null:null}function D(){let e=i()?.organizationUuid;return e?a().passesEligibilityCache?.[e]?.remaining_passes??null:null}async function O(){if(M)return d(`Passes: Reusing in-flight eligibility fetch`),M;let e=i()?.organizationUuid;return e?(M=(async()=>{try{let t=await x(),n={...t,timestamp:Date.now()};return r(t=>({...t,passesEligibilityCache:{...t.passesEligibilityCache,[e]:n}})),d(`Passes eligibility cached for org ${e}: ${t.eligible}`),t}catch(e){return d(`Failed to fetch and cache passes eligibility`),_(e),null}finally{M=null}})(),M):null}async function k(){if(!C())return null;let e=i()?.organizationUuid;if(!e)return null;let t=a().passesEligibilityCache?.[e],n=Date.now();if(!t)return d(`Passes: No cache, fetching eligibility in background (command unavailable this session)`),O(),null;if(n-t.timestamp>j){d(`Passes: Cache stale, returning cached data and refreshing in background`),O();let{timestamp:e,...n}=t;return n}d(`Passes: Using fresh cached eligibility data`);let{timestamp:r,...o}=t;return o}async function A(){h()||k()}var j,M,N,P=e((()=>{n(),p(),s(),l(),u(),g(),m(),b(),j=1440*60*1e3,M=null,N={USD:`$`,EUR:`€`,GBP:`£`,BRL:`R$`,CAD:`CA$`,AUD:`A$`,NZD:`NZ$`,SGD:`S$`}}));export{E as a,A as c,k as i,S as n,D as o,T as r,P as s,w as t};
@@ -1 +1 @@
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-CQF8qhne.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
+ 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,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{Ka as i,S as a,_ as o,oo as s}from"./paths-4ZWdjPP4.js";import{B as c,U as l,l as u,p as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./which-BnEnzWhs.js";import{r as g,t as _}from"./execFileNoThrow-azCkYhmF.js";import{a as v,r as y,t as b}from"./xdg-BFD9ydDV.js";import{n as x,t as S}from"./sanitization-B-JlvWcf.js";import*as C from"os";import*as w from"path";import{promises as T}from"fs";function E(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function D(e){let t=e.startsWith(`claude-cli://`)?e:e.startsWith(`claude-cli:`)?e.replace(`${O}:`,`${O}://`):null;if(!t)throw Error(`Invalid deep link: expected ${O}:// scheme, got "${e}"`);let n;try{n=new URL(t)}catch{throw Error(`Invalid deep link URL: "${e}"`)}if(n.hostname!==`open`)throw Error(`Unknown deep link action: "${n.hostname}"`);let r=n.searchParams.get(`cwd`)??void 0,i=n.searchParams.get(`repo`)??void 0,a=n.searchParams.get(`q`);if(r&&!r.startsWith(`/`)&&!/^[a-zA-Z]:[/\\]/.test(r))throw Error(`Invalid cwd in deep link: must be an absolute path, got "${r}"`);if(r&&E(r))throw Error(`Deep link cwd contains disallowed control characters`);if(r&&r.length>j)throw Error(`Deep link cwd exceeds ${j} characters (got ${r.length})`);if(i&&!k.test(i))throw Error(`Invalid repo in deep link: expected "owner/repo", got "${i}"`);let o;if(a&&a.trim().length>0){if(o=x(a.trim()),E(o))throw Error(`Deep link query contains disallowed control characters`);if(o.length>A)throw Error(`Deep link query exceeds ${A} characters (got ${o.length})`)}return{query:o,cwd:r,repo:i}}var O,k,A,j,M=e((()=>{S(),O=`claude-cli`,k=/^[\w.-]+\/[\w.-]+$/,A=5e3,j=4096})),N=t({MACOS_BUNDLE_ID:()=>W,ensureDeepLinkProtocolRegistered:()=>U,isProtocolHandlerCurrent:()=>H,registerProtocolHandler:()=>B});function P(){return w.join(y(),`applications`,K)}function F(e){return`Exec="${e}" --handle-uri %u`}function I(e){return`"${e}" --handle-uri "%1"`}async function L(e){let t=w.join(q,`Contents`);try{await T.rm(q,{recursive:!0})}catch(e){if(c(e)!==`ENOENT`)throw e}await T.mkdir(w.dirname(J),{recursive:!0});let n=`<?xml version="1.0" encoding="UTF-8"?>
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{Ka as i,S as a,_ as o,oo as s}from"./paths-CEAy4QCs.js";import{B as c,U as l,l as u,p as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./which-BnEnzWhs.js";import{r as g,t as _}from"./execFileNoThrow-azCkYhmF.js";import{a as v,r as y,t as b}from"./xdg-BFD9ydDV.js";import{n as x,t as S}from"./sanitization-B-JlvWcf.js";import*as C from"os";import*as w from"path";import{promises as T}from"fs";function E(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function D(e){let t=e.startsWith(`claude-cli://`)?e:e.startsWith(`claude-cli:`)?e.replace(`${O}:`,`${O}://`):null;if(!t)throw Error(`Invalid deep link: expected ${O}:// scheme, got "${e}"`);let n;try{n=new URL(t)}catch{throw Error(`Invalid deep link URL: "${e}"`)}if(n.hostname!==`open`)throw Error(`Unknown deep link action: "${n.hostname}"`);let r=n.searchParams.get(`cwd`)??void 0,i=n.searchParams.get(`repo`)??void 0,a=n.searchParams.get(`q`);if(r&&!r.startsWith(`/`)&&!/^[a-zA-Z]:[/\\]/.test(r))throw Error(`Invalid cwd in deep link: must be an absolute path, got "${r}"`);if(r&&E(r))throw Error(`Deep link cwd contains disallowed control characters`);if(r&&r.length>j)throw Error(`Deep link cwd exceeds ${j} characters (got ${r.length})`);if(i&&!k.test(i))throw Error(`Invalid repo in deep link: expected "owner/repo", got "${i}"`);let o;if(a&&a.trim().length>0){if(o=x(a.trim()),E(o))throw Error(`Deep link query contains disallowed control characters`);if(o.length>A)throw Error(`Deep link query exceeds ${A} characters (got ${o.length})`)}return{query:o,cwd:r,repo:i}}var O,k,A,j,M=e((()=>{S(),O=`claude-cli`,k=/^[\w.-]+\/[\w.-]+$/,A=5e3,j=4096})),N=t({MACOS_BUNDLE_ID:()=>W,ensureDeepLinkProtocolRegistered:()=>U,isProtocolHandlerCurrent:()=>H,registerProtocolHandler:()=>B});function P(){return w.join(y(),`applications`,K)}function F(e){return`Exec="${e}" --handle-uri %u`}function I(e){return`"${e}" --handle-uri "%1"`}async function L(e){let t=w.join(q,`Contents`);try{await T.rm(q,{recursive:!0})}catch(e){if(c(e)!==`ENOENT`)throw e}await T.mkdir(w.dirname(J),{recursive:!0});let n=`<?xml version="1.0" encoding="UTF-8"?>
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
@@ -1 +1 @@
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-CQF8qhne.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
+ 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,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,c as n,i as r,o as i,t as a}from"./releaseNotes-Tbd018Qz.js";function o(e){return e.map(([e,t])=>`${`Version ${e}:`}\n${t.map(e=>`· ${e}`).join(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,c as n,i as r,o as i,t as a}from"./releaseNotes-CS5L5W0H.js";function o(e){return e.map(([e,t])=>`${`Version ${e}:`}\n${t.map(e=>`· ${e}`).join(`
2
2
  `)}`).join(`
3
3
 
4
4
  `)}async function s(){let e=[];try{let n=new Promise((e,t)=>{setTimeout(e=>e(Error(`Timeout`)),500,t)});await Promise.race([r(),n]),e=t(await i())}catch{}if(e.length>0)return{type:`text`,value:o(e)};let n=t(await i());return n.length>0?{type:`text`,value:o(n)}:{type:`text`,value:`See the full changelog at: ${a}`}}e((()=>{n()}))();export{s as call};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{t as r}from"./semver-Cq33BYay.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{U as o,cn as s}from"./state-sIHsFpDu.js";import{Cc as c,dc as l,yc as u}from"./paths-4ZWdjPP4.js";import{J as d,U as f}from"./debug-otxXY3j-.js";import{d as p,f as m,o as h,s as g}from"./log-DSV4Ht5l.js";import{r as _,t as v}from"./semver-Di5OaTd5.js";import{dirname as y,join as b}from"path";import{mkdir as x,readFile as S,writeFile as C}from"fs/promises";function w(){return b(t(),`cache`,`changelog.md`)}async function T(){let e=l();if(!e.cachedChangelog)return;let t=w();try{await x(y(t),{recursive:!0}),await C(t,e.cachedChangelog,{encoding:`utf-8`,flag:`wx`})}catch{}c(({cachedChangelog:e,...t})=>t)}async function E(){if(o()||m())return;let e=await i.get(L);if(e.status===200){let t=e.data;if(t===R)return;let n=w();await x(y(n),{recursive:!0}),await C(n,t,{encoding:`utf-8`}),R=t;let r=Date.now();c(e=>({...e,changelogLastFetched:r}))}}async function D(){if(R!==null)return R;let e=w();try{let t=await S(e,`utf-8`);return R=t,t}catch{return R=``,``}}function O(){return R??``}function k(e){try{if(!e)return{};let t={},n=e.split(/^## /gm).slice(1);for(let e of n){let n=e.trim().split(`
2
- `);if(n.length===0)continue;let r=n[0];if(!r)continue;let i=r.split(` - `)[0]?.trim()||``;if(!i)continue;let a=n.slice(1).filter(e=>e.trim().startsWith(`- `)).map(e=>e.trim().substring(2).trim()).filter(Boolean);a.length>0&&(t[i]=a)}return t}catch(e){return g(d(e)),{}}}function A(e,t,n=O()){try{let r=k(n),i=(0,P.coerce)(e),a=t?(0,P.coerce)(t):null;if(!a||i&&v(i.version,a.version))return Object.entries(r).filter(([e])=>!a||v(e,a.version)).sort(([e],[t])=>v(e,t)?-1:1).flatMap(([e,t])=>t).filter(Boolean).slice(0,F)}catch(e){return g(d(e)),[]}return[]}function j(e=O()){try{let t=k(e);return Object.keys(t).sort((e,t)=>v(e,t)?1:-1).map(e=>{let n=t[e];if(!n||n.length===0)return null;let r=n.filter(Boolean);return r.length===0?null:[e,r]}).filter(e=>e!==null)}catch(e){return g(d(e)),[]}}async function M(e,t=`2.8.0`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=await D();(e!==t||!n)&&E().catch(e=>g(d(e)));let r=A(t,e,n);return{hasReleaseNotes:r.length>0,releaseNotes:r}}function N(e,t=`2.8.0`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=A(t,e);return{hasReleaseNotes:n.length>0,releaseNotes:n}}var P,F,I,L,R,z=e((()=>{a(),P=r(),s(),u(),n(),f(),h(),p(),_(),F=5,I=`https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md`,L=`https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md`,R=null}));export{j as a,z as c,E as i,T as l,M as n,D as o,N as r,O as s,I as t,k as u};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{t as r}from"./semver-Cq33BYay.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{U as o,cn as s}from"./state-sIHsFpDu.js";import{Cc as c,dc as l,yc as u}from"./paths-CEAy4QCs.js";import{J as d,U as f}from"./debug-otxXY3j-.js";import{d as p,f as m,o as h,s as g}from"./log-DSV4Ht5l.js";import{r as _,t as v}from"./semver-Di5OaTd5.js";import{dirname as y,join as b}from"path";import{mkdir as x,readFile as S,writeFile as C}from"fs/promises";function w(){return b(t(),`cache`,`changelog.md`)}async function T(){let e=l();if(!e.cachedChangelog)return;let t=w();try{await x(y(t),{recursive:!0}),await C(t,e.cachedChangelog,{encoding:`utf-8`,flag:`wx`})}catch{}c(({cachedChangelog:e,...t})=>t)}async function E(){if(o()||m())return;let e=await i.get(L);if(e.status===200){let t=e.data;if(t===R)return;let n=w();await x(y(n),{recursive:!0}),await C(n,t,{encoding:`utf-8`}),R=t;let r=Date.now();c(e=>({...e,changelogLastFetched:r}))}}async function D(){if(R!==null)return R;let e=w();try{let t=await S(e,`utf-8`);return R=t,t}catch{return R=``,``}}function O(){return R??``}function k(e){try{if(!e)return{};let t={},n=e.split(/^## /gm).slice(1);for(let e of n){let n=e.trim().split(`
2
+ `);if(n.length===0)continue;let r=n[0];if(!r)continue;let i=r.split(` - `)[0]?.trim()||``;if(!i)continue;let a=n.slice(1).filter(e=>e.trim().startsWith(`- `)).map(e=>e.trim().substring(2).trim()).filter(Boolean);a.length>0&&(t[i]=a)}return t}catch(e){return g(d(e)),{}}}function A(e,t,n=O()){try{let r=k(n),i=(0,P.coerce)(e),a=t?(0,P.coerce)(t):null;if(!a||i&&v(i.version,a.version))return Object.entries(r).filter(([e])=>!a||v(e,a.version)).sort(([e],[t])=>v(e,t)?-1:1).flatMap(([e,t])=>t).filter(Boolean).slice(0,F)}catch(e){return g(d(e)),[]}return[]}function j(e=O()){try{let t=k(e);return Object.keys(t).sort((e,t)=>v(e,t)?1:-1).map(e=>{let n=t[e];if(!n||n.length===0)return null;let r=n.filter(Boolean);return r.length===0?null:[e,r]}).filter(e=>e!==null)}catch(e){return g(d(e)),[]}}async function M(e,t=`2.8.2`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=await D();(e!==t||!n)&&E().catch(e=>g(d(e)));let r=A(t,e,n);return{hasReleaseNotes:r.length>0,releaseNotes:r}}function N(e,t=`2.8.2`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=A(t,e);return{hasReleaseNotes:n.length>0,releaseNotes:n}}var P,F,I,L,R,z=e((()=>{a(),P=r(),s(),u(),n(),f(),h(),p(),_(),F=5,I=`https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md`,L=`https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md`,R=null}));export{j as a,z as c,E as i,T as l,M as n,D as o,N as r,O as s,I as t,k as u};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{s as t}from"./envUtils-BWeoiL4Y.js";import{cn as n}from"./state-sIHsFpDu.js";import{l as r,o as i}from"./stringUtils-KZoO4GUd.js";import{BA as a}from"./loadAgentsDir-CQF8qhne.js";import{t as o}from"./settingsSync-Nixbcaox.js";import{n as s,t as c}from"./refresh-CP7Dnjp4.js";function l(e,t){return`${e} ${r(e,t)}`}var u;e((()=>{n(),o(),t(),c(),a(),i(),u=async(e,t)=>{let n=await s(t.setAppState),r=`Reloaded: ${[l(n.enabled_count,`plugin`),l(n.command_count,`skill`),l(n.agent_count,`agent`),l(n.hook_count,`hook`),l(n.mcp_count,`plugin MCP server`),l(n.lsp_count,`plugin LSP server`)].join(` · `)}`;return n.error_count>0&&(r+=`\n${l(n.error_count,`error`)} during load. Run /doctor for details.`),{type:`text`,value:r}}}))();export{u as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{s as t}from"./envUtils-BWeoiL4Y.js";import{cn as n}from"./state-sIHsFpDu.js";import{l as r,o as i}from"./stringUtils-KZoO4GUd.js";import{BA as a}from"./loadAgentsDir-DC4jN6-f.js";import{t as o}from"./settingsSync-3xG2A_wN.js";import{n as s,t as c}from"./refresh-DmEsCaJ0.js";function l(e,t){return`${e} ${r(e,t)}`}var u;e((()=>{n(),o(),t(),c(),a(),i(),u=async(e,t)=>{let n=await s(t.setAppState),r=`Reloaded: ${[l(n.enabled_count,`plugin`),l(n.command_count,`skill`),l(n.agent_count,`agent`),l(n.hook_count,`hook`),l(n.mcp_count,`plugin MCP server`),l(n.lsp_count,`plugin LSP server`)].join(` · `)}`;return n.error_count>0&&(r+=`\n${l(n.error_count,`error`)} during load. Run /doctor for details.`),{type:`text`,value:r}}}))();export{u as call};