claude-code-best 2.6.12 → 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-LhW1QZFL.js +0 -1
  396. package/dist/chunks/App-DYMNbl0d.js +0 -1
  397. package/dist/chunks/ApproveApiKey-B1XCQNW6.js +0 -1
  398. package/dist/chunks/ApproveApiKey-Bi2Iq_gN.js +0 -1
  399. package/dist/chunks/AssistantSessionChooser-Dv6yYR3s.js +0 -1
  400. package/dist/chunks/BackgroundTasksDialog-qS15If6H.js +0 -2
  401. package/dist/chunks/BypassPermissionsModeDialog-Bhjd2F2o.js +0 -1
  402. package/dist/chunks/ClaudeInChromeOnboarding-CxBS5xZY.js +0 -1
  403. package/dist/chunks/ClaudeMdExternalIncludesDialog-CiANFiNV.js +0 -1
  404. package/dist/chunks/ClaudeMdExternalIncludesDialog-nuKXhM2t.js +0 -1
  405. package/dist/chunks/ConsoleOAuthFlow-C8FzG3uF.js +0 -1
  406. package/dist/chunks/DesktopHandoff-BSpzQF0U.js +0 -1
  407. package/dist/chunks/DevChannelsDialog-B2xqlZtS.js +0 -1
  408. package/dist/chunks/DiffDialog-XmOsaUeN.js +0 -3
  409. package/dist/chunks/Doctor-C6FXh99k.js +0 -1
  410. package/dist/chunks/Doctor-DLx7Z_sA.js +0 -3
  411. package/dist/chunks/ExitFlow-CHDj7fv7.js +0 -2
  412. package/dist/chunks/Feedback-CUjTJbIh.js +0 -2
  413. package/dist/chunks/Grove-B8ZQOflC.js +0 -1
  414. package/dist/chunks/Grove-fenDMHVw.js +0 -11
  415. package/dist/chunks/HybridTransport-CP63usH9.js +0 -4
  416. package/dist/chunks/ITermBackend-Bp_3qpix.js +0 -1
  417. package/dist/chunks/InvalidConfigDialog-CgD7HSg0.js +0 -1
  418. package/dist/chunks/InvalidSettingsDialog-pYMa5Fp4.js +0 -1
  419. package/dist/chunks/MCPConnectionManager-ip1xShU_.js +0 -1
  420. package/dist/chunks/McpParsingWarnings-DhobExFM.js +0 -1
  421. package/dist/chunks/MessageSelector-B2X6zrsb.js +0 -3
  422. package/dist/chunks/Messages-CmsZIA66.js +0 -11
  423. package/dist/chunks/Onboarding-BaoLhLiT.js +0 -1
  424. package/dist/chunks/OverageCreditUpsell-DnLMobAh.js +0 -1
  425. package/dist/chunks/PluginSettings-BetzicTb.js +0 -17
  426. package/dist/chunks/PromptInputFooterSuggestions-D-1hRFAD.js +0 -1
  427. package/dist/chunks/PromptInputHelpMenu-DnQj3Hpq.js +0 -1
  428. package/dist/chunks/QueryEngine-BwvqdZVN.js +0 -1
  429. package/dist/chunks/REPL-CCgaPc2g.js +0 -1
  430. package/dist/chunks/REPL-zS2s1JnV.js +0 -97
  431. package/dist/chunks/RemoteCallout-B9hClSYj.js +0 -1
  432. package/dist/chunks/RemoteSessionManager-BgLIvi8Z.js +0 -2
  433. package/dist/chunks/ResumeConversation-DAMMGHGc.js +0 -1
  434. package/dist/chunks/SSETransport-CD7R7FfS.js +0 -4
  435. package/dist/chunks/SearchExtraToolsTool-CP6G9xhL.js +0 -1
  436. package/dist/chunks/SentryErrorBoundary-6dQQW6kh.js +0 -2
  437. package/dist/chunks/SentryErrorBoundary-B2e3QmqR.js +0 -1
  438. package/dist/chunks/Settings-DgW58gbY.js +0 -2
  439. package/dist/chunks/TeleportProgress-D_USKi0I.js +0 -1
  440. package/dist/chunks/TeleportRepoMismatchDialog-C1-iWmRP.js +0 -1
  441. package/dist/chunks/TeleportResumeWrapper-BX9nUVsC.js +0 -1
  442. package/dist/chunks/ThemePicker-C0JghXSS.js +0 -1
  443. package/dist/chunks/TmuxBackend-BxPiis2l.js +0 -9
  444. package/dist/chunks/TrustDialog-BZD-KGrA.js +0 -1
  445. package/dist/chunks/ValidationErrorsList-CTFdkGiH.js +0 -2
  446. package/dist/chunks/WelcomeV2-C7F1y8zh.js +0 -1
  447. package/dist/chunks/WindowsTerminalBackend-DLxmmXo4.js +0 -2
  448. package/dist/chunks/add-dir-Dhv9aEca.js +0 -1
  449. package/dist/chunks/agentDisplay-BoBFMmGh.js +0 -1
  450. package/dist/chunks/agents-Bt9kYpgi.js +0 -2
  451. package/dist/chunks/agents-CdsfzK3E.js +0 -103
  452. package/dist/chunks/ant-Bo6XJuE9.js +0 -1
  453. package/dist/chunks/api-CRPzfBL5.js +0 -1
  454. package/dist/chunks/api-CslgFoHj.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--L1Ll62G.js +0 -1
  458. package/dist/chunks/assistant-DypEudjI.js +0 -1
  459. package/dist/chunks/assistant-od6Nf6EJ.js +0 -1
  460. package/dist/chunks/auth-BaaTtn3M.js +0 -1
  461. package/dist/chunks/auth-yKNn60lZ.js +0 -1
  462. package/dist/chunks/autoMode-C4b9u7WQ.js +0 -45
  463. package/dist/chunks/autonomy-7nZpCyNC.js +0 -19
  464. package/dist/chunks/autonomy-rMsykUYN.js +0 -1
  465. package/dist/chunks/autonomyPanel-j0q1dMDj.js +0 -1
  466. package/dist/chunks/backgroundHousekeeping-DGAYPsK9.js +0 -1
  467. package/dist/chunks/backgroundHousekeeping-KCpR7i2h.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-GL4WvvLa.js +0 -3
  472. package/dist/chunks/bridge-BVzpVEsr.js +0 -2
  473. package/dist/chunks/bridgeConfig-B1OTOi0O.js +0 -1
  474. package/dist/chunks/bridgeConfig-C110hgnb.js +0 -1
  475. package/dist/chunks/bridgeEnabled-DrW-kkAr.js +0 -1
  476. package/dist/chunks/bridgeEnabled-Zk2slA-p.js +0 -1
  477. package/dist/chunks/bridgeMain-C-MUVlCX.js +0 -68
  478. package/dist/chunks/bridgeMain-L1ScqrgM.js +0 -1
  479. package/dist/chunks/bridgeMessaging-DobCpZGY.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-CSDRs-n8.js +0 -1
  483. package/dist/chunks/buddy-D3Owb2U5.js +0 -3
  484. package/dist/chunks/bypassPermissionsKillswitch-B_5qku-e.js +0 -1
  485. package/dist/chunks/caches-CpgRh__l.js +0 -1
  486. package/dist/chunks/caches-Di_WVMtD.js +0 -3
  487. package/dist/chunks/ccrClient-CWH1f8Nk.js +0 -1
  488. package/dist/chunks/changeDetector-DEStinxa.js +0 -1
  489. package/dist/chunks/channelNotification-DxAS15nL.js +0 -1
  490. package/dist/chunks/channelNotification-Y5fNpq-B.js +0 -1
  491. package/dist/chunks/chrome-Cgl-Sq1y.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-Dja0RB_p.js +0 -1
  496. package/dist/chunks/cliLaunch-BQa48gsr.js +0 -1
  497. package/dist/chunks/client-DuWXRBa0.js +0 -1
  498. package/dist/chunks/color-tvVGbuuv.js +0 -1
  499. package/dist/chunks/commands-ElmJnxRE.js +0 -1
  500. package/dist/chunks/commitAttribution-CedoNRL0.js +0 -2
  501. package/dist/chunks/commitAttribution-D6vYpAMS.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-BwsLImWZ.js +0 -3
  506. package/dist/chunks/companion-C3hWMSgF.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-BHCIawwx.js +0 -1
  511. package/dist/chunks/config-Dh0QGc4B.js +0 -1
  512. package/dist/chunks/context-CSHiU4LG.js +0 -1
  513. package/dist/chunks/context-noninteractive-CKFY_j1P.js +0 -54
  514. package/dist/chunks/context-noninteractive-DirFwn0d.js +0 -1
  515. package/dist/chunks/conversation-DfIv8Jzc.js +0 -1
  516. package/dist/chunks/conversation-Dyb5kfil.js +0 -1
  517. package/dist/chunks/copy-BSyDpOx5.js +0 -7
  518. package/dist/chunks/createSSHSession-PfzB7zZR.js +0 -6
  519. package/dist/chunks/createSession-Bk6r39b1.js +0 -1
  520. package/dist/chunks/createSession-DdsaDZoq.js +0 -1
  521. package/dist/chunks/cronJitterConfig-BFVNIkjD.js +0 -6
  522. package/dist/chunks/crossProjectResume-CdoH1cwH.js +0 -40
  523. package/dist/chunks/daemon-CCtZ9wY3.js +0 -2
  524. package/dist/chunks/datadog-By0GhDXI.js +0 -1
  525. package/dist/chunks/datadog-CTRRIaBJ.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-BV6CI329.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-qDuBFv-P.js +0 -1
  536. package/dist/chunks/directoryCompletion-D7EGwonO.js +0 -1
  537. package/dist/chunks/doctor-BtTsew-G.js +0 -1
  538. package/dist/chunks/earlyInput-RoVleNEN.js +0 -1
  539. package/dist/chunks/effort-DSpAOBeU.js +0 -9
  540. package/dist/chunks/entry-CYCQJU7M.js +0 -14
  541. package/dist/chunks/env-chR0gV31.js +0 -1
  542. package/dist/chunks/envLessBridgeConfig-B3o52JMX.js +0 -1
  543. package/dist/chunks/envLessBridgeConfig-BKs6Mk4e.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-BgaIlRuS.js +0 -1
  550. package/dist/chunks/export-BOQCWSMm.js +0 -2
  551. package/dist/chunks/exportRenderer-B-2J3ocI.js +0 -1
  552. package/dist/chunks/extra-usage-BLVbAE1O.js +0 -1
  553. package/dist/chunks/extra-usage-S4WYpDn5.js +0 -1
  554. package/dist/chunks/extra-usage-core-Sq4JALS7.js +0 -1
  555. package/dist/chunks/extra-usage-noninteractive-BlJVTTwe.js +0 -1
  556. package/dist/chunks/extraUsage-CMJ1LEPS.js +0 -1
  557. package/dist/chunks/extractMemories-BpN0fQF-.js +0 -1
  558. package/dist/chunks/fast-B8a-zz4X.js +0 -1
  559. package/dist/chunks/fast-OzVowRYW.js +0 -1
  560. package/dist/chunks/feedback-BZet1Qu_.js +0 -1
  561. package/dist/chunks/firstPartyEventLogger-DeytNcUC.js +0 -1
  562. package/dist/chunks/flushGate-CeFJrqgK.js +0 -1
  563. package/dist/chunks/gates-Be4ovdxj.js +0 -1
  564. package/dist/chunks/gates-WmmZ-8JT.js +0 -1
  565. package/dist/chunks/gemini-DExthrur.js +0 -1
  566. package/dist/chunks/generateRecap-BIFrnTIe.js +0 -1
  567. package/dist/chunks/generateSessionName-DlC0lhSv.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-BKB2G52c.js +0 -1
  572. package/dist/chunks/grok-BNxCseLh.js +0 -1
  573. package/dist/chunks/growthbook-B3_MJJ45.js +0 -1
  574. package/dist/chunks/heapdump-sPWpCjXq.js +0 -5
  575. package/dist/chunks/help-BuUi6cM0.js +0 -1
  576. package/dist/chunks/hooks-5vDlGpNp.js +0 -79
  577. package/dist/chunks/hooks-CVJA4uQu.js +0 -1
  578. package/dist/chunks/hostAdapter-BfBHV5nj.js +0 -1
  579. package/dist/chunks/hostGuard-zim_4F9V.js +0 -1
  580. package/dist/chunks/ide-DvUftvRn.js +0 -2
  581. package/dist/chunks/inboundAttachments-CQyeysIk.js +0 -1
  582. package/dist/chunks/inboundAttachments-CiF42Eku.js +0 -1
  583. package/dist/chunks/initReplBridge-Bzg5Gx97.js +0 -1
  584. package/dist/chunks/insights-CvwFcRQt.js +0 -822
  585. package/dist/chunks/install-github-app-DxxG2VlZ.js +0 -147
  586. package/dist/chunks/install-slack-app-Bc5m1UFG.js +0 -1
  587. package/dist/chunks/install-tclc0QHM.js +0 -1
  588. package/dist/chunks/instrumentation-Dn_FDn6G.js +0 -12
  589. package/dist/chunks/job-ssZ2ESAX.js +0 -2
  590. package/dist/chunks/jwtUtils-CpXwh_du.js +0 -1
  591. package/dist/chunks/keybindings-DVZlobLM.js +0 -2
  592. package/dist/chunks/lang-BQ--zwb1.js +0 -1
  593. package/dist/chunks/language-BM5numKK.js +0 -1
  594. package/dist/chunks/language-CcxtaVJA.js +0 -1
  595. package/dist/chunks/launchAgentsPlatform-CLwlpK5C.js +0 -1
  596. package/dist/chunks/launchAutofixPr-vGLlC4Jm.js +0 -18
  597. package/dist/chunks/launchLocalMemory-DJ4pR8a2.js +0 -3
  598. package/dist/chunks/launchLocalVault-Cl7Dds3W.js +0 -3
  599. package/dist/chunks/launchMemoryStores-Czk-a1P6.js +0 -1
  600. package/dist/chunks/launchOnboarding-66gN_781.js +0 -8
  601. package/dist/chunks/launchSchedule-Tx5efcfv.js +0 -1
  602. package/dist/chunks/launchSkillStore-BGPd1KCD.js +0 -1
  603. package/dist/chunks/launchTeleport-DzXrNn2h.js +0 -3
  604. package/dist/chunks/launchVault-C5djf6XO.js +0 -1
  605. package/dist/chunks/loadAgentsDir-DaApSWNv.js +0 -4671
  606. package/dist/chunks/loadAgentsDir-_BePoo3r.js +0 -1
  607. package/dist/chunks/loadPluginHooks-GENkKqO8.js +0 -1
  608. package/dist/chunks/localSearch-BQuH38SB.js +0 -1
  609. package/dist/chunks/localSearch-BSR9byCr.js +0 -1
  610. package/dist/chunks/log-CzsijfHZ.js +0 -1
  611. package/dist/chunks/login-C64M5OdJ.js +0 -1
  612. package/dist/chunks/login-dkrrvdEl.js +0 -1
  613. package/dist/chunks/logoV2Utils-D6ceZmK0.js +0 -1
  614. package/dist/chunks/logout-BITK5qkB.js +0 -1
  615. package/dist/chunks/magicDocs-KPodA4bi.js +0 -57
  616. package/dist/chunks/main-D9fUXJiD.js +0 -31
  617. package/dist/chunks/main-wb2H0Xbt.js +0 -1108
  618. package/dist/chunks/mappers-D54WYYhL.js +0 -1
  619. package/dist/chunks/mcp-Bgeq8jbd.js +0 -6
  620. package/dist/chunks/mcp-CJvRg7ft.js +0 -2
  621. package/dist/chunks/mcp-Ddvz5we7.js +0 -1
  622. package/dist/chunks/mcpServer-VYXTzAFl.js +0 -1
  623. package/dist/chunks/mcpServer-d0863d94.js +0 -1
  624. package/dist/chunks/memoize-DxwLawI2.js +0 -1
  625. package/dist/chunks/memory-BNyVCuw9.js +0 -1
  626. package/dist/chunks/mode-D_L3DNsz.js +0 -2
  627. package/dist/chunks/model-DevOJk2A.js +0 -1
  628. package/dist/chunks/model-Dy_oUo2C.js +0 -1
  629. package/dist/chunks/onChangeAppState-GPs10FBm.js +0 -1
  630. package/dist/chunks/openai-C0CrRENO.js +0 -10
  631. package/dist/chunks/overageCreditGrant-DCiIf_SF.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-C9oR06Fa.js +0 -1
  636. package/dist/chunks/path-B3lx7yHn.js +0 -1
  637. package/dist/chunks/paths-BZbIj1Z1.js +0 -39
  638. package/dist/chunks/permissions-DNb8DG22.js +0 -3
  639. package/dist/chunks/pipeTransport-Cx55TUNu.js +0 -1
  640. package/dist/chunks/plan-D-RJTUxb.js +0 -1
  641. package/dist/chunks/platform-CuyedWpe.js +0 -2
  642. package/dist/chunks/plugin-BV-DabiK.js +0 -1
  643. package/dist/chunks/pluginAutoupdate-DPciQRLz.js +0 -1
  644. package/dist/chunks/pluginBlocklist-CtSUf3sp.js +0 -1
  645. package/dist/chunks/pluginCliCommands-Cbcc-AQq.js +0 -1
  646. package/dist/chunks/pluginFlagging-D2d7jd4v.js +0 -1
  647. package/dist/chunks/pluginOperations-rU56uptC.js +0 -2
  648. package/dist/chunks/pluginStartupCheck-DuhCLRbp.js +0 -1
  649. package/dist/chunks/pluginStartupCheck-DwY7j_Cg.js +0 -1
  650. package/dist/chunks/plugins-LbLpZOhz.js +0 -4
  651. package/dist/chunks/policyLimits-Dl863Z85.js +0 -1
  652. package/dist/chunks/pollConfig-orFqIbGd.js +0 -1
  653. package/dist/chunks/poor-2u_yWIRG.js +0 -1
  654. package/dist/chunks/poorMode-BBr7GGQ3.js +0 -1
  655. package/dist/chunks/poorMode-DtQVZvON.js +0 -1
  656. package/dist/chunks/print-BgLbepaC.js +0 -39
  657. package/dist/chunks/privacy-settings-CC_FyvjV.js +0 -1
  658. package/dist/chunks/processBashCommand-DnekNzlT.js +0 -1
  659. package/dist/chunks/processSlashCommand-sLL0pyIW.js +0 -6
  660. package/dist/chunks/projectContext-D5FgyE-d.js +0 -1
  661. package/dist/chunks/prompt-DHHypkUR.js +0 -222
  662. package/dist/chunks/prompt-Dexwn9YP.js +0 -1
  663. package/dist/chunks/prompt-DhaPVt1T.js +0 -1
  664. package/dist/chunks/promptEditor-I8ZpszKv.js +0 -4
  665. package/dist/chunks/protocolHandler-CEsrhel_.js +0 -13
  666. package/dist/chunks/proxy-CfZp-wce.js +0 -99
  667. package/dist/chunks/rate-limit-options-B0Iyzr4x.js +0 -1
  668. package/dist/chunks/rcDebugLog-CF73Wofq.js +0 -11
  669. package/dist/chunks/referral-Nz20w4pB.js +0 -1
  670. package/dist/chunks/refresh-DecpoOX1.js +0 -1
  671. package/dist/chunks/registerProtocol-CAoaYyt8.js +0 -36
  672. package/dist/chunks/registry-BQdQRu-K.js +0 -1
  673. package/dist/chunks/release-notes-C0HeOmQY.js +0 -4
  674. package/dist/chunks/releaseNotes-BDzfbUAu.js +0 -2
  675. package/dist/chunks/reload-plugins-BZ4LTYY3.js +0 -1
  676. package/dist/chunks/remote-env-CPalv-BL.js +0 -1
  677. package/dist/chunks/remoteBridgeCore-B2yFfG6S.js +0 -1
  678. package/dist/chunks/remoteControlServer-CsnLedUv.js +0 -3
  679. package/dist/chunks/rename-CQPtjj_Q.js +0 -1
  680. package/dist/chunks/renderOptions-rmj4Mkls.js +0 -1
  681. package/dist/chunks/resume-Ycuezjv2.js +0 -2
  682. package/dist/chunks/runtimeObserver-CW0_wm1t.js +0 -1
  683. package/dist/chunks/runtimeObserver-DnhLm9O1.js +0 -10
  684. package/dist/chunks/sandbox-adapter-BOsa-en7.js +0 -1
  685. package/dist/chunks/sandbox-toggle-Bl5Drxeo.js +0 -1
  686. package/dist/chunks/searchExtraTools-CgdrY8XO.js +0 -1
  687. package/dist/chunks/sentry-BN3GTgYM.js +0 -13
  688. package/dist/chunks/session-ULekTZVn.js +0 -2
  689. package/dist/chunks/sessionDiscovery-DAmbR6o-.js +0 -1
  690. package/dist/chunks/sessionFileAccessHooks-C-o5001P.js +0 -1
  691. package/dist/chunks/sessionMemory-Bg458voj.js +0 -1
  692. package/dist/chunks/sessionMemory-DR-esdhZ.js +0 -1
  693. package/dist/chunks/sessionMemoryUtils-DgVGiwjB.js +0 -1
  694. package/dist/chunks/sessionObserver-C5cujEe6.js +0 -1
  695. package/dist/chunks/sessionObserver-CQ3PQWgU.js +0 -20
  696. package/dist/chunks/sessionStorage-BIDUQ8wo.js +0 -1
  697. package/dist/chunks/sessionTitle-DyexSH43.js +0 -14
  698. package/dist/chunks/sessionTracing-gKle2qzF.js +0 -11
  699. package/dist/chunks/settingsSync-BWW4FOMm.js +0 -1
  700. package/dist/chunks/setup-DX6984LY.js +0 -1
  701. package/dist/chunks/setup-OvlOCIFL.js +0 -2
  702. package/dist/chunks/setup-n91rSYO2.js +0 -9
  703. package/dist/chunks/shadowedRuleDetection-uYIZBoii.js +0 -1
  704. package/dist/chunks/shellQuote-DgjT8KBA.js +0 -1
  705. package/dist/chunks/sideQuestion-DIMsNoEc.js +0 -20
  706. package/dist/chunks/sink-BBn0HwoH.js +0 -1
  707. package/dist/chunks/sink-DLRpC2qX.js +0 -1
  708. package/dist/chunks/sinks-BI1hGD9c.js +0 -2
  709. package/dist/chunks/sinks-DKGE2sSC.js +0 -1
  710. package/dist/chunks/skill-learning-Dz-Zq-xT.js +0 -5
  711. package/dist/chunks/skillChangeDetector-C2Te20cK.js +0 -1
  712. package/dist/chunks/skillGapStore-BFpryJIe.js +0 -5
  713. package/dist/chunks/skillGapStore-CxPjoWci.js +0 -1
  714. package/dist/chunks/skillGenerator-BGOIb5p-.js +0 -8
  715. package/dist/chunks/skillLearning-BRvWwB8E.js +0 -1
  716. package/dist/chunks/skillLearning-DTo7lCKd.js +0 -1
  717. package/dist/chunks/skillPanel-DzYZLnuH.js +0 -28
  718. package/dist/chunks/skillSearchPanel-DrysL5R-.js +0 -21
  719. package/dist/chunks/skills-CTfNqisc.js +0 -1
  720. package/dist/chunks/sprites-CHzZCAGE.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-D2s-hIY8.js +0 -1
  724. package/dist/chunks/status-XxrX2kHw.js +0 -1
  725. package/dist/chunks/statusNoticeHelpers-CUm1pflC.js +0 -1
  726. package/dist/chunks/stickers-BMh2qjgF.js +0 -1
  727. package/dist/chunks/tag-FV031rKW.js +0 -11
  728. package/dist/chunks/tasks-aK2rp8CW.js +0 -1
  729. package/dist/chunks/teamHelpers-2m66Mr8w.js +0 -1
  730. package/dist/chunks/teamHelpers-Bg3nHlWr.js +0 -1
  731. package/dist/chunks/teammateModeSnapshot-BtdUJBKp.js +0 -1
  732. package/dist/chunks/teammateModeSnapshot-VojvAMbR.js +0 -1
  733. package/dist/chunks/teleport-4x9eIl8c.js +0 -1
  734. package/dist/chunks/templateJobs-fEz4DGWh.js +0 -12
  735. package/dist/chunks/terminalSetup-Cjdlcznm.js +0 -33
  736. package/dist/chunks/terminalSetup-EirH-l0a.js +0 -1
  737. package/dist/chunks/theme-BjdEyakL.js +0 -1
  738. package/dist/chunks/thinkback-CrW3VlCR.js +0 -1
  739. package/dist/chunks/thinkback-DHyz-lmU.js +0 -1
  740. package/dist/chunks/thinkback-play-B46ystVF.js +0 -1
  741. package/dist/chunks/tmux-CvbhsfwG.js +0 -1
  742. package/dist/chunks/toolEventObserver-CJ68x4wM.js +0 -1
  743. package/dist/chunks/toolEventObserver-Dak6ETA6.js +0 -1
  744. package/dist/chunks/toolPool-3CMCh3QU.js +0 -1
  745. package/dist/chunks/toolPool-BHdCDihh.js +0 -1
  746. package/dist/chunks/trustedDevice-QhApqKq4.js +0 -1
  747. package/dist/chunks/trustedDevice-oDn6E85N.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-Ar9zzqz4.js +0 -3
  752. package/dist/chunks/undercover-D1ieJ54D.js +0 -1
  753. package/dist/chunks/undercover-DZq2Tf-o.js +0 -31
  754. package/dist/chunks/up-D-U4wUCe.js +0 -12
  755. package/dist/chunks/updateCCB-Db3CfFcn.js +0 -11
  756. package/dist/chunks/upgrade-B28O0zeQ.js +0 -1
  757. package/dist/chunks/upgrade-BZvNOhEJ.js +0 -1
  758. package/dist/chunks/upload-DAmbsBq4.js +0 -1
  759. package/dist/chunks/upstreamproxy-Ci5T_JCo.js +0 -11
  760. package/dist/chunks/usage-COv9UCxX.js +0 -1
  761. package/dist/chunks/usage-Dtv3YQf8.js +0 -1
  762. package/dist/chunks/useMainLoopModel-BpM3dlzJ.js +0 -1
  763. package/dist/chunks/useManagePlugins-DZ-_Ll9E.js +0 -1
  764. package/dist/chunks/useMergedTools-INKnp2ij.js +0 -1
  765. package/dist/chunks/useSearchInput-DobM3JKI.js +0 -1
  766. package/dist/chunks/useSettingsErrors-DjvaCC5-.js +0 -1
  767. package/dist/chunks/useVoice-exDfbv1t.js +0 -1
  768. package/dist/chunks/util-CDzNDmax.js +0 -1
  769. package/dist/chunks/utils-B0iiiW_p.js +0 -1
  770. package/dist/chunks/validatePlugin-DaLnfLSC.js +0 -1
  771. package/dist/chunks/vim-CPKu15l_.js +0 -1
  772. package/dist/chunks/voice-BcA5h8ya.js +0 -8
  773. package/dist/chunks/voice-gNxUce-I.js +0 -2
  774. package/dist/chunks/voiceModeEnabled-CwPbMJ9C.js +0 -1
  775. package/dist/chunks/voiceModeEnabled-DEwGjUP6.js +0 -1
  776. package/dist/chunks/voiceStreamSTT-6b3Oslnl.js +0 -1
  777. package/dist/chunks/voiceStreamSTT-BjX-mTB_.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-Bc6t6VlK.js +0 -1
  783. package/dist/chunks/worktree-NnuvJmoP.js +0 -1
  784. package/dist/chunks/xml-Dg8-vY8G.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
@@ -1,147 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,Q as a,Rn as o,T as s,b as c,f as l,g as u,h as d,nt as f,t as p,tn as m,tt as h,v as g,x as _}from"./src-Di342QoJ.js";import{t as v}from"./jsx-runtime-D-D469L8.js";import{Ac as y,Mn as b,Pc as x,Po as ee,Vt as te,cn as S,jo as C,on as w}from"./paths-BZbIj1Z1.js";import{n as T,r as E}from"./analytics-DqMQntaB.js";import{l as ne,v as re}from"./git-CN3qtTb_.js";import{r as ie,t as ae}from"./execa-CGue6Z3n.js";import{o as oe,s as D}from"./log-CzsijfHZ.js";import{r as se,t as O}from"./execFileNoThrow-CuQN1sz8.js";import{Ey as ce,Lx as le,MT as ue,NT as de,Ux as k,Wx as A,aC as fe,by as pe,iC as me,qw as j,vy as he,wy as M,yy as ge}from"./loadAgentsDir-DaApSWNv.js";import{n as _e,t as ve}from"./browser-fLRXxIsQ.js";import{t as N}from"./useKeybinding-FsOnjW6T.js";import{l as ye,u as be}from"./referral-Nz20w4pB.js";function xe(e){return e.pending?(0,F.jsxs)(c,{children:[`Press `,e.keyName,` again to exit`]}):(0,F.jsxs)(d,{children:[(0,F.jsx)(u,{shortcut:`↑↓`,action:`navigate`}),(0,F.jsx)(u,{shortcut:`Space`,action:`toggle`}),(0,F.jsx)(u,{shortcut:`Enter`,action:`confirm`}),(0,F.jsx)(me,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}function Se({onSubmit:e,defaultSelections:t}){let[n,r]=(0,P.useState)(!1),i=(0,P.useCallback)(t=>{if(t.length===0){r(!0);return}r(!1),e(t)},[e]),o=(0,P.useCallback)(()=>{r(!1)},[]),s=(0,P.useCallback)(()=>{r(!0)},[]);return(0,F.jsxs)(l,{title:`Select GitHub workflows to install`,subtitle:`We'll create a workflow file in your repository for each one you select.`,onCancel:s,inputGuide:xe,children:[(0,F.jsx)(_,{children:(0,F.jsxs)(c,{dimColor:!0,children:[`More workflow examples (issue triage, CI fixes, etc.) at:`,` `,(0,F.jsx)(a,{url:`https://github.com/anthropics/claude-code-action/blob/main/examples/`,children:`https://github.com/anthropics/claude-code-action/blob/main/examples/`})]})}),(0,F.jsx)(ge,{options:Ce.map(e=>({label:e.label,value:e.value})),defaultValue:t,onSubmit:i,onChange:o,onCancel:s,hideIndexes:!0}),n&&(0,F.jsx)(_,{children:(0,F.jsx)(c,{color:`error`,children:`You must select at least one workflow to continue`})})]})}var P,F,Ce,we=e((()=>{P=t(o(),1),p(),fe(),pe(),F=v(),Ce=[{value:`claude`,label:`@Claude Code - Tag @claude in issues and PR comments`},{value:`claude-review`,label:`Claude Code Review - Automated code review on new PRs`}]})),Te,I,Ee,De,Oe,L=e((()=>{Te=`Add Claude Code GitHub Workflow`,I=`https://github.com/anthropics/claude-code-action/blob/main/docs/setup.md`,Ee=`name: Claude Code
2
-
3
- on:
4
- issue_comment:
5
- types: [created]
6
- pull_request_review_comment:
7
- types: [created]
8
- issues:
9
- types: [opened, assigned]
10
- pull_request_review:
11
- types: [submitted]
12
-
13
- jobs:
14
- claude:
15
- if: |
16
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
- runs-on: ubuntu-latest
21
- permissions:
22
- contents: read
23
- pull-requests: read
24
- issues: read
25
- id-token: write
26
- actions: read # Required for Claude to read CI results on PRs
27
- steps:
28
- - name: Checkout repository
29
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
30
- with:
31
- fetch-depth: 1
32
-
33
- - name: Run Claude Code
34
- id: claude
35
- uses: anthropics/claude-code-action@567fe954a4527e81f132d87d1bdbcc94f7737434 # v1, 2026-04-25
36
- with:
37
- anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
38
-
39
- # This is an optional setting that allows Claude to read CI results on PRs
40
- additional_permissions: |
41
- actions: read
42
-
43
- # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
- # prompt: 'Update the pull request description to include a summary of changes.'
45
-
46
- # Optional: Add claude_args to customize behavior and configuration
47
- # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
- # or https://code.claude.com/docs/en/cli-reference for available options
49
- # claude_args: '--allowed-tools Bash(gh pr:*)'
50
-
51
- `,De=`## 🤖 Installing Claude Code GitHub App
52
-
53
- This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.
54
-
55
- ### What is Claude Code?
56
-
57
- [Claude Code](https://claude.com/claude-code) is an AI coding agent that can help with:
58
- - Bug fixes and improvements
59
- - Documentation updates
60
- - Implementing new features
61
- - Code reviews and suggestions
62
- - Writing tests
63
- - And more!
64
-
65
- ### How it works
66
-
67
- Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
68
- Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
69
-
70
- ### Important Notes
71
-
72
- - **This workflow won't take effect until this PR is merged**
73
- - **@claude mentions won't work until after the merge is complete**
74
- - The workflow runs automatically whenever Claude is mentioned in PR or issue comments
75
- - Claude gets access to the entire PR or issue context including files, diffs, and previous comments
76
-
77
- ### Security
78
-
79
- - Our Anthropic API key is securely stored as a GitHub Actions secret
80
- - Only users with write access to the repository can trigger the workflow
81
- - All Claude runs are stored in the GitHub Actions run history
82
- - Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
83
- - We can add more allowed tools by adding them to the workflow file like:
84
-
85
- \`\`\`
86
- allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)
87
- \`\`\`
88
-
89
- There's more information in the [Claude Code action repo](https://github.com/anthropics/claude-code-action).
90
-
91
- After merging this PR, let's try mentioning @claude in a comment on any PR to get started!`,Oe=`name: Claude Code Review
92
-
93
- on:
94
- pull_request:
95
- types: [opened, synchronize, ready_for_review, reopened]
96
- # Optional: Only run on specific file changes
97
- # paths:
98
- # - "src/**/*.ts"
99
- # - "src/**/*.tsx"
100
- # - "src/**/*.js"
101
- # - "src/**/*.jsx"
102
-
103
- jobs:
104
- claude-review:
105
- # Optional: Filter by PR author
106
- # if: |
107
- # github.event.pull_request.user.login == 'external-contributor' ||
108
- # github.event.pull_request.user.login == 'new-developer' ||
109
- # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
110
-
111
- runs-on: ubuntu-latest
112
- permissions:
113
- contents: read
114
- pull-requests: read
115
- issues: read
116
- id-token: write
117
-
118
- steps:
119
- - name: Checkout repository
120
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
121
- with:
122
- fetch-depth: 1
123
-
124
- - name: Run Claude Code Review
125
- id: claude-review
126
- uses: anthropics/claude-code-action@567fe954a4527e81f132d87d1bdbcc94f7737434 # v1, 2026-04-25
127
- with:
128
- anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
129
- plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
130
- plugins: 'code-review@claude-code-plugins'
131
- prompt: '/code-review:code-review \${{ github.repository }}/pull/\${{ github.event.pull_request.number }}'
132
- # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
133
- # or https://code.claude.com/docs/en/cli-reference for available options
134
-
135
- `}));function ke({existingApiKey:e,apiKeyOrOAuthToken:t,onApiKeyChange:n,onSubmit:r,onToggleUseExistingKey:a,onCreateOAuthToken:o,selectedOption:l=e?`existing`:o?`oauth`:`new`,onSelectOption:u}){let[d,p]=(0,R.useState)(0),m=i(),[h]=s(),v=(0,R.useCallback)(()=>{l===`new`&&o?u?.(`oauth`):l===`oauth`&&e&&(u?.(`existing`),a(!0))},[l,o,e,u,a]),y=(0,R.useCallback)(()=>{l===`existing`?(u?.(o?`oauth`:`new`),a(!1)):l===`oauth`&&u?.(`new`)},[l,o,u,a]),b=(0,R.useCallback)(()=>{l===`oauth`&&o?o():r()},[l,o,r]),x=l===`new`;return f({"confirm:previous":v,"confirm:next":y,"confirm:yes":b},{context:`Confirmation`,isActive:!x}),f({"confirm:previous":v,"confirm:next":y},{context:`Confirmation`,isActive:x}),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,z.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,z.jsx)(c,{bold:!0,children:`Install GitHub App`}),(0,z.jsx)(c,{dimColor:!0,children:`Choose API key`})]}),e&&(0,z.jsx)(_,{marginBottom:1,children:(0,z.jsxs)(c,{children:[l===`existing`?g(`success`,h)(`> `):` `,`Use your existing Claude Code API key`]})}),o&&(0,z.jsx)(_,{marginBottom:1,children:(0,z.jsxs)(c,{children:[l===`oauth`?g(`success`,h)(`> `):` `,`Create a long-lived token with your Claude subscription`]})}),(0,z.jsx)(_,{marginBottom:1,children:(0,z.jsxs)(c,{children:[l===`new`?g(`success`,h)(`> `):` `,`Enter a new API key`]})}),l===`new`&&(0,z.jsx)(k,{value:t,onChange:n,onSubmit:r,onPaste:n,focus:!0,placeholder:`sk-ant… (Create a new key at https://platform.claude.com/settings/keys)`,mask:`*`,columns:m.columns,cursorOffset:d,onChangeCursorOffset:p,showCursor:!0})]}),(0,z.jsx)(_,{marginLeft:3,children:(0,z.jsx)(c,{dimColor:!0,children:`↑/↓ to select · Enter to continue`})})]})}var R,z,Ae=e((()=>{R=t(o(),1),A(),j(),p(),N(),z=v()}));function je({useExistingSecret:e,secretName:t,onToggleUseExistingSecret:n,onSecretNameChange:r,onSubmit:a}){let[o,l]=(0,B.useState)(0),u=i(),[d]=s(),p=(0,B.useCallback)(()=>n(!0),[n]),m=(0,B.useCallback)(()=>n(!1),[n]);return f({"confirm:previous":p,"confirm:next":m,"confirm:yes":a},{context:`Confirmation`,isActive:e}),f({"confirm:previous":p,"confirm:next":m},{context:`Confirmation`,isActive:!e}),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,V.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,V.jsx)(c,{bold:!0,children:`Install GitHub App`}),(0,V.jsx)(c,{dimColor:!0,children:`Setup API key secret`})]}),(0,V.jsx)(_,{marginBottom:1,children:(0,V.jsx)(c,{color:`warning`,children:`ANTHROPIC_API_KEY already exists in repository secrets!`})}),(0,V.jsx)(_,{marginBottom:1,children:(0,V.jsx)(c,{children:`Would you like to:`})}),(0,V.jsx)(_,{marginBottom:1,children:(0,V.jsxs)(c,{children:[e?g(`success`,d)(`> `):` `,`Use the existing API key`]})}),(0,V.jsx)(_,{marginBottom:1,children:(0,V.jsxs)(c,{children:[e?` `:g(`success`,d)(`> `),`Create a new secret with a different name`]})}),!e&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_,{marginBottom:1,children:(0,V.jsx)(c,{children:`Enter new secret name (alphanumeric with underscores):`})}),(0,V.jsx)(k,{value:t,onChange:r,onSubmit:a,focus:!0,placeholder:`e.g., CLAUDE_API_KEY`,columns:u.columns,cursorOffset:o,onChangeCursorOffset:l,showCursor:!0})]})]}),(0,V.jsx)(_,{marginLeft:3,children:(0,V.jsx)(c,{dimColor:!0,children:`↑/↓ to select · Enter to continue`})})]})}var B,V,Me=e((()=>{B=t(o(),1),A(),j(),p(),N(),V=v()}));function Ne(){return(0,Pe.jsx)(c,{children:`Checking GitHub CLI installation…`})}var Pe,Fe=e((()=>{p(),Pe=v()}));function Ie({currentRepo:e,useCurrentRepo:t,repoUrl:n,onRepoUrlChange:r,onSubmit:a,onToggleUseCurrentRepo:o}){let[s,l]=(0,H.useState)(0),[u,d]=(0,H.useState)(!1),p=i().columns,m=(0,H.useCallback)(()=>{if(!(t?e:n)?.trim()){d(!0);return}a()},[t,e,n,a]),h=!t||!e,g=(0,H.useCallback)(()=>{o(!0),d(!1)},[o]),v=(0,H.useCallback)(()=>{o(!1),d(!1)},[o]);return f({"confirm:previous":g,"confirm:next":v,"confirm:yes":m},{context:`Confirmation`,isActive:!h}),f({"confirm:previous":g,"confirm:next":v},{context:`Confirmation`,isActive:h}),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,U.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(c,{bold:!0,children:`Install GitHub App`}),(0,U.jsx)(c,{dimColor:!0,children:`Select GitHub repository`})]}),e&&(0,U.jsx)(_,{marginBottom:1,children:(0,U.jsxs)(c,{bold:t,color:t?`permission`:void 0,children:[t?`> `:` `,`Use current repository: `,e]})}),(0,U.jsx)(_,{marginBottom:1,children:(0,U.jsxs)(c,{bold:!t||!e,color:!t||!e?`permission`:void 0,children:[!t||!e?`> `:` `,e?`Enter a different repository`:`Enter repository`]})}),(!t||!e)&&(0,U.jsx)(_,{marginLeft:2,marginBottom:1,children:(0,U.jsx)(k,{value:n,onChange:e=>{r(e),d(!1)},onSubmit:m,focus:!0,placeholder:`Enter a repo as owner/repo or https://github.com/owner/repo…`,columns:p,cursorOffset:s,onChangeCursorOffset:l,showCursor:!0})})]}),u&&(0,U.jsx)(_,{marginLeft:3,marginBottom:1,children:(0,U.jsx)(c,{color:`error`,children:`Please enter a repository name to continue`})}),(0,U.jsx)(_,{marginLeft:3,children:(0,U.jsxs)(c,{dimColor:!0,children:[e?`↑/↓ to select · `:``,`Enter to continue`]})})]})}var H,U,Le=e((()=>{H=t(o(),1),A(),j(),p(),N(),U=v()}));function Re({currentWorkflowInstallStep:e,secretExists:t,useExistingSecret:n,secretName:r,skipWorkflow:i=!1,selectedWorkflows:a}){let o=i?[`Getting repository information`,t&&n?`Using existing API key secret`:`Setting up ${r} secret`]:[`Getting repository information`,`Creating branch`,a.length>1?`Creating workflow files`:`Creating workflow file`,t&&n?`Using existing API key secret`:`Setting up ${r} secret`,`Opening pull request page`];return(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,W.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,W.jsx)(c,{bold:!0,children:`Install GitHub App`}),(0,W.jsx)(c,{dimColor:!0,children:`Create GitHub Actions workflow`})]}),o.map((t,n)=>{let r=`pending`;return n<e?r=`completed`:n===e&&(r=`in-progress`),(0,W.jsx)(_,{children:(0,W.jsxs)(c,{color:r===`completed`?`success`:r===`in-progress`?`warning`:void 0,children:[r===`completed`?`✓ `:``,t,r===`in-progress`?`…`:``]})},n)})]})})}var W,ze=e((()=>{p(),W=v()}));function Be({error:e,errorReason:t,errorInstructions:n}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,G.jsx)(_,{flexDirection:`column`,marginBottom:1,children:(0,G.jsx)(c,{bold:!0,children:`Install GitHub App`})}),(0,G.jsxs)(c,{color:`error`,children:[`Error: `,e]}),t&&(0,G.jsx)(_,{marginTop:1,children:(0,G.jsxs)(c,{dimColor:!0,children:[`Reason: `,t]})}),n&&n.length>0&&(0,G.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,G.jsx)(c,{dimColor:!0,children:`How to fix:`}),n.map((e,t)=>(0,G.jsxs)(_,{marginLeft:2,children:[(0,G.jsx)(c,{dimColor:!0,children:`• `}),(0,G.jsx)(c,{children:e})]},t))]}),(0,G.jsx)(_,{marginTop:1,children:(0,G.jsxs)(c,{dimColor:!0,children:[`For manual setup instructions, see: `,(0,G.jsx)(c,{color:`claude`,children:I})]})})]}),(0,G.jsx)(_,{marginLeft:3,children:(0,G.jsx)(c,{dimColor:!0,children:`Press any key to exit`})})]})}var G,Ve=e((()=>{L(),p(),G=v()}));function He({repoName:e,onSelectAction:t}){return(0,K.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,borderDimColor:!0,paddingX:1,children:[(0,K.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsx)(c,{bold:!0,children:`Existing Workflow Found`}),(0,K.jsxs)(c,{dimColor:!0,children:[`Repository: `,e]})]}),(0,K.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsxs)(c,{children:[`A Claude workflow file already exists at `,(0,K.jsx)(c,{color:`claude`,children:`.github/workflows/claude.yml`})]}),(0,K.jsx)(c,{dimColor:!0,children:`What would you like to do?`})]}),(0,K.jsx)(_,{flexDirection:`column`,children:(0,K.jsx)(le,{options:[{label:`Update workflow file with latest version`,value:`update`},{label:`Skip workflow update (configure secrets only)`,value:`skip`},{label:`Exit without making changes`,value:`exit`}],onChange:e=>{t(e)},onCancel:()=>{t(`exit`)}})}),(0,K.jsx)(_,{marginTop:1,children:(0,K.jsxs)(c,{dimColor:!0,children:[`View the latest workflow template at:`,` `,(0,K.jsx)(c,{color:`claude`,children:`https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml`})]})})]})}var K,Ue=e((()=>{he(),p(),K=v()}));function We({repoUrl:e,onSubmit:t}){return h(`confirm:yes`,t,{context:`Confirmation`}),(0,q.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,borderDimColor:!0,paddingX:1,children:[(0,q.jsx)(_,{flexDirection:`column`,marginBottom:1,children:(0,q.jsx)(c,{bold:!0,children:`Install the Claude GitHub App`})}),(0,q.jsx)(_,{marginBottom:1,children:(0,q.jsx)(c,{children:`Opening browser to install the Claude GitHub App…`})}),(0,q.jsx)(_,{marginBottom:1,children:(0,q.jsx)(c,{children:`If your browser doesn't open automatically, visit:`})}),(0,q.jsx)(_,{marginBottom:1,children:(0,q.jsx)(c,{underline:!0,children:`https://github.com/apps/claude`})}),(0,q.jsx)(_,{marginBottom:1,children:(0,q.jsxs)(c,{children:[`Please install the app for repository: `,(0,q.jsx)(c,{bold:!0,children:e})]})}),(0,q.jsx)(_,{marginBottom:1,children:(0,q.jsx)(c,{dimColor:!0,children:`Important: Make sure to grant access to this specific repository`})}),(0,q.jsx)(_,{children:(0,q.jsxs)(c,{bold:!0,color:`permission`,children:[`Press Enter once you've installed the app`,r.ellipsis]})}),(0,q.jsx)(_,{marginTop:1,children:(0,q.jsxs)(c,{dimColor:!0,children:[`Having trouble? See manual setup instructions at: `,(0,q.jsx)(c,{color:`claude`,children:I})]})})]})}var q,Ge=e((()=>{n(),L(),p(),N(),q=v()}));function Ke({onSuccess:e,onCancel:t}){let[n,r]=(0,J.useState)({state:`starting`}),[o]=(0,J.useState)(()=>new ue),[s,l]=(0,J.useState)(``),[d,f]=(0,J.useState)(0),[p,h]=(0,J.useState)(!1),[g,v]=(0,J.useState)(!1),y=(0,J.useRef)(new Set),x=(0,J.useRef)(void 0),ee=i(),te=Math.max(50,ee.columns-30-4);function S(e){n.state===`error`&&(e.preventDefault(),e.key===`return`&&n.toRetry?(l(``),f(0),r({state:`about_to_retry`,nextState:n.toRetry})):t())}async function C(e,t){try{let[n,i]=e.split(`#`);if(!n||!i){r({state:`error`,message:`Invalid code. Please make sure the full code was copied`,toRetry:{state:`waiting_for_login`,url:t}});return}E(`tengu_oauth_manual_entry`,{}),o.handleManualAuthCodeInput({authorizationCode:n,state:i})}catch(e){D(e),r({state:`error`,message:e.message,toRetry:{state:`waiting_for_login`,url:t}})}}let w=(0,J.useCallback)(async()=>{y.current.forEach(e=>clearTimeout(e)),y.current.clear();try{let t=await o.startOAuthFlow(async e=>{r({state:`waiting_for_login`,url:e});let t=setTimeout(h,3e3,!0);y.current.add(t)},{loginWithClaudeAi:!0,inferenceOnly:!0,expiresIn:365*24*60*60});r({state:`processing`}),b(t);let n=setTimeout((e,t,n,r)=>{e({state:`success`,token:t});let i=setTimeout(n,1e3,t);r.current.add(i)},100,r,t.accessToken,e,y);y.current.add(n)}catch(e){let t=e.message;r({state:`error`,message:t,toRetry:{state:`starting`}}),D(e),E(`tengu_oauth_error`,{error:t})}},[o,e]);(0,J.useEffect)(()=>{n.state===`starting`&&w()},[n.state,w]),(0,J.useEffect)(()=>{if(n.state===`about_to_retry`){let e=setTimeout((e,t,n)=>{t(e.state===`waiting_for_login`),n(e)},500,n.nextState,h,r);y.current.add(e)}},[n]),(0,J.useEffect)(()=>{s===`c`&&n.state===`waiting_for_login`&&p&&!g&&(m(n.url).then(e=>{e&&process.stdout.write(e),v(!0),clearTimeout(x.current),x.current=setTimeout(v,2e3,!1)}),l(``))},[s,n,p,g]),(0,J.useEffect)(()=>{let e=y.current;return()=>{o.cleanup(),e.forEach(e=>clearTimeout(e)),e.clear(),clearTimeout(x.current)}},[o]);function T(){switch(n.state){case`starting`:return(0,Y.jsxs)(_,{children:[(0,Y.jsx)(M,{}),(0,Y.jsx)(c,{children:`Starting authentication…`})]});case`waiting_for_login`:return(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,children:[!p&&(0,Y.jsxs)(_,{children:[(0,Y.jsx)(M,{}),(0,Y.jsx)(c,{children:`Opening browser to sign in with your Claude account…`})]}),p&&(0,Y.jsxs)(_,{children:[(0,Y.jsx)(c,{children:qe}),(0,Y.jsx)(k,{value:s,onChange:l,onSubmit:e=>C(e,n.url),cursorOffset:d,onChangeCursorOffset:f,columns:te})]})]});case`processing`:return(0,Y.jsxs)(_,{children:[(0,Y.jsx)(M,{}),(0,Y.jsx)(c,{children:`Processing authentication…`})]});case`success`:return(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Y.jsx)(c,{color:`success`,children:`✓ Authentication token created successfully!`}),(0,Y.jsx)(c,{dimColor:!0,children:`Using token for GitHub Actions setup…`})]});case`error`:return(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Y.jsxs)(c,{color:`error`,children:[`OAuth error: `,n.message]}),n.toRetry?(0,Y.jsx)(c,{dimColor:!0,children:`Press Enter to try again, or any other key to cancel`}):(0,Y.jsx)(c,{dimColor:!0,children:`Press any key to return to API key selection`})]});case`about_to_retry`:return(0,Y.jsx)(_,{flexDirection:`column`,gap:1,children:(0,Y.jsx)(c,{color:`permission`,children:`Retrying…`})});default:return null}}return(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:S,children:[n.state===`starting`&&(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,paddingBottom:1,children:[(0,Y.jsx)(c,{bold:!0,children:`Create Authentication Token`}),(0,Y.jsx)(c,{dimColor:!0,children:`Creating a long-lived token for GitHub Actions`})]}),n.state!==`success`&&n.state!==`starting`&&n.state!==`processing`&&(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,paddingBottom:1,children:[(0,Y.jsx)(c,{bold:!0,children:`Create Authentication Token`}),(0,Y.jsx)(c,{dimColor:!0,children:`Creating a long-lived token for GitHub Actions`})]},`header`),n.state===`waiting_for_login`&&p&&(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,paddingBottom:1,children:[(0,Y.jsxs)(_,{paddingX:1,children:[(0,Y.jsx)(c,{dimColor:!0,children:`Browser didn't open? Use the url below to sign in `}),g?(0,Y.jsx)(c,{color:`success`,children:`(Copied!)`}):(0,Y.jsx)(c,{dimColor:!0,children:(0,Y.jsx)(u,{shortcut:`c`,action:`copy`,parens:!0})})]}),(0,Y.jsx)(a,{url:n.url,children:(0,Y.jsx)(c,{dimColor:!0,children:n.url})})]},`urlToCopy`),(0,Y.jsx)(_,{paddingLeft:1,flexDirection:`column`,gap:1,children:T()})]})}var J,Y,qe,Je=e((()=>{J=t(o(),1),T(),p(),ce(),A(),j(),de(),w(),oe(),Y=v(),qe=`Paste code here if prompted > `}));function Ye({secretExists:e,useExistingSecret:t,secretName:n,skipWorkflow:r=!1}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,X.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,X.jsx)(c,{bold:!0,children:`Install GitHub App`}),(0,X.jsx)(c,{dimColor:!0,children:`Success`})]}),!r&&(0,X.jsx)(c,{color:`success`,children:`✓ GitHub Actions workflow created!`}),e&&t&&(0,X.jsx)(_,{marginTop:1,children:(0,X.jsx)(c,{color:`success`,children:`✓ Using existing ANTHROPIC_API_KEY secret`})}),(!e||!t)&&(0,X.jsx)(_,{marginTop:1,children:(0,X.jsxs)(c,{color:`success`,children:[`✓ API key saved as `,n,` secret`]})}),(0,X.jsx)(_,{marginTop:1,children:(0,X.jsx)(c,{children:`Next steps:`})}),r?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(c,{children:`1. Install the Claude GitHub App if you haven't already`}),(0,X.jsx)(c,{children:`2. Your workflow file was kept unchanged`}),(0,X.jsx)(c,{children:`3. API key is configured and ready to use`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(c,{children:`1. A pre-filled PR page has been created`}),(0,X.jsx)(c,{children:`2. Install the Claude GitHub App if you haven't already`}),(0,X.jsx)(c,{children:`3. Merge the PR to enable Claude PR assistance`})]})]}),(0,X.jsx)(_,{marginLeft:3,children:(0,X.jsx)(c,{dimColor:!0,children:`Press any key to exit`})})]})}var X,Xe=e((()=>{o(),p(),X=v()}));async function Ze(e,t,n,r,i,a,o){let s=await O(`gh`,[`api`,`repos/${e}/contents/${n}`,`--jq`,`.sha`]),c=null;s.code===0&&(c=s.stdout.trim());let l=r;i===`CLAUDE_CODE_OAUTH_TOKEN`?l=r.replace(/anthropic_api_key: \$\{\{ secrets\.ANTHROPIC_API_KEY \}\}/g,"claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}"):i!==`ANTHROPIC_API_KEY`&&(l=r.replace(/anthropic_api_key: \$\{\{ secrets\.ANTHROPIC_API_KEY \}\}/g,`anthropic_api_key: \${{ secrets.${i} }}`));let u=Buffer.from(l).toString(`base64`),d=[`api`,`--method`,`PUT`,`repos/${e}/contents/${n}`,`-f`,`message=${c?`"Update ${a}"`:`"${a}"`}`,`-f`,`content=${u}`,`-f`,`branch=${t}`];c&&d.push(`-f`,`sha=${c}`);let f=await O(`gh`,d);if(f.code!==0)throw f.stderr.includes(`422`)&&f.stderr.includes(`sha`)?(E(`tengu_setup_github_actions_failed`,{reason:`failed_to_create_workflow_file`,exit_code:f.code,...o}),Error(`Failed to create workflow file ${n}: A Claude workflow file already exists in this repository. Please remove it first or update it manually.`)):(E(`tengu_setup_github_actions_failed`,{reason:`failed_to_create_workflow_file`,exit_code:f.code,...o}),Error(`Failed to create workflow file ${n}: ${f.stderr}
136
-
137
- Need help? Common issues:
138
- · Permission denied → Run: gh auth refresh -h github.com -s repo,workflow
139
- · Not authorized → Ensure you have admin access to the repository
140
- · For manual setup → Visit: https://github.com/anthropics/claude-code-action`))}async function Qe(e,t,n,r,i=!1,a,o,s){try{E(`tengu_setup_github_actions_started`,{skip_workflow:i,has_api_key:!!t,using_default_secret_name:n===`ANTHROPIC_API_KEY`,selected_claude_workflow:a.includes(`claude`),selected_claude_review_workflow:a.includes(`claude-review`),...s});let c=await O(`gh`,[`api`,`repos/${e}`,`--jq`,`.id`]);if(c.code!==0)throw E(`tengu_setup_github_actions_failed`,{reason:`repo_not_found`,exit_code:c.code,...s}),Error(`Failed to access repository ${e}: ${c.stderr}`);let l=await O(`gh`,[`api`,`repos/${e}`,`--jq`,`.default_branch`]);if(l.code!==0)throw E(`tengu_setup_github_actions_failed`,{reason:`failed_to_get_default_branch`,exit_code:l.code,...s}),Error(`Failed to get default branch: ${l.stderr}`);let u=l.stdout.trim(),d=await O(`gh`,[`api`,`repos/${e}/git/ref/heads/${u}`,`--jq`,`.object.sha`]);if(d.code!==0)throw E(`tengu_setup_github_actions_failed`,{reason:`failed_to_get_branch_sha`,exit_code:d.code,...s}),Error(`Failed to get branch SHA: ${d.stderr}`);let f=d.stdout.trim(),p=null;if(!i){r(),p=`add-claude-github-actions-${Date.now()}`;let t=await O(`gh`,[`api`,`--method`,`POST`,`repos/${e}/git/refs`,`-f`,`ref=refs/heads/${p}`,`-f`,`sha=${f}`]);if(t.code!==0)throw E(`tengu_setup_github_actions_failed`,{reason:`failed_to_create_branch`,exit_code:t.code,...s}),Error(`Failed to create branch: ${t.stderr}`);r();let i=[];a.includes(`claude`)&&i.push({path:`.github/workflows/claude.yml`,content:Ee,message:`Claude PR Assistant workflow`}),a.includes(`claude-review`)&&i.push({path:`.github/workflows/claude-code-review.yml`,content:Oe,message:`Claude Code Review workflow`});for(let t of i)await Ze(e,p,t.path,t.content,n,t.message,s)}if(r(),t){let r=await O(`gh`,[`secret`,`set`,n,`--body`,t,`--repo`,e]);if(r.code!==0)throw E(`tengu_setup_github_actions_failed`,{reason:`failed_to_set_api_key_secret`,exit_code:r.code,...s}),Error(`Failed to set API key secret: ${r.stderr||`Unknown error`}
141
-
142
- Need help? Common issues:
143
- · Permission denied → Run: gh auth refresh -h github.com -s repo
144
- · Not authorized → Ensure you have admin access to the repository
145
- · For manual setup → Visit: https://github.com/anthropics/claude-code-action`)}!i&&p&&(r(),await _e(`https://github.com/${e}/compare/${u}...${p}?quick_pull=1&title=${encodeURIComponent(Te)}&body=${encodeURIComponent(De)}`)),E(`tengu_setup_github_actions_completed`,{skip_workflow:i,has_api_key:!!t,auth_type:o,using_default_secret_name:n===`ANTHROPIC_API_KEY`,selected_claude_workflow:a.includes(`claude`),selected_claude_review_workflow:a.includes(`claude-review`),...s}),x(e=>({...e,githubActionSetupCount:(e.githubActionSetupCount??0)+1}))}catch(e){throw(!e||!(e instanceof Error)||!e.message.includes(`Failed to`))&&E(`tengu_setup_github_actions_failed`,{reason:`unexpected_error`,...s}),e instanceof Error&&D(e),e}}var $e=e((()=>{T(),y(),L(),ve(),se(),oe()}));function et({warnings:e,onContinue:t}){return h(`confirm:yes`,t,{context:`Confirmation`}),(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsxs)(_,{flexDirection:`column`,borderStyle:`round`,paddingX:1,children:[(0,Z.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(c,{bold:!0,children:[r.warning,` Setup Warnings`]}),(0,Z.jsx)(c,{dimColor:!0,children:`We found some potential issues, but you can continue anyway`})]}),e.map((e,t)=>(0,Z.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsx)(c,{color:`warning`,bold:!0,children:e.title}),(0,Z.jsx)(c,{children:e.message}),e.instructions.length>0&&(0,Z.jsx)(_,{flexDirection:`column`,marginLeft:2,marginTop:1,children:e.instructions.map((e,t)=>(0,Z.jsxs)(c,{dimColor:!0,children:[`• `,e]},t))})]},t)),(0,Z.jsx)(_,{marginTop:1,children:(0,Z.jsx)(c,{bold:!0,color:`permission`,children:`Press Enter to continue anyway, or Ctrl+C to exit and fix issues`})}),(0,Z.jsx)(_,{marginTop:1,children:(0,Z.jsxs)(c,{dimColor:!0,children:[`You can also try the manual setup steps if needed:`,` `,(0,Z.jsx)(c,{color:`claude`,children:I})]})})]})})}var Z,tt=e((()=>{n(),L(),p(),N(),Z=v()}));function nt(e){let[t]=(0,Q.useState)(()=>te()),[n,r]=(0,Q.useState)({...it,useExistingKey:!!t,selectedApiKeyOption:t?`existing`:S()?`oauth`:`new`});be(),Q.useEffect(()=>{E(`tengu_install_github_app_started`,{})},[]);let i=(0,Q.useCallback)(async()=>{let e=[];(await ae(`gh --version`,{shell:!0,reject:!1})).exitCode!==0&&e.push({title:`GitHub CLI not found`,message:`GitHub CLI (gh) does not appear to be installed or accessible.`,instructions:[`Install GitHub CLI from https://cli.github.com/`,`macOS: brew install gh`,`Windows: winget install --id GitHub.cli`,`Linux: See installation instructions at https://github.com/cli/cli#installation`]});let t=await ae(`gh auth status -a`,{shell:!0,reject:!1});if(t.exitCode!==0)e.push({title:`GitHub CLI not authenticated`,message:`GitHub CLI does not appear to be authenticated.`,instructions:[`Run: gh auth login`,`Follow the prompts to authenticate with GitHub`,`Or set up authentication using environment variables or other methods`]});else{let e=t.stdout.match(/Token scopes:.*$/m);if(e){let t=e[0],n=[];if(t.includes(`repo`)||n.push(`repo`),t.includes(`workflow`)||n.push(`workflow`),n.length>0){r(e=>({...e,step:`error`,error:`GitHub CLI is missing required permissions: ${n.join(`, `)}.`,errorReason:`Missing required scopes`,errorInstructions:[`Your GitHub CLI authentication is missing the "${n.join(`" and "`)}" ${ee(n.length,`scope`)} needed to manage GitHub Actions and secrets.`,``,`To fix this, run:`,` gh auth refresh -h github.com -s repo,workflow`,``,`This will add the necessary permissions to manage workflows and secrets.`]}));return}}}let n=await ne()??``;E(`tengu_install_github_app_step_completed`,{step:`check-gh`}),r(t=>({...t,warnings:e,currentRepo:n,selectedRepoName:n,useCurrentRepo:!!n,step:e.length>0?`warnings`:`choose-repo`}))},[]);Q.useEffect(()=>{n.step===`check-gh`&&i()},[n.step,i]);let a=(0,Q.useCallback)(async(e,t)=>{r(e=>({...e,step:`creating`,currentWorkflowInstallStep:0}));try{await Qe(n.selectedRepoName,e,t,()=>{r(e=>({...e,currentWorkflowInstallStep:e.currentWorkflowInstallStep+1}))},n.workflowAction===`skip`,n.selectedWorkflows,n.authType,{useCurrentRepo:n.useCurrentRepo,workflowExists:n.workflowExists,secretExists:n.secretExists}),E(`tengu_install_github_app_step_completed`,{step:`creating`}),r(e=>({...e,step:`success`}))}catch(e){let t=e instanceof Error?e.message:`Failed to set up GitHub Actions`;t.includes(`workflow file already exists`)?(E(`tengu_install_github_app_error`,{reason:`workflow_file_exists`}),r(e=>({...e,step:`error`,error:`A Claude workflow file already exists in this repository.`,errorReason:`Workflow file conflict`,errorInstructions:[`The file .github/workflows/claude.yml already exists`,`You can either:`,` 1. Delete the existing file and run this command again`,` 2. Update the existing file manually using the template from:`,` ${I}`]}))):(E(`tengu_install_github_app_error`,{reason:`setup_github_actions_failed`}),r(e=>({...e,step:`error`,error:t,errorReason:`GitHub Actions setup failed`,errorInstructions:[]})))}},[n.selectedRepoName,n.workflowAction,n.selectedWorkflows,n.useCurrentRepo,n.workflowExists,n.secretExists,n.authType]);async function o(){await _e(`https://github.com/apps/claude`)}async function s(e){try{let t=await O(`gh`,[`api`,`repos/${e}`,`--jq`,`.permissions.admin`]);return t.code===0?{hasAccess:t.stdout.trim()===`true`}:t.stderr.includes(`404`)||t.stderr.includes(`Not Found`)?{hasAccess:!1,error:`repository_not_found`}:{hasAccess:!1}}catch{return{hasAccess:!1}}}async function c(e){return(await O(`gh`,[`api`,`repos/${e}/contents/.github/workflows/claude.yml`,`--jq`,`.sha`])).code===0}async function l(){let e=await O(`gh`,[`secret`,`list`,`--app`,`actions`,`--repo`,n.selectedRepoName]);e.code===0&&e.stdout.split(`
146
- `).some(e=>/^ANTHROPIC_API_KEY\s+/.test(e))?r(e=>({...e,secretExists:!0,step:`check-existing-secret`})):t?(r(e=>({...e,apiKeyOrOAuthToken:t,useExistingKey:!0})),await a(t,n.secretName)):r(e=>({...e,step:`api-key`}))}let u=async()=>{if(n.step===`warnings`)E(`tengu_install_github_app_step_completed`,{step:`warnings`}),r(e=>({...e,step:`install-app`})),setTimeout(o,0);else if(n.step===`choose-repo`){let e=n.useCurrentRepo?n.currentRepo:n.selectedRepoName;if(!e.trim())return;let t=[];if(e.includes(`github.com`)){let n=e.match(/github\.com[:/]([^/]+\/[^/]+)(\.git)?$/);n?e=n[1]?.replace(/\.git$/,``)||``:t.push({title:`Invalid GitHub URL format`,message:`The repository URL format appears to be invalid.`,instructions:[`Use format: owner/repo or https://github.com/owner/repo`,`Example: anthropics/claude-cli`]})}e.includes(`/`)||t.push({title:`Repository format warning`,message:`Repository should be in format "owner/repo"`,instructions:[`Use format: owner/repo`,`Example: anthropics/claude-cli`]});let i=await s(e);i.error===`repository_not_found`?t.push({title:`Repository not found`,message:`Repository ${e} was not found or you don't have access.`,instructions:[`Check that the repository name is correct: ${e}`,`Ensure you have access to this repository`,`For private repositories, make sure your GitHub token has the "repo" scope`,`You can add the repo scope with: gh auth refresh -h github.com -s repo,workflow`]}):i.hasAccess||t.push({title:`Admin permissions required`,message:`You might need admin permissions on ${e} to set up GitHub Actions.`,instructions:[`Repository admins can install GitHub Apps and set secrets`,`Ask a repository admin to run this command if setup fails`,`Alternatively, you can use the manual setup instructions`]});let a=await c(e);if(t.length>0){let i=[...n.warnings,...t];r(t=>({...t,selectedRepoName:e,workflowExists:a,warnings:i,step:`warnings`}))}else E(`tengu_install_github_app_step_completed`,{step:`choose-repo`}),r(t=>({...t,selectedRepoName:e,workflowExists:a,step:`install-app`})),setTimeout(o,0)}else if(n.step===`install-app`)E(`tengu_install_github_app_step_completed`,{step:`install-app`}),n.workflowExists?r(e=>({...e,step:`check-existing-workflow`})):r(e=>({...e,step:`select-workflows`}));else if(n.step===`check-existing-workflow`)return;else if(n.step===`select-workflows`)return;else if(n.step===`check-existing-secret`)E(`tengu_install_github_app_step_completed`,{step:`check-existing-secret`}),n.useExistingSecret?await a(null,n.secretName):await a(n.apiKeyOrOAuthToken,n.secretName);else if(n.step===`api-key`){if(n.selectedApiKeyOption===`oauth`)return;let e=n.selectedApiKeyOption===`existing`?t:n.apiKeyOrOAuthToken;if(!e){E(`tengu_install_github_app_error`,{reason:`api_key_missing`}),r(e=>({...e,step:`error`,error:`API key is required`}));return}r(t=>({...t,apiKeyOrOAuthToken:e,useExistingKey:n.selectedApiKeyOption===`existing`}));let i=await O(`gh`,[`secret`,`list`,`--app`,`actions`,`--repo`,n.selectedRepoName]);i.code===0&&i.stdout.split(`
147
- `).some(e=>/^ANTHROPIC_API_KEY\s+/.test(e))?(E(`tengu_install_github_app_step_completed`,{step:`api-key`}),r(e=>({...e,secretExists:!0,step:`check-existing-secret`}))):(E(`tengu_install_github_app_step_completed`,{step:`api-key`}),await a(e,n.secretName))}},d=e=>{r(t=>({...t,selectedRepoName:e}))},f=e=>{r(t=>({...t,apiKeyOrOAuthToken:e}))},p=e=>{r(t=>({...t,selectedApiKeyOption:e}))},m=(0,Q.useCallback)(()=>{E(`tengu_install_github_app_step_completed`,{step:`api-key`}),r(e=>({...e,step:`oauth-flow`}))},[]),h=(0,Q.useCallback)(e=>{E(`tengu_install_github_app_step_completed`,{step:`oauth-flow`}),r(t=>({...t,apiKeyOrOAuthToken:e,useExistingKey:!1,secretName:`CLAUDE_CODE_OAUTH_TOKEN`,authType:`oauth_token`})),a(e,`CLAUDE_CODE_OAUTH_TOKEN`)},[a]),g=(0,Q.useCallback)(()=>{r(e=>({...e,step:`api-key`}))},[]),v=e=>{e&&!/^[a-zA-Z0-9_]+$/.test(e)||r(t=>({...t,secretName:e}))},y=e=>{r(t=>({...t,useCurrentRepo:e,selectedRepoName:e?t.currentRepo:``}))},b=e=>{r(t=>({...t,useExistingKey:e}))},x=e=>{r(t=>({...t,useExistingSecret:e,secretName:e?`ANTHROPIC_API_KEY`:``}))},C=async n=>{if(n===`exit`){e.onDone(`Installation cancelled by user`);return}E(`tengu_install_github_app_step_completed`,{step:`check-existing-workflow`}),r(e=>({...e,workflowAction:n})),(n===`skip`||n===`update`)&&(t?await l():r(e=>({...e,step:`api-key`})))};function w(t){t.preventDefault(),n.step===`success`&&E(`tengu_install_github_app_completed`,{}),e.onDone(n.step===`success`?`GitHub Actions setup complete!`:n.error?`Couldn't install GitHub App: ${n.error}\nFor manual setup instructions, see: ${I}`:`GitHub App installation failed\nFor manual setup instructions, see: ${I}`)}switch(n.step){case`check-gh`:return(0,$.jsx)(Ne,{});case`warnings`:return(0,$.jsx)(et,{warnings:n.warnings,onContinue:u});case`choose-repo`:return(0,$.jsx)(Ie,{currentRepo:n.currentRepo,useCurrentRepo:n.useCurrentRepo,repoUrl:n.selectedRepoName,onRepoUrlChange:d,onToggleUseCurrentRepo:y,onSubmit:u});case`install-app`:return(0,$.jsx)(We,{repoUrl:n.selectedRepoName,onSubmit:u});case`check-existing-workflow`:return(0,$.jsx)(He,{repoName:n.selectedRepoName,onSelectAction:C});case`check-existing-secret`:return(0,$.jsx)(je,{useExistingSecret:n.useExistingSecret,secretName:n.secretName,onToggleUseExistingSecret:x,onSecretNameChange:v,onSubmit:u});case`api-key`:return(0,$.jsx)(ke,{existingApiKey:t,useExistingKey:n.useExistingKey,apiKeyOrOAuthToken:n.apiKeyOrOAuthToken,onApiKeyChange:f,onToggleUseExistingKey:b,onSubmit:u,onCreateOAuthToken:S()?m:void 0,selectedOption:n.selectedApiKeyOption,onSelectOption:p});case`creating`:return(0,$.jsx)(Re,{currentWorkflowInstallStep:n.currentWorkflowInstallStep,secretExists:n.secretExists,useExistingSecret:n.useExistingSecret,secretName:n.secretName,skipWorkflow:n.workflowAction===`skip`,selectedWorkflows:n.selectedWorkflows});case`success`:return(0,$.jsx)(_,{tabIndex:0,autoFocus:!0,onKeyDown:w,children:(0,$.jsx)(Ye,{secretExists:n.secretExists,useExistingSecret:n.useExistingSecret,secretName:n.secretName,skipWorkflow:n.workflowAction===`skip`})});case`error`:return(0,$.jsx)(_,{tabIndex:0,autoFocus:!0,onKeyDown:w,children:(0,$.jsx)(Be,{error:n.error,errorReason:n.errorReason,errorInstructions:n.errorInstructions})});case`select-workflows`:return(0,$.jsx)(Se,{defaultSelections:n.selectedWorkflows,onSubmit:e=>{E(`tengu_install_github_app_step_completed`,{step:`select-workflows`}),r(t=>({...t,selectedWorkflows:e})),t?l():r(e=>({...e,step:`api-key`}))}});case`oauth-flow`:return(0,$.jsx)(Ke,{onSuccess:h,onCancel:g})}}async function rt(e){return(0,$.jsx)(nt,{onDone:e})}var Q,$,it;e((()=>{ie(),Q=t(o(),1),T(),we(),L(),ye(),p(),w(),ve(),se(),re(),C(),Ae(),Me(),Fe(),Le(),ze(),Ve(),Ue(),Ge(),Je(),Xe(),$e(),tt(),$=v(),it={step:`check-gh`,selectedRepoName:``,currentRepo:``,useCurrentRepo:!1,apiKeyOrOAuthToken:``,useExistingKey:!0,currentWorkflowInstallStep:0,warnings:[],secretExists:!1,secretName:`ANTHROPIC_API_KEY`,useExistingSecret:!0,workflowExists:!1,selectedWorkflows:[`claude`,`claude-review`],selectedApiKeyOption:`new`,authType:`api_key`}}))();export{rt as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Pc as n}from"./paths-BZbIj1Z1.js";import{n as r,r as i}from"./analytics-DqMQntaB.js";import{n as a,t as o}from"./browser-fLRXxIsQ.js";async function s(){return i(`tengu_install_slack_app_clicked`,{}),n(e=>({...e,slackAppInstallCount:(e.slackAppInstallCount??0)+1})),await a(c)?{type:`text`,value:`Opening Slack app installation page in browser…`}:{type:`text`,value:`Couldn't open browser. Visit: ${c}`}}var c;e((()=>{r(),o(),t(),c=`https://slack.com/marketplace/A08SF47R6P4-claude`}))();export{s as call};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{Mt as t,Rn as n,b as r,o as i,t as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{Ka as c,lo as l,oo as u}from"./paths-BZbIj1Z1.js";import{L as d,V as f,d as p,s as m}from"./debug-UI3T040K.js";import{n as h,r as g}from"./analytics-DqMQntaB.js";import{a as _,n as v}from"./env-chR0gV31.js";import{Hb as y,Kb as b,Ub as x,Wb as S,qb as C}from"./loadAgentsDir-DaApSWNv.js";import{join as w}from"node:path";import{homedir as T}from"node:os";var E=e(n(),1);h(),a(),m(),_(),f(),y(),u();var D=s();function O(){let e=v.platform===`win32`,t=T();return e?w(t,`.local`,`bin`,`claude.exe`).replace(/\//g,`\\`):`~/.local/bin/claude`}function k({messages:e}){return e.length===0?null:(0,D.jsxs)(o,{flexDirection:`column`,gap:0,marginBottom:1,children:[(0,D.jsx)(o,{children:(0,D.jsxs)(r,{color:`warning`,children:[(0,D.jsx)(i,{status:`warning`,withSpace:!0}),`Setup notes:`]})}),e.map((e,t)=>(0,D.jsx)(o,{marginLeft:2,children:(0,D.jsxs)(r,{dimColor:!0,children:[`• `,e]})},t))]})}function A({onDone:e,force:t,target:n}){let[a,s]=(0,E.useState)({type:`checking`});return(0,E.useEffect)(()=>{async function e(){try{p(`Install: Starting installation process (force=${t}, target=${n})`);let e=n||c()?.autoUpdatesChannel||`latest`;s({type:`installing`,version:e}),p(`Install: Calling installLatest(channelOrVersion=${e}, forceReinstall=${t})`);let r=await C(e,t);if(p(`Install: installLatest returned version=${r.latestVersion}, wasUpdated=${r.wasUpdated}, lockFailed=${r.lockFailed}`),r.lockFailed)throw Error(`Could not install - another process is currently installing Claude. Please try again in a moment.`);r.latestVersion||p(`Install: Failed to retrieve version information during install`,{level:`error`}),r.wasUpdated||p(`Install: Already up to date`),s({type:`setting-up`});let i=await x(!0);p(`Install: Setup launcher completed with ${i.length} messages`),i.length>0&&i.forEach(e=>p(`Install: Setup message: ${e.message}`)),p(`Install: Cleaning up npm installations after successful install`);let{removed:a,errors:o,warnings:u}=await S();a>0&&p(`Cleaned up ${a} npm installation(s)`),o.length>0&&p(`Cleanup errors: ${o.join(`, `)}`);let d=await b();d.length>0&&p(`Shell alias cleanup: ${d.map(e=>e.message).join(`; `)}`),g(`tengu_claude_install_command`,{has_version:+!!r.latestVersion,forced:+!!t}),(n===`latest`||n===`stable`)&&(l(`userSettings`,{autoUpdatesChannel:n}),p(`Install: Saved autoUpdatesChannel=${n} to user settings`));let f=[...u,...d.map(e=>e.message)];i.length>0?(s({type:`set-up`,messages:i.map(e=>e.message)}),setTimeout(s,2e3,{type:`success`,version:r.latestVersion||`current`,setupMessages:[...i.map(e=>e.message),...f]})):(p(`Install: Shell PATH already configured`),s({type:`success`,version:r.latestVersion||`current`,setupMessages:f.length>0?f:void 0}))}catch(e){p(`Install command failed: ${e}`,{level:`error`}),s({type:`error`,message:d(e)})}}e()},[t,n]),(0,E.useEffect)(()=>{a.type===`success`?setTimeout(e,2e3,`Claude Code installation completed successfully`,{display:`system`}):a.type===`error`&&setTimeout(e,3e3,`Claude Code installation failed`,{display:`system`})},[a,e]),(0,D.jsxs)(o,{flexDirection:`column`,marginTop:1,children:[a.type===`checking`&&(0,D.jsx)(r,{color:`claude`,children:`Checking installation status...`}),a.type===`cleaning-npm`&&(0,D.jsx)(r,{color:`warning`,children:`Cleaning up old npm installations...`}),a.type===`installing`&&(0,D.jsxs)(r,{color:`claude`,children:[`Installing Claude Code native build `,a.version,`...`]}),a.type===`setting-up`&&(0,D.jsx)(r,{color:`claude`,children:`Setting up launcher and shell integration...`}),a.type===`set-up`&&(0,D.jsx)(k,{messages:a.messages}),a.type===`success`&&(0,D.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(o,{children:[(0,D.jsx)(i,{status:`success`,withSpace:!0}),(0,D.jsx)(r,{color:`success`,bold:!0,children:`Claude Code successfully installed!`})]}),(0,D.jsxs)(o,{marginLeft:2,flexDirection:`column`,gap:1,children:[a.version!==`current`&&(0,D.jsxs)(o,{children:[(0,D.jsx)(r,{dimColor:!0,children:`Version: `}),(0,D.jsx)(r,{color:`claude`,children:a.version})]}),(0,D.jsxs)(o,{children:[(0,D.jsx)(r,{dimColor:!0,children:`Location: `}),(0,D.jsx)(r,{color:`text`,children:O()})]})]}),(0,D.jsx)(o,{marginLeft:2,flexDirection:`column`,gap:1,children:(0,D.jsxs)(o,{marginTop:1,children:[(0,D.jsx)(r,{dimColor:!0,children:`Next: Run `}),(0,D.jsx)(r,{color:`claude`,bold:!0,children:`claude --help`}),(0,D.jsx)(r,{dimColor:!0,children:` to get started`})]})}),a.setupMessages&&(0,D.jsx)(k,{messages:a.setupMessages})]}),a.type===`error`&&(0,D.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(o,{children:[(0,D.jsx)(i,{status:`error`,withSpace:!0}),(0,D.jsx)(r,{color:`error`,children:`Installation failed`})]}),(0,D.jsx)(r,{color:`error`,children:a.message}),(0,D.jsx)(o,{marginTop:1,children:(0,D.jsx)(r,{dimColor:!0,children:`Try running with --force to override checks`})})]})]})}var j={type:`local-jsx`,name:`install`,description:`Install Claude Code native build`,argumentHint:`[options]`,async call(e,n,r){let i=r.includes(`--force`),a=r.filter(e=>!e.startsWith(`--`))[0],{unmount:o}=await t((0,D.jsx)(A,{onDone:(t,n)=>{o(),e(t,n)},force:i,target:a}))}};export{j as install};
@@ -1,12 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./defineProperty-80gRi2ZW.js";import{n as o,o as s,r as c,x as ee}from"./esm-CJlBxjtx.js";import{Q as te,Z as ne,_ as l,at as u,c as d,i as re,j as f,n as ie,o as p,r as ae,t as m}from"./esm-DcdOXSzi.js";import{n as h,t as oe}from"./esm-BGQPWnJy.js";import{a as g,i as se,l as ce,n as le,r as ue}from"./esm-QgL6y---.js";import{n as de,t as fe}from"./axios-DhfaybwJ.js";import{$ as _,$n as v,Dr as pe,Gt as y,Pn as b,U as me,cn as x,ir as S,nt as he}from"./state-sIHsFpDu.js";import{Ac as C,At as w,Pc as ge,Qt as _e,Sc as T,Tt as ve,an as ye,bt as E,dn as D,dt as be,ft as O,gc as xe,jt as k,mt as A,no as Se,on as j,oo as Ce,pt as we,sn as Te,tn as M,wt as N}from"./paths-BZbIj1Z1.js";import{E as P,K as Ee,L as F,V as I,X as L,Y as De,a as Oe,d as R,s as z,w as ke}from"./debug-UI3T040K.js";import{d as Ae,f as je,o as B,s as V}from"./log-CzsijfHZ.js";import{a as Me,i as Ne,o as Pe}from"./platform-CuyedWpe.js";import{r as Fe,t as Ie}from"./memoize-DxwLawI2.js";import{a as Le,n as Re}from"./startupProfiler-DnXZaX4A.js";import{b as H,d as ze,g as Be,m as Ve,s as He,u as Ue,v as U,x as We,y as Ge}from"./proxy-CfZp-wce.js";import{_ as Ke,b as qe,c as Je,l as Ye,r as W,v as Xe,y as Ze}from"./sessionTracing-gKle2qzF.js";import{a as G,i as K,r as Qe,t as $e}from"./esm-C-1qL9Mn.js";async function et(){let e=E();if(e.error)throw Error(`Auth error: ${e.error}`);let t={"Content-Type":`application/json`,"User-Agent":w(),...e.headers};return(await de.get(`https://api.anthropic.com/api/claude_code/organizations/metrics_enabled`,{headers:t,timeout:5e3})).data}async function tt(){if(je())return{enabled:!1,hasError:!1};try{let e=await ve(et,{also403Revoked:!0});return R(`Metrics opt-out API response: enabled=${e.metrics_logging_enabled}`),{enabled:e.metrics_logging_enabled,hasError:!1}}catch(e){return R(`Failed to check metrics opt-out status: ${F(e)}`),V(e),{enabled:!1,hasError:!0}}}async function nt(){let e=await at();if(e.hasError)return e;let t=T().metricsStatusCache;return t!==void 0&&t.enabled===e.enabled&&Date.now()-t.timestamp<q||ge(t=>({...t,metricsStatusCache:{enabled:e.enabled,timestamp:Date.now()}})),e}async function rt(){if(D()&&!ye())return{enabled:!1,hasError:!1};let e=T().metricsStatusCache;return e?(Date.now()-e.timestamp>q&&nt().catch(V),{enabled:e.enabled,hasError:!1}):nt()}var it,q,at,ot=e((()=>{fe(),j(),C(),z(),I(),N(),B(),Ie(),Ae(),k(),it=3600*1e3,q=1440*60*1e3,at=Fe(tt,it)})),st,ct=e((()=>{d(),le(),fe(),ot(),x(),j(),C(),z(),I(),N(),B(),ke(),k(),i(),st=class{constructor(e={}){a(this,`endpoint`,void 0),a(this,`timeout`,void 0),a(this,`pendingExports`,[]),a(this,`isShutdown`,!1),process.env.USER_TYPE===`ant`&&process.env.ANT_CLAUDE_CODE_METRICS_ENDPOINT?this.endpoint=process.env.ANT_CLAUDE_CODE_METRICS_ENDPOINT+`/api/claude_code/metrics`:this.endpoint=`https://api.anthropic.com/api/claude_code/metrics`,this.timeout=e.timeout||5e3}async export(e,t){if(this.isShutdown){t({code:l.FAILED,error:Error(`Exporter has been shutdown`)});return}let n=this.doExport(e,t);this.pendingExports.push(n),n.finally(()=>{let e=this.pendingExports.indexOf(n);e>-1&&this.pendingExports.splice(e,1)})}async doExport(e,t){try{if(!(xe()||me())){R(`BigQuery metrics export: trust not established, skipping`),t({code:l.SUCCESS});return}if(!(await rt()).enabled){R(`Metrics export disabled by organization setting`),t({code:l.SUCCESS});return}let n=this.transformMetricsForInternal(e),r=E();if(r.error){R(`Metrics export failed: ${r.error}`),t({code:l.FAILED,error:Error(r.error)});return}let i={"Content-Type":`application/json`,"User-Agent":w(),...r.headers},a=await de.post(this.endpoint,n,{timeout:this.timeout,headers:i});R(`BigQuery metrics exported successfully`),R(`BigQuery API Response: ${P(a.data,null,2)}`),t({code:l.SUCCESS})}catch(e){R(`BigQuery metrics export failed: ${F(e)}`),V(e),t({code:l.FAILED,error:Ee(e)})}}transformMetricsForInternal(e){let t=e.resource.attributes,n={"service.name":t[`service.name`]||`claude-code`,"service.version":t[`service.version`]||`unknown`,"os.type":t[`os.type`]||`unknown`,"os.version":t[`os.version`]||`unknown`,"host.arch":t[`host.arch`]||`unknown`,"aggregation.temporality":this.selectAggregationTemporality()===ce.DELTA?`delta`:`cumulative`};if(t[`wsl.version`]&&(n[`wsl.version`]=t[`wsl.version`]),D()){n[`user.customer_type`]=`claude_ai`;let e=M();e&&(n[`user.subscription_type`]=e)}else n[`user.customer_type`]=`api`;return{resource_attributes:n,metrics:e.scopeMetrics.flatMap(e=>e.metrics.map(e=>({name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit,data_points:this.extractDataPoints(e)})))}}extractDataPoints(e){return(e.dataPoints||[]).filter(e=>typeof e.value==`number`).map(e=>({attributes:this.convertAttributes(e.attributes),value:e.value,timestamp:this.hrTimeToISOString(e.endTime||e.startTime||[Date.now()/1e3,0])}))}async shutdown(){this.isShutdown=!0,await this.forceFlush(),R(`BigQuery metrics exporter shutdown complete`)}async forceFlush(){await Promise.all(this.pendingExports),R(`BigQuery metrics exporter flush complete`)}convertAttributes(e){let t={};if(e)for(let[n,r]of Object.entries(e))r!=null&&(t[n]=String(r));return t}hrTimeToISOString(e){let[t,n]=e;return new Date(t*1e3+n/1e6).toISOString()}selectAggregationTemporality(){return ce.DELTA}}})),lt,ut=e((()=>{z(),B(),lt=class{error(e,...t){V(Error(e)),R(`[3P telemetry] OTEL diag error: ${e}`,{level:`error`})}warn(e,...t){V(Error(e)),R(`[3P telemetry] OTEL diag warn: ${e}`,{level:`warn`})}info(e,...t){}debug(e,...t){}verbose(e,...t){}}}));function J(e,t){return new Promise((n,r)=>{setTimeout((e,t)=>e(new $(t)),e,r,t).unref()})}function dt(){process.env.USER_TYPE===`ant`&&(process.env.ANT_OTEL_METRICS_EXPORTER&&(process.env.OTEL_METRICS_EXPORTER=process.env.ANT_OTEL_METRICS_EXPORTER),process.env.ANT_OTEL_LOGS_EXPORTER&&(process.env.OTEL_LOGS_EXPORTER=process.env.ANT_OTEL_LOGS_EXPORTER),process.env.ANT_OTEL_TRACES_EXPORTER&&(process.env.OTEL_TRACES_EXPORTER=process.env.ANT_OTEL_TRACES_EXPORTER),process.env.ANT_OTEL_EXPORTER_OTLP_PROTOCOL&&(process.env.OTEL_EXPORTER_OTLP_PROTOCOL=process.env.ANT_OTEL_EXPORTER_OTLP_PROTOCOL),process.env.ANT_OTEL_EXPORTER_OTLP_ENDPOINT&&(process.env.OTEL_EXPORTER_OTLP_ENDPOINT=process.env.ANT_OTEL_EXPORTER_OTLP_ENDPOINT),process.env.ANT_OTEL_EXPORTER_OTLP_HEADERS&&(process.env.OTEL_EXPORTER_OTLP_HEADERS=process.env.ANT_OTEL_EXPORTER_OTLP_HEADERS)),process.env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE||(process.env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=`delta`)}function Y(e){return(e||``).trim().split(`,`).filter(Boolean).map(e=>e.trim()).filter(e=>e!==`none`)}async function ft(){let e=Y(process.env.OTEL_METRICS_EXPORTER),n=parseInt(process.env.OTEL_METRIC_EXPORT_INTERVAL||St.toString(),10),r=[];for(let n of e)if(n===`console`){let e=new se,t=e.export.bind(e);e.export=(e,n)=>(e.resource&&e.resource.attributes&&(R(`
2
- === Resource Attributes ===`),R(P(e.resource.attributes)),R(`===========================
3
- `)),t(e,n)),r.push(e)}else if(n===`otlp`){let e=process.env.OTEL_EXPORTER_OTLP_METRICS_PROTOCOL?.trim()||process.env.OTEL_EXPORTER_OTLP_PROTOCOL?.trim(),n=X();switch(e){case`grpc`:{let{OTLPMetricExporter:e}=await import(`./src-BRC_BuUP.js`).then(e=>t(e.default,1));r.push(new e);break}case`http/json`:{let{OTLPMetricExporter:e}=await import(`./esm-B2HIF0XY.js`);r.push(new e(n));break}case`http/protobuf`:{let{OTLPMetricExporter:e}=await import(`./esm-DxPW7qPs.js`);r.push(new e(n));break}default:throw Error(`Unknown protocol set in OTEL_EXPORTER_OTLP_METRICS_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL env var: ${e}`)}}else if(n===`prometheus`){let{PrometheusExporter:e}=await import(`./src-DsMd9Q9e.js`).then(e=>t(e.default,1));r.push(new e)}else throw Error(`Unknown exporter type set in OTEL_EXPORTER_OTLP_METRICS_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL env var: ${n}`);return r.map(e=>`export`in e?new g({exporter:e,exportIntervalMillis:n}):e)}async function pt(){let e=Y(process.env.OTEL_LOGS_EXPORTER),n=process.env.OTEL_EXPORTER_OTLP_LOGS_PROTOCOL?.trim()||process.env.OTEL_EXPORTER_OTLP_PROTOCOL?.trim(),r=process.env.OTEL_EXPORTER_OTLP_ENDPOINT;R(`[3P telemetry] getOtlpLogExporters: types=${P(e)}, protocol=${n}, endpoint=${r}`);let i=[];for(let r of e)if(r===`console`)i.push(new we);else if(r===`otlp`){let e=X();switch(n){case`grpc`:{let{OTLPLogExporter:e}=await import(`./src-CYLfL70h.js`).then(e=>t(e.default,1));i.push(new e);break}case`http/json`:{let{OTLPLogExporter:t}=await import(`./esm--xjzB1hI.js`);i.push(new t(e));break}case`http/protobuf`:{let{OTLPLogExporter:t}=await import(`./esm-v0kPjgVS.js`);i.push(new t(e));break}default:throw Error(`Unknown protocol set in OTEL_EXPORTER_OTLP_LOGS_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL env var: ${n}`)}}else throw Error(`Unknown exporter type set in OTEL_LOGS_EXPORTER env var: ${r}`);return i}async function mt(){let e=Y(process.env.OTEL_TRACES_EXPORTER),n=[];for(let r of e)if(r===`console`)n.push(new Qe);else if(r===`otlp`){let e=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL?.trim()||process.env.OTEL_EXPORTER_OTLP_PROTOCOL?.trim(),r=X();switch(e){case`grpc`:{let{OTLPTraceExporter:e}=await import(`./src-DJXCzwyJ.js`).then(e=>t(e.default,1));n.push(new e);break}case`http/json`:{let{OTLPTraceExporter:e}=await import(`./esm-C97WL9nC.js`);n.push(new e(r));break}case`http/protobuf`:{let{OTLPTraceExporter:e}=await import(`./esm-FBUWr3vI.js`);n.push(new e(r));break}default:throw Error(`Unknown protocol set in OTEL_EXPORTER_OTLP_TRACES_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL env var: ${e}`)}}else throw Error(`Unknown exporter type set in OTEL_TRACES_EXPORTER env var: ${r}`);return n}function ht(){return r(process.env.CLAUDE_CODE_ENABLE_TELEMETRY)}function gt(){return new g({exporter:new st,exportIntervalMillis:300*1e3})}function _t(){let e=M(),t=D()&&(e===`enterprise`||e===`team`);return Te()||t}async function vt(e){let t=process.env.BETA_TRACING_ENDPOINT;if(!t)return;let[{OTLPTraceExporter:n},{OTLPLogExporter:r}]=await Promise.all([import(`./esm-C97WL9nC.js`),import(`./esm--xjzB1hI.js`)]),i={url:`${t}/v1/traces`},a={url:`${t}/v1/logs`},o=new K({resource:e,spanProcessors:[new G(new n(i),{scheduledDelayMillis:Q})]});c.setGlobalTracerProvider(o),pe(o);let s=new A({resource:e,processors:[new O(new r(a),{scheduledDelayMillis:Z})]});h.setGlobalLoggerProvider(s),v(s),b(h.getLogger(`com.anthropic.claude_code.events`,`2.6.12`)),process.on(`beforeExit`,async()=>{await s?.forceFlush(),await o?.forceFlush()}),process.on(`exit`,()=>{s?.forceFlush(),o?.forceFlush()})}async function yt(){if(Le(`telemetry_init_start`),dt(),Oe())for(let e of[`OTEL_METRICS_EXPORTER`,`OTEL_LOGS_EXPORTER`,`OTEL_TRACES_EXPORTER`]){let t=process.env[e];t?.includes(`console`)&&(process.env[e]=t.split(`,`).map(e=>e.trim()).filter(e=>e!==`console`).join(`,`))}s.setLogger(new lt,ee.ERROR),qe();let e=[],t=ht();R(`[3P telemetry] isTelemetryEnabled=${t} (CLAUDE_CODE_ENABLE_TELEMETRY=${process.env.CLAUDE_CODE_ENABLE_TELEMETRY})`),t&&e.push(...await ft()),_t()&&e.push(gt());let n=Ne(),r={[ne]:`claude-code`,[te]:`2.6.12`};if(n===`wsl`){let e=Me();e&&(r[`wsl.version`]=e)}let i=p(r),a=p(ie.detect().attributes||{}),o=ae.detect(),l=p(o.attributes?.[`host.arch`]?{[u]:o.attributes[u]}:{}),d=p(re.detect().attributes||{}),f=i.merge(a).merge(l).merge(d);if(Xe()){vt(f).catch(e=>R(`Beta tracing init failed: ${e}`,{level:`error`}));let t=new ue({resource:f,views:[],readers:e});return S(t),L(async()=>{let e=parseInt(process.env.CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS||`2000`,10);try{W();let n=_(),r=y(),i=[t.shutdown()];n&&i.push(n.forceFlush().then(()=>n.shutdown())),r&&i.push(r.forceFlush().then(()=>r.shutdown())),await Promise.race([Promise.all(i),J(e,`OpenTelemetry shutdown timeout`)])}catch{}}),t.getMeter(`com.anthropic.claude_code`,`2.6.12`)}let m=new ue({resource:f,views:[],readers:e});if(S(m),t){let e=await pt();if(R(`[3P telemetry] Created ${e.length} log exporter(s)`),e.length>0){let t=new A({resource:f,processors:e.map(e=>new O(e,{scheduledDelayMillis:parseInt(process.env.OTEL_LOGS_EXPORT_INTERVAL||Z.toString(),10)}))});h.setGlobalLoggerProvider(t),v(t),b(h.getLogger(`com.anthropic.claude_code.events`,`2.6.12`)),R(`[3P telemetry] Event logger set successfully`),process.on(`beforeExit`,async()=>{await t?.forceFlush(),await y()?.forceFlush()}),process.on(`exit`,()=>{t?.forceFlush(),y()?.forceFlush()})}}if(t&&Ye()){let e=await mt();if(e.length>0){let t=new K({resource:f,spanProcessors:e.map(e=>new G(e,{scheduledDelayMillis:parseInt(process.env.OTEL_TRACES_EXPORT_INTERVAL||Q.toString(),10)}))});c.setGlobalTracerProvider(t),pe(t)}}return L(async()=>{let e=parseInt(process.env.CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS||`2000`,10);try{W();let t=[m.shutdown()],n=_();n&&t.push(n.shutdown());let r=y();r&&t.push(r.shutdown()),await Promise.race([Promise.all(t),J(e,`OpenTelemetry shutdown timeout`)])}catch(t){throw t instanceof Error&&t.message.includes(`timeout`)&&R(`
4
- OpenTelemetry telemetry flush timed out after ${e}ms
5
-
6
- To resolve this issue, you can:
7
- 1. Increase the timeout by setting CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS env var (e.g., 5000 for 5 seconds)
8
- 2. Check if your OpenTelemetry backend is experiencing scalability issues
9
- 3. Disable OpenTelemetry by unsetting CLAUDE_CODE_ENABLE_TELEMETRY env var
10
-
11
- Current timeout: ${e}ms
12
- `,{level:`error`}),t}}),m.getMeter(`com.anthropic.claude_code`,`2.6.12`)}async function bt(){let e=he();if(!e)return;let t=parseInt(process.env.CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS||`5000`,10);try{let n=[e.forceFlush()],r=_();r&&n.push(r.forceFlush());let i=y();i&&n.push(i.forceFlush()),await Promise.race([Promise.all(n),J(t,`OpenTelemetry flush timeout`)]),R(`Telemetry flushed successfully`)}catch(e){e instanceof $?R(`Telemetry flush timed out after ${t}ms. Some metrics may not be exported.`,{level:`warn`}):R(`Telemetry flush failed: ${F(e)}`,{level:`error`})}}function xt(){let e={},t=process.env.OTEL_EXPORTER_OTLP_HEADERS;if(t)for(let n of t.split(`,`)){let[t,...r]=n.split(`=`);t&&r.length>0&&(e[t.trim()]=r.join(`=`).trim())}return e}function X(){let e=He(),t=Ve(),n=Se(),r={},i=xt();n?.otelHeadersHelper?r.headers=async()=>{let e=_e();return{...i,...e}}:Object.keys(i).length>0&&(r.headers=async()=>i);let a=process.env.OTEL_EXPORTER_OTLP_ENDPOINT;if(!e||a&&ze(a)){let e=U();return(t||e)&&(r.httpAgentOptions={...t,...e&&{ca:e}}),r}let o=U();return r.httpAgentOptions=n=>t||o?new H(e,{...t&&{cert:t.cert,key:t.key,passphrase:t.passphrase},...o&&{ca:o}}):new H(e),r}var St,Z,Q,$;e((()=>{o(),oe(),m(),be(),le(),$e(),f(),We(),x(),j(),Pe(),Ge(),De(),z(),n(),I(),Be(),Ue(),Ce(),ke(),Re(),Ke(),ct(),ut(),Ze(),Je(),St=6e4,Z=5e3,Q=5e3,$=class extends Error{}}))();export{bt as flushTelemetry,yt as initializeTelemetry};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";async function t(e,t,n){let r=n?n.trim().split(/\s+/):[],i=r[0]||`list`,a=[],o=console.log,s=console.error;console.log=(...e)=>a.push(e.map(String).join(` `)),console.error=(...e)=>a.push(e.map(String).join(` `));try{let{templatesMain:e}=await import(`./templateJobs-fEz4DGWh.js`);await e([i,...r.slice(1)])}finally{console.log=o,console.error=s}return e(a.join(`
2
- `)||`Done.`,{display:`system`}),null}e((()=>{}))();export{t as call};
@@ -1 +0,0 @@
1
- import{L as e,T as t,V as n,d as r,s as i,w as a}from"./debug-UI3T040K.js";import{n as o,r as s}from"./analytics-DqMQntaB.js";import{F as c,P as l}from"./git-CN3qtTb_.js";o(),i(),l(),n(),a();function u(e){if(e<6e4)return`${Math.round(e/1e3)}s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n>0?`${t}m ${n}s`:`${t}m`}function d(e){let n=(e.startsWith(`sk-ant-si-`)?e.slice(10):e).split(`.`);if(n.length!==3||!n[1])return null;try{return t(Buffer.from(n[1],`base64url`).toString(`utf8`))}catch{return null}}function f(e){let t=d(e);return typeof t==`object`&&t&&`exp`in t&&typeof t.exp==`number`?t.exp:null}var p=300*1e3,m=1800*1e3,h=3,g=6e4;function _({getAccessToken:t,onRefresh:n,label:i,refreshBufferMs:a=p}){let o=new Map,l=new Map,d=new Map;function _(e){let t=(d.get(e)??0)+1;return d.set(e,t),t}function v(e,t){let n=f(t);if(!n){r(`[${i}:token] Could not decode JWT expiry for sessionId=${e}, token prefix=${t.slice(0,15)}…, keeping existing timer`);return}let s=o.get(e);s&&clearTimeout(s);let c=_(e),l=new Date(n*1e3).toISOString(),d=n*1e3-Date.now()-a;if(d<=0){r(`[${i}:token] Token for sessionId=${e} expires=${l} (past or within buffer), refreshing immediately`),b(e,c);return}r(`[${i}:token] Scheduled token refresh for sessionId=${e} in ${u(d)} (expires=${l}, buffer=${a/1e3}s)`);let p=setTimeout(b,d,e,c);o.set(e,p)}function y(e,t){let n=o.get(e);n&&clearTimeout(n);let s=_(e),c=Math.max(t*1e3-a,3e4);r(`[${i}:token] Scheduled token refresh for sessionId=${e} in ${u(c)} (expires_in=${t}s, buffer=${a/1e3}s)`);let l=setTimeout(b,c,e,s);o.set(e,l)}async function b(a,f){let p;try{p=await t()}catch(t){r(`[${i}:token] getAccessToken threw for sessionId=${a}: ${e(t)}`,{level:`error`})}if(d.get(a)!==f){r(`[${i}:token] doRefresh for sessionId=${a} stale (gen ${f} vs ${d.get(a)}), skipping`);return}if(!p){let e=(l.get(a)??0)+1;if(l.set(a,e),r(`[${i}:token] No OAuth token available for refresh, sessionId=${a} (failure ${e}/${h})`,{level:`error`}),c(`error`,`bridge_token_refresh_no_oauth`),e<h){let e=setTimeout(b,g,a,f);o.set(a,e)}return}l.delete(a),r(`[${i}:token] Refreshing token for sessionId=${a}: new token prefix=${p.slice(0,15)}…`),s(`tengu_bridge_token_refreshed`,{}),n(a,p);let _=setTimeout(b,m,a,f);o.set(a,_),r(`[${i}:token] Scheduled follow-up refresh for sessionId=${a} in ${u(m)}`)}function x(e){_(e);let t=o.get(e);t&&(clearTimeout(t),o.delete(e)),l.delete(e)}function S(){for(let e of d.keys())_(e);for(let e of o.values())clearTimeout(e);o.clear(),l.clear()}return{schedule:v,scheduleFromExpiresIn:y,cancel:x,cancelAll:S}}export{f as n,_ as t};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,R as n,V as r,w as i}from"./debug-UI3T040K.js";import{CT as a,ST as o,bT as s,hT as c,mT as l,pT as u,vT as d,xT as f}from"./loadAgentsDir-DaApSWNv.js";import{r as p,t as m}from"./promptEditor-I8ZpszKv.js";import{dirname as h}from"path";import{mkdir as g,writeFile as _}from"fs/promises";function v(e){let t=new Set(d.map(e=>f(e.key)));return e.map(e=>{let n={};for(let[r,i]of Object.entries(e.bindings))t.has(f(r))||(n[r]=i);return{context:e.context,bindings:n}}).filter(e=>Object.keys(e.bindings).length>0)}function y(){return t({$schema:`https://www.schemastore.org/claude-code-keybindings.json`,$docs:`https://code.claude.com/docs/en/keybindings`,bindings:v(o)},null,2)+`
2
- `}var b=e((()=>{i(),a(),s()}));async function x(){if(!c())return{type:`text`,value:`Keybinding customization is not enabled. This feature is currently in preview.`};let e=u(),t=!1;await g(h(e),{recursive:!0});try{await _(e,y(),{encoding:`utf-8`,flag:`wx`})}catch(e){if(n(e)===`EEXIST`)t=!0;else throw e}let r=await m(e);return r.error?{type:`text`,value:`${t?`Opened`:`Created`} ${e}. Could not open in editor: ${r.error}`}:{type:`text`,value:t?`Opened ${e} in your editor.`:`Created ${e} with template. Opened in your editor.`}}e((()=>{l(),b(),r(),p()}))();export{x as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Pc as n,Sc as r}from"./paths-BZbIj1Z1.js";import{n as i,r as a,t as o}from"./language-CcxtaVJA.js";async function s(e,t,a){let s=a.trim().toLowerCase();if(!s){let t=r().preferredLanguage??`auto`,n=i(),a=t===`auto`?` → ${o(n)}`:``;return e(`Language: ${o(t)}${a}`,{display:`system`}),null}if(!c.includes(s))return e(`Invalid language "${s}". Use: en, zh, or auto`,{display:`system`}),null;let l=s;n(e=>({...e,preferredLanguage:l}));let u=i(),d=l===`auto`?` → ${o(u)}`:``;return e(`Language set to ${o(l)}${d}`,{display:`system`}),null}var c;e((()=>{t(),a(),c=[`en`,`zh`,`auto`]}))();export{s as call};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./language-CcxtaVJA.js";t();export{e as getResolvedLanguage};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Sc as n}from"./paths-BZbIj1Z1.js";import{i as r,s as i}from"./intl-Pse97ORk.js";function a(){let e=n().preferredLanguage??`auto`;return e===`en`||e===`zh`?e:r()===`zh`?`zh`:`en`}function o(e){return s[e]??e}var s,c=e((()=>{t(),i(),s={auto:`Auto (follow system)`,en:`English`,zh:`中文`}}));export{a as n,c as r,o as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Rn as r,b as i,t as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{i as f,n as p,r as m}from"./cron-DiW7eIPP.js";import{o as h,u as g}from"./api-CslgFoHj.js";import{n as _,r as v}from"./hostGuard-zim_4F9V.js";import{n as y,t as b}from"./launchCommand-Du91jxMC.js";function x(e){return new Promise(t=>setTimeout(t,e))}async function S(){let e;try{e=(await g()).apiKey}catch(e){throw new N(e instanceof Error?e.message:String(e),501)}return _(C()),{"x-api-key":e,"anthropic-version":`2023-06-01`,"anthropic-beta":j,"content-type":`application/json`}}function C(){return`${u().BASE_API_URL}/v1/agents`}function w(e){if(t.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new N(`Authentication failed. Please run /login to re-authenticate.`,401);if(t===403)return new N(`Subscription required. Scheduled agents require a Claude Pro/Max/Team subscription.`,403);if(t===404)return new N(`Agent not found.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``;return new N(`Rate limit exceeded.${t?` Retry after ${t}s.`:``}`,429)}return new N((e.response?.data)?.error?.message??e.message,t)}return e instanceof N?e:new N(e instanceof Error?e.message:String(e),0)}function T(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function E(e){let n;for(let r=0;r<M;r++)try{return await e()}catch(e){let i=w(e);if(i.statusCode>=500){n=i,r<M-1&&await x(T(t.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**r);continue}throw i}throw n??new N(`Request failed after retries`,0)}async function D(){return E(async()=>{let e=await S();return(await t.get(C(),{headers:e})).data.data??[]})}async function O(e,n){return E(async()=>{let r=await S();return(await t.post(C(),{cron_expr:e,prompt:n,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone??`UTC`},{headers:r})).data})}async function k(e){return E(async()=>{let n=await S();await t.delete(`${C()}/${e}`,{headers:n})})}async function A(e){return E(async()=>{let n=await S();return(await t.post(`${C()}/${e}/run`,{},{headers:n})).data})}var j,M,N,P=e((()=>{n(),d(),v(),h(),j=`managed-agents-2026-04-01`,M=3,N=class extends Error{constructor(e,t){super(e),this.statusCode=t,this.name=`AgentsApiError`}}}));function F({agent:e}){let t=p(e.cron_expr,{utc:!0}),n=e.next_run?new Date(e.next_run).toLocaleString():`—`;return(0,L.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,L.jsxs)(o,{children:[(0,L.jsx)(i,{bold:!0,children:e.id}),(0,L.jsx)(i,{dimColor:!0,children:` · `}),(0,L.jsx)(i,{color:`suggestion`,children:e.status})]}),(0,L.jsxs)(i,{children:[`Schedule: `,t]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Prompt: `,e.prompt]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Next run: `,n]})]})}function I(e){if(e.mode===`list`)return e.agents.length===0?(0,L.jsx)(o,{children:(0,L.jsx)(i,{dimColor:!0,children:`No scheduled agents. Use /agents-platform create <cron> <prompt> to create one.`})}):(0,L.jsxs)(o,{flexDirection:`column`,children:[(0,L.jsx)(o,{marginBottom:1,children:(0,L.jsxs)(i,{bold:!0,children:[`Scheduled Agents (`,e.agents.length,`)`]})}),e.agents.map(e=>(0,L.jsx)(F,{agent:e},e.id))]});if(e.mode===`created`){let t=p(e.agent.cron_expr,{utc:!0});return(0,L.jsxs)(o,{flexDirection:`column`,children:[(0,L.jsx)(o,{children:(0,L.jsx)(i,{bold:!0,color:`success`,children:`Agent created`})}),(0,L.jsxs)(i,{children:[`ID: `,e.agent.id]}),(0,L.jsxs)(i,{children:[`Schedule: `,t]}),(0,L.jsxs)(i,{children:[`Prompt: `,e.agent.prompt]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Status: `,e.agent.status]})]})}return e.mode===`deleted`?(0,L.jsx)(o,{children:(0,L.jsxs)(i,{color:`success`,children:[`Agent `,e.id,` deleted.`]})}):e.mode===`ran`?(0,L.jsxs)(o,{flexDirection:`column`,children:[(0,L.jsx)(o,{children:(0,L.jsxs)(i,{color:`success`,children:[`Agent `,e.id,` triggered.`]})}),(0,L.jsxs)(i,{dimColor:!0,children:[`Run ID: `,e.runId]})]}):(0,L.jsx)(o,{children:(0,L.jsx)(i,{color:`error`,children:e.message})})}var L,R=e((()=>{r(),a(),m(),L=s()}));function z(e){let t=e.trim().split(/\s+/);return t.length<6?null:{cron:t.slice(0,5).join(` `),prompt:t.slice(5).join(` `)}}function B(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`create`){if(!i)return{action:`invalid`,reason:`create requires a cron expression and prompt, e.g. create "0 9 * * 1" Run daily standup`};let e=z(i);if(!e)return{action:`invalid`,reason:`create requires at least 5 cron fields followed by a prompt, e.g. create "0 9 * * 1" Run daily standup`};let{cron:t,prompt:n}=e;return n.trim()?{action:`create`,cron:t,prompt:n.trim()}:{action:`invalid`,reason:`prompt cannot be empty`}}if(r===`delete`){if(!i)return{action:`invalid`,reason:`delete requires an agent id`};let e=i.split(/\s+/)[0];return e?{action:`delete`,id:e}:{action:`invalid`,reason:`delete requires an agent id`}}if(r===`run`){if(!i)return{action:`invalid`,reason:`run requires an agent id`};let e=i.split(/\s+/)[0];return e?{action:`run`,id:e}:{action:`invalid`,reason:`run requires an agent id`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". Use: list | create CRON PROMPT | delete ID | run ID`}}var V=e((()=>{}));async function H(e,t){if(e.action===`list`){l(`tengu_agents_platform_list`,{});try{let e=await D();return t(e.length===0?`No scheduled agents found.`:`${e.length} scheduled agent(s).`,{display:`system`}),{mode:`list`,agents:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_agents_platform_failed`,{reason:n}),t(`Failed to list agents: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`create`){let{cron:n,prompt:r}=e;if(!f(n)){let e=`Invalid cron expression: "${n}". Expected 5 fields (minute hour day month weekday).`;return l(`tengu_agents_platform_failed`,{reason:e}),t(e,{display:`system`}),null}l(`tengu_agents_platform_create`,{cron:n});try{let e=await O(n,r);return t(`Agent created: ${e.id}`,{display:`system`}),{mode:`created`,agent:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_agents_platform_failed`,{reason:n}),t(`Failed to create agent: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`delete`){let{id:n}=e;l(`tengu_agents_platform_delete`,{id:n});try{return await k(n),t(`Agent ${n} deleted.`,{display:`system`}),{mode:`deleted`,id:n}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_agents_platform_failed`,{reason:r}),t(`Failed to delete agent ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}let{id:n}=e;l(`tengu_agents_platform_run`,{id:n});try{let e=await A(n);return t(`Agent ${n} triggered. Run ID: ${e.run_id}`,{display:`system`}),{mode:`ran`,id:n,runId:e.run_id}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_agents_platform_failed`,{reason:r}),t(`Failed to run agent ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}var U;e((()=>{c(),m(),P(),R(),V(),b(),U=y({commandName:`agents-platform`,parseArgs:e=>{l(`tengu_agents_platform_started`,{args:e});let t=B(e);return t.action===`invalid`?(l(`tengu_agents_platform_failed`,{reason:t.reason}),{action:`invalid`,reason:`Usage: /agents-platform list | create CRON PROMPT | delete ID | run ID\n${t.reason}`}):t},dispatch:H,View:I,errorView:e=>null})}))();export{U as callAgentsPlatform};
@@ -1,18 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Ct as s,cn as c}from"./state-sIHsFpDu.js";import{n as l,r as u}from"./analytics-DqMQntaB.js";import{av as d,cv as f,iv as ee,lv as te,nv as p,ov as m,pv as h,rv as g,sv as _,vv as ne}from"./loadAgentsDir-DaApSWNv.js";import{a as v,r as y}from"./detectRepository-CBk3S2zv.js";import{join as b}from"node:path";import{spawn as x}from"node:child_process";import{existsSync as S}from"node:fs";import{randomUUID as C}from"node:crypto";function re(e){return E.indexOf(e)}function ie({phase:e,target:t,sessionUrl:n,errorMessage:i}){let o=re(e),s=e===`error`;return(0,w.jsxs)(a,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,w.jsxs)(a,{children:[(0,w.jsx)(r,{bold:!0,children:`Autofix PR `}),(0,w.jsx)(r,{color:`claude`,children:t})]}),E.map((e,t)=>{let n=o>t,i=o===t&&!s;return(0,w.jsx)(a,{marginLeft:2,children:(0,w.jsxs)(r,{color:n?`success`:i?`warning`:`subtle`,children:[n?`✓`:i?`→`:`·`,` `,T[e]]})},e)}),s&&i&&(0,w.jsx)(a,{marginLeft:2,marginTop:1,children:(0,w.jsxs)(r,{color:`error`,children:[`✗ `,i]})}),n&&(0,w.jsxs)(a,{marginTop:1,marginLeft:2,children:[(0,w.jsx)(r,{color:`subtle`,children:`Track: `}),(0,w.jsx)(r,{color:`claude`,children:n})]})]})}var w,T,E,D=e((()=>{n(),i(),w=o(),T={detecting:`Detecting repository...`,checking_eligibility:`Checking remote agent eligibility...`,acquiring_lock:`Acquiring monitor lock...`,launching:`Launching remote session...`,registered:`Session registered`,done:`Autofix launched`,error:`Error`},E=[`detecting`,`checking_eligibility`,`acquiring_lock`,`launching`,`registered`,`done`]}));function O(e,t){return{agentId:C(),agentName:`autofix-pr`,teamName:`_autofix`,color:void 0,planModeRequired:!1,parentSessionId:s(),abortController:new AbortController,taskId:C()}}var k=e((()=>{c()}));function A(){return M}function ae(e){return M?!1:(M=e,!0)}function j(e){M&&(e&&M.taskId!==e||(M.abortController.abort(),M=null))}function oe(e){return M?(M={...M,...e},!0):!1}function se(e,t,n){return M?.owner===e&&M?.repo===t&&M?.prNumber===n}var M,N=e((()=>{M=null}));function P(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n){if(n.type===`system`&&(n.subtype===`hook_progress`||n.subtype===`hook_response`)){let e=n.stdout;if(typeof e==`string`){let t=F(e,L,R);if(t)return t}continue}if(n.type===`assistant`){let e=n.message?.content;if(!e||typeof e==`string`)continue;for(let t of e){if(t.type!==`text`||typeof t.text!=`string`||!t.text.includes(L))continue;let e=F(t.text,L,R);if(e)return e}}}}return null}function F(e,t,n){let r=e.length;for(;r>=0;){let i=e.lastIndexOf(t,r);if(i===-1)return null;let a=e.indexOf(n,i+t.length);if(a!==-1)return e.slice(i,a+n.length);r=i-1}return null}var I,L,R,z=e((()=>{I=`autofix-result`,L=`<${I}>`,R=`</${I}>`}));function B(e){if(!/^[1-9]\d{0,9}$/.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)?t:null}function V(e){let t=e.trim();if(!t)return{action:`invalid`,reason:`empty`};if(t===`stop`||t===`off`)return{action:`stop`};let n=B(t);if(n!==null)return{action:`start`,prNumber:n};let r=t.match(/^([\w.-]+)\/([\w.-]+)#(\d+)$/);if(r){let e=B(r[3]);return e===null?{action:`invalid`,reason:`pr_number_out_of_range`}:{action:`start`,owner:r[1],repo:r[2],prNumber:e}}return{action:`freeform`,prompt:t}}var H=e((()=>{}));function U(e,t){let{owner:n,repo:r,prNumber:i,initialHeadSha:a}=t;if(e.state===`MERGED`)return{completed:!0,summary:`${n}/${r}#${i} merged. Autofix monitoring complete.`};if(e.state===`CLOSED`)return{completed:!0,summary:`${n}/${r}#${i} closed without merge. Autofix monitoring complete.`};if(!a||e.headRefOid===a)return{completed:!1};let o=W(e.statusCheckRollup);return o.state===`pending`?{completed:!1}:o.state===`failure`?{completed:!0,summary:`Autofix pushed commits to ${n}/${r}#${i} but CI is failing (${o.detail}).`}:{completed:!0,summary:`Autofix pushed commits to ${n}/${r}#${i}, CI green.`}}function W(e){if(!e||e.length===0)return{state:`success`,detail:`no checks configured`};let t=0,n=0,r=e.length;for(let r of e){let e=(r.status??``).toUpperCase(),i=(r.conclusion??``).toUpperCase();if(e&&e!==`COMPLETED`){t++;continue}if(!(i===`SUCCESS`||i===`NEUTRAL`||i===`SKIPPED`)){if(i===``){t++;continue}n++}}return t>0?{state:`pending`,detail:`${t}/${r} checks pending`}:n>0?{state:`failure`,detail:`${n}/${r} checks failing`}:{state:`success`,detail:`${r}/${r} checks passing`}}var G=e((()=>{}));async function ce(e){let{owner:t,repo:n,prNumber:r,initialHeadSha:i,timeoutMs:a}=e,o;try{o=await K(t,n,r,a??q)}catch{return{completed:!1}}return U(o,{owner:t,repo:n,prNumber:r,initialHeadSha:i})}async function le(e,t,n,r=q){try{return(await K(e,t,n,r)).headRefOid||null}catch{return null}}function K(e,t,n,r){return new Promise((i,a)=>{let o=x(`gh`,[`pr`,`view`,String(n),`--repo`,`${e}/${t}`,`--json`,`headRefOid,state,statusCheckRollup`],{stdio:[`ignore`,`pipe`,`pipe`]}),s=[],c=[],l=!1,u=setTimeout(()=>{l||(l=!0,o.kill(`SIGKILL`),a(Error(`gh pr view timed out after ${r}ms`)))},r);o.stdout.on(`data`,e=>s.push(e)),o.stderr.on(`data`,e=>c.push(e)),o.on(`error`,e=>{l||(l=!0,clearTimeout(u),a(e))}),o.on(`close`,e=>{if(l)return;if(l=!0,clearTimeout(u),e!==0){let t=Buffer.concat(c).toString(`utf8`).trim();a(Error(`gh pr view exited ${e}: ${t||`<no stderr>`}`));return}let t=Buffer.concat(s).toString(`utf8`).trim();try{i(JSON.parse(t))}catch(e){a(Error(`gh pr view JSON parse failed: ${e.message}`))}})})}var q,ue=e((()=>{G(),q=5e3}));function de(e){return[`AUTOFIX.md`,`.claude/skills/autofix.md`,`.claude/skills/autofix-pr/SKILL.md`].filter(t=>S(b(e,t)))}function fe(e){return e.length===0?``:` Run ${e.join(` and `)} for custom instructions on how to autofix.`}var pe=e((()=>{}));function J(e){return`${e.owner}/${e.repo}#${e.prNumber}`}function Y(e,t){return u(`tengu_autofix_pr_result`,{result:`failed`,error_code:t}),`Autofix PR failed: ${e}`}var X,Z,Q,$;e((()=>{X=t(n(),1),l(),d(),v(),h(),D(),k(),N(),z(),H(),ue(),pe(),Z=new Map,Q=5e3,m(`autofix-pr`,async e=>{let t=e;if(!t)return null;let n=J(t),r=Date.now();if(r-(Z.get(n)??0)<Q)return null;Z.set(n,r);let i=await ce({owner:t.owner,repo:t.repo,prNumber:t.prNumber,initialHeadSha:t.initialHeadSha});return i.completed?i.summary:null}),_(`autofix-pr`,(e,t)=>{j(e);let n=t;n&&Z.delete(J(n))}),f(`autofix-pr`,e=>P(e)),$=async(e,t,n)=>{try{let r=V(n);if(r.action===`stop`){let t=A();return t?(j(),e(`Stopped local monitoring of ${t.repo}#${t.prNumber}. Any already-running remote session continues until it finishes or is cancelled from claude.ai/code.`,{display:`system`}),null):(e(`No active autofix monitor.`,{display:`system`}),null)}if(r.action===`invalid`)return e(`Invalid args: ${r.reason}. Use /autofix-pr <pr-number> | stop | <owner>/<repo>#<n>`,{display:`system`}),null;if(r.action===`freeform`)return e(`Freeform prompt mode not yet supported. Use /autofix-pr <pr-number>.`,{display:`system`}),null;u(`tengu_autofix_pr_started`,{action:`start`,has_pr_number:`true`,has_repo_path:String(!!(r.owner&&r.repo))});let i;try{i=await y()}catch{return e(Y(`Cannot detect GitHub repo from current directory.`,`session_create_failed`),{display:`system`}),null}if(!i||i.host!==`github.com`)return e(Y(`Cannot detect GitHub repo from current directory.`,`session_create_failed`),{display:`system`}),null;if(r.owner&&r.owner!==i.owner||r.repo&&r.repo!==i.name)return e(Y(`Cross-repo autofix is not supported from this directory. Run from ${i.owner}/${i.name} or pass only the PR number.`,`repo_mismatch`),{display:`system`}),null;let a=i.owner,o=i.name,{prNumber:s}=r;if(se(a,o,s))return u(`tengu_autofix_pr_result`,{result:`success_rc`}),e(`Already monitoring ${o}#${s} in background.`,{display:`system`}),null;let c=await p({skipBundle:!0});if(!c.eligible){let t=c.errors.filter(e=>e.type!==`no_remote_environment`);if(t.length>0)return e(Y(`Remote agent not available:\n${t.map(g).join(`
2
- `)}`,`session_create_failed`),{display:`system`}),null}let l=fe(de(process.cwd())),d=`${a}/${o}#${s}`,f=`refs/pull/${s}/head`,m=`Auto-fix failing CI checks on PR #${s} in ${a}/${o}.${l}
3
-
4
- When you finish (or hit a blocker you can't recover from), output the following XML tag as your final message so the local user gets a structured summary:
5
-
6
- <autofix-result>
7
- <pr-number>${s}</pr-number>
8
- <commits-pushed>
9
- <commit sha="...">commit message</commit>
10
- </commits-pushed>
11
- <files-changed>
12
- <file path="...">N changes</file>
13
- </files-changed>
14
- <ci-status>green | red | pending | unknown</ci-status>
15
- <summary>One-sentence summary of what was fixed or why it could not be fixed.</summary>
16
- </autofix-result>
17
-
18
- If no fix was needed, omit <commits-pushed> and <files-changed> and explain in <summary>. If you only attempted partial work, list the commits you did push and explain the remainder in <summary>.`,h=O(m,d);if(!ae({taskId:h.taskId,owner:a,repo:o,prNumber:s,abortController:h.abortController,startedAt:Date.now()})){let t=A();return e(Y(`already monitoring ${t?.repo}#${t?.prNumber}. Run /autofix-pr stop first.`,`rc_already_monitoring_other`),{display:`system`}),null}let _,v=e=>{_=e},b=null;try{b=await ne({initialMessage:m,source:`autofix_pr`,branchName:f,skipBundle:!0,title:`Autofix PR: ${d}`,useDefaultEnvironment:!0,signal:h.abortController.signal,githubPr:{owner:a,repo:o,number:s},onBundleFail:v,onCreateFail:v})}catch(t){return j(h.taskId),e(Y(`teleport failed: ${t instanceof Error?t.message:String(t)}`,`teleport_failed`),{display:`system`}),null}if(!b)return j(h.taskId),e(Y(_??`remote session creation failed.`,`session_create_failed`),{display:`system`}),null;let x=await le(a,o,s).catch(()=>null)??void 0;try{let{taskId:e}=te({remoteTaskType:`autofix-pr`,session:b,command:`/autofix-pr ${s}`,context:t,isLongRunning:!0,remoteTaskMetadata:{owner:a,repo:o,prNumber:s,initialHeadSha:x}});oe({taskId:e})}catch(t){return j(h.taskId),e(Y(`task registration failed: ${t instanceof Error?t.message:String(t)}`,`registration_failed`),{display:`system`}),null}let S=ee(b.id);return u(`tengu_autofix_pr_result`,{result:`success_rc`}),e(`Autofix launched for ${d}. Track: ${S}`,{display:`system`}),X.createElement(ie,{phase:`done`,target:d,sessionUrl:S})}catch(t){let n=t instanceof Error?t.message:String(t);return u(`tengu_autofix_pr_result`,{result:`failed`,error_code:`exception`}),e(`Autofix PR failed: ${n}`,{display:`system`}),null}}}))();export{$ as callAutofixPr};
@@ -1,3 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Cf as l,Df as u,Ef as d,Of as f,Sf as p,Tf as m,Ux as h,Wx as g,bf as _,kf as v,wf as y,xf as b}from"./loadAgentsDir-DaApSWNv.js";import{n as x,t as S}from"./launchCommand-Du91jxMC.js";function C(e){return e.mode===`list`?e.stores.length===0?(0,w.jsx)(o,{children:(0,w.jsx)(r,{dimColor:!0,children:`No memory stores found. Use /local-memory create <store> to create one.`})}):(0,w.jsxs)(o,{flexDirection:`column`,children:[(0,w.jsx)(o,{marginBottom:1,children:(0,w.jsxs)(r,{bold:!0,children:[`Local Memory Stores (`,e.stores.length,`)`]})}),e.stores.map(e=>(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{children:` `}),(0,w.jsx)(r,{color:`success`,children:`◆`}),(0,w.jsxs)(r,{children:[` `,e]})]},e))]}):e.mode===`created`?(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{color:`success`,children:`✓`}),(0,w.jsx)(r,{children:` Store created: `}),(0,w.jsx)(r,{bold:!0,children:e.store})]}):e.mode===`stored`?(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{color:`success`,children:`✓`}),(0,w.jsx)(r,{children:` Stored entry `}),(0,w.jsx)(r,{bold:!0,children:e.key}),(0,w.jsx)(r,{children:` in `}),(0,w.jsx)(r,{bold:!0,children:e.store})]}):e.mode===`fetched`?(0,w.jsxs)(o,{flexDirection:`column`,children:[(0,w.jsxs)(o,{marginBottom:1,children:[(0,w.jsx)(r,{bold:!0,children:e.store}),(0,w.jsx)(r,{dimColor:!0,children:`/`}),(0,w.jsx)(r,{bold:!0,children:e.key})]}),(0,w.jsx)(o,{children:(0,w.jsx)(r,{children:e.value})})]}):e.mode===`not-found`?(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{color:`error`,children:`Not found: `}),(0,w.jsx)(r,{bold:!0,children:e.store}),e.key?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(r,{dimColor:!0,children:`/`}),(0,w.jsx)(r,{bold:!0,children:e.key})]}):null]}):e.mode===`entries`?e.keys.length===0?(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{dimColor:!0,children:`No entries in `}),(0,w.jsx)(r,{bold:!0,children:e.store}),(0,w.jsxs)(r,{dimColor:!0,children:[`. Use /local-memory store `,e.store,` <key> <value> to add one.`]})]}):(0,w.jsxs)(o,{flexDirection:`column`,children:[(0,w.jsxs)(o,{marginBottom:1,children:[(0,w.jsx)(r,{bold:!0,children:e.store}),(0,w.jsxs)(r,{dimColor:!0,children:[` (`,e.keys.length,` entries)`]})]}),e.keys.map(e=>(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{children:` `}),(0,w.jsx)(r,{color:`success`,children:`·`}),(0,w.jsxs)(r,{children:[` `,e]})]},e))]}):e.mode===`archived`?(0,w.jsxs)(o,{children:[(0,w.jsx)(r,{color:`success`,children:`✓`}),(0,w.jsx)(r,{children:` Archived store: `}),(0,w.jsx)(r,{bold:!0,children:e.store}),(0,w.jsxs)(r,{dimColor:!0,children:[` (renamed to `,e.store,`.archived)`]})]}):(0,w.jsx)(o,{children:(0,w.jsxs)(r,{color:`error`,children:[`Error: `,e.message]})})}var w,T=e((()=>{n(),a(),w=c()}));function E(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.split(/\s+/),r=n[0];if(r===`list`)return{action:`list`};if(r===`create`){let e=n[1];return e?{action:`create`,store:e}:{action:`invalid`,reason:`create requires a store name. ${D}`}}if(r===`store`){let e=n[1],t=n[2];if(!e)return{action:`invalid`,reason:`store requires a store name. ${D}`};if(!t)return{action:`invalid`,reason:`store requires a key. ${D}`};let r=n.slice(3).join(` `);return r?{action:`store`,store:e,key:t,value:r}:{action:`invalid`,reason:`store requires a value. ${D}`}}if(r===`fetch`){let e=n[1],t=n[2];return e?t?{action:`fetch`,store:e,key:t}:{action:`invalid`,reason:`fetch requires a key. ${D}`}:{action:`invalid`,reason:`fetch requires a store name. ${D}`}}if(r===`entries`){let e=n[1];return e?{action:`entries`,store:e}:{action:`invalid`,reason:`entries requires a store name. ${D}`}}if(r===`archive`){let e=n[1];return e?{action:`archive`,store:e}:{action:`invalid`,reason:`archive requires a store name. ${D}`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${D}`}}var D,O=e((()=>{D=`Usage: /local-memory list | create STORE | store STORE KEY VALUE | fetch STORE KEY | entries STORE | archive STORE`}));function k(e){return e.length===0?`No memory stores found.`:[`Local Memory Stores`,...e.map(e=>`- ${e}`)].join(`
2
- `)}function A(e,t){return t.length===0?`No entries in "${e}".`:[`Entries in "${e}"`,...t.map(e=>`- ${e}`)].join(`
3
- `)}function j({onDone:e}){let[t,n]=N.useState({kind:`menu`}),[a,c]=N.useState(0),[l,f]=N.useState(``),[g,x]=N.useState(0),[S,C]=N.useState(null),w=N.useCallback(e=>{n(e),f(``),x(0),C(null)},[]),T=N.useCallback(t=>e(t,{display:`system`}),[e]),E=N.useCallback((e,t,n,r,i={})=>{try{if(e===`list`){T(k(d()));return}if(e===`about`){T(F);return}if(!t){C(`Internal: missing store`);return}if(e===`create`){b(t),T(`Store created: ${t}`);return}if(e===`entries`){T(A(t,m(t)));return}if(e===`archive`){_(t),T(`Archived store: ${t}`);return}if(e===`fetch`){if(!n){C(`Internal: missing key`);return}let e=p(t,n);if(e===null){T(`Entry not found: ${t}/${n}`);return}T(`Entry fetched: ${t}/${n}\n\n${e}`);return}if(e===`store`){if(!n||r===void 0){C(`Internal: missing key or value`);return}if(!i.confirmedOverwrite&&p(t,n)!==null){w({kind:`confirm-overwrite`,store:t,key:n,value:r});return}u(t,n,r),T(`Stored ${t}/${n} (${r.length} chars)`);return}}catch(e){C(e instanceof Error?e.message:String(e))}},[T,w]);if(s((e,n)=>{if(t.kind!==`menu`)return;if(n.upArrow){c(e=>Math.max(0,e-1));return}if(n.downArrow){c(e=>Math.min(L.length-1,e+1));return}if(n.return){let e=L[a];if(!e)return;if(e.kind===`list`||e.kind===`about`){E(e.kind,void 0,void 0,void 0);return}w({kind:`collect-store`,action:e.kind});return}let r=Number(e);Number.isInteger(r)&&r>=1&&r<=L.length&&c(r-1)},{isActive:t.kind===`menu`}),s((e,n)=>{if(t.kind!==`confirm-archive`&&t.kind!==`confirm-overwrite`)return;if(n.escape){w({kind:`menu`});return}let r=e.toLowerCase();r===`y`||n.return?t.kind===`confirm-archive`?E(`archive`,t.store,void 0,void 0):E(`store`,t.store,t.key,t.value,{confirmedOverwrite:!0}):r===`n`&&w({kind:`menu`})},{isActive:t.kind===`confirm-archive`||t.kind===`confirm-overwrite`}),s((e,n)=>{if(!(t.kind!==`collect-store`&&t.kind!==`collect-key`&&t.kind!==`collect-value`)&&n.escape){if(t.kind===`collect-value`){w({kind:`collect-key`,action:t.action,store:t.store});return}if(t.kind===`collect-key`){w({kind:`collect-store`,action:t.action});return}w({kind:`menu`})}},{isActive:t.kind===`collect-store`||t.kind===`collect-key`||t.kind===`collect-value`}),t.kind===`menu`)return(0,P.jsx)(i,{title:`Local Memory`,subtitle:`${L.length} actions`,onCancel:()=>T(`Local memory panel dismissed`),color:`background`,hideInputGuide:!0,children:(0,P.jsxs)(o,{flexDirection:`column`,children:[L.map((e,t)=>(0,P.jsxs)(o,{flexDirection:`row`,children:[(0,P.jsx)(r,{children:`${t===a?`›`:` `} ${e.label}`.padEnd(I)}),(0,P.jsx)(r,{dimColor:!0,children:e.description})]},e.kind)),(0,P.jsx)(o,{marginTop:1,children:(0,P.jsx)(r,{dimColor:!0,children:`↑/↓ or 1-7 select · Enter run · Esc close`})})]})});if(t.kind===`confirm-archive`)return(0,P.jsx)(i,{title:`Confirm Archive`,onCancel:()=>w({kind:`menu`}),color:`warning`,hideInputGuide:!0,children:(0,P.jsxs)(o,{flexDirection:`column`,children:[(0,P.jsxs)(r,{children:[`Archive store "`,t.store,`"? This renames it to *.archived.`]}),(0,P.jsx)(o,{marginTop:1,children:(0,P.jsx)(r,{dimColor:!0,children:`y/Enter = archive · n/Esc = cancel`})})]})});if(t.kind===`confirm-overwrite`)return(0,P.jsx)(i,{title:`Confirm Overwrite`,onCancel:()=>w({kind:`menu`}),color:`warning`,hideInputGuide:!0,children:(0,P.jsxs)(o,{flexDirection:`column`,children:[(0,P.jsxs)(r,{children:[`Entry "`,t.store,`/`,t.key,`" already exists. Overwrite with new value (`,t.value.length,` chars)?`]}),(0,P.jsx)(o,{marginTop:1,children:(0,P.jsx)(r,{dimColor:!0,children:`y/Enter = overwrite · n/Esc = cancel`})})]})});let D=t.kind===`collect-store`?`STORE NAME`:t.kind===`collect-key`?`KEY NAME`:`VALUE`,O=t.kind===`collect-store`?`e.g. my-notes`:t.kind===`collect-key`?`e.g. todo-2026-05-08`:`free text`;return(0,P.jsx)(i,{title:`Local Memory · ${t.kind.replace(`collect-`,``).toUpperCase()}`,onCancel:()=>w({kind:`menu`}),color:`background`,hideInputGuide:!0,children:(0,P.jsxs)(o,{flexDirection:`column`,children:[(0,P.jsx)(o,{children:(0,P.jsx)(r,{dimColor:!0,children:D})}),(0,P.jsxs)(o,{children:[(0,P.jsx)(r,{children:`> `}),(0,P.jsx)(h,{value:l,onChange:e=>{f(e),C(null)},cursorOffset:g,onChangeCursorOffset:x,onSubmit:e=>{let n=e.trim();if(t.kind===`collect-store`){if(!n){C(`Store name required`);return}if(!y(n)){C(`Invalid store name (no /, \\, :, null byte, or leading dot; max 255 chars)`);return}t.action===`create`||t.action===`entries`||t.action===`archive`?t.action===`archive`?w({kind:`confirm-archive`,store:n}):E(t.action,n,void 0,void 0):w({kind:`collect-key`,action:t.action,store:n});return}if(t.kind===`collect-key`){if(!n){C(`Key required`);return}if(!v(n)){C(`Invalid key (allowed: letters/digits/._- only; no leading dot; not a Windows reserved name)`);return}t.action===`fetch`?E(`fetch`,t.store,n,void 0):w({kind:`collect-value`,action:`store`,store:t.store,key:n});return}t.kind===`collect-value`&&E(`store`,t.store,t.key,e)},placeholder:O,columns:70,showCursor:!0})]}),S!==null&&(0,P.jsx)(o,{marginTop:0,children:(0,P.jsxs)(r,{color:`warning`,children:[`✗ `,S]})}),(0,P.jsx)(o,{marginTop:1,children:(0,P.jsx)(r,{dimColor:!0,children:`Enter = next · Esc = back`})})]})})}async function M(e,t){if(e.action===`list`)return t(k(d()),{display:`system`}),null;if(e.action===`create`){let{store:n}=e;return b(n),t(`Store created: ${n}`,{display:`system`}),null}if(e.action===`store`){let{store:n,key:r,value:i}=e;return u(n,r,i),t(`Stored entry "${r}" in store "${n}".`,{display:`system`}),null}if(e.action===`fetch`){let{store:n,key:r}=e,i=p(n,r);return i===null?(t(`Entry not found: ${n}/${r}`,{display:`system`}),null):(t(`Entry fetched: ${n}/${r}\n${i}`,{display:`system`}),null)}if(e.action===`entries`){let{store:n}=e;return t(A(n,m(n)),{display:`system`}),null}if(e.action===`archive`){let{store:n}=e;return _(n),t(`Archived store: ${n}`,{display:`system`}),null}return t(F,{display:`system`}),null}var N,P,F,I,L,R,z;e((()=>{N=t(n(),1),a(),l(),f(),g(),T(),O(),S(),P=c(),F=`Usage: /local-memory list | create STORE | store STORE KEY VALUE | fetch STORE KEY | entries STORE | archive STORE`,I=26,L=[{kind:`list`,label:`List`,description:`Show all stores`},{kind:`create`,label:`Create`,description:`Create a new memory store`},{kind:`store`,label:`Store`,description:`Write an entry: store name + key + value`},{kind:`fetch`,label:`Fetch`,description:`Read an entry by store name + key`},{kind:`entries`,label:`Entries`,description:`List entry keys in a store`},{kind:`archive`,label:`Archive`,description:`Archive a store (rename to *.archived)`},{kind:`about`,label:`About`,description:`Show command syntax`}],R=x({commandName:`local-memory`,parseArgs:e=>{let t=E(e);return t.action===`invalid`?{action:`invalid`,reason:`${F}\n${t.reason}`}:t},dispatch:M,View:C,errorView:e=>N.createElement(C,{mode:`error`,message:e})}),z=async(e,t,n)=>(n??``).trim()===``?(0,P.jsx)(j,{onDone:e}):R(e,t,n)}))();export{z as callLocalMemory};
@@ -1,3 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Of as l,Ux as u,Wx as d,_f as f,gf as p,hf as m,kf as h,mf as g,vf as _,yf as v}from"./loadAgentsDir-DaApSWNv.js";import{n as y,t as b}from"./launchCommand-Du91jxMC.js";function x(e){return e.mode===`list`?e.keys.length===0?(0,S.jsx)(o,{children:(0,S.jsx)(r,{dimColor:!0,children:`No secrets stored. Use /local-vault set <key> <value> to add one.`})}):(0,S.jsxs)(o,{flexDirection:`column`,children:[(0,S.jsx)(o,{marginBottom:1,children:(0,S.jsxs)(r,{bold:!0,children:[`Local Vault Keys (`,e.keys.length,`)`]})}),e.keys.map(e=>(0,S.jsxs)(o,{children:[(0,S.jsx)(r,{children:` `}),(0,S.jsx)(r,{color:`success`,children:`●`}),(0,S.jsxs)(r,{children:[` `,e]})]},e))]}):e.mode===`set-ok`?(0,S.jsxs)(o,{children:[(0,S.jsx)(r,{color:`success`,children:`✓`}),(0,S.jsx)(r,{children:` Secret stored: `}),(0,S.jsx)(r,{bold:!0,children:e.key}),(0,S.jsx)(r,{dimColor:!0,children:` = [REDACTED]`})]}):e.mode===`get-masked`?(0,S.jsxs)(o,{flexDirection:`column`,children:[(0,S.jsxs)(o,{children:[(0,S.jsx)(r,{bold:!0,children:e.key}),(0,S.jsx)(r,{dimColor:!0,children:`: `}),(0,S.jsx)(r,{children:e.masked})]}),(0,S.jsx)(o,{marginTop:1,children:(0,S.jsxs)(r,{dimColor:!0,children:[`Use /local-vault get `,e.key,` --reveal to see the full value.`]})})]}):e.mode===`get-revealed`?(0,S.jsxs)(o,{flexDirection:`column`,children:[(0,S.jsxs)(o,{children:[(0,S.jsx)(r,{bold:!0,children:e.key}),(0,S.jsx)(r,{dimColor:!0,children:`: `}),(0,S.jsx)(r,{color:`warning`,children:e.value})]}),(0,S.jsx)(o,{marginTop:1,children:(0,S.jsx)(r,{dimColor:!0,color:`warning`,children:`⚠ Secret revealed in terminal — clear scrollback if this session is shared.`})})]}):e.mode===`not-found`?(0,S.jsxs)(o,{children:[(0,S.jsx)(r,{color:`error`,children:`Key not found: `}),(0,S.jsx)(r,{bold:!0,children:e.key})]}):e.mode===`deleted`?(0,S.jsxs)(o,{children:[(0,S.jsx)(r,{color:`success`,children:`✓`}),(0,S.jsx)(r,{children:` Deleted: `}),(0,S.jsx)(r,{bold:!0,children:e.key})]}):(0,S.jsx)(o,{children:(0,S.jsxs)(r,{color:`error`,children:[`Error: `,e.message]})})}var S,C=e((()=>{n(),a(),S=c()}));function w(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.split(/\s+/),r=n[0];if(r===`list`)return{action:`list`};if(r===`set`){let e=n[1];if(!e)return{action:`invalid`,reason:`set requires a key name. ${T}`};if(E.test(e))return{action:`invalid`,reason:`Key name must not start with "-" or a hyphen-like character (reserved for flags). ${T}`};let t=n.slice(2).join(` `);return t?{action:`set`,key:e,value:t}:{action:`invalid`,reason:`set requires a value. ${T}`}}if(r===`get`){let e=[`--reveal`],t=n.filter(t=>!e.includes(t))[1];return t?{action:`get`,key:t,reveal:n.includes(`--reveal`)}:{action:`invalid`,reason:`get requires a key name. ${T}`}}if(r===`delete`){let e=n[1];return e?{action:`delete`,key:e}:{action:`invalid`,reason:`delete requires a key name. ${T}`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${T}`}}var T,E,D=e((()=>{T=`Usage: /local-vault list | set KEY VALUE | get KEY [--reveal] | delete KEY`,E=/^[-‐-―−﹘﹣-]/}));function O(e){return e.length===0?`No secrets stored.`:[`Local Vault Keys`,...e.map(e=>`- ${e}`)].join(`
2
- `)}function k({onDone:e}){let[t,n]=j.useState({kind:`menu`}),[a,c]=j.useState(0),[l,d]=j.useState(``),[p,y]=j.useState(0),[b,x]=j.useState(null),[S,C]=j.useState(!1),w=j.useCallback(e=>{n(e),d(``),y(0),x(null)},[]),T=j.useCallback(t=>e(t,{display:`system`}),[e]);s((e,n)=>{if(t.kind!==`menu`||S)return;if(n.upArrow){c(e=>Math.max(0,e-1));return}if(n.downArrow){c(e=>Math.min(F.length-1,e+1));return}if(n.return){let e=F[a];if(!e)return;if(e.kind===`about`){T(N);return}if(e.kind===`list`){C(!0),f().then(e=>{T(O(e))});return}w({kind:`collect-key`,action:e.kind});return}let r=Number(e);Number.isInteger(r)&&r>=1&&r<=F.length&&c(r-1)},{isActive:t.kind===`menu`&&!S}),s((e,n)=>{if(t.kind!==`confirm-overwrite`&&t.kind!==`confirm-delete`)return;if(n.escape){w({kind:`menu`});return}let r=e.toLowerCase();if(r===`y`||n.return)if(t.kind===`confirm-delete`){C(!0);let e=t.key;g(e).then(t=>{T(t?`Deleted: ${e}`:`Key not found: ${e}`)})}else{C(!0);let e=t.key,n=t.value;v(e,n).then(()=>T(`Secret stored: ${e} = [REDACTED]`)).catch(t=>T(`Failed to store ${e}: ${t instanceof Error?t.message:String(t)}`))}else r===`n`&&w({kind:`menu`})},{isActive:(t.kind===`confirm-overwrite`||t.kind===`confirm-delete`)&&!S}),s((e,n)=>{if(!(t.kind!==`collect-key`&&t.kind!==`collect-value`)&&n.escape){if(t.kind===`collect-value`){w({kind:`collect-key`,action:`set`});return}w({kind:`menu`})}},{isActive:(t.kind===`collect-key`||t.kind===`collect-value`)&&!S});let E=e=>{let n=e.trim();if(!n){x(`Key required`);return}if(!h(n)){x(`Invalid key (allowed: letters/digits/._- only; no leading dot; not a Windows reserved name)`);return}if(t.kind===`collect-key`){if(t.action===`get`){C(!0),m(n).then(e=>{T(e===null?`Key not found: ${n}`:`Key found: ${n} = ${_(e)}`)});return}if(t.action===`delete`){w({kind:`confirm-delete`,key:n});return}if(t.action===`set`){w({kind:`collect-value`,key:n});return}}},D=e=>{if(t.kind!==`collect-value`)return;if(e.length===0){x(`Secret value cannot be empty`);return}let n=t.key;C(!0),m(n).then(t=>{if(t!==null){C(!1),w({kind:`confirm-overwrite`,key:n,value:e});return}return v(n,e).then(()=>T(`Secret stored: ${n} = [REDACTED]`))}).catch(e=>T(`Failed to store ${n}: ${e instanceof Error?e.message:String(e)}`))};if(t.kind===`menu`)return(0,M.jsx)(i,{title:`Local Vault`,subtitle:`${F.length} actions`,onCancel:()=>T(`Local vault panel dismissed`),color:`background`,hideInputGuide:!0,children:(0,M.jsxs)(o,{flexDirection:`column`,children:[F.map((e,t)=>(0,M.jsxs)(o,{flexDirection:`row`,children:[(0,M.jsx)(r,{children:`${t===a?`›`:` `} ${e.label}`.padEnd(P)}),(0,M.jsx)(r,{dimColor:!0,children:e.description})]},e.kind)),S&&(0,M.jsx)(o,{marginTop:1,children:(0,M.jsx)(r,{dimColor:!0,children:`Working...`})}),(0,M.jsx)(o,{marginTop:1,children:(0,M.jsx)(r,{dimColor:!0,children:`↑/↓ or 1-5 select · Enter run · Esc close`})})]})});if(t.kind===`confirm-delete`)return(0,M.jsx)(i,{title:`Confirm Delete`,onCancel:()=>w({kind:`menu`}),color:`warning`,hideInputGuide:!0,children:(0,M.jsxs)(o,{flexDirection:`column`,children:[(0,M.jsxs)(r,{children:[`Delete secret "`,t.key,`"? This cannot be undone.`]}),(0,M.jsx)(o,{marginTop:1,children:(0,M.jsx)(r,{dimColor:!0,children:`y/Enter = delete · n/Esc = cancel`})}),S&&(0,M.jsx)(r,{dimColor:!0,children:`Deleting...`})]})});if(t.kind===`confirm-overwrite`)return(0,M.jsx)(i,{title:`Confirm Overwrite`,onCancel:()=>w({kind:`menu`}),color:`warning`,hideInputGuide:!0,children:(0,M.jsxs)(o,{flexDirection:`column`,children:[(0,M.jsxs)(r,{children:[`Secret "`,t.key,`" already exists. Overwrite? Old value is lost.`]}),(0,M.jsx)(o,{marginTop:1,children:(0,M.jsx)(r,{dimColor:!0,children:`y/Enter = overwrite · n/Esc = cancel`})}),S&&(0,M.jsx)(r,{dimColor:!0,children:`Storing...`})]})});let k=t.kind===`collect-key`?`KEY NAME`:`SECRET VALUE`,A=t.kind===`collect-key`?`e.g. github-token`:`(masked input — value never displayed)`,I=t.kind===`collect-key`?E:D,L=t.kind===`collect-value`;return(0,M.jsx)(i,{title:`Local Vault · ${t.kind===`collect-key`?`KEY`:`VALUE`}`,onCancel:()=>w({kind:`menu`}),color:`background`,hideInputGuide:!0,children:(0,M.jsxs)(o,{flexDirection:`column`,children:[(0,M.jsx)(o,{children:(0,M.jsx)(r,{dimColor:!0,children:k})}),(0,M.jsxs)(o,{children:[(0,M.jsx)(r,{children:`> `}),(0,M.jsx)(u,{value:l,onChange:e=>{d(e),x(null)},cursorOffset:p,onChangeCursorOffset:y,onSubmit:I,placeholder:A,columns:70,showCursor:!0,mask:L?`*`:void 0})]}),b!==null&&(0,M.jsx)(o,{marginTop:0,children:(0,M.jsxs)(r,{color:`warning`,children:[`✗ `,b]})}),S&&(0,M.jsx)(o,{marginTop:0,children:(0,M.jsx)(r,{dimColor:!0,children:`Working...`})}),(0,M.jsx)(o,{marginTop:1,children:(0,M.jsx)(r,{dimColor:!0,children:`Enter = next · Esc = back`})})]})})}async function A(e,t){if(e.action===`list`)return t(O(await f()),{display:`system`}),null;if(e.action===`set`){let{key:n,value:r}=e;return await v(n,r),t(`Secret stored: ${n} = [REDACTED]`,{display:`system`}),null}if(e.action===`get`){let{key:n,reveal:r}=e,i=await m(n);return i===null?(t(`Key not found: ${n}`,{display:`system`}),null):r?(t([`Secret revealed for: ${n}`,`Warning: secret revealed in terminal.`,`${n} = ${i}`].join(`
3
- `),{display:`system`}),null):(t(`Key found: ${n} = ${_(i)}`,{display:`system`}),null)}if(e.action===`delete`){let{key:n}=e;return await g(n)?(t(`Deleted: ${n}`,{display:`system`}),null):(t(`Key not found: ${n}`,{display:`system`}),null)}return t(N,{display:`system`}),null}var j,M,N,P,F,I,L;e((()=>{j=t(n(),1),a(),p(),l(),d(),C(),D(),b(),M=c(),N=`Usage: /local-vault list | set KEY VALUE | get KEY [--reveal] | delete KEY`,P=26,F=[{kind:`list`,label:`List`,description:`Show stored secret keys`},{kind:`set`,label:`Set`,description:`Store a secret: KEY + VALUE (input is masked)`},{kind:`get`,label:`Get`,description:`Look up a secret (returns masked preview)`},{kind:`delete`,label:`Delete`,description:`Delete a stored secret by KEY`},{kind:`about`,label:`About`,description:`Show command syntax`}],I=y({commandName:`local-vault`,parseArgs:e=>{let t=w(e);return t.action===`invalid`?{action:`invalid`,reason:`${N}\n${t.reason}`}:t},dispatch:A,View:x,errorView:e=>j.createElement(x,{mode:`error`,message:e})}),L=async(e,t,n)=>(n??``).trim()===``?(0,M.jsx)(k,{onDone:e}):I(e,t,n)}))();export{L as callLocalVault};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Rn as r,b as i,t as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{o as f,u as p}from"./api-CslgFoHj.js";import{n as m,r as h}from"./hostGuard-zim_4F9V.js";import{n as g,t as _}from"./launchCommand-Du91jxMC.js";function v(e){return new Promise(t=>setTimeout(t,e))}async function y(){let e;try{e=(await p()).apiKey}catch(e){throw new L(e instanceof Error?e.message:String(e),501)}return m(b()),{"x-api-key":e,"anthropic-version":`2023-06-01`,"anthropic-beta":F,"content-type":`application/json`}}function b(){return`${u().BASE_API_URL}/v1/memory_stores`}function x(e){if(t.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new L(`Authentication failed. Please run /login to re-authenticate.`,401);if(t===403)return new L(`Subscription required. Memory stores require a Claude Pro/Max/Team subscription.`,403);if(t===404)return new L(`Memory store or memory not found.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``;return new L(`Rate limit exceeded.${t?` Retry after ${t}s.`:``}`,429)}return new L((e.response?.data)?.error?.message??e.message,t)}return e instanceof L?e:new L(e instanceof Error?e.message:String(e),0)}function S(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function C(e){let n;for(let r=0;r<I;r++)try{return await e()}catch(e){let i=x(e);if(i.statusCode>=500){n=i,r<I-1&&await v(S(t.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**r);continue}throw i}throw n??new L(`Request failed after retries`,0)}async function w(){return C(async()=>{let e=await y();return(await t.get(b(),{headers:e})).data.data??[]})}async function T(e,n){return C(async()=>{let r=await y(),i={name:e};return n&&(i.namespace=n),(await t.post(b(),i,{headers:r})).data})}async function E(e){return C(async()=>{let n=await y();return(await t.get(`${b()}/${e}`,{headers:n})).data})}async function D(e){return C(async()=>{let n=await y();return(await t.post(`${b()}/${e}/archive`,{},{headers:n})).data})}async function O(e){return C(async()=>{let n=await y();return(await t.get(`${b()}/${e}/memories`,{headers:n})).data.data??[]})}async function k(e,n){return C(async()=>{let r=await y(),i={content:n};return(await t.post(`${b()}/${e}/memories`,i,{headers:r})).data})}async function A(e,n){return C(async()=>{let r=await y();return(await t.get(`${b()}/${e}/memories/${n}`,{headers:r})).data})}async function j(e,n,r){return C(async()=>{let i=await y(),a={content:r};return(await t.patch(`${b()}/${e}/memories/${n}`,a,{headers:i})).data})}async function M(e,n){return C(async()=>{let r=await y();await t.delete(`${b()}/${e}/memories/${n}`,{headers:r})})}async function N(e){return C(async()=>{let n=await y();return(await t.get(`${b()}/${e}/memory_versions`,{headers:n})).data.data??[]})}async function P(e,n){return C(async()=>{let r=await y();return(await t.post(`${b()}/${e}/memory_versions/${n}/redact`,{},{headers:r})).data})}var F,I,L,R=e((()=>{n(),d(),h(),f(),F=`managed-agents-2026-04-01`,I=3,L=class extends Error{constructor(e,t){super(e),this.statusCode=t,this.name=`MemoryStoresApiError`}}}));function z({store:e}){let t=!!e.archived_at,n=e.created_at?new Date(e.created_at).toLocaleString():`—`;return(0,V.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,V.jsxs)(o,{children:[(0,V.jsx)(i,{bold:!0,children:e.memory_store_id}),(0,V.jsx)(i,{dimColor:!0,children:` · `}),(0,V.jsx)(i,{color:t?`warning`:`success`,children:t?`archived`:`active`}),e.namespace?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(i,{dimColor:!0,children:` · ns: `}),(0,V.jsx)(i,{children:e.namespace})]}):null]}),(0,V.jsxs)(i,{children:[`Name: `,e.name]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Created: `,n]})]})}function B(e){if(e.mode===`list`)return e.stores.length===0?(0,V.jsx)(o,{children:(0,V.jsx)(i,{dimColor:!0,children:`No memory stores found. Use /memory-stores create <name> to create one.`})}):(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(i,{bold:!0,children:[`Memory Stores (`,e.stores.length,`)`]})}),e.stores.map(e=>(0,V.jsx)(z,{store:e},e.memory_store_id))]});if(e.mode===`detail`){let{store:t}=e,n=!!t.archived_at,r=t.created_at?new Date(t.created_at).toLocaleString():`—`,a=t.archived_at?new Date(t.archived_at).toLocaleString():null;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(i,{bold:!0,children:[`Memory Store: `,t.memory_store_id]})}),(0,V.jsxs)(i,{children:[`Name: `,t.name]}),t.namespace?(0,V.jsxs)(i,{children:[`Namespace: `,t.namespace]}):null,(0,V.jsxs)(i,{children:[`Status:`,` `,(0,V.jsx)(i,{color:n?`warning`:`success`,children:n?`archived`:`active`})]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Created: `,r]}),a?(0,V.jsxs)(i,{dimColor:!0,children:[`Archived: `,a]}):null]})}if(e.mode===`created`){let{store:t}=e;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(i,{bold:!0,color:`success`,children:`Memory store created`})}),(0,V.jsxs)(i,{children:[`ID: `,t.memory_store_id]}),(0,V.jsxs)(i,{children:[`Name: `,t.name]}),t.namespace?(0,V.jsxs)(i,{children:[`Namespace: `,t.namespace]}):null]})}if(e.mode===`archived`){let{store:t}=e,n=t.archived_at?new Date(t.archived_at).toLocaleString():`—`;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(i,{bold:!0,color:`warning`,children:`Memory store archived`})}),(0,V.jsxs)(i,{children:[`ID: `,t.memory_store_id]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Archived at: `,n]})]})}if(e.mode===`memory-list`){let{storeId:t,memories:n}=e;return n.length===0?(0,V.jsx)(o,{children:(0,V.jsxs)(i,{dimColor:!0,children:[`No memories in store `,t,`. Use /memory-stores create-memory `,t,` <content> to add one.`]})}):(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(i,{bold:!0,children:[`Memories in `,t,` (`,n.length,`)`]})}),n.map(e=>(0,V.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,V.jsx)(i,{bold:!0,children:e.memory_id}),(0,V.jsx)(i,{dimColor:!0,children:e.content.length>80?`${e.content.slice(0,80)}…`:e.content})]},e.memory_id))]})}if(e.mode===`memory-detail`){let{memory:t}=e,n=t.created_at?new Date(t.created_at).toLocaleString():`—`,r=t.updated_at?new Date(t.updated_at).toLocaleString():`—`;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(i,{bold:!0,children:[`Memory: `,t.memory_id]})}),(0,V.jsxs)(i,{children:[`Store: `,t.memory_store_id]}),(0,V.jsxs)(i,{children:[`Content: `,t.content]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Created: `,n]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Updated: `,r]})]})}if(e.mode===`memory-created`){let{memory:t}=e;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(i,{bold:!0,color:`success`,children:`Memory created`})}),(0,V.jsxs)(i,{children:[`ID: `,t.memory_id]}),(0,V.jsxs)(i,{children:[`Store: `,t.memory_store_id]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Content: `,t.content]})]})}if(e.mode===`memory-updated`){let{memory:t}=e;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(i,{bold:!0,color:`success`,children:`Memory updated`})}),(0,V.jsxs)(i,{children:[`ID: `,t.memory_id]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Content: `,t.content]})]})}if(e.mode===`memory-deleted`)return(0,V.jsx)(o,{children:(0,V.jsxs)(i,{color:`success`,children:[`Memory `,e.memoryId,` deleted from store `,e.storeId,`.`]})});if(e.mode===`versions`){let{storeId:t,versions:n}=e;return n.length===0?(0,V.jsx)(o,{children:(0,V.jsxs)(i,{dimColor:!0,children:[`No memory versions found for store `,t,`.`]})}):(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(i,{bold:!0,children:[`Memory Versions in `,t,` (`,n.length,`)`]})}),n.map(e=>{let t=e.created_at?new Date(e.created_at).toLocaleString():`—`,n=!!e.redacted_at;return(0,V.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,V.jsxs)(o,{children:[(0,V.jsx)(i,{bold:!0,children:e.version_id}),n?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(i,{dimColor:!0,children:` · `}),(0,V.jsx)(i,{color:`warning`,children:`redacted`})]}):null]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Created: `,t]})]},e.version_id)})]})}if(e.mode===`redacted`){let{version:t}=e,n=t.redacted_at?new Date(t.redacted_at).toLocaleString():`—`;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(i,{bold:!0,color:`warning`,children:`Version redacted`})}),(0,V.jsxs)(i,{children:[`ID: `,t.version_id]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Redacted at: `,n]})]})}return(0,V.jsx)(o,{children:(0,V.jsx)(i,{color:`error`,children:e.message})})}var V,H=e((()=>{r(),a(),V=s()}));function U(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`get`){if(!i)return{action:`invalid`,reason:`get requires a store id`};let e=i.split(/\s+/)[0];return e?{action:`get`,id:e}:{action:`invalid`,reason:`get requires a store id`}}if(r===`create`)return i?{action:`create`,name:i}:{action:`invalid`,reason:`create requires a store name, e.g. create "My Work Store"`};if(r===`archive`){if(!i)return{action:`invalid`,reason:`archive requires a store id`};let e=i.split(/\s+/)[0];return e?{action:`archive`,id:e}:{action:`invalid`,reason:`archive requires a store id`}}if(r===`memories`){if(!i)return{action:`invalid`,reason:`memories requires a store id`};let e=i.split(/\s+/)[0];return e?{action:`memories`,storeId:e}:{action:`invalid`,reason:`memories requires a store id`}}if(r===`create-memory`){let e=i.split(/\s+/);if(e.length<2||!e[0])return{action:`invalid`,reason:`create-memory requires a store id and content, e.g. create-memory ms_123 "The content"`};let t=e[0],n=e.slice(1).join(` `);return n.trim()?{action:`create-memory`,storeId:t,content:n.trim()}:{action:`invalid`,reason:`create-memory requires non-empty content`}}if(r===`get-memory`){let e=i.split(/\s+/);return e.length<2||!e[0]||!e[1]?{action:`invalid`,reason:`get-memory requires a store id and memory id, e.g. get-memory ms_123 mem_456`}:{action:`get-memory`,storeId:e[0],memoryId:e[1]}}if(r===`update-memory`){let e=i.split(/\s+/);if(e.length<3||!e[0]||!e[1])return{action:`invalid`,reason:`update-memory requires store id, memory id, and content, e.g. update-memory ms_123 mem_456 "New content"`};let t=e[0],n=e[1],r=e.slice(2).join(` `);return r.trim()?{action:`update-memory`,storeId:t,memoryId:n,content:r.trim()}:{action:`invalid`,reason:`update-memory requires non-empty content`}}if(r===`delete-memory`){let e=i.split(/\s+/);return e.length<2||!e[0]||!e[1]?{action:`invalid`,reason:`delete-memory requires a store id and memory id, e.g. delete-memory ms_123 mem_456`}:{action:`delete-memory`,storeId:e[0],memoryId:e[1]}}if(r===`versions`){if(!i)return{action:`invalid`,reason:`versions requires a store id`};let e=i.split(/\s+/)[0];return e?{action:`versions`,storeId:e}:{action:`invalid`,reason:`versions requires a store id`}}if(r===`redact`){let e=i.split(/\s+/);return e.length<2||!e[0]||!e[1]?{action:`invalid`,reason:`redact requires a store id and version id, e.g. redact ms_123 ver_456`}:{action:`redact`,storeId:e[0],versionId:e[1]}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${W}`}}var W,G=e((()=>{W=`Usage: /memory-stores list | get ID | create NAME | archive ID | memories STORE_ID | create-memory STORE_ID CONTENT | get-memory STORE_ID MEMORY_ID | update-memory STORE_ID MEMORY_ID CONTENT | delete-memory STORE_ID MEMORY_ID | versions STORE_ID | redact STORE_ID VERSION_ID`}));async function K(e,t){if(e.action===`list`){l(`tengu_memory_stores_list`,{});try{let e=await w();return t(e.length===0?`No memory stores found.`:`${e.length} memory store(s).`,{display:`system`}),{mode:`list`,stores:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:n}),t(`Failed to list memory stores: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`get`){let{id:n}=e;l(`tengu_memory_stores_get`,{id:n});try{let e=await E(n);return t(`Memory store ${n} fetched.`,{display:`system`}),{mode:`detail`,store:e}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:r}),t(`Failed to get memory store ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}if(e.action===`create`){let{name:n}=e;l(`tengu_memory_stores_create`,{name:n});try{let e=await T(n);return t(`Memory store created: ${e.memory_store_id}`,{display:`system`}),{mode:`created`,store:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:n}),t(`Failed to create memory store: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`archive`){let{id:n}=e;l(`tengu_memory_stores_archive`,{id:n});try{let e=await D(n);return t(`Memory store ${n} archived.`,{display:`system`}),{mode:`archived`,store:e}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:r}),t(`Failed to archive memory store ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}if(e.action===`memories`){let{storeId:n}=e;l(`tengu_memory_stores_list_memories`,{storeId:n});try{let e=await O(n);return t(e.length===0?`No memories in store ${n}.`:`${e.length} memory(ies) in store ${n}.`,{display:`system`}),{mode:`memory-list`,storeId:n,memories:e}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:r}),t(`Failed to list memories in store ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}if(e.action===`create-memory`){let{storeId:n,content:r}=e;l(`tengu_memory_stores_create_memory`,{storeId:n});try{let e=await k(n,r);return t(`Memory created: ${e.memory_id}`,{display:`system`}),{mode:`memory-created`,memory:e}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:r}),t(`Failed to create memory in store ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}if(e.action===`get-memory`){let{storeId:n,memoryId:r}=e;l(`tengu_memory_stores_get_memory`,{storeId:n});try{let e=await A(n,r);return t(`Memory ${r} fetched.`,{display:`system`}),{mode:`memory-detail`,memory:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:n}),t(`Failed to get memory ${r}: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`update-memory`){let{storeId:n,memoryId:r,content:i}=e;l(`tengu_memory_stores_update_memory`,{storeId:n});try{let e=await j(n,r,i);return t(`Memory ${r} updated.`,{display:`system`}),{mode:`memory-updated`,memory:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:n}),t(`Failed to update memory ${r}: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`delete-memory`){let{storeId:n,memoryId:r}=e;l(`tengu_memory_stores_delete_memory`,{storeId:n});try{return await M(n,r),t(`Memory ${r} deleted.`,{display:`system`}),{mode:`memory-deleted`,storeId:n,memoryId:r}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:n}),t(`Failed to delete memory ${r}: ${n}`,{display:`system`}),{mode:`error`,message:n}}}if(e.action===`versions`){let{storeId:n}=e;l(`tengu_memory_stores_versions`,{storeId:n});try{let e=await N(n);return t(e.length===0?`No memory versions found for store ${n}.`:`${e.length} version(s) in store ${n}.`,{display:`system`}),{mode:`versions`,storeId:n,versions:e}}catch(e){let r=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:r}),t(`Failed to list versions for store ${n}: ${r}`,{display:`system`}),{mode:`error`,message:r}}}let{storeId:n,versionId:r}=e;l(`tengu_memory_stores_redact`,{storeId:n});try{let e=await P(n,r);return t(`Version ${r} redacted.`,{display:`system`}),{mode:`redacted`,version:e}}catch(e){let n=e instanceof Error?e.message:String(e);return l(`tengu_memory_stores_failed`,{reason:n}),t(`Failed to redact version ${r}: ${n}`,{display:`system`}),{mode:`error`,message:n}}}var q,J;e((()=>{c(),R(),H(),G(),_(),q=`Usage: /memory-stores list | get ID | create NAME | archive ID | memories STORE_ID | create-memory STORE_ID CONTENT | get-memory STORE_ID MEMORY_ID | update-memory STORE_ID MEMORY_ID CONTENT | delete-memory STORE_ID MEMORY_ID | versions STORE_ID | redact STORE_ID VERSION_ID`,J=g({commandName:`memory-stores`,parseArgs:e=>{l(`tengu_memory_stores_started`,{args:e});let t=U(e);return t.action===`invalid`?(l(`tengu_memory_stores_failed`,{reason:t.reason}),{action:`invalid`,reason:`${q}\n${t.reason}`}):t},dispatch:K,View:B,errorView:e=>null})}))();export{J as callMemoryStores};
@@ -1,8 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,T as n,b as r,p as i,t as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{Ac as c,Nc as l,Pc as u,Sc as d}from"./paths-BZbIj1Z1.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./ThemePicker-C0JghXSS.js";function g(e){return e}function _(e){let t=e.trim().toLowerCase();return t===``||t===`reset`?{sub:`full`}:x.has(t)?{sub:t}:{sub:`full`,unknownArg:t}}function v({onDone:e}){let[,t]=n();return(0,b.jsx)(i,{color:`permission`,children:(0,b.jsx)(h,{onThemeSelect:n=>{t(n),p(`tengu_onboarding_step`,{stepId:g(`theme`)}),e(`Theme set to ${n}.`)},onCancel:()=>e(`Theme picker dismissed.`),skipExitHandling:!0})})}function y({theme:e,hasCompletedOnboarding:t,lastOnboardingVersion:n}){return(0,b.jsxs)(o,{flexDirection:`column`,paddingLeft:1,children:[(0,b.jsx)(r,{bold:!0,children:`Onboarding status`}),(0,b.jsxs)(r,{children:[`- Theme: `,(0,b.jsx)(r,{bold:!0,children:e})]}),(0,b.jsxs)(r,{children:[`- Onboarding completed:`,` `,(0,b.jsx)(r,{bold:!0,color:t?`success`:`warning`,children:t?`yes`:`no`})]}),(0,b.jsxs)(r,{children:[`- Last onboarding version: `,(0,b.jsx)(r,{bold:!0,children:n})]}),(0,b.jsx)(r,{dimColor:!0,children:`Run /onboarding (no args) to re-run the full flow, or /onboarding theme | trust | model | mcp for a specific step.`})]})}var b,x,S;e((()=>{t(),a(),f(),m(),c(),b=s(),x=new Set([`full`,`theme`,`trust`,`model`,`mcp`,`status`]),S=async(e,t,n)=>{let{sub:r,unknownArg:i}=_(n);if(p(`tengu_onboarding_step`,{stepId:g(`slash_${r}`)}),i!==void 0)return e(`Unknown /onboarding subcommand: \`${i}\`.\nValid: full | theme | trust | model | mcp | status`,{display:`system`}),null;if(r===`theme`)return(0,b.jsx)(v,{onDone:t=>e(t)});if(r===`trust`)return l(e=>({...e,hasTrustDialogAccepted:!1})),e("Workspace trust cleared for the current project. The trust dialog will appear on the next `claude` launch.",{display:`system`}),null;if(r===`model`)return e("Run `/model` to pick the AI model. Onboarding does not own the model picker; this entry exists for discoverability only.",{display:`system`}),null;if(r===`mcp`)return e("MCP server setup:\n - `/mcp` — list configured MCP servers\n - `claude mcp add <name> <command>` — add a server (in your shell)\n - `claude mcp remove <name>` — remove a server\nServers also load from `.mcp.json` in the workspace and from `~/.claude.json` globally.",{display:`system`}),null;if(r===`status`){let e=d();return(0,b.jsx)(y,{theme:e.theme??`(unset)`,hasCompletedOnboarding:e.hasCompletedOnboarding===!0,lastOnboardingVersion:e.lastOnboardingVersion??`(unset)`})}return u(e=>({...e,hasCompletedOnboarding:!1})),e(`Onboarding flag cleared. The full first-run setup (theme, OAuth/API key, security notes, terminal-setup) will run on the next \`claude\` launch.
2
-
3
- For individual steps in this session, use:
4
- /onboarding theme — re-pick theme inline
5
- /onboarding trust — re-confirm workspace trust on next launch
6
- /onboarding model — open /model picker
7
- /onboarding mcp — show MCP setup hints
8
- /onboarding status — show current onboarding state`,{display:`system`}),null}}))();export{S as callOnboarding};
@@ -1 +0,0 @@
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,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{n as l,r as u}from"./analytics-DqMQntaB.js";import{l as d,u as f}from"./oauth-CdZEzMww.js";import{i as p,n as m,r as h}from"./cron-DiW7eIPP.js";import{a as g,l as _,o as v}from"./api-CslgFoHj.js";import{r as y,t as b}from"./hostGuard-zim_4F9V.js";function x(e){return new Promise(t=>setTimeout(t,e))}async function S(){let e,t;try{let n=await _();e=n.accessToken,t=n.orgUUID}catch(e){throw new F(`Not authenticated: ${e instanceof Error?e.message:String(e)}. Run /login to re-authenticate.`,401)}return b(C()),{...g(e),"anthropic-beta":N,"x-organization-uuid":t}}function C(){return`${d().BASE_API_URL}/v1/code/triggers`}function w(e){if(n.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new F(`Authentication failed. Please run /login to re-authenticate.`,401);if(t===403)return new F(`Subscription required. Scheduled triggers require a Claude Pro/Max/Team subscription.`,403);if(t===404)return new F(`Trigger not found.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``;return new F(`Rate limit exceeded.${t?` Retry after ${t}s.`:``}`,429)}return new F((e.response?.data)?.error?.message??e.message,t)}return e instanceof F?e:new F(e instanceof Error?e.message:String(e),0)}function T(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function E(e){let t;for(let r=0;r<P;r++)try{return await e()}catch(e){let i=w(e);if(i.statusCode>=500){t=i,r<P-1&&await x(T(n.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**r);continue}throw i}throw t??new F(`Request failed after retries`,0)}async function D(){return E(async()=>{let e=await S();return(await n.get(C(),{headers:e})).data.data??[]})}async function O(e){return E(async()=>{let t=await S();return(await n.get(`${C()}/${e}`,{headers:t})).data})}async function k(e){return E(async()=>{let t=await S();return(await n.post(C(),e,{headers:t})).data})}async function A(e,t){return E(async()=>{let r=await S();return(await n.post(`${C()}/${e}`,t,{headers:r})).data})}async function j(e){return E(async()=>{let t=await S();await n.delete(`${C()}/${e}`,{headers:t})})}async function M(e){return E(async()=>{let t=await S();return(await n.post(`${C()}/${e}/run`,{},{headers:t})).data})}var N,P,F,I=e((()=>{r(),f(),y(),v(),N=`ccr-triggers-2026-01-30`,P=3,F=class extends Error{constructor(e,t){super(e),this.statusCode=t,this.name=`TriggersApiError`}}}));function L({trigger:e}){let t=m(e.cron_expression,{utc:!0}),n=e.next_run?new Date(e.next_run).toLocaleString():`—`,r=e.enabled?`enabled`:`disabled`;return(0,z.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,z.jsxs)(s,{children:[(0,z.jsx)(a,{bold:!0,children:e.trigger_id}),(0,z.jsx)(a,{dimColor:!0,children:` · `}),(0,z.jsx)(a,{color:e.enabled?`success`:`warning`,children:r}),e.agent_id?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(a,{dimColor:!0,children:` · agent: `}),(0,z.jsx)(a,{children:e.agent_id})]}):null]}),(0,z.jsxs)(a,{children:[`Schedule: `,t]}),(0,z.jsxs)(a,{dimColor:!0,children:[`Prompt: `,e.prompt]}),(0,z.jsxs)(a,{dimColor:!0,children:[`Next run: `,n]})]})}function R(e){if(e.mode===`list`)return e.triggers.length===0?(0,z.jsx)(s,{children:(0,z.jsx)(a,{dimColor:!0,children:`No scheduled triggers. Use /schedule create <cron> <prompt> to create one.`})}):(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(s,{marginBottom:1,children:(0,z.jsxs)(a,{bold:!0,children:[`Scheduled Triggers (`,e.triggers.length,`)`]})}),e.triggers.map(e=>(0,z.jsx)(L,{trigger:e},e.trigger_id))]});if(e.mode===`detail`){let{trigger:t}=e,n=m(t.cron_expression,{utc:!0}),r=t.next_run?new Date(t.next_run).toLocaleString():`—`,i=t.last_run?new Date(t.last_run).toLocaleString():`—`;return(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(s,{marginBottom:1,children:(0,z.jsxs)(a,{bold:!0,children:[`Trigger: `,t.trigger_id]})}),(0,z.jsxs)(a,{children:[`Status:`,` `,(0,z.jsx)(a,{color:t.enabled?`success`:`warning`,children:t.enabled?`enabled`:`disabled`})]}),(0,z.jsxs)(a,{children:[`Schedule: `,n]}),t.agent_id?(0,z.jsxs)(a,{children:[`Agent: `,t.agent_id]}):null,(0,z.jsxs)(a,{children:[`Next run: `,r]}),(0,z.jsxs)(a,{dimColor:!0,children:[`Last run: `,i]}),(0,z.jsxs)(a,{dimColor:!0,children:[`Prompt: `,t.prompt]}),t.created_at?(0,z.jsxs)(a,{dimColor:!0,children:[`Created: `,new Date(t.created_at).toLocaleString()]}):null]})}if(e.mode===`created`){let{trigger:t}=e,n=m(t.cron_expression,{utc:!0});return(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(s,{children:(0,z.jsx)(a,{bold:!0,color:`success`,children:`Trigger created`})}),(0,z.jsxs)(a,{children:[`ID: `,t.trigger_id]}),(0,z.jsxs)(a,{children:[`Schedule: `,n]}),(0,z.jsxs)(a,{children:[`Prompt: `,t.prompt]}),t.agent_id?(0,z.jsxs)(a,{children:[`Agent: `,t.agent_id]}):null,(0,z.jsxs)(a,{dimColor:!0,children:[`Status: `,t.enabled?`enabled`:`disabled`]})]})}if(e.mode===`updated`){let{trigger:t}=e;return(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(s,{children:(0,z.jsx)(a,{bold:!0,color:`success`,children:`Trigger updated`})}),(0,z.jsxs)(a,{children:[`ID: `,t.trigger_id]}),(0,z.jsxs)(a,{dimColor:!0,children:[`Status: `,t.enabled?`enabled`:`disabled`]})]})}return e.mode===`deleted`?(0,z.jsx)(s,{children:(0,z.jsxs)(a,{color:`success`,children:[`Trigger `,e.id,` deleted.`]})}):e.mode===`ran`?(0,z.jsxs)(s,{flexDirection:`column`,children:[(0,z.jsx)(s,{children:(0,z.jsxs)(a,{color:`success`,children:[`Trigger `,e.id,` fired.`]})}),(0,z.jsxs)(a,{dimColor:!0,children:[`Run ID: `,e.runId]})]}):e.mode===`enabled`?(0,z.jsx)(s,{children:(0,z.jsxs)(a,{color:`success`,children:[`Trigger `,e.id,` enabled.`]})}):e.mode===`disabled`?(0,z.jsx)(s,{children:(0,z.jsxs)(a,{color:`warning`,children:[`Trigger `,e.id,` disabled.`]})}):(0,z.jsx)(s,{children:(0,z.jsx)(a,{color:`error`,children:e.message})})}var z,B=e((()=>{i(),o(),h(),z=c()}));function V(e){let t=e.trim().split(/\s+/);return t.length<6?null:{cron:t.slice(0,5).join(` `),prompt:t.slice(5).join(` `)}}function H(e){return e.trim().split(/\s+/).length===5}function U(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`get`){if(!i)return{action:`invalid`,reason:`get requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:`get`,id:e}:{action:`invalid`,reason:`get requires a trigger id`}}if(r===`create`){if(!i)return{action:`invalid`,reason:`create requires a cron expression and prompt, e.g. create "0 9 * * 1" Run weekly standup`};let e=V(i);if(!e)return{action:`invalid`,reason:`create requires 5 cron fields followed by a prompt, e.g. create "0 9 * * 1" Run weekly standup`};let{cron:t,prompt:n}=e;return H(t)?n.trim()?{action:`create`,cron:t,prompt:n.trim()}:{action:`invalid`,reason:`prompt cannot be empty`}:{action:`invalid`,reason:`Invalid cron expression: "${t}". Expected 5 fields (minute hour day month weekday).`}}if(r===`update`){let e=i.split(/\s+/);if(e.length<3||!e[0])return{action:`invalid`,reason:`update requires an id, field, and value, e.g. update trg_123 enabled false`};let t=e[0],n=e[1]??``,r=e.slice(2).join(` `);return n?r?{action:`update`,id:t,field:n,value:r}:{action:`invalid`,reason:`update requires a value`}:{action:`invalid`,reason:`update requires a field name`}}if(r===`delete`){if(!i)return{action:`invalid`,reason:`delete requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:`delete`,id:e}:{action:`invalid`,reason:`delete requires a trigger id`}}if(r===`run`){if(!i)return{action:`invalid`,reason:`run requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:`run`,id:e}:{action:`invalid`,reason:`run requires a trigger id`}}if(r===`enable`||r===`disable`){if(!i)return{action:`invalid`,reason:`${r} requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:r,id:e}:{action:`invalid`,reason:`${r} requires a trigger id`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${W}`}}var W,G=e((()=>{W=`Usage: /schedule list | get ID | create CRON PROMPT | update ID FIELD VALUE | delete ID | run ID | enable ID | disable ID`})),K,q;e((()=>{K=t(i(),1),l(),h(),I(),B(),G(),q=async(e,t,n)=>{u(`tengu_schedule_started`,{args:n??``});let r=U(n??``);if(r.action===`invalid`)return u(`tengu_schedule_failed`,{reason:r.reason}),e(`Usage: /schedule list | get ID | create CRON PROMPT | update ID FIELD VALUE | delete ID | run ID | enable ID | disable ID\n${r.reason}`,{display:`system`}),null;if(r.action===`list`){u(`tengu_schedule_list`,{});try{let t=await D();return e(t.length===0?`No scheduled triggers found.`:`${t.length} scheduled trigger(s).`,{display:`system`}),K.createElement(R,{mode:`list`,triggers:t})}catch(t){let n=t instanceof Error?t.message:String(t);return u(`tengu_schedule_failed`,{reason:n}),e(`Failed to list triggers: ${n}`,{display:`system`}),K.createElement(R,{mode:`error`,message:n})}}if(r.action===`get`){let{id:t}=r;u(`tengu_schedule_get`,{id:t});try{let n=await O(t);return e(`Trigger ${t} fetched.`,{display:`system`}),K.createElement(R,{mode:`detail`,trigger:n})}catch(n){let r=n instanceof Error?n.message:String(n);return u(`tengu_schedule_failed`,{reason:r}),e(`Failed to get trigger ${t}: ${r}`,{display:`system`}),K.createElement(R,{mode:`error`,message:r})}}if(r.action===`create`){let{cron:t,prompt:n}=r;if(!p(t)){let n=`Invalid cron expression: "${t}". Expected 5 fields (minute hour day month weekday).`;return u(`tengu_schedule_failed`,{reason:n}),e(n,{display:`system`}),null}u(`tengu_schedule_create`,{cron:t});try{let r=await k({cron_expression:t,prompt:n});return e(`Trigger created: ${r.trigger_id}`,{display:`system`}),K.createElement(R,{mode:`created`,trigger:r})}catch(t){let n=t instanceof Error?t.message:String(t);return u(`tengu_schedule_failed`,{reason:n}),e(`Failed to create trigger: ${n}`,{display:`system`}),K.createElement(R,{mode:`error`,message:n})}}if(r.action===`update`){let{id:t,field:n,value:i}=r;u(`tengu_schedule_update`,{id:t,field:n});let a={};if(n===`enabled`)a={enabled:i===`true`||i===`1`};else if(n===`cron_expression`||n===`cron`)a={cron_expression:i};else if(n===`prompt`)a={prompt:i};else if(n===`agent_id`)a={agent_id:i};else{let t=`Unknown field "${n}". Valid fields: enabled, cron_expression, prompt, agent_id`;return u(`tengu_schedule_failed`,{reason:t}),e(t,{display:`system`}),K.createElement(R,{mode:`error`,message:t})}try{let n=await A(t,a);return e(`Trigger ${t} updated.`,{display:`system`}),K.createElement(R,{mode:`updated`,trigger:n})}catch(n){let r=n instanceof Error?n.message:String(n);return u(`tengu_schedule_failed`,{reason:r}),e(`Failed to update trigger ${t}: ${r}`,{display:`system`}),K.createElement(R,{mode:`error`,message:r})}}if(r.action===`delete`){let{id:t}=r;u(`tengu_schedule_delete`,{id:t});try{return await j(t),e(`Trigger ${t} deleted.`,{display:`system`}),K.createElement(R,{mode:`deleted`,id:t})}catch(n){let r=n instanceof Error?n.message:String(n);return u(`tengu_schedule_failed`,{reason:r}),e(`Failed to delete trigger ${t}: ${r}`,{display:`system`}),K.createElement(R,{mode:`error`,message:r})}}if(r.action===`run`){let{id:t}=r;u(`tengu_schedule_run`,{id:t});try{let n=await M(t);return e(`Trigger ${t} fired. Run ID: ${n.run_id}`,{display:`system`}),K.createElement(R,{mode:`ran`,id:t,runId:n.run_id})}catch(n){let r=n instanceof Error?n.message:String(n);return u(`tengu_schedule_failed`,{reason:r}),e(`Failed to run trigger ${t}: ${r}`,{display:`system`}),K.createElement(R,{mode:`error`,message:r})}}if(r.action===`enable`){let{id:t}=r;u(`tengu_schedule_enable`,{id:t});try{return await A(t,{enabled:!0}),e(`Trigger ${t} enabled.`,{display:`system`}),K.createElement(R,{mode:`enabled`,id:t})}catch(n){let r=n instanceof Error?n.message:String(n);return u(`tengu_schedule_failed`,{reason:r}),e(`Failed to enable trigger ${t}: ${r}`,{display:`system`}),K.createElement(R,{mode:`error`,message:r})}}let{id:i}=r;u(`tengu_schedule_disable`,{id:i});try{return await A(i,{enabled:!1}),e(`Trigger ${i} disabled.`,{display:`system`}),K.createElement(R,{mode:`disabled`,id:i})}catch(t){let n=t instanceof Error?t.message:String(t);return u(`tengu_schedule_failed`,{reason:n}),e(`Failed to disable trigger ${i}: ${n}`,{display:`system`}),K.createElement(R,{mode:`error`,message:n})}}}))();export{q as callSchedule};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{Rn as o,b as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{l as p,u as m}from"./oauth-CdZEzMww.js";import{o as h,u as g}from"./api-CslgFoHj.js";import{n as _,r as v}from"./hostGuard-zim_4F9V.js";import{join as y}from"node:path";import{mkdir as b,writeFile as x}from"node:fs/promises";function S(e){return new Promise(t=>setTimeout(t,e))}async function C(){let e;try{e=(await g()).apiKey}catch(e){throw new R(e instanceof Error?e.message:String(e),501)}return _(w()),{"x-api-key":e,"anthropic-version":`2023-06-01`,"content-type":`application/json`}}function w(){return`${p().BASE_API_URL}/v1/skills?beta=true`}function T(e){return`${p().BASE_API_URL}/v1/skills/${e}?beta=true`}function E(e){return`${p().BASE_API_URL}/v1/skills/${e}/versions?beta=true`}function D(e,t){return`${p().BASE_API_URL}/v1/skills/${e}/versions/${t}?beta=true`}function O(e){if(i.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new R(`Authentication failed. Please run /login to re-authenticate.`,401);if(t===403)return new R(`Subscription required. Skill store requires a Claude Pro/Max/Team subscription.`,403);if(t===404)return new R(`Skill or version not found.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``;return new R(`Rate limit exceeded.${t?` Retry after ${t}s.`:``}`,429)}return new R((e.response?.data)?.error?.message??e.message,t)}return e instanceof R?e:new R(e instanceof Error?e.message:String(e),0)}function k(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function A(e){let t;for(let n=0;n<L;n++)try{return await e()}catch(e){let r=O(e);if(r.statusCode>=500){t=r,n<L-1&&await S(k(i.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**n);continue}throw r}throw t??new R(`Request failed after retries`,0)}async function j(){return A(async()=>{let e=await C();return(await i.get(w(),{headers:e})).data.data??[]})}async function M(e){return A(async()=>{let t=await C();return(await i.get(T(e),{headers:t})).data})}async function N(e){return A(async()=>{let t=await C();return(await i.get(E(e),{headers:t})).data.data??[]})}async function P(e,t){return A(async()=>{let n=await C();return(await i.get(D(e,t),{headers:n})).data})}async function F(e,t){return A(async()=>{let n=await C(),r={name:e,body:t};return(await i.post(w(),r,{headers:n})).data})}async function I(e){return A(async()=>{let t=await C();await i.delete(T(e),{headers:t})})}var L,R,z=e((()=>{a(),m(),v(),h(),L=3,R=class extends Error{constructor(e,t){super(e),this.statusCode=t,this.name=`SkillsApiError`}}}));function B({skill:e}){let t=e.created_at?new Date(e.created_at).toLocaleString():`—`;return(0,H.jsxs)(l,{flexDirection:`column`,marginBottom:1,children:[(0,H.jsxs)(l,{children:[(0,H.jsx)(s,{bold:!0,children:e.skill_id}),(0,H.jsx)(s,{dimColor:!0,children:` · `}),(0,H.jsx)(s,{children:e.name}),e.deprecated?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(s,{dimColor:!0,children:` · `}),(0,H.jsx)(s,{color:`warning`,children:`deprecated`})]}):null]}),(0,H.jsxs)(s,{dimColor:!0,children:[`Owner: `,e.owner,e.owner_symbol?` (${e.owner_symbol})`:``]}),(0,H.jsxs)(s,{dimColor:!0,children:[`Created: `,t]})]})}function V(e){if(e.mode===`list`)return e.skills.length===0?(0,H.jsx)(l,{children:(0,H.jsx)(s,{dimColor:!0,children:`No skills found. Use /skill-store create <name> <markdown> to publish one.`})}):(0,H.jsxs)(l,{flexDirection:`column`,children:[(0,H.jsx)(l,{marginBottom:1,children:(0,H.jsxs)(s,{bold:!0,children:[`Skills (`,e.skills.length,`)`]})}),e.skills.map(e=>(0,H.jsx)(B,{skill:e},e.skill_id))]});if(e.mode===`detail`){let{skill:t}=e,n=t.created_at?new Date(t.created_at).toLocaleString():`—`;return(0,H.jsxs)(l,{flexDirection:`column`,children:[(0,H.jsx)(l,{marginBottom:1,children:(0,H.jsxs)(s,{bold:!0,children:[`Skill: `,t.skill_id]})}),(0,H.jsxs)(s,{children:[`Name: `,t.name]}),(0,H.jsxs)(s,{children:[`Owner: `,t.owner,t.owner_symbol?` (${t.owner_symbol})`:``]}),(0,H.jsxs)(s,{children:[`Status:`,` `,(0,H.jsx)(s,{color:t.deprecated?`warning`:`success`,children:t.deprecated?`deprecated`:`active`})]}),t.allowed_tools&&t.allowed_tools.length>0?(0,H.jsxs)(s,{children:[`Allowed tools: `,t.allowed_tools.join(`, `)]}):null,(0,H.jsxs)(s,{dimColor:!0,children:[`Created: `,n]})]})}if(e.mode===`versions`){let{id:t,versions:n}=e;return n.length===0?(0,H.jsx)(l,{children:(0,H.jsxs)(s,{dimColor:!0,children:[`No versions found for skill `,t,`.`]})}):(0,H.jsxs)(l,{flexDirection:`column`,children:[(0,H.jsx)(l,{marginBottom:1,children:(0,H.jsxs)(s,{bold:!0,children:[`Versions for `,t,` (`,n.length,`)`]})}),n.map(e=>{let t=e.created_at?new Date(e.created_at).toLocaleString():`—`;return(0,H.jsxs)(l,{flexDirection:`column`,marginBottom:1,children:[(0,H.jsx)(s,{bold:!0,children:e.version}),(0,H.jsxs)(s,{dimColor:!0,children:[`Created: `,t]}),(0,H.jsx)(s,{dimColor:!0,children:e.body.length>80?`${e.body.slice(0,80)}…`:e.body})]},e.version)})]})}if(e.mode===`version-detail`){let{version:t}=e,n=t.created_at?new Date(t.created_at).toLocaleString():`—`;return(0,H.jsxs)(l,{flexDirection:`column`,children:[(0,H.jsx)(l,{marginBottom:1,children:(0,H.jsxs)(s,{bold:!0,children:[`Version: `,t.version,` (skill: `,t.skill_id,`)`]})}),(0,H.jsxs)(s,{dimColor:!0,children:[`Created: `,n]}),(0,H.jsx)(l,{marginTop:1,children:(0,H.jsx)(s,{children:t.body})})]})}if(e.mode===`created`){let{skill:t}=e;return(0,H.jsxs)(l,{flexDirection:`column`,children:[(0,H.jsx)(l,{children:(0,H.jsx)(s,{bold:!0,color:`success`,children:`Skill created`})}),(0,H.jsxs)(s,{children:[`ID: `,t.skill_id]}),(0,H.jsxs)(s,{children:[`Name: `,t.name]})]})}return e.mode===`deleted`?(0,H.jsx)(l,{children:(0,H.jsxs)(s,{color:`success`,children:[`Skill `,e.id,` deleted.`]})}):e.mode===`installed`?(0,H.jsxs)(l,{flexDirection:`column`,children:[(0,H.jsx)(l,{children:(0,H.jsx)(s,{bold:!0,color:`success`,children:`Skill installed`})}),(0,H.jsxs)(s,{children:[`Name: `,e.skillName]}),(0,H.jsxs)(s,{dimColor:!0,children:[`Path: `,e.path]}),(0,H.jsxs)(s,{dimColor:!0,children:[`Load with: /skills (bundled skills are not auto-loaded; place in `,e.path,`)`]})]}):(0,H.jsx)(l,{children:(0,H.jsx)(s,{color:`error`,children:e.message})})}var H,U=e((()=>{o(),c(),H=u()}));function W(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`get`){if(!i)return{action:`invalid`,reason:`get requires a skill id`};let e=i.split(/\s+/)[0];return e?{action:`get`,id:e}:{action:`invalid`,reason:`get requires a skill id`}}if(r===`versions`){if(!i)return{action:`invalid`,reason:`versions requires a skill id`};let e=i.split(/\s+/)[0];return e?{action:`versions`,id:e}:{action:`invalid`,reason:`versions requires a skill id`}}if(r===`version`){let e=i.split(/\s+/);return e.length<2||!e[0]||!e[1]?{action:`invalid`,reason:`version requires a skill id and version, e.g. version sk_123 v1`}:{action:`version`,id:e[0],version:e[1]}}if(r===`create`){let e=i.indexOf(` `);if(!i||e===-1)return{action:`invalid`,reason:`create requires a skill name and markdown body, e.g. create my-skill "# My Skill\\nContent"`};let t=i.slice(0,e).trim(),n=i.slice(e+1).trim();return t?n?{action:`create`,name:t,markdown:n}:{action:`invalid`,reason:`create requires a non-empty markdown body`}:{action:`invalid`,reason:`create requires a non-empty skill name`}}if(r===`delete`){if(!i)return{action:`invalid`,reason:`delete requires a skill id`};let e=i.split(/\s+/)[0];return e?{action:`delete`,id:e}:{action:`invalid`,reason:`delete requires a skill id`}}if(r===`install`){if(!i)return{action:`invalid`,reason:`install requires a skill id (optionally with @version), e.g. install sk_123 or install sk_123@v2`};let e=i.split(/\s+/)[0];if(!e)return{action:`invalid`,reason:`install requires a skill id`};let t=e.indexOf(`@`);if(t===-1)return{action:`install`,id:e,version:void 0};let n=e.slice(0,t),r=e.slice(t+1);return n?r?{action:`install`,id:n,version:r}:{action:`invalid`,reason:`install requires a non-empty version after @`}:{action:`invalid`,reason:`install requires a non-empty skill id before @`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${G}`}}var G,K=e((()=>{G=`Usage: /skill-store list | get ID | versions ID | version ID VER | create NAME MARKDOWN | delete ID | install ID[@VERSION]`})),q,J,Y;e((()=>{q=t(o(),1),d(),r(),z(),U(),K(),J=`Usage: /skill-store list | get ID | versions ID | version ID VER | create NAME MARKDOWN | delete ID | install ID[@VERSION]`,Y=async(e,t,r)=>{f(`tengu_skill_store_started`,{args:r??``});let i=W(r??``);if(i.action===`invalid`)return f(`tengu_skill_store_failed`,{reason:i.reason}),e(`${J}\n${i.reason}`,{display:`system`}),null;if(i.action===`list`){f(`tengu_skill_store_list`,{});try{let t=await j();return e(t.length===0?`No skills found in the marketplace.`:`${t.length} skill(s) available.`,{display:`system`}),q.createElement(V,{mode:`list`,skills:t})}catch(t){let n=t instanceof Error?t.message:String(t);return f(`tengu_skill_store_failed`,{reason:n}),e(`Failed to list skills: ${n}`,{display:`system`}),q.createElement(V,{mode:`error`,message:n})}}if(i.action===`get`){let{id:t}=i;f(`tengu_skill_store_get`,{id:t});try{let n=await M(t);return e(`Skill ${t} fetched.`,{display:`system`}),q.createElement(V,{mode:`detail`,skill:n})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_skill_store_failed`,{reason:r}),e(`Failed to get skill ${t}: ${r}`,{display:`system`}),q.createElement(V,{mode:`error`,message:r})}}if(i.action===`versions`){let{id:t}=i;f(`tengu_skill_store_versions`,{id:t});try{let n=await N(t);return e(n.length===0?`No versions found for skill ${t}.`:`${n.length} version(s) for skill ${t}.`,{display:`system`}),q.createElement(V,{mode:`versions`,id:t,versions:n})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_skill_store_failed`,{reason:r}),e(`Failed to list versions for skill ${t}: ${r}`,{display:`system`}),q.createElement(V,{mode:`error`,message:r})}}if(i.action===`version`){let{id:t,version:n}=i;f(`tengu_skill_store_version`,{id:t});try{let r=await P(t,n);return e(`Skill ${t}@${n} fetched.`,{display:`system`}),q.createElement(V,{mode:`version-detail`,version:r})}catch(r){let i=r instanceof Error?r.message:String(r);return f(`tengu_skill_store_failed`,{reason:i}),e(`Failed to get version ${n} for skill ${t}: ${i}`,{display:`system`}),q.createElement(V,{mode:`error`,message:i})}}if(i.action===`create`){let{name:t,markdown:n}=i;f(`tengu_skill_store_create`,{name:t});try{let r=await F(t,n);return e(`Skill created: ${r.skill_id}`,{display:`system`}),q.createElement(V,{mode:`created`,skill:r})}catch(t){let n=t instanceof Error?t.message:String(t);return f(`tengu_skill_store_failed`,{reason:n}),e(`Failed to create skill: ${n}`,{display:`system`}),q.createElement(V,{mode:`error`,message:n})}}if(i.action===`delete`){let{id:t}=i;f(`tengu_skill_store_delete`,{id:t});try{return await I(t),e(`Skill ${t} deleted.`,{display:`system`}),q.createElement(V,{mode:`deleted`,id:t})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_skill_store_failed`,{reason:r}),e(`Failed to delete skill ${t}: ${r}`,{display:`system`}),q.createElement(V,{mode:`error`,message:r})}}let{id:a,version:o}=i;f(`tengu_skill_store_install`,{id:a});try{let t,r;if(o!==void 0){let e=await P(a,o);r=e.body,t=e.skill_id}else{let n=await M(a),i=await N(a);if(i.length===0)return e(`Skill ${a} has no published versions to install.`,{display:`system`}),q.createElement(V,{mode:`error`,message:`Skill ${a} has no published versions to install.`});let o=[...i].sort((e,t)=>{let n=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-n})[0];if(!o)return e(`Skill ${a} has no published versions to install.`,{display:`system`}),q.createElement(V,{mode:`error`,message:`Skill ${a} has no published versions to install.`});r=o.body,t=n.name}let i=t.replace(/[^a-zA-Z0-9_-]/g,`-`).replace(/^-+|-+$/g,``)||a,s=y(n(),`skills`,i),c=y(s,`SKILL.md`);return await b(s,{recursive:!0}),await x(c,r,`utf-8`),e(`Skill installed to ${c}`,{display:`system`}),q.createElement(V,{mode:`installed`,skillName:i,path:c})}catch(t){let n=t instanceof Error?t.message:String(t);return f(`tengu_skill_store_failed`,{reason:n}),e(`Failed to install skill ${a}: ${n}`,{display:`system`}),q.createElement(V,{mode:`error`,message:n})}}}))();export{Y as callSkillStore};
@@ -1,3 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./analytics-DqMQntaB.js";import{Pr as r,_v as i,bv as a,pv as o,xr as s}from"./loadAgentsDir-DaApSWNv.js";import{n as c,o as l}from"./api-CslgFoHj.js";function u(e){return e}function d(e){return[`## Available sessions (most recent first)`,``,...e.slice(0,p).map((e,t)=>` ${String(t+1).padStart(2)}. ${e.title.slice(0,50).padEnd(50)} ${e.status.padEnd(14)} ${e.created_at.slice(0,10)} id=${e.id}`),``,"Run `/teleport <session-id>` to resume a session."].join(`
2
- `)}var f,p,m;e((()=>{t(),r(),o(),l(),f=8,p=20,m=async(e,t,r)=>{let o=r.trim(),l=o===`--print`||o.startsWith(`--print `),m=l?o.replace(/^--print\s*/,``).trim():o;if(n(`tengu_teleport_started`,{has_session_id:u(m?`true`:`false`)}),!m){n(`tengu_teleport_source_decision`,{source:u(`sessions_api`)});let t;try{t=(await c()).map(e=>({id:e.id,title:e.title??`Untitled`,status:e.status??`unknown`,created_at:e.created_at??``}))}catch(t){let r=t instanceof Error?t.message:String(t);return/forbidden|401|403/i.test(r)?(n(`tengu_teleport_events_fetch_forbidden`,{error:u(r.slice(0,200))}),e("Teleport: permission denied fetching sessions. Check your OAuth token (`claude auth status`).",{display:`system`}),null):/not found|404/i.test(r)?(n(`tengu_teleport_events_fetch_not_found`,{error:u(r.slice(0,200))}),e(`Teleport: sessions endpoint returned 404. The Sessions API may not be available for your account.`,{display:`system`}),null):/token|unauthorized/i.test(r)?(n(`tengu_teleport_error_bad_token`,{error:u(r.slice(0,200))}),e(`Teleport: authentication error — ${r}. Try \`claude auth login\`.`,{display:`system`}),null):(n(`tengu_teleport_events_fetch_fail`,{error:u(r.slice(0,200))}),e(`Teleport: failed to fetch sessions — ${r}.\nUsage: /teleport SESSION_ID`,{display:`system`}),null)}return t.length===0?(n(`tengu_teleport_null`,{}),e(`No active sessions found on claude.ai/code.
3
- Start a new session at https://claude.ai/code`,{display:`system`}),null):(t.length>=p&&n(`tengu_teleport_page_cap`,{count:u(String(t.length))}),e(d(t),{display:`system`}),null)}if(m.length<f||!/^[0-9a-f-]{8,}$/i.test(m))return n(`tengu_teleport_error_bad_status`,{error:u(`invalid_session_id: ${m.slice(0,40)}`)}),e(`Invalid session id "${m}". Expected a UUID-like string (e.g. 12345678-abcd-...).`,{display:`system`}),null;n(`tengu_teleport_source_decision`,{source:u(`explicit_id`)});let h=[],g=e=>{h.push(e)};g(`validate`);try{await a()}catch(t){let r=t instanceof Error?t.message:String(t);return n(`tengu_teleport_errors_detected`,{error:u(r.slice(0,200))}),e(`Cannot teleport: ${r}`,{display:`system`}),null}g(`resume`);try{let r=``;if(await i(m,e=>{r=String(e)}),n(`tengu_teleport_resume_session`,{stage:u(r)}),g(`ready`),!t.resume)return n(`tengu_teleport_null`,{}),l?(e(`Session ${m} fetched successfully.`,{display:`system`}),null):(e(`Teleport resume succeeded for ${m}, but the REPL did not provide a resume callback.`,{display:`system`}),null);g(`fetch`);let a=await s(m);return a?(n(`tengu_teleport_errors_resolved`,{}),await t.resume(m,a,`slash_command_session_id`),n(`tengu_teleport_first_message_success`,{}),null):(n(`tengu_teleport_errors_detected`,{error:u(`log_not_found_after_resume`)}),e(`Teleport fetched session ${m} but the local log was not found. Try /resume ${m} manually.`,{display:`system`}),null)}catch(t){let r=t instanceof Error?t.message:String(t),i=`tengu_teleport_failed`;return/not found/i.test(r)?i=`tengu_teleport_error_session_not_found_`:/repo.*mismatch/i.test(r)?i=`tengu_teleport_error_repo_mismatch_sessions_api`:/not in.*git|git.*dir/i.test(r)?i=`tengu_teleport_error_repo_not_in_git_dir_sessions_api`:/cancelled|aborted/i.test(r)?i=`tengu_teleport_cancelled`:/token|unauthorized|401/i.test(r)?i=`tengu_teleport_error_bad_token`:/status|4\d\d|5\d\d/i.test(r)&&(i=`tengu_teleport_error_bad_status`),n(i,{error:u(r.slice(0,200))}),n(`tengu_teleport_first_message_error`,{error:u(r.slice(0,200))}),e(`Teleport failed: ${r}`,{display:`system`}),null}}}))();export{m as callTeleport};