claude-code-best 2.6.11 → 2.6.13

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 (484) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-CGKtPsTK.js → AddWorkspaceDirectory-BKIYdg96.js} +1 -1
  2. package/dist/chunks/{App-DF28Bpg9.js → App-BAwWP3iN.js} +1 -1
  3. package/dist/chunks/ApproveApiKey-CJFvgVKS.js +1 -0
  4. package/dist/chunks/{ApproveApiKey-D21kbmQj.js → ApproveApiKey-da08NX2f.js} +1 -1
  5. package/dist/chunks/{AssistantSessionChooser-CDfwNVi5.js → AssistantSessionChooser-DQMKGO_q.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-Jtiqm4k2.js +2 -0
  7. package/dist/chunks/{BypassPermissionsModeDialog-BDWFw61G.js → BypassPermissionsModeDialog-D7TJ4Qn1.js} +1 -1
  8. package/dist/chunks/{ClaudeInChromeOnboarding-CpN0yIU_.js → ClaudeInChromeOnboarding-CuPz5Xfi.js} +1 -1
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-CRC6kEV1.js +1 -0
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-CWRHpy22.js → ClaudeMdExternalIncludesDialog-J0uv5XzG.js} +1 -1
  11. package/dist/chunks/ConsoleOAuthFlow-CE4OlAHo.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-CKHLXiwc.js → DesktopHandoff-B_vNnZS5.js} +1 -1
  13. package/dist/chunks/{DevChannelsDialog-BwMFW7Wt.js → DevChannelsDialog-kjRnWtNf.js} +1 -1
  14. package/dist/chunks/{DiffDialog-oA1v0BMo.js → DiffDialog-CSBWOnXJ.js} +2 -2
  15. package/dist/chunks/Doctor-DhK599q8.js +1 -0
  16. package/dist/chunks/Doctor-VJ5ZGb8g.js +3 -0
  17. package/dist/chunks/{ExitFlow-DJLYN-Bd.js → ExitFlow-M5XPGBHL.js} +2 -2
  18. package/dist/chunks/{Feedback-CpfhqIEv.js → Feedback-FHvqI2bu.js} +2 -2
  19. package/dist/chunks/Grove-68muTpx6.js +1 -0
  20. package/dist/chunks/{Grove-BugC6ssx.js → Grove-BC2IZIhN.js} +1 -1
  21. package/dist/chunks/{HybridTransport-PeXWuYfl.js → HybridTransport-Df_FceV2.js} +1 -1
  22. package/dist/chunks/{ITermBackend-dcs68DGS.js → ITermBackend-DkpK9X1H.js} +1 -1
  23. package/dist/chunks/{InvalidConfigDialog-DdB9_Ve0.js → InvalidConfigDialog-Cm6Yvt00.js} +1 -1
  24. package/dist/chunks/{InvalidSettingsDialog-BL8nxwWQ.js → InvalidSettingsDialog-Ai3D8AL1.js} +1 -1
  25. package/dist/chunks/MCPConnectionManager-BqNXYQEr.js +1 -0
  26. package/dist/chunks/{McpParsingWarnings-BYPXpmte.js → McpParsingWarnings-BZcVbGhE.js} +1 -1
  27. package/dist/chunks/MessageSelector-BXOoEogr.js +3 -0
  28. package/dist/chunks/Messages-F6OIAv8C.js +11 -0
  29. package/dist/chunks/{Onboarding-ByLnHSnW.js → Onboarding-n1aA7tmN.js} +1 -1
  30. package/dist/chunks/{OverageCreditUpsell-CVNfTSKG.js → OverageCreditUpsell-Bt23I92r.js} +1 -1
  31. package/dist/chunks/{PluginSettings-h9Lj0vW6.js → PluginSettings-Dgu23nzv.js} +3 -3
  32. package/dist/chunks/{PromptInputFooterSuggestions-CYWSLCgA.js → PromptInputFooterSuggestions-uiV23aG4.js} +1 -1
  33. package/dist/chunks/{PromptInputHelpMenu-BsYNhZCw.js → PromptInputHelpMenu-D84vnNKM.js} +1 -1
  34. package/dist/chunks/QueryEngine-CEodAvI2.js +1 -0
  35. package/dist/chunks/{REPL-CV12-ns7.js → REPL-CTTa9BK0.js} +34 -34
  36. package/dist/chunks/REPL-IO7wsKaQ.js +1 -0
  37. package/dist/chunks/{RemoteCallout-WWO84za-.js → RemoteCallout-BYKqws96.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-Dx2skKnM.js → RemoteSessionManager-Dq0W_fcj.js} +2 -2
  39. package/dist/chunks/ResumeConversation-CxzeCdL8.js +1 -0
  40. package/dist/chunks/{SSETransport-BHdzk1HO.js → SSETransport-CJrrD1ln.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-DI-36R5p.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-BKPxEWOf.js +1 -0
  43. package/dist/chunks/{SentryErrorBoundary-CmewX8Dv.js → SentryErrorBoundary-CcI0kkLW.js} +1 -1
  44. package/dist/chunks/Settings-CGcBR9CD.js +2 -0
  45. package/dist/chunks/{TeleportProgress-BmbhZlOg.js → TeleportProgress-C7muqjDw.js} +1 -1
  46. package/dist/chunks/TeleportRepoMismatchDialog-B3pUiRc2.js +1 -0
  47. package/dist/chunks/{TeleportResumeWrapper-BlkvOdYn.js → TeleportResumeWrapper-ClyBQR3K.js} +1 -1
  48. package/dist/chunks/{ThemePicker-v_3lh136.js → ThemePicker-CGIB6YiW.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-B7Nabc5t.js → TmuxBackend-m2ldrneQ.js} +1 -1
  50. package/dist/chunks/{TrustDialog-CHu5eoeR.js → TrustDialog-o5kqmn6m.js} +1 -1
  51. package/dist/chunks/{ValidationErrorsList-BSMetgqr.js → ValidationErrorsList-D7bXMb0U.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-DZfBSTu5.js → WelcomeV2-Ckp3JPnA.js} +1 -1
  53. package/dist/chunks/{WindowsTerminalBackend-CeSoQ_Nk.js → WindowsTerminalBackend-DsDqNWSP.js} +2 -2
  54. package/dist/chunks/{add-dir-7UeFZkdv.js → add-dir-DTP3NrLy.js} +1 -1
  55. package/dist/chunks/{agentDisplay-DJgsfIlm.js → agentDisplay-BEn43jMP.js} +1 -1
  56. package/dist/chunks/{agents-DD7gQVZD.js → agents-3ii2LyeQ.js} +1 -1
  57. package/dist/chunks/{agents-DK0y9jId.js → agents-g0PDZl_l.js} +7 -7
  58. package/dist/chunks/{ant-PhgMZT08.js → ant-PZvt_t1G.js} +1 -1
  59. package/dist/chunks/{api-nHsRf03G.js → api-BRckHGQ5.js} +1 -1
  60. package/dist/chunks/api-DBvyymX6.js +1 -0
  61. package/dist/chunks/{assistant-DO7RAhd3.js → assistant-BBmaU8-A.js} +1 -1
  62. package/dist/chunks/{assistant-BJbeizyH.js → assistant-CMaN0QzY.js} +1 -1
  63. package/dist/chunks/assistant-CVhvOfqJ.js +1 -0
  64. package/dist/chunks/auth-BXzbkJcE.js +1 -0
  65. package/dist/chunks/{auth-DxRiJwZ-.js → auth-Cud9tPJB.js} +1 -1
  66. package/dist/chunks/{autoMode-BswSpjo5.js → autoMode-BREcJLYf.js} +6 -6
  67. package/dist/chunks/{autonomy-CNJQwoAQ.js → autonomy-CuQizTZi.js} +1 -1
  68. package/dist/chunks/{autonomy-Lc78acHX.js → autonomy-h9vver1r.js} +12 -12
  69. package/dist/chunks/{autonomyPanel-DxcumRp-.js → autonomyPanel-DVyrTxfP.js} +1 -1
  70. package/dist/chunks/backgroundHousekeeping-DwA5WO9N.js +1 -0
  71. package/dist/chunks/backgroundHousekeeping-Ij_q7KN8.js +17 -0
  72. package/dist/chunks/{branch-BPsUW1dk.js → branch-B9AQFFTX.js} +2 -2
  73. package/dist/chunks/{bridge-DcOGvDbb.js → bridge-BkL7g0ua.js} +2 -2
  74. package/dist/chunks/bridgeConfig-BPP3lJRh.js +1 -0
  75. package/dist/chunks/{bridgeConfig-CvKdNJOg.js → bridgeConfig-BZQBBfap.js} +1 -1
  76. package/dist/chunks/{bridgeEnabled-D01faWms.js → bridgeEnabled-Bkmqv-2V.js} +1 -1
  77. package/dist/chunks/bridgeEnabled-BwBjPmEE.js +1 -0
  78. package/dist/chunks/bridgeMain-CbGj0plH.js +68 -0
  79. package/dist/chunks/bridgeMain-DpQRGiMo.js +1 -0
  80. package/dist/chunks/{bridgeMessaging-BZMDSZAN.js → bridgeMessaging-C-ZFPTiZ.js} +1 -1
  81. package/dist/chunks/{btw-B8s-X_cm.js → btw-BSme4Kzi.js} +1 -1
  82. package/dist/chunks/{buddy-DkB1xU1o.js → buddy-DX94yYTy.js} +1 -1
  83. package/dist/chunks/{bypassPermissionsKillswitch-B9Qz9zKO.js → bypassPermissionsKillswitch-Crl2aipx.js} +1 -1
  84. package/dist/chunks/{caches-BuSzLvN9.js → caches-DeXmHls9.js} +2 -2
  85. package/dist/chunks/caches-U1iFQIc7.js +1 -0
  86. package/dist/chunks/{ccrClient-CMZXfu9P.js → ccrClient-BYD1ONzC.js} +1 -1
  87. package/dist/chunks/changeDetector-PaQPe1HQ.js +1 -0
  88. package/dist/chunks/channelNotification-Aq0p9f-W.js +1 -0
  89. package/dist/chunks/{channelNotification-t6Kgu-vX.js → channelNotification-B0QskFjB.js} +1 -1
  90. package/dist/chunks/{chrome-Cvkozg2F.js → chrome-B8ByN3u6.js} +1 -1
  91. package/dist/chunks/clear-CeJ5tgg8.js +1 -0
  92. package/dist/chunks/client-B7AdqRap.js +1 -0
  93. package/dist/chunks/color-OlMWmMnJ.js +1 -0
  94. package/dist/chunks/commands-BwfOl3fk.js +1 -0
  95. package/dist/chunks/{commitAttribution-CUqUEjsh.js → commitAttribution-C479aqmn.js} +1 -1
  96. package/dist/chunks/commitAttribution-CZ1OOh8F.js +1 -0
  97. package/dist/chunks/compact-Dq-J7j1C.js +3 -0
  98. package/dist/chunks/{companion-Cf_kYtOD.js → companion-CtJjyD3N.js} +1 -1
  99. package/dist/chunks/{config-45GLd-lt.js → config-DcnYYwCy.js} +1 -1
  100. package/dist/chunks/{config-JGm0O-ZQ.js → config-_KcvL7RX.js} +1 -1
  101. package/dist/chunks/{context-Bl5VUX5M.js → context-CShSBp-i.js} +1 -1
  102. package/dist/chunks/{context-noninteractive-DdPFYYO9.js → context-noninteractive-BApFNncX.js} +2 -2
  103. package/dist/chunks/context-noninteractive-uMvPKhng.js +1 -0
  104. package/dist/chunks/conversation-BlUHkj1_.js +1 -0
  105. package/dist/chunks/conversation-CCzL-eYb.js +1 -0
  106. package/dist/chunks/{copy-CbhxPqw4.js → copy-DIMR3Q3S.js} +2 -2
  107. package/dist/chunks/{createSSHSession-Dq2nMChz.js → createSSHSession-DvSnUdsD.js} +1 -1
  108. package/dist/chunks/createSession-D8tcktmP.js +1 -0
  109. package/dist/chunks/{createSession-DTHPUie-.js → createSession-DaT4x1E6.js} +1 -1
  110. package/dist/chunks/{cronJitterConfig-IGWCRDrv.js → cronJitterConfig-C2a-Ybqm.js} +3 -3
  111. package/dist/chunks/crossProjectResume-B3Chhiwf.js +40 -0
  112. package/dist/chunks/{daemon-VYRit6Aq.js → daemon-CCtZ9wY3.js} +1 -1
  113. package/dist/chunks/datadog-BYNSi8R3.js +1 -0
  114. package/dist/chunks/{datadog-FKvRNyFi.js → datadog-DCukMGn4.js} +1 -1
  115. package/dist/chunks/{desktop-ZASE3YWy.js → desktop-BXj3JEMV.js} +1 -1
  116. package/dist/chunks/{diff-QP-TbxuD.js → diff-D3Xuv_4J.js} +1 -1
  117. package/dist/chunks/{doctor-DVkgmkRb.js → doctor-B5-jh6lS.js} +1 -1
  118. package/dist/chunks/earlyInput-RoVleNEN.js +1 -0
  119. package/dist/chunks/{effort-DbryQCua.js → effort-CpHnXRxJ.js} +2 -2
  120. package/dist/chunks/{entry-D8y42iuM.js → entry-YXnIL7B7.js} +8 -8
  121. package/dist/chunks/envLessBridgeConfig-CcgSiwvA.js +1 -0
  122. package/dist/chunks/{envLessBridgeConfig-D4bSwf7w.js → envLessBridgeConfig-MaElAFPV.js} +1 -1
  123. package/dist/chunks/exit-DKG0r57m.js +1 -0
  124. package/dist/chunks/{export-C9A9nOA1.js → export-BNbcpW3p.js} +1 -1
  125. package/dist/chunks/{exportRenderer-CyTuZFFF.js → exportRenderer-pYMIcnO4.js} +1 -1
  126. package/dist/chunks/extra-usage-DTXphHAD.js +1 -0
  127. package/dist/chunks/{extra-usage-C6s5mXW0.js → extra-usage-H-U38bGx.js} +1 -1
  128. package/dist/chunks/{extra-usage-core-BFCwz3XM.js → extra-usage-core-N4VLj0ye.js} +1 -1
  129. package/dist/chunks/{extra-usage-noninteractive-IHq7s6wm.js → extra-usage-noninteractive-BGUiGr3a.js} +1 -1
  130. package/dist/chunks/{extraUsage-CIrG_Lbw.js → extraUsage-X6CmSsdg.js} +1 -1
  131. package/dist/chunks/extractMemories-C8R4DJVc.js +1 -0
  132. package/dist/chunks/{fast-NEKXVZqQ.js → fast-BJwQnvAP.js} +1 -1
  133. package/dist/chunks/fast-DMkPYQmQ.js +1 -0
  134. package/dist/chunks/{feedback-D5iWO16P.js → feedback-DLcYu4id.js} +1 -1
  135. package/dist/chunks/{firstPartyEventLogger-Dr3TK3IU.js → firstPartyEventLogger-C00GfHTl.js} +1 -1
  136. package/dist/chunks/{flushGate-DygHyqmB.js → flushGate-0DZFLUEb.js} +1 -1
  137. package/dist/chunks/{gates-Dyz_t5zJ.js → gates-DP4JyL5e.js} +1 -1
  138. package/dist/chunks/gates-DeLWne9R.js +1 -0
  139. package/dist/chunks/gemini-CnKaXUJJ.js +1 -0
  140. package/dist/chunks/{generateRecap-DZiXeYWn.js → generateRecap-BUS2DEdj.js} +1 -1
  141. package/dist/chunks/{generateSessionName-EbB2vl9t.js → generateSessionName-CnPPgvyy.js} +1 -1
  142. package/dist/chunks/{githubRepoPathMapping-dky2fPeU.js → githubRepoPathMapping-CnXpQRPY.js} +1 -1
  143. package/dist/chunks/grok-C2BUbWJR.js +1 -0
  144. package/dist/chunks/{growthbook-JD-WW3yV.js → growthbook-CPTqwUyC.js} +1 -1
  145. package/dist/chunks/{heapdump-8vyFTWly.js → heapdump-pamjtM2a.js} +1 -1
  146. package/dist/chunks/{help-C2DM0p8U.js → help-z7XnNKDT.js} +1 -1
  147. package/dist/chunks/hooks-BEAaBqmd.js +1 -0
  148. package/dist/chunks/{hooks-CMh0a2pT.js → hooks-iTfSDH96.js} +2 -2
  149. package/dist/chunks/{hostAdapter-CmbGfgNV.js → hostAdapter-DWD430of.js} +1 -1
  150. package/dist/chunks/{ide-Bn8R7397.js → ide-BK8Td_CD.js} +2 -2
  151. package/dist/chunks/{inboundAttachments-BweY9sYo.js → inboundAttachments-DQ4Czsr5.js} +1 -1
  152. package/dist/chunks/inboundAttachments-Dq3IYudc.js +1 -0
  153. package/dist/chunks/initReplBridge-BeGirV3Q.js +1 -0
  154. package/dist/chunks/{insights-NOl_PxhN.js → insights-DfD6PMkd.js} +64 -64
  155. package/dist/chunks/{install-BoT2GIcz.js → install-CNq--Fit.js} +1 -1
  156. package/dist/chunks/{install-github-app-SD4PvrTR.js → install-github-app-Dhq_T_EJ.js} +2 -2
  157. package/dist/chunks/{install-slack-app-DLQXpOCt.js → install-slack-app-mz5O3xo_.js} +1 -1
  158. package/dist/chunks/{instrumentation-BXJk0mxI.js → instrumentation-CM0poWjx.js} +3 -3
  159. package/dist/chunks/{job-CnlMlm3t.js → job-CKI1I_Va.js} +1 -1
  160. package/dist/chunks/{keybindings-BjaRqcbD.js → keybindings-5qahtcNc.js} +2 -2
  161. package/dist/chunks/{lang-BI8CzjL6.js → lang-BMNwfSRv.js} +1 -1
  162. package/dist/chunks/{language-CRIdgj2F.js → language-DXpi4083.js} +1 -1
  163. package/dist/chunks/language-GlWQb4l9.js +1 -0
  164. package/dist/chunks/{launchAgentsPlatform-Bg9guiqy.js → launchAgentsPlatform-BU4bAPan.js} +1 -1
  165. package/dist/chunks/{launchAutofixPr-BMfXGXwN.js → launchAutofixPr-B80p6iq-.js} +3 -3
  166. package/dist/chunks/{launchLocalMemory-lgnXOi6U.js → launchLocalMemory-CDAa9B30.js} +2 -2
  167. package/dist/chunks/{launchLocalVault-C0Oz-lto.js → launchLocalVault-B19lF8tP.js} +3 -3
  168. package/dist/chunks/{launchMemoryStores-Bw11ruRi.js → launchMemoryStores-C6wJI-8V.js} +1 -1
  169. package/dist/chunks/{launchOnboarding-WEW34cnl.js → launchOnboarding-BIlwEdkk.js} +1 -1
  170. package/dist/chunks/{launchSchedule-X0rcM_kM.js → launchSchedule-DjMh3--x.js} +1 -1
  171. package/dist/chunks/{launchSkillStore-DpxSlMCU.js → launchSkillStore-Bs5thijU.js} +1 -1
  172. package/dist/chunks/{launchTeleport-uOtMsYcI.js → launchTeleport-CDlWx4xC.js} +2 -2
  173. package/dist/chunks/{launchVault-CJyJaPqH.js → launchVault-C40NAyOp.js} +1 -1
  174. package/dist/chunks/loadAgentsDir-BYqiLHDS.js +1 -0
  175. package/dist/chunks/{loadAgentsDir-D-xcJ22-.js → loadAgentsDir-C9Ee_fs1.js} +793 -749
  176. package/dist/chunks/loadPluginHooks-DaETszNq.js +1 -0
  177. package/dist/chunks/{localSearch-B6Ho7Vfj.js → localSearch-B3zijtEM.js} +1 -1
  178. package/dist/chunks/localSearch-BTGnGPVi.js +1 -0
  179. package/dist/chunks/{login-uOvq1xN_.js → login-B3IQj5YQ.js} +1 -1
  180. package/dist/chunks/login-CUM0odSh.js +1 -0
  181. package/dist/chunks/{logoV2Utils-C2cdcgtp.js → logoV2Utils-CW73xjcW.js} +1 -1
  182. package/dist/chunks/logout-B3hPrJSX.js +1 -0
  183. package/dist/chunks/{magicDocs-BBjAhGN1.js → magicDocs-BysWdjbO.js} +2 -2
  184. package/dist/chunks/{main-DGsAUuG_.js → main-CnAyCMYQ.js} +48 -48
  185. package/dist/chunks/{mappers-CO6koWDa.js → mappers-D1SAyuKF.js} +1 -1
  186. package/dist/chunks/mcp-BIiXcANN.js +1 -0
  187. package/dist/chunks/mcp-BLcZi9zs.js +2 -0
  188. package/dist/chunks/mcp-nOKz2_By.js +6 -0
  189. package/dist/chunks/{mcpServer-C-0K3Azg.js → mcpServer-CJOTyq3O.js} +1 -1
  190. package/dist/chunks/{mcpServer-C_aDoLMg.js → mcpServer-DaiouIKs.js} +1 -1
  191. package/dist/chunks/memory-DtFuXZHl.js +1 -0
  192. package/dist/chunks/mode-BPNUYCpk.js +2 -0
  193. package/dist/chunks/model-Cky6xlFt.js +1 -0
  194. package/dist/chunks/{model-CrAPXYZA.js → model-DC5bOhtE.js} +1 -1
  195. package/dist/chunks/{onChangeAppState-C6ZIU1SD.js → onChangeAppState-pafR88Yw.js} +1 -1
  196. package/dist/chunks/{openai-Cm4gozk8.js → openai-BOxlfR-k.js} +3 -3
  197. package/dist/chunks/{overageCreditGrant-Pe7C_4Qi.js → overageCreditGrant-BmmOYjTh.js} +1 -1
  198. package/dist/chunks/{panel-Bz_8td5D.js → panel-s9fbCKfl.js} +1 -1
  199. package/dist/chunks/{passes-BpI6azLG.js → passes-CqiFdifM.js} +1 -1
  200. package/dist/chunks/{paths-D9CVAtXU.js → paths-C2JRlUsH.js} +3 -3
  201. package/dist/chunks/permissions-BHJUxNga.js +3 -0
  202. package/dist/chunks/{pipeTransport-wjeyTgon.js → pipeTransport-BTYiqf9e.js} +1 -1
  203. package/dist/chunks/{plan-DA8IRpHQ.js → plan-CF_ClJlj.js} +1 -1
  204. package/dist/chunks/{plugin-N2pTkzOz.js → plugin-Bz3RKbru.js} +1 -1
  205. package/dist/chunks/{pluginAutoupdate-DCc5qDvo.js → pluginAutoupdate-Ck0wWoNE.js} +1 -1
  206. package/dist/chunks/pluginBlocklist-7dlesHcW.js +1 -0
  207. package/dist/chunks/{pluginCliCommands-BN7loc5T.js → pluginCliCommands-D502zE25.js} +1 -1
  208. package/dist/chunks/{pluginFlagging-Dpu1cvMo.js → pluginFlagging-DfHARfd-.js} +1 -1
  209. package/dist/chunks/pluginOperations-BBRf8tuH.js +2 -0
  210. package/dist/chunks/{pluginStartupCheck-DvWHwNnD.js → pluginStartupCheck-BKEhWQR2.js} +1 -1
  211. package/dist/chunks/pluginStartupCheck-ZcaocOSL.js +1 -0
  212. package/dist/chunks/plugins-JnZ3lNqG.js +4 -0
  213. package/dist/chunks/policyLimits-CtOjYdHx.js +1 -0
  214. package/dist/chunks/{pollConfig-xYxAmuXi.js → pollConfig-Duecunu0.js} +1 -1
  215. package/dist/chunks/{poor-C0KwfFF0.js → poor-CUwZAV9z.js} +1 -1
  216. package/dist/chunks/poorMode-DOoZ0U-8.js +1 -0
  217. package/dist/chunks/{poorMode-D7WXWZtJ.js → poorMode-DRcH1fuh.js} +1 -1
  218. package/dist/chunks/print-D9IhN66j.js +39 -0
  219. package/dist/chunks/{privacy-settings-DT3LGgsH.js → privacy-settings-DmbuvR-R.js} +1 -1
  220. package/dist/chunks/processBashCommand-Cg8we9vS.js +1 -0
  221. package/dist/chunks/processSlashCommand-BBQQEGZd.js +6 -0
  222. package/dist/chunks/{projectContext-0fpRKUeH.js → projectContext-D5FgyE-d.js} +1 -1
  223. package/dist/chunks/prompt-7Vt8FUX_.js +1 -0
  224. package/dist/chunks/prompt-Cj0hg3CU.js +1 -0
  225. package/dist/chunks/{prompt-C69iv9cI.js → prompt-thBQB2X5.js} +1 -1
  226. package/dist/chunks/{promptEditor-BZqpLrcZ.js → promptEditor-C8B2TEXp.js} +2 -2
  227. package/dist/chunks/{protocolHandler-CfmBTg36.js → protocolHandler-BUKWgksO.js} +1 -1
  228. package/dist/chunks/rate-limit-options-PruvKAQt.js +1 -0
  229. package/dist/chunks/{rcDebugLog-CTOZ2K3E.js → rcDebugLog-CIS3PU-H.js} +1 -1
  230. package/dist/chunks/{referral-D26orIXE.js → referral-CXmDvb7V.js} +1 -1
  231. package/dist/chunks/refresh-C_FDHRT7.js +1 -0
  232. package/dist/chunks/{registerProtocol-DSQh-I21.js → registerProtocol-WxQUBybC.js} +1 -1
  233. package/dist/chunks/registry-CeBTik9J.js +1 -0
  234. package/dist/chunks/{release-notes-Cg85UVo8.js → release-notes-aZ6QUVnT.js} +1 -1
  235. package/dist/chunks/{releaseNotes-Dps4SeVh.js → releaseNotes-2GPd_O_r.js} +2 -2
  236. package/dist/chunks/{reload-plugins-Bo-R1CF3.js → reload-plugins-BDh4ZhHi.js} +1 -1
  237. package/dist/chunks/{remote-env-ChQuV3rO.js → remote-env-BIOFHNQC.js} +1 -1
  238. package/dist/chunks/{remoteBridgeCore-BXtygJA-.js → remoteBridgeCore-DyA_2GrL.js} +1 -1
  239. package/dist/chunks/{remoteControlServer-sqW_JLwC.js → remoteControlServer-BjW9GsPd.js} +2 -2
  240. package/dist/chunks/rename-CKlAeppY.js +1 -0
  241. package/dist/chunks/{resume-CtOI2pOJ.js → resume-Dm71Aeni.js} +2 -2
  242. package/dist/chunks/{runtimeObserver-DojpbVgU.js → runtimeObserver-BYOo5dT0.js} +1 -1
  243. package/dist/chunks/{runtimeObserver-CJ955XSo.js → runtimeObserver-CA7pdBvT.js} +3 -3
  244. package/dist/chunks/sandbox-adapter-C7TBAehE.js +1 -0
  245. package/dist/chunks/{sandbox-toggle-B9dn09gt.js → sandbox-toggle-fHc9E9xW.js} +1 -1
  246. package/dist/chunks/searchExtraTools-CpFsg_tS.js +1 -0
  247. package/dist/chunks/{sentry-B6tWUNGj.js → sentry-B1g5Tgp2.js} +1 -1
  248. package/dist/chunks/{session-C5yIf_zV.js → session-C46oy7nX.js} +2 -2
  249. package/dist/chunks/{sessionDiscovery-CQ3iMN4s.js → sessionDiscovery-CtrJ2Bfr.js} +1 -1
  250. package/dist/chunks/sessionFileAccessHooks-dwF5SFoS.js +1 -0
  251. package/dist/chunks/sessionMemory-BqCsLnFl.js +1 -0
  252. package/dist/chunks/sessionMemory-D4-Ymn0Q.js +1 -0
  253. package/dist/chunks/sessionMemoryUtils-BKdYMir6.js +1 -0
  254. package/dist/chunks/sessionObserver-Bfu8q0_K.js +1 -0
  255. package/dist/chunks/{sessionObserver-MQA9_wZw.js → sessionObserver-DoBuLaCJ.js} +1 -1
  256. package/dist/chunks/sessionStorage-CUUU_J4D.js +1 -0
  257. package/dist/chunks/{sessionTitle-BafqFHLc.js → sessionTitle-BOM0LQlq.js} +1 -1
  258. package/dist/chunks/{sessionTracing-_obALZbi.js → sessionTracing-BEKULg2L.js} +1 -1
  259. package/dist/chunks/{settingsSync-DBWi-NXU.js → settingsSync-BIsGiZhM.js} +1 -1
  260. package/dist/chunks/{setup-DIxsjw17.js → setup-C3FOTg1s.js} +1 -1
  261. package/dist/chunks/{setup-C_GrS0Rd.js → setup-ChF37I92.js} +1 -1
  262. package/dist/chunks/setup-DvFPFV-3.js +2 -0
  263. package/dist/chunks/{shadowedRuleDetection-CwMwv9uM.js → shadowedRuleDetection-spwhhTXF.js} +1 -1
  264. package/dist/chunks/{sideQuestion-CI5pyoQF.js → sideQuestion-iy7kJEkr.js} +2 -2
  265. package/dist/chunks/{sink-BSTUubjl.js → sink-D6dxOYIw.js} +1 -1
  266. package/dist/chunks/sink-FeQonv8-.js +1 -0
  267. package/dist/chunks/sinks-DKMqKJ66.js +1 -0
  268. package/dist/chunks/{sinks-B9EsWFeb.js → sinks-zNh_PVeS.js} +2 -2
  269. package/dist/chunks/{skill-learning-DThetLpo.js → skill-learning-ChAFwJf0.js} +1 -1
  270. package/dist/chunks/skillChangeDetector-8LVraP0Y.js +1 -0
  271. package/dist/chunks/{skillGapStore-BmjCK9ZR.js → skillGapStore-CUws9CQ6.js} +2 -2
  272. package/dist/chunks/{skillGapStore-ax0GuSmd.js → skillGapStore-CdPgIARS.js} +1 -1
  273. package/dist/chunks/{skillGenerator-Dj3xInwG.js → skillGenerator-CLtTRIjy.js} +2 -2
  274. package/dist/chunks/skillLearning-CBosoKl-.js +1 -0
  275. package/dist/chunks/skillLearning-f7-aknmS.js +1 -0
  276. package/dist/chunks/{skillPanel-CJ4tvX7A.js → skillPanel-Cd0AFEZf.js} +3 -3
  277. package/dist/chunks/{skillSearchPanel-hwZvXKZ4.js → skillSearchPanel-VWiAbmdr.js} +3 -3
  278. package/dist/chunks/{skills-BVWDDcD9.js → skills-oQtI4eDn.js} +1 -1
  279. package/dist/chunks/{sprites-B-V9otkt.js → sprites-Cp4_DJUI.js} +1 -1
  280. package/dist/chunks/{stats-DcS6ZnsX.js → stats-B1X-nxO8.js} +1 -1
  281. package/dist/chunks/{status-DZKjK9CE.js → status-BtCnWZEv.js} +1 -1
  282. package/dist/chunks/statusNoticeHelpers-B6GW2gMe.js +1 -0
  283. package/dist/chunks/{tag-B5b-waIf.js → tag-B6WpuUE_.js} +2 -2
  284. package/dist/chunks/{tasks-vXM-vULI.js → tasks-DIOPZDoF.js} +1 -1
  285. package/dist/chunks/{teamHelpers-CbFFdvPw.js → teamHelpers-9p7wPcXj.js} +1 -1
  286. package/dist/chunks/teamHelpers-PLGwYL4x.js +1 -0
  287. package/dist/chunks/teammateModeSnapshot-DO-3AkNP.js +1 -0
  288. package/dist/chunks/{teammateModeSnapshot-DkkMv2-b.js → teammateModeSnapshot-DU8JCRRs.js} +1 -1
  289. package/dist/chunks/teleport-DPUoWpD4.js +1 -0
  290. package/dist/chunks/{templateJobs-BLQqrGjb.js → templateJobs-DOSQvjx0.js} +1 -1
  291. package/dist/chunks/{terminalSetup-BLU99dau.js → terminalSetup-DdHkyElj.js} +1 -1
  292. package/dist/chunks/{terminalSetup-BKfVYk3w.js → terminalSetup-tSFJeCVl.js} +1 -1
  293. package/dist/chunks/{theme-BM2CXWYE.js → theme-Hf1fhR3q.js} +1 -1
  294. package/dist/chunks/thinkback-5QYAbr0P.js +1 -0
  295. package/dist/chunks/thinkback-B5IraP81.js +1 -0
  296. package/dist/chunks/thinkback-play-Bqv85sjY.js +1 -0
  297. package/dist/chunks/{toolEventObserver-71WYUega.js → toolEventObserver-B-mqmRv0.js} +1 -1
  298. package/dist/chunks/{toolEventObserver-nxcfjaur.js → toolEventObserver-_Fk1dSYg.js} +1 -1
  299. package/dist/chunks/toolPool-C2KLBvek.js +1 -0
  300. package/dist/chunks/toolPool-CiEaFfxq.js +1 -0
  301. package/dist/chunks/{trustedDevice-C0KJ0qiK.js → trustedDevice-BowIKqqC.js} +1 -1
  302. package/dist/chunks/{trustedDevice-Brc9B8cZ.js → trustedDevice-f8HslQu2.js} +1 -1
  303. package/dist/chunks/{tui-BVc2q4Xv.js → tui-geoc3zxu.js} +1 -1
  304. package/dist/chunks/{ultrareviewCommand-BY0T8Pzl.js → ultrareviewCommand-DbmRN6Lg.js} +2 -2
  305. package/dist/chunks/{undercover-j27F8p49.js → undercover-Ch9wnIbk.js} +1 -1
  306. package/dist/chunks/undercover-X6-EJ_7K.js +1 -0
  307. package/dist/chunks/{updateCCB-Dgb2ed9v.js → updateCCB-DFHrOTEX.js} +1 -1
  308. package/dist/chunks/{upgrade-zs7K9UkG.js → upgrade-B6Ih-Ubj.js} +1 -1
  309. package/dist/chunks/upgrade-CC4cnsnt.js +1 -0
  310. package/dist/chunks/{upload-Df84yCBz.js → upload-DSTB33ZR.js} +1 -1
  311. package/dist/chunks/{usage-DKENFl_k.js → usage-CNqpSfd2.js} +1 -1
  312. package/dist/chunks/{usage-lTILrQJV.js → usage-DiZsjcMM.js} +1 -1
  313. package/dist/chunks/useMainLoopModel-Bo6iEtB3.js +1 -0
  314. package/dist/chunks/{useManagePlugins-DDKeDfIv.js → useManagePlugins-Cvj0XfLp.js} +1 -1
  315. package/dist/chunks/useMergedTools-BEpwy0Ec.js +1 -0
  316. package/dist/chunks/{useSearchInput-DNpNG36H.js → useSearchInput-YiO4crrI.js} +1 -1
  317. package/dist/chunks/useSettingsErrors-BE-PITl4.js +1 -0
  318. package/dist/chunks/{useVoice-DmObXoAh.js → useVoice-D1sKPiqb.js} +1 -1
  319. package/dist/chunks/{util-9vJ9WIeZ.js → util-C8_5375U.js} +1 -1
  320. package/dist/chunks/utils-Dmh9vBcg.js +1 -0
  321. package/dist/chunks/validatePlugin-BQA60S_J.js +1 -0
  322. package/dist/chunks/{vim-CK7lReJi.js → vim-oNiLgw0C.js} +1 -1
  323. package/dist/chunks/{voice-BLVF7E3Q.js → voice-CGsMzVaA.js} +2 -2
  324. package/dist/chunks/voiceModeEnabled-DprM_JSH.js +1 -0
  325. package/dist/chunks/{voiceModeEnabled-BpLBjY2-.js → voiceModeEnabled-Dpx-sP8V.js} +1 -1
  326. package/dist/chunks/voiceStreamSTT-CASv4SGl.js +1 -0
  327. package/dist/chunks/{voiceStreamSTT-i4tUq3Hu.js → voiceStreamSTT-CaI5Uz-7.js} +1 -1
  328. package/dist/chunks/{workerRegistry-Bg7dWLHf.js → workerRegistry-CCYrYthd.js} +1 -1
  329. package/dist/chunks/worktree-C9WNXNFR.js +1 -0
  330. package/dist/chunks/{xml-K_hNNh2b.js → xml-BW5T-oW-.js} +1 -1
  331. package/dist/cli.js +1 -1
  332. package/package.json +1 -1
  333. package/dist/chunks/ApproveApiKey-BtiWOryM.js +0 -1
  334. package/dist/chunks/BackgroundTasksDialog-5RpkAbJz.js +0 -2
  335. package/dist/chunks/ClaudeMdExternalIncludesDialog-Dje7A0F2.js +0 -1
  336. package/dist/chunks/ConsoleOAuthFlow-DQf3dmj6.js +0 -1
  337. package/dist/chunks/Doctor-ButdpAkf.js +0 -1
  338. package/dist/chunks/Doctor-QVMo0fIh.js +0 -3
  339. package/dist/chunks/Grove-CmdRVv9F.js +0 -1
  340. package/dist/chunks/MCPConnectionManager-D2eAGUME.js +0 -1
  341. package/dist/chunks/MessageSelector-Bzq8CYAH.js +0 -3
  342. package/dist/chunks/Messages-uRxxAMW-.js +0 -11
  343. package/dist/chunks/QueryEngine-CxP2S3qi.js +0 -1
  344. package/dist/chunks/REPL-h1bwm8ee.js +0 -1
  345. package/dist/chunks/ResumeConversation-CagiCg7-.js +0 -1
  346. package/dist/chunks/SearchExtraToolsTool-BJ2d8mtx.js +0 -1
  347. package/dist/chunks/SentryErrorBoundary-CYiFofRZ.js +0 -1
  348. package/dist/chunks/Settings-BcgtW60l.js +0 -2
  349. package/dist/chunks/TeleportRepoMismatchDialog-BAwtgUhR.js +0 -1
  350. package/dist/chunks/api-D4aCzJS-.js +0 -1
  351. package/dist/chunks/assistant-Dvx-UrTi.js +0 -1
  352. package/dist/chunks/auth-Cp7Nt0ik.js +0 -1
  353. package/dist/chunks/backgroundHousekeeping-BkfWgzIP.js +0 -17
  354. package/dist/chunks/backgroundHousekeeping-BxBI2KkX.js +0 -1
  355. package/dist/chunks/bridgeConfig-Dkn5GGec.js +0 -1
  356. package/dist/chunks/bridgeEnabled-CjaYKTo5.js +0 -1
  357. package/dist/chunks/bridgeMain-Bu2oOX31.js +0 -68
  358. package/dist/chunks/bridgeMain-CEpOBx8Z.js +0 -1
  359. package/dist/chunks/caches-Bvl2jdxF.js +0 -1
  360. package/dist/chunks/changeDetector-DTXMv7gH.js +0 -1
  361. package/dist/chunks/channelNotification-B7s1OoRK.js +0 -1
  362. package/dist/chunks/clear-C9pufI6F.js +0 -1
  363. package/dist/chunks/client-CqJ5gRGj.js +0 -1
  364. package/dist/chunks/color-AYeAYKyq.js +0 -1
  365. package/dist/chunks/commands-LcLR5Vgx.js +0 -1
  366. package/dist/chunks/commitAttribution-BZupnGMc.js +0 -1
  367. package/dist/chunks/compact-BF0-0_qh.js +0 -3
  368. package/dist/chunks/context-noninteractive-BtzPsJ8k.js +0 -1
  369. package/dist/chunks/conversation-C3NWyOB3.js +0 -1
  370. package/dist/chunks/conversation-oX932vBQ.js +0 -1
  371. package/dist/chunks/createSession-1ewHG3eq.js +0 -1
  372. package/dist/chunks/crossProjectResume-WmabPBTO.js +0 -40
  373. package/dist/chunks/datadog-Da7KYZNF.js +0 -1
  374. package/dist/chunks/earlyInput-JGJo1zcC.js +0 -1
  375. package/dist/chunks/envLessBridgeConfig-CpW0G4Eh.js +0 -1
  376. package/dist/chunks/exit-BsNW67F9.js +0 -1
  377. package/dist/chunks/extra-usage-DL2C0_BM.js +0 -1
  378. package/dist/chunks/extractMemories-CA2eJwHy.js +0 -1
  379. package/dist/chunks/fast-B01NO2uA.js +0 -1
  380. package/dist/chunks/gates-BSpXbh9s.js +0 -1
  381. package/dist/chunks/gemini-BEmbnRQR.js +0 -1
  382. package/dist/chunks/grok-BM6ZJ4w2.js +0 -1
  383. package/dist/chunks/hooks-QXGwOfWj.js +0 -1
  384. package/dist/chunks/inboundAttachments-N5DKbZSl.js +0 -1
  385. package/dist/chunks/initReplBridge-3CfmzjJL.js +0 -1
  386. package/dist/chunks/language-DmbRGIs8.js +0 -1
  387. package/dist/chunks/loadAgentsDir-ILQxk_4G.js +0 -1
  388. package/dist/chunks/loadPluginHooks-BC1Ea7_D.js +0 -1
  389. package/dist/chunks/localSearch-COyJeP9E.js +0 -1
  390. package/dist/chunks/login-Cf89biEK.js +0 -1
  391. package/dist/chunks/logout-CEXwTlEX.js +0 -1
  392. package/dist/chunks/mcp-BrN_Tbq5.js +0 -6
  393. package/dist/chunks/mcp-CZltNml5.js +0 -1
  394. package/dist/chunks/mcp-D6JOqdT8.js +0 -2
  395. package/dist/chunks/memory-BYYOgo4e.js +0 -1
  396. package/dist/chunks/model-CHgqwg6N.js +0 -1
  397. package/dist/chunks/permissions-C7wcAYOc.js +0 -3
  398. package/dist/chunks/pluginBlocklist-C_Veew3p.js +0 -1
  399. package/dist/chunks/pluginOperations-CP6NFNog.js +0 -2
  400. package/dist/chunks/pluginStartupCheck-BF0xUEJG.js +0 -1
  401. package/dist/chunks/plugins-BHoniP5f.js +0 -4
  402. package/dist/chunks/policyLimits-sh7ywop0.js +0 -1
  403. package/dist/chunks/poorMode-DZQXZ_zu.js +0 -1
  404. package/dist/chunks/print-BcRG8gkQ.js +0 -39
  405. package/dist/chunks/processBashCommand-DPfJ9lrj.js +0 -1
  406. package/dist/chunks/processSlashCommand-DyPCeZux.js +0 -6
  407. package/dist/chunks/prompt-DaIJzI1P.js +0 -1
  408. package/dist/chunks/prompt-DnLsyywj.js +0 -1
  409. package/dist/chunks/rate-limit-options-P7oQuwrl.js +0 -1
  410. package/dist/chunks/refresh-BeSXaVya.js +0 -1
  411. package/dist/chunks/registry-Dp5W2V8B.js +0 -1
  412. package/dist/chunks/rename-Bigaipiq.js +0 -1
  413. package/dist/chunks/sandbox-adapter-BbrJOJNZ.js +0 -1
  414. package/dist/chunks/searchExtraTools-Denn1c1E.js +0 -1
  415. package/dist/chunks/sessionFileAccessHooks-1IAwziOQ.js +0 -1
  416. package/dist/chunks/sessionMemory-3TAJyNuJ.js +0 -1
  417. package/dist/chunks/sessionMemory-HZNzEOLd.js +0 -1
  418. package/dist/chunks/sessionMemoryUtils-BAkA4sGG.js +0 -1
  419. package/dist/chunks/sessionObserver-DqLMFMLM.js +0 -1
  420. package/dist/chunks/sessionStorage-CFfMypMQ.js +0 -1
  421. package/dist/chunks/setup-D1sQnli9.js +0 -2
  422. package/dist/chunks/sink-fGBOXJab.js +0 -1
  423. package/dist/chunks/sinks-BCl9slVM.js +0 -1
  424. package/dist/chunks/skillChangeDetector-BOH-fyEn.js +0 -1
  425. package/dist/chunks/skillLearning-BDsjN-u-.js +0 -1
  426. package/dist/chunks/skillLearning-CXUsWxdi.js +0 -1
  427. package/dist/chunks/statusNoticeHelpers-reCcymMR.js +0 -1
  428. package/dist/chunks/teamHelpers-BBhol4dD.js +0 -1
  429. package/dist/chunks/teammateModeSnapshot-W5G22rwQ.js +0 -1
  430. package/dist/chunks/teleport-Da0rKwCo.js +0 -1
  431. package/dist/chunks/thinkback-Cd1g_2A9.js +0 -1
  432. package/dist/chunks/thinkback-ChP6pvCS.js +0 -1
  433. package/dist/chunks/thinkback-play-Cg8Ys2dq.js +0 -1
  434. package/dist/chunks/toolPool-CN1cPGQz.js +0 -1
  435. package/dist/chunks/toolPool-CygNb5cr.js +0 -1
  436. package/dist/chunks/undercover-bx8TwG9W.js +0 -1
  437. package/dist/chunks/upgrade-BkHztwGA.js +0 -1
  438. package/dist/chunks/useMainLoopModel-X1PW9z5A.js +0 -1
  439. package/dist/chunks/useMergedTools-CC3XwtOR.js +0 -1
  440. package/dist/chunks/useSettingsErrors-vGzCYpIA.js +0 -1
  441. package/dist/chunks/utils-Dg0S2Vfn.js +0 -1
  442. package/dist/chunks/validatePlugin-_Z4zhjSx.js +0 -1
  443. package/dist/chunks/voiceModeEnabled-BqFYzoXw.js +0 -1
  444. package/dist/chunks/voiceStreamSTT-C0pkuXGm.js +0 -1
  445. package/dist/chunks/worktree-Cg4p1J__.js +0 -1
  446. /package/dist/chunks/{InProcessTransport-DB52dh4f.js → InProcessTransport-gJLr5CIx.js} +0 -0
  447. /package/dist/chunks/{attributionHooks-PygdohOh.js → attributionHooks-Br5LZ6bk.js} +0 -0
  448. /package/dist/chunks/{attributionTrailer-BpvhXgRP.js → attributionTrailer-BMTuK4Ax.js} +0 -0
  449. /package/dist/chunks/{autoModeDenials-Cp6VFdsm.js → autoModeDenials-D8eQ1CoM.js} +0 -0
  450. /package/dist/chunks/{banner-CVXH2xts.js → banner-32EBTKI7.js} +0 -0
  451. /package/dist/chunks/{bedrockClient-qi1-JCOK.js → bedrockClient-Ci523Btx.js} +0 -0
  452. /package/dist/chunks/{ccshareResume-DWLjTF22.js → ccshareResume-CqNm2k-J.js} +0 -0
  453. /package/dist/chunks/{chromeNativeHost-4U39yLtd.js → chromeNativeHost-DX8f9Y2L.js} +0 -0
  454. /package/dist/chunks/{claudeDesktop-D0S1eq1F.js → claudeDesktop-C1qQs6os.js} +0 -0
  455. /package/dist/chunks/{cleanup-Bg_gFgcj.js → cleanup-Pv6U3HiI.js} +0 -0
  456. /package/dist/chunks/{connectHeadless-CwsFt-Mh.js → connectHeadless-DFCrE6O4.js} +0 -0
  457. /package/dist/chunks/{dangerousBackend-BU_PHGR2.js → dangerousBackend-Du0K4q5Z.js} +0 -0
  458. /package/dist/chunks/{earlyInput-tRkbxFv2.js → earlyInput-feVuZGzR.js} +0 -0
  459. /package/dist/chunks/{eventLoopStallDetector-Dnh1fc31.js → eventLoopStallDetector-XfubcyMN.js} +0 -0
  460. /package/dist/chunks/{fpsMetrics-DeezdcwV.js → fpsMetrics-CEQt6Tk1.js} +0 -0
  461. /package/dist/chunks/{fuse-Ch_OAlm3.js → fuse-TM-TeOo_.js} +0 -0
  462. /package/dist/chunks/{instinctParser-DHMa8xa0.js → instinctParser-CJPM8VjX.js} +0 -0
  463. /package/dist/chunks/{lockfile-DBwdlC3K.js → lockfile-Y1hwdHrQ.js} +0 -0
  464. /package/dist/chunks/{main-C6be1KFk.js → main-D9fUXJiD.js} +0 -0
  465. /package/dist/chunks/{observationStore-tvkldXUo.js → observationStore-gFvWXJmc.js} +0 -0
  466. /package/dist/chunks/{openaiShared-Bjrci9n8.js → openaiShared-Dy78YERG.js} +0 -0
  467. /package/dist/chunks/{output-style-XDb9-2Kk.js → output-style-BmEQscMd.js} +0 -0
  468. /package/dist/chunks/{parseConnectUrl-BS6i9JPo.js → parseConnectUrl-C6cvMkkH.js} +0 -0
  469. /package/dist/chunks/{poller-Ds0Y6Cir.js → poller-Dbo07OEA.js} +0 -0
  470. /package/dist/chunks/{postCommitAttribution-Ehmwzzuq.js → postCommitAttribution-DhFkZMxJ.js} +0 -0
  471. /package/dist/chunks/{projectContext-eXMSfgdZ.js → projectContext-iWPqcl0Z.js} +0 -0
  472. /package/dist/chunks/{renderOptions-BiyC2rj1.js → renderOptions-rmj4Mkls.js} +0 -0
  473. /package/dist/chunks/{rewind-CXplHgh_.js → rewind-DAn-nNs-.js} +0 -0
  474. /package/dist/chunks/{sanitization-CYp-9DbE.js → sanitization-JYRkZFrK.js} +0 -0
  475. /package/dist/chunks/{sdkHeapDumpMonitor--fevrC5z.js → sdkHeapDumpMonitor-DKtfJW5o.js} +0 -0
  476. /package/dist/chunks/{server-C5XZSlto.js → server-CswFAYwN.js} +0 -0
  477. /package/dist/chunks/{serverBanner-WlSYP-f8.js → serverBanner-CImTYGhY.js} +0 -0
  478. /package/dist/chunks/{serverLog-DtsUvDiY.js → serverLog-Bwt7XEmk.js} +0 -0
  479. /package/dist/chunks/{sessionDataUploader-Ctjo1bgR.js → sessionDataUploader-CKRXCBxI.js} +0 -0
  480. /package/dist/chunks/{sessionManager-Dw72ZUTg.js → sessionManager-Ca2O821f.js} +0 -0
  481. /package/dist/chunks/{stickers-2K05wjSp.js → stickers-BMh2qjgF.js} +0 -0
  482. /package/dist/chunks/{udsClient-BvG_Jip0.js → udsClient-BdPOrL1H.js} +0 -0
  483. /package/dist/chunks/{upstreamproxy-DcLeL2XX.js → upstreamproxy-Ci5T_JCo.js} +0 -0
  484. /package/dist/chunks/{voice-DXiiy8HX.js → voice-BcA5h8ya.js} +0 -0
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Q as r,Rn as i,b as a,i as o,n as s,p as c,r as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{C as m,S as h}from"./startupProfiler-DnXZaX4A.js";import{Fi as g,Hi as _,Li as v,Nx as y,Px as b,Uw as x,Xi as S,nT as C,rT as w}from"./loadAgentsDir-D-xcJ22-.js";import{t as T}from"./useKeybinding-FsOnjW6T.js";import{l as E,u as D}from"./referral-D26orIXE.js";import{n as O,r as k}from"./modalContext-CmSKRyea.js";import{n as A,t as j}from"./PromptInputHelpMenu-BsYNhZCw.js";function M({commands:e,maxHeight:t,columns:n,title:r,onCancel:i,emptyMessage:s}){let{headerFocused:c,focusHeader:l}=o(),u=Math.max(1,n-10),d=Math.max(1,Math.floor((t-10)/2)),p=(0,N.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:m(_(e),u,!0)}))},[e,u]);return(0,P.jsx)(f,{flexDirection:`column`,paddingY:1,children:e.length===0&&s?(0,P.jsx)(a,{dimColor:!0,children:s}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a,{children:r}),(0,P.jsx)(f,{marginTop:1,children:(0,P.jsx)(y,{options:p,visibleOptionCount:d,onCancel:i,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:l,isDisabled:c})})]})})}var N,P,F=e((()=>{i(),N=t(i(),1),S(),h(),u(),b(),P=p()}));function I(){return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,L.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,L.jsx)(a,{bold:!0,children:`Getting started`}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`1. `}),(0,L.jsx)(a,{children:`Ask a question or describe a task — Claude will explore your code and respond.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`2. `}),(0,L.jsx)(a,{children:`When Claude wants to edit files or run commands, you review and approve each action.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`3. `}),(0,L.jsx)(a,{children:`Type `}),(0,L.jsx)(a,{bold:!0,children:`/commit`}),(0,L.jsx)(a,{children:` to commit changes, `}),(0,L.jsx)(a,{bold:!0,children:`/help`}),(0,L.jsx)(a,{children:` for commands, or `}),(0,L.jsx)(a,{bold:!0,children:`?`}),(0,L.jsx)(a,{children:` for shortcuts.`})]})]})]}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsx)(f,{children:(0,L.jsx)(a,{bold:!0,children:`Shortcuts`})}),(0,L.jsx)(j,{gap:2,fixedWidth:!0})]})]})}var L,R=e((()=>{i(),u(),A(),L=p()}));function z({onClose:e,commands:t}){let{rows:i,columns:o}=n(),u=Math.floor(i/2),p=k(),m=()=>e(`Help dialog dismissed`,{display:`system`});d(`help:dismiss`,m,{context:`Help`});let h=D(m),_=w(`help:dismiss`,`Help`,`esc`),y=v(),b=t.filter(e=>y.has(e.name)&&!e.isHidden),x=[];if(process.env.USER_TYPE===`ant`){let e=new Set(g.map(e=>e.name));b=b.filter(t=>!e.has(t.name)),x=t.filter(t=>e.has(t.name)&&!t.isHidden)}let S=t.filter(e=>!y.has(e.name)&&!e.isHidden),C=[(0,B.jsx)(s,{title:`general`,children:(0,B.jsx)(I,{})},`general`)];return C.push((0,B.jsx)(s,{title:`commands`,children:(0,B.jsx)(M,{commands:b,maxHeight:u,columns:o,title:`Browse default commands:`,onCancel:m})},`commands`)),C.push((0,B.jsx)(s,{title:`custom-commands`,children:(0,B.jsx)(M,{commands:S,maxHeight:u,columns:o,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),process.env.USER_TYPE===`ant`&&x.length>0&&C.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:x,maxHeight:u,columns:o,title:`Browse ant-only commands:`,onCancel:m})},`ant-only`)),(0,B.jsx)(f,{flexDirection:`column`,height:p?void 0:u,children:(0,B.jsxs)(c,{color:`professionalBlue`,children:[(0,B.jsx)(l,{title:process.env.USER_TYPE===`ant`?`/help`:`Claude Code v2.6.11`,color:`professionalBlue`,defaultTab:`general`,children:C}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsxs)(a,{children:[`For more help: `,(0,B.jsx)(r,{url:`https://code.claude.com/docs/en/overview`})]})}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsx)(a,{dimColor:!0,children:h.pending?(0,B.jsxs)(B.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,B.jsxs)(a,{italic:!0,children:[_,` to cancel`]})})})]})})}var B,V=e((()=>{i(),E(),C(),S(),O(),x(),u(),T(),F(),R(),B=p()})),H,U;e((()=>{V(),H=p(),U=async(e,{options:{commands:t}})=>(0,H.jsx)(z,{commands:t,onClose:e})}))();export{U as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Q as r,Rn as i,b as a,i as o,n as s,p as c,r as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{C as m,S as h}from"./startupProfiler-DnXZaX4A.js";import{Ki as g,Lx as _,Rx as v,Vi as y,ea as b,oT as x,qw as S,sT as C,zi as w}from"./loadAgentsDir-C9Ee_fs1.js";import{t as T}from"./useKeybinding-FsOnjW6T.js";import{l as E,u as D}from"./referral-CXmDvb7V.js";import{n as O,r as k}from"./modalContext-CmSKRyea.js";import{n as A,t as j}from"./PromptInputHelpMenu-D84vnNKM.js";function M({commands:e,maxHeight:t,columns:n,title:r,onCancel:i,emptyMessage:s}){let{headerFocused:c,focusHeader:l}=o(),u=Math.max(1,n-10),d=Math.max(1,Math.floor((t-10)/2)),p=(0,N.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:m(g(e),u,!0)}))},[e,u]);return(0,P.jsx)(f,{flexDirection:`column`,paddingY:1,children:e.length===0&&s?(0,P.jsx)(a,{dimColor:!0,children:s}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a,{children:r}),(0,P.jsx)(f,{marginTop:1,children:(0,P.jsx)(_,{options:p,visibleOptionCount:d,onCancel:i,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:l,isDisabled:c})})]})})}var N,P,F=e((()=>{i(),N=t(i(),1),b(),h(),u(),v(),P=p()}));function I(){return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,L.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,L.jsx)(a,{bold:!0,children:`Getting started`}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`1. `}),(0,L.jsx)(a,{children:`Ask a question or describe a task — Claude will explore your code and respond.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`2. `}),(0,L.jsx)(a,{children:`When Claude wants to edit files or run commands, you review and approve each action.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`3. `}),(0,L.jsx)(a,{children:`Type `}),(0,L.jsx)(a,{bold:!0,children:`/commit`}),(0,L.jsx)(a,{children:` to commit changes, `}),(0,L.jsx)(a,{bold:!0,children:`/help`}),(0,L.jsx)(a,{children:` for commands, or `}),(0,L.jsx)(a,{bold:!0,children:`?`}),(0,L.jsx)(a,{children:` for shortcuts.`})]})]})]}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsx)(f,{children:(0,L.jsx)(a,{bold:!0,children:`Shortcuts`})}),(0,L.jsx)(j,{gap:2,fixedWidth:!0})]})]})}var L,R=e((()=>{i(),u(),A(),L=p()}));function z({onClose:e,commands:t}){let{rows:i,columns:o}=n(),u=Math.floor(i/2),p=k(),m=()=>e(`Help dialog dismissed`,{display:`system`});d(`help:dismiss`,m,{context:`Help`});let h=D(m),g=C(`help:dismiss`,`Help`,`esc`),_=y(),v=t.filter(e=>_.has(e.name)&&!e.isHidden),b=[];if(process.env.USER_TYPE===`ant`){let e=new Set(w.map(e=>e.name));v=v.filter(t=>!e.has(t.name)),b=t.filter(t=>e.has(t.name)&&!t.isHidden)}let x=t.filter(e=>!_.has(e.name)&&!e.isHidden),S=[(0,B.jsx)(s,{title:`general`,children:(0,B.jsx)(I,{})},`general`)];return S.push((0,B.jsx)(s,{title:`commands`,children:(0,B.jsx)(M,{commands:v,maxHeight:u,columns:o,title:`Browse default commands:`,onCancel:m})},`commands`)),S.push((0,B.jsx)(s,{title:`custom-commands`,children:(0,B.jsx)(M,{commands:x,maxHeight:u,columns:o,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),process.env.USER_TYPE===`ant`&&b.length>0&&S.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:b,maxHeight:u,columns:o,title:`Browse ant-only commands:`,onCancel:m})},`ant-only`)),(0,B.jsx)(f,{flexDirection:`column`,height:p?void 0:u,children:(0,B.jsxs)(c,{color:`professionalBlue`,children:[(0,B.jsx)(l,{title:process.env.USER_TYPE===`ant`?`/help`:`Claude Code v2.6.13`,color:`professionalBlue`,defaultTab:`general`,children:S}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsxs)(a,{children:[`For more help: `,(0,B.jsx)(r,{url:`https://code.claude.com/docs/en/overview`})]})}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsx)(a,{dimColor:!0,children:h.pending?(0,B.jsxs)(B.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,B.jsxs)(a,{italic:!0,children:[g,` to cancel`]})})})]})})}var B,V=e((()=>{i(),E(),x(),b(),O(),S(),u(),T(),F(),R(),B=p()})),H,U;e((()=>{V(),H=p(),U=async(e,{options:{commands:t}})=>(0,H.jsx)(z,{commands:t,onClose:e})}))();export{U as call};
@@ -0,0 +1 @@
1
+ import{$t as e,Cn as t,Sn as n,mn as r}from"./loadAgentsDir-C9Ee_fs1.js";t();export{e as executeSessionEndHooks,r as getSessionEndHookTimeoutMs,n as hasWorktreeCreateHook};
@@ -1,4 +1,4 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./memoize-DNnuA2aU.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{Q as o,Rn as s,b as c,f as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,ht as h}from"./state-sIHsFpDu.js";import{Po as g,Qa as _,jo as v,no as y,oo as b}from"./paths-D9CVAtXU.js";import{n as x,r as S}from"./analytics-DqMQntaB.js";import{A_ as C,F_ as w,I_ as T,KS as E,Ku as D,LS as O,M_ as k,N_ as A,Nx as j,P_ as ee,Px as M,RS as N,j_ as P,qS as F,qu as te,zS as ne}from"./loadAgentsDir-D-xcJ22-.js";import{t as re}from"./useKeybinding-FsOnjW6T.js";function ie(e,t){let n={PreToolUse:{},PostToolUse:{},PostToolUseFailure:{},PermissionDenied:{},Notification:{},UserPromptSubmit:{},SessionStart:{},SessionEnd:{},Stop:{},StopFailure:{},SubagentStart:{},SubagentStop:{},PreCompact:{},PostCompact:{},PermissionRequest:{},Setup:{},TeammateIdle:{},TaskCreated:{},TaskCompleted:{},Elicitation:{},ElicitationResult:{},ConfigChange:{},WorktreeCreate:{},WorktreeRemove:{},InstructionsLoaded:{},CwdChanged:{},FileChanged:{}},r=L(t);C(e).forEach(e=>{let t=n[e.event];if(t){let n=r[e.event].matcherMetadata===void 0?``:e.matcher||``;t[n]||(t[n]=[]),t[n].push(e)}});let i=h();if(i)for(let[e,t]of Object.entries(i)){let r=e,i=n[r];if(i)for(let e of t??[]){let t=e.matcher||``;if(`pluginRoot`in e){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:n,matcher:e.matcher,source:`pluginHook`,pluginName:e.pluginId})}else if(process.env.USER_TYPE===`ant`){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:{type:`command`,command:`[ANT-ONLY] Built-in Hook`},matcher:e.matcher,source:`builtinHook`})}}}return n}function ae(e,t){return T(Object.keys(e[t]||{}),e,t)}function oe(e,t,n){let r=n??``;return e[t]?.[r]??[]}function I(e,t){return L(t)[e].matcherMetadata}var L,R=e((()=>{r(),m(),w(),L=n(function(e){return{PreToolUse:{summary:`Before tool execution`,description:`Input to command is JSON of tool call arguments.
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./memoize-DNnuA2aU.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{Q as o,Rn as s,b as c,f as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,ht as h}from"./state-sIHsFpDu.js";import{Po as g,Qa as _,jo as v,no as y,oo as b}from"./paths-C2JRlUsH.js";import{n as x,r as S}from"./analytics-DqMQntaB.js";import{B_ as C,F_ as w,HS as T,I_ as E,L_ as D,Lx as O,P_ as k,R_ as ee,Rx as A,US as j,VS as M,XS as N,Xu as P,ZS as te,Zu as ne,z_ as F}from"./loadAgentsDir-C9Ee_fs1.js";import{t as re}from"./useKeybinding-FsOnjW6T.js";function ie(e,t){let n={PreToolUse:{},PostToolUse:{},PostToolUseFailure:{},PermissionDenied:{},Notification:{},UserPromptSubmit:{},SessionStart:{},SessionEnd:{},Stop:{},StopFailure:{},SubagentStart:{},SubagentStop:{},PreCompact:{},PostCompact:{},PermissionRequest:{},Setup:{},TeammateIdle:{},TaskCreated:{},TaskCompleted:{},Elicitation:{},ElicitationResult:{},ConfigChange:{},WorktreeCreate:{},WorktreeRemove:{},InstructionsLoaded:{},CwdChanged:{},FileChanged:{}},r=L(t);k(e).forEach(e=>{let t=n[e.event];if(t){let n=r[e.event].matcherMetadata===void 0?``:e.matcher||``;t[n]||(t[n]=[]),t[n].push(e)}});let i=h();if(i)for(let[e,t]of Object.entries(i)){let r=e,i=n[r];if(i)for(let e of t??[]){let t=e.matcher||``;if(`pluginRoot`in e){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:n,matcher:e.matcher,source:`pluginHook`,pluginName:e.pluginId})}else if(process.env.USER_TYPE===`ant`){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:{type:`command`,command:`[ANT-ONLY] Built-in Hook`},matcher:e.matcher,source:`builtinHook`})}}}return n}function ae(e,t){return C(Object.keys(e[t]||{}),e,t)}function oe(e,t,n){let r=n??``;return e[t]?.[r]??[]}function I(e,t){return L(t)[e].matcherMetadata}var L,R=e((()=>{r(),m(),F(),L=n(function(e){return{PreToolUse:{summary:`Before tool execution`,description:`Input to command is JSON of tool call arguments.
2
2
  Exit code 0 - stdout/stderr not shown
3
3
  Exit code 2 - show stderr to model and block tool call
4
4
  Other exit codes - show stderr to user only but continue with tool call`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PostToolUse:{summary:`After tool execution`,description:`Input to command is JSON with fields "inputs" (tool call arguments) and "response" (tool call response).
@@ -76,4 +76,4 @@ CLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent B
76
76
  The matcher field specifies filenames to watch in the current directory (e.g. ".envrc|.env").
77
77
  Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.
78
78
  Exit code 0 - command completes successfully
79
- Other exit codes - show stderr to user only`}}},e=>e.slice().sort().join(`,`))}));function z({hookEventMetadata:e,hooksByEvent:t,totalHooksCount:n,restrictedByPolicy:r,onSelectEvent:i,onCancel:s}){return(0,B.jsx)(l,{title:`Hooks`,subtitle:`${n} ${g(n,`hook`)} configured`,onCancel:s,children:(0,B.jsxs)(f,{flexDirection:`column`,gap:1,children:[r&&(0,B.jsxs)(f,{flexDirection:`column`,children:[(0,B.jsxs)(c,{color:`suggestion`,children:[a.info,` Hooks Restricted by Policy`]}),(0,B.jsx)(c,{dimColor:!0,children:`Only hooks from managed settings can run. User-defined hooks from ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json are blocked.`})]}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsxs)(c,{dimColor:!0,children:[a.info,` This menu is read-only. To add or modify hooks, edit settings.json directly or ask Claude.`,` `,(0,B.jsx)(o,{url:`https://code.claude.com/docs/en/hooks`,children:`Learn more`})]})}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsx)(j,{onChange:e=>{i(e)},onCancel:s,options:Object.entries(e).map(([e,n])=>{let r=t[e]||0;return{label:r>0?(0,B.jsxs)(c,{children:[e,` `,(0,B.jsxs)(c,{color:`suggestion`,children:[`(`,r,`)`]})]}):e,value:e,description:n.summary}})})})]})})}var B,V=e((()=>{i(),s(),u(),v(),M(),B=p()}));function H({selectedEvent:e,selectedMatcher:t,hooksForSelectedMatcher:n,hookEventMetadata:r,onSelect:i,onCancel:a}){let o=r.matcherMetadata===void 0?e:`${e} - Matcher: ${t||`(all)`}`;return n.length===0?(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,inputGuide:()=>(0,U.jsx)(c,{children:`Esc to go back`}),children:(0,U.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,U.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,U.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,children:(0,U.jsx)(f,{flexDirection:`column`,children:(0,U.jsx)(j,{options:n.map((e,t)=>({label:`[${e.config.type}] ${P(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${A(e.source)} (${e.pluginName})`:A(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{s(),u(),w(),M(),U=p()}));function G({selectedEvent:e,matchersForSelectedEvent:t,hooksByEventAndMatcher:n,eventDescription:r,onSelect:i,onCancel:a}){let o=K.useMemo(()=>t.map(t=>{let r=n[e]?.[t]||[];return{matcher:t,sources:Array.from(new Set(r.map(e=>e.source))),hookCount:r.length}}),[t,n,e]);return t.length===0?(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,inputGuide:()=>(0,q.jsx)(c,{children:`Esc to go back`}),children:(0,q.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,q.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,children:(0,q.jsx)(f,{flexDirection:`column`,children:(0,q.jsx)(j,{options:o.map(e=>({label:`[${e.sources.map(ee).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${g(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,se=e((()=>{K=t(s(),1),u(),w(),v(),M(),q=p()}));function ce({selectedHook:e,eventSupportsMatcher:t,onCancel:n}){return(0,J.jsx)(l,{title:`Hook details`,onCancel:n,inputGuide:()=>(0,J.jsx)(c,{children:`Esc to go back`}),children:(0,J.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{children:[`Event: `,(0,J.jsx)(c,{bold:!0,children:e.event})]}),t&&(0,J.jsxs)(c,{children:[`Matcher: `,(0,J.jsx)(c,{bold:!0,children:e.matcher||`(all)`})]}),(0,J.jsxs)(c,{children:[`Type: `,(0,J.jsx)(c,{bold:!0,children:e.config.type})]}),(0,J.jsxs)(c,{children:[`Source: `,(0,J.jsx)(c,{dimColor:!0,children:k(e.source)})]}),e.pluginName&&(0,J.jsxs)(c,{children:[`Plugin: `,(0,J.jsx)(c,{dimColor:!0,children:e.pluginName})]})]}),(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{dimColor:!0,children:[le(e.config),`:`]}),(0,J.jsx)(f,{borderStyle:`round`,borderDimColor:!0,paddingLeft:1,paddingRight:1,children:(0,J.jsx)(c,{children:ue(e.config)})})]}),`statusMessage`in e.config&&e.config.statusMessage&&(0,J.jsxs)(c,{children:[`Status message: `,(0,J.jsx)(c,{dimColor:!0,children:e.config.statusMessage})]}),(0,J.jsx)(c,{dimColor:!0,children:`To modify or remove this hook, edit settings.json directly or ask Claude to help.`})]})})}function le(e){switch(e.type){case`command`:return`Command`;case`prompt`:return`Prompt`;case`agent`:return`Prompt`;case`http`:return`URL`}}function ue(e){switch(e.type){case`command`:return e.command;case`prompt`:return e.prompt;case`agent`:return e.prompt;case`http`:return e.url}}var J,Y=e((()=>{s(),u(),w(),J=p()}));function de({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),[o,s]=(0,X.useState)(()=>_(`policySettings`)?.allowManagedHooksOnly===!0);F(e=>{e===`policySettings`&&(a(y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),s(_(`policySettings`)?.allowManagedHooksOnly===!0))});let u=n.mode,p=`event`in n?n.event:`PreToolUse`,m=`matcher`in n?n.matcher:null,h=N(e=>e.mcp),v=ne(),b=(0,X.useMemo)(()=>[...e,...h.tools.map(e=>e.name)],[e,h.tools]),x=(0,X.useMemo)(()=>ie(v.getState(),b),[b,v]),S=(0,X.useMemo)(()=>ae(x,p),[x,p]),C=(0,X.useMemo)(()=>oe(x,p,m),[x,p,m]),w=(0,X.useCallback)(()=>{t(`Hooks dialog dismissed`,{display:`system`})},[t]);d(`confirm:no`,w,{context:`Confirmation`,isActive:u===`select-event`}),d(`confirm:no`,()=>{r({mode:`select-event`})},{context:`Confirmation`,isActive:u===`select-matcher`}),d(`confirm:no`,()=>{`event`in n&&(I(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event}))},{context:`Confirmation`,isActive:u===`select-hook`}),d(`confirm:no`,()=>{if(n.mode===`view-hook`){let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}},{context:`Confirmation`,isActive:u===`view-hook`});let T=L(b),E=y()?.disableAllHooks===!0,{hooksByEvent:D,totalHooksCount:O}=(0,X.useMemo)(()=>{let e={},t=0;for(let[n,r]of Object.entries(x)){let i=Object.values(r).reduce((e,t)=>e+t.length,0);e[n]=i,t+=i}return{hooksByEvent:e,totalHooksCount:t}},[x]);if(E)return(0,Z.jsx)(l,{title:`Hook Configuration - Disabled`,onCancel:w,inputGuide:()=>(0,Z.jsx)(c,{children:`Esc to close`}),children:(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsxs)(f,{flexDirection:`column`,children:[(0,Z.jsxs)(c,{children:[`All hooks are currently `,(0,Z.jsx)(c,{bold:!0,children:`disabled`}),i&&` by a managed settings file`,`. You have `,(0,Z.jsx)(c,{bold:!0,children:O}),` `,`configured `,g(O,`hook`),` that `,g(O,`is`,`are`),` not running.`]}),(0,Z.jsx)(f,{marginTop:1,children:(0,Z.jsx)(c,{dimColor:!0,children:`When hooks are disabled:`})}),(0,Z.jsx)(c,{dimColor:!0,children:`· No hook commands will execute`}),(0,Z.jsx)(c,{dimColor:!0,children:`· StatusLine will not be displayed`}),(0,Z.jsx)(c,{dimColor:!0,children:`· Tool operations will proceed without hook validation`})]}),!i&&(0,Z.jsx)(c,{dimColor:!0,children:`To re-enable hooks, remove "disableAllHooks" from settings.json or ask Claude.`})]})});switch(n.mode){case`select-event`:return(0,Z.jsx)(z,{hookEventMetadata:T,hooksByEvent:D,totalHooksCount:O,restrictedByPolicy:o,onSelectEvent:e=>{I(e,b)===void 0?r({mode:`select-hook`,event:e,matcher:``}):r({mode:`select-matcher`,event:e})},onCancel:w});case`select-matcher`:return(0,Z.jsx)(G,{selectedEvent:n.event,matchersForSelectedEvent:S,hooksByEventAndMatcher:x,eventDescription:T[n.event].description,onSelect:e=>{r({mode:`select-hook`,event:n.event,matcher:e})},onCancel:()=>{r({mode:`select-event`})}});case`select-hook`:return(0,Z.jsx)(H,{selectedEvent:n.event,selectedMatcher:n.matcher,hooksForSelectedMatcher:C,hookEventMetadata:T[n.event],onSelect:e=>{r({mode:`view-hook`,event:n.event,hook:e})},onCancel:()=>{I(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event})}});case`view-hook`:return(0,Z.jsx)(ce,{selectedHook:n.hook,eventSupportsMatcher:I(n.event,b)!==void 0,onCancel:()=>{let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}})}}var X,Z,fe=e((()=>{s(),X=t(s(),1),O(),E(),u(),re(),R(),b(),v(),V(),W(),se(),Y(),Z=p()})),Q,$;e((()=>{fe(),x(),te(),Q=p(),$=async(e,t)=>{S(`tengu_hooks_command`,{});let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(de,{toolNames:D(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
79
+ Other exit codes - show stderr to user only`}}},e=>e.slice().sort().join(`,`))}));function z({hookEventMetadata:e,hooksByEvent:t,totalHooksCount:n,restrictedByPolicy:r,onSelectEvent:i,onCancel:s}){return(0,B.jsx)(l,{title:`Hooks`,subtitle:`${n} ${g(n,`hook`)} configured`,onCancel:s,children:(0,B.jsxs)(f,{flexDirection:`column`,gap:1,children:[r&&(0,B.jsxs)(f,{flexDirection:`column`,children:[(0,B.jsxs)(c,{color:`suggestion`,children:[a.info,` Hooks Restricted by Policy`]}),(0,B.jsx)(c,{dimColor:!0,children:`Only hooks from managed settings can run. User-defined hooks from ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json are blocked.`})]}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsxs)(c,{dimColor:!0,children:[a.info,` This menu is read-only. To add or modify hooks, edit settings.json directly or ask Claude.`,` `,(0,B.jsx)(o,{url:`https://code.claude.com/docs/en/hooks`,children:`Learn more`})]})}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsx)(O,{onChange:e=>{i(e)},onCancel:s,options:Object.entries(e).map(([e,n])=>{let r=t[e]||0;return{label:r>0?(0,B.jsxs)(c,{children:[e,` `,(0,B.jsxs)(c,{color:`suggestion`,children:[`(`,r,`)`]})]}):e,value:e,description:n.summary}})})})]})})}var B,V=e((()=>{i(),s(),u(),v(),A(),B=p()}));function H({selectedEvent:e,selectedMatcher:t,hooksForSelectedMatcher:n,hookEventMetadata:r,onSelect:i,onCancel:a}){let o=r.matcherMetadata===void 0?e:`${e} - Matcher: ${t||`(all)`}`;return n.length===0?(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,inputGuide:()=>(0,U.jsx)(c,{children:`Esc to go back`}),children:(0,U.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,U.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,U.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,children:(0,U.jsx)(f,{flexDirection:`column`,children:(0,U.jsx)(O,{options:n.map((e,t)=>({label:`[${e.config.type}] ${w(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${D(e.source)} (${e.pluginName})`:D(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{s(),u(),F(),A(),U=p()}));function G({selectedEvent:e,matchersForSelectedEvent:t,hooksByEventAndMatcher:n,eventDescription:r,onSelect:i,onCancel:a}){let o=K.useMemo(()=>t.map(t=>{let r=n[e]?.[t]||[];return{matcher:t,sources:Array.from(new Set(r.map(e=>e.source))),hookCount:r.length}}),[t,n,e]);return t.length===0?(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,inputGuide:()=>(0,q.jsx)(c,{children:`Esc to go back`}),children:(0,q.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,q.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,children:(0,q.jsx)(f,{flexDirection:`column`,children:(0,q.jsx)(O,{options:o.map(e=>({label:`[${e.sources.map(ee).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${g(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,se=e((()=>{K=t(s(),1),u(),F(),v(),A(),q=p()}));function ce({selectedHook:e,eventSupportsMatcher:t,onCancel:n}){return(0,J.jsx)(l,{title:`Hook details`,onCancel:n,inputGuide:()=>(0,J.jsx)(c,{children:`Esc to go back`}),children:(0,J.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{children:[`Event: `,(0,J.jsx)(c,{bold:!0,children:e.event})]}),t&&(0,J.jsxs)(c,{children:[`Matcher: `,(0,J.jsx)(c,{bold:!0,children:e.matcher||`(all)`})]}),(0,J.jsxs)(c,{children:[`Type: `,(0,J.jsx)(c,{bold:!0,children:e.config.type})]}),(0,J.jsxs)(c,{children:[`Source: `,(0,J.jsx)(c,{dimColor:!0,children:E(e.source)})]}),e.pluginName&&(0,J.jsxs)(c,{children:[`Plugin: `,(0,J.jsx)(c,{dimColor:!0,children:e.pluginName})]})]}),(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{dimColor:!0,children:[le(e.config),`:`]}),(0,J.jsx)(f,{borderStyle:`round`,borderDimColor:!0,paddingLeft:1,paddingRight:1,children:(0,J.jsx)(c,{children:ue(e.config)})})]}),`statusMessage`in e.config&&e.config.statusMessage&&(0,J.jsxs)(c,{children:[`Status message: `,(0,J.jsx)(c,{dimColor:!0,children:e.config.statusMessage})]}),(0,J.jsx)(c,{dimColor:!0,children:`To modify or remove this hook, edit settings.json directly or ask Claude to help.`})]})})}function le(e){switch(e.type){case`command`:return`Command`;case`prompt`:return`Prompt`;case`agent`:return`Prompt`;case`http`:return`URL`}}function ue(e){switch(e.type){case`command`:return e.command;case`prompt`:return e.prompt;case`agent`:return e.prompt;case`http`:return e.url}}var J,Y=e((()=>{s(),u(),F(),J=p()}));function de({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),[o,s]=(0,X.useState)(()=>_(`policySettings`)?.allowManagedHooksOnly===!0);te(e=>{e===`policySettings`&&(a(y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),s(_(`policySettings`)?.allowManagedHooksOnly===!0))});let u=n.mode,p=`event`in n?n.event:`PreToolUse`,m=`matcher`in n?n.matcher:null,h=T(e=>e.mcp),v=j(),b=(0,X.useMemo)(()=>[...e,...h.tools.map(e=>e.name)],[e,h.tools]),x=(0,X.useMemo)(()=>ie(v.getState(),b),[b,v]),S=(0,X.useMemo)(()=>ae(x,p),[x,p]),C=(0,X.useMemo)(()=>oe(x,p,m),[x,p,m]),w=(0,X.useCallback)(()=>{t(`Hooks dialog dismissed`,{display:`system`})},[t]);d(`confirm:no`,w,{context:`Confirmation`,isActive:u===`select-event`}),d(`confirm:no`,()=>{r({mode:`select-event`})},{context:`Confirmation`,isActive:u===`select-matcher`}),d(`confirm:no`,()=>{`event`in n&&(I(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event}))},{context:`Confirmation`,isActive:u===`select-hook`}),d(`confirm:no`,()=>{if(n.mode===`view-hook`){let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}},{context:`Confirmation`,isActive:u===`view-hook`});let E=L(b),D=y()?.disableAllHooks===!0,{hooksByEvent:O,totalHooksCount:k}=(0,X.useMemo)(()=>{let e={},t=0;for(let[n,r]of Object.entries(x)){let i=Object.values(r).reduce((e,t)=>e+t.length,0);e[n]=i,t+=i}return{hooksByEvent:e,totalHooksCount:t}},[x]);if(D)return(0,Z.jsx)(l,{title:`Hook Configuration - Disabled`,onCancel:w,inputGuide:()=>(0,Z.jsx)(c,{children:`Esc to close`}),children:(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsxs)(f,{flexDirection:`column`,children:[(0,Z.jsxs)(c,{children:[`All hooks are currently `,(0,Z.jsx)(c,{bold:!0,children:`disabled`}),i&&` by a managed settings file`,`. You have `,(0,Z.jsx)(c,{bold:!0,children:k}),` `,`configured `,g(k,`hook`),` that `,g(k,`is`,`are`),` not running.`]}),(0,Z.jsx)(f,{marginTop:1,children:(0,Z.jsx)(c,{dimColor:!0,children:`When hooks are disabled:`})}),(0,Z.jsx)(c,{dimColor:!0,children:`· No hook commands will execute`}),(0,Z.jsx)(c,{dimColor:!0,children:`· StatusLine will not be displayed`}),(0,Z.jsx)(c,{dimColor:!0,children:`· Tool operations will proceed without hook validation`})]}),!i&&(0,Z.jsx)(c,{dimColor:!0,children:`To re-enable hooks, remove "disableAllHooks" from settings.json or ask Claude.`})]})});switch(n.mode){case`select-event`:return(0,Z.jsx)(z,{hookEventMetadata:E,hooksByEvent:O,totalHooksCount:k,restrictedByPolicy:o,onSelectEvent:e=>{I(e,b)===void 0?r({mode:`select-hook`,event:e,matcher:``}):r({mode:`select-matcher`,event:e})},onCancel:w});case`select-matcher`:return(0,Z.jsx)(G,{selectedEvent:n.event,matchersForSelectedEvent:S,hooksByEventAndMatcher:x,eventDescription:E[n.event].description,onSelect:e=>{r({mode:`select-hook`,event:n.event,matcher:e})},onCancel:()=>{r({mode:`select-event`})}});case`select-hook`:return(0,Z.jsx)(H,{selectedEvent:n.event,selectedMatcher:n.matcher,hooksForSelectedMatcher:C,hookEventMetadata:E[n.event],onSelect:e=>{r({mode:`view-hook`,event:n.event,hook:e})},onCancel:()=>{I(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event})}});case`view-hook`:return(0,Z.jsx)(ce,{selectedHook:n.hook,eventSupportsMatcher:I(n.event,b)!==void 0,onCancel:()=>{let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}})}}var X,Z,fe=e((()=>{s(),X=t(s(),1),M(),N(),u(),re(),R(),b(),v(),V(),W(),se(),Y(),Z=p()})),Q,$;e((()=>{fe(),x(),ne(),Q=p(),$=async(e,t)=>{S(`tengu_hooks_command`,{});let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(de,{toolNames:P(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{d as t,s as n}from"./debug-UI3T040K.js";import{o as r,r as i}from"./common-B379wT22.js";import{c as a,s as o}from"./escHotkey-Cyz0yyh1.js";import{i as s,n as c,r as l}from"./gates-Dyz_t5zJ.js";import{n as u,t as d}from"./executor-4EeD8GNm.js";import{format as f}from"util";function p(){try{return Bun.spawnSync({cmd:[`osascript`,`-e`,`tell application "System Events" to get name of every process whose background only is false`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function m(){try{return Bun.spawnSync({cmd:[`screencapture`,`-x`,`-R`,`0,0,1,1`,`/dev/null`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function h(){return _||(_={serverName:i,logger:new g,executor:d({getMouseAnimationEnabled:()=>l().mouseAnimation,getHideBeforeActionEnabled:()=>l().hideBeforeAction}),ensureOsPermissions:async()=>{if(process.platform!==`darwin`)return{granted:!0};let e=a().tcc;if(e){let t=e.checkAccessibility(),n=e.checkScreenRecording();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}}let t=p(),n=m();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}},isDisabled:()=>!c(),getSubGates:l,getAutoUnhideEnabled:()=>!0,cropRawPatch:()=>null},_)}var g,_,v=e((()=>{n(),r(),u(),s(),o(),g=class{silly(e,n){t(f(e,n??``),{level:`debug`})}debug(e,n){t(f(e,n??``),{level:`debug`})}info(e,n){t(f(e,n??``),{level:`info`})}warn(e,n){t(f(e,n??``),{level:`warn`})}error(e,n){t(f(e,n??``),{level:`error`})}}}));export{v as n,h as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{d as t,s as n}from"./debug-UI3T040K.js";import{o as r,r as i}from"./common-B379wT22.js";import{c as a,s as o}from"./escHotkey-Cyz0yyh1.js";import{i as s,n as c,r as l}from"./gates-DP4JyL5e.js";import{n as u,t as d}from"./executor-4EeD8GNm.js";import{format as f}from"util";function p(){try{return Bun.spawnSync({cmd:[`osascript`,`-e`,`tell application "System Events" to get name of every process whose background only is false`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function m(){try{return Bun.spawnSync({cmd:[`screencapture`,`-x`,`-R`,`0,0,1,1`,`/dev/null`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function h(){return _||(_={serverName:i,logger:new g,executor:d({getMouseAnimationEnabled:()=>l().mouseAnimation,getHideBeforeActionEnabled:()=>l().hideBeforeAction}),ensureOsPermissions:async()=>{if(process.platform!==`darwin`)return{granted:!0};let e=a().tcc;if(e){let t=e.checkAccessibility(),n=e.checkScreenRecording();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}}let t=p(),n=m();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}},isDisabled:()=>!c(),getSubGates:l,getAutoUnhideEnabled:()=>!0,cropRawPatch:()=>null},_)}var g,_,v=e((()=>{n(),r(),u(),s(),o(),g=class{silly(e,n){t(f(e,n??``),{level:`debug`})}debug(e,n){t(f(e,n??``),{level:`debug`})}info(e,n){t(f(e,n??``),{level:`info`})}warn(e,n){t(f(e,n??``),{level:`warn`})}error(e,n){t(f(e,n??``),{level:`error`})}}}));export{v as n,h as t};
@@ -1,2 +1,2 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i,b as a,f as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ac as u,Pc as d,Sc as f}from"./paths-D9CVAtXU.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{r as _,t as v}from"./execFileNoThrow-CuQN1sz8.js";import{BS as y,LS as b,Nx as x,RS as S,Sx as C,Xb as w,Zb as T,cx as E,ix as D,kx as O,lx as k,my as A,px as j,sx as M,wt as N,xt as P}from"./loadAgentsDir-D-xcJ22-.js";import*as F from"path";function I({onComplete:e}){return(0,V.jsxs)(o,{title:`Do you wish to enable auto-connect to IDE?`,color:`ide`,onCancel:e,children:[(0,V.jsx)(x,{options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}],onChange:(0,B.useCallback)(async t=>{let n=t===`yes`;d(e=>({...e,autoConnectIde:n,hasIdeAutoConnectDialogBeenShown:!0})),e()},[e]),defaultValue:`yes`}),(0,V.jsx)(a,{dimColor:!0,children:`You can also configure this in /config or with the --ide flag`})]})}function L(){let e=f();return!k()&&e.autoConnectIde!==!0&&e.hasIdeAutoConnectDialogBeenShown!==!0}function R({onComplete:e}){let t=(0,B.useCallback)(t=>{let n=t===`yes`;n&&d(e=>({...e,autoConnectIde:!1})),e(n)},[e]);return(0,V.jsx)(o,{title:`Do you wish to disable auto-connect to IDE?`,subtitle:`You can also configure this in /config`,onCancel:(0,B.useCallback)(()=>{e(!1)},[e]),color:`ide`,children:(0,V.jsx)(x,{options:[{label:`No`,value:`no`},{label:`Yes`,value:`yes`}],onChange:t,defaultValue:`no`})})}function z(){let e=f();return!k()&&e.autoConnectIde===!0}var B,V,H=e((()=>{B=t(i(),1),s(),u(),D(),A(),V=l()}));function U({availableIDEs:e,unavailableIDEs:t,selectedIDE:n,onClose:r,onSelect:i}){let[s,l]=(0,Z.useState)(n?.port?.toString()??`None`),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=(0,Z.useCallback)(t=>{t!==`None`&&L()?d(!0):t===`None`&&z()?p(!0):i(e.find(e=>e.port===parseInt(t,10)))},[e,i]),h=e.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{}),g=e.map(e=>{let t=(h[e.name]||0)>1&&e.workspaceFolders.length>0;return{label:e.name,value:e.port.toString(),description:t?X(e.workspaceFolders):void 0}}).concat([{label:`None`,value:`None`,description:void 0}]);return u?(0,Q.jsx)(I,{onComplete:()=>m(s)}):f?(0,Q.jsx)(R,{onComplete:()=>{i(void 0)}}):(0,Q.jsx)(o,{title:`Select IDE`,subtitle:`Connect to an IDE for integrated development features.`,onCancel:r,color:`ide`,children:(0,Q.jsxs)(c,{flexDirection:`column`,children:[e.length===0&&(0,Q.jsx)(a,{dimColor:!0,children:E()?`No available IDEs detected. Please install the plugin and restart your IDE:
2
- https://docs.claude.com/s/claude-code-jetbrains`:`No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.`}),e.length!==0&&(0,Q.jsx)(x,{defaultValue:s,defaultFocusValue:s,options:g,onChange:e=>{l(e),m(e)}}),e.length!==0&&e.some(e=>e.name===`VS Code`||e.name===`Visual Studio Code`)&&(0,Q.jsx)(c,{marginTop:1,children:(0,Q.jsx)(a,{color:`warning`,children:`Note: Only one Claude Code instance can be connected to VS Code at a time.`})}),e.length!==0&&!k()&&(0,Q.jsx)(c,{marginTop:1,children:(0,Q.jsx)(a,{dimColor:!0,children:`Tip: You can enable auto-connect to IDE in /config or with the --ide flag`})}),t.length>0&&(0,Q.jsxs)(c,{marginTop:1,flexDirection:`column`,children:[(0,Q.jsxs)(a,{dimColor:!0,children:[`Found `,t.length,` other running IDE(s). However, their workspace/project directories do not match the current cwd.`]}),(0,Q.jsx)(c,{marginTop:1,flexDirection:`column`,children:t.map((e,t)=>(0,Q.jsx)(c,{paddingLeft:3,children:(0,Q.jsxs)(a,{dimColor:!0,children:[`• `,e.name,`: `,X(e.workspaceFolders)]})},t))})]})]})})}async function W(e,t){let n=t?.ide;if(!n||n.type!==`sse-ide`&&n.type!==`ws-ide`)return null;for(let t of e)if(t.url===n.url)return t;return null}function G({availableIDEs:e,onSelectIDE:t,onDone:n}){let[r,i]=(0,Z.useState)(e[0]?.port?.toString()??``),a=(0,Z.useCallback)(n=>{t(e.find(e=>e.port===parseInt(n,10)))},[e,t]),s=e.map(e=>({label:e.name,value:e.port.toString()}));function c(){n(`IDE selection cancelled`,{display:`system`})}return(0,Q.jsx)(o,{title:`Select an IDE to open the project`,onCancel:c,color:`ide`,children:(0,Q.jsx)(x,{defaultValue:r,defaultFocusValue:r,options:s,onChange:e=>{i(e),a(e)}})})}function K({runningIDEs:e,onSelectIDE:t,onDone:n}){let[r,i]=(0,Z.useState)(e[0]??``),a=(0,Z.useCallback)(e=>{t(e)},[t]),s=e.map(e=>({label:j(e),value:e}));function c(){n(`IDE selection cancelled`,{display:`system`})}return(0,Q.jsx)(o,{title:`Select IDE to install extension`,onCancel:c,color:`ide`,children:(0,Q.jsx)(x,{defaultFocusValue:r,options:s,onChange:e=>{i(e),a(e)}})})}function q({ide:e,onInstall:t}){return(0,Z.useEffect)(()=>{t(e)},[e,t]),null}async function J(e,t,r){m(`tengu_ext_ide_command`,{});let{options:{dynamicMcpConfig:i},onChangeDynamicMcpConfig:a}=t;if(r?.trim()===`open`){let t=P(),r=t?t.worktreePath:g(),i=(await w(!0)).filter(e=>e.isValid);return i.length===0?(e(`No IDEs with Claude Code extension detected.`),null):(0,Q.jsx)(G,{availableIDEs:i,onSelectIDE:async i=>{if(!i){e(`No IDE selected.`);return}if(i.name.toLowerCase().includes(`vscode`)||i.name.toLowerCase().includes(`cursor`)||i.name.toLowerCase().includes(`windsurf`)){let{code:a}=await v(`code`,[r]);e(a===0?`Opened ${t?`worktree`:`project`} in ${n.bold(i.name)}`:`Failed to open in ${i.name}. Try opening manually: ${r}`)}else E(),e(`Please open the ${t?`worktree`:`project`} manually in ${n.bold(i.name)}: ${r}`)},onDone:()=>{e(`Exited without opening IDE`,{display:`system`})}})}let o=await w(!0);if(o.length===0&&t.onInstallIDEExtension&&!k()){let r=await T(),i=r=>{t.onInstallIDEExtension&&(t.onInstallIDEExtension(r),M(r)?e(`Installed plugin to ${n.bold(j(r))}\nPlease ${n.bold(`restart your IDE`)} completely for it to take effect`):e(`Installed extension to ${n.bold(j(r))}`))};if(r.length>1)return(0,Q.jsx)(K,{runningIDEs:r,onSelectIDE:i,onDone:()=>{e(`No IDE selected.`,{display:`system`})}});if(r.length===1)return(0,Q.jsx)(q,{ide:r[0],onInstall:i})}let s=o.filter(e=>e.isValid);return(0,Q.jsx)(Y,{availableIDEs:s,unavailableIDEs:o.filter(e=>!e.isValid),currentIDE:await W(s,i),dynamicMcpConfig:i,onChangeDynamicMcpConfig:a,onDone:e})}function Y({availableIDEs:e,unavailableIDEs:t,currentIDE:n,dynamicMcpConfig:r,onChangeDynamicMcpConfig:i,onDone:o}){let[s,c]=(0,Z.useState)(null),l=S(e=>e.mcp.clients.find(e=>e.name===`ide`)),u=y(),d=(0,Z.useRef)(!0);(0,Z.useEffect)(()=>{if(s){if(d.current){d.current=!1;return}!l||l.type===`pending`||(l.type===`connected`?o(`Connected to ${s.name}.`):l.type===`failed`&&o(`Failed to connect to ${s.name}.`))}},[l,s,o]),(0,Z.useEffect)(()=>{if(!s)return;let e=setTimeout(o,$,`Connection to ${s.name} timed out.`);return()=>clearTimeout(e)},[s,o]);let f=(0,Z.useCallback)(e=>{if(!i){o(`Error connecting to IDE.`);return}let t={...r||{}};if(n&&delete t.ide,!e){l&&l.type===`connected`&&n&&(l.client.onclose=()=>{},C(`ide`,l.config),u(e=>({...e,mcp:{...e.mcp,clients:e.mcp.clients.filter(e=>e.name!==`ide`),tools:e.mcp.tools.filter(e=>!e.name?.startsWith(`mcp__ide__`)),commands:e.mcp.commands.filter(e=>!e.name?.startsWith(`mcp__ide__`))}}))),i(t),o(n?`Disconnected from ${n.name}.`:`No IDE selected.`);return}let a=e.url;t.ide={type:a.startsWith(`ws:`)?`ws-ide`:`sse-ide`,url:a,ideName:e.name,authToken:e.authToken,ideRunningInWindows:e.ideRunningInWindows,scope:`dynamic`},d.current=!0,c(e),i(t)},[r,n,l,u,i,o]);return s?(0,Q.jsxs)(a,{dimColor:!0,children:[`Connecting to `,s.name,`…`]}):(0,Q.jsx)(U,{availableIDEs:e,unavailableIDEs:t,selectedIDE:n,onClose:()=>o(`IDE selection cancelled`,{display:`system`}),onSelect:f})}function X(e,t=100){if(e.length===0)return``;let n=g(),r=e.slice(0,2),i=e.length>2,a=i?3:0,o=t-(r.length-1)*2-a,s=Math.floor(o/r.length),c=n.normalize(`NFC`),l=r.map(e=>{let t=e.normalize(`NFC`);return t.startsWith(c+F.sep)&&(e=t.slice(c.length+1)),e.length<=s?e:`…`+e.slice(-(s-1))}).join(`, `);return i&&(l+=`, …`),l}var Z,Q,$;e((()=>{r(),Z=t(i(),1),p(),A(),s(),H(),O(),b(),h(),_(),D(),N(),Q=l(),$=35e3}))();export{J as call,X as formatWorkspaceFolders};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i,b as a,f as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ac as u,Pc as d,Sc as f}from"./paths-C2JRlUsH.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{r as _,t as v}from"./execFileNoThrow-CuQN1sz8.js";import{Ex as y,HS as b,Lx as x,Nx as S,Ot as C,Tt as w,VS as T,WS as E,_x as D,cx as O,dx as k,ex as A,fx as j,px as M,tx as N,vy as P}from"./loadAgentsDir-C9Ee_fs1.js";import*as F from"path";function I({onComplete:e}){return(0,V.jsxs)(o,{title:`Do you wish to enable auto-connect to IDE?`,color:`ide`,onCancel:e,children:[(0,V.jsx)(x,{options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}],onChange:(0,B.useCallback)(async t=>{let n=t===`yes`;d(e=>({...e,autoConnectIde:n,hasIdeAutoConnectDialogBeenShown:!0})),e()},[e]),defaultValue:`yes`}),(0,V.jsx)(a,{dimColor:!0,children:`You can also configure this in /config or with the --ide flag`})]})}function L(){let e=f();return!M()&&e.autoConnectIde!==!0&&e.hasIdeAutoConnectDialogBeenShown!==!0}function R({onComplete:e}){let t=(0,B.useCallback)(t=>{let n=t===`yes`;n&&d(e=>({...e,autoConnectIde:!1})),e(n)},[e]);return(0,V.jsx)(o,{title:`Do you wish to disable auto-connect to IDE?`,subtitle:`You can also configure this in /config`,onCancel:(0,B.useCallback)(()=>{e(!1)},[e]),color:`ide`,children:(0,V.jsx)(x,{options:[{label:`No`,value:`no`},{label:`Yes`,value:`yes`}],onChange:t,defaultValue:`no`})})}function z(){let e=f();return!M()&&e.autoConnectIde===!0}var B,V,H=e((()=>{B=t(i(),1),s(),u(),O(),P(),V=l()}));function U({availableIDEs:e,unavailableIDEs:t,selectedIDE:n,onClose:r,onSelect:i}){let[s,l]=(0,Z.useState)(n?.port?.toString()??`None`),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=(0,Z.useCallback)(t=>{t!==`None`&&L()?d(!0):t===`None`&&z()?p(!0):i(e.find(e=>e.port===parseInt(t,10)))},[e,i]),h=e.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{}),g=e.map(e=>{let t=(h[e.name]||0)>1&&e.workspaceFolders.length>0;return{label:e.name,value:e.port.toString(),description:t?X(e.workspaceFolders):void 0}}).concat([{label:`None`,value:`None`,description:void 0}]);return u?(0,Q.jsx)(I,{onComplete:()=>m(s)}):f?(0,Q.jsx)(R,{onComplete:()=>{i(void 0)}}):(0,Q.jsx)(o,{title:`Select IDE`,subtitle:`Connect to an IDE for integrated development features.`,onCancel:r,color:`ide`,children:(0,Q.jsxs)(c,{flexDirection:`column`,children:[e.length===0&&(0,Q.jsx)(a,{dimColor:!0,children:j()?`No available IDEs detected. Please install the plugin and restart your IDE:
2
+ https://docs.claude.com/s/claude-code-jetbrains`:`No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.`}),e.length!==0&&(0,Q.jsx)(x,{defaultValue:s,defaultFocusValue:s,options:g,onChange:e=>{l(e),m(e)}}),e.length!==0&&e.some(e=>e.name===`VS Code`||e.name===`Visual Studio Code`)&&(0,Q.jsx)(c,{marginTop:1,children:(0,Q.jsx)(a,{color:`warning`,children:`Note: Only one Claude Code instance can be connected to VS Code at a time.`})}),e.length!==0&&!M()&&(0,Q.jsx)(c,{marginTop:1,children:(0,Q.jsx)(a,{dimColor:!0,children:`Tip: You can enable auto-connect to IDE in /config or with the --ide flag`})}),t.length>0&&(0,Q.jsxs)(c,{marginTop:1,flexDirection:`column`,children:[(0,Q.jsxs)(a,{dimColor:!0,children:[`Found `,t.length,` other running IDE(s). However, their workspace/project directories do not match the current cwd.`]}),(0,Q.jsx)(c,{marginTop:1,flexDirection:`column`,children:t.map((e,t)=>(0,Q.jsx)(c,{paddingLeft:3,children:(0,Q.jsxs)(a,{dimColor:!0,children:[`• `,e.name,`: `,X(e.workspaceFolders)]})},t))})]})]})})}async function W(e,t){let n=t?.ide;if(!n||n.type!==`sse-ide`&&n.type!==`ws-ide`)return null;for(let t of e)if(t.url===n.url)return t;return null}function G({availableIDEs:e,onSelectIDE:t,onDone:n}){let[r,i]=(0,Z.useState)(e[0]?.port?.toString()??``),a=(0,Z.useCallback)(n=>{t(e.find(e=>e.port===parseInt(n,10)))},[e,t]),s=e.map(e=>({label:e.name,value:e.port.toString()}));function c(){n(`IDE selection cancelled`,{display:`system`})}return(0,Q.jsx)(o,{title:`Select an IDE to open the project`,onCancel:c,color:`ide`,children:(0,Q.jsx)(x,{defaultValue:r,defaultFocusValue:r,options:s,onChange:e=>{i(e),a(e)}})})}function K({runningIDEs:e,onSelectIDE:t,onDone:n}){let[r,i]=(0,Z.useState)(e[0]??``),a=(0,Z.useCallback)(e=>{t(e)},[t]),s=e.map(e=>({label:D(e),value:e}));function c(){n(`IDE selection cancelled`,{display:`system`})}return(0,Q.jsx)(o,{title:`Select IDE to install extension`,onCancel:c,color:`ide`,children:(0,Q.jsx)(x,{defaultFocusValue:r,options:s,onChange:e=>{i(e),a(e)}})})}function q({ide:e,onInstall:t}){return(0,Z.useEffect)(()=>{t(e)},[e,t]),null}async function J(e,t,r){m(`tengu_ext_ide_command`,{});let{options:{dynamicMcpConfig:i},onChangeDynamicMcpConfig:a}=t;if(r?.trim()===`open`){let t=w(),r=t?t.worktreePath:g(),i=(await A(!0)).filter(e=>e.isValid);return i.length===0?(e(`No IDEs with Claude Code extension detected.`),null):(0,Q.jsx)(G,{availableIDEs:i,onSelectIDE:async i=>{if(!i){e(`No IDE selected.`);return}if(i.name.toLowerCase().includes(`vscode`)||i.name.toLowerCase().includes(`cursor`)||i.name.toLowerCase().includes(`windsurf`)){let{code:a}=await v(`code`,[r]);e(a===0?`Opened ${t?`worktree`:`project`} in ${n.bold(i.name)}`:`Failed to open in ${i.name}. Try opening manually: ${r}`)}else j(),e(`Please open the ${t?`worktree`:`project`} manually in ${n.bold(i.name)}: ${r}`)},onDone:()=>{e(`Exited without opening IDE`,{display:`system`})}})}let o=await A(!0);if(o.length===0&&t.onInstallIDEExtension&&!M()){let r=await N(),i=r=>{t.onInstallIDEExtension&&(t.onInstallIDEExtension(r),k(r)?e(`Installed plugin to ${n.bold(D(r))}\nPlease ${n.bold(`restart your IDE`)} completely for it to take effect`):e(`Installed extension to ${n.bold(D(r))}`))};if(r.length>1)return(0,Q.jsx)(K,{runningIDEs:r,onSelectIDE:i,onDone:()=>{e(`No IDE selected.`,{display:`system`})}});if(r.length===1)return(0,Q.jsx)(q,{ide:r[0],onInstall:i})}let s=o.filter(e=>e.isValid);return(0,Q.jsx)(Y,{availableIDEs:s,unavailableIDEs:o.filter(e=>!e.isValid),currentIDE:await W(s,i),dynamicMcpConfig:i,onChangeDynamicMcpConfig:a,onDone:e})}function Y({availableIDEs:e,unavailableIDEs:t,currentIDE:n,dynamicMcpConfig:r,onChangeDynamicMcpConfig:i,onDone:o}){let[s,c]=(0,Z.useState)(null),l=b(e=>e.mcp.clients.find(e=>e.name===`ide`)),u=E(),d=(0,Z.useRef)(!0);(0,Z.useEffect)(()=>{if(s){if(d.current){d.current=!1;return}!l||l.type===`pending`||(l.type===`connected`?o(`Connected to ${s.name}.`):l.type===`failed`&&o(`Failed to connect to ${s.name}.`))}},[l,s,o]),(0,Z.useEffect)(()=>{if(!s)return;let e=setTimeout(o,$,`Connection to ${s.name} timed out.`);return()=>clearTimeout(e)},[s,o]);let f=(0,Z.useCallback)(e=>{if(!i){o(`Error connecting to IDE.`);return}let t={...r||{}};if(n&&delete t.ide,!e){l&&l.type===`connected`&&n&&(l.client.onclose=()=>{},y(`ide`,l.config),u(e=>({...e,mcp:{...e.mcp,clients:e.mcp.clients.filter(e=>e.name!==`ide`),tools:e.mcp.tools.filter(e=>!e.name?.startsWith(`mcp__ide__`)),commands:e.mcp.commands.filter(e=>!e.name?.startsWith(`mcp__ide__`))}}))),i(t),o(n?`Disconnected from ${n.name}.`:`No IDE selected.`);return}let a=e.url;t.ide={type:a.startsWith(`ws:`)?`ws-ide`:`sse-ide`,url:a,ideName:e.name,authToken:e.authToken,ideRunningInWindows:e.ideRunningInWindows,scope:`dynamic`},d.current=!0,c(e),i(t)},[r,n,l,u,i,o]);return s?(0,Q.jsxs)(a,{dimColor:!0,children:[`Connecting to `,s.name,`…`]}):(0,Q.jsx)(U,{availableIDEs:e,unavailableIDEs:t,selectedIDE:n,onClose:()=>o(`IDE selection cancelled`,{display:`system`}),onSelect:f})}function X(e,t=100){if(e.length===0)return``;let n=g(),r=e.slice(0,2),i=e.length>2,a=i?3:0,o=t-(r.length-1)*2-a,s=Math.floor(o/r.length),c=n.normalize(`NFC`),l=r.map(e=>{let t=e.normalize(`NFC`);return t.startsWith(c+F.sep)&&(e=t.slice(c.length+1)),e.length<=s?e:`…`+e.slice(-(s-1))}).join(`, `);return i&&(l+=`, …`),l}var Z,Q,$;e((()=>{r(),Z=t(i(),1),p(),P(),s(),H(),S(),T(),h(),_(),O(),C(),Q=l(),$=35e3}))();export{J as call,X as formatWorkspaceFolders};
@@ -1 +1 @@
1
- import{n as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{Ln as i,Tt as a,wn as o}from"./schemas-BGAvj1T4.js";import{t as s}from"./v4-f1i_CNUT.js";import{Ct as c,cn as l}from"./state-sIHsFpDu.js";import{d as u,s as d}from"./debug-UI3T040K.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{a as m,n as h,t as g}from"./bridgeConfig-CvKdNJOg.js";import{basename as _,join as v}from"path";import{randomUUID as y}from"crypto";import{mkdir as b,writeFile as x}from"fs/promises";r(),s(),l(),d(),t(),p(),m();var S=3e4;function C(e){u(`[bridge:inbound-attach] ${e}`)}var w=f(()=>o({file_uuid:i(),file_name:i()})),T=f(()=>a(w()));function E(e){if(typeof e!=`object`||!e||!(`file_attachments`in e))return[];let t=T().safeParse(e.file_attachments);return t.success?t.data:[]}function D(e){return _(e).replace(/[^a-zA-Z0-9._-]/g,`_`)||`attachment`}function O(){return v(e(),`uploads`,c())}async function k(e){let t=g();if(!t){C(`skip: no oauth token`);return}let r;try{let i=`${h()}/api/oauth/files/${encodeURIComponent(e.file_uuid)}/content`,a=await n.get(i,{headers:{Authorization:`Bearer ${t}`},responseType:`arraybuffer`,timeout:S,validateStatus:()=>!0});if(a.status!==200){C(`fetch ${e.file_uuid} failed: status=${a.status}`);return}r=Buffer.from(a.data)}catch(t){C(`fetch ${e.file_uuid} threw: ${t}`);return}let i=D(e.file_name),a=(e.file_uuid.slice(0,8)||y().slice(0,8)).replace(/[^a-zA-Z0-9_-]/g,`_`),o=O(),s=v(o,`${a}-${i}`);try{await b(o,{recursive:!0}),await x(s,r)}catch(e){C(`write ${s} failed: ${e}`);return}return C(`resolved ${e.file_uuid} → ${s} (${r.length} bytes)`),s}async function A(e){if(e.length===0)return``;C(`resolving ${e.length} attachment(s)`);let t=(await Promise.all(e.map(k))).filter(e=>e!==void 0);return t.length===0?``:t.map(e=>`@"${e}"`).join(` `)+` `}function j(e,t){if(!t)return e;if(typeof e==`string`)return t+e;let n=e.findLastIndex(e=>e.type===`text`);if(n!==-1){let r=e[n];if(r.type===`text`)return[...e.slice(0,n),{...r,text:t+r.text},...e.slice(n+1)]}return[...e,{type:`text`,text:t.trimEnd()}]}async function M(e,t){let n=E(e);return n.length===0?t:j(t,await A(n))}export{A as i,j as n,M as r,E as t};
1
+ import{n as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{Ln as i,Tt as a,wn as o}from"./schemas-BGAvj1T4.js";import{t as s}from"./v4-f1i_CNUT.js";import{Ct as c,cn as l}from"./state-sIHsFpDu.js";import{d as u,s as d}from"./debug-UI3T040K.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{a as m,n as h,t as g}from"./bridgeConfig-BZQBBfap.js";import{basename as _,join as v}from"path";import{randomUUID as y}from"crypto";import{mkdir as b,writeFile as x}from"fs/promises";r(),s(),l(),d(),t(),p(),m();var S=3e4;function C(e){u(`[bridge:inbound-attach] ${e}`)}var w=f(()=>o({file_uuid:i(),file_name:i()})),T=f(()=>a(w()));function E(e){if(typeof e!=`object`||!e||!(`file_attachments`in e))return[];let t=T().safeParse(e.file_attachments);return t.success?t.data:[]}function D(e){return _(e).replace(/[^a-zA-Z0-9._-]/g,`_`)||`attachment`}function O(){return v(e(),`uploads`,c())}async function k(e){let t=g();if(!t){C(`skip: no oauth token`);return}let r;try{let i=`${h()}/api/oauth/files/${encodeURIComponent(e.file_uuid)}/content`,a=await n.get(i,{headers:{Authorization:`Bearer ${t}`},responseType:`arraybuffer`,timeout:S,validateStatus:()=>!0});if(a.status!==200){C(`fetch ${e.file_uuid} failed: status=${a.status}`);return}r=Buffer.from(a.data)}catch(t){C(`fetch ${e.file_uuid} threw: ${t}`);return}let i=D(e.file_name),a=(e.file_uuid.slice(0,8)||y().slice(0,8)).replace(/[^a-zA-Z0-9_-]/g,`_`),o=O(),s=v(o,`${a}-${i}`);try{await b(o,{recursive:!0}),await x(s,r)}catch(e){C(`write ${s} failed: ${e}`);return}return C(`resolved ${e.file_uuid} → ${s} (${r.length} bytes)`),s}async function A(e){if(e.length===0)return``;C(`resolving ${e.length} attachment(s)`);let t=(await Promise.all(e.map(k))).filter(e=>e!==void 0);return t.length===0?``:t.map(e=>`@"${e}"`).join(` `)+` `}function j(e,t){if(!t)return e;if(typeof e==`string`)return t+e;let n=e.findLastIndex(e=>e.type===`text`);if(n!==-1){let r=e[n];if(r.type===`text`)return[...e.slice(0,n),{...r,text:t+r.text},...e.slice(n+1)]}return[...e,{type:`text`,text:t.trimEnd()}]}async function M(e,t){let n=E(e);return n.length===0?t:j(t,await A(n))}export{A as i,j as n,M as r,E as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./inboundAttachments-DQ4Czsr5.js";export{e as resolveAndPrepend};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-DR8-3Aex.js";import{d as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{Ct as i,cn as a,ot as o}from"./state-sIHsFpDu.js";import{Ac as s,Jt as c,Pc as l,Pt as u,S as d,Sc as f,la as p,nn as m,on as h,ua as g,v as _}from"./paths-C2JRlUsH.js";import{L as v,V as y,X as ee,Y as b,d as x,s as S}from"./debug-UI3T040K.js";import{n as te,r as C}from"./analytics-DqMQntaB.js";import{F as w,P as T,i as ne,m as re,v as E}from"./git-CN3qtTb_.js";import{g as D,m as O}from"./log-CzsijfHZ.js";import{n as k,t as A}from"./sleep-8Eb9j_Ly.js";import{Aa as ie,Ao as ae,Da as oe,Ea as se,Fa as j,Go as ce,Ha as le,Ia as ue,Ma as de,Mo as M,Na as fe,Oa as pe,Pa as N,Pr as P,Vo as F,Wa as me,Xa as he,ey as ge,fd as I,gd as _e,ja as L,ka as ve,ty as R,yr as z}from"./loadAgentsDir-C9Ee_fs1.js";import{O as B,_ as ye,d as V,k as be,n as H,t as U}from"./rcDebugLog-CIS3PU-H.js";import{a as W,c as G,d as xe,f as Se,o as K,r as Ce,s as q,u as J}from"./debugUtils-BBMFODKH.js";import{a as we,i as Te}from"./trustedDevice-f8HslQu2.js";import{a as Y,i as Ee,n as X,o as Z,t as Q}from"./bridgeConfig-BZQBBfap.js";import{a as De,o as Oe,r as ke,s as Ae,t as je}from"./bridgeEnabled-Bkmqv-2V.js";import{i as Me,t as Ne}from"./assistant-CMaN0QzY.js";import{t as Pe}from"./capacityWake-BXlUpptF.js";import{n as Fe,t as $}from"./pollConfig-Duecunu0.js";import{a as Ie,n as Le,r as Re,t as ze}from"./workSecret-mS2OrpxF.js";import{a as Be,i as Ve,n as He,t as Ue}from"./createSession-DaT4x1E6.js";import{i as We,n as Ge}from"./envLessBridgeConfig-MaElAFPV.js";import{n as Ke,o as qe}from"./mappers-D1SAyuKF.js";import{n as Je,r as Ye,t as Xe}from"./sessionTitle-BOM0LQlq.js";import{a as Ze,i as Qe,n as $e,o as et,r as tt,t as nt}from"./bridgeMessaging-C-ZFPTiZ.js";import{t as rt}from"./HybridTransport-Df_FceV2.js";import{n as it,r as at,t as ot}from"./flushGate-0DZFLUEb.js";import{hostname as st}from"os";import{randomUUID as ct}from"crypto";a(),O(),E(),s(),g(),h(),d(),Y(),R(),ke(),F(),le(),P(),Ve(),We(),Ke(),Ye(),fe(),S(),U(),T(),te(),b(),G(),I(),we(),B(),V(),n(),K(),y(),A(),oe();var lt=2e3,ut=6e4,dt=900*1e3,ft=0;async function pt(e){let{dir:n,machineName:i,branch:a,gitRepoUrl:o,title:s,baseUrl:c,sessionIngressUrl:l,workerType:u,getAccessToken:d,createSession:f,archiveSession:p,getCurrentTitle:m=()=>s,toSDKMessages:h=()=>{throw Error(`BridgeCoreParams.toSDKMessages not provided. Pass it if you use writeMessages() or initialMessages — daemon callers that only use writeSdkMessages() never hit this path.`)},onAuth401:g,getPollIntervalConfig:_=()=>Fe,initialHistoryCap:y=200,initialMessages:b,previouslyFlushedUUIDs:S,onInboundMessage:te,onPermissionResponse:T,onInterrupt:ne,onSetModel:re,onSetMaxThinkingTokens:E,onSetPermissionMode:D,onStateChange:O,onUserMessage:k,perpetual:A,initialSSESequenceNum:ae=0}=e,oe=++ft,{writeBridgePointer:j,clearBridgePointer:ce,readBridgePointer:le}=await import(`./bridgePointer-B2FPGDWR.js`),ue=A?await le(n):null,M=ue?.source===`repl`?ue:null;x(`[bridge:repl] initBridgeCore #${oe} starting (initialMessages=${b?.length??0}${M?` perpetual prior=env:${M.environmentId}`:``})`);let fe=de({baseUrl:c,getAccessToken:d,runnerVersion:`2.6.13`,onDebug:x,onAuth401:g,getTrustedDeviceToken:Te}),N=process.env.USER_TYPE===`ant`?ie(fe):fe,P={dir:n,machineName:i,branch:a,gitRepoUrl:o,maxSessions:1,spawnMode:`single-session`,verbose:!1,sandbox:!1,bridgeId:ct(),workerType:u,environmentId:ct(),reuseEnvironmentId:M?.environmentId,apiBaseUrl:c,sessionIngressUrl:l},F,me;try{let e=await N.registerBridgeEnvironment(P);F=e.environment_id,me=e.environment_secret}catch(e){return q(`registration_failed`,`[bridge:repl] Environment registration failed: ${v(e)}`),M&&await ce(n),O?.(`failed`,v(e)),null}x(`[bridge:repl] Environment registered: ${F}`),w(`info`,`bridge_repl_env_registered`),C(`tengu_bridge_repl_env_registered`,{});async function he(e,t){if(F!==e)return x(`[bridge:repl] Env mismatch (requested ${e}, got ${F}) — cannot reconnect in place`),!1;let n=Se(t),r=n===t?[t]:[t,n];for(let e of r)try{return await N.reconnectSession(F,e),x(`[bridge:repl] Reconnected session ${e} in place on env ${F}`),!0}catch(t){x(`[bridge:repl] reconnectSession(${e}) failed: ${v(t)}`)}return x(`[bridge:repl] reconnectSession exhausted — falling through to fresh session`),!1}let ge=M?await he(M.environmentId,M.sessionId):!1;M&&!ge&&await ce(n);let I;if(ge&&M){if(I=M.sessionId,x(`[bridge:repl] Perpetual session reused: ${I}`),b&&S)for(let e of b)S.add(e.uuid)}else{let e=await f({environmentId:F,title:s,gitRepoUrl:o,branch:a,signal:AbortSignal.timeout(15e3)});if(!e)return x(`[bridge:repl] Session creation failed, deregistering environment`),C(`tengu_bridge_repl_session_failed`,{}),await N.deregisterEnvironment(F).catch(()=>{}),O?.(`failed`,`Session creation failed`),null;I=e,x(`[bridge:repl] Session created: ${I}`)}await j(n,{sessionId:I,environmentId:F,source:`repl`}),w(`info`,`bridge_repl_session_created`),C(`tengu_bridge_repl_started`,{has_initial_messages:!!(b&&b.length>0),inProtectedNamespace:t()});let L=new Set;if(b)for(let e of b)L.add(e.uuid);let R=new nt(2e3);for(let e of L)R.add(e);let z=new nt(2e3),B=new AbortController,V=null;ye(e=>{B.signal.aborted||V?.reportMetadata(e)},{replayCurrent:!0});let U=0,W=ge?ae:0,G=null,K=null,Ce=Pe(B.signal),J=Ce.wake,we=Ce.signal,Y=new ot,Ee=!k,X=0,Z=null;async function Q(){if(Z)return Z;Z=De();try{return await Z}finally{Z=null}}async function De(){if(X++,H(`doReconnect: attempt=${X}/3 envId=${F} sessionId=${I} workId=${G}`),U++,x(`[bridge:repl] Reconnecting after env lost (attempt ${X}/3)`),X>3)return x(`[bridge:repl] Environment reconnect limit reached (3), giving up`),!1;if(V){let e=V.getLastSequenceNum();e>W&&(W=e),V.close(),V=null}if(J(),Y.drop(),G){let e=G;if(await N.stopWork(F,e,!1).catch(()=>{}),G!==e)return x(`[bridge:repl] Poll loop recovered during stopWork await — deferring to it`),X=0,!0;G=null,K=null}if(B.signal.aborted)return x(`[bridge:repl] Reconnect aborted by teardown`),!1;let e=F;P.reuseEnvironmentId=e;try{let e=await N.registerBridgeEnvironment(P);F=e.environment_id,me=e.environment_secret}catch(e){return P.reuseEnvironmentId=void 0,x(`[bridge:repl] Environment re-registration failed: ${v(e)}`),!1}if(P.reuseEnvironmentId=void 0,x(`[bridge:repl] Re-registered: requested=${e} got=${F}`),B.signal.aborted)return x(`[bridge:repl] Reconnect aborted after env registration, cleaning up`),await N.deregisterEnvironment(F).catch(()=>{}),!1;if(V!==null)return x(`[bridge:repl] Poll loop recovered during registerBridgeEnvironment await — deferring to it`),X=0,!0;if(await he(e,I))return C(`tengu_bridge_repl_reconnected_in_place`,{}),X=0,!0;if(F!==e&&C(`tengu_bridge_repl_env_expired_fresh_session`,{}),await p(I),B.signal.aborted)return x(`[bridge:repl] Reconnect aborted after archive, cleaning up`),await N.deregisterEnvironment(F).catch(()=>{}),!1;let t=m(),r=await f({environmentId:F,title:t,gitRepoUrl:o,branch:a,signal:AbortSignal.timeout(15e3)});return r?B.signal.aborted?(x(`[bridge:repl] Reconnect aborted after session creation, cleaning up`),await p(r),!1):(I=r,_e(xe(r)).catch(()=>{}),W=0,z.clear(),Ee=!k,x(`[bridge:repl] Re-created session: ${I}`),await j(n,{sessionId:I,environmentId:F,source:`repl`}),S?.clear(),X=0,!0):(x(`[bridge:repl] Session creation failed during reconnection`),!1)}function Oe(){return d()}function ke(){let e=Y.end();if(e.length===0)return;if(!V){x(`[bridge:repl] Cannot drain ${e.length} pending message(s): no transport`);return}for(let t of e)R.add(t.uuid);let t=h(e).map(e=>({...e,session_id:I}));x(`[bridge:repl] Drained ${e.length} pending message(s) after flush`),V.writeBatch(t)}let Ae=null;function je(){Ae?.()}function Me(e){if(H(`handleTransportPermanentClose: code=${e} transport=${V?`exists`:`null`} pollAborted=${B.signal.aborted}`),x(`[bridge:repl] Transport permanently closed: code=${e}`),C(`tengu_bridge_repl_ws_closed`,{code:e}),V){let e=V.getLastSequenceNum();e>W&&(W=e),V=null}J();let t=Y.drop();if(t>0&&x(`[bridge:repl] Dropping ${t} pending message(s) on transport close (code=${e})`,{level:`warn`}),e===1e3){O?.(`failed`,`session ended`),B.abort(),je();return}O?.(`reconnecting`,`Remote Control connection lost (code ${e})`),x(`[bridge:repl] Transport reconnect budget exhausted (code=${e}), attempting env reconnect`),Q().then(t=>{t||B.signal.aborted||(x(`[bridge:repl] reconnectEnvironmentWithSession resolved false — tearing down`),C(`tengu_bridge_repl_reconnect_failed`,{close_code:e}),O?.(`failed`,`reconnection failed`),je())})}let Ne;process.env.USER_TYPE===`ant`&&process.platform!==`win32`&&(Ne=()=>{x(`[bridge:repl] SIGUSR2 received — forcing doReconnect() for testing`),Q()},process.on(`SIGUSR2`,Ne));let $=null;process.env.USER_TYPE===`ant`&&ve({fireClose:e=>{if(!$){x(`[bridge:debug] fireClose: no transport wired yet`);return}x(`[bridge:debug] fireClose(${e}) — injecting`),$(e)},forceReconnect:()=>{x(`[bridge:debug] forceReconnect — injecting`),Q()},injectFault:pe,wakePollLoop:J,describe:()=>`env=${F} session=${I} transport=${V?.getStateLabel()??`null`} workId=${G??`null`}`}),mt({api:N,getCredentials:()=>({environmentId:F,environmentSecret:me}),signal:B.signal,getPollIntervalConfig:_,onStateChange:O,getWsState:()=>V?.getStateLabel()??`null`,isAtCapacity:()=>V!==null,capacitySignal:we,onFatalError:je,getHeartbeatInfo:()=>!G||!K?null:{environmentId:F,workId:G,sessionToken:K},onHeartbeatFatal:e=>{if(x(`[bridge:repl] heartbeatWork fatal (status=${e.status}) — tearing down work item for fast re-dispatch`),V){let e=V.getLastSequenceNum();e>W&&(W=e),V.close(),V=null}Y.drop(),G&&N.stopWork(F,G,!1).catch(e=>{x(`[bridge:repl] stopWork after heartbeat fatal: ${v(e)}`)}),G=null,K=null,J(),O?.(`reconnecting`,`Work item lease expired, fetching fresh token`)},async onEnvironmentLost(){return await Q()?{environmentId:F,environmentSecret:me}:null},onWorkReceived:(e,t,i,a)=>{if(V?.isConnectedStatus()&&x(`[bridge:repl] Work received while transport connected, replacing with fresh token (workId=${i})`),x(`[bridge:repl] Work received: workId=${i} workSessionId=${e} currentSessionId=${I} match=${Ie(e,I)}`),j(n,{sessionId:I,environmentId:F,source:`repl`}),!Ie(e,I)){x(`[bridge:repl] Rejecting foreign session: expected=${I} got=${e}`);return}G=i,K=t;let o=a||r(process.env.CLAUDE_BRIDGE_USE_CCR_V2),s;if(!o){if(s=Oe(),!s){x(`[bridge:repl] No OAuth token available for session ingress, skipping work`);return}be(s)}if(C(`tengu_bridge_repl_work_received`,{}),V){let e=V;V=null;let t=e.getLastSequenceNum();t>W&&(W=t),e.close()}Y.deactivate();let u=e=>Qe(e,{transport:V,sessionId:I,onInterrupt:ne,onSetModel:re,onSetMaxThinkingTokens:E,onSetPermissionMode:D}),d=!1,f=e=>{V=e,e.setOnConnect(()=>{if(V===e){if(x(`[bridge:repl] Ingress transport connected`),C(`tengu_bridge_repl_ws_connected`,{}),!o){let e=Oe();e&&be(e)}if(He=!1,!d&&b&&b.length>0){d=!0;let t=y,n=b.filter(e=>Ze(e)&&!S?.has(e.uuid)),r=t>0&&n.length>t?n.slice(-t):n;r.length<n.length&&(x(`[bridge:repl] Capped initial flush: ${n.length} -> ${r.length} (cap=${t})`),C(`tengu_bridge_repl_history_capped`,{eligible_count:n.length,capped_count:r.length}));let i=h(r);if(i.length>0){x(`[bridge:repl] Flushing ${i.length} initial message(s) via transport`);let t=i.map(e=>({...e,session_id:I})),n=e.droppedBatchCount;e.writeBatch(t).then(()=>{if(e.droppedBatchCount>n){x(`[bridge:repl] Initial flush dropped ${e.droppedBatchCount-n} batch(es) — not marking ${i.length} UUID(s) as flushed`);return}if(S)for(let e of i)e.uuid&&S.add(e.uuid)}).catch(e=>x(`[bridge:repl] Initial flush failed: ${e}`)).finally(()=>{V===e&&(ke(),O?.(`connected`))})}else ke(),O?.(`connected`)}else Y.active||O?.(`connected`)}}),e.setOnData(e=>{try{let t=JSON.parse(e);H(`ingress: type=${t.type}${t.type===`control_request`?` subtype=${t.request?.subtype} request_id=${t.request_id}`:``}${t.type===`control_response`?` subtype=${t.response?.subtype} request_id=${t.response?.request_id}`:``}${t.type===`user`?` uuid=${t.uuid}`:``}${t.type===`keep_alive`?``:` len=${e.length}`}`)}catch{H(`ingress (non-JSON): ${String(e).slice(0,200)}`)}tt(e,R,z,te,T,u)}),$=Me,e.setOnClose(t=>{V===e&&(H(`transport onClose: code=${t} connected=${e.isConnectedStatus()} state=${e.getStateLabel()} seq=${e.getLastSequenceNum()}`),Me(t))}),!d&&b&&b.length>0&&Y.start(),e.connect()};if(U++,o){let n=ze(c,e),r=U;x(`[bridge:repl] CCR v2: sessionUrl=${n} session=${e} gen=${r}`),at({sessionUrl:n,ingressToken:t,sessionId:e,initialSequenceNum:W}).then(e=>{if(B.signal.aborted){e.close();return}if(r!==U){x(`[bridge:repl] CCR v2: discarding stale handshake gen=${r} current=${U}`),e.close();return}f(e)},e=>{x(`[bridge:repl] CCR v2: createV2ReplTransport failed: ${v(e)}`,{level:`error`}),C(`tengu_bridge_repl_ccr_v2_init_failed`,{}),r===U&&(G&&(N.stopWork(F,G,!1).catch(e=>{x(`[bridge:repl] stopWork after v2 init failure: ${v(e)}`)}),G=null,K=null),J())})}else{let t=Le(l,e);x(`[bridge:repl] Ingress URL: ${t}`),x(`[bridge:repl] Creating HybridTransport: session=${e}`);let n=s??``;f(it(new rt(new URL(t),{Authorization:`Bearer ${n}`,"anthropic-version":`2023-06-01`},e,()=>({Authorization:`Bearer ${Oe()??n}`,"anthropic-version":`2023-06-01`}),{maxConsecutiveFailures:50,isBridge:!0,onBatchDropped:()=>{O?.(`reconnecting`,`Lost sync with Remote Control — events could not be delivered`),J()}})))}}});let Re=A?setInterval(()=>{Z||j(n,{sessionId:I,environmentId:F,source:`repl`})},60*6e4):null;Re?.unref?.();let Be=_().session_keepalive_interval_v2_ms,Ve=Be>0?setInterval(()=>{V&&(x(`[bridge:repl] keep_alive sent`),V.write({type:`keep_alive`}).catch(e=>{x(`[bridge:repl] keep_alive write failed: ${v(e)}`)}))},Be):null;Ve?.unref?.();let He=!1;Ae=async()=>{if(He){x(`[bridge:repl] Teardown already in progress, skipping duplicate call env=${F} session=${I}`);return}He=!0;let e=Date.now();if(x(`[bridge:repl] Teardown starting: env=${F} session=${I} workId=${G??`none`} transportState=${V?.getStateLabel()??`null`}`),Re!==null&&clearInterval(Re),Ve!==null&&clearInterval(Ve),Ne&&process.off(`SIGUSR2`,Ne),process.env.USER_TYPE===`ant`&&(se(),$=null),B.abort(),x(`[bridge:repl] Teardown: poll loop aborted`),V){let e=V.getLastSequenceNum();e>W&&(W=e)}if(A){V=null,Y.drop(),await j(n,{sessionId:I,environmentId:F,source:`repl`}),x(`[bridge:repl] Teardown (perpetual): leaving env=${F} session=${I} alive on server, duration=${Date.now()-e}ms`);return}let t=V;if(V=null,Y.drop(),t){let e={...et(I),session_id:I};t.write(e)}let r=G?N.stopWork(F,G,!0).then(()=>{x(`[bridge:repl] Teardown: stopWork completed`)}).catch(e=>{x(`[bridge:repl] Teardown stopWork failed: ${v(e)}`)}):Promise.resolve();await Promise.all([r,p(I)]),t?.close(),x(`[bridge:repl] Teardown: transport closed`),await N.deregisterEnvironment(F).catch(e=>{x(`[bridge:repl] Teardown deregister failed: ${v(e)}`)}),await ce(n),x(`[bridge:repl] Teardown complete: env=${F} duration=${Date.now()-e}ms`)};let Ue=ee(()=>Ae?.());return x(`[bridge:repl] Ready: env=${F} session=${I}`),O?.(`ready`),{get bridgeSessionId(){return I},get environmentId(){return F},getSSESequenceNum(){let e=V?.getLastSequenceNum()??0;return Math.max(W,e)},sessionIngressUrl:l,writeMessages(e){let t=e.filter(e=>Ze(e)&&!L.has(e.uuid)&&!R.has(e.uuid));if(t.length===0)return;if(!Ee)for(let e of t){let t=$e(e);if(t!==void 0&&k?.(t,I)){Ee=!0;break}}if(Y.enqueue(...t)){x(`[bridge:repl] Queued ${t.length} message(s) during initial flush`);return}if(!V){let e=t.map(e=>e.type).join(`,`);x(`[bridge:repl] Transport not configured, dropping ${t.length} message(s) [${e}] for session=${I}`,{level:`warn`});return}for(let e of t)R.add(e.uuid);x(`[bridge:repl] Sending ${t.length} message(s) via transport`);let n=h(t).map(e=>({...e,session_id:I}));V.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!R.has(e.uuid));if(t.length===0)return;if(!V){x(`[bridge:repl] Transport not configured, dropping ${t.length} SDK message(s) for session=${I}`,{level:`warn`});return}for(let e of t)e.uuid&&R.add(e.uuid);let n=t.map(e=>({...e,session_id:I}));V.writeBatch(n)},sendControlRequest(e){if(!V){x(`[bridge:repl] Transport not configured, skipping control_request`);return}let t={...e,session_id:I};V.write(t),x(`[bridge:repl] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(!V){x(`[bridge:repl] Transport not configured, skipping control_response`);return}let t={...e,session_id:I};V.write(t),x(`[bridge:repl] Sent control_response`)},sendControlCancelRequest(e){if(!V){x(`[bridge:repl] Transport not configured, skipping control_cancel_request`);return}let t={type:`control_cancel_request`,request_id:e,session_id:I};V.write(t),x(`[bridge:repl] Sent control_cancel_request request_id=${e}`)},sendResult(){if(!V){x(`[bridge:repl] sendResult: skipping, transport not configured session=${I}`);return}V.reportState(`idle`);let e={...et(I),session_id:I};V.write(e),x(`[bridge:repl] Sent result for session=${I}`)},async teardown(){Ue(),await Ae?.(),x(`[bridge:repl] Torn down`),C(`tengu_bridge_repl_teardown`,{})}}}async function mt({api:e,getCredentials:t,signal:n,onStateChange:r,onWorkReceived:i,onEnvironmentLost:a,getWsState:o,isAtCapacity:s,capacitySignal:c,onFatalError:l,getPollIntervalConfig:u=()=>Fe,getHeartbeatInfo:d,onHeartbeatFatal:f}){x(`[bridge:repl] Starting work poll loop for env=${t().environmentId}`);let p=0,m=null,h=null,g=0,_=!1;for(;!n.aborted;){let{environmentId:y,environmentSecret:ee}=t(),b=u();try{let t=await e.pollForWork(y,ee,n,b.reclaim_older_than_ms);if(g=0,p>0&&(x(`[bridge:repl] Poll recovered after ${p} consecutive error(s)`),p=0,m=null,h=null,r?.(`ready`)),!t){let t=_;if(_=!1,s?.()&&c&&!t){let t=b.poll_interval_ms_at_capacity;if(b.non_exclusive_heartbeat_interval_ms>0&&d){C(`tengu_bridge_heartbeat_mode_entered`,{heartbeat_interval_ms:b.non_exclusive_heartbeat_interval_ms});let r=t>0?Date.now()+t:null,i=!1,a=0;for(;!n.aborted&&s()&&(r===null||Date.now()<r);){let t=u();if(t.non_exclusive_heartbeat_interval_ms<=0)break;let n=d();if(!n)break;let r=c();try{await e.heartbeatWork(n.environmentId,n.workId,n.sessionToken)}catch(e){if(x(`[bridge:repl:heartbeat] Failed: ${v(e)}`),e instanceof L){r.cleanup(),C(`tengu_bridge_heartbeat_error`,{status:e.status,error_type:e.status===401||e.status===403?`auth_failed`:`fatal`}),f?(f(e),x(`[bridge:repl:heartbeat] Fatal (status=${e.status}), work state cleared — fast-polling for re-dispatch`)):i=!0;break}}a++,await k(t.non_exclusive_heartbeat_interval_ms,r.signal),r.cleanup()}let o=i?`error`:n.aborted?`shutdown`:s()?r!==null&&Date.now()>=r?`poll_due`:`config_disabled`:`capacity_changed`;if(C(`tengu_bridge_heartbeat_mode_exited`,{reason:o,heartbeat_cycles:a}),!i){o===`poll_due`&&x(`[bridge:repl] Heartbeat poll_due after ${a} cycles — falling through to pollForWork`);continue}}let r=t>0?t:b.non_exclusive_heartbeat_interval_ms;if(r>0){let e=c(),t=Date.now();await k(r,e.signal),e.cleanup();let n=Date.now()-t-r;n>6e4&&(x(`[bridge:repl] At-capacity sleep overran by ${Math.round(n/1e3)}s — process suspension detected, forcing one fast-poll cycle`),C(`tengu_bridge_repl_suspension_detected`,{overrun_ms:n}),_=!0)}}else await k(b.poll_interval_ms_not_at_capacity,n);continue}let a;try{a=Re(t.secret)}catch(n){x(`[bridge:repl] Failed to decode work secret: ${v(n)}`),C(`tengu_bridge_repl_work_secret_failed`,{}),await e.stopWork(y,t.id,!1).catch(()=>{});continue}x(`[bridge:repl] Acknowledging workId=${t.id}`);try{await e.acknowledgeWork(y,t.id,a.session_ingress_token)}catch(e){x(`[bridge:repl] Acknowledge failed workId=${t.id}: ${v(e)}`)}if(t.data.type===`healthcheck`){x(`[bridge:repl] Healthcheck received`);continue}if(t.data.type===`session`){let e=t.data.id;try{ue(e,`session_id`)}catch{x(`[bridge:repl] Invalid session_id in work: ${e}`);continue}i(e,a.session_ingress_token,t.id,a.use_code_sessions===!0),x(`[bridge:repl] Work accepted, continuing poll loop`)}}catch(i){if(n.aborted)break;if(i instanceof L&&i.status===404&&a){let e=t().environmentId;if(y!==e){x(`[bridge:repl] Stale poll error for old env=${y}, current env=${e} — skipping onEnvironmentLost`),p=0,m=null;continue}if(g++,x(`[bridge:repl] Environment deleted, attempting re-registration (attempt ${g}/3)`),C(`tengu_bridge_repl_env_lost`,{attempt:g}),g>3){x(`[bridge:repl] Environment re-registration limit reached (3), giving up`),r?.(`failed`,`Environment deleted and re-registration limit reached`),l?.();break}r?.(`reconnecting`,`environment lost, recreating session`);let i=await a();if(n.aborted)break;if(i){p=0,m=null,r?.(`ready`),x(`[bridge:repl] Re-registered environment: ${i.environmentId}`);continue}r?.(`failed`,`Environment deleted and re-registration failed`),l?.();break}if(i instanceof L){let e=N(i.errorType),t=j(i);x(`[bridge:repl] Fatal poll error: ${i.message} (status=${i.status}, type=${i.errorType??`unknown`})${t?` (suppressed)`:``}`),C(`tengu_bridge_repl_fatal_error`,{status:i.status,error_type:i.errorType}),w(e?`info`:`error`,`bridge_repl_fatal_error`,{status:i.status,error_type:i.errorType}),t||r?.(`failed`,e?`session expired · /remote-control to reconnect`:i.message),l?.();break}let s=Date.now();h!==null&&s-h>6e4*2&&(x(`[bridge:repl] Detected system sleep (${Math.round((s-h)/1e3)}s gap), resetting poll error budget`),w(`info`,`bridge_repl_poll_sleep_detected`,{gapMs:s-h}),p=0,m=null),h=s,p++,m===null&&(m=s);let c=s-m,f=W(i),_=Ce(i),v=o?.()??`unknown`;if(x(`[bridge:repl] Poll error (attempt ${p}, elapsed ${Math.round(c/1e3)}s, ws=${v}): ${_}`),C(`tengu_bridge_repl_poll_error`,{status:f,consecutiveErrors:p,elapsedMs:c}),p===1&&r?.(`reconnecting`,_),c>=9e5){x(`[bridge:repl] Poll failures exceeded ${dt/1e3}s (${p} errors), giving up`),w(`info`,`bridge_repl_poll_give_up`),C(`tengu_bridge_repl_poll_give_up`,{consecutiveErrors:p,elapsedMs:c,lastStatus:f}),r?.(`failed`,`connection to server lost`);break}let ee=Math.min(lt*2**(p-1),ut);if(u().non_exclusive_heartbeat_interval_ms>0){let t=d?.();if(t)try{await e.heartbeatWork(t.environmentId,t.workId,t.sessionToken)}catch{}}await k(ee,n)}}x(`[bridge:repl] Work poll loop ended (aborted=${n.aborted}) env=${t().environmentId}`)}S(),y(),K(),G();async function ht(t){let{onInboundMessage:n,onPermissionResponse:r,onInterrupt:a,onSetModel:s,onSetMaxThinkingTokens:d,onSetPermissionMode:h,onStateChange:g,initialMessages:y,getMessages:ee,previouslyFlushedUUIDs:b,initialName:S,perpetual:te,outboundOnly:C,tags:w}=t??{};if(J(Oe),!await De())return q(`not_enabled`,`[bridge:repl] Skipping: bridge not enabled`),null;if(!Q())return q(`no_oauth`,`[bridge:repl] Skipping: no OAuth tokens`),g?.(`failed`,`/login`),null;if(await he(),!me(`allow_remote_control`))return q(`policy_denied`,`[bridge:repl] Skipping: allow_remote_control policy not allowed`),g?.(`failed`,`disabled by your organization's policy`),null;if(!Ee()){let e=f();if(e.bridgeOauthDeadExpiresAt!=null&&(e.bridgeOauthDeadFailCount??0)>=3&&c()?.expiresAt===e.bridgeOauthDeadExpiresAt)return x(`[bridge:repl] Skipping: cross-process backoff (dead token seen ${e.bridgeOauthDeadFailCount} times)`),null;await u();let t=c();if(t&&t.expiresAt!==null&&t.expiresAt<=Date.now()){q(`oauth_expired_unrefreshable`,`[bridge:repl] Skipping: OAuth token expired and refresh failed (re-login required)`),g?.(`failed`,`/login`);let e=t.expiresAt;return l(t=>({...t,bridgeOauthDeadExpiresAt:e,bridgeOauthDeadFailCount:t.bridgeOauthDeadExpiresAt===e?(t.bridgeOauthDeadFailCount??0)+1:1})),null}}let T=X(),E=`remote-control-${ge()}`,D=!1,O=!1;if(S)E=S,D=!0,O=!0;else{let e=i(),t=e?z(e):void 0;if(t)E=t,D=!0,O=!0;else if(y&&y.length>0)for(let e=y.length-1;e>=0;e--){let t=y[e];if(t.type!==`user`||t.isMeta||t.toolUseResult||t.isCompactSummary||t.origin&&t.origin.kind!==`human`||ce(t))continue;let n=ae(t.message.content);if(!n)continue;let r=_t(n);if(r){E=r,D=!0;break}}}let k=0,A,ie=0,oe=(e,t,n)=>{D=!0,E=e,x(`[bridge:repl] derived title from message ${n}: ${e}`),Be(t,e,{baseUrl:T,getAccessToken:Q}).catch(()=>{})},se=(e,t)=>{let n=++ie,r=k;Je(e,AbortSignal.timeout(15e3)).then(e=>{e&&n===ie&&A===t&&!z(i())&&oe(e,t,r)})},j=(e,t)=>{if(O||z(i()))return!0;if(A!==void 0&&A!==t&&(k=0),A=t,k++,k===1&&!D){let n=_t(e);n&&oe(n,t,k),se(e,t)}else if(k===3){let n=ee?.();se(n?Xe(M(n)):e,t)}return k>=3},le=_(`tengu_bridge_initial_history_cap`,200,300*1e3),ue=Z()?`self-hosted`:await p();if(!ue)return q(`no_org_uuid`,`[bridge:repl] Skipping: no org UUID`),g?.(`failed`,`/login`),null;if(Ae()&&!te){let e=await Ge();if(e)return q(`version_too_old`,`[bridge:repl] Skipping: ${e}`,!0),g?.(`failed`,"run `claude update` to upgrade"),null;x(`[bridge:repl] Using env-less bridge path (tengu_bridge_repl_v2)`);let{initEnvLessBridgeCore:t}=await import(`./remoteBridgeCore-DyA_2GrL.js`);return t({baseUrl:T,orgUUID:ue,title:E,getAccessToken:Q,onAuth401:m,toSDKMessages:qe,initialHistoryCap:le,initialMessages:y,onInboundMessage:n,onUserMessage:j,onPermissionResponse:r,onInterrupt:a,onSetModel:s,onSetMaxThinkingTokens:d,onSetPermissionMode:h,onStateChange:g,outboundOnly:C,tags:w})}let de=je();if(de)return q(`version_too_old`,`[bridge:repl] Skipping: ${de}`),g?.(`failed`,"run `claude update` to upgrade"),null;let fe=await ne(),pe=await re(),N=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||T,P=`claude_code`;{let{isAssistantMode:t}=(Me(),e(Ne));t()&&(P=`claude_code_assistant`)}return pt({dir:o(),machineName:st(),branch:fe,gitRepoUrl:pe,title:E,baseUrl:T,sessionIngressUrl:N,workerType:P,getAccessToken:Q,createSession:e=>He({...e,events:[],baseUrl:T,getAccessToken:Q}),archiveSession:e=>Ue(e,{baseUrl:T,getAccessToken:Q,timeoutMs:1500}).catch(e=>{x(`[bridge:repl] archiveBridgeSession threw: ${v(e)}`,{level:`error`})}),getCurrentTitle:()=>z(i())??E,onUserMessage:j,toSDKMessages:qe,onAuth401:m,getPollIntervalConfig:$,initialHistoryCap:le,initialMessages:y,previouslyFlushedUUIDs:b,onInboundMessage:n,onPermissionResponse:r,onInterrupt:a,onSetModel:s,onSetMaxThinkingTokens:d,onSetPermissionMode:h,onStateChange:g,perpetual:te})}var gt=50;function _t(e){let t=D(e),n=(/^(.*?[.!?])\s/.exec(t)?.[1]??t).replace(/\s+/g,` `).trim();if(n)return n.length>gt?n.slice(0,gt-1)+`…`:n}export{ht as initReplBridge};