claude-code-best 2.6.13 → 2.7.0

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 (814) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-BqR8LhJq.js +1 -0
  2. package/dist/chunks/App-DkBMWXkK.js +1 -0
  3. package/dist/chunks/ApproveApiKey-5xd0lUV7.js +1 -0
  4. package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +1 -0
  12. package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-ws8prcNK.js +1 -0
  14. package/dist/chunks/DiffDialog-BhqgxA7o.js +3 -0
  15. package/dist/chunks/Doctor-BWouB_9X.js +1 -0
  16. package/dist/chunks/Doctor-Ts5k8hn1.js +3 -0
  17. package/dist/chunks/ExitFlow-BBoImtT_.js +2 -0
  18. package/dist/chunks/Feedback-BVbSMBwY.js +2 -0
  19. package/dist/chunks/Grove-CTQrX7WO.js +1 -0
  20. package/dist/chunks/Grove-ZMHK4CBZ.js +11 -0
  21. package/dist/chunks/HybridTransport-B9g074Y1.js +4 -0
  22. package/dist/chunks/ITermBackend-DaFK8DOH.js +1 -0
  23. package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +1 -0
  24. package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +1 -0
  25. package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +1 -0
  26. package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +1 -0
  27. package/dist/chunks/MessageSelector-BT1FDbwv.js +3 -0
  28. package/dist/chunks/Messages-DT2gDtrJ.js +11 -0
  29. package/dist/chunks/Onboarding-DsqnXQel.js +1 -0
  30. package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +1 -0
  31. package/dist/chunks/PluginSettings-OJQz3d5V.js +17 -0
  32. package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +1 -0
  33. package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +1 -0
  34. package/dist/chunks/QueryEngine-_re1pGHr.js +1 -0
  35. package/dist/chunks/REPL-eBTeslsR.js +147 -0
  36. package/dist/chunks/REPL-wIg0cBqS.js +1 -0
  37. package/dist/chunks/RemoteCallout-DMQai8_P.js +1 -0
  38. package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +2 -0
  39. package/dist/chunks/ResumeConversation-D81hDeTl.js +1 -0
  40. package/dist/chunks/SSETransport-BbeM6bi9.js +4 -0
  41. package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +2 -0
  43. package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +1 -0
  44. package/dist/chunks/Settings-DiXc-_IG.js +2 -0
  45. package/dist/chunks/TeleportProgress-B3oRJlWH.js +1 -0
  46. package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +1 -0
  47. package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +1 -0
  48. package/dist/chunks/ThemePicker-BjSRjA_L.js +1 -0
  49. package/dist/chunks/TmuxBackend-BE3zsPKE.js +9 -0
  50. package/dist/chunks/TrustDialog-B6Qg0xUr.js +1 -0
  51. package/dist/chunks/ValidationErrorsList-C5BoLiye.js +2 -0
  52. package/dist/chunks/WelcomeV2-BJAKZYz1.js +1 -0
  53. package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +2 -0
  54. package/dist/chunks/add-dir-OR7-VVcq.js +1 -0
  55. package/dist/chunks/agentDisplay-CMqTUh0A.js +1 -0
  56. package/dist/chunks/agents-DRtgUZ6t.js +103 -0
  57. package/dist/chunks/agents-EolUGDZB.js +2 -0
  58. package/dist/chunks/ant-Bgl31h7a.js +1 -0
  59. package/dist/chunks/api-BpQPVgif.js +1 -0
  60. package/dist/chunks/api-xFvB7WoB.js +1 -0
  61. package/dist/chunks/asciicast-CJObpRg9.js +1 -0
  62. package/dist/chunks/asciicast-Dr_Div_R.js +4 -0
  63. package/dist/chunks/assistant-CENsWvTb.js +1 -0
  64. package/dist/chunks/assistant-CHawoD04.js +1 -0
  65. package/dist/chunks/assistant-s7XNIA76.js +1 -0
  66. package/dist/chunks/auth-DX12yVM8.js +1 -0
  67. package/dist/chunks/auth-h6VL9BbC.js +1 -0
  68. package/dist/chunks/autoMode-BDzVqEPm.js +45 -0
  69. package/dist/chunks/autonomy-CeqOXzJl.js +19 -0
  70. package/dist/chunks/autonomy-D2YudQnH.js +1 -0
  71. package/dist/chunks/autonomyPanel-B0OQV4lv.js +1 -0
  72. package/dist/chunks/backgroundHousekeeping-CvHD981l.js +17 -0
  73. package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +1 -0
  74. package/dist/chunks/banner-DNLUJFS_.js +2 -0
  75. package/dist/chunks/bg-D_H-uZDS.js +9 -0
  76. package/dist/chunks/bg-FtpmvQuT.js +1 -0
  77. package/dist/chunks/branch-D44HjlJp.js +3 -0
  78. package/dist/chunks/bridge-4sldfa8u.js +2 -0
  79. package/dist/chunks/bridgeConfig-BM7iHryd.js +1 -0
  80. package/dist/chunks/bridgeConfig-CcCNsSBX.js +1 -0
  81. package/dist/chunks/bridgeEnabled-CYddgTU1.js +1 -0
  82. package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +1 -0
  83. package/dist/chunks/bridgeMain-DaO51duk.js +68 -0
  84. package/dist/chunks/bridgeMain-Dc4-ZK69.js +1 -0
  85. package/dist/chunks/bridgeMessaging-IlSWKGmC.js +1 -0
  86. package/dist/chunks/bridgePointer-fFD_tbSk.js +1 -0
  87. package/dist/chunks/browser-DwnUS505.js +1 -0
  88. package/dist/chunks/btw-CrdUyRUP.js +1 -0
  89. package/dist/chunks/buddy-Ci0hdCf9.js +3 -0
  90. package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +1 -0
  91. package/dist/chunks/caches-BHRJHGlc.js +1 -0
  92. package/dist/chunks/caches-CitduRKp.js +3 -0
  93. package/dist/chunks/ccrClient-yNKhQYnf.js +1 -0
  94. package/dist/chunks/changeDetector-B1tCH9Pa.js +1 -0
  95. package/dist/chunks/channelNotification-D8NPg8I8.js +1 -0
  96. package/dist/chunks/channelNotification-oE3eipDZ.js +1 -0
  97. package/dist/chunks/chrome-CwAwCY0V.js +1 -0
  98. package/dist/chunks/chromeNativeHost-63xqELw-.js +1 -0
  99. package/dist/chunks/claudeDesktop-CX1AsJie.js +1 -0
  100. package/dist/chunks/cleanup-C0gyKaOb.js +1 -0
  101. package/dist/chunks/clear-B5D08sZ0.js +1 -0
  102. package/dist/chunks/cliLaunch-8aeIk2ts.js +1 -0
  103. package/dist/chunks/client-un1k_6md.js +1 -0
  104. package/dist/chunks/color-BtVvrSvq.js +1 -0
  105. package/dist/chunks/commands--qEK1j9j.js +1 -0
  106. package/dist/chunks/commitAttribution-AEb-sE-t.js +1 -0
  107. package/dist/chunks/commitAttribution-HP_CWP0X.js +2 -0
  108. package/dist/chunks/common-BBRP_KzA.js +1 -0
  109. package/dist/chunks/common-BD4Q7osK.js +1 -0
  110. package/dist/chunks/common-C56I-_O3.js +1 -0
  111. package/dist/chunks/compact-BNhxD2UA.js +3 -0
  112. package/dist/chunks/companion-BlhNrZiL.js +1 -0
  113. package/dist/chunks/completionCache-BHSsdkBs.js +1 -0
  114. package/dist/chunks/completionCache-Daqaxlf3.js +4 -0
  115. package/dist/chunks/computerUseLock-BoEK9xYv.js +1 -0
  116. package/dist/chunks/config-9z8716kz.js +1 -0
  117. package/dist/chunks/config-f8Cx16Z6.js +1 -0
  118. package/dist/chunks/context-BdOjhAmM.js +1 -0
  119. package/dist/chunks/context-noninteractive-CnaDbgvf.js +54 -0
  120. package/dist/chunks/context-noninteractive-DRM7gbFk.js +1 -0
  121. package/dist/chunks/conversation-B9pq-m4L.js +1 -0
  122. package/dist/chunks/conversation-DUxXVrGj.js +1 -0
  123. package/dist/chunks/copy-Cjl0-hg1.js +7 -0
  124. package/dist/chunks/createSSHSession-CYaHalxc.js +6 -0
  125. package/dist/chunks/createSession-DoR2K7ay.js +1 -0
  126. package/dist/chunks/createSession-VlSLvi7J.js +1 -0
  127. package/dist/chunks/cronJitterConfig-DjSd7nvj.js +6 -0
  128. package/dist/chunks/crossProjectResume-CDWr5DFl.js +40 -0
  129. package/dist/chunks/daemon-FAp0WyY6.js +2 -0
  130. package/dist/chunks/datadog-CahWdK03.js +1 -0
  131. package/dist/chunks/datadog-DPkKCR8M.js +1 -0
  132. package/dist/chunks/debug-DIYxb3SF.js +1 -0
  133. package/dist/chunks/debug-otxXY3j-.js +5 -0
  134. package/dist/chunks/debugUtils-CiEnbhiz.js +1 -0
  135. package/dist/chunks/desktop-y3mzgaWo.js +1 -0
  136. package/dist/chunks/detached-Brq3-vHi.js +5 -0
  137. package/dist/chunks/detectRepository-CSN3yxkq.js +1 -0
  138. package/dist/chunks/detectRepository-CbR0WgtE.js +1 -0
  139. package/dist/chunks/detection-BPPZCanO.js +1 -0
  140. package/dist/chunks/detection-DrdKrqbQ.js +1 -0
  141. package/dist/chunks/diff-hpp0dp6U.js +1 -0
  142. package/dist/chunks/directoryCompletion-DAc3u1K2.js +1 -0
  143. package/dist/chunks/doctor-B230p0R_.js +1 -0
  144. package/dist/chunks/earlyInput-vv9abU2L.js +1 -0
  145. package/dist/chunks/effort-D7i2v6vd.js +9 -0
  146. package/dist/chunks/entry-Du3gtq9o.js +14 -0
  147. package/dist/chunks/env-BH-OBzcA.js +1 -0
  148. package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +1 -0
  149. package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +1 -0
  150. package/dist/chunks/escHotkey-DfdC44i7.js +259 -0
  151. package/dist/chunks/execFileNoThrow-B_aZH_GP.js +1 -0
  152. package/dist/chunks/execSyncWrapper-Bn7EJqtD.js +1 -0
  153. package/dist/chunks/executor-BJb5d6mo.js +1 -0
  154. package/dist/chunks/executor-Dmn3RTuI.js +1561 -0
  155. package/dist/chunks/exit-fntBGxEC.js +1 -0
  156. package/dist/chunks/export-Dy9M7FnZ.js +2 -0
  157. package/dist/chunks/exportRenderer-Ckv4v0ye.js +1 -0
  158. package/dist/chunks/extra-usage-DLEvlKzs.js +1 -0
  159. package/dist/chunks/extra-usage-core-3KkeQSve.js +1 -0
  160. package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +1 -0
  161. package/dist/chunks/extra-usage-pU11YXHS.js +1 -0
  162. package/dist/chunks/extraUsage-B-l-oe-7.js +1 -0
  163. package/dist/chunks/extractMemories-CXarlmZp.js +1 -0
  164. package/dist/chunks/fast-BzfzSH7K.js +1 -0
  165. package/dist/chunks/fast-CbLu_WYL.js +1 -0
  166. package/dist/chunks/feedback-DiyZIbov.js +1 -0
  167. package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +1 -0
  168. package/dist/chunks/flushGate-Ci3NHOV4.js +1 -0
  169. package/dist/chunks/gates-CtkQH6jy.js +1 -0
  170. package/dist/chunks/gates-xscCu8-N.js +1 -0
  171. package/dist/chunks/gemini-BCuY2aYj.js +1 -0
  172. package/dist/chunks/generateRecap-DA0SNyFR.js +1 -0
  173. package/dist/chunks/generateSessionName-BtQ4NGXP.js +1 -0
  174. package/dist/chunks/genericProcessUtils-D-78JZxz.js +23 -0
  175. package/dist/chunks/git-BZEgupMC.js +1 -0
  176. package/dist/chunks/git-DayFjsvj.js +6 -0
  177. package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +1 -0
  178. package/dist/chunks/goal-B6GHfd9J.js +3 -0
  179. package/dist/chunks/grok-DDM6xYuy.js +1 -0
  180. package/dist/chunks/growthbook-D-Po5Uxl.js +1 -0
  181. package/dist/chunks/heapdump-DHlUfpVV.js +5 -0
  182. package/dist/chunks/help-BulgC9m7.js +1 -0
  183. package/dist/chunks/hooks-D5AcFnD1.js +1 -0
  184. package/dist/chunks/hooks-jxIrev-X.js +79 -0
  185. package/dist/chunks/hostAdapter-BvraKy0o.js +1 -0
  186. package/dist/chunks/hostGuard-CWijeIyE.js +1 -0
  187. package/dist/chunks/ide-tx4qMFln.js +2 -0
  188. package/dist/chunks/inboundAttachments-C93Q7Dvt.js +1 -0
  189. package/dist/chunks/inboundAttachments-DxcFiX4f.js +1 -0
  190. package/dist/chunks/initReplBridge-BEldrf6f.js +1 -0
  191. package/dist/chunks/insights-HEsEDeCQ.js +822 -0
  192. package/dist/chunks/install-DRsM0bJO.js +1 -0
  193. package/dist/chunks/install-github-app-BVK5Z95c.js +147 -0
  194. package/dist/chunks/install-slack-app-DCw3O2J_.js +1 -0
  195. package/dist/chunks/instrumentation-DJ-R1s8C.js +12 -0
  196. package/dist/chunks/job-CUz_OGIq.js +2 -0
  197. package/dist/chunks/jwtUtils-DVyv2jab.js +1 -0
  198. package/dist/chunks/keybindings-Chr5nGBu.js +2 -0
  199. package/dist/chunks/lang-C7kJlPIh.js +1 -0
  200. package/dist/chunks/language-CQXwoDkI.js +1 -0
  201. package/dist/chunks/language-Lx3WlBN6.js +1 -0
  202. package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +1 -0
  203. package/dist/chunks/launchAutofixPr-Cww8uS_5.js +18 -0
  204. package/dist/chunks/launchLocalMemory-BywmyvSJ.js +3 -0
  205. package/dist/chunks/launchLocalVault-BU3a5NV7.js +3 -0
  206. package/dist/chunks/launchMemoryStores-QUCODCJS.js +1 -0
  207. package/dist/chunks/launchOnboarding-BriZ0oIA.js +8 -0
  208. package/dist/chunks/launchSchedule-uLm7zt_B.js +1 -0
  209. package/dist/chunks/launchSkillStore-DMo2bV8X.js +1 -0
  210. package/dist/chunks/launchTeleport-DgQWSfXM.js +3 -0
  211. package/dist/chunks/launchVault-DfnBBFne.js +1 -0
  212. package/dist/chunks/loadAgentsDir-Br5fGLLI.js +4697 -0
  213. package/dist/chunks/loadAgentsDir-DDYPdQKP.js +1 -0
  214. package/dist/chunks/loadPluginHooks-C4soqr6g.js +1 -0
  215. package/dist/chunks/localSearch-CELyiWF6.js +1 -0
  216. package/dist/chunks/localSearch-DhZMcy5t.js +1 -0
  217. package/dist/chunks/log-DS97_rIr.js +1 -0
  218. package/dist/chunks/login-CvvIpkpq.js +1 -0
  219. package/dist/chunks/login-DjgITOAw.js +1 -0
  220. package/dist/chunks/logoV2Utils-BN_HrHSc.js +1 -0
  221. package/dist/chunks/logout-DOFJpZEJ.js +1 -0
  222. package/dist/chunks/magicDocs-2Zr7bYY_.js +57 -0
  223. package/dist/chunks/main-BafHJuKH.js +31 -0
  224. package/dist/chunks/main-D61CvHRy.js +1312 -0
  225. package/dist/chunks/mappers-BCiceNt3.js +1 -0
  226. package/dist/chunks/mcp-BV4m1Gbl.js +2 -0
  227. package/dist/chunks/mcp-CrAgAK9u.js +1 -0
  228. package/dist/chunks/mcp-DK4m73gO.js +6 -0
  229. package/dist/chunks/mcpServer-7zyXl9Wg.js +1 -0
  230. package/dist/chunks/mcpServer-sa9Z183j.js +1 -0
  231. package/dist/chunks/memoize-CPexXTP7.js +1 -0
  232. package/dist/chunks/memory-BrJPVgxn.js +1 -0
  233. package/dist/chunks/mode-Cr-NTlRa.js +2 -0
  234. package/dist/chunks/model-CCjuMV6k.js +1 -0
  235. package/dist/chunks/model-aJS_plgM.js +1 -0
  236. package/dist/chunks/onChangeAppState-C9EvI3EH.js +1 -0
  237. package/dist/chunks/openai-Cvb_-1A-.js +10 -0
  238. package/dist/chunks/overageCreditGrant-cGQilawd.js +1 -0
  239. package/dist/chunks/panel-DO_faHV-.js +1 -0
  240. package/dist/chunks/panelCall-DqZuxAf0.js +1 -0
  241. package/dist/chunks/parser-BXWr_mLL.js +1 -0
  242. package/dist/chunks/parser-DbKSpFRq.js +1 -0
  243. package/dist/chunks/passes-DsrceO14.js +1 -0
  244. package/dist/chunks/path-nCzt96pE.js +1 -0
  245. package/dist/chunks/paths-DfGsIjPm.js +39 -0
  246. package/dist/chunks/permissions-CjPIu4IE.js +3 -0
  247. package/dist/chunks/pipeTransport-C5u1K0wu.js +1 -0
  248. package/dist/chunks/plan-YjMAcn6g.js +1 -0
  249. package/dist/chunks/platform-DYZVoA9J.js +2 -0
  250. package/dist/chunks/plugin-Oux5bBQj.js +1 -0
  251. package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +1 -0
  252. package/dist/chunks/pluginBlocklist-BzI5DNeN.js +1 -0
  253. package/dist/chunks/pluginCliCommands-CExAcsaR.js +1 -0
  254. package/dist/chunks/pluginFlagging-BeqrbhgG.js +1 -0
  255. package/dist/chunks/pluginOperations-s0FQGOBm.js +2 -0
  256. package/dist/chunks/pluginStartupCheck-BVag9B-T.js +1 -0
  257. package/dist/chunks/pluginStartupCheck-BuorUEEf.js +1 -0
  258. package/dist/chunks/plugins-DTQHVJtY.js +4 -0
  259. package/dist/chunks/policyLimits-zoyF_6O4.js +1 -0
  260. package/dist/chunks/pollConfig-C19GiX7i.js +1 -0
  261. package/dist/chunks/poor-Bx5vvamq.js +1 -0
  262. package/dist/chunks/poorMode-BCoeB5zB.js +1 -0
  263. package/dist/chunks/poorMode-CTd_csCl.js +1 -0
  264. package/dist/chunks/print-UXl3rG8y.js +39 -0
  265. package/dist/chunks/privacy-settings-e43D9a4o.js +1 -0
  266. package/dist/chunks/processBashCommand-CvR9-gf8.js +1 -0
  267. package/dist/chunks/processSlashCommand-CB3wyAX7.js +6 -0
  268. package/dist/chunks/projectContext-D3_u80TY.js +1 -0
  269. package/dist/chunks/prompt-53lRY98R.js +1 -0
  270. package/dist/chunks/prompt-B8M-HLIS.js +227 -0
  271. package/dist/chunks/prompt-CooZNM1u.js +1 -0
  272. package/dist/chunks/promptEditor-CHiopfD7.js +4 -0
  273. package/dist/chunks/protocolHandler-DjivYn8H.js +13 -0
  274. package/dist/chunks/proxy-nPT6a6QY.js +99 -0
  275. package/dist/chunks/rate-limit-options-B-vndk5W.js +1 -0
  276. package/dist/chunks/rcDebugLog-BoroyfjB.js +11 -0
  277. package/dist/chunks/referral-DOqhciQu.js +1 -0
  278. package/dist/chunks/refresh-C8uLznwm.js +1 -0
  279. package/dist/chunks/registerProtocol-4lQ7O4Cc.js +36 -0
  280. package/dist/chunks/registry-q6v98JYd.js +1 -0
  281. package/dist/chunks/release-notes-C7JHshX3.js +4 -0
  282. package/dist/chunks/releaseNotes-CXY-xAja.js +2 -0
  283. package/dist/chunks/reload-plugins-DLS5lQcc.js +1 -0
  284. package/dist/chunks/remote-env-DhHea8yK.js +1 -0
  285. package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +1 -0
  286. package/dist/chunks/remoteControlServer-CI0F83pg.js +3 -0
  287. package/dist/chunks/rename-DiKWWCzB.js +1 -0
  288. package/dist/chunks/renderOptions-DKe32LfM.js +1 -0
  289. package/dist/chunks/resume-DA4ToJFW.js +2 -0
  290. package/dist/chunks/runtimeObserver-BfVC8KK9.js +1 -0
  291. package/dist/chunks/runtimeObserver-DetZ5Tek.js +10 -0
  292. package/dist/chunks/sandbox-adapter-wh4cKN45.js +1 -0
  293. package/dist/chunks/sandbox-toggle-D8MgV0DT.js +1 -0
  294. package/dist/chunks/searchExtraTools-DbPpcAPw.js +1 -0
  295. package/dist/chunks/sentry-C3sL9nhF.js +13 -0
  296. package/dist/chunks/session-Bd-4QCqc.js +2 -0
  297. package/dist/chunks/sessionDiscovery-D_KPF86E.js +1 -0
  298. package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +1 -0
  299. package/dist/chunks/sessionMemory-0Jqo1_MV.js +1 -0
  300. package/dist/chunks/sessionMemory-BDt_8bNB.js +1 -0
  301. package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +1 -0
  302. package/dist/chunks/sessionObserver-CEky1SLb.js +1 -0
  303. package/dist/chunks/sessionObserver-CQxIKV8D.js +20 -0
  304. package/dist/chunks/sessionStorage-D1XhqZyW.js +1 -0
  305. package/dist/chunks/sessionTitle-CB0ZEkS_.js +14 -0
  306. package/dist/chunks/sessionTracing-BIKXLTJZ.js +11 -0
  307. package/dist/chunks/settingsSync-pI3L3CeR.js +1 -0
  308. package/dist/chunks/setup-BSi50fkU.js +1 -0
  309. package/dist/chunks/setup-DjsmjRKQ.js +2 -0
  310. package/dist/chunks/setup-Dq0_SRA1.js +9 -0
  311. package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +1 -0
  312. package/dist/chunks/shellQuote-D8XPeqkc.js +1 -0
  313. package/dist/chunks/sideQuestion-BrTA8ooG.js +20 -0
  314. package/dist/chunks/sink-CqWxcRl9.js +1 -0
  315. package/dist/chunks/sink-Dkat5kH9.js +1 -0
  316. package/dist/chunks/sinks--frMI4-5.js +2 -0
  317. package/dist/chunks/sinks-CvPAVcMY.js +1 -0
  318. package/dist/chunks/skill-learning-2LV0yuwF.js +5 -0
  319. package/dist/chunks/skillChangeDetector-B5CGPl7e.js +1 -0
  320. package/dist/chunks/skillGapStore-Dc29T-OG.js +1 -0
  321. package/dist/chunks/skillGapStore-KzRf6Ezr.js +5 -0
  322. package/dist/chunks/skillGenerator-BdOHsgc4.js +8 -0
  323. package/dist/chunks/skillLearning-CdcVIG14.js +1 -0
  324. package/dist/chunks/skillLearning-DXWMxSA2.js +1 -0
  325. package/dist/chunks/skillPanel-zMY8o-86.js +28 -0
  326. package/dist/chunks/skillSearchPanel-l8aolUP8.js +21 -0
  327. package/dist/chunks/skills-BeMWJPup.js +1 -0
  328. package/dist/chunks/sprites-qel_EgTP.js +1 -0
  329. package/dist/chunks/startupProfiler-CnDpob1v.js +3 -0
  330. package/dist/chunks/startupProfiler-TrMfE6Q4.js +1 -0
  331. package/dist/chunks/stats-CEBfahqM.js +1 -0
  332. package/dist/chunks/status-C9KXyfDk.js +1 -0
  333. package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +1 -0
  334. package/dist/chunks/stickers-eHrGA1W5.js +1 -0
  335. package/dist/chunks/tag-Dvl7Us9y.js +11 -0
  336. package/dist/chunks/tasks-BhiwUF0n.js +1 -0
  337. package/dist/chunks/teamHelpers-COQazluD.js +1 -0
  338. package/dist/chunks/teamHelpers-Mgfrv-Jf.js +1 -0
  339. package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +1 -0
  340. package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +1 -0
  341. package/dist/chunks/teleport-U5Zgqw3H.js +1 -0
  342. package/dist/chunks/templateJobs-C3idypN_.js +12 -0
  343. package/dist/chunks/terminalSetup-CmAEgt-5.js +33 -0
  344. package/dist/chunks/terminalSetup-mvAN4no7.js +1 -0
  345. package/dist/chunks/theme-BD2H4vJi.js +1 -0
  346. package/dist/chunks/thinkback-BOByXYp2.js +1 -0
  347. package/dist/chunks/thinkback-Dzu2mnNF.js +1 -0
  348. package/dist/chunks/thinkback-play-BX1K2UMY.js +1 -0
  349. package/dist/chunks/tmux-DruHFjDy.js +1 -0
  350. package/dist/chunks/toolEventObserver-B6cLV_dK.js +1 -0
  351. package/dist/chunks/toolEventObserver-i6it3p2_.js +1 -0
  352. package/dist/chunks/toolPool--2gNFbrz.js +1 -0
  353. package/dist/chunks/toolPool-dNV2JxUI.js +1 -0
  354. package/dist/chunks/trustedDevice-DY8OosTr.js +1 -0
  355. package/dist/chunks/trustedDevice-zya_Ml1N.js +1 -0
  356. package/dist/chunks/tui-KoYD82tT.js +6 -0
  357. package/dist/chunks/types-D5R26wwH.js +17 -0
  358. package/dist/chunks/udsClient-RkYuzeZC.js +1 -0
  359. package/dist/chunks/ultrareviewCommand-CCkKby4J.js +3 -0
  360. package/dist/chunks/undercover-CIutVLEO.js +1 -0
  361. package/dist/chunks/undercover-D9O2McNG.js +31 -0
  362. package/dist/chunks/up-BPM85EYl.js +12 -0
  363. package/dist/chunks/updateCCB-Bmn3Y63Y.js +11 -0
  364. package/dist/chunks/upgrade-D3rVOeHO.js +1 -0
  365. package/dist/chunks/upgrade-Dq3l14ZY.js +1 -0
  366. package/dist/chunks/upload-1PmElPfW.js +1 -0
  367. package/dist/chunks/upstreamproxy-BBTSJnad.js +11 -0
  368. package/dist/chunks/usage-B5G8FOZ3.js +1 -0
  369. package/dist/chunks/usage-VtTu7beE.js +1 -0
  370. package/dist/chunks/useMainLoopModel-CaQLIr1V.js +1 -0
  371. package/dist/chunks/useManagePlugins-BvoeOnqq.js +1 -0
  372. package/dist/chunks/useMergedTools-C133BfRp.js +1 -0
  373. package/dist/chunks/useSearchInput-CROB7AbC.js +1 -0
  374. package/dist/chunks/useSettingsErrors-DRxtFXoe.js +1 -0
  375. package/dist/chunks/useVoice-BQ9aSFJe.js +1 -0
  376. package/dist/chunks/util-BZnJgF79.js +1 -0
  377. package/dist/chunks/utils-4gsxQpga.js +1 -0
  378. package/dist/chunks/validatePlugin-DlrnBhPA.js +1 -0
  379. package/dist/chunks/vim-BXQCLoFJ.js +1 -0
  380. package/dist/chunks/voice-CeRmLRHT.js +2 -0
  381. package/dist/chunks/voice-QHyDff3f.js +8 -0
  382. package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +1 -0
  383. package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +1 -0
  384. package/dist/chunks/voiceStreamSTT-BDKenO5F.js +1 -0
  385. package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +1 -0
  386. package/dist/chunks/which-BnEnzWhs.js +1 -0
  387. package/dist/chunks/windowsPaths-43st5EQF.js +1 -0
  388. package/dist/chunks/windowsPaths-DerzGPcz.js +2 -0
  389. package/dist/chunks/workSecret-qRMNrQy2.js +1 -0
  390. package/dist/chunks/workerRegistry-BUD3lBk_.js +1 -0
  391. package/dist/chunks/worktree-C0f9Ke-R.js +1 -0
  392. package/dist/chunks/xml-DvVQHZ1N.js +1 -0
  393. package/dist/cli.js +1 -1
  394. package/package.json +1 -1
  395. package/dist/chunks/AddWorkspaceDirectory-BKIYdg96.js +0 -1
  396. package/dist/chunks/App-BAwWP3iN.js +0 -1
  397. package/dist/chunks/ApproveApiKey-CJFvgVKS.js +0 -1
  398. package/dist/chunks/ApproveApiKey-da08NX2f.js +0 -1
  399. package/dist/chunks/AssistantSessionChooser-DQMKGO_q.js +0 -1
  400. package/dist/chunks/BackgroundTasksDialog-Jtiqm4k2.js +0 -2
  401. package/dist/chunks/BypassPermissionsModeDialog-D7TJ4Qn1.js +0 -1
  402. package/dist/chunks/ClaudeInChromeOnboarding-CuPz5Xfi.js +0 -1
  403. package/dist/chunks/ClaudeMdExternalIncludesDialog-CRC6kEV1.js +0 -1
  404. package/dist/chunks/ClaudeMdExternalIncludesDialog-J0uv5XzG.js +0 -1
  405. package/dist/chunks/ConsoleOAuthFlow-CE4OlAHo.js +0 -1
  406. package/dist/chunks/DesktopHandoff-B_vNnZS5.js +0 -1
  407. package/dist/chunks/DevChannelsDialog-kjRnWtNf.js +0 -1
  408. package/dist/chunks/DiffDialog-CSBWOnXJ.js +0 -3
  409. package/dist/chunks/Doctor-DhK599q8.js +0 -1
  410. package/dist/chunks/Doctor-VJ5ZGb8g.js +0 -3
  411. package/dist/chunks/ExitFlow-M5XPGBHL.js +0 -2
  412. package/dist/chunks/Feedback-FHvqI2bu.js +0 -2
  413. package/dist/chunks/Grove-68muTpx6.js +0 -1
  414. package/dist/chunks/Grove-BC2IZIhN.js +0 -11
  415. package/dist/chunks/HybridTransport-Df_FceV2.js +0 -4
  416. package/dist/chunks/ITermBackend-DkpK9X1H.js +0 -1
  417. package/dist/chunks/InvalidConfigDialog-Cm6Yvt00.js +0 -1
  418. package/dist/chunks/InvalidSettingsDialog-Ai3D8AL1.js +0 -1
  419. package/dist/chunks/MCPConnectionManager-BqNXYQEr.js +0 -1
  420. package/dist/chunks/McpParsingWarnings-BZcVbGhE.js +0 -1
  421. package/dist/chunks/MessageSelector-BXOoEogr.js +0 -3
  422. package/dist/chunks/Messages-F6OIAv8C.js +0 -11
  423. package/dist/chunks/Onboarding-n1aA7tmN.js +0 -1
  424. package/dist/chunks/OverageCreditUpsell-Bt23I92r.js +0 -1
  425. package/dist/chunks/PluginSettings-Dgu23nzv.js +0 -17
  426. package/dist/chunks/PromptInputFooterSuggestions-uiV23aG4.js +0 -1
  427. package/dist/chunks/PromptInputHelpMenu-D84vnNKM.js +0 -1
  428. package/dist/chunks/QueryEngine-CEodAvI2.js +0 -1
  429. package/dist/chunks/REPL-CTTa9BK0.js +0 -97
  430. package/dist/chunks/REPL-IO7wsKaQ.js +0 -1
  431. package/dist/chunks/RemoteCallout-BYKqws96.js +0 -1
  432. package/dist/chunks/RemoteSessionManager-Dq0W_fcj.js +0 -2
  433. package/dist/chunks/ResumeConversation-CxzeCdL8.js +0 -1
  434. package/dist/chunks/SSETransport-CJrrD1ln.js +0 -4
  435. package/dist/chunks/SearchExtraToolsTool-DI-36R5p.js +0 -1
  436. package/dist/chunks/SentryErrorBoundary-BKPxEWOf.js +0 -1
  437. package/dist/chunks/SentryErrorBoundary-CcI0kkLW.js +0 -2
  438. package/dist/chunks/Settings-CGcBR9CD.js +0 -2
  439. package/dist/chunks/TeleportProgress-C7muqjDw.js +0 -1
  440. package/dist/chunks/TeleportRepoMismatchDialog-B3pUiRc2.js +0 -1
  441. package/dist/chunks/TeleportResumeWrapper-ClyBQR3K.js +0 -1
  442. package/dist/chunks/ThemePicker-CGIB6YiW.js +0 -1
  443. package/dist/chunks/TmuxBackend-m2ldrneQ.js +0 -9
  444. package/dist/chunks/TrustDialog-o5kqmn6m.js +0 -1
  445. package/dist/chunks/ValidationErrorsList-D7bXMb0U.js +0 -2
  446. package/dist/chunks/WelcomeV2-Ckp3JPnA.js +0 -1
  447. package/dist/chunks/WindowsTerminalBackend-DsDqNWSP.js +0 -2
  448. package/dist/chunks/add-dir-DTP3NrLy.js +0 -1
  449. package/dist/chunks/agentDisplay-BEn43jMP.js +0 -1
  450. package/dist/chunks/agents-3ii2LyeQ.js +0 -2
  451. package/dist/chunks/agents-g0PDZl_l.js +0 -103
  452. package/dist/chunks/ant-PZvt_t1G.js +0 -1
  453. package/dist/chunks/api-BRckHGQ5.js +0 -1
  454. package/dist/chunks/api-DBvyymX6.js +0 -1
  455. package/dist/chunks/asciicast-C3nf97NR.js +0 -1
  456. package/dist/chunks/asciicast-DIsaWcsJ.js +0 -4
  457. package/dist/chunks/assistant-BBmaU8-A.js +0 -1
  458. package/dist/chunks/assistant-CMaN0QzY.js +0 -1
  459. package/dist/chunks/assistant-CVhvOfqJ.js +0 -1
  460. package/dist/chunks/auth-BXzbkJcE.js +0 -1
  461. package/dist/chunks/auth-Cud9tPJB.js +0 -1
  462. package/dist/chunks/autoMode-BREcJLYf.js +0 -45
  463. package/dist/chunks/autonomy-CuQizTZi.js +0 -1
  464. package/dist/chunks/autonomy-h9vver1r.js +0 -19
  465. package/dist/chunks/autonomyPanel-DVyrTxfP.js +0 -1
  466. package/dist/chunks/backgroundHousekeeping-DwA5WO9N.js +0 -1
  467. package/dist/chunks/backgroundHousekeeping-Ij_q7KN8.js +0 -17
  468. package/dist/chunks/banner-32EBTKI7.js +0 -2
  469. package/dist/chunks/bg-DK0E4ZtW.js +0 -9
  470. package/dist/chunks/bg-Dbh5z3Y8.js +0 -1
  471. package/dist/chunks/branch-B9AQFFTX.js +0 -3
  472. package/dist/chunks/bridge-BkL7g0ua.js +0 -2
  473. package/dist/chunks/bridgeConfig-BPP3lJRh.js +0 -1
  474. package/dist/chunks/bridgeConfig-BZQBBfap.js +0 -1
  475. package/dist/chunks/bridgeEnabled-Bkmqv-2V.js +0 -1
  476. package/dist/chunks/bridgeEnabled-BwBjPmEE.js +0 -1
  477. package/dist/chunks/bridgeMain-CbGj0plH.js +0 -68
  478. package/dist/chunks/bridgeMain-DpQRGiMo.js +0 -1
  479. package/dist/chunks/bridgeMessaging-C-ZFPTiZ.js +0 -1
  480. package/dist/chunks/bridgePointer-B2FPGDWR.js +0 -1
  481. package/dist/chunks/browser-fLRXxIsQ.js +0 -1
  482. package/dist/chunks/btw-BSme4Kzi.js +0 -1
  483. package/dist/chunks/buddy-DX94yYTy.js +0 -3
  484. package/dist/chunks/bypassPermissionsKillswitch-Crl2aipx.js +0 -1
  485. package/dist/chunks/caches-DeXmHls9.js +0 -3
  486. package/dist/chunks/caches-U1iFQIc7.js +0 -1
  487. package/dist/chunks/ccrClient-BYD1ONzC.js +0 -1
  488. package/dist/chunks/changeDetector-PaQPe1HQ.js +0 -1
  489. package/dist/chunks/channelNotification-Aq0p9f-W.js +0 -1
  490. package/dist/chunks/channelNotification-B0QskFjB.js +0 -1
  491. package/dist/chunks/chrome-B8ByN3u6.js +0 -1
  492. package/dist/chunks/chromeNativeHost-DX8f9Y2L.js +0 -1
  493. package/dist/chunks/claudeDesktop-C1qQs6os.js +0 -1
  494. package/dist/chunks/cleanup-Pv6U3HiI.js +0 -1
  495. package/dist/chunks/clear-CeJ5tgg8.js +0 -1
  496. package/dist/chunks/cliLaunch-BQa48gsr.js +0 -1
  497. package/dist/chunks/client-B7AdqRap.js +0 -1
  498. package/dist/chunks/color-OlMWmMnJ.js +0 -1
  499. package/dist/chunks/commands-BwfOl3fk.js +0 -1
  500. package/dist/chunks/commitAttribution-C479aqmn.js +0 -2
  501. package/dist/chunks/commitAttribution-CZ1OOh8F.js +0 -1
  502. package/dist/chunks/common-B379wT22.js +0 -1
  503. package/dist/chunks/common-B_BC3eMY.js +0 -1
  504. package/dist/chunks/common-CMCv4N_v.js +0 -1
  505. package/dist/chunks/compact-Dq-J7j1C.js +0 -3
  506. package/dist/chunks/companion-CtJjyD3N.js +0 -1
  507. package/dist/chunks/completionCache-DHfUBBMH.js +0 -1
  508. package/dist/chunks/completionCache-DORrtxkS.js +0 -4
  509. package/dist/chunks/computerUseLock-BjoDJH2h.js +0 -1
  510. package/dist/chunks/config-DcnYYwCy.js +0 -1
  511. package/dist/chunks/config-_KcvL7RX.js +0 -1
  512. package/dist/chunks/context-CShSBp-i.js +0 -1
  513. package/dist/chunks/context-noninteractive-BApFNncX.js +0 -54
  514. package/dist/chunks/context-noninteractive-uMvPKhng.js +0 -1
  515. package/dist/chunks/conversation-BlUHkj1_.js +0 -1
  516. package/dist/chunks/conversation-CCzL-eYb.js +0 -1
  517. package/dist/chunks/copy-DIMR3Q3S.js +0 -7
  518. package/dist/chunks/createSSHSession-DvSnUdsD.js +0 -6
  519. package/dist/chunks/createSession-D8tcktmP.js +0 -1
  520. package/dist/chunks/createSession-DaT4x1E6.js +0 -1
  521. package/dist/chunks/cronJitterConfig-C2a-Ybqm.js +0 -6
  522. package/dist/chunks/crossProjectResume-B3Chhiwf.js +0 -40
  523. package/dist/chunks/daemon-CCtZ9wY3.js +0 -2
  524. package/dist/chunks/datadog-BYNSi8R3.js +0 -1
  525. package/dist/chunks/datadog-DCukMGn4.js +0 -1
  526. package/dist/chunks/debug-DM5ezCBS.js +0 -1
  527. package/dist/chunks/debug-UI3T040K.js +0 -5
  528. package/dist/chunks/debugUtils-BBMFODKH.js +0 -1
  529. package/dist/chunks/desktop-BXj3JEMV.js +0 -1
  530. package/dist/chunks/detached-D300jlhj.js +0 -5
  531. package/dist/chunks/detectRepository-CBk3S2zv.js +0 -1
  532. package/dist/chunks/detectRepository-DCTvg4p0.js +0 -1
  533. package/dist/chunks/detection-CQsNad64.js +0 -1
  534. package/dist/chunks/detection-DJ-vTbBf.js +0 -1
  535. package/dist/chunks/diff-D3Xuv_4J.js +0 -1
  536. package/dist/chunks/directoryCompletion-D7EGwonO.js +0 -1
  537. package/dist/chunks/doctor-B5-jh6lS.js +0 -1
  538. package/dist/chunks/earlyInput-RoVleNEN.js +0 -1
  539. package/dist/chunks/effort-CpHnXRxJ.js +0 -9
  540. package/dist/chunks/entry-YXnIL7B7.js +0 -14
  541. package/dist/chunks/env-chR0gV31.js +0 -1
  542. package/dist/chunks/envLessBridgeConfig-CcgSiwvA.js +0 -1
  543. package/dist/chunks/envLessBridgeConfig-MaElAFPV.js +0 -1
  544. package/dist/chunks/escHotkey-Cyz0yyh1.js +0 -259
  545. package/dist/chunks/execFileNoThrow-CuQN1sz8.js +0 -1
  546. package/dist/chunks/execSyncWrapper-C2XQnFVo.js +0 -1
  547. package/dist/chunks/executor-4EeD8GNm.js +0 -1561
  548. package/dist/chunks/executor-BHEuNh5F.js +0 -1
  549. package/dist/chunks/exit-DKG0r57m.js +0 -1
  550. package/dist/chunks/export-BNbcpW3p.js +0 -2
  551. package/dist/chunks/exportRenderer-pYMIcnO4.js +0 -1
  552. package/dist/chunks/extra-usage-DTXphHAD.js +0 -1
  553. package/dist/chunks/extra-usage-H-U38bGx.js +0 -1
  554. package/dist/chunks/extra-usage-core-N4VLj0ye.js +0 -1
  555. package/dist/chunks/extra-usage-noninteractive-BGUiGr3a.js +0 -1
  556. package/dist/chunks/extraUsage-X6CmSsdg.js +0 -1
  557. package/dist/chunks/extractMemories-C8R4DJVc.js +0 -1
  558. package/dist/chunks/fast-BJwQnvAP.js +0 -1
  559. package/dist/chunks/fast-DMkPYQmQ.js +0 -1
  560. package/dist/chunks/feedback-DLcYu4id.js +0 -1
  561. package/dist/chunks/firstPartyEventLogger-C00GfHTl.js +0 -1
  562. package/dist/chunks/flushGate-0DZFLUEb.js +0 -1
  563. package/dist/chunks/gates-DP4JyL5e.js +0 -1
  564. package/dist/chunks/gates-DeLWne9R.js +0 -1
  565. package/dist/chunks/gemini-CnKaXUJJ.js +0 -1
  566. package/dist/chunks/generateRecap-BUS2DEdj.js +0 -1
  567. package/dist/chunks/generateSessionName-CnPPgvyy.js +0 -1
  568. package/dist/chunks/genericProcessUtils-BGvcwuPt.js +0 -23
  569. package/dist/chunks/git-CN3qtTb_.js +0 -6
  570. package/dist/chunks/git-D23Mzu_K.js +0 -1
  571. package/dist/chunks/githubRepoPathMapping-CnXpQRPY.js +0 -1
  572. package/dist/chunks/grok-C2BUbWJR.js +0 -1
  573. package/dist/chunks/growthbook-CPTqwUyC.js +0 -1
  574. package/dist/chunks/heapdump-pamjtM2a.js +0 -5
  575. package/dist/chunks/help-z7XnNKDT.js +0 -1
  576. package/dist/chunks/hooks-BEAaBqmd.js +0 -1
  577. package/dist/chunks/hooks-iTfSDH96.js +0 -79
  578. package/dist/chunks/hostAdapter-DWD430of.js +0 -1
  579. package/dist/chunks/hostGuard-zim_4F9V.js +0 -1
  580. package/dist/chunks/ide-BK8Td_CD.js +0 -2
  581. package/dist/chunks/inboundAttachments-DQ4Czsr5.js +0 -1
  582. package/dist/chunks/inboundAttachments-Dq3IYudc.js +0 -1
  583. package/dist/chunks/initReplBridge-BeGirV3Q.js +0 -1
  584. package/dist/chunks/insights-DfD6PMkd.js +0 -822
  585. package/dist/chunks/install-CNq--Fit.js +0 -1
  586. package/dist/chunks/install-github-app-Dhq_T_EJ.js +0 -147
  587. package/dist/chunks/install-slack-app-mz5O3xo_.js +0 -1
  588. package/dist/chunks/instrumentation-CM0poWjx.js +0 -12
  589. package/dist/chunks/job-CKI1I_Va.js +0 -2
  590. package/dist/chunks/jwtUtils-CpXwh_du.js +0 -1
  591. package/dist/chunks/keybindings-5qahtcNc.js +0 -2
  592. package/dist/chunks/lang-BMNwfSRv.js +0 -1
  593. package/dist/chunks/language-DXpi4083.js +0 -1
  594. package/dist/chunks/language-GlWQb4l9.js +0 -1
  595. package/dist/chunks/launchAgentsPlatform-BU4bAPan.js +0 -1
  596. package/dist/chunks/launchAutofixPr-B80p6iq-.js +0 -18
  597. package/dist/chunks/launchLocalMemory-CDAa9B30.js +0 -3
  598. package/dist/chunks/launchLocalVault-B19lF8tP.js +0 -3
  599. package/dist/chunks/launchMemoryStores-C6wJI-8V.js +0 -1
  600. package/dist/chunks/launchOnboarding-BIlwEdkk.js +0 -8
  601. package/dist/chunks/launchSchedule-DjMh3--x.js +0 -1
  602. package/dist/chunks/launchSkillStore-Bs5thijU.js +0 -1
  603. package/dist/chunks/launchTeleport-CDlWx4xC.js +0 -3
  604. package/dist/chunks/launchVault-C40NAyOp.js +0 -1
  605. package/dist/chunks/loadAgentsDir-BYqiLHDS.js +0 -1
  606. package/dist/chunks/loadAgentsDir-C9Ee_fs1.js +0 -4672
  607. package/dist/chunks/loadPluginHooks-DaETszNq.js +0 -1
  608. package/dist/chunks/localSearch-B3zijtEM.js +0 -1
  609. package/dist/chunks/localSearch-BTGnGPVi.js +0 -1
  610. package/dist/chunks/log-CzsijfHZ.js +0 -1
  611. package/dist/chunks/login-B3IQj5YQ.js +0 -1
  612. package/dist/chunks/login-CUM0odSh.js +0 -1
  613. package/dist/chunks/logoV2Utils-CW73xjcW.js +0 -1
  614. package/dist/chunks/logout-B3hPrJSX.js +0 -1
  615. package/dist/chunks/magicDocs-BysWdjbO.js +0 -57
  616. package/dist/chunks/main-CnAyCMYQ.js +0 -1108
  617. package/dist/chunks/main-D9fUXJiD.js +0 -31
  618. package/dist/chunks/mappers-D1SAyuKF.js +0 -1
  619. package/dist/chunks/mcp-BIiXcANN.js +0 -1
  620. package/dist/chunks/mcp-BLcZi9zs.js +0 -2
  621. package/dist/chunks/mcp-nOKz2_By.js +0 -6
  622. package/dist/chunks/mcpServer-CJOTyq3O.js +0 -1
  623. package/dist/chunks/mcpServer-DaiouIKs.js +0 -1
  624. package/dist/chunks/memoize-DxwLawI2.js +0 -1
  625. package/dist/chunks/memory-DtFuXZHl.js +0 -1
  626. package/dist/chunks/mode-BPNUYCpk.js +0 -2
  627. package/dist/chunks/model-Cky6xlFt.js +0 -1
  628. package/dist/chunks/model-DC5bOhtE.js +0 -1
  629. package/dist/chunks/onChangeAppState-pafR88Yw.js +0 -1
  630. package/dist/chunks/openai-BOxlfR-k.js +0 -10
  631. package/dist/chunks/overageCreditGrant-BmmOYjTh.js +0 -1
  632. package/dist/chunks/panel-s9fbCKfl.js +0 -1
  633. package/dist/chunks/parser-CmngCwjB.js +0 -1
  634. package/dist/chunks/parser-SWIZo39J.js +0 -1
  635. package/dist/chunks/passes-CqiFdifM.js +0 -1
  636. package/dist/chunks/path-B3lx7yHn.js +0 -1
  637. package/dist/chunks/paths-C2JRlUsH.js +0 -39
  638. package/dist/chunks/permissions-BHJUxNga.js +0 -3
  639. package/dist/chunks/pipeTransport-BTYiqf9e.js +0 -1
  640. package/dist/chunks/plan-CF_ClJlj.js +0 -1
  641. package/dist/chunks/platform-CuyedWpe.js +0 -2
  642. package/dist/chunks/plugin-Bz3RKbru.js +0 -1
  643. package/dist/chunks/pluginAutoupdate-Ck0wWoNE.js +0 -1
  644. package/dist/chunks/pluginBlocklist-7dlesHcW.js +0 -1
  645. package/dist/chunks/pluginCliCommands-D502zE25.js +0 -1
  646. package/dist/chunks/pluginFlagging-DfHARfd-.js +0 -1
  647. package/dist/chunks/pluginOperations-BBRf8tuH.js +0 -2
  648. package/dist/chunks/pluginStartupCheck-BKEhWQR2.js +0 -1
  649. package/dist/chunks/pluginStartupCheck-ZcaocOSL.js +0 -1
  650. package/dist/chunks/plugins-JnZ3lNqG.js +0 -4
  651. package/dist/chunks/policyLimits-CtOjYdHx.js +0 -1
  652. package/dist/chunks/pollConfig-Duecunu0.js +0 -1
  653. package/dist/chunks/poor-CUwZAV9z.js +0 -1
  654. package/dist/chunks/poorMode-DOoZ0U-8.js +0 -1
  655. package/dist/chunks/poorMode-DRcH1fuh.js +0 -1
  656. package/dist/chunks/print-D9IhN66j.js +0 -39
  657. package/dist/chunks/privacy-settings-DmbuvR-R.js +0 -1
  658. package/dist/chunks/processBashCommand-Cg8we9vS.js +0 -1
  659. package/dist/chunks/processSlashCommand-BBQQEGZd.js +0 -6
  660. package/dist/chunks/projectContext-D5FgyE-d.js +0 -1
  661. package/dist/chunks/prompt-7Vt8FUX_.js +0 -1
  662. package/dist/chunks/prompt-Cj0hg3CU.js +0 -1
  663. package/dist/chunks/prompt-thBQB2X5.js +0 -222
  664. package/dist/chunks/promptEditor-C8B2TEXp.js +0 -4
  665. package/dist/chunks/protocolHandler-BUKWgksO.js +0 -13
  666. package/dist/chunks/proxy-CfZp-wce.js +0 -99
  667. package/dist/chunks/rate-limit-options-PruvKAQt.js +0 -1
  668. package/dist/chunks/rcDebugLog-CIS3PU-H.js +0 -11
  669. package/dist/chunks/referral-CXmDvb7V.js +0 -1
  670. package/dist/chunks/refresh-C_FDHRT7.js +0 -1
  671. package/dist/chunks/registerProtocol-WxQUBybC.js +0 -36
  672. package/dist/chunks/registry-CeBTik9J.js +0 -1
  673. package/dist/chunks/release-notes-aZ6QUVnT.js +0 -4
  674. package/dist/chunks/releaseNotes-2GPd_O_r.js +0 -2
  675. package/dist/chunks/reload-plugins-BDh4ZhHi.js +0 -1
  676. package/dist/chunks/remote-env-BIOFHNQC.js +0 -1
  677. package/dist/chunks/remoteBridgeCore-DyA_2GrL.js +0 -1
  678. package/dist/chunks/remoteControlServer-BjW9GsPd.js +0 -3
  679. package/dist/chunks/rename-CKlAeppY.js +0 -1
  680. package/dist/chunks/renderOptions-rmj4Mkls.js +0 -1
  681. package/dist/chunks/resume-Dm71Aeni.js +0 -2
  682. package/dist/chunks/runtimeObserver-BYOo5dT0.js +0 -1
  683. package/dist/chunks/runtimeObserver-CA7pdBvT.js +0 -10
  684. package/dist/chunks/sandbox-adapter-C7TBAehE.js +0 -1
  685. package/dist/chunks/sandbox-toggle-fHc9E9xW.js +0 -1
  686. package/dist/chunks/searchExtraTools-CpFsg_tS.js +0 -1
  687. package/dist/chunks/sentry-B1g5Tgp2.js +0 -13
  688. package/dist/chunks/session-C46oy7nX.js +0 -2
  689. package/dist/chunks/sessionDiscovery-CtrJ2Bfr.js +0 -1
  690. package/dist/chunks/sessionFileAccessHooks-dwF5SFoS.js +0 -1
  691. package/dist/chunks/sessionMemory-BqCsLnFl.js +0 -1
  692. package/dist/chunks/sessionMemory-D4-Ymn0Q.js +0 -1
  693. package/dist/chunks/sessionMemoryUtils-BKdYMir6.js +0 -1
  694. package/dist/chunks/sessionObserver-Bfu8q0_K.js +0 -1
  695. package/dist/chunks/sessionObserver-DoBuLaCJ.js +0 -20
  696. package/dist/chunks/sessionStorage-CUUU_J4D.js +0 -1
  697. package/dist/chunks/sessionTitle-BOM0LQlq.js +0 -14
  698. package/dist/chunks/sessionTracing-BEKULg2L.js +0 -11
  699. package/dist/chunks/settingsSync-BIsGiZhM.js +0 -1
  700. package/dist/chunks/setup-C3FOTg1s.js +0 -1
  701. package/dist/chunks/setup-ChF37I92.js +0 -9
  702. package/dist/chunks/setup-DvFPFV-3.js +0 -2
  703. package/dist/chunks/shadowedRuleDetection-spwhhTXF.js +0 -1
  704. package/dist/chunks/shellQuote-DgjT8KBA.js +0 -1
  705. package/dist/chunks/sideQuestion-iy7kJEkr.js +0 -20
  706. package/dist/chunks/sink-D6dxOYIw.js +0 -1
  707. package/dist/chunks/sink-FeQonv8-.js +0 -1
  708. package/dist/chunks/sinks-DKMqKJ66.js +0 -1
  709. package/dist/chunks/sinks-zNh_PVeS.js +0 -2
  710. package/dist/chunks/skill-learning-ChAFwJf0.js +0 -5
  711. package/dist/chunks/skillChangeDetector-8LVraP0Y.js +0 -1
  712. package/dist/chunks/skillGapStore-CUws9CQ6.js +0 -5
  713. package/dist/chunks/skillGapStore-CdPgIARS.js +0 -1
  714. package/dist/chunks/skillGenerator-CLtTRIjy.js +0 -8
  715. package/dist/chunks/skillLearning-CBosoKl-.js +0 -1
  716. package/dist/chunks/skillLearning-f7-aknmS.js +0 -1
  717. package/dist/chunks/skillPanel-Cd0AFEZf.js +0 -28
  718. package/dist/chunks/skillSearchPanel-VWiAbmdr.js +0 -21
  719. package/dist/chunks/skills-oQtI4eDn.js +0 -1
  720. package/dist/chunks/sprites-Cp4_DJUI.js +0 -1
  721. package/dist/chunks/startupProfiler-DnXZaX4A.js +0 -3
  722. package/dist/chunks/startupProfiler-SOE--nM9.js +0 -1
  723. package/dist/chunks/stats-B1X-nxO8.js +0 -1
  724. package/dist/chunks/status-BtCnWZEv.js +0 -1
  725. package/dist/chunks/statusNoticeHelpers-B6GW2gMe.js +0 -1
  726. package/dist/chunks/stickers-BMh2qjgF.js +0 -1
  727. package/dist/chunks/tag-B6WpuUE_.js +0 -11
  728. package/dist/chunks/tasks-DIOPZDoF.js +0 -1
  729. package/dist/chunks/teamHelpers-9p7wPcXj.js +0 -1
  730. package/dist/chunks/teamHelpers-PLGwYL4x.js +0 -1
  731. package/dist/chunks/teammateModeSnapshot-DO-3AkNP.js +0 -1
  732. package/dist/chunks/teammateModeSnapshot-DU8JCRRs.js +0 -1
  733. package/dist/chunks/teleport-DPUoWpD4.js +0 -1
  734. package/dist/chunks/templateJobs-DOSQvjx0.js +0 -12
  735. package/dist/chunks/terminalSetup-DdHkyElj.js +0 -33
  736. package/dist/chunks/terminalSetup-tSFJeCVl.js +0 -1
  737. package/dist/chunks/theme-Hf1fhR3q.js +0 -1
  738. package/dist/chunks/thinkback-5QYAbr0P.js +0 -1
  739. package/dist/chunks/thinkback-B5IraP81.js +0 -1
  740. package/dist/chunks/thinkback-play-Bqv85sjY.js +0 -1
  741. package/dist/chunks/tmux-CvbhsfwG.js +0 -1
  742. package/dist/chunks/toolEventObserver-B-mqmRv0.js +0 -1
  743. package/dist/chunks/toolEventObserver-_Fk1dSYg.js +0 -1
  744. package/dist/chunks/toolPool-C2KLBvek.js +0 -1
  745. package/dist/chunks/toolPool-CiEaFfxq.js +0 -1
  746. package/dist/chunks/trustedDevice-BowIKqqC.js +0 -1
  747. package/dist/chunks/trustedDevice-f8HslQu2.js +0 -1
  748. package/dist/chunks/tui-geoc3zxu.js +0 -6
  749. package/dist/chunks/types-Csi32ZXh.js +0 -17
  750. package/dist/chunks/udsClient-BdPOrL1H.js +0 -1
  751. package/dist/chunks/ultrareviewCommand-DbmRN6Lg.js +0 -3
  752. package/dist/chunks/undercover-Ch9wnIbk.js +0 -31
  753. package/dist/chunks/undercover-X6-EJ_7K.js +0 -1
  754. package/dist/chunks/up-D-U4wUCe.js +0 -12
  755. package/dist/chunks/updateCCB-DFHrOTEX.js +0 -11
  756. package/dist/chunks/upgrade-B6Ih-Ubj.js +0 -1
  757. package/dist/chunks/upgrade-CC4cnsnt.js +0 -1
  758. package/dist/chunks/upload-DSTB33ZR.js +0 -1
  759. package/dist/chunks/upstreamproxy-Ci5T_JCo.js +0 -11
  760. package/dist/chunks/usage-CNqpSfd2.js +0 -1
  761. package/dist/chunks/usage-DiZsjcMM.js +0 -1
  762. package/dist/chunks/useMainLoopModel-Bo6iEtB3.js +0 -1
  763. package/dist/chunks/useManagePlugins-Cvj0XfLp.js +0 -1
  764. package/dist/chunks/useMergedTools-BEpwy0Ec.js +0 -1
  765. package/dist/chunks/useSearchInput-YiO4crrI.js +0 -1
  766. package/dist/chunks/useSettingsErrors-BE-PITl4.js +0 -1
  767. package/dist/chunks/useVoice-D1sKPiqb.js +0 -1
  768. package/dist/chunks/util-C8_5375U.js +0 -1
  769. package/dist/chunks/utils-Dmh9vBcg.js +0 -1
  770. package/dist/chunks/validatePlugin-BQA60S_J.js +0 -1
  771. package/dist/chunks/vim-oNiLgw0C.js +0 -1
  772. package/dist/chunks/voice-BcA5h8ya.js +0 -8
  773. package/dist/chunks/voice-CGsMzVaA.js +0 -2
  774. package/dist/chunks/voiceModeEnabled-DprM_JSH.js +0 -1
  775. package/dist/chunks/voiceModeEnabled-Dpx-sP8V.js +0 -1
  776. package/dist/chunks/voiceStreamSTT-CASv4SGl.js +0 -1
  777. package/dist/chunks/voiceStreamSTT-CaI5Uz-7.js +0 -1
  778. package/dist/chunks/which-DqSAIvp2.js +0 -1
  779. package/dist/chunks/windowsPaths-C9CigqoF.js +0 -1
  780. package/dist/chunks/windowsPaths-swxCp7bX.js +0 -2
  781. package/dist/chunks/workSecret-mS2OrpxF.js +0 -1
  782. package/dist/chunks/workerRegistry-CCYrYthd.js +0 -1
  783. package/dist/chunks/worktree-C9WNXNFR.js +0 -1
  784. package/dist/chunks/xml-BW5T-oW-.js +0 -1
  785. /package/dist/chunks/{InProcessTransport-gJLr5CIx.js → InProcessTransport-B0mmAoxw.js} +0 -0
  786. /package/dist/chunks/{attributionHooks-Br5LZ6bk.js → attributionHooks-DZJjA8p9.js} +0 -0
  787. /package/dist/chunks/{attributionTrailer-BMTuK4Ax.js → attributionTrailer-CZY9XTcr.js} +0 -0
  788. /package/dist/chunks/{autoModeDenials-D8eQ1CoM.js → autoModeDenials-CGAtAGGf.js} +0 -0
  789. /package/dist/chunks/{bedrockClient-Ci523Btx.js → bedrockClient-DZgaJTHp.js} +0 -0
  790. /package/dist/chunks/{ccshareResume-CqNm2k-J.js → ccshareResume-CZggHNOf.js} +0 -0
  791. /package/dist/chunks/{connectHeadless-DFCrE6O4.js → connectHeadless-KNT0Sg7Z.js} +0 -0
  792. /package/dist/chunks/{dangerousBackend-Du0K4q5Z.js → dangerousBackend-ByOAEFld.js} +0 -0
  793. /package/dist/chunks/{earlyInput-feVuZGzR.js → earlyInput-BFcdUMaX.js} +0 -0
  794. /package/dist/chunks/{eventLoopStallDetector-XfubcyMN.js → eventLoopStallDetector-l83_98VR.js} +0 -0
  795. /package/dist/chunks/{fpsMetrics-CEQt6Tk1.js → fpsMetrics-DOI_SIeY.js} +0 -0
  796. /package/dist/chunks/{fuse-TM-TeOo_.js → fuse-Bp7rmZ5x.js} +0 -0
  797. /package/dist/chunks/{instinctParser-CJPM8VjX.js → instinctParser-Bxhe2LOF.js} +0 -0
  798. /package/dist/chunks/{lockfile-Y1hwdHrQ.js → lockfile-CeCEBLtN.js} +0 -0
  799. /package/dist/chunks/{mobile-umu5P0cM.js → mobile-Cydobb55.js} +0 -0
  800. /package/dist/chunks/{observationStore-gFvWXJmc.js → observationStore-BaPq7CKI.js} +0 -0
  801. /package/dist/chunks/{openaiShared-Dy78YERG.js → openaiShared-Crt0cZLO.js} +0 -0
  802. /package/dist/chunks/{output-style-BmEQscMd.js → output-style-BkOnFmfe.js} +0 -0
  803. /package/dist/chunks/{parseConnectUrl-C6cvMkkH.js → parseConnectUrl-BFNiff4c.js} +0 -0
  804. /package/dist/chunks/{poller-Dbo07OEA.js → poller-DADqVTWi.js} +0 -0
  805. /package/dist/chunks/{postCommitAttribution-DhFkZMxJ.js → postCommitAttribution-CA9Z2sqn.js} +0 -0
  806. /package/dist/chunks/{projectContext-iWPqcl0Z.js → projectContext-CwJlxP2Y.js} +0 -0
  807. /package/dist/chunks/{rewind-DAn-nNs-.js → rewind-DTk4TFYB.js} +0 -0
  808. /package/dist/chunks/{sanitization-JYRkZFrK.js → sanitization-DD414_3t.js} +0 -0
  809. /package/dist/chunks/{sdkHeapDumpMonitor-DKtfJW5o.js → sdkHeapDumpMonitor-fNRF2fbK.js} +0 -0
  810. /package/dist/chunks/{server-CswFAYwN.js → server-DTd90dmm.js} +0 -0
  811. /package/dist/chunks/{serverBanner-CImTYGhY.js → serverBanner-B7UaaCCl.js} +0 -0
  812. /package/dist/chunks/{serverLog-Bwt7XEmk.js → serverLog-DRvGpDtt.js} +0 -0
  813. /package/dist/chunks/{sessionDataUploader-CKRXCBxI.js → sessionDataUploader-BDsz_1Uy.js} +0 -0
  814. /package/dist/chunks/{sessionManager-Ca2O821f.js → sessionManager-Bh-Z-YXy.js} +0 -0
@@ -0,0 +1,12 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{_ as r,_j as i,g as a,gj as o,h as s}from"./loadAgentsDir-Br5fGLLI.js";import{basename as c,join as l}from"path";import{appendFileSync as u,mkdirSync as d,readFileSync as f,readdirSync as p,writeFileSync as m}from"fs";import{randomUUID as h}from"crypto";function g(){let e=a(`templates`,process.cwd()),n=l(t(),`templates`);try{return p(n),[...e,n]}catch{return e}}function _(){let e=[],t=new Set;for(let n of g()){let r;try{r=p(n)}catch{continue}for(let a of r){if(!a.endsWith(`.md`))continue;let r=c(a,`.md`);if(t.has(r))continue;t.add(r);let o=l(n,a);try{let{frontmatter:t,content:n}=i(f(o,`utf-8`),o),a=(typeof t.description==`string`?t.description:``)||s(n,`No description`);e.push({name:r,description:a,filePath:o,frontmatter:t,content:n})}catch{}}}return e}function v(e){return _().find(t=>t.name===e)??null}var y=e((()=>{o(),n(),r()}));function b(){return l(t(),`jobs`)}function x(e){return l(b(),e)}function S(e,t,n,r,i){let a=x(e);d(a,{recursive:!0});let o=new Date().toISOString(),s={jobId:e,templateName:t,createdAt:o,updatedAt:o,status:`created`,args:i};return m(l(a,`state.json`),JSON.stringify(s,null,2),`utf-8`),m(l(a,`template.md`),n,`utf-8`),m(l(a,`input.txt`),r,`utf-8`),a}function C(e){try{let t=f(l(x(e),`state.json`),`utf-8`),n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n;return typeof r.jobId!=`string`||typeof r.status!=`string`?null:r}catch{return null}}function w(e,t){let n=x(e),r=C(e);if(!r)return!1;let i=l(n,`replies.jsonl`),a=JSON.stringify({text:t,timestamp:new Date().toISOString()});try{u(i,a+`
2
+ `,`utf-8`)}catch{m(i,a+`
3
+ `,`utf-8`)}let o={...r,updatedAt:new Date().toISOString()};return m(l(n,`state.json`),JSON.stringify(o,null,2),`utf-8`),!0}var T=e((()=>{n()}));async function E(e){let t=e[0];switch(t){case`list`:k();break;case`new`:A(e.slice(1));break;case`reply`:j(e.slice(1));break;case`status`:O(e.slice(1));break;default:console.error(`Unknown template command: ${t}`),D(),process.exitCode=1}}function D(){console.log(`
4
+ Template Job Commands:
5
+
6
+ claude job list List available templates
7
+ claude job new <template> [args] Create a new job from a template
8
+ claude job reply <job-id> <text> Reply to an existing job
9
+ claude job status <job-id> Show job status
10
+ `)}function O(e){let t=e[0];if(!t){console.error(`Usage: claude job status <job-id>`),process.exitCode=1;return}let n=C(t);if(!n){console.error(`Job not found: ${t}`),process.exitCode=1;return}console.log(`Job: ${n.jobId}`),console.log(` Template: ${n.templateName}`),console.log(` Status: ${n.status}`),console.log(` Created: ${n.createdAt}`),console.log(` Updated: ${n.updatedAt}`),console.log(` Args: ${n.args.join(` `)||`(none)`}`)}function k(){let e=_();if(e.length===0){console.log(`No templates found.`),console.log(`Place .md files in .claude/templates/ or ~/.claude/templates/`);return}console.log(`${e.length} template${e.length>1?`s`:``} found:\n`);for(let t of e)console.log(` ${t.name}`),console.log(` ${t.description}`),console.log(` Path: ${t.filePath}`),console.log()}function A(e){let t=e[0];if(!t){console.error(`Usage: claude job new <template> [args...]`),process.exitCode=1;return}let n=v(t);if(!n){console.error(`Template not found: ${t}`),console.log(`
11
+ Available templates:`);for(let e of _())console.log(` ${e.name}`);process.exitCode=1;return}let r=h().slice(0,8),i=e.slice(1).join(` `),a=S(r,t,`---\n${Object.entries(n.frontmatter).map(([e,t])=>`${e}: ${t}`).join(`
12
+ `)}\n---\n${n.content}`,i,e.slice(1));console.log(`Job created: ${r}`),console.log(` Template: ${t}`),console.log(` Directory: ${a}`),i&&console.log(` Input: ${i}`)}function j(e){let t=e[0],n=e.slice(1).join(` `);if(!t||!n){console.error(`Usage: claude job reply <job-id> <text>`),process.exitCode=1;return}if(!C(t)){console.error(`Job not found: ${t}`),process.exitCode=1;return}w(t,n)?(console.log(`Reply added to job ${t}`),console.log(` Directory: ${x(t)}`)):(console.error(`Failed to append reply to job ${t}`),process.exitCode=1)}e((()=>{y(),T()}))();export{E as templatesMain};
@@ -0,0 +1,33 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{$ as r,In as i,Ln as a,t as o,v as s}from"./src-Di342QoJ.js";import{Ac as c,Nc as l,Pc as u,Sc as d,bc as f,el as p,nl as m}from"./paths-DfGsIjPm.js";import{D as h,E as g,K as _,O as ee,U as te,_ as ne,h as re}from"./debug-otxXY3j-.js";import{n as ie,t as v}from"./cwd--iizewsn.js";import{a as ae,n as y}from"./env-BH-OBzcA.js";import{o as b,s as x}from"./log-DS97_rIr.js";import{i as oe,o as se}from"./platform-DYZVoA9J.js";import{r as S,t as C}from"./execFileNoThrow-B_aZH_GP.js";import{d as w,o as T,s as ce}from"./types-D5R26wwH.js";import{r as le,t as ue}from"./completionCache-Daqaxlf3.js";import{homedir as E,platform as D}from"os";import{dirname as O,join as k}from"path";import{randomBytes as A}from"crypto";import{copyFile as j,mkdir as M,readFile as N,stat as P,writeFile as F}from"fs/promises";import{pathToFileURL as de}from"url";function I(){let e=re().existsSync(k(v(),`CLAUDE.md`)),t=m(v());return[{key:`workspace`,text:`Ask Claude to create a new app or clone a repository`,isComplete:!1,isCompletable:!0,isEnabled:t},{key:`claudemd`,text:`Run /init to create a CLAUDE.md file with instructions for Claude`,isComplete:e,isCompletable:!0,isEnabled:!t}]}function L(){return I().filter(({isCompletable:e,isEnabled:t})=>e&&t).every(({isComplete:e})=>e)}function R(){f().hasCompletedProjectOnboarding||L()&&l(e=>({...e,hasCompletedProjectOnboarding:!0}))}function z(){l(e=>({...e,projectOnboardingSeenCount:e.projectOnboardingSeenCount+1}))}var B,V=e((()=>{n(),c(),ie(),p(),ne(),B=t(()=>{let e=f();return e.hasCompletedProjectOnboarding||e.projectOnboardingSeenCount>=4||process.env.IS_DEMO?!1:!L()})}));function fe(e){u(t=>({...t,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:e}))}function H(){u(e=>({...e,appleTerminalSetupInProgress:!1}))}function pe(){let e=d();return{inProgress:e.appleTerminalSetupInProgress??!1,backupPath:e.appleTerminalBackupPath||null}}function U(){return k(E(),`Library`,`Preferences`,`com.apple.Terminal.plist`)}async function me(){let e=U(),t=`${e}.bak`;try{let{code:n}=await C(`defaults`,[`export`,`com.apple.Terminal`,e]);if(n!==0)return null;try{await P(e)}catch{return null}return await C(`defaults`,[`export`,`com.apple.Terminal`,t]),fe(t),t}catch(e){return x(e),null}}async function W(){let{inProgress:e,backupPath:t}=pe();if(!e)return{status:`no_backup`};if(!t)return H(),{status:`no_backup`};try{await P(t)}catch{return H(),{status:`no_backup`}}try{let{code:e}=await C(`defaults`,[`import`,`com.apple.Terminal`,t]);return e===0?(await C(`killall`,[`cfprefsd`]),H(),{status:`restored`}):{status:`failed`,backupPath:t}}catch(e){return x(Error(`Failed to restore Terminal.app settings with: ${e}`)),H(),{status:`failed`,backupPath:t}}}var G=e((()=>{c(),S(),b()}));function he(){let e=process.env.VSCODE_GIT_ASKPASS_MAIN??``,t=process.env.PATH??``;return e.includes(`.vscode-server`)||e.includes(`.cursor-server`)||e.includes(`.windsurf-server`)||t.includes(`.vscode-server`)||t.includes(`.cursor-server`)||t.includes(`.windsurf-server`)}function ge(){return!y.terminal||!(y.terminal in $)?null:$[y.terminal]??null}function K(e){return r()?`\x1b]8;;${de(e).href}\x07${e}\x1b]8;;\x07`:e}function q(){return D()===`darwin`&&y.terminal===`Apple_Terminal`||y.terminal===`vscode`||y.terminal===`cursor`||y.terminal===`windsurf`||y.terminal===`alacritty`||y.terminal===`zed`}async function J(e){let t=``;switch(y.terminal){case`Apple_Terminal`:t=await xe(e);break;case`vscode`:t=await Y(`VSCode`,e);break;case`cursor`:t=await Y(`Cursor`,e);break;case`windsurf`:t=await Y(`Windsurf`,e);break;case`alacritty`:t=await Se(e);break;case`zed`:t=await Ce(e);break;case null:break}return u(e=>[`vscode`,`cursor`,`windsurf`,`alacritty`,`zed`].includes(y.terminal??``)?e.shiftEnterKeyBindingInstalled===!0?e:{...e,shiftEnterKeyBindingInstalled:!0}:y.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled===!0?e:{...e,optionAsMetaKeyInstalled:!0}:e),R(),process.env.USER_TYPE===`ant`&&(t+=await le(e)),t}function _e(){return d().shiftEnterKeyBindingInstalled===!0}function ve(){return d().hasUsedBackslashReturn===!0}function ye(){d().hasUsedBackslashReturn||u(e=>({...e,hasUsedBackslashReturn:!0}))}async function be(e,t,n){if(y.terminal&&y.terminal in $)return e(`Shift+Enter is natively supported in ${$[y.terminal]}.
2
+
3
+ No configuration needed. Just use Shift+Enter to add newlines.`),null;if(!q()){let t=y.terminal||`your current terminal`,n=oe(),r=``;return n===`macos`?r=` • macOS: Apple Terminal
4
+ `:n===`windows`&&(r=` • Windows: Windows Terminal
5
+ `),e(`Terminal setup cannot be run from ${t}.
6
+
7
+ This command configures a convenient Shift+Enter shortcut for multi-line prompts.
8
+ ${i.dim(`Note: You can already use backslash (\\\\) + return to add newlines.`)}
9
+
10
+ To set up the shortcut (optional):
11
+ 1. Exit tmux/screen temporarily
12
+ 2. Run /terminal-setup directly in one of these terminals:
13
+ ${r} • IDE: VSCode, Cursor, Windsurf, Zed
14
+ • Other: Alacritty
15
+ 3. Return to tmux/screen - settings will persist
16
+
17
+ ${i.dim(`Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.`)}`),null}return e(await J(t.options.theme)),null}async function Y(e=`VSCode`,t){if(he())return`${s(`warning`,t)(`Cannot install keybindings from a remote ${e} session.`)}${Q}${Q}${e} keybindings must be installed on your local machine, not the remote server.${Q}${Q}To install the Shift+Enter keybinding:${Q}1. Open ${e} on your local machine (not connected to remote)${Q}2. Open the Command Palette (Cmd/Ctrl+Shift+P) → "Preferences: Open Keyboard Shortcuts (JSON)"${Q}3. Add this keybinding (the file must be a JSON array):${Q}${Q}${i.dim(`[
18
+ {
19
+ "key": "shift+enter",
20
+ "command": "workbench.action.terminal.sendSequence",
21
+ "args": { "text": "\\u001b\\r" },
22
+ "when": "terminalFocus"
23
+ }
24
+ ]`)}${Q}`;let n=e===`VSCode`?`Code`:e,r=k(E(),D()===`win32`?k(`AppData`,`Roaming`,n,`User`):D()===`darwin`?k(`Library`,`Application Support`,n,`User`):k(`.config`,n,`User`)),a=k(r,`keybindings.json`);try{await M(r,{recursive:!0});let n=`[]`,o=[],c=!1;try{n=await N(a,{encoding:`utf-8`}),c=!0,o=w(n)??[]}catch(e){if(!_(e))throw e}if(c){let n=`${a}.${A(4).toString(`hex`)}.bak`;try{await j(a,n)}catch{return`${s(`warning`,t)(`Error backing up existing ${e} terminal keybindings. Bailing out.`)}${Q}${i.dim(`See ${K(a)}`)}${Q}${i.dim(`Backup path: ${K(n)}`)}${Q}`}}return o.find(e=>e.key===`shift+enter`&&e.command===`workbench.action.terminal.sendSequence`&&e.when===`terminalFocus`)?`${s(`warning`,t)(`Found existing ${e} terminal Shift+Enter key binding. Remove it to continue.`)}${Q}${i.dim(`See ${K(a)}`)}${Q}`:(await F(a,T(n,{key:`shift+enter`,command:`workbench.action.terminal.sendSequence`,args:{text:`\x1B\r`},when:`terminalFocus`}),{encoding:`utf-8`}),`${s(`success`,t)(`Installed ${e} terminal Shift+Enter key binding`)}${Q}${i.dim(`See ${K(a)}`)}${Q}`)}catch(t){throw x(t),Error(`Failed to install ${e} terminal Shift+Enter key binding`)}}async function X(e){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':useOptionAsMetaKey bool true`,U()]);if(t!==0){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':useOptionAsMetaKey true`,U()]);if(t!==0)return x(Error(`Failed to enable Option as Meta key for Terminal.app profile: ${e}`)),!1}return!0}async function Z(e){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':Bell bool false`,U()]);if(t!==0){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':Bell false`,U()]);if(t!==0)return x(Error(`Failed to disable audio bell for Terminal.app profile: ${e}`)),!1}return!0}async function xe(e){try{if(!await me())throw Error(`Failed to create backup of Terminal.app preferences, bailing out`);let{stdout:t,code:n}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Default Window Settings`]);if(n!==0||!t.trim())throw Error(`Failed to read default Terminal.app profile`);let{stdout:r,code:a}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Startup Window Settings`]);if(a!==0||!r.trim())throw Error(`Failed to read startup Terminal.app profile`);let o=!1,c=t.trim(),l=await X(c),u=await Z(c);(l||u)&&(o=!0);let d=r.trim();if(d!==c){let e=await X(d),t=await Z(d);(e||t)&&(o=!0)}if(!o)throw Error(`Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile`);return await C(`killall`,[`cfprefsd`]),H(),`${s(`success`,e)(`Configured Terminal.app settings:`)}${Q}${s(`success`,e)(`- Enabled "Use Option as Meta key"`)}${Q}${s(`success`,e)(`- Switched to visual bell`)}${Q}${i.dim(`Option+Enter will now enter a newline.`)}${Q}${i.dim(`You must restart Terminal.app for changes to take effect.`,e)}${Q}`}catch(e){x(e);let t=await W(),n=`Failed to enable Option as Meta key for Terminal.app.`;throw t.status===`restored`?Error(`${n} Your settings have been restored from backup.`):t.status===`failed`?Error(`${n} Restoring from backup failed, try manually with: defaults import com.apple.Terminal ${t.backupPath}`):Error(`${n} No backup was available to restore from.`)}}async function Se(e){let t=[],n=process.env.XDG_CONFIG_HOME;if(n?t.push(k(n,`alacritty`,`alacritty.toml`)):t.push(k(E(),`.config`,`alacritty`,`alacritty.toml`)),D()===`win32`){let e=process.env.APPDATA;e&&t.push(k(e,`alacritty`,`alacritty.toml`))}let r=null,a=``,o=!1;for(let e of t)try{a=await N(e,{encoding:`utf-8`}),r=e,o=!0;break}catch(e){if(!_(e))throw e}if(r||(r=t[0]??null),!r)throw Error(`No valid config path found for Alacritty`);try{if(o){if(a.includes(`mods = "Shift"`)&&a.includes(`key = "Return"`))return`${s(`warning`,e)(`Found existing Alacritty Shift+Enter key binding. Remove it to continue.`)}${Q}${i.dim(`See ${K(r)}`)}${Q}`;let t=A(4).toString(`hex`),n=`${r}.${t}.bak`;try{await j(r,n)}catch{return`${s(`warning`,e)(`Error backing up existing Alacritty config. Bailing out.`)}${Q}${i.dim(`See ${K(r)}`)}${Q}${i.dim(`Backup path: ${K(n)}`)}${Q}`}}else await M(O(r),{recursive:!0});let t=a;return a&&!a.endsWith(`
25
+ `)&&(t+=`
26
+ `),t+=`
27
+ [[keyboard.bindings]]
28
+ key = "Return"
29
+ mods = "Shift"
30
+ chars = "\\u001B\\r"
31
+ `,await F(r,t,{encoding:`utf-8`}),`${s(`success`,e)(`Installed Alacritty Shift+Enter key binding`)}${Q}${s(`success`,e)(`You may need to restart Alacritty for changes to take effect`)}${Q}${i.dim(`See ${K(r)}`)}${Q}`}catch(e){throw x(e),Error(`Failed to install Alacritty Shift+Enter key binding`)}}async function Ce(e){let t=k(E(),`.config`,`zed`),n=k(t,`keymap.json`);try{await M(t,{recursive:!0});let r=`[]`,a=!1;try{r=await N(n,{encoding:`utf-8`}),a=!0}catch(e){if(!_(e))throw e}if(a){if(r.includes(`shift-enter`))return`${s(`warning`,e)(`Found existing Zed Shift+Enter key binding. Remove it to continue.`)}${Q}${i.dim(`See ${K(n)}`)}${Q}`;let t=`${n}.${A(4).toString(`hex`)}.bak`;try{await j(n,t)}catch{return`${s(`warning`,e)(`Error backing up existing Zed keymap. Bailing out.`)}${Q}${i.dim(`See ${K(n)}`)}${Q}${i.dim(`Backup path: ${K(t)}`)}${Q}`}}let o;try{o=h(r),Array.isArray(o)||(o=[])}catch{o=[]}return o.push({context:`Terminal`,bindings:{"shift-enter":[`terminal::SendText`,`\x1B\r`]}}),await F(n,ee(o,null,2)+`
32
+ `,{encoding:`utf-8`}),`${s(`success`,e)(`Installed Zed Shift+Enter key binding`)}${Q}${i.dim(`See ${K(n)}`)}${Q}`}catch(e){throw x(e),Error(`Failed to install Zed Shift+Enter key binding`)}}var Q,$,we=e((()=>{a(),o(),V(),G(),ue(),c(),ae(),te(),S(),ce(),b(),se(),g(),Q=`
33
+ `,$={ghostty:`Ghostty`,kitty:`Kitty`,"iTerm.app":`iTerm2`,WezTerm:`WezTerm`,WarpTerminal:`Warp`}}));export{_e as a,q as c,I as d,z as f,B as h,we as i,W as l,R as m,ge as n,ye as o,V as p,ve as r,J as s,be as t,G as u};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./terminalSetup-CmAEgt-5.js";n();export{s as call,r as getNativeCSIuTerminalDisplayName,a as hasUsedBackslashReturn,e as isShiftEnterKeyBindingInstalled,i as markBackslashReturnUsed,o as setupTerminal,t as shouldOfferTerminalSetup};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,T as n,p as r,t as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{n as o,t as s}from"./ThemePicker-BjSRjA_L.js";function c({onDone:e}){let[,t]=n();return(0,l.jsx)(r,{color:`permission`,children:(0,l.jsx)(s,{onThemeSelect:n=>{t(n),e(`Theme set to ${n}`)},onCancel:()=>{e(`Theme picker dismissed`,{display:`system`})},skipExitHandling:!0})})}var l,u;e((()=>{t(),i(),o(),l=a(),u=async(e,t)=>(0,l.jsx)(c,{onDone:e})}))();export{u as call};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./thinkback-Dzu2mnNF.js";e();export{n as call,t as playAnimation};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Lt as n,Rn as r,b as i,f as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{al as l,el as u}from"./paths-DfGsIjPm.js";import{G as d,J as f,U as p,l as m,p as h}from"./debug-otxXY3j-.js";import{r as ee,t as g}from"./execa-CGue6Z3n.js";import{o as te,s as _}from"./log-DS97_rIr.js";import{i as ne,o as v}from"./platform-DYZVoA9J.js";import{r as y,t as b}from"./execFileNoThrow-B_aZH_GP.js";import{Hs as x,Is as S,Js as C,Jy as w,Ky as T,Ms as re,Vs as ie,Zs as ae,aS as oe,aj as se,gc as ce,hc as E,oS as D,qs as O,rj as k,vs as A,ys as j}from"./loadAgentsDir-Br5fGLLI.js";import{n as M,r as N}from"./pluginStartupCheck-BVag9B-T.js";import{a as P,s as F}from"./pluginOperations-s0FQGOBm.js";import{join as I}from"path";import{readFile as L}from"fs/promises";function R(){return process.env.USER_TYPE===`ant`?q:k}function z(){return process.env.USER_TYPE===`ant`?J:Y}function B(){return`thinkback@${R()}`}async function V(){let{enabled:e}=await j(),t=e.find(e=>e.name===`thinkback`||e.source&&e.source.includes(B()));if(!t)return null;let n=I(t.path,`skills`,X);return await l(n)?n:null}async function H(e){let t=I(e,`year_in_review.js`),r=I(e,`player.js`);try{await L(t)}catch(e){return d(e)?{success:!1,message:`No animation found. Run /think-back first to generate one.`}:(_(e),{success:!1,message:`Could not access animation data: ${f(e).message}`})}try{await L(r)}catch(e){return d(e)?{success:!1,message:`Player script not found. The player.js file is missing from the thinkback skill.`}:(_(e),{success:!1,message:`Could not access player script: ${f(e).message}`})}let i=n.get(process.stdout);if(!i)return{success:!1,message:`Failed to access terminal instance`};i.enterAlternateScreen();try{await g(`node`,[r],{stdio:`inherit`,cwd:e,reject:!1})}catch{}finally{i.exitAlternateScreen()}let a=I(e,`year_in_review.html`);if(await l(a)){let e=ne();b(e===`macos`?`open`:e===`windows`?`start`:`xdg-open`,[a])}return{success:!0,message:`Year in review animation complete!`}}function U({onReady:e,onError:t}){let[n,r]=(0,G.useState)({phase:`checking`}),[a,o]=(0,G.useState)(``);if((0,G.useEffect)(()=>{async function n(){try{let t=await C(),n=R(),i=z(),a=B(),s=n in t,c=S(a);if(s?c||(r({phase:`installing-marketplace`}),o(`Updating marketplace…`),h(`Refreshing marketplace ${n}`),await ae(n,e=>{o(e)}),x(),E(),h(`Marketplace ${n} refreshed`)):(r({phase:`installing-marketplace`}),h(`Installing marketplace ${i}`),await ie({source:`github`,repo:i},e=>{o(e)}),E(),h(`Marketplace ${n} installed`)),c){let{disabled:e}=await j();if(e.some(e=>e.name===`thinkback`||e.source?.includes(a))){r({phase:`enabling-plugin`}),h(`Enabling plugin ${a}`);let e=await P(a);if(!e.success)throw Error(`Failed to enable plugin: ${e.message}`);E(),h(`Plugin ${a} enabled`)}}else{r({phase:`installing-plugin`}),h(`Installing plugin ${a}`);let e=await N([a]);if(e.failed.length>0){let t=e.failed.map(e=>`${e.name}: ${e.error}`).join(`, `);throw Error(`Failed to install plugin: ${t}`)}E(),h(`Plugin ${a} installed`)}r({phase:`ready`}),e()}catch(e){let n=f(e);_(n),r({phase:`error`,message:n.message}),t(n.message)}}n()},[e,t]),n.phase===`error`)return(0,K.jsx)(s,{flexDirection:`column`,children:(0,K.jsxs)(i,{color:`error`,children:[`Error: `,n.message]})});if(n.phase===`ready`)return null;let c=n.phase===`checking`?`Checking thinkback installation…`:n.phase===`installing-marketplace`?`Installing marketplace…`:n.phase===`enabling-plugin`?`Enabling thinkback plugin…`:`Installing thinkback plugin…`;return(0,K.jsx)(s,{flexDirection:`column`,children:(0,K.jsxs)(s,{children:[(0,K.jsx)(T,{}),(0,K.jsx)(i,{children:a||c})]})})}function W({onDone:e,onAction:t,skillDir:n,hasGenerated:r}){let[o,c]=(0,G.useState)(!1),l=r?[{label:`Play animation`,value:`play`,description:`Watch your year in review`},{label:`Edit content`,value:`edit`,description:`Modify the animation`},{label:`Fix errors`,value:`fix`,description:`Fix validation or rendering issues`},{label:`Regenerate`,value:`regenerate`,description:`Create a new animation from scratch`}]:[{label:`Let's go!`,value:`regenerate`,description:`Generate your personalized animation`}];function u(r){c(!0),r===`play`?H(n).then(()=>{e(void 0,{display:`skip`})}):t(r)}function d(){e(void 0,{display:`skip`})}return o?null:(0,K.jsx)(a,{title:`Think Back on 2025 with Claude Code`,subtitle:`Generate your 2025 Claude Code Think Back (takes a few minutes to run)`,onCancel:d,color:`claude`,children:(0,K.jsxs)(s,{flexDirection:`column`,gap:1,children:[!r&&(0,K.jsxs)(s,{flexDirection:`column`,children:[(0,K.jsx)(i,{children:`Relive your year of coding with Claude.`}),(0,K.jsx)(i,{dimColor:!0,children:`We'll create a personalized ASCII animation celebrating your journey.`})]}),(0,K.jsx)(oe,{options:l,onChange:u,visibleOptionCount:5})]})})}function le({onDone:e}){let[t,n]=(0,G.useState)(!1),[r,a]=(0,G.useState)(null),[o,c]=(0,G.useState)(null),[u,d]=(0,G.useState)(null);function f(){n(!0)}let p=(0,G.useCallback)(t=>{a(t),e(`Error with thinkback: ${t}. Try running /plugin to manually install the think-back plugin.`,{display:`system`})},[e]);(0,G.useEffect)(()=>{t&&!o&&!r&&V().then(e=>{e?(h(`Thinkback skill directory: ${e}`),c(e)):p(`Could not find thinkback skill directory`)})},[t,o,r,p]),(0,G.useEffect)(()=>{if(!o)return;let e=I(o,`year_in_review.js`);l(e).then(t=>{h(`Checking for ${e}: ${t?`found`:`not found`}`),d(t)})},[o]);function m(t){e({edit:Z,fix:Q,regenerate:$}[t],{display:`user`,shouldQuery:!0})}return r?(0,K.jsxs)(s,{flexDirection:`column`,children:[(0,K.jsxs)(i,{color:`error`,children:[`Error: `,r]}),(0,K.jsx)(i,{dimColor:!0,children:`Try running /plugin to manually install the think-back plugin.`})]}):t?!o||u===null?(0,K.jsxs)(s,{children:[(0,K.jsx)(T,{}),(0,K.jsx)(i,{children:`Loading thinkback skill…`})]}):(0,K.jsx)(W,{onDone:e,onAction:m,skillDir:o,hasGenerated:u}):(0,K.jsx)(U,{onReady:f,onError:p})}async function ue(e){return(0,K.jsx)(le,{onDone:e})}var G,K,q,J,Y,X,Z,Q,$,de=e((()=>{ee(),r(),G=t(r(),1),D(),o(),w(),F(),m(),p(),y(),u(),te(),v(),ce(),re(),O(),se(),A(),M(),K=c(),q=`claude-code-marketplace`,J=`anthropics/claude-code-marketplace`,Y=`anthropics/claude-plugins-official`,X=`thinkback`,Z=`Use the Skill tool to invoke the "thinkback" skill with mode=edit to modify my existing Claude Code year in review animation. Ask me what I want to change. When the animation is ready, tell the user to run /think-back again to play it.`,Q=`Use the Skill tool to invoke the "thinkback" skill with mode=fix to fix validation or rendering errors in my existing Claude Code year in review animation. Run the validator, identify errors, and fix them. When the animation is ready, tell the user to run /think-back again to play it.`,$=`Use the Skill tool to invoke the "thinkback" skill with mode=regenerate to create a completely new Claude Code year in review animation from scratch. Delete the existing animation and start fresh. When the animation is ready, tell the user to run /think-back again to play it.`}));export{de as n,H as r,ue as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ms as t,Rs as n,aj as r,rj as i}from"./loadAgentsDir-Br5fGLLI.js";import{n as a,r as o}from"./thinkback-Dzu2mnNF.js";import{join as s}from"path";function c(){return`thinkback@${process.env.USER_TYPE===`ant`?u:i}`}async function l(){let e=n(),t=c(),r=e.plugins[t];if(!r||r.length===0)return{type:`text`,value:`Thinkback plugin not installed. Run /think-back first to install it.`};let i=r[0];return i?.installPath?{type:`text`,value:(await o(s(i.installPath,`skills`,d))).message}:{type:`text`,value:`Thinkback plugin installation path not found.`}}var u,d;e((()=>{t(),r(),a(),u=`claude-code-marketplace`,d=`thinkback`}))();export{l as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{r,t as i}from"./execFileNoThrow-B_aZH_GP.js";import{a,i as o,t as s}from"./cliLaunch-8aeIk2ts.js";import{spawnSync as c}from"child_process";var l;e((()=>{r(),o(),t(),l=class{constructor(){n(this,`name`,`tmux`),n(this,`supportsInteractiveInput`,!0)}async available(){let{code:e}=await i(`tmux`,[`-V`],{useCwd:!1});return e===0}async start(e){let t=s(e.args,{env:{...e.env,CLAUDE_CODE_SESSION_KIND:`bg`,CLAUDE_CODE_SESSION_NAME:e.sessionName,CLAUDE_CODE_SESSION_LOG:e.logPath,CLAUDE_CODE_TMUX_SESSION:e.sessionName}}),n=a(t);if(c(`tmux`,[`new-session`,`-d`,`-s`,e.sessionName,n],{stdio:`inherit`,env:t.env}).status!==0)throw Error(`Failed to create tmux session.`);return{pid:0,sessionName:e.sessionName,logPath:e.logPath,engineUsed:`tmux`}}async attach(e){if(!e.tmuxSessionName)throw Error(`Session ${e.sessionId} has no tmux session name.`);if(c(`tmux`,[`attach-session`,`-t`,e.tmuxSessionName],{stdio:`inherit`}).status!==0)throw Error(`Failed to attach to tmux session '${e.tmuxSessionName}'.`)}}}))();export{l as TmuxEngine};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./toolEventObserver-i6it3p2_.js";i();export{c as hasToolHookObservationsForTurn,o as pruneEmittedTurns,n as recordToolComplete,e as recordToolError,a as recordToolStart,s as recordUserCorrection,t as resetToolHookBookkeeping,r as resetToolHookDepsCache,l as runToolCallWithSkillLearningHooks};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,p as n}from"./debug-otxXY3j-.js";import{o as r,s as i}from"./log-DS97_rIr.js";import{i as a,t as o}from"./observationStore-BaPq7CKI.js";import{randomUUID as s}from"node:crypto";function c(){for(let[e,t]of T)if(t.size>x){let e=t.values(),n=t.size-S;for(let r=0;r<n;r++){let n=e.next();if(n.done)break;t.delete(n.value)}}if(T.size>C){let e=T.size-w,t=0;for(let n of T.keys()){if(t>=e)break;T.delete(n),t++}}}function l(e,t){let n=T.get(e)??new Set;n.add(t),T.delete(e),T.set(e,n),c()}function u(e,t){return T.get(e)?.has(t)??!1}function d(){T.clear()}function f(e){return{id:s(),sessionId:e.sessionId,projectId:e.projectId,projectName:e.projectName,cwd:e.cwd,timestamp:new Date().toISOString(),source:`tool-hook`,turn:e.turn}}function p(){return E||(E=Promise.all([import(`./projectContext-D3_u80TY.js`),import(`./featureCheck-p7OeCYzj.js`),import(`./runtimeObserver-BfVC8KK9.js`)]).then(([e,t,n])=>({resolveProjectContext:e.resolveProjectContext,isSkillLearningEnabled:t.isSkillLearningEnabled,RUNTIME_SESSION_ID:n.RUNTIME_SESSION_ID,getRuntimeTurn:n.getRuntimeTurn}))),E}function m(){E=void 0}async function h(e,t,r,a){let o;try{let{resolveProjectContext:s,isSkillLearningEnabled:c,RUNTIME_SESSION_ID:l,getRuntimeTurn:u}=await p();if(!c())return a();let d=s(process.cwd());o={sessionId:r.sessionId??l,turn:r.turn??u(),projectId:d.projectId,projectName:d.projectName,cwd:d.cwd,project:d},g(o,e,t).catch(e=>{n(`skill-learning: recordToolStart error`),i(e)})}catch(e){n(`skill-learning: hook setup error`),i(e)}try{let t=await a();return o&&_(o,e,t,`success`).catch(e=>{n(`skill-learning: recordToolComplete error`),i(e)}),t}catch(t){throw o&&v(o,e,t).catch(e=>{n(`skill-learning: recordToolError error`),i(e)}),t}}async function g(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_start`,toolName:t,toolInput:b(n)},{project:e.project})}async function _(e,t,n,r=`success`){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:r},{project:e.project})}async function v(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:`failure`},{project:e.project})}async function y(e,t){return l(e.sessionId,e.turn),o({...f(e),event:`user_message`,messageText:t},{project:e.project})}function b(e){if(e!=null){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}}var x,S,C,w,T,E,D=e((()=>{a(),t(),r(),x=500,S=250,C=50,w=25,T=new Map}));export{v as a,d as c,_ as i,m as l,D as n,g as o,c as r,y as s,u as t,h as u};
@@ -0,0 +1 @@
1
+ import{a as e,n as t}from"./chunk-DR8-3Aex.js";import{Dl as n,Ol as r,bl as i,yl as a}from"./paths-DfGsIjPm.js";import{BE as o,Ow as s,kw as c,zE as l}from"./loadAgentsDir-Br5fGLLI.js";import{s as u,u as d}from"./prompt-B8M-HLIS.js";function f(e){return h.some(t=>e.endsWith(t))}function p(e){return e.filter(e=>u.has(e.name)||f(e.name))}function m(e,t,n){let[a,o]=r(i([...e,...t],`name`),c),s=(e,t)=>e.name.localeCompare(t.name),l=[...o.sort(s),...a.sort(s)];return g&&g.isCoordinatorMode()?p(l):l}var h,g,_=t((()=>{n(),a(),d(),s(),h=[`subscribe_pr_activity`,`unsubscribe_pr_activity`],g=(o(),e(l))}));export{m as i,_ as n,f as r,p as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./toolPool--2gNFbrz.js";e();export{t as applyCoordinatorToolFilter};
@@ -0,0 +1 @@
1
+ import{a as e,n as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./memoize-DNnuA2aU.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{Bn as o,Mt as s,S as c,Vn as l,_ as u,l as d,on as f}from"./paths-DfGsIjPm.js";import{E as p,O as m,U as h,l as g,p as _,z as v}from"./debug-otxXY3j-.js";import{l as y,u as b}from"./oauth-CdZEzMww.js";import{d as x,f as S}from"./log-DS97_rIr.js";import{hostname as C}from"os";function w(){return u(k,!1)}function T(){if(w())return A()}function E(){A.cache?.clear?.()}function D(){if(!w())return;let e=o();try{let t=e.read();t?.trustedDeviceToken&&(delete t.trustedDeviceToken,e.update(t))}catch{}A.cache?.clear?.()}async function O(){try{if(!await d(k)){_(`[trusted-device] Gate ${k} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){_(`[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)`);return}let{getClaudeAIOAuthTokens:t}=(f(),e(s)),n=t()?.accessToken;if(!n){_(`[trusted-device] No OAuth token, skipping enrollment`);return}let r=o();if(S()){_(`[trusted-device] Essential traffic only, skipping enrollment`);return}let a=y().BASE_API_URL,c;try{c=await i.post(`${a}/api/auth/trusted_devices`,{display_name:`Claude Code on ${C()} · ${process.platform}`},{headers:{Authorization:`Bearer ${n}`,"Content-Type":`application/json`},timeout:1e4,validateStatus:e=>e<500})}catch(e){_(`[trusted-device] Enrollment request failed: ${v(e)}`);return}if(c.status!==200&&c.status!==201){_(`[trusted-device] Enrollment failed ${c.status}: ${m(c.data).slice(0,200)}`);return}let l=c.data?.device_token;if(!l||typeof l!=`string`){_(`[trusted-device] Enrollment response missing device_token field`);return}try{let e=r.read();if(!e){_(`[trusted-device] Cannot read storage, skipping token persist`);return}e.trustedDeviceToken=l;let t=r.update(e);if(!t.success){_(`[trusted-device] Failed to persist token: ${t.warning??`unknown`}`);return}A.cache?.clear?.(),_(`[trusted-device] Enrolled device_id=${c.data.device_id??`unknown`}`)}catch(e){_(`[trusted-device] Storage write failed: ${v(e)}`)}}catch(e){_(`[trusted-device] Enrollment error: ${v(e)}`)}}var k,A,j=t((()=>{a(),r(),b(),c(),g(),h(),x(),l(),p(),k=`tengu_sessions_elevated_auth_enforcement`,A=n(()=>process.env.CLAUDE_TRUSTED_DEVICE_TOKEN||o().read()?.trustedDeviceToken)}));export{j as a,T as i,E as n,O as r,D as t};
@@ -0,0 +1 @@
1
+ import{a as e,r as t,t as n}from"./trustedDevice-DY8OosTr.js";e();export{n as clearTrustedDeviceToken,t as enrollTrustedDevice};
@@ -0,0 +1,6 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{U as r,cn as i}from"./state-sIHsFpDu.js";import{join as a}from"node:path";import{existsSync as o,mkdirSync as s,unlinkSync as c,writeFileSync as l}from"node:fs";function u(){return a(t(),`.tui-mode`)}function d(){return o(u())}function f(){let e=u();return s(t(),{recursive:!0}),l(e,new Date().toISOString(),`utf8`),{type:`text`,value:[`## TUI mode enabled`,``,`Marker written: \`${e}\``,``,`Flicker-free alternate-screen rendering will be active on the next`,`session start. Add this to your shell profile to make it permanent:`,``,` [ -f "$HOME/.claude/.tui-mode" ] && export CLAUDE_CODE_NO_FLICKER=1`,``,"To disable: `/tui off`"].join(`
2
+ `)}}function p(){let e=u();return o(e)?(c(e),{type:`text`,value:[`## TUI mode disabled`,``,`Marker removed: \`${e}\``,``,`Standard (non-alternate-screen) rendering will be used on the next`,`session start.`,``,"To re-enable: `/tui on`"].join(`
3
+ `)}):{type:`text`,value:`TUI mode was not active.`}}async function m(e){let t=e.trim().toLowerCase();if(t===`status`){let e=d(),t=u(),n=process.env.CLAUDE_CODE_NO_FLICKER,r;return r=n===`1`||n===`true`?`CLAUDE_CODE_NO_FLICKER=1 (forced on via env var)`:n===`0`||n===`false`?`CLAUDE_CODE_NO_FLICKER=0 (forced off via env var)`:`CLAUDE_CODE_NO_FLICKER not set`,{type:`text`,value:[`## TUI Mode Status`,``,` Marker file: ${e?`present`:`absent`} (\`${t}\`)`,` Mode: ${e?`enabled`:`disabled`}`,` Env var: ${r}`,``,`Note: changes take effect on the next session start.`].join(`
4
+ `)}}return t===`on`?f():t===`off`?p():t===``||t===`toggle`?d()?p():f():{type:`text`,value:[`Unknown subcommand: "${t}"`,``,h].join(`
5
+ `)}}var h,g,_,v=e((()=>{i(),n(),h=[`Usage: /tui [subcommand]`,``,` (no args) Toggle flicker-free TUI mode (alternate screen buffer)`,` on Enable TUI mode`,` off Disable TUI mode`,` status Show current TUI mode state`,``,`TUI mode uses the ANSI alternate screen buffer (\\x1b[?1049h) so the`,`Claude Code UI occupies a clean full-screen area with no scroll-back`,`flicker. The setting is stored in ~/.claude/.tui-mode and takes effect`,`on the next session start.`,``,`Shell-profile integration (auto-enable on every start):`,` [ -f "$HOME/.claude/.tui-mode" ] && export CLAUDE_CODE_NO_FLICKER=1`,``,`Environment override:`,` CLAUDE_CODE_NO_FLICKER=1 force on (overrides marker)`,` CLAUDE_CODE_NO_FLICKER=0 force off (overrides marker)`].join(`
6
+ `),g={type:`local-jsx`,name:`tui`,description:`Manage flicker-free TUI mode. Open actions or run: status, on, off, toggle`,isHidden:!1,isEnabled:()=>!r(),argumentHint:`[status|on|off|toggle]`,bridgeSafe:!0,getBridgeInvocationError:e=>e.trim()?void 0:`Use /tui status/on/off/toggle over Remote Control.`,load:()=>import(`./panel-DO_faHV-.js`)},_={type:`local`,name:`tui`,description:`Toggle flicker-free TUI mode (alternate screen buffer). Subcommands: on, off, status`,isHidden:!1,isEnabled:()=>r(),supportsNonInteractive:!0,bridgeSafe:!0,load:async()=>({call:m})}}));export{_ as i,v as n,g as r,m as t};
@@ -0,0 +1,17 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,Mn as r,Tt as i,Yn as a,kt as o,un as s,vt as c,wn as l}from"./schemas-BGAvj1T4.js";import{t as u}from"./v4-f1i_CNUT.js";import{C as d,E as f,O as p,w as m}from"./debug-otxXY3j-.js";import{o as h,s as g}from"./log-DS97_rIr.js";import{n as _,t as v}from"./memoize-CPexXTP7.js";import{n as y,t as b}from"./lazySchema-2sOku3cX.js";import{open as x,readFile as S,stat as C}from"fs/promises";function ee(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&E(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&E(e.charCodeAt(r)))for(r++;r<e.length&&E(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&E(e.charCodeAt(r))){for(r++;r<e.length&&E(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
2
+ `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(T(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(w(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(w(t));return o=15}if(T(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
3
+ `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!T(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,T(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!E(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(w(e)||T(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function w(e){return e===32||e===9}function T(e){return e===10||e===13}function E(e){return e>=48&&e<=57}var D,O=e((()=>{(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(D||(D={}))})),k,A,j,te,ne=e((()=>{k=Array(20).fill(0).map((e,t)=>` `.repeat(t)),A=200,j={" ":{"\n":Array(A).fill(0).map((e,t)=>`
4
+ `+` `.repeat(t)),"\r":Array(A).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(A).fill(0).map((e,t)=>`\r
5
+ `+` `.repeat(t))}," ":{"\n":Array(A).fill(0).map((e,t)=>`
6
+ `+` `.repeat(t)),"\r":Array(A).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(A).fill(0).map((e,t)=>`\r
7
+ `+` `.repeat(t))}},te=[`
8
+ `,`\r`,`\r
9
+ `]}));function re(e,t,n){let r,i,a,o,s;if(t){for(o=t.offset,s=o+t.length,a=o;a>0&&!N(e,a-1);)a--;let c=s;for(;c<e.length&&!N(e,c);)c++;i=e.substring(a,c),r=ie(i,n)}else i=e,r=0,a=0,o=0,s=e.length;let c=ae(n,e),l=te.includes(c),u=0,d=0,f;f=n.insertSpaces?k[n.tabSize||4]??M(k[1],n.tabSize||4):` `;let p=f===` `?` `:` `,m=ee(i,!1),h=!1;function g(){if(u>1)return M(c,u)+M(f,r+d);let e=f.length*(r+d);return!l||e>j[p][c].length?c+M(f,r+d):e<=0?c:j[p][c][e]}function _(){let e=m.scan();for(u=0;e===15||e===14;)e===14&&n.keepLines?u+=1:e===14&&(u=1),e=m.scan();return h=e===16||m.getTokenError()!==0,e}let v=[];function y(n,r,i){!h&&(!t||r<s&&i>o)&&e.substring(r,i)!==n&&v.push({offset:r,length:i-r,content:n})}let b=_();if(n.keepLines&&u>0&&y(M(c,u),0,0),b!==17){let e=m.getTokenOffset()+a;y(f.length*r<20&&n.insertSpaces?k[f.length*r]:M(f,r),a,e)}for(;b!==17;){let e=m.getTokenOffset()+m.getTokenLength()+a,t=_(),r=``,i=!1;for(;u===0&&(t===12||t===13);){let n=m.getTokenOffset()+a;y(k[1],e,n),e=m.getTokenOffset()+m.getTokenLength()+a,i=t===12,r=i?g():``,t=_()}if(t===2)b!==1&&d--,n.keepLines&&u>0||!n.keepLines&&b!==1?r=g():n.keepLines&&(r=k[1]);else if(t===4)b!==3&&d--,n.keepLines&&u>0||!n.keepLines&&b!==3?r=g():n.keepLines&&(r=k[1]);else{switch(b){case 3:case 1:d++,r=n.keepLines&&u>0||!n.keepLines?g():k[1];break;case 5:r=n.keepLines&&u>0||!n.keepLines?g():k[1];break;case 12:r=g();break;case 13:u>0?r=g():i||(r=k[1]);break;case 6:n.keepLines&&u>0?r=g():i||(r=k[1]);break;case 10:n.keepLines&&u>0?r=g():t===6&&!i&&(r=``);break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&u>0?r=g():(t===12||t===13)&&!i?r=k[1]:t!==5&&t!==17&&(h=!0);break;case 16:h=!0;break}u>0&&(t===12||t===13)&&(r=g())}t===17&&(r=n.keepLines&&u>0?g():n.insertFinalNewline?c:``);let o=m.getTokenOffset()+a;y(r,e,o),b=t}return v}function M(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}function ie(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===k[1])r++;else if(t===` `)r+=i;else break;n++}return Math.floor(r/i)}function ae(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if(n===`\r`)return e+1<t.length&&t.charAt(e+1)===`
10
+ `?`\r
11
+ `:`\r`;if(n===`
12
+ `)return`
13
+ `}return e&&e.eol||`
14
+ `}function N(e,t){return`\r
15
+ `.indexOf(e.charAt(t))!==-1}var P=e((()=>{O(),ne()}));function oe(e,t=[],n=L.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return I(e,{onObjectBegin:()=>{let e={};o(e),a.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=a.pop()},onArrayBegin:()=>{let e=[];o(e),a.push(i),i=e,r=null},onArrayEnd:()=>{i=a.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function se(e,t=[],n=L.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}function a(e){return r.children.push(e),e}I(e,{onObjectBegin:e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:(e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:(e,t,n)=>{a({type:fe(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:(e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n);let o=r.children[0];return o&&delete o.parent,o}function F(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function ce(e){if(!e.parent||!e.parent.children)return[];let t=ce(e.parent);if(e.parent.type===`property`){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type===`array`){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function le(e){switch(e.type){case`array`:return e.children.map(le);case`object`:let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=le(e))}return t;case`null`:case`string`:case`number`:case`boolean`:return e.value;default:return}}function ue(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function de(e,t,n=!1){if(ue(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=de(r[e],t,n);if(i)return i}return e}}function I(e,t,n=L.DEFAULT){let r=ee(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),_=s(t.onSeparator),v=o(t.onComment),y=s(t.onError),b=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:b||C(11);break;case 2:C(12);break;case 6:C(16);break}switch(e){case 12:case 13:b?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){S();break}else if(n.indexOf(e)!==-1)break;e=S()}}}function w(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function T(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}function E(){return r.getToken()===10?(w(!1),r.getToken()===6?(_(`:`),S(),k()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function D(){d(),S();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||C(4,[],[]),_(`,`),S(),r.getToken()===2&&x)break}else e&&C(6,[],[]);E()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function O(){m(),S();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||C(4,[],[]),_(`,`),S(),r.getToken()===4&&x)break}else t&&C(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,k()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function k(){switch(r.getToken()){case 3:return O();case 1:return D();case 10:return w(!0);default:return T()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):k()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}function fe(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}var L,R=e((()=>{O(),(function(e){e.DEFAULT={allowTrailingComma:!1}})(L||(L={}))}));function pe(e,t,n,r){let i=t.slice(),a=se(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=F(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return z(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}else if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=F(o,[s]);if(t!==void 0)if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return z(e,{offset:i,length:a-i,content:``},r)}else return z(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return z(e,a,r)}}else if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return z(e,i,r)}else if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return z(e,i,r)}else if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return z(e,t,r)}else throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}else throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}function z(e,t,n){if(!n.formattingOptions)return[t];let r=B(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!N(r,i-1);)i--;for(;a<r.length&&!N(r,a);)a++}let o=re(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=B(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}function B(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var me=e((()=>{P(),R()}));function he(e,t,n,r){return pe(e,t,n,r)}function ge(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=B(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}var V,H,U,W,_e=e((()=>{P(),me(),O(),R(),(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(V||(V={})),(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(H||(H={})),U=oe,(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(W||(W={}))}));function G(e){return e.startsWith(ve)?e.slice(1):e}var ve,K=e((()=>{ve=``}));function ye(e,t){try{return{ok:!0,value:JSON.parse(G(e))}}catch(e){return t&&g(e),{ok:!1}}}function be(e){if(!e)return null;try{return U(G(e))}catch(e){return g(e),null}}function xe(e){let t=Y,n=e.length,r=t(e);if(!r.error||r.done||r.read>=n)return r.values;let i=r.values,a=r.read;for(;a<n;){let r=typeof e==`string`?e.indexOf(`
16
+ `,a):e.indexOf(10,a);if(r===-1)break;a=r+1;let o=t(e,a);if(o.values.length>0&&(i=i.concat(o.values)),!o.error||o.done||o.read>=n)break;a=o.read}return i}function Se(e){let t=e.length,n=0;e[0]===239&&e[1]===187&&e[2]===191&&(n=3);let r=[];for(;n<t;){let i=e.indexOf(10,n);i===-1&&(i=t);let a=e.toString(`utf8`,n,i).trim();if(n=i+1,a)try{r.push(JSON.parse(a))}catch{}}return r}function Ce(e){let t=G(e),n=t.length,r=0,i=[];for(;r<n;){let e=t.indexOf(`
17
+ `,r);e===-1&&(e=n);let a=t.substring(r,e).trim();if(r=e+1,a)try{i.push(JSON.parse(a))}catch{}}return i}function q(e){return Y?xe(e):typeof e==`string`?Ce(e):Se(e)}async function we(e){try{var t=d();let{size:n}=await C(e);if(n<=X)return q(await S(e));let r=t.a(await x(e,`r`)),i=Buffer.allocUnsafe(X),a=0,o=n-X;for(;a<X;){let{bytesRead:e}=await r.read(i,a,X-a,o+a);if(e===0)break;a+=e}let s=i.indexOf(10);return s!==-1&&s<a-1?q(i.subarray(s+1,a)):q(i.subarray(0,a))}catch(e){t.e=e}finally{await t.d()}}function Te(e,t){try{if(!e||e.trim()===``)return p([t],null,4);let n=G(e),r=U(n);if(Array.isArray(r)){let e=r.length,i=he(n,e===0?[0]:[e],t,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});return!i||i.length===0?p([...r,t],null,4):ge(n,i)}else return p([t],null,4)}catch(e){return g(e),p([t],null,4)}}var Ee,J,De,Y,X,Oe=e((()=>{_e(),K(),h(),v(),f(),m(),Ee=8*1024,J=_(ye,e=>e,50),De=Object.assign(function(e,t=!0){if(!e)return null;let n=e.length>Ee?ye(e,t):J(e,t);return n.ok?n.value:null},{cache:J.cache}),Y=(()=>{if(typeof Bun>`u`)return!1;let e=Bun.JSONL;return e?.parseChunk?e.parseChunk:!1})(),X=100*1024*1024})),ke,Z,Ae,Q,je,Me,Ne,Pe,Fe,Ie,Le,$,Re,ze=e((()=>{u(),b(),ke=y(()=>c([`local`,`user`,`project`,`dynamic`,`enterprise`,`claudeai`,`managed`])),y(()=>c([`stdio`,`sse`,`sse-ide`,`http`,`ws`,`sdk`,`claudeai-proxy`])),Z=y(()=>l({type:s(`stdio`).optional(),command:n().min(1,`Command cannot be empty`),args:i(n()).default([]),env:r(n(),n()).optional()})),Ae=y(()=>o()),Q=y(()=>l({clientId:n().optional(),callbackPort:t().int().positive().optional(),authServerMetadataUrl:n().url().startsWith(`https://`,{message:`authServerMetadataUrl must use https://`}).optional(),xaa:Ae().optional()})),je=y(()=>l({type:s(`sse`),url:n(),headers:r(n(),n()).optional(),headersHelper:n().optional(),oauth:Q().optional()})),Me=y(()=>l({type:s(`sse-ide`),url:n(),ideName:n(),ideRunningInWindows:o().optional()})),Ne=y(()=>l({type:s(`ws-ide`),url:n(),ideName:n(),authToken:n().optional(),ideRunningInWindows:o().optional()})),Pe=y(()=>l({type:s(`http`),url:n(),headers:r(n(),n()).optional(),headersHelper:n().optional(),oauth:Q().optional()})),Fe=y(()=>l({type:s(`ws`),url:n(),headers:r(n(),n()).optional(),headersHelper:n().optional()})),Ie=y(()=>l({type:s(`sdk`),name:n()})),Le=y(()=>l({type:s(`claudeai-proxy`),url:n(),id:n()})),$=y(()=>a([Z(),je(),Me(),Ne(),Pe(),Fe(),Ie(),Le()])),Re=y(()=>l({mcpServers:r(n(),$())}))}));export{ze as a,q as c,be as d,K as f,Z as i,we as l,Re as n,Te as o,G as p,$ as r,Oe as s,ke as t,De as u};
@@ -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{D as r,E as i,K as a,U as o,l as s,p as c,z as l}from"./debug-otxXY3j-.js";import{o as u}from"./log-DS97_rIr.js";import{a as d,i as f}from"./genericProcessUtils-D-78JZxz.js";import"os";import{join as p}from"path";import"crypto";import{readFile as m,readdir as h}from"fs/promises";import"net";import"node:string_decoder";var g=e((()=>{o(),i()})),_=e((()=>{s(),o(),n(),g(),u(),i()}));function v(){return p(t(),`sessions`)}async function y(){let e=v(),t;try{t=await h(e)}catch(e){return a(e)||c(`[udsClient] readdir failed: ${l(e)}`),[]}let n=[];for(let i of t){if(!/^\d+\.json$/.test(i))continue;let t=parseInt(i.slice(0,-5),10);if(d(t))try{let a=r(await m(p(e,i),`utf8`));n.push({pid:t,sessionId:a.sessionId,cwd:a.cwd,startedAt:a.startedAt,kind:a.kind,name:a.name,messagingSocketPath:a.messagingSocketPath,entrypoint:a.entrypoint,bridgeSessionId:a.bridgeSessionId,alive:!0})}catch{}}return n}e((()=>{n(),s(),o(),f(),i(),_(),g()}))();export{y as listAllLiveSessions};
@@ -0,0 +1,3 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{Rn as i,b as a,f as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{S as u,_ as d,dn as f,mn as p,on as m,xn as h}from"./paths-DfGsIjPm.js";import{l as g,p as _}from"./debug-otxXY3j-.js";import{n as v,r as y}from"./analytics-DqMQntaB.js";import{_ as b,a as x,v as S}from"./git-DayFjsvj.js";import{l as ee,u as te}from"./oauth-CdZEzMww.js";import{r as ne,t as C}from"./execFileNoThrow-B_aZH_GP.js";import{Bv as w,Dv as T,Ev as E,Fv as D,Tv as O,aS as k,jv as A,oS as j,wv as M}from"./loadAgentsDir-Br5fGLLI.js";import{a as N,r as P}from"./detectRepository-CSN3yxkq.js";import{a as F,l as I,o as L}from"./api-BpQPVgif.js";import{n as R,t as z}from"./usage-VtTu7beE.js";async function B(){if(!f())return null;try{let{accessToken:e,orgUUID:t}=await I();return(await n.get(`${ee().BASE_API_URL}/v1/ultrareview/quota`,{headers:{...F(e),"x-organization-uuid":t},timeout:5e3})).data}catch(e){return _(`fetchUltrareviewQuota failed: ${e}`),null}}var V=e((()=>{r(),te(),m(),g(),L()}));function H(){G=!0}async function U(){if(h()||p())return{kind:`proceed`,billingNote:``};let[e,t]=await Promise.all([B(),z().catch(()=>null)]);if(!e)return{kind:`proceed`,billingNote:``};if(e.reviews_remaining>0)return{kind:`proceed`,billingNote:` This is free ultrareview ${e.reviews_used+1} of ${e.reviews_limit}.`};if(!t)return{kind:`proceed`,billingNote:``};let n=t.extra_usage;if(!n?.is_enabled)return y(`tengu_review_overage_not_enabled`,{}),{kind:`not-enabled`};let r=n.monthly_limit,i=n.used_credits??0,a=r==null?1/0:r-i;return a<10?(y(`tengu_review_overage_low_balance`,{available:a}),{kind:`low-balance`,available:a}):G?{kind:`proceed`,billingNote:` This review bills as Extra Usage.`}:(y(`tengu_review_overage_dialog_shown`,{}),{kind:`needs-confirm`})}async function W(e,t,n){let r=await M();if(!r.eligible){let e=r.errors.filter(e=>e.type!==`no_remote_environment`);if(e.length>0)return y(`tengu_review_remote_precondition_failed`,{precondition_errors:e.map(e=>e.type).join(`,`)}),[{type:`text`,text:`Ultrareview cannot launch:\n${e.map(O).join(`
2
+ `)}`}]}let i=n??``,a=e.trim(),o=/^\d+$/.test(a),s=`env_011111111111111111111113`,c=d(`tengu_review_bughunter_config`,null),l=(e,t,n)=>{if(typeof e!=`number`||!Number.isFinite(e))return t;let r=Math.floor(e);return r<=0||n!==void 0&&r>n?t:r},u={BUGHUNTER_DRY_RUN:`1`,BUGHUNTER_FLEET_SIZE:String(l(c?.fleet_size,5,20)),BUGHUNTER_MAX_DURATION:String(l(c?.max_duration_minutes,10,25)),BUGHUNTER_AGENT_TIMEOUT:String(l(c?.agent_timeout_seconds,600,1800)),BUGHUNTER_TOTAL_WALLCLOCK:String(l(c?.total_wallclock_minutes,22,27)),...process.env.BUGHUNTER_DEV_BUNDLE_B64&&{BUGHUNTER_DEV_BUNDLE_B64:process.env.BUGHUNTER_DEV_BUNDLE_B64}},f,p,m;if(o){let e=await P();if(!e||e.host!==`github.com`)return y(`tengu_review_remote_precondition_failed`,{}),null;f=await w({initialMessage:null,description:`ultrareview: ${e.owner}/${e.name}#${a}`,signal:t.abortController.signal,branchName:`refs/pull/${a}/head`,environmentId:s,environmentVariables:{BUGHUNTER_PR_NUMBER:a,BUGHUNTER_REPOSITORY:`${e.owner}/${e.name}`,...u}}),p=`/ultrareview ${a}`,m=`${e.owner}/${e.name}#${a}`}else{let e=await x()||`main`,{stdout:n,code:r}=await C(b(),[`merge-base`,e,`HEAD`],{preserveOutputOnError:!1}),i=n.trim();if(r!==0||!i)return y(`tengu_review_remote_precondition_failed`,{}),[{type:`text`,text:`Could not find merge-base with ${e}. Make sure you're in a git repo with a ${e} branch.`}];let{stdout:a,code:o}=await C(b(),[`diff`,`--shortstat`,i],{preserveOutputOnError:!1});if(o===0&&!a.trim())return y(`tengu_review_remote_precondition_failed`,{}),[{type:`text`,text:`No changes against the ${e} fork point. Make some commits or stage files first.`}];if(f=await w({initialMessage:null,description:`ultrareview: ${e}`,signal:t.abortController.signal,useBundle:!0,environmentId:s,environmentVariables:{BUGHUNTER_BASE_BRANCH:i,...u}}),!f)return y(`tengu_review_remote_teleport_failed`,{}),[{type:`text`,text:"Repo is too large. Push a PR and use `/ultrareview <PR#>` instead."}];p=`/ultrareview`,m=e}if(!f)return y(`tengu_review_remote_teleport_failed`,{}),null;A({remoteTaskType:`ultrareview`,session:f,command:p,context:t,isRemoteReview:!0}),y(`tengu_review_remote_launched`,{});let h=E(f.id);return[{type:`text`,text:`Ultrareview launched for ${m} (~10–20 min, runs in the cloud). Track: ${h}${i} Findings arrive via task-notification. Briefly acknowledge the launch to the user without repeating the target or URL — both are already visible in the tool output above.`}]}var G,K=e((()=>{u(),v(),V(),R(),T(),m(),N(),ne(),S(),D(),G=!1}));function q({onProceed:e,onCancel:t}){let[n,r]=(0,J.useState)(!1),i=(0,J.useRef)(new AbortController),s=(0,J.useCallback)(n=>{n===`proceed`?(r(!0),e(i.current.signal).catch(()=>r(!1))):t()},[e,t]),l=(0,J.useCallback)(()=>{i.current.abort(),t()},[t]);return(0,Y.jsx)(o,{title:`Ultrareview billing`,onCancel:l,color:`background`,children:(0,Y.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,Y.jsx)(a,{children:`Your free ultrareviews for this organization are used. Further reviews bill as Extra Usage (pay-per-use).`}),n?(0,Y.jsx)(a,{color:`background`,children:`Launching…`}):(0,Y.jsx)(k,{options:[{label:`Proceed with Extra Usage billing`,value:`proceed`},{label:`Cancel`,value:`cancel`}],onChange:s,onCancel:l})]})})}var J,Y,X=e((()=>{J=t(i(),1),j(),s(),Y=l()}));function re(e){return e.map(e=>e.type===`text`?e.text:``).filter(Boolean).join(`
3
+ `)}async function Z(e,t,n,r,i){let a=await W(e,t,r);i?.aborted||(a?n(re(a),{shouldQuery:!0}):n(`Ultrareview failed to launch the remote session. Check that this is a GitHub repo and try again.`,{display:`system`}))}var Q,$;e((()=>{K(),X(),Q=l(),$=async(e,t,n)=>{let r=await U();return r.kind===`not-enabled`?(e(`Free ultrareviews used. Enable Extra Usage at https://claude.ai/settings/billing to continue.`,{display:`system`}),null):r.kind===`low-balance`?(e(`Balance too low to launch ultrareview ($${r.available.toFixed(2)} available, $10 minimum). Top up at https://claude.ai/settings/billing`,{display:`system`}),null):r.kind===`needs-confirm`?(0,Q.jsx)(q,{onProceed:async r=>{await Z(n,t,e,` This review bills as Extra Usage.`,r),r.aborted||H()},onCancel:()=>e(`Ultrareview cancelled.`,{display:`system`})}):(await Z(n,t,e,r.billingNote),null)}}))();export{$ as call};
@@ -0,0 +1 @@
1
+ import{i as e,n as t}from"./undercover-D9O2McNG.js";t();export{e as shouldShowUndercoverAutoNotice};
@@ -0,0 +1,31 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{Ac as r,Sc as i}from"./paths-DfGsIjPm.js";import{l as a,s as o}from"./commitAttribution-HP_CWP0X.js";function s(){return process.env.USER_TYPE===`ant`?n(process.env.CLAUDE_CODE_UNDERCOVER)?!0:o()!==`internal`:!1}function c(){return process.env.USER_TYPE===`ant`?`## UNDERCOVER MODE — CRITICAL
2
+
3
+ You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Your commit
4
+ messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal
5
+ information. Do not blow your cover.
6
+
7
+ NEVER include in commit messages or PR descriptions:
8
+ - Internal model codenames (animal names like Capybara, Tengu, etc.)
9
+ - Unreleased model version numbers (e.g., sonnet-4-8)
10
+ - Internal repo or project names (e.g., claude-cli-internal, anthropics/…)
11
+ - Internal tooling, Slack channels, or short links (e.g., go/cc, #claude-code-…)
12
+ - The phrase "Claude Code" or any mention that you are an AI
13
+ - Any hint of what model or version you are
14
+ - Co-Authored-By lines or any other attribution
15
+
16
+ Write commit messages as a human developer would — describe only what the code
17
+ change does.
18
+
19
+ GOOD:
20
+ - "Fix race condition in file watcher initialization"
21
+ - "Add support for custom key bindings"
22
+ - "Refactor parser for better error messages"
23
+
24
+ BAD (never write these):
25
+ - "Fix bug found while testing with Claude Capybara"
26
+ - "1-shotted by claude-opus-4-6"
27
+ - "1-shotted by claude-opus-4-7"
28
+ - "Generated with Claude Code"
29
+ - "Co-Authored-By: Claude Opus 4.6 <…>"
30
+ - "Co-Authored-By: Claude Opus 4.7 <…>"
31
+ `:``}function l(){return process.env.USER_TYPE===`ant`?!(n(process.env.CLAUDE_CODE_UNDERCOVER)||!s()||i().hasSeenUndercoverAutoNotice):!1}var u=e((()=>{a(),r(),t()}));export{l as i,u as n,s as r,c as t};
@@ -0,0 +1,12 @@
1
+ import{r as e,v as t}from"./git-DayFjsvj.js";import{join as n}from"path";import{readFileSync as r}from"fs";import{spawnSync as i}from"child_process";t();async function a(){let t=process.cwd(),a=e(t),s=a?[a,t]:[t],c=null;for(let e of s){let t=n(e,`CLAUDE.md`);try{if(c=o(r(t,`utf-8`)),c){console.log(`Found "# claude up" in ${t}`);break}}catch{}}if(!c){console.log(`No "# claude up" section found in CLAUDE.md.
2
+ Add a section like:
3
+
4
+ # claude up
5
+ \`\`\`bash
6
+ npm install
7
+ npm run build
8
+ \`\`\``);return}console.log(`Running:
9
+ `),console.log(c),console.log();let l=i(`bash`,[`-c`,c],{cwd:t,stdio:`inherit`});l.status===0?console.log(`
10
+ claude up completed successfully.`):(console.error(`\nclaude up failed with exit code ${l.status}`),process.exitCode=l.status??1)}function o(e){let t=e.split(`
11
+ `),n=!1,r=[];for(let e of t){if(/^#\s+claude\s+up\b/i.test(e)){n=!0;continue}if(n&&/^#\s/.test(e))break;n&&r.push(e)}if(r.length===0)return null;let i=r.join(`
12
+ `).trim();return i=i.replace(/^```\w*\n?/,``).replace(/\n?```\s*$/,``),i.trim()||null}export{a as up};
@@ -0,0 +1,11 @@
1
+ import{In as e,Ln as t}from"./src-Di342QoJ.js";import{l as n,p as r}from"./debug-otxXY3j-.js";import{n as i,o as a}from"./process-DMKLUQIO.js";import{n as o,r as s}from"./execFileNoThrow-B_aZH_GP.js";import{CE as c,TE as l}from"./loadAgentsDir-Br5fGLLI.js";import{n as u,t as d}from"./distRoot-CcxmnzqQ.js";import{join as f}from"node:path";import{execSync as p}from"node:child_process";import{existsSync as m,readFileSync as h}from"node:fs";import{homedir as g}from"node:os";t(),n(),u(),s(),l(),i();var _=`claude-code-best`;function v(){try{let e=f(d,`..`,`package.json`);if(m(e)){let t=JSON.parse(h(e,`utf-8`));if(t.version)return t.version}}catch{}return`2.7.0`}function y(e){try{return p(`which ${e} 2>/dev/null`,{stdio:`pipe`}),!0}catch{return!1}}function b(){return!!(process.execPath.includes(`bun`)||m(f(f(g(),`.bun`,`install`,`global`),`node_modules`,_)))}async function x(){let e=await o(`npm`,[`view`,`${_}@latest`,`version`,`--prefer-online`],{abortSignal:AbortSignal.timeout(1e4),cwd:g()});return e.code===0?e.stdout.trim():(r(`npm view failed: ${e.stderr}`),null)}function S(e,t){let n=e=>e.replace(/^\D/,``).split(`.`).map(Number),r=n(e),i=n(t);for(let e=0;e<3;e++){if((r[e]??0)>(i[e]??0))return!0;if((r[e]??0)<(i[e]??0))return!1}return!0}async function C(){let t=v();a(`Current version: ${t}\n`);let n=y(`bun`),r=b()&&n?`bun`:`npm`;a(`Package manager: ${r}\n`),a(`Checking for updates...
2
+ `);let i=await x();if(!i){process.stderr.write(e.red(`Failed to check for updates`)+`
3
+ `),process.stderr.write(`Unable to fetch latest version from npm registry.
4
+ `),await c(1);return}if(i===t||S(t,i)){a(e.green(`ccb is up to date (${t})`)+`
5
+ `),await c(0);return}a(`New version available: ${i} (current: ${t})\n`),a(`Installing update via ${r}...\n`);try{p(r===`bun`?`bun install -g ${_}@latest`:`npm install -g ${_}@latest`,{stdio:`inherit`,cwd:g(),timeout:12e4}),a(e.green(`Successfully updated from ${t} to ${i}`)+`
6
+ `)}catch(t){process.stderr.write(e.red(`Update failed`)+`
7
+ `),process.stderr.write(`${t}\n`),process.stderr.write(`
8
+ `),process.stderr.write(`Try manually updating with:
9
+ `),r===`bun`?process.stderr.write(e.bold(` bun install -g ${_}@latest`)+`
10
+ `):process.stderr.write(e.bold(` npm install -g ${_}@latest`)+`
11
+ `),await c(1)}await c(0)}export{C as updateCCB};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./upgrade-Dq3l14ZY.js";e();export{t as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{Jt as r,dn as i,on as a,va as o,ya as s}from"./paths-DfGsIjPm.js";import{o as c,s as l}from"./log-DS97_rIr.js";import{n as u,t as d}from"./browser-DwnUS505.js";import{r as f,t as p}from"./login-CvvIpkpq.js";async function m(e,t){try{if(i()){let t=r(),n=!1;if(t?.subscriptionType&&t?.rateLimitTier)n=t.subscriptionType===`max`&&t.rateLimitTier===`default_claude_max_20x`;else if(t?.accessToken){let e=await o(t.accessToken);n=e?.organization?.organization_type===`claude_max`&&e?.organization?.rate_limit_tier===`default_claude_max_20x`}if(n)return setTimeout(e,0,`You are already on the highest Max subscription plan. For additional usage, run /login to switch to an API usage-billed account.`),null}return await u(`https://claude.ai/upgrade/max`),(0,h.jsx)(p,{startingMessage:`Starting new login following /upgrade. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}catch(t){l(t),setTimeout(e,0,`Failed to open browser. Please visit https://claude.ai/upgrade/max to upgrade.`)}return null}var h,g=e((()=>{t(),s(),a(),d(),c(),f(),h=n()}));export{g as n,m as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Ln as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{E as o,O as s,l as c,p as l}from"./debug-otxXY3j-.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{a as m,r as h,t as g}from"./bridgeConfig-CcCNsSBX.js";import{basename as _,extname as v}from"path";import{randomUUID as y}from"crypto";import{readFile as b}from"fs/promises";function x(e){return D[v(e).toLowerCase()]??`application/octet-stream`}function S(e){l(`[brief:upload] ${e}`)}function C(){return h()??process.env.ANTHROPIC_BASE_URL??u().BASE_API_URL}async function w(e,n,r){{if(!r.replBridgeEnabled)return;if(n>T){S(`skip ${e}: ${n} bytes exceeds ${T} limit`);return}let i=g();if(!i){S(`skip: no oauth token`);return}let a;try{a=await b(e)}catch(t){S(`read failed for ${e}: ${t}`);return}let o=`${C()}/api/oauth/file_upload`,c=_(e),l=x(c),u=`----FormBoundary${y()}`,d=Buffer.concat([Buffer.from(`--${u}\r\nContent-Disposition: form-data; name="file"; filename="${c}"\r\nContent-Type: ${l}\r\n\r\n`),a,Buffer.from(`\r\n--${u}--\r\n`)]);try{let a=await t.post(o,d,{headers:{Authorization:`Bearer ${i}`,"Content-Type":`multipart/form-data; boundary=${u}`,"Content-Length":d.length.toString()},timeout:E,signal:r.signal,validateStatus:()=>!0});if(a.status!==201){S(`upload failed for ${e}: status=${a.status} body=${s(a.data).slice(0,200)}`);return}let c=O().safeParse(a.data);if(!c.success){S(`unexpected response shape for ${e}: ${c.error.message}`);return}return S(`uploaded ${e} → ${c.data.file_uuid} (${n} bytes)`),c.data.file_uuid}catch(t){S(`upload threw for ${e}: ${t}`);return}}}var T,E,D,O;e((()=>{n(),a(),m(),d(),c(),p(),o(),T=30*1024*1024,E=3e4,D={".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".webp":`image/webp`},O=f(()=>i({file_uuid:r()}))}))();export{w as uploadBriefAttachment};
@@ -0,0 +1,11 @@
1
+ import{i as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{G as r,Q as i,U as a,Z as o,l as s,p as c}from"./debug-otxXY3j-.js";import{c as l,g as u,h as d,l as f,u as p}from"./proxy-nPT6a6QY.js";import{homedir as m}from"os";import{join as h}from"path";import{mkdir as g,readFile as _,unlink as v,writeFile as y}from"fs/promises";import{createServer as b}from"node:net";t(),o(),a(),s(),u(),p();var x,S=512*1024,C=3e4;function w(e){let t=e.length,n=[],r=t;for(;r>127;)n.push(r&127|128),r>>>=7;n.push(r);let i=new Uint8Array(1+n.length+t);return i[0]=10,i.set(n,1),i.set(e,1+n.length),i}function T(e){if(e.length===0)return new Uint8Array;if(e[0]!==10)return null;let t=0,n=0,r=1;for(;r<e.length;){let i=e[r];if(t|=(i&127)<<n,r++,!(i&128))break;if(n+=7,n>28)return null}return r+t>e.length?null:e.subarray(r,r+t)}function E(){return{connectBuf:Buffer.alloc(0),pending:[],wsOpen:!1,established:!1,closed:!1}}async function D(e){let t=`Basic `+Buffer.from(`${e.sessionId}:${e.token}`).toString(`base64`),n=`Bearer ${e.token}`,r=typeof Bun<`u`?O(e.wsUrl,t,n):await k(e.wsUrl,t,n);return c(`[upstreamproxy] relay listening on 127.0.0.1:${r.port}`),r}function O(e,t,n){let r=Bun.listen({hostname:`127.0.0.1`,port:0,socket:{open(e){e.data={...E(),writeBuf:[]}},data(r,i){let a=r.data;A({write:e=>{let t=typeof e==`string`?Buffer.from(e,`utf8`):e;if(a.writeBuf.length>0){a.writeBuf.push(t);return}let n=r.write(t);n<t.length&&a.writeBuf.push(t.subarray(n))},end:()=>r.end()},a,i,e,t,n)},drain(e){let t=e.data;for(;t.writeBuf.length>0;){let n=t.writeBuf[0],r=e.write(n);if(r<n.length){t.writeBuf[0]=n.subarray(r);return}t.writeBuf.shift()}},close(e){P(e.data)},error(e,t){c(`[upstreamproxy] client socket error: ${t.message}`),P(e.data)}}});return{port:r.port,stop:()=>r.stop(!0)}}async function k(e,t,n){x=(await import(`./wrapper-BSK0MCQH.js`)).default;let r=new WeakMap,i=b(i=>{let a=E();r.set(i,a);let o={write:e=>{i.write(typeof e==`string`?e:Buffer.from(e))},end:()=>i.end()};i.on(`data`,r=>A(o,a,r,e,t,n)),i.on(`close`,()=>P(r.get(i))),i.on(`error`,e=>{c(`[upstreamproxy] client socket error: ${e.message}`),P(r.get(i))})});return new Promise((e,t)=>{i.once(`error`,t),i.listen(0,`127.0.0.1`,()=>{let n=i.address();if(n===null||typeof n==`string`){t(Error(`upstreamproxy: server has no TCP address`));return}e({port:n.port,stop:()=>i.close()})})})}function A(e,t,n,r,i,a){if(!t.ws){t.connectBuf=Buffer.concat([t.connectBuf,n]);let o=t.connectBuf.indexOf(`\r
2
+ \r
3
+ `);if(o===-1){t.connectBuf.length>8192&&(e.write(`HTTP/1.1 400 Bad Request\r
4
+ \r
5
+ `),e.end());return}let s=t.connectBuf.subarray(0,o).toString(`utf8`).split(`\r
6
+ `)[0]??``;if(!s.match(/^CONNECT\s+(\S+)\s+HTTP\/1\.[01]$/i)){e.write(`HTTP/1.1 405 Method Not Allowed\r
7
+ \r
8
+ `),e.end();return}let c=t.connectBuf.subarray(o+4);c.length>0&&t.pending.push(Buffer.from(c)),t.connectBuf=Buffer.alloc(0),j(e,t,s,r,i,a);return}if(!t.wsOpen){t.pending.push(Buffer.from(n));return}N(t.ws,n)}function j(e,t,n,r,i,a){let o={"Content-Type":`application/proto`,Authorization:a},s;s=x?new x(r,{headers:o,agent:l(r),...d()}):new globalThis.WebSocket(r,{headers:o,proxy:f(r),tls:d()||void 0}),s.binaryType=`arraybuffer`,t.ws=s,s.onopen=()=>{let e=`${n}\r\nProxy-Authorization: ${i}\r\n\r\n`;s.send(w(new Uint8Array(Buffer.from(e,`utf8`)))),t.wsOpen=!0;for(let e of t.pending)N(s,e);t.pending=[],t.pinger=setInterval(M,C,s)},s.onmessage=n=>{let r=T(n.data instanceof ArrayBuffer?new Uint8Array(n.data):new Uint8Array(Buffer.from(n.data)));r&&r.length>0&&(t.established=!0,e.write(r))},s.onerror=n=>{c(`[upstreamproxy] ws error: ${`message`in n?String(n.message):`websocket error`}`),!t.closed&&(t.closed=!0,t.established||e.write(`HTTP/1.1 502 Bad Gateway\r
9
+ \r
10
+ `),e.end(),P(t))},s.onclose=()=>{t.closed||(t.closed=!0,e.end(),P(t))}}function M(e){e.readyState===WebSocket.OPEN&&e.send(w(new Uint8Array))}function N(e,t){if(e.readyState===WebSocket.OPEN)for(let n=0;n<t.length;n+=S){let r=new Uint8Array(t.subarray(n,n+S));e.send(w(r))}}function P(e){if(e){if(e.pinger&&clearInterval(e.pinger),e.ws&&e.ws.readyState<=WebSocket.OPEN)try{e.ws.close()}catch{}e.ws=void 0}}s();var F=`/etc/ssl/certs/ca-certificates.crt`,I=[`localhost`,`127.0.0.1`,`::1`,`169.254.0.0/16`,`10.0.0.0/8`,`172.16.0.0/12`,`192.168.0.0/16`,`anthropic.com`,`.anthropic.com`,`*.anthropic.com`,`github.com`,`api.github.com`,`*.github.com`,`*.githubusercontent.com`,`registry.npmjs.org`,`pypi.org`,`files.pythonhosted.org`,`index.crates.io`,`proxy.golang.org`].join(`,`),L={enabled:!1};async function R(e){if(!n(process.env.CLAUDE_CODE_REMOTE)||!n(process.env.CCR_UPSTREAM_PROXY_ENABLED))return L;let t=process.env.CLAUDE_CODE_REMOTE_SESSION_ID;if(!t)return c(`[upstreamproxy] CLAUDE_CODE_REMOTE_SESSION_ID unset; proxy disabled`,{level:`warn`}),L;let r=e?.tokenPath??`/run/ccr/session_token`,a=await B(r);if(!a)return c(`[upstreamproxy] no session token file; proxy disabled`),L;V();let o=e?.ccrBaseUrl??process.env.ANTHROPIC_BASE_URL??`https://api.anthropic.com`,s=e?.caBundlePath??h(m(),`.ccr`,`ca-bundle.crt`);if(!await H(o,e?.systemCaPath??F,s))return L;try{let e=await D({wsUrl:o.replace(/^http/,`ws`)+`/v1/code/upstreamproxy/ws`,sessionId:t,token:a});i(async()=>e.stop()),L={enabled:!0,port:e.port,caBundlePath:s},c(`[upstreamproxy] enabled on 127.0.0.1:${e.port}`),await v(r).catch(()=>{c(`[upstreamproxy] token file unlink failed`,{level:`warn`})})}catch(e){c(`[upstreamproxy] relay start failed: ${e instanceof Error?e.message:String(e)}; proxy disabled`,{level:`warn`})}return L}function z(){if(!L.enabled||!L.port||!L.caBundlePath){if(process.env.HTTPS_PROXY&&process.env.SSL_CERT_FILE){let e={};for(let t of[`HTTPS_PROXY`,`https_proxy`,`NO_PROXY`,`no_proxy`,`SSL_CERT_FILE`,`NODE_EXTRA_CA_CERTS`,`REQUESTS_CA_BUNDLE`,`CURL_CA_BUNDLE`])process.env[t]&&(e[t]=process.env[t]);return e}return{}}let e=`http://127.0.0.1:${L.port}`;return{HTTPS_PROXY:e,https_proxy:e,NO_PROXY:I,no_proxy:I,SSL_CERT_FILE:L.caBundlePath,NODE_EXTRA_CA_CERTS:L.caBundlePath,REQUESTS_CA_BUNDLE:L.caBundlePath,CURL_CA_BUNDLE:L.caBundlePath}}async function B(e){try{return(await _(e,`utf8`)).trim()||null}catch(e){return r(e)||c(`[upstreamproxy] token read failed: ${e instanceof Error?e.message:String(e)}`,{level:`warn`}),null}}function V(){if(!(process.platform!==`linux`||typeof Bun>`u`))try{e(`bun:ffi`).dlopen(`libc.so.6`,{prctl:{args:[`int`,`u64`,`u64`,`u64`,`u64`],returns:`int`}}).symbols.prctl(4,0n,0n,0n,0n)!==0&&c(`[upstreamproxy] prctl(PR_SET_DUMPABLE,0) returned nonzero`,{level:`warn`})}catch(e){c(`[upstreamproxy] prctl unavailable: ${e instanceof Error?e.message:String(e)}`,{level:`warn`})}}async function H(e,t,n){try{let r=await fetch(`${e}/v1/code/upstreamproxy/ca-cert`,{signal:AbortSignal.timeout(5e3)});if(!r.ok)return c(`[upstreamproxy] ca-cert fetch ${r.status}; proxy disabled`,{level:`warn`}),!1;let i=await r.text(),a=await _(t,`utf8`).catch(()=>``);return await g(h(n,`..`),{recursive:!0}),await y(n,a+`
11
+ `+i,`utf8`),!0}catch(e){return c(`[upstreamproxy] ca-cert download failed: ${e instanceof Error?e.message:String(e)}; proxy disabled`,{level:`warn`}),!1}}export{z as getUpstreamProxyEnv,R as initUpstreamProxy};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./jsx-runtime-D-D469L8.js";import{n,t as r}from"./Settings-DiXc-_IG.js";var i,a;e((()=>{n(),i=t(),a=async(e,t)=>(0,i.jsx)(r,{onClose:e,context:t,defaultTab:`Usage`})}))();export{a as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{At as r,Jt as i,an as a,bt as o,da as s,dn as c,jt as l,on as u,ua as d,wt as f}from"./paths-DfGsIjPm.js";import{l as p,u as m}from"./oauth-CdZEzMww.js";async function h(){if(!c()||!a())return{};let e=i();if(e&&s(e.expiresAt))return null;let n=o();if(n.error)throw Error(`Auth error: ${n.error}`);let l={"Content-Type":`application/json`,"User-Agent":r(),...n.headers},u=`${p().BASE_API_URL}/api/oauth/usage`;return(await t.get(u,{headers:l,timeout:5e3})).data}var g=e((()=>{n(),m(),u(),f(),l(),d()}));export{g as n,h as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{Br as r,Pr as i,S as a,w as o,wr as s}from"./paths-DfGsIjPm.js";import{lC as c,uC as l}from"./loadAgentsDir-Br5fGLLI.js";function u(){let e=l(e=>e.mainLoopModel),t=l(e=>e.mainLoopModelForSession),[,n]=(0,d.useReducer)(e=>e+1,0);return(0,d.useEffect)(()=>o(n),[]),r(t??e??s())}var d,f=e((()=>{d=t(n(),1),a(),c(),i()}));export{u as n,f as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{J as n,U as r,l as i,p as a}from"./debug-otxXY3j-.js";import{n as o,r as s}from"./analytics-DqMQntaB.js";import{F as c,P as l}from"./git-DayFjsvj.js";import{o as u,s as d}from"./log-DS97_rIr.js";import{b as f,x as p}from"./teammate-DMYOtLTK.js";import{Ac as m,Bh as h,Gh as g,Hh as _,Oc as v,Wh as y,fC as b,jc as x,kc as S,lC as C,nT as w,oC as T,oy as E,sC as D,sy as O,tT as k,uC as A,vs as j,ys as M}from"./loadAgentsDir-Br5fGLLI.js";import{n as N,r as P}from"./pluginFlagging-BeqrbhgG.js";import{t as F}from"./pluginBlocklist-BzI5DNeN.js";var I=e(t(),1);T(),o(),h(),C(),p(),i(),l(),r(),u(),m(),S(),E(),y(),k(),P(),j();function L({enabled:e=!0}={}){let t=b(),r=A(e=>e.plugins.needsRefresh),{addNotification:i}=D(),o=(0,I.useCallback)(async()=>{try{let{enabled:e,disabled:n,errors:r}=await M();await F();let o=N();Object.keys(o).length>0&&i({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let s=[],c=[];try{s=await v()}catch(e){let t=e instanceof Error?e.message:String(e);r.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{c=await x()}catch(e){let t=e instanceof Error?e.message:String(e);r.push({type:`generic-error`,source:`plugin-agents`,error:`Failed to load plugin agents: ${t}`})}try{await O()}catch(e){let t=e instanceof Error?e.message:String(e);r.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let l=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await w(e,r);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),u=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await g(e,r);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);_(),t(t=>{let i=t.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),a=new Set(r.map(e=>e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`)),o=[...i.filter(e=>{let t=e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`;return!a.has(t)}),...r];return{...t,plugins:{...t.plugins,enabled:e,disabled:n,commands:s,errors:o}}}),a(`Loaded plugins - Enabled: ${e.length}, Disabled: ${n.length}, Commands: ${s.length}, Agents: ${c.length}, Errors: ${r.length}`);let d=e.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{enabled_count:e.length,disabled_count:n.length,inline_count:f(e,e=>e.source.endsWith(`@inline`)),marketplace_count:f(e,e=>!e.source.endsWith(`@inline`)),error_count:r.length,skill_count:s.length,agent_count:c.length,hook_count:d,mcp_count:l,lsp_count:u,ant_enabled_names:process.env.USER_TYPE===`ant`&&e.length>0?e.map(e=>e.name).sort().join(`,`):void 0}}catch(e){let r=n(e);return d(r),a(`Error loading plugins: ${e}`),t(e=>{let t=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),n={type:`generic-error`,source:`plugin-system`,error:r.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...t,n]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[t,i]);(0,I.useEffect)(()=>{e&&o().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};s(`tengu_plugins_loaded`,{...r,...t!==void 0&&{enabled_names:t}}),c(`info`,`tengu_plugins_loaded`,r)})},[o,e]),(0,I.useEffect)(()=>{!e||!r||i({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,r,i])}export{L as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{$u as r,Yu as i}from"./loadAgentsDir-Br5fGLLI.js";import{i as a,n as o}from"./toolPool--2gNFbrz.js";function s(e,t,n){return(0,c.useMemo)(()=>a(e,i(n,t),n.mode),[e,t,n,!1,!1])}var c,l=e((()=>{c=t(n(),1),r(),o()}));export{s as n,l as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,t as i,xt as a,zt as o}from"./src-Di342QoJ.js";import{AS as s,FS as c,IS as l,LS as u,OS as d,PS as f,RS as p,hT as m,kS as h,zS as g}from"./loadAgentsDir-Br5fGLLI.js";function _(e){return!!(e.ctrl&&(e.key===`k`||e.key===`u`||e.key===`w`)||e.meta&&e.key===`backspace`)}function v(e){return(e.ctrl||e.meta)&&e.key===`y`}function y({isActive:e,onExit:t,onCancel:r,onExitUp:i,columns:s,passthroughCtrlKeys:m=[],initialQuery:y=``,backspaceExitsOnEmpty:S=!0}){let{columns:C}=n(),w=s??C,[T,E]=(0,b.useState)(y),[D,O]=(0,b.useState)(y.length),k=(0,b.useCallback)(e=>{E(e),O(e.length)},[]),A=n=>{if(!e)return;let a=d.fromText(T,w,D);if(!(n.ctrl&&m.includes(n.key.toLowerCase()))){if(_(n)||l(),v(n)||u(),n.key===`return`||n.key===`down`){n.preventDefault(),t();return}if(n.key===`up`){n.preventDefault(),i&&i();return}if(n.key===`escape`){n.preventDefault(),r?r():T.length>0?(E(``),O(0)):t();return}if(n.key===`backspace`){if(n.preventDefault(),n.meta){let{cursor:e,killed:t}=a.deleteWordBefore();f(t,`prepend`),E(e.text),O(e.offset);return}if(T.length===0){S&&(r??t)();return}let e=a.backspace();E(e.text),O(e.offset);return}if(n.key===`delete`){n.preventDefault();let e=a.del();E(e.text),O(e.offset);return}if(n.key===`left`&&(n.ctrl||n.meta||n.fn)){n.preventDefault(),O(a.prevWord().offset);return}if(n.key===`right`&&(n.ctrl||n.meta||n.fn)){n.preventDefault(),O(a.nextWord().offset);return}if(n.key===`left`){n.preventDefault(),O(a.left().offset);return}if(n.key===`right`){n.preventDefault(),O(a.right().offset);return}if(n.key===`home`){n.preventDefault(),O(0);return}if(n.key===`end`){n.preventDefault(),O(T.length);return}if(n.ctrl){switch(n.preventDefault(),n.key.toLowerCase()){case`a`:O(0);return;case`e`:O(T.length);return;case`b`:O(a.left().offset);return;case`f`:O(a.right().offset);return;case`d`:{if(T.length===0){(r??t)();return}let e=a.del();E(e.text),O(e.offset);return}case`h`:{if(T.length===0){S&&(r??t)();return}let e=a.backspace();E(e.text),O(e.offset);return}case`k`:{let{cursor:e,killed:t}=a.deleteToLineEnd();f(t,`append`),E(e.text),O(e.offset);return}case`u`:{let{cursor:e,killed:t}=a.deleteToLineStart();f(t,`prepend`),E(e.text),O(e.offset);return}case`w`:{let{cursor:e,killed:t}=a.deleteWordBefore();f(t,`prepend`),E(e.text),O(e.offset);return}case`y`:{let e=h();if(e.length>0){let t=a.offset,n=a.insert(e);c(t,e.length),E(n.text),O(n.offset)}return}case`g`:case`c`:if(r){r();return}}return}if(n.meta){switch(n.preventDefault(),n.key.toLowerCase()){case`b`:O(a.prevWord().offset);return;case`f`:O(a.nextWord().offset);return;case`d`:{let e=a.deleteWordAfter();E(e.text),O(e.offset);return}case`y`:{let e=g();if(e){let{text:t,start:n,length:r}=e,i=T.slice(0,n),a=T.slice(n+r),o=i+t+a,s=n+t.length;p(t.length),E(o),O(s)}return}}return}if(n.key!==`tab`&&n.key.length>=1&&!x.has(n.key)){n.preventDefault();let e=a.insert(n.key);E(e.text),O(e.offset)}}};return a((e,t,n)=>{A(new o(n.keypress))},{isActive:e}),{query:T,setQuery:k,cursorOffset:D,handleKeyDown:A}}var b,x,S=e((()=>{b=t(r(),1),i(),s(),m(),x=new Set([`pageup`,`pagedown`,`insert`,`wheelup`,`wheeldown`,`mouse`,`f1`,`f2`,`f3`,`f4`,`f5`,`f6`,`f7`,`f8`,`f9`,`f10`,`f11`,`f12`])}));export{y as n,S as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{W as r,cn as i}from"./state-sIHsFpDu.js";import{cx as a,lx as o,oC as s,sC as c,vC as l,yC as u}from"./loadAgentsDir-Br5fGLLI.js";function d(){let{addNotification:e,removeNotification:t}=c(),[n,i]=(0,f.useState)(()=>{let{errors:e}=a();return e});return u((0,f.useCallback)(()=>{let{errors:e}=a();i(e)},[])),(0,f.useEffect)(()=>{r()||(n.length>0?e({key:p,text:`Found ${n.length} settings ${n.length===1?`issue`:`issues`} · /doctor for details`,color:`warning`,priority:`high`,timeoutMs:6e4}):t(p))},[n,e,t]),n}var f,p,m=e((()=>{f=t(n()),s(),i(),o(),l(),p=`settings-errors`}));export{d as n,m as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{Rn as a,Ut as o,t as s}from"./src-Di342QoJ.js";import{cn as c,ut as l}from"./state-sIHsFpDu.js";import{Ka as u,oo as d}from"./paths-DfGsIjPm.js";import{J as f,U as p,l as m,p as h}from"./debug-otxXY3j-.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{i as v,v as y}from"./git-DayFjsvj.js";import{o as b,s as x}from"./log-DS97_rIr.js";import{i as ee,s as S}from"./intl-Pse97ORk.js";import{n as te,t as C}from"./sleep-8Eb9j_Ly.js";import{SC as w,wC as ne}from"./loadAgentsDir-Br5fGLLI.js";import{i as re,n as T,r as E}from"./voiceStreamSTT-CL52x8wZ.js";import{basename as D}from"path";import{homedir as O}from"node:os";function k(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).split(/[-_./\s]+/).map(e=>e.trim()).filter(e=>e.length>2&&e.length<=20)}function A(e){return k(D(e).replace(/\.[^.]+$/,``))}async function j(e){let t=new Set(M);try{let e=l();if(e){let n=D(e);n.length>2&&n.length<=50&&t.add(n)}}catch{}try{let e=await v();if(e)for(let n of k(e))t.add(n)}catch{}if(e)for(let n of e){if(t.size>=N)break;for(let e of A(n))t.add(e)}return[...t].slice(0,N)}var M,N,P=e((()=>{c(),y(),M=[`MCP`,`symlink`,`grep`,`regex`,`localhost`,`codebase`,`TypeScript`,`JSON`,`OAuth`,`webhook`,`gRPC`,`dotfiles`,`subagent`,`worktree`],N=50}));function ie(){return L===null?!0:L}async function ae(e,t){let n;try{n=await import(`doubaoime-asr`)}catch(t){return x(Error(`[doubao-asr] Failed to import doubaoime-asr package: ${String(t)}`)),e.onError(`doubaoime-asr package import failed: ${String(t)}`,{fatal:!0}),null}let{transcribeRealtime:r,ASRConfig:i,ResponseType:a}=n,o=new I,s=!1,c={resolve:null},l={send(e){s||o.push(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},finalize(){return s?Promise.resolve(`ws_already_closed`):(s=!0,o.push(null),h(`[doubao-asr] Finalize — resolving immediately`),Promise.resolve(`post_closestream_endpoint`))},close(){s=!0,o.abort();let t=c.resolve;c.resolve=null,t&&t(`ws_close`),e.onClose()},isConnected(){return!0}},u=new i({credentialPath:`${O()}/.claude/tts/doubao/credentials.json`});try{await u.ensureCredentials()}catch(t){return x(Error(`[doubao-asr] Credential initialization failed: ${String(t)}`)),e.onError(`Doubao ASR 凭证初始化失败: ${String(t)}`,{fatal:!0}),null}return h(`[doubao-asr] Firing onReady immediately`),e.onReady(l),(async()=>{try{let t=r(o,{config:u});for await(let n of t)if(!(s&&n.type!==a.FINAL_RESULT&&n.type!==a.SESSION_FINISHED))switch(n.type){case a.SESSION_STARTED:h(`[doubao-asr] Session started`);break;case a.VAD_START:h(`[doubao-asr] VAD detected speech start`);break;case a.INTERIM_RESULT:n.text&&e.onTranscript(n.text,!1);break;case a.FINAL_RESULT:n.text&&e.onTranscript(n.text,!0);break;case a.ERROR:x(Error(`[doubao-asr] Error: ${n.errorMsg}`)),s||e.onError(n.errorMsg||`Doubao ASR 识别错误`);break;case a.SESSION_FINISHED:h(`[doubao-asr] Session finished`);break;default:break}let n=c.resolve;c.resolve=null,n&&n(`post_closestream_endpoint`)}catch(t){x(Error(`[doubao-asr] Stream error: ${String(t)}`)),s||e.onError(`Doubao ASR 连接错误: ${String(t)}`);let n=c.resolve;c.resolve=null,n&&n(`ws_close`)}})(),l}var F,I,L,R=e((()=>{m(),b(),r(),F=Symbol.asyncIterator,I=class{constructor(){i(this,`chunks`,[]),i(this,`waiting`,null),i(this,`done`,!1)}push(e){if(!this.done){if(e===null){if(this.done=!0,this.waiting){let e=this.waiting;this.waiting=null,e({value:void 0,done:!0})}return}if(this.waiting){let t=this.waiting;this.waiting=null,t({value:e,done:!1})}else this.chunks.push(e)}}abort(){if(this.done=!0,this.chunks.length=0,this.waiting){let e=this.waiting;this.waiting=null,e({value:void 0,done:!0})}}[F](){return{next:async()=>this.chunks.length>0?{value:this.chunks.shift(),done:!1}:this.done?{value:void 0,done:!0}:new Promise(e=>{this.waiting=e})}}},L=null})),z=n({FIRST_PRESS_FALLBACK_MS:()=>Z,computeLevel:()=>H,normalizeLanguageForSTT:()=>V,useVoice:()=>U});function B(){return u().voiceProvider===`doubao`}function V(e){if(!e)return{code:G};let t=e.toLowerCase().trim();if(!t)return{code:G};if(q.has(t))return{code:t};let n=K[t];if(n)return{code:n};let r=t.split(`-`)[0];return r&&q.has(r)?{code:r}:{code:G,fellBackFrom:e}}function H(e){let t=e.length>>1;if(t===0)return 0;let n=0;for(let t=0;t<e.length-1;t+=2){let r=(e[t]|e[t+1]<<8)<<16>>16;n+=r*r}let r=Math.sqrt(n/t),i=Math.min(r/2e3,1);return Math.sqrt(i)}function U({onTranscript:e,onError:t,enabled:n,focusMode:r}){let[i,a]=(0,W.useState)(`idle`),s=(0,W.useRef)(`idle`),c=(0,W.useRef)(null),l=(0,W.useRef)(``),d=(0,W.useRef)(e),p=(0,W.useRef)(t),m=(0,W.useRef)(null),g=(0,W.useRef)(null),v=(0,W.useRef)(!1),y=(0,W.useRef)(null),b=(0,W.useRef)(!1),S=(0,W.useRef)(null),C=(0,W.useRef)(!1),w=(0,W.useRef)(0),E=(0,W.useRef)(0),D=(0,W.useRef)(!1),O=(0,W.useRef)([]),k=(0,W.useRef)(!1),A=(0,W.useRef)(0),M=(0,W.useRef)(0),N=(0,W.useRef)(!1),P=(0,W.useRef)(!1),F=(0,W.useRef)([]),I=o(),L=ne();d.current=e,p.current=t;function R(e){s.current=e,a(e),L(t=>t.voiceState===e?t:{...t,voiceState:e})}let z=(0,W.useCallback)(()=>{E.current++,m.current&&(clearTimeout(m.current),m.current=null),g.current&&(clearTimeout(g.current),g.current=null),y.current&&(clearTimeout(y.current),y.current=null),S.current&&(clearTimeout(S.current),S.current=null),C.current=!1,J?.stopRecording(),c.current&&(c.current.close(),c.current=null),l.current=``,F.current=[],O.current=[],L(e=>e.voiceInterimTranscript===``&&!e.voiceAudioLevels.length?e:{...e,voiceInterimTranscript:``,voiceAudioLevels:[]})},[L]);function U(){h(`[voice] finishRecording: stopping recording, transitioning to processing`),A.current++;let e=b.current;b.current=!1,R(`processing`),J?.stopRecording();let t=Date.now()-w.current,n=N.current,r=D.current,i=M.current,a=P.current,o=E.current,s=()=>E.current!==o;h(`[voice] Recording stopped`),(c.current?c.current.finalize():Promise.resolve(void 0)).then(async o=>{if(s())return;if(o===`no_data_timeout`&&n&&a&&!e&&i===0&&l.current.trim()===``&&!k.current&&O.current.length>0){k.current=!0,h(`[voice] Silent-drop detected (no_data_timeout, ${String(O.current.length)} chunks); replaying on fresh connection`),_(`tengu_voice_silent_drop_replay`,{recordingDurationMs:t,chunkCount:O.current.length}),c.current&&(c.current.close(),c.current=null);let e=O.current;if(await te(250),s())return;let n=V(u().language),r=await j();if(s()||(await new Promise(t=>{T({onTranscript:(e,t)=>{s()||t&&e.trim()&&(l.current&&(l.current+=` `),l.current+=e.trim())},onError:()=>t(),onClose:()=>{},onReady:n=>{if(s()){n.close(),t();return}c.current=n;let r=[],i=0;for(let t of e)i>0&&i+t.length>32e3&&(n.send(Buffer.concat(r)),r=[],i=0),r.push(t),i+=t.length;r.length&&n.send(Buffer.concat(r)),n.finalize().then(()=>{n.close(),t()})}},{language:n.code,keyterms:r}).then(e=>{e||t()},()=>t())}),s()))return}O.current=[];let f=l.current.trim();h(`[voice] Final transcript assembled (${String(f.length)} chars): "${f.slice(0,200)}"`),_(`tengu_voice_recording_completed`,{transcriptChars:f.length+i,recordingDurationMs:t,hadAudioSignal:n,retried:r,silentDropRetried:k.current,wsConnected:a,focusTriggered:e}),c.current&&(c.current.close(),c.current=null),f?(h(`[voice] Injecting transcript (${String(f.length)} chars)`),d.current(f)):i===0&&t>2e3&&(a?n?p.current?.(`No speech detected.`):p.current?.(`No audio detected from microphone. Check that the correct input device is selected and that Claude Code has microphone access.`):p.current?.(`Voice connection failed. Check your network and try again.`)),l.current=``,L(e=>e.voiceInterimTranscript===``?e:{...e,voiceInterimTranscript:``}),R(`idle`)}).catch(e=>{x(f(e)),s()||R(`idle`)})}(0,W.useEffect)(()=>{n&&!J&&import(`./voice-QHyDff3f.js`).then(e=>{J=e})},[n]);function G(){S.current&&clearTimeout(S.current),S.current=setTimeout((e,t,n,r,i)=>{e.current=null,t.current===`recording`&&n.current&&(h(`[voice] Focus silence timeout — tearing down session`),r.current=!0,i())},Q,S,s,b,C,U)}(0,W.useEffect)(()=>{if(!n||!r||B()){b.current&&s.current===`recording`&&(h(`[voice] Focus mode disabled during recording, finishing`),U());return}let e=!1;if(I&&s.current===`idle`&&!C.current){let t=()=>{e||s.current!==`idle`||C.current||(h(`[voice] Focus gained, starting recording session`),b.current=!0,K(),G())};J?t():import(`./voice-QHyDff3f.js`).then(e=>{J=e,t()})}else I||(C.current=!1,s.current===`recording`&&(h(`[voice] Focus lost, finishing recording`),U()));return()=>{e=!0}},[n,r,I]);async function K(){if(!J){p.current?.(`Voice module not loaded yet. Try again in a moment.`);return}R(`recording`),w.current=Date.now(),l.current=``,v.current=!1,N.current=!1,D.current=!1,k.current=!1,O.current=[],M.current=0,P.current=!1;let e=++E.current,t=await J.checkRecordingAvailability();if(!t.available){h(`[voice] Recording not available: ${t.reason??`unknown`}`),p.current?.(t.reason??`Audio recording is not available.`),z(),R(`idle`);return}h(`[voice] Starting recording session, connecting voice stream`),L(e=>e.voiceError?{...e,voiceError:null}:e);let n=[];if(h(`[voice] startRecording: buffering audio while WebSocket connects`),F.current=[],!await J.startRecording(e=>{let t=Buffer.from(e);b.current||O.current.push(t),c.current?c.current.send(t):n.push(t);let r=H(e);!N.current&&r>.01&&(N.current=!0);let i=F.current;i.length>=$&&i.shift(),i.push(r);let a=[...i];F.current=a,L(e=>({...e,voiceAudioLevels:a}))},()=>{s.current===`recording`&&U()},{silenceDetection:!1})){x(Error(`[voice] Recording failed — no audio tool found`)),p.current?.(`Failed to start audio capture. Check that your microphone is accessible.`),z(),R(`idle`),L(e=>({...e,voiceError:`Recording failed — no audio tool found`}));return}let r=u().language,i=V(r);_(`tengu_voice_recording_started`,{focusTriggered:b.current,sttLanguage:i.code,sttLanguageIsDefault:!r?.trim(),sttLanguageFellBack:i.fellBackFrom!==void 0,systemLocaleLanguage:ee()});let a=!1,o=()=>E.current!==e,f=e=>{let t=A.current;(B()?(e,t)=>ae(e,t):(e,t)=>T(e,t))({onTranscript:(e,t)=>{if(!o()){if(a=!0,h(`[voice] onTranscript: isFinal=${String(t)} text="${e}"`),t&&e.trim())b.current?(h(`[voice] Focus mode: flushing final transcript immediately: "${e.trim()}"`),d.current(e.trim()),M.current+=e.trim().length,L(e=>e.voiceInterimTranscript===``?e:{...e,voiceInterimTranscript:``}),l.current=``,G()):(l.current&&(l.current+=` `),l.current+=e.trim(),h(`[voice] Accumulated final transcript: "${l.current}"`),L(e=>{let t=l.current;return e.voiceInterimTranscript===t?e:{...e,voiceInterimTranscript:t}}));else if(!t){b.current&&G();let t=e.trim(),n=l.current?l.current+(t?` `+t:``):t;L(e=>e.voiceInterimTranscript===n?e:{...e,voiceInterimTranscript:n})}}},onError:(r,i)=>{if(o()){h(`[voice] ignoring onError from stale session: ${r}`);return}if(A.current!==t){h(`[voice] ignoring stale onError from superseded attempt: ${r}`);return}if(!i?.fatal&&!a&&s.current===`recording`&&!D.current){D.current=!0,h(`[voice] early voice_stream error (pre-transcript), retrying once: ${r}`),_(`tengu_voice_stream_early_retry`,{}),c.current=null,A.current++,setTimeout((e,t,n)=>{e.current===`recording`&&t(n)},250,s,f,e);return}A.current++,x(Error(`[voice] voice_stream error: ${r}`)),p.current?.(`Voice stream error: ${r}`),n.length=0,b.current=!1,z(),R(`idle`)},onClose:()=>{},onReady:e=>{if(o()||s.current!==`recording`){e.close();return}if(c.current=e,P.current=!0,n.length>0){let t=0;for(let e of n)t+=e.length;let r=[[]],i=0;for(let e of n)i>0&&i+e.length>32e3&&(r.push([]),i=0),r[r.length-1].push(e),i+=e.length;h(`[voice] onReady: flushing ${String(n.length)} buffered chunks (${String(t)} bytes) as ${String(r.length)} coalesced frame(s)`);for(let t of r)e.send(Buffer.concat(t))}n.length=0,g.current&&clearTimeout(g.current),v.current&&(g.current=setTimeout((e,t,n)=>{e.current=null,t.current===`recording`&&n()},Y,g,s,U))}},{language:i.code,keyterms:e}).then(e=>{if(o()){e?.close();return}if(!e){h(`[voice] Failed to connect to voice_stream (no OAuth token?)`),p.current?.(`Voice mode requires a Claude.ai account. Please run /login to sign in.`),n.length=0,z(),R(`idle`);return}if(s.current!==`recording`){n.length=0,e.close();return}})};B()?f([]):j().then(f)}let q=(0,W.useCallback)((e=X)=>{let t=B()?ie():re();if(!n||!t||b.current)return;if(r&&C.current){h(`[voice] Re-arming focus recording after silence timeout`),C.current=!1,b.current=!0,K(),G();return}let i=s.current;i!==`processing`&&(i===`idle`?(h(`[voice] handleKeyEvent: idle, starting recording session immediately`),K(),y.current=setTimeout((e,t,n,r,i)=>{e.current=null,t.current===`recording`&&!n.current&&(h(`[voice] No auto-repeat seen, arming release timer via fallback`),n.current=!0,r.current=setTimeout((e,t,n)=>{e.current=null,t.current===`recording`&&n()},Y,r,t,i))},e,y,s,v,g,U)):i===`recording`&&(v.current=!0,y.current&&(clearTimeout(y.current),y.current=null)),g.current&&clearTimeout(g.current),s.current===`recording`&&v.current&&(g.current=setTimeout((e,t,n)=>{e.current=null,t.current===`recording`&&n()},Y,g,s,U)))},[n,r,z]);return(0,W.useEffect)(()=>(!n&&s.current!==`idle`&&(z(),R(`idle`)),()=>{z()}),[n,z]),{state:i,handleKeyEvent:q}}var W,G,K,q,J,Y,X,Z,Q,$,oe=e((()=>{W=t(a(),1),w(),s(),g(),P(),E(),R(),m(),p(),S(),b(),d(),C(),G=`en`,K={english:`en`,spanish:`es`,español:`es`,espanol:`es`,french:`fr`,français:`fr`,francais:`fr`,japanese:`ja`,日本語:`ja`,german:`de`,deutsch:`de`,portuguese:`pt`,português:`pt`,portugues:`pt`,italian:`it`,italiano:`it`,korean:`ko`,한국어:`ko`,hindi:`hi`,हिन्दी:`hi`,हिंदी:`hi`,indonesian:`id`,"bahasa indonesia":`id`,bahasa:`id`,russian:`ru`,русский:`ru`,polish:`pl`,polski:`pl`,turkish:`tr`,türkçe:`tr`,turkce:`tr`,dutch:`nl`,nederlands:`nl`,ukrainian:`uk`,українська:`uk`,greek:`el`,ελληνικά:`el`,czech:`cs`,čeština:`cs`,cestina:`cs`,danish:`da`,dansk:`da`,swedish:`sv`,svenska:`sv`,norwegian:`no`,norsk:`no`},q=new Set([`en`,`es`,`fr`,`ja`,`de`,`pt`,`it`,`ko`,`hi`,`id`,`ru`,`pl`,`tr`,`nl`,`uk`,`el`,`cs`,`da`,`sv`,`no`]),J=null,Y=200,X=600,Z=2e3,Q=5e3,$=16}));export{V as n,z as r,oe as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{cn as o,on as s}from"./paths-DfGsIjPm.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{Iy as u,Ly as d,cC as f,lC as p}from"./loadAgentsDir-Br5fGLLI.js";import{t as m}from"./WelcomeV2-BJAKZYz1.js";import{t as h}from"./useManagePlugins-BvoeOnqq.js";import{n as g,t as _}from"./MCPConnectionManager-DmJ6dLOp.js";import{n as v}from"./onChangeAppState-C9EvI3EH.js";import{cwd as y}from"process";var b=e(t(),1);r(),d(),c(),g(),p(),s();var x=a();async function S(e){l(`tengu_setup_token_command`,{});let t=!o(),{ConsoleOAuthFlow:r}=await import(`./ConsoleOAuthFlow-Cc1yaM-M.js`);await new Promise(a=>{e.render((0,x.jsx)(f,{onChangeAppState:v,children:(0,x.jsx)(u,{children:(0,x.jsxs)(i,{flexDirection:`column`,gap:1,children:[(0,x.jsx)(m,{}),t&&(0,x.jsxs)(i,{flexDirection:`column`,children:[(0,x.jsx)(n,{color:`warning`,children:`Warning: You already have authentication configured via environment variable or API key helper.`}),(0,x.jsx)(n,{color:`warning`,children:`The setup-token command will create a new OAuth token which you can use instead.`})]}),(0,x.jsx)(r,{onDone:()=>{a()},mode:`setup-token`,startingMessage:`This will guide you through long-lived (1-year) auth token setup for your Claude account. Claude subscription required.`})]})})}))}),e.unmount(),process.exit(0)}var C=b.lazy(()=>import(`./Doctor-BWouB_9X.js`).then(e=>({default:e.Doctor})));function w({onDone:e}){return h(),(0,x.jsx)(b.Suspense,{fallback:null,children:(0,x.jsx)(C,{onDone:e})})}async function T(e){l(`tengu_doctor_command`,{}),await new Promise(t=>{e.render((0,x.jsx)(f,{children:(0,x.jsx)(u,{children:(0,x.jsx)(_,{dynamicMcpConfig:void 0,isStrictMcpConfig:!1,children:(0,x.jsx)(w,{onDone:()=>{t()}})})})}))}),e.unmount(),process.exit(0)}async function E(e,t){let{setup:n}=await import(`./setup-DjsmjRKQ.js`);await n(y(),`default`,!1,!1,void 0,!1);let{install:r}=await import(`./install-DRsM0bJO.js`);await new Promise(n=>{let i=[];e&&i.push(e),t.force&&i.push(`--force`),r.call(e=>{n(),process.exit(+!!e.includes(`failed`))},{},i)})}export{T as doctorHandler,E as installHandler,S as setupTokenHandler};
@@ -0,0 +1 @@
1
+ import{Fp as e,Mp as t}from"./loadAgentsDir-Br5fGLLI.js";e();export{t as clearWebFetchCache};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Tt as r}from"./schemas-BGAvj1T4.js";import{t as i}from"./v4-f1i_CNUT.js";import{bs as a,gs as o,vs as s,xs as c,ys as l}from"./paths-DfGsIjPm.js";import{B as u,D as d,E as f,G as p,O as ee,U as m,_ as h,h as g,l as _,p as v,z as y}from"./debug-otxXY3j-.js";import{o as te,s as b}from"./log-DS97_rIr.js";import{AA as x,ej as S,gj as C,hj as w,jA as T,nj as E,tj as ne,vj as re,yj as ie}from"./loadAgentsDir-Br5fGLLI.js";import{homedir as ae}from"os";import*as D from"path";import{join as oe,resolve as se}from"path";import{randomBytes as O}from"crypto";import{readFile as k,readdir as A,rename as j,stat as M,unlink as N,writeFile as P}from"fs/promises";function F(){return oe(x(),H)}async function I(){let e=F();try{let t=d(await k(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return v(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==V)return v(`Install counts cache version mismatch (got ${n.version}, expected ${V})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return v(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(v(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>W?(v(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(v(`Install counts cache has malformed entries`),null)}catch(e){return u(e)!==`ENOENT`&&v(`Failed to load install counts cache: ${y(e)}`),null}}async function L(e){let t=F(),n=`${t}.${O(8).toString(`hex`)}.tmp`;try{let r=x();await g().mkdir(r),await P(n,ee(e,null,2),{encoding:`utf-8`,mode:384}),await j(n,t),v(`Install counts cache saved successfully`)}catch(e){b(e);try{await N(n)}catch{}}}async function R(){v(`Fetching install counts from ${U}`);let e=performance.now();try{let n=await t.get(U,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return E(`install_counts`,U,`success`,performance.now()-e),n.data.plugins}catch(t){throw E(`install_counts`,U,`failure`,performance.now()-e,S(t)),t}}async function z(){let e=await I();if(e){v(`Using cached install counts`),E(`install_counts`,U,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await R();await L({version:V,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return b(e),v(`Failed to fetch install counts: ${y(e)}`),null}}function B(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var V,H,U,W,G=e((()=>{n(),_(),m(),h(),te(),f(),ne(),T(),V=1,H=`install-counts-cache.json`,U=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,W=1440*60*1e3}));async function K(e){let t=e.trim(),n=g(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=se(t.startsWith(`~`)?t.replace(/^~/,ae()):t),r;try{r=await n.stat(e)}catch(t){let n=u(t);return{error:n===`ENOENT`?`Path does not exist: ${e}`:`Cannot access path: ${e} (${n??t})`}}return r.isFile()?e.endsWith(`.json`)?{source:`file`,path:e}:{error:`File path must point to a .json file (marketplace.json), but got: ${e}`}:r.isDirectory()?{source:`directory`,path:e}:{error:`Path is neither a file nor a directory: ${e}`}}if(t.includes(`/`)&&!t.startsWith(`@`)){if(t.includes(`:`))return null;let e=t.match(/^([^#@]+)(?:[#@](.+))?$/),n=e?.[1]||t,r=e?.[2];return r?{source:`github`,repo:n,ref:r}:{source:`github`,repo:n}}return null}var ce=e((()=>{m(),h()}));function le(e){let t=D.basename(e),n=D.basename(D.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=D.resolve(e),i;try{i=await k(r,{encoding:`utf-8`})}catch(e){let t=u(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=d(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:r,fileType:`plugin`}}if(a&&typeof a==`object`){let e=a;e.commands&&(Array.isArray(e.commands)?e.commands:[e.commands]).forEach((e,n)=>{typeof e==`string`&&J(e,`commands[${n}]`,t)}),e.agents&&(Array.isArray(e.agents)?e.agents:[e.agents]).forEach((e,n)=>{typeof e==`string`&&J(e,`agents[${n}]`,t)}),e.skills&&(Array.isArray(e.skills)?e.skills:[e.skills]).forEach((e,n)=>{typeof e==`string`&&J(e,`skills[${n}]`,t)})}let o=a;if(typeof a==`object`&&a){let e=a,t=Object.keys(e).filter(e=>$.has(e));if(t.length>0){let r={...e};for(let e of t)delete r[e],n.push({path:e,message:`Field '${e}' belongs in the marketplace entry (marketplace.json), not plugin.json. It's harmless here but unused — Claude Code ignores it at load time.`});o=r}}let c=s().strict().safeParse(o);if(c.success||t.push(...q(c.error)),c.success){let e=c.data;/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e.name)||n.push({path:`name`,message:`Plugin name "${e.name}" is not kebab-case. Claude Code accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`}),e.version||n.push({path:`version`,message:`No version specified. Consider adding a version following semver (e.g., "1.0.0")`}),e.description||n.push({path:`description`,message:`No description provided. Adding a description helps users understand what your plugin does`}),e.author||n.push({path:`author`,message:`No author information provided. Consider adding author details for plugin attribution`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`plugin`}}async function X(e){let t=[],n=[],i=D.resolve(e),o;try{o=await k(i,{encoding:`utf-8`})}catch(e){let t=u(e),n;return n=t===`ENOENT`?`File not found: ${i}`:t===`EISDIR`?`Path is not a file: ${i}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:i,fileType:`marketplace`}}let s;try{s=d(o)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:i,fileType:`marketplace`}}if(s&&typeof s==`object`){let e=s;Array.isArray(e.plugins)&&e.plugins.forEach((e,n)=>{if(e&&typeof e==`object`&&`source`in e){let r=e.source;typeof r==`string`&&J(r,`plugins[${n}].source`,t,ue(r)),r&&typeof r==`object`&&`path`in r&&typeof r.path==`string`&&J(r.path,`plugins[${n}].source.path`,t)}})}let c=a().extend({plugins:r(l().strict())}).strict().safeParse(s);if(c.success||t.push(...q(c.error)),c.success){let e=c.data;if((!e.plugins||e.plugins.length===0)&&n.push({path:`plugins`,message:`Marketplace has no plugins defined`}),e.plugins){e.plugins.forEach((n,r)=>{e.plugins.filter(e=>e.name===n.name).length>1&&t.push({path:`plugins[${r}].name`,message:`Duplicate plugin name "${n.name}" found in marketplace`})});let r=D.dirname(i),a=D.basename(r)===`.claude-plugin`?D.dirname(r):r;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=D.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=d(await k(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:i,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],a=t.match(w);if(!a)return i.push({path:`frontmatter`,message:`No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata.`}),{success:!0,errors:r,warnings:i,filePath:e,fileType:n};let o=a[1]||``,s;try{s=ie(o)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${y(t)}. At runtime this ${n} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n}}if(typeof s!=`object`||!s||Array.isArray(s))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(s)?`an array`:s===null?`null`:typeof s}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let c=s;if(c.description!==void 0){let e=c.description;typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`&&e!==null&&r.push({path:`description`,message:`description must be a string, got ${Array.isArray(e)?`array`:typeof e}. At runtime this value is dropped.`})}else i.push({path:`description`,message:`No description in frontmatter. A description helps users and Claude understand when to use this ${n}.`});c.name!==void 0&&c.name!==null&&typeof c.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof c.name}.`});let l=c[`allowed-tools`];l!=null&&(typeof l!=`string`&&!Array.isArray(l)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof l}.`}):Array.isArray(l)&&l.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let u=c.shell;if(u!=null)if(typeof u!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof u}.`});else{let e=u.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${u}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await k(e,{encoding:`utf-8`})}catch(t){return u(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${y(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=d(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=o().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await A(e,{withFileTypes:!0})}catch(e){let t=u(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>D.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=D.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,D.join(e,`skills`)],[`agent`,D.join(e,`agents`)],[`command`,D.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await k(r,{encoding:`utf-8`})}catch(n){if(p(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${y(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(D.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=D.resolve(e),n=null;try{n=await M(t)}catch(e){if(!p(e))throw e}if(n?.isDirectory()){let e=await X(D.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(D.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=d(await k(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(u(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{i(),m(),C(),f(),re(),c(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{K as a,G as c,ce as i,pe as n,B as o,fe as r,z as s,me as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Pc as n,Sc as r}from"./paths-DfGsIjPm.js";import{n as i,r as a}from"./analytics-DqMQntaB.js";var o;e((()=>{i(),t(),o=async()=>{let e=r().editorMode||`normal`;e===`emacs`&&(e=`normal`);let t=e===`normal`?`vim`:`normal`;return n(e=>({...e,editorMode:t})),a(`tengu_editor_mode_changed`,{mode:t,source:`command`}),{type:`text`,value:`Editor mode set to ${t}. ${t===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{o as call};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Ka as n,Pc as r,Sc as i,lo as a,oo as o}from"./paths-DfGsIjPm.js";import{n as s,r as c}from"./analytics-DqMQntaB.js";import{JA as l,MT as u,WA as d,jT as f}from"./loadAgentsDir-Br5fGLLI.js";import{n as p,r as m}from"./voiceModeEnabled-Bq_rttkL.js";import{n as h,t as g}from"./useVoice-BQ9aSFJe.js";var _,v;e((()=>{g(),u(),s(),t(),d(),o(),p(),_=2,v=async e=>{if(!m())return{type:`text`,value:`Voice mode is not available.`};let t=n(),o=t.voiceEnabled===!0,s=e?.trim().toLowerCase();if(o&&s===`doubao`)return a(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(l.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${f(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o&&s===`anthropic`)return a(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(l.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${f(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o)return a(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(l.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let u=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:d}=await import(`./voiceStreamSTT-BDKenO5F.js`),{checkRecordingAvailability:p}=await import(`./voice-QHyDff3f.js`),g=await p();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(u!==`doubao`&&!d())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-QHyDff3f.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
2
+ Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(a(`userSettings`,{voiceEnabled:!0,...u===`doubao`?{voiceProvider:`doubao`}:{}}).error)return{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`};l.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!0});let x=f(`voice:pushToTalk`,`Chat`,`Space`),S=``,C=u===`doubao`?`Doubao ASR`:`Anthropic`;if(u!==`doubao`){let e=h(t.language),n=i(),a=n.voiceLangHintLastLanguage!==e.code,o=a?0:n.voiceLangHintShownCount??0,s=!e.fellBackFrom&&o<_;e.fellBackFrom?S=` Note: "${e.fellBackFrom}" is not a supported dictation language; using English. Change it via /config.`:s&&(S=` Dictation language: ${e.code} (/config to change).`),(a||s)&&r(t=>({...t,voiceLangHintShownCount:o+ +!!s,voiceLangHintLastLanguage:e.code}))}return{type:`text`,value:`Voice mode enabled (${C}). Hold ${x} to record.${S}`}}}))();export{v as call};
@@ -0,0 +1,8 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{f as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{l as i,p as a}from"./debug-otxXY3j-.js";import{o,s}from"./log-DS97_rIr.js";import{i as c,o as l}from"./platform-DYZVoA9J.js";import{readFile as u}from"fs/promises";import{spawn as d,spawnSync as f}from"child_process";function p(){return O??(O=(async()=>{let e=Date.now(),t=await import(`./src-DzH9IdOo.js`);return t.isNativeAudioAvailable(),D=t,a(`[voice] audio-capture-napi loaded in ${Date.now()-e}ms`),t})()),O}function m(e){return f(e,[`--version`],{stdio:`ignore`,timeout:3e3}).error===void 0}function h(){return N??(N=new Promise(e=>{let t=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(k),`-c`,String(A),`-t`,`raw`,`/dev/null`],{stdio:[`ignore`,`ignore`,`pipe`]}),n=``;t.stderr?.on(`data`,e=>{n+=e.toString()});let r=setTimeout((e,t)=>{e.kill(`SIGTERM`),t({ok:!0,stderr:``})},150,t,e);t.once(`close`,t=>{clearTimeout(r),e({ok:t===0,stderr:n.trim()})}),t.once(`error`,()=>{clearTimeout(r),e({ok:!1,stderr:`arecord: command not found`})})})),N}function g(){N=null}function _(){return P??(P=u(`/proc/asound/cards`,`utf8`).then(e=>{let t=e.trim();return t!==``&&!t.includes(`no soundcards`)},()=>!1)),P}function v(){P=null}function y(){if(process.platform===`darwin`)return m(`brew`)?{cmd:`brew`,args:[`install`,`sox`],displayCommand:`brew install sox`}:null;if(process.platform===`linux`){if(m(`apt-get`))return{cmd:`sudo`,args:[`apt-get`,`install`,`-y`,`sox`],displayCommand:`sudo apt-get install sox`};if(m(`dnf`))return{cmd:`sudo`,args:[`dnf`,`install`,`-y`,`sox`],displayCommand:`sudo dnf install sox`};if(m(`pacman`))return{cmd:`sudo`,args:[`pacman`,`-S`,`--noconfirm`,`sox`],displayCommand:`sudo pacman -S sox`}}return null}async function b(){if((await p()).isNativeAudioAvailable())return{available:!0,missing:[],installCommand:null};if(process.platform===`win32`)return{available:!1,missing:[`Voice mode requires the native audio module (not loaded)`],installCommand:null};if(process.platform===`linux`&&m(`arecord`))return{available:!0,missing:[],installCommand:null};let e=[];m(`rec`)||e.push(`sox (rec command)`);let t=e.length>0?y():null;return{available:e.length===0,missing:e,installCommand:t?.displayCommand??null}}async function x(){return(await p()).isNativeAudioAvailable()?await C(e=>{},()=>{},{silenceDetection:!1})?(E(),!0):!1:!0}async function S(){if(t()||r(process.env.CLAUDE_CODE_REMOTE))return{available:!1,reason:`Voice mode requires microphone access, but no audio device is available in this environment.
2
+
3
+ To use voice mode, run Claude Code locally instead.`};if((await p()).isNativeAudioAvailable())return{available:!0,reason:null};if(process.platform===`win32`)return{available:!1,reason:`Voice recording requires the native audio module, which could not be loaded.`};let e=`Voice mode could not access an audio device in WSL.
4
+
5
+ WSL2 with WSLg (Windows 11) provides audio via PulseAudio — if you are on Windows 10 or WSL1, run Claude Code in native Windows instead.`;if(process.platform===`linux`&&m(`arecord`)){let t=await h();if(t.ok)return{available:!0,reason:null};if(c()===`wsl`)return{available:!1,reason:e};a(`[voice] arecord probe failed: ${t.stderr}`)}if(!m(`rec`)){if(c()===`wsl`)return{available:!1,reason:e};let t=y();return{available:!1,reason:t?`Voice mode requires SoX for audio recording. Install it with: ${t.displayCommand}`:`Voice mode requires SoX for audio recording. Install SoX manually:
6
+ macOS: brew install sox
7
+ Ubuntu/Debian: sudo apt-get install sox
8
+ Fedora: sudo dnf install sox`}}return{available:!0,reason:null}}async function C(e,t,n){a(`[voice] startRecording called, platform=${process.platform}`);let r=await p(),i=r.isNativeAudioAvailable()&&(process.platform!==`linux`||await _()),o=n?.silenceDetection!==!1;return i&&((I||r.isNativeRecordingActive())&&(r.stopNativeRecording(),I=!1),r.startNativeRecording(t=>{e(t)},()=>{o&&(I=!1,t())}))?(I=!0,!0):process.platform===`win32`?(a(`[voice] Windows native recording unavailable, no fallback`),!1):process.platform===`linux`&&m(`arecord`)&&(await h()).ok?T(e,t):w(e,t,n)}function w(e,t,n){let r=n?.silenceDetection!==!1,i=[`-q`,`--buffer`,`1024`,`-t`,`raw`,`-r`,String(k),`-e`,`signed`,`-b`,`16`,`-c`,String(A),`-`];r&&i.push(`silence`,`1`,`0.1`,M,`1`,j,M);let a=d(`rec`,i,{stdio:[`pipe`,`pipe`,`pipe`]});return F=a,a.stdout?.on(`data`,t=>{e(t)}),a.stderr?.on(`data`,()=>{}),a.on(`close`,()=>{F=null,t()}),a.on(`error`,e=>{s(e),F=null,t()}),!0}function T(e,t){let n=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(k),`-c`,String(A),`-t`,`raw`,`-q`,`-`],{stdio:[`pipe`,`pipe`,`pipe`]});return F=n,n.stdout?.on(`data`,t=>{e(t)}),n.stderr?.on(`data`,()=>{}),n.on(`close`,()=>{F=null,t()}),n.on(`error`,e=>{s(e),F=null,t()}),!0}function E(){if(I&&D){D.stopNativeRecording(),I=!1;return}F&&(F.kill(`SIGTERM`),F=null)}var D,O,k,A,j,M,N,P,F,I;e((()=>{i(),n(),o(),l(),D=null,O=null,k=16e3,A=1,j=`2.0`,M=`3%`,N=null,P=null,F=null,I=!1}))();export{v as _resetAlsaCardsForTesting,g as _resetArecordProbeForTesting,S as checkRecordingAvailability,b as checkVoiceDependencies,x as requestMicrophonePermission,C as startRecording,E as stopRecording};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-DfGsIjPm.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return i()?!!t()?.accessToken:!1}function c(){return s()&&o()}function l(){return o()}var u=e((()=>{n(),a()}));export{c as a,o as i,u as n,l as r,s as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,n}from"./voiceModeEnabled-Bq_rttkL.js";n();export{t as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./voiceStreamSTT-CL52x8wZ.js";t();export{e as isVoiceStreamAvailable};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-DfGsIjPm.js";import{D as d,E as f,O as p,l as m,p as h}from"./debug-otxXY3j-.js";import{l as g,u as _}from"./oauth-CdZEzMww.js";import{o as v,s as y}from"./log-DS97_rIr.js";import{c as b,g as x,h as S,l as C,u as w}from"./proxy-nPT6a6QY.js";function T(){if(!c())return!1;let e=r();return e!==null&&e.accessToken!==null}async function E(e,t){await i();let a=r();if(!a?.accessToken)return h(`[voice_stream] No OAuth token available`),null;let c=process.env.VOICE_STREAM_BASE_URL||g().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&h(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=s(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),h(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let f=`${c}${k}?${l.toString()}`;h(`[voice_stream] Connecting to ${f}`);let m={Authorization:`Bearer ${a.accessToken}`,"User-Agent":o(),"x-app":`cli`},_=S(),v=new n(f,typeof Bun<`u`?{headers:m,proxy:C(f),tls:_||void 0}:{headers:m,agent:b(f),..._}),x=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(v.readyState===n.OPEN){if(T){h(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}h(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),v.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){h(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}h(`[voice_stream] Finalize resolved via ${n}`),t(n)},v.readyState===n.CLOSED||v.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,v.readyState===n.OPEN&&(h(`[voice_stream] Sending CloseStream (finalize)`),v.send(O))},0)}))},close(){T=!0,x&&(clearInterval(x),x=null),w=!1,v.readyState===n.OPEN&&v.close()},isConnected(){return w&&v.readyState===n.OPEN}};v.on(`open`,()=>{h(`[voice_stream] WebSocket connected`),w=!0,h(`[voice_stream] Sending initial KeepAlive`),v.send(D),x=setInterval(e=>{e.readyState===n.OPEN&&(h(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,v),e.onReady(F)});let I=``;return v.on(`message`,t=>{let n=t.toString();h(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=d(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(h(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(h(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{h(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;h(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??p(r);h(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),v.on(`close`,(t,n)=>{let r=n?.toString()??``;if(h(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,x&&(clearInterval(x),x=null),I){h(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),v.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){h(`[voice_stream] unexpected-response fired with 101; ignoring`);return}h(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),v.on(`error`,t=>{y(t),h(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),_(),l(),m(),u(),v(),x(),w(),f(),a(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{r as t,t as n}from"./execa-CGue6Z3n.js";import{n as r,t as i}from"./execSyncWrapper-Bn7EJqtD.js";async function a(e){if(process.platform===`win32`){let t=await n(`where.exe ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim().split(/\r?\n/)[0]||null}let t=await n(`which ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim()}function o(e){if(process.platform===`win32`)try{return i(`where.exe ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return i(`which ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim()||null}catch{return null}}var s,c,l,u=e((()=>{t(),r(),s=typeof Bun<`u`&&typeof Bun.which==`function`?Bun.which:null,c=s?async e=>s(e):a,l=s??o}));export{c as n,l as r,u as t};
@@ -0,0 +1 @@
1
+ import{i as e,n as t}from"./windowsPaths-DerzGPcz.js";t();export{e as setShellIfWindows};