claude-code-best 2.7.1 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-C7od6sFQ.js → AddWorkspaceDirectory-DRO4tbYd.js} +1 -1
  2. package/dist/chunks/{App-EfHjElWP.js → App-DJyiiVKi.js} +1 -1
  3. package/dist/chunks/{ApproveApiKey-CSz0291w.js → ApproveApiKey-DygOEAkM.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-oTZKoMvB.js +1 -0
  5. package/dist/chunks/{AssistantSessionChooser-mLIhDlxW.js → AssistantSessionChooser-C67mOxVi.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-Bqk_Cn3j.js +2 -0
  7. package/dist/chunks/{BypassPermissionsModeDialog-BCdft-m_.js → BypassPermissionsModeDialog-C4z7RkFV.js} +1 -1
  8. package/dist/chunks/{ClaudeInChromeOnboarding-BPlrCIo-.js → ClaudeInChromeOnboarding-CyVFdjBe.js} +1 -1
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-5FCT81WS.js +1 -0
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-D8fk-Ib5.js → ClaudeMdExternalIncludesDialog-IpqqBuJs.js} +1 -1
  11. package/dist/chunks/ConsoleOAuthFlow-BmGziW64.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-BQwx7qWA.js → DesktopHandoff-CJpa8Xy-.js} +1 -1
  13. package/dist/chunks/{DevChannelsDialog-CujM8Ivu.js → DevChannelsDialog-CfAuHVRL.js} +1 -1
  14. package/dist/chunks/Dialog-C8eGKH-e.js +1 -0
  15. package/dist/chunks/{DiffDialog-Byv1UJvS.js → DiffDialog-CV3brWsG.js} +1 -1
  16. package/dist/chunks/{Doctor-Cv7wbi6C.js → Doctor-D3GysagF.js} +1 -1
  17. package/dist/chunks/Doctor-DohPtIKu.js +1 -0
  18. package/dist/chunks/{ExitFlow-DKusdm_v.js → ExitFlow-L2sh80sm.js} +2 -2
  19. package/dist/chunks/{Feedback-Diw8XUr-.js → Feedback-DfkBCvva.js} +1 -1
  20. package/dist/chunks/{Grove-CAi037VV.js → Grove-Bo74aZx-.js} +1 -1
  21. package/dist/chunks/Grove-C_ocvHd3.js +1 -0
  22. package/dist/chunks/{HybridTransport-CP0RopXu.js → HybridTransport-BItIDJyC.js} +1 -1
  23. package/dist/chunks/{ITermBackend-RvD4VX7c.js → ITermBackend-3iS8Bvmo.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-Bhlgysxl.js → InvalidConfigDialog-6lPGcuOX.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-dGStgJZN.js → InvalidSettingsDialog-D8DwHiys.js} +1 -1
  26. package/dist/chunks/ListItem-DDMe4CJ3.js +1 -0
  27. package/dist/chunks/{MCPConnectionManager-D5a9ysw2.js → MCPConnectionManager-CsPizxTx.js} +1 -1
  28. package/dist/chunks/{McpParsingWarnings-B_z9pZ_8.js → McpParsingWarnings-Cepe7RPZ.js} +1 -1
  29. package/dist/chunks/MessageSelector-BzUQUeDn.js +3 -0
  30. package/dist/chunks/{Messages-DTmFVhRG.js → Messages-KmeXIJqL.js} +3 -3
  31. package/dist/chunks/{Onboarding-BoAtphYb.js → Onboarding-BZUXID6q.js} +1 -1
  32. package/dist/chunks/{OverageCreditUpsell-DA7Ne7Mj.js → OverageCreditUpsell-Dhm7HBuD.js} +1 -1
  33. package/dist/chunks/{PermissionDialog-_WQPRYHQ.js → PermissionDialog-BrRBxx5o.js} +1 -1
  34. package/dist/chunks/PluginSettings-BZ-PX9Tg.js +17 -0
  35. package/dist/chunks/{PressEnterToContinue-BJ58eCFC.js → PressEnterToContinue-DtA_p3X6.js} +1 -1
  36. package/dist/chunks/{PromptInputFooterSuggestions-DhIQ0Nge.js → PromptInputFooterSuggestions-Da8Fty6P.js} +1 -1
  37. package/dist/chunks/{PromptInputHelpMenu-B__j9zE6.js → PromptInputHelpMenu-Bz7EPzzq.js} +1 -1
  38. package/dist/chunks/QueryEngine-CmJK27jU.js +1 -0
  39. package/dist/chunks/REPL-BBmn_itf.js +1 -0
  40. package/dist/chunks/{REPL-B1BS9jwx.js → REPL-DxEJZpIp.js} +36 -36
  41. package/dist/chunks/{RemoteCallout-Bwe1ESr9.js → RemoteCallout-DONJj8l2.js} +1 -1
  42. package/dist/chunks/RemoteSessionManager-BvvNspY8.js +2 -0
  43. package/dist/chunks/ResumeConversation-EpjJdFHu.js +1 -0
  44. package/dist/chunks/{SSETransport-D3e5KNL3.js → SSETransport-D51Jfdaj.js} +1 -1
  45. package/dist/chunks/SearchBox-CciJ8giD.js +1 -0
  46. package/dist/chunks/SearchExtraToolsTool-kjVFsFkT.js +1 -0
  47. package/dist/chunks/SentryErrorBoundary-DsrmgmKF.js +1 -0
  48. package/dist/chunks/{SentryErrorBoundary-D-YZTGQG.js → SentryErrorBoundary-nYTimi4l.js} +1 -1
  49. package/dist/chunks/Settings-C2vEJjLx.js +2 -0
  50. package/dist/chunks/{TeleportProgress-C3Ubx1Se.js → TeleportProgress--jgrqIfW.js} +1 -1
  51. package/dist/chunks/{TeleportRepoMismatchDialog-D_ax3xQy.js → TeleportRepoMismatchDialog-BKDaFT_L.js} +1 -1
  52. package/dist/chunks/{TeleportResumeWrapper-DeVKIXQp.js → TeleportResumeWrapper-CxlpiHIz.js} +1 -1
  53. package/dist/chunks/{ThemePicker-DKmIL5Ku.js → ThemePicker-CYL4C-F-.js} +1 -1
  54. package/dist/chunks/{TmuxBackend-Bm_cRJ2x.js → TmuxBackend-C_N4ww8i.js} +2 -2
  55. package/dist/chunks/{TrustDialog-ClXFMKj6.js → TrustDialog-CYdftZ1M.js} +1 -1
  56. package/dist/chunks/{ValidationErrorsList-SdQADfvA.js → ValidationErrorsList-CaTwOP3f.js} +1 -1
  57. package/dist/chunks/{WelcomeV2-BijS6i2Z.js → WelcomeV2-5rgKm4Mz.js} +1 -1
  58. package/dist/chunks/{WindowsTerminalBackend-CGEQ5ClB.js → WindowsTerminalBackend-BzoSs0VA.js} +2 -2
  59. package/dist/chunks/{add-dir-B7kleB6k.js → add-dir-RNzFR3XZ.js} +1 -1
  60. package/dist/chunks/{agentDisplay-Dr1XbOAu.js → agentDisplay-DgeOQY1E.js} +1 -1
  61. package/dist/chunks/{agents-CpLvvWpO.js → agents-D7cgzb3f.js} +7 -7
  62. package/dist/chunks/{agents-Dy5YOJC9.js → agents-iMtFurok.js} +1 -1
  63. package/dist/chunks/{ant-gwf-4eGN.js → ant-CF1iRpXD.js} +1 -1
  64. package/dist/chunks/{api-CDmgYrwN.js → api-DMbWqJlK.js} +1 -1
  65. package/dist/chunks/api-DkgaFAzq.js +1 -0
  66. package/dist/chunks/artifacts-D2kY_AMp.js +1 -0
  67. package/dist/chunks/{assistant-1usDIXtk.js → assistant-CZ4VXgzH.js} +1 -1
  68. package/dist/chunks/assistant-CiNV3Q0f.js +1 -0
  69. package/dist/chunks/{assistant-BULedprW.js → assistant-JAqAZqaE.js} +1 -1
  70. package/dist/chunks/{auth-CvHVr2A5.js → auth-BemPA3ot.js} +1 -1
  71. package/dist/chunks/auth-CbQCc9vz.js +1 -0
  72. package/dist/chunks/{autoMode-DSMM2seL.js → autoMode-CGovMAzJ.js} +1 -1
  73. package/dist/chunks/{autonomy-TtBO2TAe.js → autonomy-BVXyNEj0.js} +1 -1
  74. package/dist/chunks/{autonomy-Dj6Nzxus.js → autonomy-BnAHLZWH.js} +3 -3
  75. package/dist/chunks/{autonomyPanel-CbmU7lPg.js → autonomyPanel-COMI2iR0.js} +1 -1
  76. package/dist/chunks/{backgroundHousekeeping-Cp2RvmEN.js → backgroundHousekeeping-BRtG20l2.js} +2 -2
  77. package/dist/chunks/backgroundHousekeeping-LYpOamcN.js +1 -0
  78. package/dist/chunks/{banner-D9Cq292T.js → banner-D_rqe2XQ.js} +1 -1
  79. package/dist/chunks/{branch-Cj5TGroO.js → branch-BnKwIQtC.js} +1 -1
  80. package/dist/chunks/{break-cache-DrIa8RdW.js → break-cache-CDzQDHwY.js} +1 -1
  81. package/dist/chunks/{bridge-CsqJAoEg.js → bridge-ChVjEHVq.js} +2 -2
  82. package/dist/chunks/bridgeConfig-Budgp2Go.js +1 -0
  83. package/dist/chunks/{bridgeConfig-pjDV5Z2l.js → bridgeConfig-e0MGfed6.js} +1 -1
  84. package/dist/chunks/{bridgeEnabled-D9jI6X-w.js → bridgeEnabled-DR-v8AXw.js} +1 -1
  85. package/dist/chunks/bridgeEnabled-DmvmwuUY.js +1 -0
  86. package/dist/chunks/bridgeMain-KYR5iq6H.js +1 -0
  87. package/dist/chunks/{bridgeMain-CNmR9iDD.js → bridgeMain-OsR-_PRp.js} +11 -11
  88. package/dist/chunks/{bridgeMessaging-DN0X35NX.js → bridgeMessaging-BvBnxgD4.js} +1 -1
  89. package/dist/chunks/{btw-BOg0RTKl.js → btw-_b16RGoh.js} +1 -1
  90. package/dist/chunks/{buddy-BFuPeIxM.js → buddy-DJ3QSQyd.js} +1 -1
  91. package/dist/chunks/{bypassPermissionsKillswitch-kxVnIVRs.js → bypassPermissionsKillswitch-OhGSWZrB.js} +1 -1
  92. package/dist/chunks/{caches-BumkMuGA.js → caches-Bp4F7tZ5.js} +2 -2
  93. package/dist/chunks/caches-CkH9F-Fd.js +1 -0
  94. package/dist/chunks/{ccrClient-BI1QPLmN.js → ccrClient-D7pEGzQa.js} +1 -1
  95. package/dist/chunks/changeDetector-IFbty4jj.js +1 -0
  96. package/dist/chunks/{channelNotification-CoZSFUlb.js → channelNotification-BZFMAWln.js} +1 -1
  97. package/dist/chunks/channelNotification-CIyWY0hs.js +1 -0
  98. package/dist/chunks/{chrome-C_5EZcdc.js → chrome-B5IxDA16.js} +1 -1
  99. package/dist/chunks/clear-BVjSQsUL.js +1 -0
  100. package/dist/chunks/client-BUUsZdSe.js +1 -0
  101. package/dist/chunks/color-BYVWpzI8.js +1 -0
  102. package/dist/chunks/commands-pTQdOvN6.js +1 -0
  103. package/dist/chunks/{commitAttribution-iKd8bTOI.js → commitAttribution-ClSlXMPG.js} +1 -1
  104. package/dist/chunks/commitAttribution-QPrKt_BF.js +1 -0
  105. package/dist/chunks/{compact-B6Muofhz.js → compact-B9c12JXf.js} +3 -3
  106. package/dist/chunks/{companion-B_LrjSk5.js → companion-C8e7dVlu.js} +1 -1
  107. package/dist/chunks/completionCache-BB7-y2BX.js +1 -0
  108. package/dist/chunks/{completionCache-C7hDqIDL.js → completionCache-Br6OwASx.js} +1 -1
  109. package/dist/chunks/{config-CJd9kJ57.js → config-Bxgfx_nO.js} +1 -1
  110. package/dist/chunks/{config-CQd4IkXo.js → config-C-yz-f4W.js} +1 -1
  111. package/dist/chunks/{context-qAHTuazZ.js → context-Bf5t6C-a.js} +1 -1
  112. package/dist/chunks/{context-noninteractive-DZsSp-ES.js → context-noninteractive-CJu7hZCM.js} +1 -1
  113. package/dist/chunks/context-noninteractive-OUTZ6BKj.js +1 -0
  114. package/dist/chunks/conversation-BYMS5Hqa.js +1 -0
  115. package/dist/chunks/conversation-Bs8l0KNl.js +1 -0
  116. package/dist/chunks/{copy-B2jhZndZ.js → copy-C0BZ7Gm0.js} +1 -1
  117. package/dist/chunks/{createSSHSession-CKdoEmAg.js → createSSHSession-DNXCWneI.js} +1 -1
  118. package/dist/chunks/{createSession-WkBw7wdn.js → createSession-DjM6Ev45.js} +1 -1
  119. package/dist/chunks/createSession-DpqtD4ML.js +1 -0
  120. package/dist/chunks/cron-DwR6OJuW.js +1 -0
  121. package/dist/chunks/{cronJitterConfig-2u6WAlti.js → cronJitterConfig-CaFkPXKB.js} +1 -1
  122. package/dist/chunks/{crossProjectResume-CjJISRBQ.js → crossProjectResume-BCr6jfGz.js} +3 -3
  123. package/dist/chunks/{daemon-BRKR4D1D.js → daemon-Bu0Uy-qG.js} +1 -1
  124. package/dist/chunks/{datadog-YsyhnDmr.js → datadog-ClZjR-jM.js} +1 -1
  125. package/dist/chunks/datadog-DlzPb5oG.js +1 -0
  126. package/dist/chunks/desktop-WH8s-9-6.js +1 -0
  127. package/dist/chunks/{diff-BTtUFuf-.js → diff-D9hjPq4W.js} +1 -1
  128. package/dist/chunks/{doctor-BKBb426q.js → doctor-4-im_J_h.js} +1 -1
  129. package/dist/chunks/earlyInput-DEZaWwKF.js +1 -0
  130. package/dist/chunks/{effort-ClhxMqY6.js → effort-Bz-9GIpe.js} +1 -1
  131. package/dist/chunks/entry-CEBaLwEG.js +14 -0
  132. package/dist/chunks/{envLessBridgeConfig-C9UUbQCo.js → envLessBridgeConfig-DW4-nPbZ.js} +1 -1
  133. package/dist/chunks/envLessBridgeConfig-izoVnE8s.js +1 -0
  134. package/dist/chunks/exit-DBNDTR4b.js +1 -0
  135. package/dist/chunks/{export-DS2esu8D.js → export-CQHUM_Nv.js} +1 -1
  136. package/dist/chunks/{exportRenderer-DX2L5fQ7.js → exportRenderer-CuIDQBLH.js} +1 -1
  137. package/dist/chunks/{extra-usage-XJxfHsbe.js → extra-usage-DTr6gExD.js} +1 -1
  138. package/dist/chunks/extra-usage-VSASGlte.js +1 -0
  139. package/dist/chunks/{extra-usage-core-D84ifgBo.js → extra-usage-core-D3CwYO_8.js} +1 -1
  140. package/dist/chunks/{extra-usage-noninteractive-fxqxHnIt.js → extra-usage-noninteractive-d-QVg1D5.js} +1 -1
  141. package/dist/chunks/{extraUsage-P_NGI1-I.js → extraUsage-BNRQOkgU.js} +1 -1
  142. package/dist/chunks/extractMemories-hQlhiVOD.js +1 -0
  143. package/dist/chunks/fast-2gWrhEFZ.js +1 -0
  144. package/dist/chunks/{fast-CpN8lLnE.js → fast-bkGXbuHX.js} +1 -1
  145. package/dist/chunks/{feedback-CqRsOG3c.js → feedback-BvFgE_FF.js} +1 -1
  146. package/dist/chunks/{firstPartyEventLogger-CM0V7Uev.js → firstPartyEventLogger-D-ifHvWu.js} +1 -1
  147. package/dist/chunks/{flushGate-DNutWuOE.js → flushGate-BA24vFBg.js} +1 -1
  148. package/dist/chunks/{fpsMetrics-DKWp7vng.js → fpsMetrics-CBFlAGTS.js} +1 -1
  149. package/dist/chunks/{gates-C4JvRq4i.js → gates-C66Nz9b2.js} +1 -1
  150. package/dist/chunks/gates-dO6m4Hdp.js +1 -0
  151. package/dist/chunks/{gemini-B0M6SQSG.js → gemini-DuQl4hTA.js} +1 -1
  152. package/dist/chunks/{generateRecap-DhDOgXn3.js → generateRecap-CwBU76xi.js} +1 -1
  153. package/dist/chunks/{generateSessionName-CoFR2wgK.js → generateSessionName-LnmjE9jh.js} +1 -1
  154. package/dist/chunks/{githubRepoPathMapping-DGiSNykv.js → githubRepoPathMapping-DrreQj47.js} +1 -1
  155. package/dist/chunks/{goal-DRb6pPAp.js → goal-BIvjF6B7.js} +3 -3
  156. package/dist/chunks/{grok-emDua_hT.js → grok-KNLYSRBQ.js} +1 -1
  157. package/dist/chunks/{growthbook-COAneL48.js → growthbook-ksjGAskq.js} +1 -1
  158. package/dist/chunks/{heapdump-CA6DHA8G.js → heapdump-Cz8vkcOr.js} +1 -1
  159. package/dist/chunks/{help-XXY7deZm.js → help-Cx9OordP.js} +1 -1
  160. package/dist/chunks/{hooks-C6zZYnDi.js → hooks-BW-d9Bdu.js} +2 -2
  161. package/dist/chunks/hooks-BWoN0nQP.js +1 -0
  162. package/dist/chunks/{hostAdapter-DZbdeXCV.js → hostAdapter-DLmaB6eN.js} +1 -1
  163. package/dist/chunks/{ide-BLRNkzVx.js → ide-CECrIg1r.js} +2 -2
  164. package/dist/chunks/{inboundAttachments-60kD5Qt_.js → inboundAttachments-B0sGIu79.js} +1 -1
  165. package/dist/chunks/inboundAttachments-D8vq1NQO.js +1 -0
  166. package/dist/chunks/initReplBridge-BAEMZEcg.js +1 -0
  167. package/dist/chunks/{insights-BBugI3tW.js → insights-DeWggLxC.js} +1 -1
  168. package/dist/chunks/{install-github-app-ByyzrlM9.js → install-github-app-DqKEiHQ1.js} +2 -2
  169. package/dist/chunks/{install-CuVHbwyW.js → install-pxH_HR1p.js} +1 -1
  170. package/dist/chunks/{install-slack-app-CJGtmacz.js → install-slack-app-P1L9x-YI.js} +1 -1
  171. package/dist/chunks/{instrumentation-C8zvzMg1.js → instrumentation-Dx0s2jzr.js} +3 -3
  172. package/dist/chunks/{job-DBf6aPQX.js → job-CbxxkPgE.js} +1 -1
  173. package/dist/chunks/{keybindings-Bi7SMp5-.js → keybindings-BBPC7FAc.js} +1 -1
  174. package/dist/chunks/{lang-CVDkUhjk.js → lang-CKp0Tn76.js} +1 -1
  175. package/dist/chunks/language-CSDpzbTz.js +1 -0
  176. package/dist/chunks/{language-BYeqMX74.js → language-iERMuOEu.js} +1 -1
  177. package/dist/chunks/{launchAgentsPlatform-BKqxMFFn.js → launchAgentsPlatform-DQvKVtl2.js} +1 -1
  178. package/dist/chunks/{launchAutofixPr-CauX6gOB.js → launchAutofixPr-B7hu9C8h.js} +3 -3
  179. package/dist/chunks/{launchCommand-9eYsPG7W.js → launchCommand-CJsikSlW.js} +1 -1
  180. package/dist/chunks/{launchLocalMemory-Brrd_BJC.js → launchLocalMemory-Cpz7L5j5.js} +2 -2
  181. package/dist/chunks/{launchLocalVault-DtAn656A.js → launchLocalVault-XLfOQtP7.js} +3 -3
  182. package/dist/chunks/{launchMemoryStores-x7_Id7Yr.js → launchMemoryStores-Cz04PaDE.js} +1 -1
  183. package/dist/chunks/{launchOnboarding-DkamFByn.js → launchOnboarding-XPbUNdHS.js} +1 -1
  184. package/dist/chunks/{launchSchedule-DjNQNxW4.js → launchSchedule-B1VEe3o-.js} +1 -1
  185. package/dist/chunks/{launchSkillStore-D2GUGhDD.js → launchSkillStore-Cy59z5xx.js} +1 -1
  186. package/dist/chunks/{launchTeleport-DTfhiZkf.js → launchTeleport-ZPM_DvzK.js} +3 -3
  187. package/dist/chunks/{launchVault-BZ2Po4r8.js → launchVault-BhnTOZq8.js} +1 -1
  188. package/dist/chunks/loadAgentsDir-B-4D2dVE.js +1 -0
  189. package/dist/chunks/{loadAgentsDir-C_wFhytF.js → loadAgentsDir-CQF8qhne.js} +778 -778
  190. package/dist/chunks/loadPluginHooks-TyULD8KH.js +1 -0
  191. package/dist/chunks/{localSearch-B0p0_bjP.js → localSearch-BNYypHsK.js} +1 -1
  192. package/dist/chunks/localSearch-DsFH9yls.js +1 -0
  193. package/dist/chunks/login-CEJEl2mW.js +1 -0
  194. package/dist/chunks/{login-C1uE6Pg9.js → login-CxbcJk9_.js} +1 -1
  195. package/dist/chunks/{logoV2Utils-BJHvwGup.js → logoV2Utils-Br_w1z39.js} +1 -1
  196. package/dist/chunks/logout-BXr4jzNY.js +1 -0
  197. package/dist/chunks/{magicDocs-DPZzG7Z2.js → magicDocs-DnxdS9yV.js} +1 -1
  198. package/dist/chunks/{main-CNwSLti2.js → main-FBmdv32j.js} +145 -66
  199. package/dist/chunks/{mappers-Dxs_kNJH.js → mappers-BNI_df3v.js} +1 -1
  200. package/dist/chunks/mcp-BhAGhDQE.js +1 -0
  201. package/dist/chunks/{mcp-CbDDqdzF.js → mcp-DbqUZ1Cf.js} +1 -1
  202. package/dist/chunks/mcp-esqdO_lV.js +6 -0
  203. package/dist/chunks/{mcpServer-Py4Iz9Hx.js → mcpServer-Ct-GVL-y.js} +1 -1
  204. package/dist/chunks/{mcpServer-BJNjQXsU.js → mcpServer-DeL2ADSF.js} +1 -1
  205. package/dist/chunks/memory-DwapBEsD.js +1 -0
  206. package/dist/chunks/{mobile-BMglW1NB.js → mobile-D7MSmMhc.js} +1 -1
  207. package/dist/chunks/{modalContext-c5Yqx_CQ.js → modalContext-DxfeT_3m.js} +1 -1
  208. package/dist/chunks/{mode-CqGusjoT.js → mode-B5cmHCvz.js} +1 -1
  209. package/dist/chunks/{model-BBULcn7y.js → model-BePO0VaC.js} +1 -1
  210. package/dist/chunks/model-CgH43-hO.js +1 -0
  211. package/dist/chunks/{onChangeAppState-BkRihYau.js → onChangeAppState-B3d5iy6T.js} +1 -1
  212. package/dist/chunks/{openai-yNI_zoao.js → openai-fRhGOIQq.js} +3 -3
  213. package/dist/chunks/{overageCreditGrant-Cbh0_fbM.js → overageCreditGrant-B6sx7IFi.js} +1 -1
  214. package/dist/chunks/{panel-D3wvAEFE.js → panel-CAVG5BOM.js} +1 -1
  215. package/dist/chunks/{panel-BYfvo_mR.js → panel-DU8y_jcf.js} +1 -1
  216. package/dist/chunks/{panelCall-t10Sud9A.js → panelCall-DUQdjDee.js} +1 -1
  217. package/dist/chunks/{passes-D_iS6DaC.js → passes-CWPPUigp.js} +1 -1
  218. package/dist/chunks/{paths-Ci1iwL5Y.js → paths-4ZWdjPP4.js} +3 -3
  219. package/dist/chunks/{permissions-CHvu4-yX.js → permissions-DW8CRuJp.js} +3 -3
  220. package/dist/chunks/{pipeTransport-EAYXsubu.js → pipeTransport-CUeYRWJn.js} +1 -1
  221. package/dist/chunks/{plan-CP5nq_EB.js → plan-Cf-tHvGq.js} +1 -1
  222. package/dist/chunks/plugin-DXhCgoNC.js +1 -0
  223. package/dist/chunks/{pluginAutoupdate-ClrgF5b3.js → pluginAutoupdate-CdmKzIRf.js} +1 -1
  224. package/dist/chunks/{pluginBlocklist-B1LVo0j_.js → pluginBlocklist-C9XwbFSo.js} +1 -1
  225. package/dist/chunks/{pluginCliCommands-eqyMBWcP.js → pluginCliCommands-CmY_maYg.js} +1 -1
  226. package/dist/chunks/{pluginFlagging-BiTDVP10.js → pluginFlagging-DyzxZolj.js} +1 -1
  227. package/dist/chunks/{pluginOperations-gZ-iCmhu.js → pluginOperations-mr4I7Jw9.js} +1 -1
  228. package/dist/chunks/{pluginStartupCheck-DCDWHam6.js → pluginStartupCheck-B6OdK29Z.js} +1 -1
  229. package/dist/chunks/pluginStartupCheck-BFuZqpnX.js +1 -0
  230. package/dist/chunks/{plugins-BAIVqfi8.js → plugins-rdPgpjF8.js} +1 -1
  231. package/dist/chunks/policyLimits-B3dtp_Fe.js +1 -0
  232. package/dist/chunks/{pollConfig-_2W7bHoW.js → pollConfig-DLbuHBse.js} +1 -1
  233. package/dist/chunks/{poor-Dii0mpOW.js → poor-pmz2b7zu.js} +1 -1
  234. package/dist/chunks/poorMode-BPIUnFFi.js +1 -0
  235. package/dist/chunks/{poorMode-aDmmvJ_e.js → poorMode-DD-q_w6Z.js} +1 -1
  236. package/dist/chunks/{print-BwSmcUQu.js → print-luaON-Cg.js} +12 -12
  237. package/dist/chunks/{privacy-settings-DaAgSLKw.js → privacy-settings-BpigC4oX.js} +1 -1
  238. package/dist/chunks/{processBashCommand-BZ1_JKu4.js → processBashCommand-f_84bSlP.js} +1 -1
  239. package/dist/chunks/processSlashCommand-BkBqV3Jd.js +6 -0
  240. package/dist/chunks/{projectContext-Cd7V9pES.js → projectContext-fS1t-xRh.js} +1 -1
  241. package/dist/chunks/{prompt-6ZKyqv6z.js → prompt-CogZQuTN.js} +1 -1
  242. package/dist/chunks/prompt-CriAIdkT.js +1 -0
  243. package/dist/chunks/prompt-TGc_H1cL.js +1 -0
  244. package/dist/chunks/{promptEditor-Dz41P-3I.js → promptEditor-C___2FFs.js} +2 -2
  245. package/dist/chunks/{protocolHandler-CHGHjfdf.js → protocolHandler-qwll5gSY.js} +1 -1
  246. package/dist/chunks/{rate-limit-options-BlU9av7g.js → rate-limit-options-nQcTipEp.js} +1 -1
  247. package/dist/chunks/{rcDebugLog-C42A0pX1.js → rcDebugLog-DOXxIr8l.js} +1 -1
  248. package/dist/chunks/{referral-IIcY3jkp.js → referral-CMPZjf3I.js} +1 -1
  249. package/dist/chunks/{refresh-DTGEx7X_.js → refresh-CP7Dnjp4.js} +1 -1
  250. package/dist/chunks/{registerProtocol-BkNncGMI.js → registerProtocol-DCNuqdCC.js} +1 -1
  251. package/dist/chunks/registry-DLqZJleQ.js +1 -0
  252. package/dist/chunks/{release-notes-BxzOD-zP.js → release-notes-BsDW6T9f.js} +1 -1
  253. package/dist/chunks/{releaseNotes-C8KQGZHq.js → releaseNotes-Tbd018Qz.js} +2 -2
  254. package/dist/chunks/{reload-plugins-gYyC6_g8.js → reload-plugins-iG9ZE9wF.js} +1 -1
  255. package/dist/chunks/{remote-env-CEJH5aJh.js → remote-env-BFntnltf.js} +1 -1
  256. package/dist/chunks/{remoteBridgeCore-Dte7ZUAN.js → remoteBridgeCore-Dpko9c-J.js} +1 -1
  257. package/dist/chunks/{remoteControlServer-GN-eDbEz.js → remoteControlServer-D3P82kVF.js} +1 -1
  258. package/dist/chunks/{rename-BEU6BNRp.js → rename-Codm2nfB.js} +1 -1
  259. package/dist/chunks/{resume-D36S2rXg.js → resume-BB1ceL_x.js} +2 -2
  260. package/dist/chunks/{runtimeObserver-CDMCeww2.js → runtimeObserver-BpRn0RiL.js} +1 -1
  261. package/dist/chunks/{runtimeObserver-DaKaKNVW.js → runtimeObserver-D6aF77Dq.js} +2 -2
  262. package/dist/chunks/sandbox-adapter-DrHD1mch.js +1 -0
  263. package/dist/chunks/{sandbox-toggle-BPO26t48.js → sandbox-toggle-DZ-8qXDS.js} +1 -1
  264. package/dist/chunks/searchExtraTools-Dwg6ZafS.js +1 -0
  265. package/dist/chunks/{sentry-9EbPa1Xu.js → sentry-CVdHlmNQ.js} +1 -1
  266. package/dist/chunks/{session-D18B22u4.js → session-B4j1ViVc.js} +1 -1
  267. package/dist/chunks/{sessionDiscovery-B-OTvXJf.js → sessionDiscovery-DkIIFsWX.js} +1 -1
  268. package/dist/chunks/sessionFileAccessHooks-n7HcOfZ7.js +1 -0
  269. package/dist/chunks/{sessionMemory-Ctauybzs.js → sessionMemory-CnT3-Mj7.js} +1 -1
  270. package/dist/chunks/sessionMemory-DVq43VXP.js +1 -0
  271. package/dist/chunks/sessionMemoryUtils-BjkdLRvh.js +1 -0
  272. package/dist/chunks/sessionObserver-CrfmnMzL.js +1 -0
  273. package/dist/chunks/{sessionObserver-ardnTJ37.js → sessionObserver-gjdJ91cv.js} +1 -1
  274. package/dist/chunks/sessionStorage-BTbr9wkZ.js +1 -0
  275. package/dist/chunks/{sessionTitle-DEKvIVCK.js → sessionTitle-CSU5-VK9.js} +1 -1
  276. package/dist/chunks/{sessionTracing-CJUUEWZ4.js → sessionTracing-BDN64fWh.js} +1 -1
  277. package/dist/chunks/{settingsSync-BWt3oUR7.js → settingsSync-Nixbcaox.js} +1 -1
  278. package/dist/chunks/{setup-BECFDOT9.js → setup-9nXlu56r.js} +1 -1
  279. package/dist/chunks/{setup-CmCTB2T_.js → setup-CZxLEcQh.js} +1 -1
  280. package/dist/chunks/setup-n3Ixr_gs.js +3 -0
  281. package/dist/chunks/{shadowedRuleDetection-BbALfdxE.js → shadowedRuleDetection-CCS7R7F1.js} +1 -1
  282. package/dist/chunks/{sideQuestion-BHK6dd1q.js → sideQuestion-MzExGTvn.js} +1 -1
  283. package/dist/chunks/{sink-Do5fWbUC.js → sink-BL75jACh.js} +1 -1
  284. package/dist/chunks/sink-CoUVbLFs.js +1 -0
  285. package/dist/chunks/{sinks-Dc9V7k6a.js → sinks-C-gxj_Eu.js} +2 -2
  286. package/dist/chunks/sinks-wuo1yQ_m.js +1 -0
  287. package/dist/chunks/{skill-learning-BHW9G3Dn.js → skill-learning-B9Msm4jG.js} +1 -1
  288. package/dist/chunks/skillChangeDetector-DlWPJTny.js +1 -0
  289. package/dist/chunks/{skillGapStore-DVMbI2yy.js → skillGapStore-Cpmbwyo3.js} +1 -1
  290. package/dist/chunks/{skillGapStore-Wa7s6orv.js → skillGapStore-CsADiV5a.js} +2 -2
  291. package/dist/chunks/{skillGenerator-CBuoIFsH.js → skillGenerator-_khb-Gmc.js} +2 -2
  292. package/dist/chunks/skillLearning-CFnZiM5J.js +1 -0
  293. package/dist/chunks/skillLearning-D6mvGN90.js +1 -0
  294. package/dist/chunks/{skillPanel-2w82nkOl.js → skillPanel-DQmj3Yh1.js} +3 -3
  295. package/dist/chunks/{skillSearchPanel-7BhCBkdh.js → skillSearchPanel-6w_zzoI3.js} +2 -2
  296. package/dist/chunks/{skills-D5rMEo2w.js → skills-B3LN9tp9.js} +1 -1
  297. package/dist/chunks/{sprites-uNWgVZT6.js → sprites-8JVWnXzp.js} +1 -1
  298. package/dist/chunks/{src-poaoYkuc.js → src-BJM0zMNO.js} +1 -1
  299. package/dist/chunks/{src-Di342QoJ.js → src-KjMLauwe.js} +1 -1
  300. package/dist/chunks/startupProfiler-BmnoJtfF.js +1 -0
  301. package/dist/chunks/{startupProfiler-CAntGAbs.js → startupProfiler-rCtNuhXz.js} +1 -1
  302. package/dist/chunks/{staticRender-C5v46np_.js → staticRender-DboURbK0.js} +1 -1
  303. package/dist/chunks/{stats-D0CJB2HV.js → stats-BDlygx5X.js} +1 -1
  304. package/dist/chunks/status-DlT1tUmc.js +1 -0
  305. package/dist/chunks/{statusNoticeHelpers-Lqf99003.js → statusNoticeHelpers-Cd_LDPvn.js} +1 -1
  306. package/dist/chunks/{tag-BnvWS9HE.js → tag-BLPgXlQZ.js} +1 -1
  307. package/dist/chunks/tasks-Bf1Nf3WX.js +1 -0
  308. package/dist/chunks/{teamHelpers-D8R_gGLb.js → teamHelpers-B-poMJeE.js} +1 -1
  309. package/dist/chunks/teamHelpers-DeQCfdgu.js +1 -0
  310. package/dist/chunks/{teammateModeSnapshot-Bdra3VIJ.js → teammateModeSnapshot-B1_3D1CQ.js} +1 -1
  311. package/dist/chunks/teammateModeSnapshot-BRuKcJNr.js +1 -0
  312. package/dist/chunks/teleport-CSo3PT05.js +1 -0
  313. package/dist/chunks/{templateJobs-BDKGtmr3.js → templateJobs-BVebX2BK.js} +1 -1
  314. package/dist/chunks/{terminalSetup-C1X-sXwp.js → terminalSetup-DHWL0gnz.js} +1 -1
  315. package/dist/chunks/{terminalSetup-Bbvq-9Xl.js → terminalSetup-DZTEKKne.js} +1 -1
  316. package/dist/chunks/{theme-DXv6bV7f.js → theme-BHQSNwSe.js} +1 -1
  317. package/dist/chunks/thinkback-CVYpxAyO.js +1 -0
  318. package/dist/chunks/{thinkback-CMsW7mvG.js → thinkback-DOzxcgMy.js} +1 -1
  319. package/dist/chunks/{thinkback-play-CFdkpzlj.js → thinkback-play-CK1C_F7G.js} +1 -1
  320. package/dist/chunks/{toolEventObserver-DDJV8cvW.js → toolEventObserver-BIjUIh4k.js} +1 -1
  321. package/dist/chunks/{toolEventObserver-CF7T7FBH.js → toolEventObserver-XPorjjtG.js} +1 -1
  322. package/dist/chunks/toolPool-CDEeuQd2.js +1 -0
  323. package/dist/chunks/{toolPool-BJv0sBnR.js → toolPool-hQlvQn-j.js} +1 -1
  324. package/dist/chunks/{trustedDevice-C9nJhhyZ.js → trustedDevice-CyfQd_GU.js} +1 -1
  325. package/dist/chunks/{trustedDevice-C5s2au0k.js → trustedDevice-D-L5uAor.js} +1 -1
  326. package/dist/chunks/{tui-DoOiz2RW.js → tui-C7aBeORE.js} +1 -1
  327. package/dist/chunks/{ultrareviewCommand-BEv1_AS1.js → ultrareviewCommand-rnMsUWTn.js} +2 -2
  328. package/dist/chunks/undercover-BviGW-bQ.js +1 -0
  329. package/dist/chunks/{undercover-DPVt2WN7.js → undercover-ClLYK52H.js} +1 -1
  330. package/dist/chunks/{updateCCB-D-4naIUu.js → updateCCB-pqkACWbs.js} +1 -1
  331. package/dist/chunks/upgrade-DAuhXFVI.js +1 -0
  332. package/dist/chunks/{upgrade-CSld83v7.js → upgrade-DpfZlPyC.js} +1 -1
  333. package/dist/chunks/{upload-DVlE8SRp.js → upload-D98tqZnO.js} +1 -1
  334. package/dist/chunks/{usage-D4Ubnttz.js → usage-BWd5R6DU.js} +1 -1
  335. package/dist/chunks/{usage-B_bY46ep.js → usage-CRquq5_O.js} +1 -1
  336. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-BHi41Ku_.js → useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js} +1 -1
  337. package/dist/chunks/useKeybinding-DOjEx42R.js +1 -0
  338. package/dist/chunks/useMainLoopModel-BZoZdEdj.js +1 -0
  339. package/dist/chunks/{useManagePlugins-B4kcqcyY.js → useManagePlugins-DMY74XAk.js} +1 -1
  340. package/dist/chunks/{useMergedTools-CTQl4cdV.js → useMergedTools-NN58Kguw.js} +1 -1
  341. package/dist/chunks/{useSearchInput-JPayBRPC.js → useSearchInput-CodP_5SB.js} +1 -1
  342. package/dist/chunks/{useSettingsErrors-YTgPxnRZ.js → useSettingsErrors-BRxaYl6B.js} +1 -1
  343. package/dist/chunks/useTerminalSize-mqo2Swmk.js +1 -0
  344. package/dist/chunks/{useVoice-CaBv3G13.js → useVoice-ByU-q_w4.js} +1 -1
  345. package/dist/chunks/{util-Q70qdjeS.js → util-SpgBY5_I.js} +1 -1
  346. package/dist/chunks/utils-CM5oEyAY.js +1 -0
  347. package/dist/chunks/{validatePlugin-6lg9B564.js → validatePlugin-CxCXNV8o.js} +1 -1
  348. package/dist/chunks/{vim-zOsQBIp4.js → vim-ByXlYzf9.js} +1 -1
  349. package/dist/chunks/{voice-DBQevAhk.js → voice-BnLS_SdQ.js} +1 -1
  350. package/dist/chunks/voiceModeEnabled-B3njLfhA.js +1 -0
  351. package/dist/chunks/{voiceModeEnabled-CjBjjeNR.js → voiceModeEnabled-D070o6QK.js} +1 -1
  352. package/dist/chunks/voiceStreamSTT-BkeyhhFJ.js +1 -0
  353. package/dist/chunks/{voiceStreamSTT-B8CTbb_6.js → voiceStreamSTT-vkQ-Aop7.js} +1 -1
  354. package/dist/chunks/{web-tools-CGqBqo07.js → web-tools-1yM0ZBfA.js} +1 -1
  355. package/dist/chunks/{workerRegistry-Bx6FvTZF.js → workerRegistry-7xGv_sNB.js} +1 -1
  356. package/dist/chunks/worktree-UA9gKCwL.js +1 -0
  357. package/dist/chunks/{xml-CVF7dWfi.js → xml-BUaEXGXx.js} +1 -1
  358. package/dist/cli.js +1 -1
  359. package/package.json +1 -1
  360. package/dist/chunks/ApproveApiKey-Cc5SaLqs.js +0 -1
  361. package/dist/chunks/BackgroundTasksDialog-OkUSMj0I.js +0 -2
  362. package/dist/chunks/ClaudeMdExternalIncludesDialog-BbPaorIs.js +0 -1
  363. package/dist/chunks/ConsoleOAuthFlow-Dyv4mI_o.js +0 -1
  364. package/dist/chunks/Dialog-91X6ZGg9.js +0 -1
  365. package/dist/chunks/Doctor-CRrE5Sf4.js +0 -1
  366. package/dist/chunks/Grove-CgX5Fdeh.js +0 -1
  367. package/dist/chunks/ListItem-DCQhApdJ.js +0 -1
  368. package/dist/chunks/MessageSelector-CEvbAZGv.js +0 -3
  369. package/dist/chunks/PluginSettings-D3bQRsge.js +0 -17
  370. package/dist/chunks/QueryEngine-CMcQGyql.js +0 -1
  371. package/dist/chunks/REPL-C9f3ToGu.js +0 -1
  372. package/dist/chunks/RemoteSessionManager-BKD4YmzY.js +0 -2
  373. package/dist/chunks/ResumeConversation-DxqbAKA4.js +0 -1
  374. package/dist/chunks/SearchBox-CkO4rQ-9.js +0 -1
  375. package/dist/chunks/SearchExtraToolsTool-BVAhywUI.js +0 -1
  376. package/dist/chunks/SentryErrorBoundary-M1ipwe1n.js +0 -1
  377. package/dist/chunks/Settings-D5EWYL40.js +0 -2
  378. package/dist/chunks/api-BdbBnz5c.js +0 -1
  379. package/dist/chunks/assistant-BMviqf0l.js +0 -1
  380. package/dist/chunks/auth-ORBmEqnH.js +0 -1
  381. package/dist/chunks/backgroundHousekeeping-BAvSPaZ5.js +0 -1
  382. package/dist/chunks/bridgeConfig-B49H_B9L.js +0 -1
  383. package/dist/chunks/bridgeEnabled-DsG2JvIr.js +0 -1
  384. package/dist/chunks/bridgeMain-DYCShrcV.js +0 -1
  385. package/dist/chunks/caches-BsYvQnWV.js +0 -1
  386. package/dist/chunks/changeDetector-By54zja0.js +0 -1
  387. package/dist/chunks/channelNotification-Cx82K1CD.js +0 -1
  388. package/dist/chunks/clear-BQr2zTyP.js +0 -1
  389. package/dist/chunks/client-BbavFXJZ.js +0 -1
  390. package/dist/chunks/color-DOsgZO2n.js +0 -1
  391. package/dist/chunks/commands-CfwfGt3T.js +0 -1
  392. package/dist/chunks/commitAttribution-CH9C_hoL.js +0 -1
  393. package/dist/chunks/completionCache-BQgiR45Q.js +0 -1
  394. package/dist/chunks/context-noninteractive-DCYvLxWx.js +0 -1
  395. package/dist/chunks/conversation-DYUVAAQt.js +0 -1
  396. package/dist/chunks/conversation-NrAy2em3.js +0 -1
  397. package/dist/chunks/createSession-Czx7_nf6.js +0 -1
  398. package/dist/chunks/cron-g_P3I5uT.js +0 -1
  399. package/dist/chunks/datadog-QSR9B7CZ.js +0 -1
  400. package/dist/chunks/desktop-BN9pHpK_.js +0 -1
  401. package/dist/chunks/earlyInput-D3OhUZ4G.js +0 -1
  402. package/dist/chunks/entry-CJlJ47nP.js +0 -14
  403. package/dist/chunks/envLessBridgeConfig-DSJqg3Ox.js +0 -1
  404. package/dist/chunks/exit-DxY3yJrp.js +0 -1
  405. package/dist/chunks/extra-usage-DaxUQk9I.js +0 -1
  406. package/dist/chunks/extractMemories-B3cTWsph.js +0 -1
  407. package/dist/chunks/fast-CHiQGMBE.js +0 -1
  408. package/dist/chunks/gates-DvjyKZVA.js +0 -1
  409. package/dist/chunks/hooks-DOej0jqp.js +0 -1
  410. package/dist/chunks/inboundAttachments-BBYxcnvj.js +0 -1
  411. package/dist/chunks/initReplBridge-Dt2aQBia.js +0 -1
  412. package/dist/chunks/language-BoKr5ylY.js +0 -1
  413. package/dist/chunks/loadAgentsDir-whRB0phu.js +0 -1
  414. package/dist/chunks/loadPluginHooks-CYZjzxyO.js +0 -1
  415. package/dist/chunks/localSearch-DAwFmV2Y.js +0 -1
  416. package/dist/chunks/login-DOyB64Rv.js +0 -1
  417. package/dist/chunks/logout-DTPo3Myl.js +0 -1
  418. package/dist/chunks/mcp-CVnFM6nR.js +0 -6
  419. package/dist/chunks/mcp-CzfQB8BT.js +0 -1
  420. package/dist/chunks/memory-BdUqEKio.js +0 -1
  421. package/dist/chunks/model-BOc_-7m0.js +0 -1
  422. package/dist/chunks/plugin-8apy_RBT.js +0 -1
  423. package/dist/chunks/pluginStartupCheck-EjLvCXru.js +0 -1
  424. package/dist/chunks/policyLimits-Cdp3QwZ1.js +0 -1
  425. package/dist/chunks/poorMode-DzEL0cu0.js +0 -1
  426. package/dist/chunks/processSlashCommand-v1Rvzxwn.js +0 -6
  427. package/dist/chunks/prompt-DPqKtC0b.js +0 -1
  428. package/dist/chunks/prompt-WjMHPk90.js +0 -1
  429. package/dist/chunks/registry-CBqb7wbi.js +0 -1
  430. package/dist/chunks/sandbox-adapter-DqTuhgud.js +0 -1
  431. package/dist/chunks/searchExtraTools-Brae4wmG.js +0 -1
  432. package/dist/chunks/sessionFileAccessHooks-BXsK8Dwf.js +0 -1
  433. package/dist/chunks/sessionMemory-Bv-AYifm.js +0 -1
  434. package/dist/chunks/sessionMemoryUtils-D-bzdsAT.js +0 -1
  435. package/dist/chunks/sessionObserver-j8D9hidw.js +0 -1
  436. package/dist/chunks/sessionStorage-Cw5ibYWA.js +0 -1
  437. package/dist/chunks/setup-CDxkPTCq.js +0 -2
  438. package/dist/chunks/sink-DFWgcGHX.js +0 -1
  439. package/dist/chunks/sinks-BnkxTOU9.js +0 -1
  440. package/dist/chunks/skillChangeDetector-DwAvG835.js +0 -1
  441. package/dist/chunks/skillLearning-BI2YDG3K.js +0 -1
  442. package/dist/chunks/skillLearning-BZMJRJPp.js +0 -1
  443. package/dist/chunks/startupProfiler-WtUzkMKV.js +0 -1
  444. package/dist/chunks/status-nte1Arzy.js +0 -1
  445. package/dist/chunks/tasks-CEs-pxkC.js +0 -1
  446. package/dist/chunks/teamHelpers-D4vCj2hP.js +0 -1
  447. package/dist/chunks/teammateModeSnapshot-BDJ1JTcl.js +0 -1
  448. package/dist/chunks/teleport-RxTr4aCi.js +0 -1
  449. package/dist/chunks/thinkback-DRJBz3Is.js +0 -1
  450. package/dist/chunks/toolPool-0zCdXfEu.js +0 -1
  451. package/dist/chunks/undercover-DYa00dVv.js +0 -1
  452. package/dist/chunks/upgrade-BHj8ALep.js +0 -1
  453. package/dist/chunks/useKeybinding-DPOUuymz.js +0 -1
  454. package/dist/chunks/useMainLoopModel-D3tJJC3y.js +0 -1
  455. package/dist/chunks/useTerminalSize-Du-EamDN.js +0 -1
  456. package/dist/chunks/utils-Cr-x1Oyd.js +0 -1
  457. package/dist/chunks/voiceModeEnabled-DK6u8Aaj.js +0 -1
  458. package/dist/chunks/voiceStreamSTT-CCkOfmdI.js +0 -1
  459. package/dist/chunks/worktree-DPpgPLLG.js +0 -1
  460. /package/dist/chunks/{InProcessTransport-B9II3BiO.js → InProcessTransport-DW2ed2Hs.js} +0 -0
  461. /package/dist/chunks/{attributionHooks-VGSpz4mk.js → attributionHooks-COqmxGy1.js} +0 -0
  462. /package/dist/chunks/{attributionTrailer-C8uqiLIb.js → attributionTrailer-Nx8I_ZRK.js} +0 -0
  463. /package/dist/chunks/{autoModeDenials-DlO5g6E9.js → autoModeDenials-BDpcFLb7.js} +0 -0
  464. /package/dist/chunks/{bedrockClient-BUmO2U-X.js → bedrockClient-BfPpXPI0.js} +0 -0
  465. /package/dist/chunks/{ccshareResume-DKwcd0Vc.js → ccshareResume-DPP1blaU.js} +0 -0
  466. /package/dist/chunks/{chromeNativeHost-BldB1Zzi.js → chromeNativeHost-DfYuJafI.js} +0 -0
  467. /package/dist/chunks/{claudeDesktop-BqTW_pbB.js → claudeDesktop-CEQCLZmG.js} +0 -0
  468. /package/dist/chunks/{cleanup-rCLlo4w8.js → cleanup-DUVwlFl7.js} +0 -0
  469. /package/dist/chunks/{connectHeadless-ByewVfOb.js → connectHeadless-DutPm1RT.js} +0 -0
  470. /package/dist/chunks/{dangerousBackend-Dkjtndh1.js → dangerousBackend-BDKHrF6i.js} +0 -0
  471. /package/dist/chunks/{earlyInput-CFYRGxau.js → earlyInput-B3U01GAm.js} +0 -0
  472. /package/dist/chunks/{eventLoopStallDetector-bYy0fesH.js → eventLoopStallDetector-MNrFR4OH.js} +0 -0
  473. /package/dist/chunks/{files-Bdr_PQyV.js → files-BGuNpYgH.js} +0 -0
  474. /package/dist/chunks/{fuse-D3B-UE5Y.js → fuse-D7icKomM.js} +0 -0
  475. /package/dist/chunks/{instinctParser-DOtj1Kni.js → instinctParser-BMtAMLSx.js} +0 -0
  476. /package/dist/chunks/{lockfile-C3JsqLpb.js → lockfile-DEaq0BaL.js} +0 -0
  477. /package/dist/chunks/{main-CfkIGrBF.js → main-SFdnVz-G.js} +0 -0
  478. /package/dist/chunks/{observationStore-rLlDwRtG.js → observationStore-Bi1rRKcD.js} +0 -0
  479. /package/dist/chunks/{openaiShared-C-AuktRP.js → openaiShared-BkVgd2rZ.js} +0 -0
  480. /package/dist/chunks/{output-style-B64-Zum6.js → output-style-F8fBWFZo.js} +0 -0
  481. /package/dist/chunks/{parseConnectUrl-DL390ePs.js → parseConnectUrl-CVT_db9n.js} +0 -0
  482. /package/dist/chunks/{poller-BA1jhG3F.js → poller-DhLgWNxJ.js} +0 -0
  483. /package/dist/chunks/{postCommitAttribution-D8MoHFoz.js → postCommitAttribution-Br4g4R6h.js} +0 -0
  484. /package/dist/chunks/{projectContext-Dn7umMp6.js → projectContext-2Z2w8AI8.js} +0 -0
  485. /package/dist/chunks/{renderOptions-Caca3bCd.js → renderOptions-4HxIPoDZ.js} +0 -0
  486. /package/dist/chunks/{rewind-Djt1zU_3.js → rewind-FKh7loMA.js} +0 -0
  487. /package/dist/chunks/{sanitization-Ds6zRQyx.js → sanitization-B-JlvWcf.js} +0 -0
  488. /package/dist/chunks/{sdkHeapDumpMonitor-DLMMNeqo.js → sdkHeapDumpMonitor-DTHI5WbD.js} +0 -0
  489. /package/dist/chunks/{server-DONKdvGc.js → server-BsxW1FVq.js} +0 -0
  490. /package/dist/chunks/{serverBanner-DIyjgIM-.js → serverBanner-DR3GYXpH.js} +0 -0
  491. /package/dist/chunks/{serverLog-D1N5yx8A.js → serverLog-CH1fCGsD.js} +0 -0
  492. /package/dist/chunks/{sessionDataUploader-CsNePsOb.js → sessionDataUploader-BgmJTXQr.js} +0 -0
  493. /package/dist/chunks/{sessionManager-BOmgJd1l.js → sessionManager-mesT4zIQ.js} +0 -0
  494. /package/dist/chunks/{stickers-DDAm--86.js → stickers-B0P4weWp.js} +0 -0
  495. /package/dist/chunks/{udsClient-CBF_cZFW.js → udsClient-B85rNglp.js} +0 -0
  496. /package/dist/chunks/{upstreamproxy-CLf1UaJv.js → upstreamproxy-D-6vdoIJ.js} +0 -0
  497. /package/dist/chunks/{voice-YtzCcIoM.js → voice-BXg-kzte.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,F as r,Rn as i,Vt as a,b as o,nt as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,oo as f}from"./paths-Ci1iwL5Y.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{Ej as h,Nj as g,Sj as _,Tj as v,bj as y,fC as b,lC as x,uC as S,yj as C}from"./loadAgentsDir-C_wFhytF.js";import{t as w}from"./useKeybinding-DPOUuymz.js";import{n as T,t as E}from"./useMainLoopModel-D3tJJC3y.js";function D(e){return typeof e==`string`&&e!==`ultracode`&&A.includes(e)}function O(e){if(e!=null&&typeof e!=`number`&&D(e))return e}function ee(e){let t=A.indexOf(e);return t<=0?A[0]:A[t-1]}function te(e){let t=A.indexOf(e);return t===-1||t>=A.length-1?A[A.length-1]:A[t+1]}function k(e){return e===`ultracode`}function ne(e){let t=O(e.envOverride);return t===void 0?e.displayed:t}function re(e,t){if(k(e))return{kind:`ultracode-hint`,message:j};let n=t(e);return{kind:`apply`,message:n.message,effortUpdate:n.effortUpdate}}var A,j,M,ie=e((()=>{A=[`low`,`medium`,`high`,`xhigh`,`max`,`ultracode`],j=`ultracode is not an effort level. Use /ultracode <context> to start a multi-agent workflow.`,M=`Effort unchanged.`}));function ae(e){let[t,r]=n(e?N:null);return[t,e?r:0]}var N,oe=e((()=>{c(),N=60}));function se(e){if(!/^#[0-9a-fA-F]{6}$/.test(e))return{h:0,s:0,l:0};let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return{h:0,s:0,l:o};let c=s/(1-Math.abs(2*o-1)),l;return l=i===t?60*((n-r)/s%6):i===n?60*((r-t)/s+2):60*((t-n)/s+4),l<0&&(l+=360),{h:l,s:c,l:o}}function ce(e,t,n){let r=(e%360+360)%360,i=(1-Math.abs(2*n-1))*t,a=r/60,o=i*(1-Math.abs(a%2-1)),s=0,c=0,l=0;a<1?(s=i,c=o):a<2?(s=o,c=i):a<3?(c=i,l=o):a<4?(c=o,l=i):a<5?(s=o,l=i):(s=i,l=o);let u=n-i/2,d=e=>Math.round((e+u)*255).toString(16).padStart(2,`0`);return`#${d(s)}${d(c)}${d(l)}`}function P(e,t){if(!/^#[0-9a-fA-F]{6}$/.test(e)||t===0)return e;let{h:n,s:r,l:i}=se(e);return ce(n+t,r,i)}function F(e){return e*L%360}function le(e,t=0){let n=e<0?0:e>1?1:e,r=I[Math.min(I.length-1,Math.floor(n*I.length))];return t===0?r:P(r,t)}function ue(e){let{y:t,width:n,time:r,sourceX:i,sourceY:a}=e;if(n<=0)return[];let o=F(r),s=Array(n);for(let e=0;e<n;e++){let n=e-i,c=(t-a)*1.5,l=Math.sqrt(n*n+c*c),u=l*.35-r*.004;s[e]={char:z,color:le((Math.sin(u)+1)/2*Math.max(0,1-l/90),o)}}return s}function de(e,t){let n=e.map(e=>({...e}));for(let e of t){let t=e.x;if(!(t>=n.length))for(let r=0;r<e.text.length;r++){let i=t+r;if(!(i<0)){if(i>=n.length)break;n[i]={char:e.text[r],color:e.color??n[i].color}}}}return n}function fe(e){if(e.length===0)return[];let t=[],n={text:e[0].char,color:e[0].color};for(let r=1;r<e.length;r++){let i=e[r];i.color===n.color?n.text+=i.char:(t.push(n),n={text:i.char,color:i.color})}return t.push(n),t}function pe(e,t){if(e===`transparent`)return R;let n=t<0?0:t>1?1:t;if(n<=.01)return R;if(!/^#[0-9a-fA-F]{6}$/.test(e))return e;let r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return`#${Math.round(r*n).toString(16).padStart(2,`0`)}${Math.round(i*n).toString(16).padStart(2,`0`)}${Math.round(a*n).toString(16).padStart(2,`0`)}`}function me(e,t){return e.map(e=>({char:e.char,color:pe(e.color,t)}))}var I,L,R,z,he=e((()=>{I=[`#1a1f3a`,`#1f2543`,`#252c55`,`#2e3870`,`#3a4582`,`#4a5bb0`,`#5769F7`],L=.03,R=`transparent`,z=` `}));function ge(e){let t=e-2;return t<=W*A.length?W:Math.floor(t/A.length)}function _e(e){let t=Math.max(0,Math.floor((e-9)/2));return e*(A.length-1)+t+4}function B(e,t,n){return n*e+Math.max(0,Math.floor((n-t)/2))}function ve({appStateEffort:e,onDone:t}){let n=b(),i=T(),{columns:a}=r(),c=H.useMemo(()=>ge(a),[a]),u=c*A.length,d=H.useMemo(()=>_e(c),[c]),f=y(),p=ne({envOverride:f,appStateEffort:e,displayed:C(i,e)}),[m,h]=H.useState(p),[g,_]=H.useState(!1),v=m===`ultracode`,[x,S]=H.useState(0),w=v||x>.001,[E,D]=ae(w);H.useEffect(()=>{if(!w)return;let e=+!!v;S(t=>{if(t===e)return t;let n=e>t?t+Y:t-Y;return e>t?Math.min(e,n):Math.max(e,n)})},[D,v,w]),s({"effortPanel:decrease":()=>h(e=>ee(e)),"effortPanel:increase":()=>h(e=>te(e)),"effortPanel:home":()=>h(`low`),"effortPanel:end":()=>h(`ultracode`),"effortPanel:confirm":H.useCallback(()=>{if(g)return;_(!0);let e=re(m,Q);e.kind===`apply`&&e.effortUpdate&&n(t=>({...t,effortValue:e.effortUpdate.value})),t(e.message)},[m,g,t,n]),"effortPanel:cancel":H.useCallback(()=>{g||(_(!0),t(M))},[g,t])},{context:`EffortPanel`});let O=f!=null,k=process.env.CLAUDE_CODE_EFFORT_LEVEL,j=H.useCallback((e,t)=>fe(me(de(ue({y:e+X,width:u,time:D,sourceX:d,sourceY:X}),t),x)),[D,x,u,d]);return(0,U.jsxs)(l,{ref:E,flexDirection:`column`,paddingX:1,width:u+2,children:[(0,U.jsx)(o,{bold:!0,color:`suggestion`,children:`Effort`}),O&&(0,U.jsx)(o,{color:`warning`,children:`⚠ CLAUDE_CODE_EFFORT_LEVEL=${k} overrides this session`}),w?(0,U.jsx)(be,{renderRow:j,cursor:m,fade:x,segment:c,panelWidth:u,time:D}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye,{cursor:m,segment:c,panelWidth:u}),(0,U.jsx)(l,{marginTop:1,children:(0,U.jsx)(o,{color:`subtle`,children:`←/→ adjust · Enter confirm · Esc cancel`})})]})]})}function ye({cursor:e,segment:t,panelWidth:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(l,{marginTop:1,flexDirection:`row`,justifyContent:`space-between`,children:[(0,U.jsx)(o,{color:`suggestion`,children:`Faster`}),(0,U.jsx)(o,{color:`suggestion`,children:`Smarter`})]}),(0,U.jsx)(o,{color:`subtle`,children:`─`.repeat(n)}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:!0,color:e===n?`suggestion`:`subtle`,children:e===n?`▲`:` `})},`cursor-${n}`))}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:e===n,color:e===n?`suggestion`:`subtle`,children:n})},`label-${n}`))}),(0,U.jsxs)(l,{flexDirection:`row`,children:[(0,U.jsx)(l,{width:t*(A.length-1)}),(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{color:`subtle`,children:G})})]})]})}function be({renderRow:e,cursor:t,segment:n,panelWidth:r,time:i}){let a=A.indexOf(t),s=A.length-1,c=F(i),l=P(J,c),u=P(K,c),d=P(q,c),f={text:`Faster`,x:0,color:l},p={text:`Smarter`,x:r-7,color:l},m={text:`─`.repeat(r),x:0,color:d},h={text:`▲`,x:B(a,1,n),color:l},g=A.map((e,r)=>({text:e,x:B(r,e.length,n),color:e===t?u:d})),_={text:G,x:B(s,17,n),color:d};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(V,{segments:e(-4,[])}),(0,U.jsx)(V,{segments:e(-3,[f,p])}),(0,U.jsx)(V,{segments:e(-2,[m])}),(0,U.jsx)(V,{segments:e(-1,[h])}),(0,U.jsx)(V,{segments:e(0,g)}),(0,U.jsx)(V,{segments:e(1,[_])}),(0,U.jsx)(V,{segments:e(2,[])}),(0,U.jsx)(o,{color:q,children:`←/→ adjust · Enter confirm · Esc cancel`})]})}function V({segments:e}){let t=[];for(let n of e){let e=``,r=null,i=()=>{e===``||r===null||(t.push({text:e,kind:r?`space`:`text`,color:n.color}),e=``,r=null)};for(let t of n.text){let n=t===` `;r===null?(e=t,r=n):n===r?e+=t:(i(),e=t,r=n)}i()}return(0,U.jsx)(l,{flexDirection:`row`,children:t.map((e,t)=>e.kind===`space`?e.color===`transparent`?(0,U.jsx)(a,{children:e.text},t):(0,U.jsx)(a,{backgroundColor:e.color,children:e.text},t):(0,U.jsx)(o,{color:e.color,bold:!0,children:e.text},t))})}var H,U,W,G,K,q,J,Y,X,xe=e((()=>{H=t(i(),1),c(),w(),v(),ie(),Ae(),E(),x(),oe(),he(),U=u(),W=12,G=`xhigh + workflows`,K=`#5769F7`,q=`#7a8eff`,J=`#5769F7`,Y=.2,X=0}));function Se(e){let t=g(e);if(t!==void 0){let e=d(`userSettings`,{effortLevel:t});if(e.error)return{message:`Failed to set effort level: ${e.error.message}`}}m(`tengu_effort_command`,{effort:e});let n=y();if(n!==void 0&&n!==e){let n=process.env.CLAUDE_CODE_EFFORT_LEVEL;return t===void 0?{message:`Not applied: CLAUDE_CODE_EFFORT_LEVEL=${n} overrides effort this session, and ${e} is session-only (nothing saved)`,effortUpdate:{value:e}}:{message:`CLAUDE_CODE_EFFORT_LEVEL=${n} overrides this session — clear it and ${e} takes over`,effortUpdate:{value:e}}}let r=_(e);return{message:`Set effort level to ${e}${t===void 0?` (this session only)`:``}: ${r}`,effortUpdate:{value:e}}}function Z(e,t){let n=y(),r=n===null?void 0:n??e;return r===void 0?{message:`Effort level: auto (currently ${C(t,e)})`}:{message:`Current effort level: ${r} (${_(r)})`}}function Ce(){let e=d(`userSettings`,{effortLevel:void 0});return e.error?{message:`Failed to set effort level: ${e.error.message}`}:(m(`tengu_effort_command`,{effort:`auto`}),y()==null?{message:`Effort level set to auto`,effortUpdate:{value:void 0}}:{message:`Cleared effort from settings, but CLAUDE_CODE_EFFORT_LEVEL=${process.env.CLAUDE_CODE_EFFORT_LEVEL} still controls this session`,effortUpdate:{value:void 0}})}function Q(e){let t=e.toLowerCase();return t===`auto`||t===`unset`?Ce():h(t)?Se(t):{message:`Invalid argument: ${e}. Valid options are: low, medium, high, max, auto`}}function we({onDone:e}){let{message:t}=Z(S(e=>e.effortValue),T());return e(t),null}function Te({result:e,onDone:t}){let n=b(),{effortUpdate:r,message:i}=e;return Oe.useEffect(()=>{r&&n(e=>({...e,effortValue:r.value})),t(i)},[n,r,i,t]),null}async function Ee(e,t,n){if(n=n?.trim()||``,ke.includes(n)){e(`Usage: /effort [low|medium|high|xhigh|max|auto]
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,F as r,Rn as i,Vt as a,b as o,nt as s,t as c,x as l}from"./src-KjMLauwe.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,oo as f}from"./paths-4ZWdjPP4.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{Ej as h,Nj as g,Sj as _,Tj as v,bj as y,fC as b,lC as x,uC as S,yj as C}from"./loadAgentsDir-CQF8qhne.js";import{t as w}from"./useKeybinding-DOjEx42R.js";import{n as T,t as E}from"./useMainLoopModel-BZoZdEdj.js";function D(e){return typeof e==`string`&&e!==`ultracode`&&A.includes(e)}function O(e){if(e!=null&&typeof e!=`number`&&D(e))return e}function ee(e){let t=A.indexOf(e);return t<=0?A[0]:A[t-1]}function te(e){let t=A.indexOf(e);return t===-1||t>=A.length-1?A[A.length-1]:A[t+1]}function k(e){return e===`ultracode`}function ne(e){let t=O(e.envOverride);return t===void 0?e.displayed:t}function re(e,t){if(k(e))return{kind:`ultracode-hint`,message:j};let n=t(e);return{kind:`apply`,message:n.message,effortUpdate:n.effortUpdate}}var A,j,M,ie=e((()=>{A=[`low`,`medium`,`high`,`xhigh`,`max`,`ultracode`],j=`ultracode is not an effort level. Use /ultracode <context> to start a multi-agent workflow.`,M=`Effort unchanged.`}));function ae(e){let[t,r]=n(e?N:null);return[t,e?r:0]}var N,oe=e((()=>{c(),N=60}));function se(e){if(!/^#[0-9a-fA-F]{6}$/.test(e))return{h:0,s:0,l:0};let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return{h:0,s:0,l:o};let c=s/(1-Math.abs(2*o-1)),l;return l=i===t?60*((n-r)/s%6):i===n?60*((r-t)/s+2):60*((t-n)/s+4),l<0&&(l+=360),{h:l,s:c,l:o}}function ce(e,t,n){let r=(e%360+360)%360,i=(1-Math.abs(2*n-1))*t,a=r/60,o=i*(1-Math.abs(a%2-1)),s=0,c=0,l=0;a<1?(s=i,c=o):a<2?(s=o,c=i):a<3?(c=i,l=o):a<4?(c=o,l=i):a<5?(s=o,l=i):(s=i,l=o);let u=n-i/2,d=e=>Math.round((e+u)*255).toString(16).padStart(2,`0`);return`#${d(s)}${d(c)}${d(l)}`}function P(e,t){if(!/^#[0-9a-fA-F]{6}$/.test(e)||t===0)return e;let{h:n,s:r,l:i}=se(e);return ce(n+t,r,i)}function F(e){return e*L%360}function le(e,t=0){let n=e<0?0:e>1?1:e,r=I[Math.min(I.length-1,Math.floor(n*I.length))];return t===0?r:P(r,t)}function ue(e){let{y:t,width:n,time:r,sourceX:i,sourceY:a}=e;if(n<=0)return[];let o=F(r),s=Array(n);for(let e=0;e<n;e++){let n=e-i,c=(t-a)*1.5,l=Math.sqrt(n*n+c*c),u=l*.35-r*.004;s[e]={char:z,color:le((Math.sin(u)+1)/2*Math.max(0,1-l/90),o)}}return s}function de(e,t){let n=e.map(e=>({...e}));for(let e of t){let t=e.x;if(!(t>=n.length))for(let r=0;r<e.text.length;r++){let i=t+r;if(!(i<0)){if(i>=n.length)break;n[i]={char:e.text[r],color:e.color??n[i].color}}}}return n}function fe(e){if(e.length===0)return[];let t=[],n={text:e[0].char,color:e[0].color};for(let r=1;r<e.length;r++){let i=e[r];i.color===n.color?n.text+=i.char:(t.push(n),n={text:i.char,color:i.color})}return t.push(n),t}function pe(e,t){if(e===`transparent`)return R;let n=t<0?0:t>1?1:t;if(n<=.01)return R;if(!/^#[0-9a-fA-F]{6}$/.test(e))return e;let r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return`#${Math.round(r*n).toString(16).padStart(2,`0`)}${Math.round(i*n).toString(16).padStart(2,`0`)}${Math.round(a*n).toString(16).padStart(2,`0`)}`}function me(e,t){return e.map(e=>({char:e.char,color:pe(e.color,t)}))}var I,L,R,z,he=e((()=>{I=[`#1a1f3a`,`#1f2543`,`#252c55`,`#2e3870`,`#3a4582`,`#4a5bb0`,`#5769F7`],L=.03,R=`transparent`,z=` `}));function ge(e){let t=e-2;return t<=W*A.length?W:Math.floor(t/A.length)}function _e(e){let t=Math.max(0,Math.floor((e-9)/2));return e*(A.length-1)+t+4}function B(e,t,n){return n*e+Math.max(0,Math.floor((n-t)/2))}function ve({appStateEffort:e,onDone:t}){let n=b(),i=T(),{columns:a}=r(),c=H.useMemo(()=>ge(a),[a]),u=c*A.length,d=H.useMemo(()=>_e(c),[c]),f=y(),p=ne({envOverride:f,appStateEffort:e,displayed:C(i,e)}),[m,h]=H.useState(p),[g,_]=H.useState(!1),v=m===`ultracode`,[x,S]=H.useState(0),w=v||x>.001,[E,D]=ae(w);H.useEffect(()=>{if(!w)return;let e=+!!v;S(t=>{if(t===e)return t;let n=e>t?t+Y:t-Y;return e>t?Math.min(e,n):Math.max(e,n)})},[D,v,w]),s({"effortPanel:decrease":()=>h(e=>ee(e)),"effortPanel:increase":()=>h(e=>te(e)),"effortPanel:home":()=>h(`low`),"effortPanel:end":()=>h(`ultracode`),"effortPanel:confirm":H.useCallback(()=>{if(g)return;_(!0);let e=re(m,Q);e.kind===`apply`&&e.effortUpdate&&n(t=>({...t,effortValue:e.effortUpdate.value})),t(e.message)},[m,g,t,n]),"effortPanel:cancel":H.useCallback(()=>{g||(_(!0),t(M))},[g,t])},{context:`EffortPanel`});let O=f!=null,k=process.env.CLAUDE_CODE_EFFORT_LEVEL,j=H.useCallback((e,t)=>fe(me(de(ue({y:e+X,width:u,time:D,sourceX:d,sourceY:X}),t),x)),[D,x,u,d]);return(0,U.jsxs)(l,{ref:E,flexDirection:`column`,paddingX:1,width:u+2,children:[(0,U.jsx)(o,{bold:!0,color:`suggestion`,children:`Effort`}),O&&(0,U.jsx)(o,{color:`warning`,children:`⚠ CLAUDE_CODE_EFFORT_LEVEL=${k} overrides this session`}),w?(0,U.jsx)(be,{renderRow:j,cursor:m,fade:x,segment:c,panelWidth:u,time:D}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye,{cursor:m,segment:c,panelWidth:u}),(0,U.jsx)(l,{marginTop:1,children:(0,U.jsx)(o,{color:`subtle`,children:`←/→ adjust · Enter confirm · Esc cancel`})})]})]})}function ye({cursor:e,segment:t,panelWidth:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(l,{marginTop:1,flexDirection:`row`,justifyContent:`space-between`,children:[(0,U.jsx)(o,{color:`suggestion`,children:`Faster`}),(0,U.jsx)(o,{color:`suggestion`,children:`Smarter`})]}),(0,U.jsx)(o,{color:`subtle`,children:`─`.repeat(n)}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:!0,color:e===n?`suggestion`:`subtle`,children:e===n?`▲`:` `})},`cursor-${n}`))}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:e===n,color:e===n?`suggestion`:`subtle`,children:n})},`label-${n}`))}),(0,U.jsxs)(l,{flexDirection:`row`,children:[(0,U.jsx)(l,{width:t*(A.length-1)}),(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{color:`subtle`,children:G})})]})]})}function be({renderRow:e,cursor:t,segment:n,panelWidth:r,time:i}){let a=A.indexOf(t),s=A.length-1,c=F(i),l=P(J,c),u=P(K,c),d=P(q,c),f={text:`Faster`,x:0,color:l},p={text:`Smarter`,x:r-7,color:l},m={text:`─`.repeat(r),x:0,color:d},h={text:`▲`,x:B(a,1,n),color:l},g=A.map((e,r)=>({text:e,x:B(r,e.length,n),color:e===t?u:d})),_={text:G,x:B(s,17,n),color:d};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(V,{segments:e(-4,[])}),(0,U.jsx)(V,{segments:e(-3,[f,p])}),(0,U.jsx)(V,{segments:e(-2,[m])}),(0,U.jsx)(V,{segments:e(-1,[h])}),(0,U.jsx)(V,{segments:e(0,g)}),(0,U.jsx)(V,{segments:e(1,[_])}),(0,U.jsx)(V,{segments:e(2,[])}),(0,U.jsx)(o,{color:q,children:`←/→ adjust · Enter confirm · Esc cancel`})]})}function V({segments:e}){let t=[];for(let n of e){let e=``,r=null,i=()=>{e===``||r===null||(t.push({text:e,kind:r?`space`:`text`,color:n.color}),e=``,r=null)};for(let t of n.text){let n=t===` `;r===null?(e=t,r=n):n===r?e+=t:(i(),e=t,r=n)}i()}return(0,U.jsx)(l,{flexDirection:`row`,children:t.map((e,t)=>e.kind===`space`?e.color===`transparent`?(0,U.jsx)(a,{children:e.text},t):(0,U.jsx)(a,{backgroundColor:e.color,children:e.text},t):(0,U.jsx)(o,{color:e.color,bold:!0,children:e.text},t))})}var H,U,W,G,K,q,J,Y,X,xe=e((()=>{H=t(i(),1),c(),w(),v(),ie(),Ae(),E(),x(),oe(),he(),U=u(),W=12,G=`xhigh + workflows`,K=`#5769F7`,q=`#7a8eff`,J=`#5769F7`,Y=.2,X=0}));function Se(e){let t=g(e);if(t!==void 0){let e=d(`userSettings`,{effortLevel:t});if(e.error)return{message:`Failed to set effort level: ${e.error.message}`}}m(`tengu_effort_command`,{effort:e});let n=y();if(n!==void 0&&n!==e){let n=process.env.CLAUDE_CODE_EFFORT_LEVEL;return t===void 0?{message:`Not applied: CLAUDE_CODE_EFFORT_LEVEL=${n} overrides effort this session, and ${e} is session-only (nothing saved)`,effortUpdate:{value:e}}:{message:`CLAUDE_CODE_EFFORT_LEVEL=${n} overrides this session — clear it and ${e} takes over`,effortUpdate:{value:e}}}let r=_(e);return{message:`Set effort level to ${e}${t===void 0?` (this session only)`:``}: ${r}`,effortUpdate:{value:e}}}function Z(e,t){let n=y(),r=n===null?void 0:n??e;return r===void 0?{message:`Effort level: auto (currently ${C(t,e)})`}:{message:`Current effort level: ${r} (${_(r)})`}}function Ce(){let e=d(`userSettings`,{effortLevel:void 0});return e.error?{message:`Failed to set effort level: ${e.error.message}`}:(m(`tengu_effort_command`,{effort:`auto`}),y()==null?{message:`Effort level set to auto`,effortUpdate:{value:void 0}}:{message:`Cleared effort from settings, but CLAUDE_CODE_EFFORT_LEVEL=${process.env.CLAUDE_CODE_EFFORT_LEVEL} still controls this session`,effortUpdate:{value:void 0}})}function Q(e){let t=e.toLowerCase();return t===`auto`||t===`unset`?Ce():h(t)?Se(t):{message:`Invalid argument: ${e}. Valid options are: low, medium, high, max, auto`}}function we({onDone:e}){let{message:t}=Z(S(e=>e.effortValue),T());return e(t),null}function Te({result:e,onDone:t}){let n=b(),{effortUpdate:r,message:i}=e;return Oe.useEffect(()=>{r&&n(e=>({...e,effortValue:r.value})),t(i)},[n,r,i,t]),null}async function Ee(e,t,n){if(n=n?.trim()||``,ke.includes(n)){e(`Usage: /effort [low|medium|high|xhigh|max|auto]
2
2
 
3
3
  Effort levels:
4
4
  - low: Quick, straightforward implementation
@@ -0,0 +1,14 @@
1
+ import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{a as n,c as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./classPrivateFieldSet2-EAQNhHs8.js";import{Cn as f,Ln as p,Mn as m,Tt as h,Xn as g,Yn as _,_r as ee,kt as v,nn as y,un as b,vt as te,wn as x}from"./schemas-BGAvj1T4.js";import{t as ne}from"./v4-f1i_CNUT.js";import{Tt as re,cn as S,jr as C,lr as ie,ot as ae}from"./state-sIHsFpDu.js";import{Dr as oe,Pr as se,no as ce,oc as le,oo as ue,yc as de}from"./paths-4ZWdjPP4.js";import{l as fe,p as pe,r as me}from"./sessionStoragePortable-CJUZrbIq.js";import{Bf as he,Ep as ge,Fr as _e,G as ve,Jv as ye,K as be,Sr as xe,Ta as Se,Tp as Ce,Xu as we,Zi as Te,Zu as Ee,bD as De,i as Oe,na as ke,o as Ae,qv as je,wa as Me,yD as Ne,zf as Pe}from"./loadAgentsDir-CQF8qhne.js";import{Qn as Fe,Zn as Ie}from"./prompt-CogZQuTN.js";import{o as Le,t as Re}from"./fileStateCache-BhVfo23e.js";import{t as ze}from"./QueryEngine-CmJK27jU.js";import*as w from"node:path";import{dirname as Be,isAbsolute as Ve,resolve as He}from"node:path";import{randomUUID as T}from"node:crypto";import{Readable as Ue,Writable as We}from"node:stream";import{unlink as Ge}from"node:fs/promises";ne();var E={authenticate:`authenticate`,document_did_change:`document/didChange`,document_did_close:`document/didClose`,document_did_focus:`document/didFocus`,document_did_open:`document/didOpen`,document_did_save:`document/didSave`,initialize:`initialize`,logout:`logout`,nes_accept:`nes/accept`,nes_close:`nes/close`,nes_reject:`nes/reject`,nes_start:`nes/start`,nes_suggest:`nes/suggest`,session_cancel:`session/cancel`,session_close:`session/close`,session_fork:`session/fork`,session_list:`session/list`,session_load:`session/load`,session_new:`session/new`,session_prompt:`session/prompt`,session_resume:`session/resume`,session_set_config_option:`session/set_config_option`,session_set_mode:`session/set_mode`,session_set_model:`session/set_model`},D={elicitation_complete:`elicitation/complete`,elicitation_create:`elicitation/create`,fs_read_text_file:`fs/read_text_file`,fs_write_text_file:`fs/write_text_file`,session_request_permission:`session/request_permission`,session_update:`session/update`,terminal_create:`terminal/create`,terminal_kill:`terminal/kill`,terminal_output:`terminal/output`,terminal_release:`terminal/release`,terminal_wait_for_exit:`terminal/wait_for_exit`},Ke=x({_meta:m(p(),g()).nullish(),terminal:v().optional().default(!1)}),qe=x({_meta:m(p(),g()).nullish(),label:p().nullish(),name:p(),optional:v().optional().default(!1),secret:v().optional().default(!0)}),Je=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),name:p()}),Ye=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),link:p().nullish(),name:p(),vars:h(qe)}),Xe=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),description:p().nullish(),env:m(p(),p()).optional(),id:p(),name:p()}),Ze=_([Ye.and(x({type:b(`env_var`)})),Xe.and(x({type:b(`terminal`)})),Je]),Qe=x({_meta:m(p(),g()).nullish(),methodId:p()}),$e=x({_meta:m(p(),g()).nullish()}),et=x({_meta:m(p(),g()).nullish(),blob:p(),mimeType:p().nullish(),uri:p()}),tt=x({default:v().nullish(),description:p().nullish(),title:p().nullish()}),nt=x({_meta:m(p(),g()).nullish()}),rt=x({_meta:m(p(),g()).nullish()}),it=x({amount:f(),currency:p()}),at=x({_meta:m(p(),g()).nullish(),terminalId:p()}),ot=x({_meta:m(p(),g()).nullish(),newText:p(),oldText:p().nullish(),path:p()}),st=_([p(),f(),f(),v(),h(p())]),ct=y(_([x({content:m(p(),st).nullish()}).and(x({action:b(`accept`)})),x({action:b(`decline`)}),x({action:b(`cancel`)})]),x({_meta:m(p(),g()).nullish()})),lt=x({_meta:m(p(),g()).nullish()}),ut=p(),dt=x({_meta:m(p(),g()).nullish(),elicitationId:ut}),ft=b(`object`),pt=b(`string`),mt=x({_meta:m(p(),g()).nullish()}),ht=x({_meta:m(p(),g()).nullish(),form:lt.nullish(),url:mt.nullish()}),gt=x({const:p(),title:p()}),_t=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),vt=x({code:_([b(-32700),b(-32600),b(-32601),b(-32602),b(-32603),b(-32800),b(-32e3),b(-32002),b(-32042),f().int().min(-2147483648,{message:`Invalid value: Expected int32 to be >= -2147483648`}).max(2147483647,{message:`Invalid value: Expected int32 to be <= 2147483647`})]),data:g().optional(),message:p()}),yt=g(),bt=g(),xt=g(),St=x({_meta:m(p(),g()).nullish(),readTextFile:v().optional().default(!1),writeTextFile:v().optional().default(!1)}),Ct=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),wt=x({_meta:m(p(),g()).nullish(),name:p(),title:p().nullish(),version:p()}),Tt=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),Et=x({_meta:m(p(),g()).nullish()}),Dt=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cursor:p().nullish(),cwd:p().nullish()}),Ot=x({_meta:m(p(),g()).nullish()}),kt=x({_meta:m(p(),g()).nullish(),logout:Ot.nullish()}),At=x({_meta:m(p(),g()).nullish()}),jt=x({_meta:m(p(),g()).nullish()}),Mt=x({_meta:m(p(),g()).nullish(),http:v().optional().default(!1),sse:v().optional().default(!1)}),Nt=x({_meta:m(p(),g()).nullish(),headers:h(Ct),name:p(),url:p()}),Pt=x({_meta:m(p(),g()).nullish(),headers:h(Ct),name:p(),url:p()}),Ft=x({_meta:m(p(),g()).nullish(),args:h(p()),command:p(),env:h(_t),name:p()}),O=_([Nt.and(x({type:b(`http`)})),Pt.and(x({type:b(`sse`)})),Ft]),It=p(),Lt=x({_meta:m(p(),g()).nullish(),description:p().nullish(),modelId:It,name:p()}),Rt=_([b(`error`),b(`warning`),b(`information`),b(`hint`)]),zt=x({_meta:m(p(),g()).nullish()}),Bt=x({_meta:m(p(),g()).nullish()}),Vt=x({_meta:m(p(),g()).nullish()}),Ht=x({_meta:m(p(),g()).nullish()}),Ut=x({_meta:m(p(),g()).nullish()}),Wt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Gt=x({diff:p(),uri:p()}),Kt=x({endLine:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),startLine:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),text:p()}),qt=x({_meta:m(p(),g()).nullish()}),Jt=x({_meta:m(p(),g()).nullish()}),Yt=x({languageId:p(),text:p(),uri:p()}),Xt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Zt=_([b(`rejected`),b(`ignored`),b(`replaced`),b(`cancelled`)]),Qt=x({excerpts:h(Kt),uri:p()}),$t=x({_meta:m(p(),g()).nullish()}),en=x({_meta:m(p(),g()).nullish()}),tn=x({name:p(),owner:p(),remoteUrl:p()}),nn=x({_meta:m(p(),g()).nullish()}),rn=x({_meta:m(p(),g()).nullish(),jump:qt.nullish(),rename:en.nullish(),searchAndReplace:nn.nullish()}),an=x({id:p(),isRegex:v().nullish(),replace:p(),search:p(),uri:p()}),on=_([b(`automatic`),b(`diagnostic`),b(`manual`)]),sn=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),cn=x({_meta:m(p(),g()).nullish(),diagnostics:zt.nullish(),editHistory:Wt.nullish(),openFiles:Jt.nullish(),recentFiles:Xt.nullish(),relatedSnippets:$t.nullish(),userActions:sn.nullish()}),ln=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O)}),un=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),dn=p(),fn=_([b(`allow_once`),b(`allow_always`),b(`reject_once`),b(`reject_always`)]),pn=x({_meta:m(p(),g()).nullish(),kind:fn,name:p(),optionId:dn}),mn=_([b(`high`),b(`medium`),b(`low`)]),hn=_([b(`pending`),b(`in_progress`),b(`completed`)]),gn=x({_meta:m(p(),g()).nullish(),content:p(),priority:mn,status:hn}),_n=x({_meta:m(p(),g()).nullish(),entries:h(gn)}),k=x({character:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`})}),vn=x({id:p(),position:k,uri:p()}),yn=x({id:p(),newName:p(),position:k,uri:p()}),bn=x({action:p(),position:k,timestampMs:f(),uri:p()}),xn=_([b(`utf-16`),b(`utf-32`),b(`utf-8`)]),Sn=x({_meta:m(p(),g()).nullish(),auth:Ke.optional().default({terminal:!1}),elicitation:ht.nullish(),fs:St.optional().default({readTextFile:!1,writeTextFile:!1}),nes:rn.nullish(),positionEncodings:h(xn).optional(),terminal:v().optional().default(!1)}),Cn=x({_meta:m(p(),g()).nullish(),audio:v().optional().default(!1),embeddedContext:v().optional().default(!1),image:v().optional().default(!1)}),wn=f().int().gte(0).lte(65535),Tn=x({_meta:m(p(),g()).nullish(),clientCapabilities:Sn.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:wt.nullish(),protocolVersion:wn}),A=x({end:k,start:k}),En=x({message:p(),range:A,severity:Rt,uri:p()}),Dn=x({languageId:p(),lastFocusedMs:f().nullish(),uri:p(),visibleRange:A.nullish()}),On=x({_meta:m(p(),g()).nullish(),diagnostics:h(En).nullish(),editHistory:h(Gt).nullish(),openFiles:h(Dn).nullish(),recentFiles:h(Yt).nullish(),relatedSnippets:h(Qt).nullish(),userActions:h(bn).nullish()}),kn=x({newText:p(),range:A}),An=_([x({cursorPosition:k.nullish(),edits:h(kn),id:p(),uri:p()}).and(x({kind:b(`edit`)})),vn.and(x({kind:b(`jump`)})),yn.and(x({kind:b(`rename`)})),an.and(x({kind:b(`searchAndReplace`)}))]),jn=x({_meta:m(p(),g()).nullish(),content:p()}),Mn=x({_meta:m(p(),g()).nullish()}),j=_([f(),p()]).nullable();x({_meta:m(p(),g()).nullish(),requestId:j});var Nn=x({requestId:j}),Pn=te([`assistant`,`user`]),M=x({_meta:m(p(),g()).nullish(),audience:h(Pn).nullish(),lastModified:p().nullish(),priority:f().nullish()}),Fn=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p()}),In=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p(),uri:p().nullish()}),Ln=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),description:p().nullish(),mimeType:p().nullish(),name:p(),size:f().nullish(),title:p().nullish(),uri:p()}),Rn=x({_meta:m(p(),g()).nullish(),optionId:dn}),zn=_([x({outcome:b(`cancelled`)}),Rn.and(x({outcome:b(`selected`)}))]),Bn=x({_meta:m(p(),g()).nullish(),outcome:zn}),Vn=x({_meta:m(p(),g()).nullish()}),Hn=x({_meta:m(p(),g()).nullish()}),Un=x({currentValue:v()}),Wn=p(),Gn=p(),Kn=_([b(`mode`),b(`model`),b(`thought_level`),p()]),qn=p(),Jn=x({_meta:m(p(),g()).nullish(),description:p().nullish(),name:p(),value:qn}),Yn=x({_meta:m(p(),g()).nullish(),group:Wn,name:p(),options:h(Jn)}),N=y(_([x({currentValue:qn,options:_([h(Jn),h(Yn)])}).and(x({type:b(`select`)})),Un.and(x({type:b(`boolean`)}))]),x({_meta:m(p(),g()).nullish(),category:Kn.nullish(),description:p().nullish(),id:Gn,name:p()})),Xn=x({_meta:m(p(),g()).nullish(),configOptions:h(N)}),Zn=x({_meta:m(p(),g()).nullish()}),P=p(),Qn=x({_meta:m(p(),g()).nullish(),id:p(),sessionId:P}),$n=x({_meta:m(p(),g()).nullish(),sessionId:P}),er=x({_meta:m(p(),g()).nullish(),sessionId:P}),tr=x({_meta:m(p(),g()).nullish(),sessionId:P}),nr=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),command:p(),cwd:p().nullish(),env:h(_t).optional(),outputByteLimit:f().nullish(),sessionId:P}),rr=x({_meta:m(p(),g()).nullish(),sessionId:P,uri:p()}),ir=x({_meta:m(p(),g()).nullish(),position:k,sessionId:P,uri:p(),version:f(),visibleRange:A}),ar=x({_meta:m(p(),g()).nullish(),languageId:p(),sessionId:P,text:p(),uri:p(),version:f()}),or=x({_meta:m(p(),g()).nullish(),sessionId:P,uri:p()}),sr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O).optional(),sessionId:P}),cr=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),lr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O),sessionId:P}),ur=x({_meta:m(p(),g()).nullish(),limit:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p(),sessionId:P}),dr=x({_meta:m(p(),g()).nullish(),id:p(),reason:Zt.nullish(),sessionId:P}),fr=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),pr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O).optional(),sessionId:P}),mr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),sessionId:P,title:p().nullish(),updatedAt:p().nullish()}),hr=x({_meta:m(p(),g()).nullish(),nextCursor:p().nullish(),sessions:h(mr)}),gr=x({_meta:m(p(),g()).nullish(),title:p().nullish(),updatedAt:p().nullish()}),_r=x({_meta:m(p(),g()).nullish()}),F=p(),vr=x({_meta:m(p(),g()).nullish(),currentModeId:F}),yr=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:F,name:p()}),I=x({_meta:m(p(),g()).nullish(),availableModes:h(yr),currentModeId:F}),L=x({_meta:m(p(),g()).nullish(),availableModels:h(Lt),currentModelId:It}),br=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish(),sessionId:P}),xr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish()}),Sr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish(),sessionId:P}),Cr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish()}),wr=x({_meta:m(p(),g()).nullish()}),Tr=x({_meta:m(p(),g()).nullish(),additionalDirectories:Vn.nullish(),close:Hn.nullish(),fork:Zn.nullish(),list:_r.nullish(),resume:wr.nullish()}),Er=y(_([x({type:b(`boolean`),value:v()}),x({value:qn})]),x({_meta:m(p(),g()).nullish(),configId:Gn,sessionId:P})),Dr=x({_meta:m(p(),g()).nullish(),configOptions:h(N)}),Or=x({_meta:m(p(),g()).nullish(),modeId:F,sessionId:P}),kr=x({_meta:m(p(),g()).nullish()}),Ar=x({_meta:m(p(),g()).nullish(),modelId:It,sessionId:P}),jr=x({_meta:m(p(),g()).nullish()}),Mr=x({_meta:m(p(),g()).nullish(),sessionId:P}),Nr=_([b(`end_turn`),b(`max_tokens`),b(`max_turn_requests`),b(`refusal`),b(`cancelled`)]),Pr=_([b(`email`),b(`uri`),b(`date`),b(`date-time`)]),Fr=x({default:p().nullish(),description:p().nullish(),enum:h(p()).nullish(),format:Pr.nullish(),maxLength:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),minLength:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),oneOf:h(gt).nullish(),pattern:p().nullish(),title:p().nullish()}),Ir=x({_meta:m(p(),g()).nullish(),context:On.nullish(),position:k,selection:A.nullish(),sessionId:P,triggerKind:on,uri:p(),version:f()}),Lr=x({_meta:m(p(),g()).nullish(),suggestions:h(An)}),Rr=x({_meta:m(p(),g()).nullish(),terminalId:p()}),zr=x({_meta:m(p(),g()).nullish(),exitCode:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:p().nullish()}),Br=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),Vr=x({_meta:m(p(),g()).nullish(),exitStatus:zr.nullish(),output:p(),truncated:v()}),Hr=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),text:p()}),Ur=x({range:A.nullish(),text:p()}),Wr=x({_meta:m(p(),g()).nullish(),contentChanges:h(Ur),sessionId:P,uri:p(),version:f()});x({method:p(),params:_([$n,ar,Wr,rr,or,ir,Qn,dr,yt]).nullish()});var Gr=_([b(`full`),b(`incremental`)]),Kr=x({_meta:m(p(),g()).nullish(),syncKind:Gr}),qr=x({_meta:m(p(),g()).nullish(),didChange:Kr.nullish(),didClose:Bt.nullish(),didFocus:Vt.nullish(),didOpen:Ht.nullish(),didSave:Ut.nullish()}),Jr=x({_meta:m(p(),g()).nullish(),document:qr.nullish()}),Yr=x({_meta:m(p(),g()).nullish(),context:cn.nullish(),events:Jr.nullish()}),Xr=x({_meta:m(p(),g()).nullish(),auth:kt.optional().default({}),loadSession:v().optional().default(!1),mcpCapabilities:Mt.optional().default({http:!1,sse:!1}),nes:Yr.nullish(),positionEncoding:xn.nullish(),promptCapabilities:Cn.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Tr.optional().default({})}),Zr=x({_meta:m(p(),g()).nullish(),agentCapabilities:Xr.optional().default({auth:{},loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:wt.nullish(),authMethods:h(Ze).optional().default([]),protocolVersion:wn}),Qr=_([x({_meta:m(p(),g()).nullish(),mimeType:p().nullish(),text:p(),uri:p()}),et]),$r=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),resource:Qr}),ei=_([Hr.and(x({type:b(`text`)})),In.and(x({type:b(`image`)})),Fn.and(x({type:b(`audio`)})),Ln.and(x({type:b(`resource_link`)})),$r.and(x({type:b(`resource`)}))]),ti=x({_meta:m(p(),g()).nullish(),content:ei}),ni=x({_meta:m(p(),g()).nullish(),content:ei,messageId:p().nullish()}),ri=x({_meta:m(p(),g()).nullish(),messageId:p().nullish(),prompt:h(ei),sessionId:P}),ii=x({anyOf:h(gt)}),ai=_([ti.and(x({type:b(`content`)})),ot.and(x({type:b(`diff`)})),Rr.and(x({type:b(`terminal`)}))]),oi=p(),si=x({sessionId:P,toolCallId:oi.nullish()}),ci=y(_([si,Nn]),x({elicitationId:ut,url:p().url()})),li=x({_meta:m(p(),g()).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p()}),ui=_([b(`pending`),b(`in_progress`),b(`completed`),b(`failed`)]),di=_([b(`read`),b(`edit`),b(`delete`),b(`move`),b(`search`),b(`execute`),b(`think`),b(`fetch`),b(`switch_mode`),b(`other`)]),fi=x({_meta:m(p(),g()).nullish(),content:h(ai).optional(),kind:di.optional(),locations:h(li).optional(),rawInput:g().optional(),rawOutput:g().optional(),status:ui.optional(),title:p(),toolCallId:oi}),pi=x({_meta:m(p(),g()).nullish(),content:h(ai).nullish(),kind:di.nullish(),locations:h(li).nullish(),rawInput:g().optional(),rawOutput:g().optional(),status:ui.nullish(),title:p().nullish(),toolCallId:oi}),mi=x({_meta:m(p(),g()).nullish(),options:h(pn),sessionId:P,toolCall:pi}),hi=x({_meta:m(p(),g()).nullish(),hint:p()}),gi=x({_meta:m(p(),g()).nullish(),description:p(),input:hi.nullish(),name:p()}),_i=x({_meta:m(p(),g()).nullish(),availableCommands:h(gi)}),vi=_([x({enum:h(p()),type:pt}),ii]),yi=x({default:h(p()).nullish(),description:p().nullish(),items:vi,maxItems:f().nullish(),minItems:f().nullish(),title:p().nullish()}),bi=_([Fr.and(x({type:b(`string`)})),un.and(x({type:b(`number`)})),Tt.and(x({type:b(`integer`)})),tt.and(x({type:b(`boolean`)})),yi.and(x({type:b(`array`)}))]),xi=x({description:p().nullish(),properties:m(p(),bi).optional().default({}),required:h(p()).nullish(),title:p().nullish(),type:ft.optional().default(`object`)}),Si=y(_([y(_([si,Nn]),x({requestedSchema:xi})).and(x({mode:b(`form`)})),ci.and(x({mode:b(`url`)}))]),x({_meta:m(p(),g()).nullish(),message:p()})),Ci=x({cachedReadTokens:f().nullish(),cachedWriteTokens:f().nullish(),inputTokens:f(),outputTokens:f(),thoughtTokens:f().nullish(),totalTokens:f()});_([x({id:j,result:_([Zr,$e,jt,Sr,xr,hr,br,Cr,rt,kr,Dr,x({_meta:m(p(),g()).nullish(),stopReason:Nr,usage:Ci.nullish(),userMessageId:p().nullish()}),jr,Mr,Lr,nt,xt])}),x({error:vt,id:j})]);var wi=x({_meta:m(p(),g()).nullish(),cost:it.nullish(),size:f(),used:f()}),Ti=_([ni.and(x({sessionUpdate:b(`user_message_chunk`)})),ni.and(x({sessionUpdate:b(`agent_message_chunk`)})),ni.and(x({sessionUpdate:b(`agent_thought_chunk`)})),fi.and(x({sessionUpdate:b(`tool_call`)})),pi.and(x({sessionUpdate:b(`tool_call_update`)})),_n.and(x({sessionUpdate:b(`plan`)})),_i.and(x({sessionUpdate:b(`available_commands_update`)})),vr.and(x({sessionUpdate:b(`current_mode_update`)})),Xn.and(x({sessionUpdate:b(`config_option_update`)})),gr.and(x({sessionUpdate:b(`session_info_update`)})),wi.and(x({sessionUpdate:b(`usage_update`)}))]),Ei=x({_meta:m(p(),g()).nullish(),sessionId:P,update:Ti});x({method:p(),params:_([Ei,dt,yt]).nullish()});var Di=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),Oi=x({_meta:m(p(),g()).nullish(),exitCode:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:p().nullish()}),ki=x({name:p(),uri:p()}),Ai=x({_meta:m(p(),g()).nullish(),repository:tn.nullish(),workspaceFolders:h(ki).nullish(),workspaceUri:p().nullish()});x({id:j,method:p(),params:_([Tn,Qe,At,ln,lr,Dt,sr,pr,tr,Or,Er,ri,Ar,Ai,Ir,er,bt]).nullish()});var ji=x({_meta:m(p(),g()).nullish(),content:p(),path:p(),sessionId:P});x({id:j,method:p(),params:_([ji,ur,mi,nr,Br,fr,Di,cr,Si,bt]).nullish()}),_([x({id:j,result:_([x({_meta:m(p(),g()).nullish()}),jn,Bn,at,Vr,Mn,Oi,Et,ct,xt])}),x({error:vt,id:j})]),e(),d(),r(),s(),i(),o();function Mi(e,t){let n=new TextEncoder,r=new TextDecoder;return{readable:new ReadableStream({async start(e){let n=``,i=t.getReader();try{for(;;){let{value:t,done:a}=await i.read();if(a)break;if(!t)continue;n+=r.decode(t,{stream:!0});let o=n.split(`
2
+ `);n=o.pop()||``;for(let t of o){let n=t.trim();if(n)try{let t=JSON.parse(n);e.enqueue(t)}catch(e){console.error(`Failed to parse JSON message:`,n,e)}}}}catch(t){e.error(t);return}finally{i.releaseLock()}e.close()}}),writable:new WritableStream({async write(t){let r=JSON.stringify(t)+`
3
+ `,i=e.getWriter();try{await i.write(n.encode(r))}finally{i.releaseLock()}}})}}ne();var Ni,R=new WeakMap,Pi=class{constructor(e,t){l(this,R,void 0);let n=e(this);u(R,this,new Bi(async(e,t)=>{switch(e){case E.initialize:{let e=Tn.parse(t);return n.initialize(e)}case E.session_new:{let e=ln.parse(t);return n.newSession(e)}case E.session_load:{if(!n.loadSession)throw q.methodNotFound(e);let r=lr.parse(t);return n.loadSession(r)}case E.session_list:{if(!n.listSessions)throw q.methodNotFound(e);let r=Dt.parse(t);return n.listSessions(r)}case E.session_fork:{if(!n.unstable_forkSession)throw q.methodNotFound(e);let r=sr.parse(t);return n.unstable_forkSession(r)}case E.session_resume:{if(!n.unstable_resumeSession)throw q.methodNotFound(e);let r=pr.parse(t);return n.unstable_resumeSession(r)}case E.session_close:{if(!n.unstable_closeSession)throw q.methodNotFound(e);let r=tr.parse(t);return n.unstable_closeSession(r)}case E.session_set_mode:{if(!n.setSessionMode)throw q.methodNotFound(e);let r=Or.parse(t);return await n.setSessionMode(r)??{}}case E.authenticate:{let e=Qe.parse(t);return await n.authenticate(e)??{}}case E.logout:{if(!n.unstable_logout)throw q.methodNotFound(e);let r=At.parse(t);return await n.unstable_logout(r)??{}}case E.session_prompt:{let e=ri.parse(t);return n.prompt(e)}case E.session_set_model:{if(!n.unstable_setSessionModel)throw q.methodNotFound(e);let r=Ar.parse(t);return await n.unstable_setSessionModel(r)??{}}case E.session_set_config_option:{if(!n.setSessionConfigOption)throw q.methodNotFound(e);let r=Er.parse(t);return n.setSessionConfigOption(r)}case E.nes_start:{if(!n.unstable_startNes)throw q.methodNotFound(e);let r=Ai.parse(t);return n.unstable_startNes(r)}case E.nes_suggest:{if(!n.unstable_suggestNes)throw q.methodNotFound(e);let r=Ir.parse(t);return n.unstable_suggestNes(r)}case E.nes_close:{if(!n.unstable_closeNes)throw q.methodNotFound(e);let r=er.parse(t);return await n.unstable_closeNes(r)??{}}default:if(n.extMethod)return n.extMethod(e,t);throw q.methodNotFound(e)}},async(e,t)=>{switch(e){case E.session_cancel:{let e=$n.parse(t);return n.cancel(e)}case E.document_did_open:{if(!n.unstable_didOpenDocument)return;let e=ar.parse(t);return n.unstable_didOpenDocument(e)}case E.document_did_change:{if(!n.unstable_didChangeDocument)return;let e=Wr.parse(t);return n.unstable_didChangeDocument(e)}case E.document_did_close:{if(!n.unstable_didCloseDocument)return;let e=rr.parse(t);return n.unstable_didCloseDocument(e)}case E.document_did_save:{if(!n.unstable_didSaveDocument)return;let e=or.parse(t);return n.unstable_didSaveDocument(e)}case E.document_did_focus:{if(!n.unstable_didFocusDocument)return;let e=ir.parse(t);return n.unstable_didFocusDocument(e)}case E.nes_accept:{if(!n.unstable_acceptNes)return;let e=Qn.parse(t);return n.unstable_acceptNes(e)}case E.nes_reject:{if(!n.unstable_rejectNes)return;let e=dr.parse(t);return n.unstable_rejectNes(e)}default:if(n.extNotification)return n.extNotification(e,t);throw q.methodNotFound(e)}},t))}async sessionUpdate(e){return await c(R,this).sendNotification(D.session_update,e)}async requestPermission(e){return await c(R,this).sendRequest(D.session_request_permission,e)}async readTextFile(e){return await c(R,this).sendRequest(D.fs_read_text_file,e)}async writeTextFile(e){return await c(R,this).sendRequest(D.fs_write_text_file,e)??{}}async createTerminal(e){return new Fi((await c(R,this).sendRequest(D.terminal_create,e)).terminalId,e.sessionId,c(R,this))}async unstable_createElicitation(e){return await c(R,this).sendRequest(D.elicitation_create,e)}async unstable_completeElicitation(e){return await c(R,this).sendNotification(D.elicitation_complete,e)}async extMethod(e,t){return await c(R,this).sendRequest(e,t)}async extNotification(e,t){return await c(R,this).sendNotification(e,t)}get signal(){return c(R,this).signal}get closed(){return c(R,this).closed}},z=new WeakMap,B=new WeakMap;Ni=Symbol.asyncDispose;var Fi=class{constructor(e,n,r){t(this,`id`,void 0),l(this,z,void 0),l(this,B,void 0),this.id=e,u(z,this,n),u(B,this,r)}async currentOutput(){return await c(B,this).sendRequest(D.terminal_output,{sessionId:c(z,this),terminalId:this.id})}async waitForExit(){return await c(B,this).sendRequest(D.terminal_wait_for_exit,{sessionId:c(z,this),terminalId:this.id})}async kill(){return await c(B,this).sendRequest(D.terminal_kill,{sessionId:c(z,this),terminalId:this.id})??{}}async release(){return await c(B,this).sendRequest(D.terminal_release,{sessionId:c(z,this),terminalId:this.id})??{}}async[Ni](){await this.release()}},V=new WeakMap,Ii=new WeakMap,Li=new WeakMap,Ri=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,zi=new WeakMap,G=new WeakSet,Bi=class{constructor(e,t,r){a(this,G),l(this,V,new Map),l(this,Ii,0),l(this,Li,void 0),l(this,Ri,void 0),l(this,H,void 0),l(this,U,Promise.resolve()),l(this,W,new AbortController),l(this,zi,void 0),u(Li,this,e),u(Ri,this,t),u(H,this,r),u(zi,this,new Promise(e=>{c(W,this).signal.addEventListener(`abort`,()=>e())})),n(G,this,Vi).call(this)}get signal(){return c(W,this).signal}get closed(){return c(zi,this)}async sendRequest(e,t){var r,i;n(G,this,qi).call(this);let a=(u(Ii,this,(r=c(Ii,this),i=r++,r)),i),o=new Promise((e,t)=>{c(V,this).set(a,{resolve:e,reject:t})});return await n(G,this,K).call(this,{jsonrpc:`2.0`,id:a,method:e,params:t}),o}async sendNotification(e,t){n(G,this,qi).call(this),await n(G,this,K).call(this,{jsonrpc:`2.0`,method:e,params:t})}};async function Vi(){let e;try{let e=c(H,this).readable.getReader();try{for(;!c(W,this).signal.aborted;){let{value:t,done:r}=await e.read();if(r)break;if(t)try{n(G,this,Ui).call(this,t)}catch(e){console.error(`Unexpected error during message processing:`,t,e),`id`in t&&t.id!==void 0&&n(G,this,K).call(this,{jsonrpc:`2.0`,id:t.id,error:{code:-32700,message:`Parse error`}})}}}finally{e.releaseLock()}}catch(t){e=t}finally{n(G,this,Hi).call(this,e)}}function Hi(e){if(c(W,this).signal.aborted)return;let t=e??Error(`ACP connection closed`);for(let e of c(V,this).values())e.reject(t);c(V,this).clear(),c(W,this).abort(t)}async function Ui(e){if(`method`in e&&`id`in e){let t=await n(G,this,Wi).call(this,e.method,e.params);`error`in t&&console.error(`Error handling request`,e,t.error),await n(G,this,K).call(this,{jsonrpc:`2.0`,id:e.id,...t})}else if(`method`in e){let t=await n(G,this,Gi).call(this,e.method,e.params);`error`in t&&console.error(`Error handling notification`,e,t.error)}else `id`in e?n(G,this,Ki).call(this,e):console.error(`Invalid message`,{message:e})}async function Wi(e,t){try{return{result:await c(Li,this).call(this,e,t)??null}}catch(e){if(e instanceof q)return e.toResult();if(e instanceof ee)return q.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return q.internalError(t?JSON.parse(t):{}).toResult()}catch{return q.internalError({details:t}).toResult()}}}async function Gi(e,t){try{return await c(Ri,this).call(this,e,t),{result:null}}catch(e){if(e instanceof q)return e.toResult();if(e instanceof ee)return q.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return q.internalError(t?JSON.parse(t):{}).toResult()}catch{return q.internalError({details:t}).toResult()}}}function Ki(e){let t=c(V,this).get(e.id);if(t){if(`result`in e)t.resolve(e.result);else if(`error`in e){let{code:n,message:r,data:i}=e.error;t.reject(new q(n,r,i))}c(V,this).delete(e.id)}else console.error(`Got response to unknown request`,e.id)}function qi(){if(c(W,this).signal.aborted)throw c(W,this).signal.reason??Error(`ACP connection closed`)}async function K(e){return u(U,this,c(U,this).then(async()=>{let t=c(H,this).writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(e=>{n(G,this,Hi).call(this,e)})),c(U,this)}var q=class e extends Error{constructor(e,n,r){super(n),t(this,`code`,void 0),t(this,`data`,void 0),this.code=e,this.name=`RequestError`,this.data=r}static parseError(t,n){return new e(-32700,`Parse error${n?`: ${n}`:``}`,t)}static invalidRequest(t,n){return new e(-32600,`Invalid request${n?`: ${n}`:``}`,t)}static methodNotFound(t){return new e(-32601,`"Method not found": ${t}`,{method:t})}static invalidParams(t,n){return new e(-32602,`Invalid params${n?`: ${n}`:``}`,t)}static internalError(t,n){return new e(-32603,`Internal error${n?`: ${n}`:``}`,t)}static authRequired(t,n){return new e(-32e3,`Authentication required${n?`: ${n}`:``}`,t)}static resourceNotFound(t){return new e(-32002,`Resource not found${t?`: ${t}`:``}`,t&&{uri:t})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};S(),de(),ue(),Fe(),Le(),De(),Ee(),ke(),be(),Ae();function J(e,t){if(e)return t?Ve(e)?e:He(t,e):e}var Ji=!(typeof process.geteuid==`function`?process.geteuid()===0:typeof process.getuid==`function`&&process.getuid()===0)||!!process.env.IS_SANDBOX,Yi={auto:`auto`,default:`default`,acceptedits:`acceptEdits`,dontask:`dontAsk`,plan:`plan`,bypasspermissions:`bypassPermissions`,bypass:`bypassPermissions`};function Xi(e,t=`permissions.defaultMode`){if(e===void 0)return`default`;if(typeof e!=`string`)throw Error(`Invalid ${t}: expected a string.`);let n=e.trim().toLowerCase();if(n===``)throw Error(`Invalid ${t}: expected a non-empty string.`);let r=Yi[n];if(!r)throw Error(`Invalid ${t}: ${e}.`);if(r===`bypassPermissions`&&!Ji)throw Error(`Invalid ${t}: bypassPermissions is not available when running as root.`);return r}function Zi(e){let t=[...e.mcpServers??[]].sort((e,t)=>e.name.localeCompare(t.name));return JSON.stringify({cwd:e.cwd,mcpServers:t})}var Qi=256;function $i(e){let t=e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim();return t.length<=Qi?t:t.slice(0,Qi-1)+`…`}function ea(e,t){if(!t)return e;let n=w.resolve(t),r=w.resolve(e);return r.startsWith(n+w.sep)||r===n?w.relative(n,r).replaceAll(`\\`,`/`):e}function ta(e){let t="```";for(let n of e.matchAll(/^```+/gm)??[])for(;n[0].length>=t.length;)t+="`";return t+`
4
+ `+e+(e.endsWith(`
5
+ `)?``:`
6
+ `)+t}function Y(e,t=!1,n){let r=e.name,i=e.input;switch(r){case`Agent`:case`Task`:{let e=i?.description??`Task`,t=i?.prompt;return{title:e,kind:`think`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`Bash`:{let e=i?.command??`Terminal`,t=i?.description;return{title:e,kind:`execute`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`Read`:{let e=i?.file_path,t=e??`File`,r=i?.offset,a=i?.limit,o=``;a&&a>0?o=` (${r??1} - ${(r??1)+a-1})`:r&&(o=` (from line ${r})`);let s=t?ea(t,n):`File`,c=J(e,n);return{title:`Read ${s}${o}`,kind:`read`,locations:c?[{path:c,line:r??1}]:[],content:[]}}case`Write`:{let e=i?.file_path??``,t=i?.content??``,r=e?ea(e,n):void 0,a=J(e,n);return{title:r?`Write ${r}`:`Write`,kind:`edit`,content:a?[{type:`diff`,path:a,oldText:null,newText:t}]:[{type:`content`,content:{type:`text`,text:t}}],locations:a?[{path:a}]:[]}}case`Edit`:{let e=i?.file_path??``,t=i?.old_string??``,r=i?.new_string??``,a=e?ea(e,n):void 0,o=J(e,n);return{title:a?`Edit ${a}`:`Edit`,kind:`edit`,content:o?[{type:`diff`,path:o,oldText:t||null,newText:r}]:[],locations:o?[{path:o}]:[]}}case`Glob`:{let e=i?.path??``,t=i?.pattern??``,r=J(e,n),a=`Find`;return e&&(a+=` \`${e}\``),t&&(a+=` \`${t}\``),{title:a,kind:`search`,content:[],locations:r?[{path:r}]:[]}}case`Grep`:{let e=i?.pattern??``,t=i?.path??``,n=`grep`;return i?.[`-i`]&&(n+=` -i`),i?.[`-n`]&&(n+=` -n`),i?.[`-A`]!==void 0&&(n+=` -A ${i[`-A`]}`),i?.[`-B`]!==void 0&&(n+=` -B ${i[`-B`]}`),i?.[`-C`]!==void 0&&(n+=` -C ${i[`-C`]}`),i?.output_mode===`files_with_matches`?n+=` -l`:i?.output_mode===`count`&&(n+=` -c`),i?.head_limit!==void 0&&(n+=` | head -${i.head_limit}`),i?.glob&&(n+=` --include="${i.glob}"`),i?.type&&(n+=` --type=${i.type}`),i?.multiline&&(n+=` -P`),e&&(n+=` "${e}"`),t&&(n+=` ${t}`),{title:n,kind:`search`,content:[]}}case`WebFetch`:{let e=i?.url??``,t=i?.prompt;return{title:e?`Fetch ${e}`:`Fetch`,kind:`fetch`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`WebSearch`:{let e=`"${i?.query??`Web search`}"`,t=i?.allowed_domains,n=i?.blocked_domains;return t&&t.length>0&&(e+=` (allowed: ${t.join(`, `)})`),n&&n.length>0&&(e+=` (blocked: ${n.join(`, `)})`),{title:e,kind:`fetch`,content:[]}}case`TodoWrite`:{let e=i?.todos;return{title:Array.isArray(e)?`Update TODOs: ${e.map(e=>e.content).join(`, `)}`:`Update TODOs`,kind:`think`,content:[]}}case`ExitPlanMode`:{let e=i?.plan;return{title:`Ready to code?`,kind:`switch_mode`,content:e?[{type:`content`,content:{type:`text`,text:e}}]:[]}}default:return{title:r||`Unknown Tool`,kind:`other`,content:[]}}}function na(e,t){return Array.isArray(e)&&e.length>0?{content:e.map(e=>({type:`content`,content:ra(e,t)}))}:typeof e==`string`&&e.length>0?{content:[{type:`content`,content:{type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e}}]}:{}}function ra(e,t){let n=e=>({type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e});switch(e.type){case`text`:{let n=e.text;return{type:`text`,text:t?`\`\`\`\n${n}\n\`\`\``:n}}case`image`:{let t=e.source;return t?.type===`base64`?{type:`image`,data:t.data,mimeType:t.media_type}:n(t?.type===`url`?`[image: ${t.url}]`:`[image: file reference]`)}case`resource_link`:{let t=e.uri;return{type:`resource_link`,uri:t,name:e.name??t,mimeType:e.mimeType}}case`resource`:{let t=e.resource;return{type:`resource`,resource:{uri:t?.uri??``,mimeType:t?.mimeType,...typeof t?.text==`string`?{text:t.text}:{},...typeof t?.blob==`string`?{blob:t.blob}:{}}}}case`tool_reference`:return n(`Tool: ${e.tool_name}`);case`tool_search_tool_search_result`:{let t=e.tool_references;return n(`Tools found: ${t?.map(e=>e.tool_name).join(`, `)||`none`}`)}case`tool_search_tool_result_error`:return n(`Error: ${e.error_code}${e.error_message?` - ${e.error_message}`:``}`);case`web_search_result`:return n(`${e.title} (${e.url})`);case`web_search_tool_result_error`:return n(`Error: ${e.error_code}`);case`web_fetch_result`:return n(`Fetched: ${e.url}`);case`web_fetch_tool_result_error`:return n(`Error: ${e.error_code}`);case`code_execution_result`:case`bash_code_execution_result`:return n(`Output: ${e.stdout||e.stderr||``}`);case`code_execution_tool_result_error`:case`bash_code_execution_tool_result_error`:return n(`Error: ${e.error_code}`);case`text_editor_code_execution_view_result`:return n(e.content);case`text_editor_code_execution_create_result`:return n(e.is_file_update?`File updated`:`File created`);case`text_editor_code_execution_str_replace_result`:{let t=e.lines;return n(t?.join(`
7
+ `)||``)}case`text_editor_code_execution_tool_result_error`:return n(`Error: ${e.error_code}${e.error_message?` - ${e.error_message}`:``}`);default:try{return{type:`text`,text:JSON.stringify(e)}}catch{return{type:`text`,text:`[content]`}}}}function ia(e,t,n=!1){if(!t)return{};let r=e.is_error===!0,i=e.content;if(r&&i)return na(i,!0);switch(t.name){case`Read`:return typeof i==`string`&&i.length>0?{content:[{type:`content`,content:{type:`text`,text:ta(i)}}]}:Array.isArray(i)&&i.length>0?{content:i.map(e=>({type:`content`,content:e.type===`text`?{type:`text`,text:ta(e.text)}:ra(e,!1)}))}:{};case`Bash`:{let e=``;if(i&&typeof i==`object`&&!Array.isArray(i)&&i.type===`bash_code_execution_result`){let t=i;e=[t.stdout,t.stderr].filter(Boolean).join(`
8
+ `)}else typeof i==`string`?e=i:Array.isArray(i)&&i.length>0&&(e=i.map(e=>e.type===`text`?e.text:``).join(`
9
+ `));return e.trim()?{content:[{type:`content`,content:{type:`text`,text:`\`\`\`console\n${e.trimEnd()}\n\`\`\``}}]}:{}}case`Edit`:case`Write`:return{};case`ExitPlanMode`:return{title:`Exited Plan Mode`};default:return na(i??``,r)}}function aa(e){return e===`in_progress`?`in_progress`:e===`completed`?`completed`:`pending`}function X(e,t,n,r,i,a,o){let s=[];for(let i of e){let e=i.type,a=null;switch(e){case`text`:case`text_delta`:{let e=i.text??``;a={sessionUpdate:t===`assistant`?`agent_message_chunk`:`user_message_chunk`,...o?.messageId?{messageId:o.messageId}:{},content:{type:`text`,text:e}};break}case`thinking`:case`thinking_delta`:{let e=i.thinking??``;a={sessionUpdate:`agent_thought_chunk`,...o?.messageId?{messageId:o.messageId}:{},content:{type:`text`,text:e}};break}case`image`:{let e=i.source;e?.type===`base64`&&(a={sessionUpdate:t===`assistant`?`agent_message_chunk`:`user_message_chunk`,...o?.messageId?{messageId:o.messageId}:{},content:{type:`image`,data:e.data,mimeType:e.media_type}});break}case`tool_use`:case`server_tool_use`:case`mcp_tool_use`:{let t=i.id??``,n=i.name??`unknown`,s=i.input,c=t in r;if(r[t]={type:e,id:t,name:n,input:s},n===`TodoWrite`){let e=s?.todos;Array.isArray(e)&&(a={sessionUpdate:`plan`,entries:e.map(e=>({content:e.content,status:aa(e.status),priority:`medium`}))})}else{let e=s?{...s}:{};a=c?{_meta:{claudeCode:{toolName:n}},toolCallId:t,sessionUpdate:`tool_call_update`,status:`in_progress`,rawInput:e,...Y({name:n,id:t,input:s??{}},!1,o?.cwd)}:{_meta:{claudeCode:{toolName:n}},toolCallId:t,sessionUpdate:`tool_call`,rawInput:e,status:`pending`,...Y({name:n,id:t,input:s??{}},!1,o?.cwd)}}break}case`tool_result`:case`mcp_tool_result`:{let e=i.tool_use_id??``,t=r[e];if(!t)break;if(t.name!==`TodoWrite`){let n=ia(i,{name:t.name,id:t.id},!1);a={_meta:{claudeCode:{toolName:t.name}},toolCallId:e,sessionUpdate:`tool_call_update`,status:i.is_error===!0?`failed`:`completed`,rawOutput:i.content,...n}}break}case`redacted_thinking`:case`input_json_delta`:case`citations_delta`:case`signature_delta`:case`container_upload`:case`compaction`:case`compaction_delta`:break}if(a){if(o?.parentToolUseId){let e=a._meta;a._meta={...e,claudeCode:{...e?.claudeCode??{},parentToolUseId:o.parentToolUseId}}}s.push({sessionId:n,update:a})}}return s}function oa(e,t,n,r,i){let a=e.message;if(!a)return[];let o=a.content;if(!o)return[];if(typeof o==`string`)return[{sessionId:t,update:{sessionUpdate:`agent_message_chunk`,...i?.messageId?{messageId:i.messageId}:{},content:{type:`text`,text:o}}}];let s=i?.streamingActive?o.filter(e=>e.type!==`text`&&e.type!==`thinking`):o;return s.length===0?[]:X(s,`assistant`,t,n,r,void 0,i)}function sa(e,t,n,r,i){let a=e.event;if(!a)return[];switch(a.type){case`content_block_start`:{let o=a.content_block;return o?X([o],`assistant`,t,n,r,void 0,{clientCapabilities:i?.clientCapabilities,parentToolUseId:e.parent_tool_use_id,cwd:i?.cwd,messageId:i?.messageId}):[]}case`content_block_delta`:{let o=a.delta;return o?X([o],`assistant`,t,n,r,void 0,{clientCapabilities:i?.clientCapabilities,parentToolUseId:e.parent_tool_use_id,cwd:i?.cwd,messageId:i?.messageId}):[]}case`message_start`:case`message_delta`:case`message_stop`:case`content_block_stop`:return[];default:return[]}}function ca(e,t){let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;return n}function la(e,t){let n=null,r=0;for(let i of Object.keys(e)){let e=ca(i,t);e>r&&(r=e,n=i)}return n?e[n]??null:null}var ua=console;function da(e,t){if(t.aborted)return Promise.resolve({done:!0,value:void 0});let n,r=new Promise(e=>{n=()=>e({done:!0,value:void 0}),t.addEventListener(`abort`,n,{once:!0})});return Promise.race([e.next(),r]).finally(()=>{n&&t.removeEventListener(`abort`,n)})}async function fa(e,t,n,r,i,a,o,s){let c=`end_turn`,l={inputTokens:0,outputTokens:0,cachedReadTokens:0,cachedWriteTokens:0},u=null,d=null,f=2e5,p=!1,m=null;try{for(;!r.aborted;){let s=await da(t,r);if(s.done||r.aborted)break;let h=s.value;if(h==null)continue;let g=h;switch(g.type){case`system`:g.subtype===`compact_boundary`&&(u=0,await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
10
+
11
+ Compacting completed.`}}}));break;case`result`:{let t=g.usage;t&&(l.inputTokens+=t.input_tokens??0,l.outputTokens+=t.output_tokens??0,l.cachedReadTokens+=t.cache_read_input_tokens??0,l.cachedWriteTokens+=t.cache_creation_input_tokens??0);let i=g.modelUsage;if(i&&d){let e=la(i,d);e?.contextWindow&&(f=e.contextWindow)}u!==null&&await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`usage_update`,used:u,size:f}});let a=g.subtype,o=g.is_error;if(r.aborted){c=`cancelled`;break}switch(a){case`success`:{let e=g.stop_reason;c=e===`max_tokens`?`max_tokens`:e===`refusal`?`refusal`:`end_turn`,o&&(c=`end_turn`);break}case`error_during_execution`:c=g.stop_reason===`max_tokens`?`max_tokens`:`end_turn`;break;case`error_max_budget_usd`:case`error_max_turns`:case`error_max_structured_output_retries`:c=`max_turn_requests`;break}break}case`stream_event`:{let t=g.parent_tool_use_id;t===null&&m===null&&(m=T());let r=sa(g,e,i,n,{clientCapabilities:a,cwd:o,messageId:t===null?m??void 0:void 0});for(let e of r)await n.sessionUpdate(e);p=!0;break}case`assistant`:{let t=g.message,r=g.parent_tool_use_id;if(t?.usage&&r===null){let e=t.usage;u=(typeof e.input_tokens==`number`?e.input_tokens:0)+(typeof e.output_tokens==`number`?e.output_tokens:0)+(typeof e.cache_read_input_tokens==`number`?e.cache_read_input_tokens:0)+(typeof e.cache_creation_input_tokens==`number`?e.cache_creation_input_tokens:0)}r===null&&t?.model&&t.model!==`<synthetic>`&&(d=t.model);let s;r===null&&(m===null&&(m=T()),s=m);let c=oa(g,e,i,n,{clientCapabilities:a,cwd:o,parentToolUseId:r,streamingActive:p,messageId:s});for(let e of c)await n.sessionUpdate(e);r===null&&(m=null);break}case`user`:break;case`progress`:{let t=g.data;if(!t)break;let r=t.type;if(r===`agent_progress`||r===`skill_progress`){let r=t.message;if(r){let t=r.content;if(t)for(let r of t)r.type===`text`&&await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:r.text}}})}}break}case`tool_use_summary`:break;case`attachment`:break;case`compact_boundary`:u=0,await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
12
+
13
+ Compacting completed.`}}});break;default:ua.debug(`Ignoring unknown SDK message type`);break}}if(r.aborted||s?.())return{stopReason:`cancelled`,usage:l}}catch(e){if(r.aborted)return{stopReason:`cancelled`,usage:l};throw e}return{stopReason:c,usage:l}}async function pa(e,t,n,r,i,a){for(let o of t){let t=o;if(t.type!==`user`&&t.type!==`assistant`){ua.debug(`Ignoring unknown SDK message type`);continue}if(t.isMeta===!0)continue;let s=t.message?.content;if(!s)continue;let c=t.type===`assistant`?`assistant`:`user`;if(typeof s==`string`){if(!s.trim())continue;let t=T();await n.sessionUpdate({sessionId:e,update:{sessionUpdate:c===`assistant`?`agent_message_chunk`:`user_message_chunk`,...t?{messageId:t}:{},content:{type:`text`,text:s}}});continue}if(Array.isArray(s)){let t=X(s,c,e,r,n,void 0,{clientCapabilities:i,cwd:a,messageId:T()});for(let e of t)await n.sessionUpdate(e)}}}function ma(e,t,n,r,i,a,o,s){return async(n,c,l,u,d,f)=>{let p=ga(r);if(n.name===`ExitPlanMode`)return ha(e,t,d,c,p,i,a,o,s);if(f!==void 0)return f;try{let e=await ve(n,c,l,u,d);if(e.behavior===`allow`||e.behavior===`deny`)return e}catch(e){return console.error(`[ACP Permissions] Pipeline error:`,e),{behavior:`deny`,message:`Permission pipeline failed`,decisionReason:{type:`other`,reason:`Permission pipeline failed`},toolUseID:d}}let m=Y({name:n.name,id:d,input:c},p,i),h={toolCallId:d,title:m.title,kind:m.kind,status:`pending`,rawInput:c},g=[{kind:`allow_always`,name:`Always Allow`,optionId:`allow_always`},{kind:`allow_once`,name:`Allow`,optionId:`allow`},{kind:`reject_once`,name:`Reject`,optionId:`reject`},{kind:`reject_always`,name:`Always Reject`,optionId:`reject_always`}];try{let n=await e.requestPermission({sessionId:t,toolCall:h,options:g});if(n.outcome.outcome===`cancelled`)return s?.(),{behavior:`deny`,message:`Permission request cancelled by client`,decisionReason:{type:`mode`,mode:`default`},toolUseID:d};if(n.outcome.outcome===`selected`&&`optionId`in n.outcome&&n.outcome.optionId!==void 0){let e=n.outcome.optionId;if(e===`allow`||e===`allow_always`)return{behavior:`allow`,updatedInput:c}}return{behavior:`deny`,message:`Permission denied by client`,decisionReason:{type:`mode`,mode:`default`}}}catch(e){return console.error(`[ACP Permissions] Client request error:`,e),{behavior:`deny`,message:`Permission request failed`,decisionReason:{type:`mode`,mode:`default`}}}}}async function ha(e,t,n,r,i,a,o,s,c){let l=[{kind:`allow_always`,name:`Yes, and use "auto" mode`,optionId:`auto`},{kind:`allow_always`,name:`Yes, and auto-accept edits`,optionId:`acceptEdits`},{kind:`allow_once`,name:`Yes, and manually approve edits`,optionId:`default`},{kind:`reject_once`,name:`No, keep planning`,optionId:`plan`}];s?.()===!0&&l.unshift({kind:`allow_always`,name:`Yes, and bypass permissions`,optionId:`bypassPermissions`});let u=Y({name:`ExitPlanMode`,id:n,input:r},i,a),d={toolCallId:n,title:u.title,kind:u.kind,status:`pending`,rawInput:r},f=await e.requestPermission({sessionId:t,toolCall:d,options:l});if(f.outcome.outcome===`cancelled`)return c?.(),{behavior:`deny`,message:`Tool use aborted`,decisionReason:{type:`mode`,mode:`default`}};if(f.outcome.outcome===`selected`&&`optionId`in f.outcome&&f.outcome.optionId!==void 0){let n=f.outcome.optionId;if(l.some(e=>e.optionId===n)&&(n===`default`||n===`acceptEdits`||n===`auto`||n===`bypassPermissions`))return o?.(n),await e.sessionUpdate({sessionId:t,update:{sessionUpdate:`current_mode_update`,currentModeId:n}}),{behavior:`allow`,updatedInput:r}}return{behavior:`deny`,message:`User rejected request to exit plan mode.`,decisionReason:{type:`mode`,mode:`plan`}}}function ga(e){if(!e)return!1;if(e.terminal===!0)return!0;let t=e._meta;return!t||typeof t!=`object`?!1:t.terminal_output===!0}se(),he(),Ce(),fe(),e(),ye(),_e();var Z=class{constructor(e){t(this,`conn`,void 0),t(this,`sessions`,new Map),t(this,`clientCapabilities`,void 0),this.conn=e}async initialize(e){return this.clientCapabilities=e.clientCapabilities,{protocolVersion:1,authMethods:[],agentInfo:{name:`claude-code`,title:`Claude Code`,version:typeof globalThis.MACRO==`object`&&globalThis.MACRO!==null?String(globalThis.MACRO.VERSION??`0.0.0`):`0.0.0`},agentCapabilities:{_meta:{claudeCode:{promptQueueing:!0,forkSession:!0}},promptCapabilities:{image:!1,embeddedContext:!0},mcpCapabilities:{http:!0,sse:!0},loadSession:!0,sessionCapabilities:{list:{},resume:{},close:{},delete:{}}}}}async authenticate(e){return{}}async newSession(e){let t=await this.createSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async unstable_resumeSession(e){let t=await this.getOrCreateSession({...e,replay:!1});return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async loadSession(e){let t=await this.getOrCreateSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async listSessions(e){if(e.cursor!==void 0&&e.cursor!==null)throw Error(`Pagination cursor not supported: listSessions returns all results in a single page.`);let t=e.cwd||ae(),n=await me(t),r=await ge({dir:t}),i=[];for(let e of r){if(!e.cwd||await me(e.cwd)!==n)continue;let t=$i(e.summary??``);i.push({sessionId:e.sessionId,cwd:e.cwd,...t?{title:t}:{},updatedAt:new Date(e.lastModified).toISOString()})}return{sessions:i}}async unstable_forkSession(e){let{initialMessages:t}=await _a(e.sessionId),n=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{initialMessages:t});return this.scheduleAvailableCommandsUpdate(n.sessionId),n}async unstable_closeSession(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return await this.teardownSession(e.sessionId),{}}async unstable_deleteSession(e){let t=await pe(e.sessionId);if(t)try{await Ge(t.filePath)}catch(e){if(e.code!==`ENOENT`)throw e}return this.sessions.has(e.sessionId)&&await this.teardownSession(e.sessionId),{}}async extMethod(e,t){if(e===`session/delete`){let e=t.sessionId;if(typeof e!=`string`||e.length===0)throw Error(`session/delete requires a non-empty sessionId`);return this.unstable_deleteSession({sessionId:e})}throw q.methodNotFound(e)}async cancel(e){let t=this.sessions.get(e.sessionId);if(t){t.cancelled=!0,t.cancelGeneration+=1;for(let[,e]of t.pendingMessages)e.resolve(!0);t.pendingMessages.clear(),t.pendingQueue=[],t.pendingQueueHead=0,t.queryEngine.interrupt()}}async setSessionMode(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return this.applySessionMode(e.sessionId,e.modeId),await this.conn.sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:e.modeId}}),await this.updateConfigOption(e.sessionId,`mode`,e.modeId),{}}async unstable_setSessionModel(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);return t.queryEngine.setModel(e.modelId),await this.updateConfigOption(e.sessionId,`model`,e.modelId),{}}async sendAvailableCommandsUpdate(e){let t=this.sessions.get(e);if(!t)return;let n=t.commands.filter(e=>e.type===`prompt`&&!e.isHidden&&e.userInvocable!==!1).map(e=>({name:e.name,description:e.description,input:e.argumentHint?{hint:e.argumentHint}:void 0}));await this.conn.sessionUpdate({sessionId:e,update:{sessionUpdate:`available_commands_update`,availableCommands:n}})}scheduleAvailableCommandsUpdate(e){setTimeout(()=>{this.sendAvailableCommandsUpdate(e).catch(e=>{console.error(`[ACP] Failed to send available commands update:`,e)})},0)}};async function _a(e){let t;try{let n=await xe(e);n&&n.messages.length>0&&(t=je(n.messages))}catch(e){console.error(`[ACP] fork source load failed:`,e)}return{initialMessages:t}}var va=[`auto`,`default`,`acceptEdits`,`bypassPermissions`,`dontAsk`,`plan`];function ya(e){return va.includes(e)}function ba(e,t,n){if(t){let t=xa(e,`_meta.permissionMode`);if(t===`bypassPermissions`&&!wa())throw Error(`Mode not available: bypassPermissions cannot run as root (start the agent as a non-root user, or set IS_SANDBOX=1).`);return t}return Sa(n)??`default`}function xa(e,t){if(e==null)throw Error(`Invalid ${t}: expected a string.`);return Xi(e,t)}function Sa(e){if(e!=null)try{return Xi(e,`permissions.defaultMode`)}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[ACP] Invalid permissions.defaultMode, using default:`,t);return}}function Ca(e,t){return!!e&&Object.hasOwn(e,t)}function wa(){return Ta()}function Ta(){return process.env.IS_SANDBOX?!0:typeof process.geteuid==`function`?process.geteuid()!==0:typeof process.getuid==`function`?process.getuid()!==0:!0}function Ea(e,t){return[{id:`mode`,name:`Mode`,description:`Session permission mode`,category:`mode`,type:`select`,currentValue:e.currentModeId,options:e.availableModes.map(e=>({value:e.id,name:e.name,description:e.description}))},{id:`model`,name:`Model`,description:`AI model to use`,category:`model`,type:`select`,currentValue:t.currentModelId,options:t.availableModels.map(e=>({value:e.modelId,name:e.name,description:e.description??void 0}))}]}function Da(e){let t=[];if(!Array.isArray(e))return t;for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(Array.isArray(e.options))for(let n of e.options)n&&typeof n==`object`&&typeof n.value==`string`&&t.push(n.value);else typeof n.value==`string`&&t.push(n.value)}return t}function Q(e){return e.conn}function $(e){return e.clientCapabilities}function Oa(e,t,n,r){n===`mode`?t.modes={...t.modes,currentModeId:r}:n===`model`&&(t.models={...t.models,currentModelId:r})}S();function ka(){return ce().permissions?.defaultMode}async function Aa(e,t={}){le();let n=t.sessionId??T(),r=e.cwd;C(n,re()),ie(r);let i=process.cwd(),a=!1;try{process.chdir(r),a=!0}catch{}try{let i=Ie(),a=we(i),o=e._meta,s=Ca(o,`permissionMode`),c=ba(s?o?.permissionMode:void 0,s,ka()),l=$(this),u=this.conn,d=ma(u,n,()=>this.sessions.get(n)?.modes.currentModeId??`default`,l,r,e=>{this.applySessionMode(n,e)},()=>this.sessions.get(n)?.appState.toolPermissionContext.isBypassPermissionsModeAvailable??!1),f=wa(),p={...Ne(),toolPermissionContext:{...i,mode:c,isBypassPermissionsModeAvailable:f}},[m,h]=await Promise.all([Te(r),Oe(r)]);p.agentDefinitions=h;let g=new ze({cwd:r,tools:a,commands:m,mcpClients:[],agents:h.activeAgents,canUseTool:d,getAppState:()=>p,setAppState:e=>{let t=e(p);Object.assign(p,t)},readFileCache:new Re(500,50*1024*1024),includePartialMessages:!0,replayUserMessages:!0,initialMessages:t.initialMessages}),_={currentModeId:c,availableModes:[{id:`default`,name:`Default`,description:`Standard behavior, prompts for dangerous operations`},{id:`acceptEdits`,name:`Accept Edits`,description:`Auto-accept file edit operations`},{id:`plan`,name:`Plan Mode`,description:`Planning mode, no actual tool execution`},{id:`auto`,name:`Auto`,description:`Use a model classifier to approve/deny permission prompts.`},...f?[{id:`bypassPermissions`,name:`Bypass Permissions`,description:`Skip all permission checks`}]:[],{id:`dontAsk`,name:`Don't Ask`,description:`Don't prompt for permissions, deny if not pre-approved`}]},ee=Pe(),v=oe(),y={availableModels:ee.map(e=>({modelId:String(e.value??``),name:e.label??String(e.value??``),description:e.description??void 0})),currentModelId:v};g.setModel(v);let b=Ea(_,y),te={queryEngine:g,cancelled:!1,cancelGeneration:0,cwd:r,modes:_,models:y,configOptions:b,promptRunning:!1,pendingMessages:new Map,pendingQueue:[],pendingQueueHead:0,toolUseCache:{},clientCapabilities:l,appState:p,commands:m,sessionFingerprint:Zi({cwd:r,mcpServers:e.mcpServers})};return this.sessions.set(n,te),{sessionId:n,modes:_,models:y,configOptions:b}}finally{a&&process.chdir(i)}}Object.assign(Z.prototype,{createSession:Aa}),ye(),_e(),S(),fe();async function ja(e){let t=e.replay!==!1,n=this.sessions.get(e.sessionId);if(n){if(Zi({cwd:e.cwd,mcpServers:e.mcpServers})===n.sessionFingerprint){let r=await pe(e.sessionId,e.cwd);return C(e.sessionId,r?Be(r.filePath):null),ie(e.cwd),t&&await this.replaySessionHistory(e),{sessionId:e.sessionId,modes:n.modes,models:n.models,configOptions:n.configOptions}}await this.teardownSession(e.sessionId)}let r=await pe(e.sessionId,e.cwd),i=r?Be(r.filePath):null;C(e.sessionId,i),ie(e.cwd);let a;if(r)try{let t=await xe(e.sessionId);t&&t.messages.length>0&&(a=je(t.messages))}catch(e){console.error(`[ACP] Failed to load session history:`,e)}let o=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{sessionId:e.sessionId,initialMessages:a});if(t&&a&&a.length>0){let t=this.sessions.get(e.sessionId);t&&await pa(e.sessionId,a,Q(this),t.toolUseCache,$(this),t.cwd)}return{sessionId:o.sessionId,modes:o.modes,models:o.models,configOptions:o.configOptions}}async function Ma(e){this.sessions.get(e)&&(await this.cancel({sessionId:e}),this.sessions.delete(e))}async function Na(e){try{let t=await xe(e.sessionId);if(!t||t.messages.length===0)return;let n=je(t.messages);if(n.length===0)return;let r=this.sessions.get(e.sessionId);if(!r)return;await pa(e.sessionId,n,Q(this),r.toolUseCache,$(this),r.cwd)}catch(e){console.error(`[ACP] Failed to replay session history:`,e)}}function Pa(e,t){if(!ya(t))throw Error(`Invalid mode: ${t}`);let n=this.sessions.get(e);if(n){if(t===`bypassPermissions`&&!n.appState.toolPermissionContext.isBypassPermissionsModeAvailable||!n.modes.availableModes.some(e=>e.id===t))throw Error(`Mode not available: ${t}`);n.modes={...n.modes,currentModeId:t},n.appState.toolPermissionContext={...n.appState.toolPermissionContext,mode:t}}}async function Fa(e,t,n){let r=this.sessions.get(e);r&&(Oa(this,r,t,n),r.configOptions=r.configOptions.map(e=>e.id===t&&typeof e.currentValue==`string`?{...e,currentValue:n}:e),await Q(this).sessionUpdate({sessionId:e,update:{sessionUpdate:`config_option_update`,configOptions:r.configOptions}}))}Object.assign(Z.prototype,{getOrCreateSession:ja,teardownSession:Ma,replaySessionHistory:Na,applySessionMode:Pa,updateConfigOption:Fa});function Ia(e){if(!e||e.length===0)return``;let t=[];for(let n of e){let e=n;if(e.type===`text`)t.push(String(e.text??``));else if(e.type===`resource_link`){let n=typeof e.name==`string`?e.name:void 0,r=typeof e.uri==`string`?e.uri:void 0;t.push(La(n,r))}else if(e.type===`resource`){let n=e.resource;if(n&&typeof n.text==`string`)t.push(n.text);else if(n&&typeof n.blob==`string`){let e=typeof n.mimeType==`string`?n.mimeType:`application/octet-stream`,r=typeof n.uri==`string`?n.uri:`(unknown uri)`;t.push(`Embedded resource: ${r} (${e}, base64 blob, ${n.blob.length} chars)`)}}}return t.filter(e=>e.length>0).join(`
14
+ `)}function La(e,t){let n=[];return e&&e.length>0&&n.push(`name=${e}`),t&&t.length>0&&n.push(`uri=${t}`),n.length>0?`Resource link: ${n.join(`, `)}`:`Resource link`}function Ra(e){for(;e.pendingQueueHead<e.pendingQueue.length;){let t=e.pendingQueue[e.pendingQueueHead++];if(!t)continue;let n=e.pendingMessages.get(t);if(n)return e.pendingMessages.delete(t),za(e),n}za(e)}function za(e){if(e.pendingQueueHead!==0){if(e.pendingQueueHead>=e.pendingQueue.length){e.pendingQueue=[],e.pendingQueueHead=0;return}e.pendingQueueHead>1024&&e.pendingQueueHead*2>e.pendingQueue.length&&(e.pendingQueue=e.pendingQueue.slice(e.pendingQueueHead),e.pendingQueueHead=0)}}S();async function Ba(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session ${e.sessionId} not found`);let n=e.messageId??void 0,r=Ia(e.prompt);if(!r.trim())throw Error(`Prompt content is empty`);let i=t.cancelGeneration;if(t.promptRunning){let e=T();if(await new Promise(n=>{t.pendingQueue.push(e),t.pendingMessages.set(e,{resolve:n})}))return{stopReason:`cancelled`}}if(t.cancelGeneration!==i)return{stopReason:`cancelled`};t.cancelled=!1,t.promptRunning=!0;try{t.queryEngine.resetAbortController(),C(e.sessionId,re());let i=t.queryEngine.submitMessage(r),{stopReason:a,usage:o}=await fa(e.sessionId,i,Q(this),t.queryEngine.getAbortSignal(),t.toolUseCache,$(this),t.cwd,()=>t.cancelled);if(t.cancelled)return{stopReason:`cancelled`};if(await Ha(this,e.sessionId,r),o){let e={inputTokens:o.inputTokens,outputTokens:o.outputTokens,cachedReadTokens:o.cachedReadTokens,cachedWriteTokens:o.cachedWriteTokens,thoughtTokens:0,totalTokens:o.inputTokens+o.outputTokens+o.cachedReadTokens+o.cachedWriteTokens+0};return{stopReason:a,usage:e,...n?{userMessageId:n}:{},_meta:{claudeCode:{usage:e}}}}return{stopReason:a,...n?{userMessageId:n}:{}}}catch(n){let r=n instanceof Error&&(n.name===`AbortError`||/abort|cancelled|interrupt/i.test(n.message));if(t.cancelled||r)return{stopReason:`cancelled`};throw n instanceof Error&&(n.message.includes(`terminated`)||n.message.includes(`process exited`))?(await this.teardownSession(e.sessionId),Error(`The Claude Agent process exited unexpectedly. Please start a new session.`)):n}finally{let e=Ra(t);e?(t.promptRunning=!0,e.resolve(!1)):t.promptRunning=!1}}async function Va(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);if(typeof e.value!=`string`)throw Error(`Invalid value for config option ${e.configId}: ${String(e.value)}`);let n=t.configOptions.find(t=>t.id===e.configId);if(!n)throw Error(`Unknown config option: ${e.configId}`);if(n.type===`select`){let t=Da(n.options);if(!t.includes(e.value))throw Error(`Invalid value '${e.value}' for config option ${e.configId}; must be one of: ${t.join(`, `)}`)}let r=e.value;return e.configId===`mode`?(this.applySessionMode(e.sessionId,r),await Q(this).sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:r}})):e.configId===`model`&&t.queryEngine.setModel(r),Oa(this,t,e.configId,r),t.configOptions=t.configOptions.map(t=>t.id===e.configId&&typeof t.currentValue==`string`?{...t,currentValue:r}:t),{configOptions:t.configOptions}}async function Ha(e,t,n){let r=e.sessions.get(t);if(!r)return;let i=r.toolUseCache;if(i.__sessionInfoTitleSent)return;i.__sessionInfoTitleSent=!0;let a=$i(n).slice(0,100);try{await Q(e).sessionUpdate({sessionId:t,update:{sessionUpdate:`session_info_update`,...a?{title:a}:{},updatedAt:new Date().toISOString()}})}catch(e){console.error(`[ACP] Failed to send session_info_update:`,e)}}Object.assign(Z.prototype,{prompt:Ba,setSessionConfigOption:Va}),de(),Se();function Ua(e,t){let n=Ue.toWeb(e);return Mi(We.toWeb(t),n)}async function Wa(){le(),Me();let e=Ua(process.stdin,process.stdout),t,n=new Pi(e=>(t=new Z(e),t),e);console.log=console.error,console.info=console.error,console.warn=console.error,console.debug=console.error;async function r(){for(let[e]of t.sessions)try{await t.unstable_closeSession({sessionId:e})}catch{}process.exit(0)}n.closed.then(r).catch(r),process.on(`SIGTERM`,r),process.on(`SIGINT`,r),process.on(`unhandledRejection`,(e,t)=>{console.error(`Unhandled Rejection at:`,t,`reason:`,e)}),process.stdin.resume()}export{Wa as runAcpAgent};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,kt as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{S as o,y as s}from"./paths-Ci1iwL5Y.js";import{n as c,t as l}from"./lazySchema-B0QShMaQ.js";import{i as u,r as d}from"./semver-Di5OaTd5.js";import{r as f,s as p}from"./bridgeEnabled-D9jI6X-w.js";async function m(){let e=await s(`tengu_bridge_repl_v2_config`,_),t=v().safeParse(e);return t.success?t.data:_}async function h(){let e=await m();return e.min_version&&u(`2.7.1`,e.min_version)?`Your version of Claude Code (2.7.1) is too old for Remote Control.\nVersion ${e.min_version} or higher is required. Run \`claude update\` to update.`:null}async function g(){return p()?(await m()).should_show_app_upgrade_message:!1}var _,v,y=e((()=>{a(),o(),l(),d(),f(),_={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:.25,init_retry_max_delay_ms:4e3,http_timeout_ms:1e4,uuid_dedup_buffer_size:2e3,heartbeat_interval_ms:2e4,heartbeat_jitter_fraction:.1,token_refresh_buffer_ms:3e5,teardown_archive_timeout_ms:1500,connect_timeout_ms:15e3,min_version:`0.0.0`,should_show_app_upgrade_message:!1},v=c(()=>i({init_retry_max_attempts:t().int().min(1).max(10).default(3),init_retry_base_delay_ms:t().int().min(100).default(500),init_retry_jitter_fraction:t().min(0).max(1).default(.25),init_retry_max_delay_ms:t().int().min(500).default(4e3),http_timeout_ms:t().int().min(2e3).default(1e4),uuid_dedup_buffer_size:t().int().min(100).max(5e4).default(2e3),heartbeat_interval_ms:t().int().min(5e3).max(3e4).default(2e4),heartbeat_jitter_fraction:t().min(0).max(.5).default(.1),token_refresh_buffer_ms:t().int().min(3e4).max(18e5).default(3e5),teardown_archive_timeout_ms:t().int().min(500).max(2e3).default(1500),connect_timeout_ms:t().int().min(5e3).max(6e4).default(15e3),min_version:n().refine(e=>{try{return u(e,`0.0.0`),!0}catch{return!1}}).default(`0.0.0`),should_show_app_upgrade_message:r().default(!1)}))}));export{g as a,y as i,h as n,m as r,_ as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,kt as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{S as o,y as s}from"./paths-4ZWdjPP4.js";import{n as c,t as l}from"./lazySchema-B0QShMaQ.js";import{i as u,r as d}from"./semver-Di5OaTd5.js";import{r as f,s as p}from"./bridgeEnabled-DR-v8AXw.js";async function m(){let e=await s(`tengu_bridge_repl_v2_config`,_),t=v().safeParse(e);return t.success?t.data:_}async function h(){let e=await m();return e.min_version&&u(`2.8.0`,e.min_version)?`Your version of Claude Code (2.8.0) is too old for Remote Control.\nVersion ${e.min_version} or higher is required. Run \`claude update\` to update.`:null}async function g(){return p()?(await m()).should_show_app_upgrade_message:!1}var _,v,y=e((()=>{a(),o(),l(),d(),f(),_={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:.25,init_retry_max_delay_ms:4e3,http_timeout_ms:1e4,uuid_dedup_buffer_size:2e3,heartbeat_interval_ms:2e4,heartbeat_jitter_fraction:.1,token_refresh_buffer_ms:3e5,teardown_archive_timeout_ms:1500,connect_timeout_ms:15e3,min_version:`0.0.0`,should_show_app_upgrade_message:!1},v=c(()=>i({init_retry_max_attempts:t().int().min(1).max(10).default(3),init_retry_base_delay_ms:t().int().min(100).default(500),init_retry_jitter_fraction:t().min(0).max(1).default(.25),init_retry_max_delay_ms:t().int().min(500).default(4e3),http_timeout_ms:t().int().min(2e3).default(1e4),uuid_dedup_buffer_size:t().int().min(100).max(5e4).default(2e3),heartbeat_interval_ms:t().int().min(5e3).max(3e4).default(2e4),heartbeat_jitter_fraction:t().min(0).max(.5).default(.1),token_refresh_buffer_ms:t().int().min(3e4).max(18e5).default(3e5),teardown_archive_timeout_ms:t().int().min(500).max(2e3).default(1500),connect_timeout_ms:t().int().min(5e3).max(6e4).default(15e3),min_version:n().refine(e=>{try{return u(e,`0.0.0`),!0}catch{return!1}}).default(`0.0.0`),should_show_app_upgrade_message:r().default(!1)}))}));export{g as a,y as i,h as n,m as r,_ as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t}from"./envLessBridgeConfig-DW4-nPbZ.js";t();export{e as shouldShowAppUpgradeMessage};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-KjMLauwe.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{fl as r,pl as i}from"./paths-4ZWdjPP4.js";import{Ot as a,SE as o,Tt as s,bd as c,wE as l,yd as u}from"./loadAgentsDir-CQF8qhne.js";import{n as d,t as f}from"./ExitFlow-L2sh80sm.js";import{spawnSync as p}from"child_process";function m(){return i(_)??`Goodbye!`}async function h(e){if(c())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=s()!==null;return t?(0,g.jsx)(f,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(m()),await o(0,`prompt_input_exit`),null)}var g,_;e((()=>{r(),t(),d(),u(),l(),a(),g=n(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
@@ -1,2 +1,2 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,f as a,g as o,h as s,t as c,tn as l,tt as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{A as p,E as m}from"./debug-otxXY3j-.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{DC as _,EC as v,aS as y,dS as b,fS as x,oS as S}from"./loadAgentsDir-C_wFhytF.js";import{t as C}from"./useKeybinding-DPOUuymz.js";import{t as w}from"./useTerminalSize-Du-EamDN.js";import{n as T,t as E}from"./exportRenderer-DX2L5fQ7.js";import{join as D}from"path";function O({content:e,defaultFilename:t,onDone:r}){let[,c]=(0,k.useState)(null),[f,m]=(0,k.useState)(t),[h,_]=(0,k.useState)(t.length),[x,S]=(0,k.useState)(!1),{columns:C}=n(),w=(0,k.useCallback)(()=>{S(!1),c(null)},[]),T=async t=>{if(t===`clipboard`){let t=await l(e);t&&process.stdout.write(t),r({success:!0,message:`Conversation copied to clipboard`})}else t===`file`&&(c(`file`),S(!0))},E=()=>{let t=f.endsWith(`.txt`)?f:f.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{p(n,e,{encoding:`utf-8`,flush:!0}),r({success:!0,message:`Conversation exported to: ${n}`})}catch(e){r({success:!1,message:`Failed to export conversation: ${e instanceof Error?e.message:`Unknown error`}`})}},O=(0,k.useCallback)(()=>{x?w():r({success:!1,message:`Export cancelled`})},[x,w,r]),j=[{label:`Copy to clipboard`,value:`clipboard`,description:`Copy the conversation to your system clipboard`},{label:`Save to file`,value:`file`,description:`Save the conversation to a file in the current directory`}];function M(e){return x?(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{shortcut:`Enter`,action:`save`}),(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}):e.pending?(0,A.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})}return u(`confirm:no`,O,{context:`Settings`,isActive:x}),(0,A.jsx)(a,{title:`Export Conversation`,subtitle:`Select export method:`,color:`permission`,onCancel:O,inputGuide:M,isCancelActive:!x,children:x?(0,A.jsxs)(d,{flexDirection:`column`,children:[(0,A.jsx)(i,{children:`Enter filename:`}),(0,A.jsxs)(d,{flexDirection:`row`,gap:1,marginTop:1,children:[(0,A.jsx)(i,{children:`>`}),(0,A.jsx)(b,{value:f,onChange:m,onSubmit:E,focus:!0,showCursor:!0,columns:C,cursorOffset:h,onChangeCursorOffset:_})]})]}):(0,A.jsx)(y,{options:j,onChange:T,onCancel:O})})}var k,A,j=e((()=>{k=t(r(),1),w(),c(),C(),h(),m(),_(),S(),x(),A=f()}));function M(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}-${String(e.getHours()).padStart(2,`0`)}${String(e.getMinutes()).padStart(2,`0`)}${String(e.getSeconds()).padStart(2,`0`)}`}function N(e){let t=e.find(e=>e.type===`user`);if(!t||t.type!==`user`)return``;let n=t.message?.content,r=``;if(typeof n==`string`)r=n.trim();else if(Array.isArray(n)){let e=n.find(e=>e.type===`text`);e&&`text`in e&&(r=e.text.trim())}return r=r.split(`
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,f as a,g as o,h as s,t as c,tn as l,tt as u,x as d}from"./src-KjMLauwe.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{A as p,E as m}from"./debug-otxXY3j-.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{DC as _,EC as v,aS as y,dS as b,fS as x,oS as S}from"./loadAgentsDir-CQF8qhne.js";import{t as C}from"./useKeybinding-DOjEx42R.js";import{t as w}from"./useTerminalSize-mqo2Swmk.js";import{n as T,t as E}from"./exportRenderer-CuIDQBLH.js";import{join as D}from"path";function O({content:e,defaultFilename:t,onDone:r}){let[,c]=(0,k.useState)(null),[f,m]=(0,k.useState)(t),[h,_]=(0,k.useState)(t.length),[x,S]=(0,k.useState)(!1),{columns:C}=n(),w=(0,k.useCallback)(()=>{S(!1),c(null)},[]),T=async t=>{if(t===`clipboard`){let t=await l(e);t&&process.stdout.write(t),r({success:!0,message:`Conversation copied to clipboard`})}else t===`file`&&(c(`file`),S(!0))},E=()=>{let t=f.endsWith(`.txt`)?f:f.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{p(n,e,{encoding:`utf-8`,flush:!0}),r({success:!0,message:`Conversation exported to: ${n}`})}catch(e){r({success:!1,message:`Failed to export conversation: ${e instanceof Error?e.message:`Unknown error`}`})}},O=(0,k.useCallback)(()=>{x?w():r({success:!1,message:`Export cancelled`})},[x,w,r]),j=[{label:`Copy to clipboard`,value:`clipboard`,description:`Copy the conversation to your system clipboard`},{label:`Save to file`,value:`file`,description:`Save the conversation to a file in the current directory`}];function M(e){return x?(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{shortcut:`Enter`,action:`save`}),(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}):e.pending?(0,A.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})}return u(`confirm:no`,O,{context:`Settings`,isActive:x}),(0,A.jsx)(a,{title:`Export Conversation`,subtitle:`Select export method:`,color:`permission`,onCancel:O,inputGuide:M,isCancelActive:!x,children:x?(0,A.jsxs)(d,{flexDirection:`column`,children:[(0,A.jsx)(i,{children:`Enter filename:`}),(0,A.jsxs)(d,{flexDirection:`row`,gap:1,marginTop:1,children:[(0,A.jsx)(i,{children:`>`}),(0,A.jsx)(b,{value:f,onChange:m,onSubmit:E,focus:!0,showCursor:!0,columns:C,cursorOffset:h,onChangeCursorOffset:_})]})]}):(0,A.jsx)(y,{options:j,onChange:T,onCancel:O})})}var k,A,j=e((()=>{k=t(r(),1),w(),c(),C(),h(),m(),_(),S(),x(),A=f()}));function M(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}-${String(e.getHours()).padStart(2,`0`)}${String(e.getMinutes()).padStart(2,`0`)}${String(e.getSeconds()).padStart(2,`0`)}`}function N(e){let t=e.find(e=>e.type===`user`);if(!t||t.type!==`user`)return``;let n=t.message?.content,r=``;if(typeof n==`string`)r=n.trim();else if(Array.isArray(n)){let e=n.find(e=>e.type===`text`);e&&`text`in e&&(r=e.text.trim())}return r=r.split(`
2
2
  `)[0]||``,r.length>50&&(r=r.substring(0,49)+`…`),r}function P(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)}async function F(e){let t=e.options.tools||[];return T(e.messages,t)}async function I(e,t,n){let r=await F(t),i=n.trim();if(i){let t=i.endsWith(`.txt`)?i:i.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{return p(n,r,{encoding:`utf-8`,flush:!0}),e(`Conversation exported to: ${n}`),null}catch(t){return e(`Failed to export conversation: ${t instanceof Error?t.message:`Unknown error`}`),null}}let a=N(t.messages),o=M(new Date),s;if(a){let e=P(a);s=e?`${o}-${e}.txt`:`conversation-${o}.txt`}else s=`conversation-${o}.txt`;return(0,L.jsx)(O,{content:r,defaultFilename:s,onDone:t=>{e(t.message)}})}var L;e((()=>{r(),j(),h(),E(),m(),L=f()}))();export{I as call,N as extractFirstPrompt,P as sanitizeFilename};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,Tn as r,rt as i,wn as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{FT as s,LT as c,cC as l,kT as u,lC as d}from"./loadAgentsDir-C_wFhytF.js";import{n as f,t as p}from"./staticRender-C5v46np_.js";import{n as m,t as h}from"./Messages-DTmFVhRG.js";function g({children:e}){let{bindings:t}=c(),n=(0,b.useRef)(null),r=(0,b.useRef)(new Map),a=(0,b.useRef)(new Set).current;return(0,x.jsx)(i,{bindings:t,pendingChordRef:n,pendingChord:null,setPendingChord:()=>{},activeContexts:a,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:r,children:e})}function _(e){if(!(`message`in e))return 1;let t=e.message.content;return Array.isArray(t)?t.length:1}async function v(e,t,n,{columns:i,verbose:a=!1,chunkSize:o=40,onProgress:s}={}){let c=n=>f((0,x.jsx)(l,{children:(0,x.jsx)(g,{children:(0,x.jsx)(h,{messages:e,tools:t,commands:[],verbose:a,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:`export`,screen:`prompt`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:n})})}),i),u=o;for(let t of e)u+=_(t);for(let e=0;e<u;e+=o){let t=await c([e,e+o]);if(r(t).trim()===``)break;await n(t),s?.(e+o)}}async function y(e,t=[],n){let i=[];return await v(e,t,e=>void i.push(r(e)),{columns:n}),i.join(``)}var b,x,S=e((()=>{b=t(n(),1),a(),m(),u(),s(),d(),p(),x=o()}));export{y as n,S as t};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,Tn as r,rt as i,wn as a}from"./src-KjMLauwe.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{FT as s,LT as c,cC as l,kT as u,lC as d}from"./loadAgentsDir-CQF8qhne.js";import{n as f,t as p}from"./staticRender-DboURbK0.js";import{n as m,t as h}from"./Messages-KmeXIJqL.js";function g({children:e}){let{bindings:t}=c(),n=(0,b.useRef)(null),r=(0,b.useRef)(new Map),a=(0,b.useRef)(new Set).current;return(0,x.jsx)(i,{bindings:t,pendingChordRef:n,pendingChord:null,setPendingChord:()=>{},activeContexts:a,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:r,children:e})}function _(e){if(!(`message`in e))return 1;let t=e.message.content;return Array.isArray(t)?t.length:1}async function v(e,t,n,{columns:i,verbose:a=!1,chunkSize:o=40,onProgress:s}={}){let c=n=>f((0,x.jsx)(l,{children:(0,x.jsx)(g,{children:(0,x.jsx)(h,{messages:e,tools:t,commands:[],verbose:a,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:`export`,screen:`prompt`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:n})})}),i),u=o;for(let t of e)u+=_(t);for(let e=0;e<u;e+=o){let t=await c([e,e+o]);if(r(t).trim()===``)break;await n(t),s?.(e+o)}}async function y(e,t=[],n){let i=[];return await v(e,t,e=>void i.push(r(e)),{columns:n}),i.join(``)}var b,x,S=e((()=>{b=t(n(),1),a(),m(),u(),s(),d(),p(),x=o()}));export{y as n,S as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./extra-usage-core-D84ifgBo.js";import{r as a,t as o}from"./login-C1uE6Pg9.js";async function s(e,t){let n=await r();return n.type===`message`?(e(n.value),null):(0,c.jsx)(o,{startingMessage:`Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}var c,l=e((()=>{t(),a(),i(),c=n()}));export{l as n,s as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-KjMLauwe.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./extra-usage-core-D3CwYO_8.js";import{r as a,t as o}from"./login-CxbcJk9_.js";async function s(e,t){let n=await r();return n.type===`message`?(e(n.value),null):(0,c.jsx)(o,{startingMessage:`Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}var c,l=e((()=>{t(),a(),i(),c=n()}));export{l as n,s as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./extra-usage-DTr6gExD.js";e();export{t as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Da as i,dc as a,ka as o,on as s,tn as c,yc as l}from"./paths-Ci1iwL5Y.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{o as f,s as p}from"./log-DSV4Ht5l.js";import{a as m,l as h,o as g}from"./api-CDmgYrwN.js";import{n as _,t as v}from"./browser-Bt-ckCaU.js";import{n as y,t as b}from"./usage-B_bY46ep.js";import{i as x,r as S}from"./overageCreditGrant-Cbh0_fbM.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${u().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),d(),g()}));async function D(){a().hasVisitedExtraUsage||r(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=c(),t=e===`team`||e===`enterprise`;if(!i()&&t){let e;try{e=(await b())?.extra_usage}catch(e){p(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){p(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){p(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){p(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return p(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),s(),o(),v(),l(),f()}));export{D as n,O as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Da as i,dc as a,ka as o,on as s,tn as c,yc as l}from"./paths-4ZWdjPP4.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{o as f,s as p}from"./log-DSV4Ht5l.js";import{a as m,l as h,o as g}from"./api-DMbWqJlK.js";import{n as _,t as v}from"./browser-Bt-ckCaU.js";import{n as y,t as b}from"./usage-CRquq5_O.js";import{i as x,r as S}from"./overageCreditGrant-B6sx7IFi.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${u().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),d(),g()}));async function D(){a().hasVisitedExtraUsage||r(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=c(),t=e===`team`||e===`enterprise`;if(!i()&&t){let e;try{e=(await b())?.extra_usage}catch(e){p(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){p(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){p(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){p(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return p(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),s(),o(),v(),l(),f()}));export{D as n,O as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./extra-usage-core-D84ifgBo.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./extra-usage-core-D3CwYO_8.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,g as i,h as a,nt as o,p as ee,t as te,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Br as l,Cr as u,Ol as ne,Pr as d,Ps as f,Qa as re,Rr as p,bi as ie,dn as m,dr as h,kl as g,li as _,lo as ae,on as v,oo as y,ur as b,vi as x,xi as S,yi as oe}from"./paths-Ci1iwL5Y.js";import{n as C,r as se}from"./analytics-DqMQntaB.js";import{By as w,DC as T,Dj as E,EC as ce,Hf as D,Mj as le,Nj as ue,Oj as de,Tj as O,Vf as fe,_j as k,aS as pe,fC as me,kj as he,lC as A,uC as j,vj as M,yj as N}from"./loadAgentsDir-C_wFhytF.js";import{t as P}from"./useKeybinding-DPOUuymz.js";import{n as ge,t as F}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";function I(e,t){if(!E(t))return;let n=N(t,e);return`${L(n)} ${n} · /effort`}function L(e){switch(e){case`low`:return`○`;case`medium`:return`◐`;case`high`:return`●`;case`xhigh`:return`⦿`;case`max`:return`◉`;default:return`●`}}var R=e((()=>{f(),O()}));function z({initial:e,sessionModel:t,onSelect:n,onCancel:te,isStandaloneCommand:c,showFastModeNotice:l,headerText:u,skipSettingsWrite:d}){let f=me(),m=ge(),h=e===null?G:e,[g,v]=(0,U.useState)(h),y=j(e=>S()?e.fastMode:!1),[x,C]=(0,U.useState)(()=>new Set(b(h)?[h.replace(/\[1m\]/i,``)]:[])),w=(0,U.useCallback)(()=>{if(!g||g===G)return;let e=g.replace(/\[1m\]/i,``);C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[g]),[T,D]=(0,U.useState)(!1),O=j(e=>e.effortValue),[A,M]=(0,U.useState)(O===void 0?void 0:k(O)),N=(0,U.useMemo)(()=>fe(y??!1),[y]),P=(0,U.useMemo)(()=>e!==null&&!N.some(t=>t.value===e)?[...N,{value:e,label:p(e),description:`Current model`}]:N,[N,e]),F=(0,U.useMemo)(()=>P.map(e=>({...e,value:e.value===null?G:e.value})),[P]),I=(0,U.useMemo)(()=>F.some(e=>e.value===h)?h:F[0]?.value??void 0,[F,h]),L=Math.min(10,F.length),R=Math.max(0,F.length-L),z=F.find(e=>e.value===g)?.label,K=B(g),q=g!==void 0&&g!==G&&x.has(g.replace(/\[1m\]/i,``)),J=K?E(K):!1,Y=K?he(K):!1,X=K?de(K):!1,Z=H(g),Q=A===`max`&&!X?Y?`xhigh`:`high`:A===`xhigh`&&!Y?`high`:A,ve=(0,U.useCallback)(e=>{v(e),!T&&O===void 0&&M(H(e))},[T,O]),ye=(0,U.useCallback)(e=>{J&&(M(t=>_e(t??Z,e,Y,X)),D(!0))},[J,Y,X,Z]);o({"modelPicker:decreaseEffort":()=>ye(`left`),"modelPicker:increaseEffort":()=>ye(`right`),"modelPicker:toggle1M":()=>w()},{context:`ModelPicker`});function be(e){if(se(`tengu_model_command_menu_effort`,{effort:A}),!d){let t=le(A,H(e),re(`userSettings`)?.effortLevel,T),n=ue(t);n!==void 0&&ae(`userSettings`,{effortLevel:n}),f(e=>({...e,effortValue:t}))}let t=B(e),r=T&&t&&E(t)?A:void 0;if(e===G){n(null,r);return}let i=e.replace(/\[1m\]/i,``);n(x.has(i)?`${i}[1m]`:i,r)}let $=(0,W.jsxs)(s,{flexDirection:`column`,children:[(0,W.jsxs)(s,{flexDirection:`column`,children:[(0,W.jsxs)(s,{marginBottom:1,flexDirection:`column`,children:[(0,W.jsx)(r,{color:`remember`,bold:!0,children:`Select model`}),(0,W.jsx)(r,{dimColor:!0,children:u??`Choose a model for this and future sessions. Use ← → to adjust effort, Space to toggle 1M context.`}),t&&(0,W.jsxs)(r,{dimColor:!0,children:[`Currently using `,p(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,W.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,W.jsx)(s,{flexDirection:`column`,children:(0,W.jsx)(pe,{defaultValue:h,defaultFocusValue:I,options:F,onChange:be,onFocus:ve,onCancel:te??(()=>{}),visibleOptionCount:L})}),R>0&&(0,W.jsx)(s,{paddingLeft:3,children:(0,W.jsxs)(r,{dimColor:!0,children:[`and `,R,` more…`]})})]}),(0,W.jsxs)(s,{marginBottom:1,flexDirection:`column`,children:[J?(0,W.jsxs)(r,{dimColor:!0,children:[(0,W.jsx)(V,{effort:Q}),` `,ne(Q),` effort`,Q===Z?` (default)`:``,` `,(0,W.jsx)(r,{color:`subtle`,children:`← → to adjust`})]}):(0,W.jsxs)(r,{color:`subtle`,children:[(0,W.jsx)(V,{effort:void 0}),` Effort not supported`,z?` for ${z}`:``]}),q?(0,W.jsxs)(r,{dimColor:!0,children:[(0,W.jsx)(V,{effort:`high`}),` 1M context on`,(0,W.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]}):(0,W.jsxs)(r,{color:`subtle`,children:[(0,W.jsx)(V,{effort:void 0}),` 1M context off`,z?` for ${z}`:``,(0,W.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]})]}),S()?l?(0,W.jsx)(s,{marginBottom:1,children:(0,W.jsxs)(r,{dimColor:!0,children:[`Fast mode is `,(0,W.jsx)(r,{bold:!0,children:`ON`}),` and available with `,_,` only (/fast). Switching to other models turn off fast mode.`]})}):oe()&&!ie()?(0,W.jsx)(s,{marginBottom:1,children:(0,W.jsxs)(r,{dimColor:!0,children:[`Use `,(0,W.jsx)(r,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,_,` only).`]})}):null:null]}),c&&(0,W.jsx)(r,{dimColor:!0,italic:!0,children:m.pending?(0,W.jsxs)(W.Fragment,{children:[`Press `,m.keyName,` again to exit`]}):(0,W.jsxs)(a,{children:[(0,W.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,W.jsx)(ce,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return c?(0,W.jsx)(ee,{color:`permission`,children:$}):$}function B(e){if(e)return e===G?u():l(e)}function V({effort:e}){return(0,W.jsx)(r,{color:e?`claude`:`subtle`,children:L(e??`low`)})}function _e(e,t,n,r){let i=[`low`,`medium`,`high`,...n?[`xhigh`]:[],...r?[`max`]:[]],a=i.indexOf(e),o=a===-1?i.indexOf(`high`):a;return t===`right`?i[(o+1)%i.length]:i[(o-1+i.length)%i.length]}function H(e){let t=M(B(e)??u());return t===void 0?`high`:k(t)}var U,W,G,K=e((()=>{g(),n(),U=t(n(),1),h(),F(),C(),x(),te(),P(),A(),O(),d(),D(),y(),T(),w(),R(),W=c(),G=`__NO_PREFERENCE__`}));function q(e,t,n){if(!m())return!1;if(t)return!0;if(e===null||!b(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var J=e((()=>{v(),h()}));export{L as a,K as i,q as n,I as o,z as r,R as s,J as t};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,g as i,h as a,nt as o,p as ee,t as te,x as s}from"./src-KjMLauwe.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Br as l,Cr as u,Ol as ne,Pr as d,Ps as f,Qa as re,Rr as p,bi as ie,dn as m,dr as h,kl as g,li as _,lo as ae,on as v,oo as y,ur as b,vi as x,xi as S,yi as oe}from"./paths-4ZWdjPP4.js";import{n as C,r as se}from"./analytics-DqMQntaB.js";import{Bf as w,DC as T,Dj as E,EC as ce,Mj as le,Nj as ue,Oj as de,Ry as D,Tj as O,_j as k,aS as fe,fC as pe,kj as me,lC as A,uC as j,vj as M,yj as N,zf as he}from"./loadAgentsDir-CQF8qhne.js";import{t as P}from"./useKeybinding-DOjEx42R.js";import{n as ge,t as F}from"./useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js";function I(e,t){if(!E(t))return;let n=N(t,e);return`${L(n)} ${n} · /effort`}function L(e){switch(e){case`low`:return`○`;case`medium`:return`◐`;case`high`:return`●`;case`xhigh`:return`⦿`;case`max`:return`◉`;default:return`●`}}var R=e((()=>{f(),O()}));function z({initial:e,sessionModel:t,onSelect:n,onCancel:te,isStandaloneCommand:c,showFastModeNotice:l,headerText:u,skipSettingsWrite:d}){let f=pe(),m=ge(),h=e===null?G:e,[g,v]=(0,U.useState)(h),y=j(e=>S()?e.fastMode:!1),[x,C]=(0,U.useState)(()=>new Set(b(h)?[h.replace(/\[1m\]/i,``)]:[])),w=(0,U.useCallback)(()=>{if(!g||g===G)return;let e=g.replace(/\[1m\]/i,``);C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[g]),[T,D]=(0,U.useState)(!1),O=j(e=>e.effortValue),[A,M]=(0,U.useState)(O===void 0?void 0:k(O)),N=(0,U.useMemo)(()=>he(y??!1),[y]),P=(0,U.useMemo)(()=>e!==null&&!N.some(t=>t.value===e)?[...N,{value:e,label:p(e),description:`Current model`}]:N,[N,e]),F=(0,U.useMemo)(()=>P.map(e=>({...e,value:e.value===null?G:e.value})),[P]),I=(0,U.useMemo)(()=>F.some(e=>e.value===h)?h:F[0]?.value??void 0,[F,h]),L=Math.min(10,F.length),R=Math.max(0,F.length-L),z=F.find(e=>e.value===g)?.label,K=B(g),q=g!==void 0&&g!==G&&x.has(g.replace(/\[1m\]/i,``)),J=K?E(K):!1,Y=K?me(K):!1,X=K?de(K):!1,Z=H(g),Q=A===`max`&&!X?Y?`xhigh`:`high`:A===`xhigh`&&!Y?`high`:A,ve=(0,U.useCallback)(e=>{v(e),!T&&O===void 0&&M(H(e))},[T,O]),ye=(0,U.useCallback)(e=>{J&&(M(t=>_e(t??Z,e,Y,X)),D(!0))},[J,Y,X,Z]);o({"modelPicker:decreaseEffort":()=>ye(`left`),"modelPicker:increaseEffort":()=>ye(`right`),"modelPicker:toggle1M":()=>w()},{context:`ModelPicker`});function be(e){if(se(`tengu_model_command_menu_effort`,{effort:A}),!d){let t=le(A,H(e),re(`userSettings`)?.effortLevel,T),n=ue(t);n!==void 0&&ae(`userSettings`,{effortLevel:n}),f(e=>({...e,effortValue:t}))}let t=B(e),r=T&&t&&E(t)?A:void 0;if(e===G){n(null,r);return}let i=e.replace(/\[1m\]/i,``);n(x.has(i)?`${i}[1m]`:i,r)}let $=(0,W.jsxs)(s,{flexDirection:`column`,children:[(0,W.jsxs)(s,{flexDirection:`column`,children:[(0,W.jsxs)(s,{marginBottom:1,flexDirection:`column`,children:[(0,W.jsx)(r,{color:`remember`,bold:!0,children:`Select model`}),(0,W.jsx)(r,{dimColor:!0,children:u??`Choose a model for this and future sessions. Use ← → to adjust effort, Space to toggle 1M context.`}),t&&(0,W.jsxs)(r,{dimColor:!0,children:[`Currently using `,p(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,W.jsxs)(s,{flexDirection:`column`,marginBottom:1,children:[(0,W.jsx)(s,{flexDirection:`column`,children:(0,W.jsx)(fe,{defaultValue:h,defaultFocusValue:I,options:F,onChange:be,onFocus:ve,onCancel:te??(()=>{}),visibleOptionCount:L})}),R>0&&(0,W.jsx)(s,{paddingLeft:3,children:(0,W.jsxs)(r,{dimColor:!0,children:[`and `,R,` more…`]})})]}),(0,W.jsxs)(s,{marginBottom:1,flexDirection:`column`,children:[J?(0,W.jsxs)(r,{dimColor:!0,children:[(0,W.jsx)(V,{effort:Q}),` `,ne(Q),` effort`,Q===Z?` (default)`:``,` `,(0,W.jsx)(r,{color:`subtle`,children:`← → to adjust`})]}):(0,W.jsxs)(r,{color:`subtle`,children:[(0,W.jsx)(V,{effort:void 0}),` Effort not supported`,z?` for ${z}`:``]}),q?(0,W.jsxs)(r,{dimColor:!0,children:[(0,W.jsx)(V,{effort:`high`}),` 1M context on`,(0,W.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]}):(0,W.jsxs)(r,{color:`subtle`,children:[(0,W.jsx)(V,{effort:void 0}),` 1M context off`,z?` for ${z}`:``,(0,W.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]})]}),S()?l?(0,W.jsx)(s,{marginBottom:1,children:(0,W.jsxs)(r,{dimColor:!0,children:[`Fast mode is `,(0,W.jsx)(r,{bold:!0,children:`ON`}),` and available with `,_,` only (/fast). Switching to other models turn off fast mode.`]})}):oe()&&!ie()?(0,W.jsx)(s,{marginBottom:1,children:(0,W.jsxs)(r,{dimColor:!0,children:[`Use `,(0,W.jsx)(r,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,_,` only).`]})}):null:null]}),c&&(0,W.jsx)(r,{dimColor:!0,italic:!0,children:m.pending?(0,W.jsxs)(W.Fragment,{children:[`Press `,m.keyName,` again to exit`]}):(0,W.jsxs)(a,{children:[(0,W.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,W.jsx)(ce,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return c?(0,W.jsx)(ee,{color:`permission`,children:$}):$}function B(e){if(e)return e===G?u():l(e)}function V({effort:e}){return(0,W.jsx)(r,{color:e?`claude`:`subtle`,children:L(e??`low`)})}function _e(e,t,n,r){let i=[`low`,`medium`,`high`,...n?[`xhigh`]:[],...r?[`max`]:[]],a=i.indexOf(e),o=a===-1?i.indexOf(`high`):a;return t===`right`?i[(o+1)%i.length]:i[(o-1+i.length)%i.length]}function H(e){let t=M(B(e)??u());return t===void 0?`high`:k(t)}var U,W,G,K=e((()=>{g(),n(),U=t(n(),1),h(),F(),C(),x(),te(),P(),A(),O(),d(),w(),y(),T(),D(),R(),W=c(),G=`__NO_PREFERENCE__`}));function q(e,t,n){if(!m())return!1;if(t)return!0;if(e===null||!b(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var J=e((()=>{v(),h()}));export{L as a,K as i,q as n,I as o,z as r,R as s,J as t};
@@ -0,0 +1 @@
1
+ import{iu as e,nu as t,ru as n,tu as r}from"./loadAgentsDir-CQF8qhne.js";e();export{r as drainPendingExtraction,t as executeExtractMemories,n as initExtractMemories};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./fast-bkGXbuHX.js";t();export{n as FastModePicker,e as call};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Q as i,Rn as a,b as o,f as s,nt as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Di as p,Ps as m,Si as h,ci as g,dc as _,di as v,fi as y,li as b,lo as x,mi as S,oi as C,oo as w,si as T,ui as E,vi as D,xi as O,yc as k}from"./paths-Ci1iwL5Y.js";import{n as A,r as j}from"./analytics-DqMQntaB.js";import{d as M,x as N}from"./startupProfiler-CAntGAbs.js";import{fC as P,lC as F,uC as I}from"./loadAgentsDir-C_wFhytF.js";import{t as L}from"./useKeybinding-DPOUuymz.js";import{n as R,t as z}from"./systemTheme-eRWGHYSL.js";function B({cooldown:e}){return e?(0,H.jsx)(o,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(o,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let r=R(_().theme);return t?n.dim(u(`promptBorder`,r)(`↯`)):u(`fastMode`,r)(`↯`)}var H,U=e((()=>{r(),a(),m(),l(),k(),z(),H=f()}));function W(e,t){E(),x(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!h(e.mainLoopModel);return{...e,...t?{mainLoopModel:v(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let n=I(e=>e.mainLoopModel),r=I(e=>e.fastMode),a=P(),[l,u]=(0,J.useState)(r??!1),f=y(),p=f.status===`cooldown`,m=t!==null,g=C(T(!0));function _(){m||(W(l,a),j(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${h(n)?``:` · model set to ${b}`} · ${g}`):(a(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function v(){if(m){r&&W(!1,a),e(`Fast mode OFF`,{display:`system`});return}e(r?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function x(){m||u(e=>!e)}return c({"confirm:yes":_,"confirm:nextField":x,"confirm:next":x,"confirm:previous":x,"confirm:cycleMode":x,"confirm:toggle":x},{context:`Confirmation`}),(0,Y.jsxs)(s,{title:(0,Y.jsxs)(o,{children:[(0,Y.jsx)(B,{cooldown:p}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${b}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:v,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):m?(0,Y.jsx)(o,{children:`Esc to cancel`}):(0,Y.jsx)(o,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsx)(o,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(d,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(d,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(o,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(o,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(o,{dimColor:!0,children:g})]})}),p&&f.status===`cooldown`&&(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsxs)(o,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,M(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(o,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=S();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),j(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${h(i)?``:` · model set to ${b}`} · ${C(T(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!O())return null;await p();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=S();return j(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{a(),J=t(a(),1),l(),U(),L(),A(),F(),D(),N(),g(),w(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Q as i,Rn as a,b as o,f as s,nt as c,t as l,v as u,x as d}from"./src-KjMLauwe.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Di as p,Ps as m,Si as h,ci as g,dc as _,di as v,fi as y,li as b,lo as x,mi as S,oi as C,oo as w,si as T,ui as E,vi as D,xi as O,yc as k}from"./paths-4ZWdjPP4.js";import{n as A,r as j}from"./analytics-DqMQntaB.js";import{d as M,x as N}from"./startupProfiler-rCtNuhXz.js";import{fC as P,lC as F,uC as I}from"./loadAgentsDir-CQF8qhne.js";import{t as L}from"./useKeybinding-DOjEx42R.js";import{n as R,t as z}from"./systemTheme-eRWGHYSL.js";function B({cooldown:e}){return e?(0,H.jsx)(o,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(o,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let r=R(_().theme);return t?n.dim(u(`promptBorder`,r)(`↯`)):u(`fastMode`,r)(`↯`)}var H,U=e((()=>{r(),a(),m(),l(),k(),z(),H=f()}));function W(e,t){E(),x(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!h(e.mainLoopModel);return{...e,...t?{mainLoopModel:v(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let n=I(e=>e.mainLoopModel),r=I(e=>e.fastMode),a=P(),[l,u]=(0,J.useState)(r??!1),f=y(),p=f.status===`cooldown`,m=t!==null,g=C(T(!0));function _(){m||(W(l,a),j(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${h(n)?``:` · model set to ${b}`} · ${g}`):(a(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function v(){if(m){r&&W(!1,a),e(`Fast mode OFF`,{display:`system`});return}e(r?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function x(){m||u(e=>!e)}return c({"confirm:yes":_,"confirm:nextField":x,"confirm:next":x,"confirm:previous":x,"confirm:cycleMode":x,"confirm:toggle":x},{context:`Confirmation`}),(0,Y.jsxs)(s,{title:(0,Y.jsxs)(o,{children:[(0,Y.jsx)(B,{cooldown:p}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${b}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:v,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):m?(0,Y.jsx)(o,{children:`Esc to cancel`}):(0,Y.jsx)(o,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsx)(o,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(d,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(d,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(o,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(o,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(o,{dimColor:!0,children:g})]})}),p&&f.status===`cooldown`&&(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsxs)(o,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,M(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(o,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=S();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),j(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${h(i)?``:` · model set to ${b}`} · ${C(T(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!O())return null;await p();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=S();return j(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{a(),J=t(a(),1),l(),U(),L(),A(),F(),D(),N(),g(),w(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Feedback-Diw8XUr-.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-KjMLauwe.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Feedback-DfkBCvva.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};
@@ -1 +1 @@
1
- import{F as e,I as t,L as n,M as r,N as i,P as a,R as o,j as s,z as c}from"./paths-Ci1iwL5Y.js";r();export{s as getEventSamplingConfig,i as initialize1PEventLogging,a as is1PEventLoggingEnabled,e as logEventTo1P,t as logGrowthBookExperimentTo1P,n as reinitialize1PEventLoggingIfConfigChanged,o as shouldSampleEvent,c as shutdown1PEventLogging};
1
+ import{F as e,I as t,L as n,M as r,N as i,P as a,R as o,j as s,z as c}from"./paths-4ZWdjPP4.js";r();export{s as getEventSamplingConfig,i as initialize1PEventLogging,a as is1PEventLoggingEnabled,e as logEventTo1P,t as logGrowthBookExperimentTo1P,n as reinitialize1PEventLoggingIfConfigChanged,o as shouldSampleEvent,c as shutdown1PEventLogging};
@@ -1 +1 @@
1
- import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{U as n,l as r,p as i,z as a}from"./debug-otxXY3j-.js";import{O as o,k as s}from"./rcDebugLog-C42A0pX1.js";import{i as c}from"./workSecret-DJu7k30X.js";import{t as l}from"./ccrClient-BI1QPLmN.js";import{n as u,t as d}from"./SSETransport-D3e5KNL3.js";u(),r(),n(),o();function f(e){return{write:t=>e.write(t),writeBatch:t=>e.writeBatch(t),close:()=>e.close(),isConnectedStatus:()=>e.isConnectedStatus(),getStateLabel:()=>e.getStateLabel(),setOnData:t=>e.setOnData(t),setOnClose:t=>e.setOnClose(t),setOnConnect:t=>e.setOnConnect(t),connect:()=>void e.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return e.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function p(e){let{sessionUrl:t,ingressToken:n,sessionId:r,initialSequenceNum:o,getAuthToken:u}=e,f;u?f=()=>{let e=u();return e?{Authorization:`Bearer ${e}`}:{}}:s(n);let p=e.epoch??await c(t,n);i(`[bridge:repl] CCR v2: worker sessionId=${r} epoch=${p}${e.epoch===void 0?` (via registerWorker)`:` (from /bridge)`}`);let m=new URL(t);m.pathname=m.pathname.replace(/\/$/,``)+`/worker/events/stream`;let h=new d(m,{},r,void 0,o,f),g,_=new l(h,new URL(t),{getAuthHeaders:f,heartbeatIntervalMs:e.heartbeatIntervalMs,heartbeatJitterFraction:e.heartbeatJitterFraction,onEpochMismatch:()=>{i(`[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery`);try{_.close(),h.close(),g?.(4090)}catch(e){i(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${a(e)}`,{level:`error`})}throw Error(`epoch superseded`)}});h.setOnEvent(e=>{_.reportDelivery(e.event_id,`received`),_.reportDelivery(e.event_id,`processed`)});let v,y=!1,b=!1;return{write(e){return _.writeEvent(e)},async writeBatch(e){for(let t of e){if(b)break;await _.writeEvent(t)}},close(){b=!0,_.close(),h.close()},isConnectedStatus(){return y},getStateLabel(){return h.isClosedStatus()?`closed`:h.isConnectedStatus()?y?`connected`:`init`:`connecting`},setOnData(e){h.setOnData(e)},setOnClose(e){g=e,h.setOnClose(t=>{_.close(),e(t??4092)})},setOnConnect(e){v=e},getLastSequenceNum(){return h.getLastSequenceNum()},droppedBatchCount:0,reportState(e){_.reportState(e)},reportMetadata(e){_.reportMetadata(e)},reportDelivery(e,t){_.reportDelivery(e,t)},flush(){return _.flush()},connect(){e.outboundOnly||h.connect(),_.initialize(p).then(()=>{y=!0,i(`[bridge:repl] v2 transport ready for writes (epoch=${p}, sse=${h.isConnectedStatus()?`open`:`opening`})`),v?.()},e=>{i(`[bridge:repl] CCR v2 initialize failed: ${a(e)}`,{level:`error`}),_.close(),h.close(),g?.(4091)})}}}e();var m=class{constructor(){t(this,`_active`,!1),t(this,`_pending`,[])}get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...e){return this._active?(this._pending.push(...e),!0):!1}drop(){this._active=!1;let e=this._pending.length;return this._pending.length=0,e}deactivate(){this._active=!1}};export{f as n,p as r,m as t};
1
+ import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{U as n,l as r,p as i,z as a}from"./debug-otxXY3j-.js";import{O as o,k as s}from"./rcDebugLog-DOXxIr8l.js";import{i as c}from"./workSecret-DJu7k30X.js";import{t as l}from"./ccrClient-D7pEGzQa.js";import{n as u,t as d}from"./SSETransport-D51Jfdaj.js";u(),r(),n(),o();function f(e){return{write:t=>e.write(t),writeBatch:t=>e.writeBatch(t),close:()=>e.close(),isConnectedStatus:()=>e.isConnectedStatus(),getStateLabel:()=>e.getStateLabel(),setOnData:t=>e.setOnData(t),setOnClose:t=>e.setOnClose(t),setOnConnect:t=>e.setOnConnect(t),connect:()=>void e.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return e.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function p(e){let{sessionUrl:t,ingressToken:n,sessionId:r,initialSequenceNum:o,getAuthToken:u}=e,f;u?f=()=>{let e=u();return e?{Authorization:`Bearer ${e}`}:{}}:s(n);let p=e.epoch??await c(t,n);i(`[bridge:repl] CCR v2: worker sessionId=${r} epoch=${p}${e.epoch===void 0?` (via registerWorker)`:` (from /bridge)`}`);let m=new URL(t);m.pathname=m.pathname.replace(/\/$/,``)+`/worker/events/stream`;let h=new d(m,{},r,void 0,o,f),g,_=new l(h,new URL(t),{getAuthHeaders:f,heartbeatIntervalMs:e.heartbeatIntervalMs,heartbeatJitterFraction:e.heartbeatJitterFraction,onEpochMismatch:()=>{i(`[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery`);try{_.close(),h.close(),g?.(4090)}catch(e){i(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${a(e)}`,{level:`error`})}throw Error(`epoch superseded`)}});h.setOnEvent(e=>{_.reportDelivery(e.event_id,`received`),_.reportDelivery(e.event_id,`processed`)});let v,y=!1,b=!1;return{write(e){return _.writeEvent(e)},async writeBatch(e){for(let t of e){if(b)break;await _.writeEvent(t)}},close(){b=!0,_.close(),h.close()},isConnectedStatus(){return y},getStateLabel(){return h.isClosedStatus()?`closed`:h.isConnectedStatus()?y?`connected`:`init`:`connecting`},setOnData(e){h.setOnData(e)},setOnClose(e){g=e,h.setOnClose(t=>{_.close(),e(t??4092)})},setOnConnect(e){v=e},getLastSequenceNum(){return h.getLastSequenceNum()},droppedBatchCount:0,reportState(e){_.reportState(e)},reportMetadata(e){_.reportMetadata(e)},reportDelivery(e,t){_.reportDelivery(e,t)},flush(){return _.flush()},connect(){e.outboundOnly||h.connect(),_.initialize(p).then(()=>{y=!0,i(`[bridge:repl] v2 transport ready for writes (epoch=${p}, sse=${h.isConnectedStatus()?`open`:`opening`})`),v?.()},e=>{i(`[bridge:repl] CCR v2 initialize failed: ${a(e)}`,{level:`error`}),_.close(),h.close(),g?.(4091)})}}}e();var m=class{constructor(){t(this,`_active`,!1),t(this,`_pending`,[])}get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...e){return this._active?(this._pending.push(...e),!0):!1}drop(){this._active=!1;let e=this._pending.length;return this._pending.length=0,e}deactivate(){this._active=!1}};export{f as n,p as r,m as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(void 0);function o({getFpsMetrics:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s(){return(0,r.useContext)(a)}export{s as n,o as t};
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-KjMLauwe.js";import{t as n}from"./jsx-runtime-D-D469L8.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(void 0);function o({getFpsMetrics:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s(){return(0,r.useContext)(a)}export{s as n,o as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{S as r,g as i}from"./paths-Ci1iwL5Y.js";function a(){return{...u,...i(`tengu_malort_pedway`,u)}}function o(){return!0}function s(){return process.env.USER_TYPE===`ant`&&process.env.MONOREPO_ROOT_DIR&&!n(process.env.ALLOW_ANT_COMPUTER_USE_MCP)?!1:o()&&a().enabled}function c(){let{enabled:e,coordinateMode:t,...n}=a();return n}function l(){return d??(d=a().coordinateMode),d}var u,d,f=e((()=>{r(),t(),u={enabled:!0,pixelValidation:!1,clipboardPasteMultiline:!0,mouseAnimation:!0,hideBeforeAction:!0,autoTargetDisplay:!0,clipboardGuard:!0,coordinateMode:`pixels`}}));export{f as i,s as n,c as r,l as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{S as r,g as i}from"./paths-4ZWdjPP4.js";function a(){return{...u,...i(`tengu_malort_pedway`,u)}}function o(){return!0}function s(){return process.env.USER_TYPE===`ant`&&process.env.MONOREPO_ROOT_DIR&&!n(process.env.ALLOW_ANT_COMPUTER_USE_MCP)?!1:o()&&a().enabled}function c(){let{enabled:e,coordinateMode:t,...n}=a();return n}function l(){return d??(d=a().coordinateMode),d}var u,d,f=e((()=>{r(),t(),u={enabled:!0,pixelValidation:!1,clipboardPasteMultiline:!0,mouseAnimation:!0,hideBeforeAction:!0,autoTargetDisplay:!0,clipboardGuard:!0,coordinateMode:`pixels`}}));export{f as i,s as n,c as r,l as t};
@@ -0,0 +1 @@
1
+ import{i as e,n as t}from"./gates-C66Nz9b2.js";e();export{t as getChicagoEnabled};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{o as a,u as o}from"./proxy-CF7ZDxaW.js";import{G_ as s,K_ as c,Qo as l,Uo as u,W_ as d,Xo as f,dD as p,mo as m,q_ as h,st as g,uD as _,ut as v}from"./loadAgentsDir-C_wFhytF.js";import{G as y,H as b,K as x,P as S,U as C,W as w,q as T}from"./rcDebugLog-C42A0pX1.js";import{n as E,r as D}from"./SSETransport-D3e5KNL3.js";import{randomUUID as O}from"crypto";function k(){return(process.env.GEMINI_BASE_URL||M).replace(/\/+$/,``)}function A(e){let t=e.replace(/^\/+/,``);return t.startsWith(`models/`)?t:`models/${t}`}async function*j(e){let t=await(e.fetchOverride??fetch)(`${k()}/${A(e.model)}:streamGenerateContent?alt=sse`,{method:`POST`,headers:{"Content-Type":`application/json`,"x-goog-api-key":process.env.GEMINI_API_KEY||``},body:JSON.stringify(e.body),signal:e.signal,...a({forAnthropicAPI:!1})});if(!t.ok){let e=await t.text();throw Error(`Gemini API request failed (${t.status} ${t.statusText}): ${e||`empty response body`}`)}if(!t.body)throw Error(`Gemini API returned no response body`);let n=t.body.getReader(),r=new TextDecoder,o=``;try{for(;;){let{done:e,value:t}=await n.read();if(e)break;o+=r.decode(t,N);let{frames:a,remaining:s}=D(o);o=s;for(let e of a)if(!(!e.data||e.data===`[DONE]`))try{yield JSON.parse(e.data)}catch(e){throw Error(`Failed to parse Gemini SSE payload: ${i(e)}`)}}o+=r.decode();let{frames:e}=D(o);for(let t of e)if(!(!t.data||t.data===`[DONE]`))try{yield JSON.parse(t.data)}catch(e){throw Error(`Failed to parse trailing Gemini SSE payload: ${i(e)}`)}}finally{n.releaseLock()}}var M,N,P=e((()=>{E(),t(),o(),M=`https://generativelanguage.googleapis.com/v1beta`,N={stream:!0}}));async function*F(e,t,n,i,a,o){try{let u=T(a.model),m=l(e,n),h=await Promise.all(n.map(e=>v(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model}))),g=h.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),{contents:_,systemInstruction:S}=y(m,t),E=w(g),D=C(a.toolChoice),k=j({model:u,signal:i,fetchOverride:a.fetchOverride,body:{contents:_,...S&&{systemInstruction:S},...E.length>0&&{tools:E},...D&&{toolConfig:{functionCallingConfig:D}},generationConfig:{...a.temperatureOverride!==void 0&&{temperature:a.temperatureOverride},...o.type!==`disabled`&&{thinkingConfig:{includeThoughts:!0,...o.type===`enabled`&&{thinkingBudget:o.budgetTokens}}}}}});r(`[Gemini] Calling model=${u}, messages=${_.length}, tools=${E.length}`);let A=b(k,u),M={},N=[],P=null,F=0,I=Date.now();for await(let e of A){switch(e.type){case`message_start`:P=e.message,F=Date.now()-I;break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.type===`thinking`?r.signature=n.signature:r[x]=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let r={message:{...P,content:f([t],n,a.agentId)},requestId:void 0,type:`assistant`,uuid:O(),timestamp:new Date().toISOString()};N.push(r),yield r;break}case`message_delta`:case`message_stop`:break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:F}:void 0}}p(a.langfuseTrace??null,{model:u,provider:`gemini`,input:d(m,t),output:s(N),usage:{input_tokens:0,output_tokens:0},startTime:new Date(I),endTime:new Date,completionStartTime:F>0?new Date(I+F):void 0,tools:c(h),thinking:o.type===`disabled`?void 0:{type:o.type,...o.type===`enabled`&&{budgetTokens:o.budgetTokens}}})}catch(e){let t=e instanceof Error?e.message:String(e);r(`[Gemini] Error: ${t}`,{level:`error`}),yield m({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{g(),n(),u(),_(),h(),P(),S()}))();export{F as queryModelGemini};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{o as a,u as o}from"./proxy-CF7ZDxaW.js";import{G_ as s,H_ as c,Qo as l,U_ as u,Uo as d,W_ as f,Xo as p,dD as m,mo as h,st as g,uD as _,ut as v}from"./loadAgentsDir-CQF8qhne.js";import{G as y,H as b,K as x,P as S,U as C,W as w,q as T}from"./rcDebugLog-DOXxIr8l.js";import{n as E,r as D}from"./SSETransport-D51Jfdaj.js";import{randomUUID as O}from"crypto";function k(){return(process.env.GEMINI_BASE_URL||M).replace(/\/+$/,``)}function A(e){let t=e.replace(/^\/+/,``);return t.startsWith(`models/`)?t:`models/${t}`}async function*j(e){let t=await(e.fetchOverride??fetch)(`${k()}/${A(e.model)}:streamGenerateContent?alt=sse`,{method:`POST`,headers:{"Content-Type":`application/json`,"x-goog-api-key":process.env.GEMINI_API_KEY||``},body:JSON.stringify(e.body),signal:e.signal,...a({forAnthropicAPI:!1})});if(!t.ok){let e=await t.text();throw Error(`Gemini API request failed (${t.status} ${t.statusText}): ${e||`empty response body`}`)}if(!t.body)throw Error(`Gemini API returned no response body`);let n=t.body.getReader(),r=new TextDecoder,o=``;try{for(;;){let{done:e,value:t}=await n.read();if(e)break;o+=r.decode(t,N);let{frames:a,remaining:s}=D(o);o=s;for(let e of a)if(!(!e.data||e.data===`[DONE]`))try{yield JSON.parse(e.data)}catch(e){throw Error(`Failed to parse Gemini SSE payload: ${i(e)}`)}}o+=r.decode();let{frames:e}=D(o);for(let t of e)if(!(!t.data||t.data===`[DONE]`))try{yield JSON.parse(t.data)}catch(e){throw Error(`Failed to parse trailing Gemini SSE payload: ${i(e)}`)}}finally{n.releaseLock()}}var M,N,P=e((()=>{E(),t(),o(),M=`https://generativelanguage.googleapis.com/v1beta`,N={stream:!0}}));async function*F(e,t,n,i,a,o){try{let s=T(a.model),d=l(e,n),h=await Promise.all(n.map(e=>v(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model}))),g=h.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),{contents:_,systemInstruction:S}=y(d,t),E=w(g),D=C(a.toolChoice),k=j({model:s,signal:i,fetchOverride:a.fetchOverride,body:{contents:_,...S&&{systemInstruction:S},...E.length>0&&{tools:E},...D&&{toolConfig:{functionCallingConfig:D}},generationConfig:{...a.temperatureOverride!==void 0&&{temperature:a.temperatureOverride},...o.type!==`disabled`&&{thinkingConfig:{includeThoughts:!0,...o.type===`enabled`&&{thinkingBudget:o.budgetTokens}}}}}});r(`[Gemini] Calling model=${s}, messages=${_.length}, tools=${E.length}`);let A=b(k,s),M={},N=[],P=null,F=0,I=Date.now();for await(let e of A){switch(e.type){case`message_start`:P=e.message,F=Date.now()-I;break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.type===`thinking`?r.signature=n.signature:r[x]=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let r={message:{...P,content:p([t],n,a.agentId)},requestId:void 0,type:`assistant`,uuid:O(),timestamp:new Date().toISOString()};N.push(r),yield r;break}case`message_delta`:case`message_stop`:break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:F}:void 0}}m(a.langfuseTrace??null,{model:s,provider:`gemini`,input:c(d,t),output:u(N),usage:{input_tokens:0,output_tokens:0},startTime:new Date(I),endTime:new Date,completionStartTime:F>0?new Date(I+F):void 0,tools:f(h),thinking:o.type===`disabled`?void 0:{type:o.type,...o.type===`enabled`&&{budgetTokens:o.budgetTokens}}})}catch(e){let t=e instanceof Error?e.message:String(e);r(`[Gemini] Error: ${t}`,{level:`error`}),yield h({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{g(),n(),d(),_(),s(),P(),S()}))();export{F as queryModelGemini};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{g as t}from"./client-_sjL0I7A.js";import{l as n,p as r}from"./debug-otxXY3j-.js";import{t as i}from"./sdk-DEtgRZvI.js";import{Bl as a,Eo as o,Ll as s,Rl as c,Uo as l,jo as u}from"./loadAgentsDir-C_wFhytF.js";async function d(){try{let{getResolvedLanguage:e}=await import(`./language-BoKr5ylY.js`);return e()===`zh`?m:p}catch{return p}}async function f(e){let n=s();if(!n)return r(`[recap] no CacheSafeParams saved, skipping`),{kind:`no-turn`};let i=new AbortController;e.addEventListener(`abort`,()=>i.abort(),{once:!0});try{let{messages:t}=await a({promptMessages:[o({content:await d()})],cacheSafeParams:n,canUseTool:async()=>({behavior:`deny`,message:`Recap cannot use tools`,decisionReason:{type:`other`,reason:`away_summary`}}),overrides:{abortController:i},querySource:`away_summary`,forkLabel:`away_summary`,maxTurns:1,skipCacheWrite:!0,skipTranscript:!0});if(e.aborted)return{kind:`aborted`};let r=t.find(e=>e.type===`assistant`&&e.isApiErrorMessage);if(r)return{kind:`api-error`,text:u(r)??``};let s=t.filter(e=>e.type===`assistant`&&!e.isApiErrorMessage).pop();if(!s)return{kind:`failed`};let c=u(s);return!c||c.trim().length===0?{kind:`failed`}:{kind:`ok`,text:c.trim()}}catch(n){return n instanceof t||e.aborted||i.signal.aborted?{kind:`aborted`}:(r(`[recap] generation failed: ${n}`),{kind:`failed`})}}var p,m;e((()=>{i(),n(),c(),l(),p=`The user stepped away and is coming back. Recap in under 40 words, 1-2 plain sentences, no markdown. Lead with the overall goal and current task, then the one next action. Skip root-cause narrative, fix internals, secondary to-dos, and em-dash tangents.`,m=`用户离开后回来了。用中文写 1-2 句话,不超过 60 字,无 markdown。先说明高层目标和当前任务,再说明下一步操作。跳过根因分析和次要待办。`}))();export{f as generateRecap};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{g as t}from"./client-_sjL0I7A.js";import{l as n,p as r}from"./debug-otxXY3j-.js";import{t as i}from"./sdk-DEtgRZvI.js";import{Bl as a,Eo as o,Ll as s,Rl as c,Uo as l,jo as u}from"./loadAgentsDir-CQF8qhne.js";async function d(){try{let{getResolvedLanguage:e}=await import(`./language-CSDpzbTz.js`);return e()===`zh`?m:p}catch{return p}}async function f(e){let n=s();if(!n)return r(`[recap] no CacheSafeParams saved, skipping`),{kind:`no-turn`};let i=new AbortController;e.addEventListener(`abort`,()=>i.abort(),{once:!0});try{let{messages:t}=await a({promptMessages:[o({content:await d()})],cacheSafeParams:n,canUseTool:async()=>({behavior:`deny`,message:`Recap cannot use tools`,decisionReason:{type:`other`,reason:`away_summary`}}),overrides:{abortController:i},querySource:`away_summary`,forkLabel:`away_summary`,maxTurns:1,skipCacheWrite:!0,skipTranscript:!0});if(e.aborted)return{kind:`aborted`};let r=t.find(e=>e.type===`assistant`&&e.isApiErrorMessage);if(r)return{kind:`api-error`,text:u(r)??``};let s=t.filter(e=>e.type===`assistant`&&!e.isApiErrorMessage).pop();if(!s)return{kind:`failed`};let c=u(s);return!c||c.trim().length===0?{kind:`failed`}:{kind:`ok`,text:c.trim()}}catch(n){return n instanceof t||e.aborted||i.signal.aborted?{kind:`aborted`}:(r(`[recap] generation failed: ${n}`),{kind:`failed`})}}var p,m;e((()=>{i(),n(),c(),l(),p=`The user stepped away and is coming back. Recap in under 40 words, 1-2 plain sentences, no markdown. Lead with the overall goal and current task, then the one next action. Skip root-cause narrative, fix internals, secondary to-dos, and em-dash tangents.`,m=`用户离开后回来了。用中文写 1-2 句话,不超过 60 字,无 markdown。先说明高层目标和当前任务,再说明下一步操作。跳过根因分析和次要待办。`}))();export{f as generateRecap};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{s as a,u as o}from"./types-KeqFPzY5.js";import{Uo as s,ck as c,ko as l,nt as u,tt as d}from"./loadAgentsDir-C_wFhytF.js";import{X as f}from"./rcDebugLog-C42A0pX1.js";import{r as p,t as m}from"./sessionTitle-DEKvIVCK.js";async function h(e,t){let n=m(e);if(!n)return null;try{let e=await u({systemPrompt:f([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:t,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),r=o(Array.isArray(e.message.content)?l(e.message.content):e.message.content);return r&&typeof r==`object`&&`name`in r&&typeof r.name==`string`?r.name:null}catch(e){return r(`generateSessionName failed: ${i(e)}`,{level:`error`}),null}}var g=e((()=>{d(),n(),t(),a(),s(),p(),c()}));export{g as n,h as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{s as a,u as o}from"./types-KeqFPzY5.js";import{Uo as s,ck as c,ko as l,nt as u,tt as d}from"./loadAgentsDir-CQF8qhne.js";import{X as f}from"./rcDebugLog-DOXxIr8l.js";import{r as p,t as m}from"./sessionTitle-CSU5-VK9.js";async function h(e,t){let n=m(e);if(!n)return null;try{let e=await u({systemPrompt:f([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:t,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),r=o(Array.isArray(e.message.content)?l(e.message.content):e.message.content);return r&&typeof r==`object`&&`name`in r&&typeof r.name==`string`?r.name:null}catch(e){return r(`generateSessionName failed: ${i(e)}`,{level:`error`}),null}}var g=e((()=>{d(),n(),t(),a(),s(),p(),c()}));export{g as n,h as t};
@@ -1 +1 @@
1
- import{cn as e,ot as t}from"./state-sIHsFpDu.js";import{Cc as n,Jc as r,Uc as i,dc as a,yc as o}from"./paths-Ci1iwL5Y.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{E as l,T as u,r as d,v as f}from"./git-C0IuvuIy.js";import{a as p,n as m,o as h}from"./detectRepository-2ICvGD0U.js";import{realpath as g}from"fs/promises";e(),o(),s(),p(),i(),l(),f();async function _(){try{let e=await m();if(!e){c(`Not in a GitHub repository, skipping path mapping update`);return}let r=t(),i=d(r)??r,o;try{o=(await g(i)).normalize(`NFC`)}catch{o=i}let s=e.toLowerCase(),l=a().githubRepoPaths?.[s]??[];if(l[0]===o){c(`Path ${o} already tracked for repo ${s}`);return}let u=l.filter(e=>e!==o),f=[o,...u];n(e=>({...e,githubRepoPaths:{...e.githubRepoPaths,[s]:f}})),c(`Added ${o} to tracked paths for repo ${s}`)}catch(e){c(`Error updating repo path mapping: ${e}`)}}function v(e){let t=a(),n=e.toLowerCase();return t.githubRepoPaths?.[n]??[]}async function y(e){let t=await Promise.all(e.map(r));return e.filter((e,n)=>t[n])}async function b(e,t){try{let n=await u(e);if(!n)return!1;let r=h(n);return r?r.toLowerCase()===t.toLowerCase():!1}catch{return!1}}function x(e,t){let r=a(),i=e.toLowerCase(),o=r.githubRepoPaths?.[i]??[],s=o.filter(e=>e!==t);if(s.length===o.length)return;let l={...r.githubRepoPaths};s.length===0?delete l[i]:l[i]=s,n(e=>({...e,githubRepoPaths:l})),c(`Removed ${t} from tracked paths for repo ${i}`)}export{b as a,_ as i,v as n,x as r,y as t};
1
+ import{cn as e,ot as t}from"./state-sIHsFpDu.js";import{Cc as n,Jc as r,Uc as i,dc as a,yc as o}from"./paths-4ZWdjPP4.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{E as l,T as u,r as d,v as f}from"./git-C0IuvuIy.js";import{a as p,n as m,o as h}from"./detectRepository-2ICvGD0U.js";import{realpath as g}from"fs/promises";e(),o(),s(),p(),i(),l(),f();async function _(){try{let e=await m();if(!e){c(`Not in a GitHub repository, skipping path mapping update`);return}let r=t(),i=d(r)??r,o;try{o=(await g(i)).normalize(`NFC`)}catch{o=i}let s=e.toLowerCase(),l=a().githubRepoPaths?.[s]??[];if(l[0]===o){c(`Path ${o} already tracked for repo ${s}`);return}let u=l.filter(e=>e!==o),f=[o,...u];n(e=>({...e,githubRepoPaths:{...e.githubRepoPaths,[s]:f}})),c(`Added ${o} to tracked paths for repo ${s}`)}catch(e){c(`Error updating repo path mapping: ${e}`)}}function v(e){let t=a(),n=e.toLowerCase();return t.githubRepoPaths?.[n]??[]}async function y(e){let t=await Promise.all(e.map(r));return e.filter((e,n)=>t[n])}async function b(e,t){try{let n=await u(e);if(!n)return!1;let r=h(n);return r?r.toLowerCase()===t.toLowerCase():!1}catch{return!1}}function x(e,t){let r=a(),i=e.toLowerCase(),o=r.githubRepoPaths?.[i]??[],s=o.filter(e=>e!==t);if(s.length===o.length)return;let l={...r.githubRepoPaths};s.length===0?delete l[i]:l[i]=s,n(e=>({...e,githubRepoPaths:l})),c(`Removed ${t} from tracked paths for repo ${i}`)}export{b as a,_ as i,v as n,x as r,y as t};
@@ -1,3 +1,3 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{Bm as o,By as s,Fm as c,Hm as l,Im as u,KO as d,Lm as f,Mm as p,Nm as m,Pm as h,Um as g,Wm as _,ZO as v,aS as y,cd as b,od as x,sd as S,zm as C}from"./loadAgentsDir-C_wFhytF.js";import{n as w,t as T}from"./PermissionDialog-_WQPRYHQ.js";function E({currentGoal:e,newObjective:t,onConfirm:r,onCancel:a}){function o(e){e===`yes`?r():a()}let s=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`;return(0,D.jsx)(T,{color:`warning`,title:`Replace active goal?`,children:(0,D.jsxs)(i,{flexDirection:`column`,marginTop:1,paddingX:1,children:[(0,D.jsx)(n,{children:`A goal is already in progress. Replacing it will reset all progress and counters.`}),(0,D.jsxs)(i,{marginTop:1,flexDirection:`column`,children:[(0,D.jsx)(n,{dimColor:!0,children:`Current goal:`}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Objective: `}),e.objective]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Status: `}),u(e.status)]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Time: `}),c(e)]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Tokens: `}),s]})]}),(0,D.jsxs)(i,{marginTop:1,flexDirection:`column`,children:[(0,D.jsx)(n,{dimColor:!0,children:`New objective:`}),(0,D.jsx)(n,{children:t})]}),(0,D.jsx)(i,{marginTop:1,children:(0,D.jsx)(y,{options:[{label:`Yes, replace the goal`,value:`yes`},{label:`No, keep the current goal`,value:`no`}],onChange:o,onCancel:a})})]})})}var D,O=e((()=>{t(),r(),s(),w(),o(),D=a()}));function k(e){let t=e.split(`
2
- `)[0]??e;return t.length<=I?t:t.slice(0,I)+`…`}function A(){v(e=>e.origin===`goal-continuation`||e.origin===`goal-budget-limit`)}function j(){let e=f();if(!e)return"No active goal. Set one with `/goal <objective>`.";let t=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`,n=[`Goal: ${e.objective}`,`Status: ${u(e.status)}`,`Time: ${c(e)}`,`Tokens: ${t}`,`Continuation turns: ${e.turnsExecuted}`];return e.status===`max_turns`&&n.push("Hint: Max continuation turns reached (150). Run `/goal continue` to reset and continue."),n.join(`
3
- `)}function M(e){return _(e),C(),S(),`Goal set.`}async function N(e,t,n){let r=n.trim();if(!r||r.toLowerCase()===`status`)return e(j(),{display:`system`}),null;let i=r.toLowerCase();if(i===`clear`){let t=p();return t&&(b(),A()),e(t?`Goal cleared.`:`No active goal to clear.`,{display:`system`}),null}if(i===`pause`){let t=l();return t&&(S(),A()),e(t?`Goal paused.`:`No active goal to pause.`,{display:`system`}),null}if(i===`resume`){if(f()?.status===`max_turns`)return e("Goal reached max continuation turns (150). Run `/goal continue` to reset turn counter and continue.",{display:`system`}),null;let t=g();return t&&S(),e(t?`Goal resumed.`:`No paused goal to resume.`,{display:`system`,shouldQuery:!!t}),null}if(i===`continue`){let t=h();return t&&S(),e(t?`Goal continuation counter reset (0/150). Continuing...`:`Current goal is not in max-turns state.`,{display:`system`,shouldQuery:!!t}),null}if(i===`complete`){let t=m();return t&&(S(),A()),e(t?`Goal marked complete.`:`No active goal to complete.`,{display:`system`}),null}if(r.length>F)return e(`Goal objective is too long (${r.length} chars; limit ${F}). Save the detailed instructions to a file and reference it from a shorter objective.`,{display:`system`}),null;let a=f();return a&&a.status!==`complete`?(0,P.jsx)(E,{currentGoal:a,newObjective:r,onConfirm:()=>{A(),e(M(r),{display:`system`,shouldQuery:!0,displayArgs:k(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]})},onCancel:()=>{e(`Kept the current goal. New objective discarded.`,{display:`system`})}}):(e(M(r),{display:`system`,shouldQuery:!0,displayArgs:k(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]}),null)}var P,F,I;e((()=>{t(),o(),x(),d(),O(),P=a(),F=4e3,I=80}))();export{N as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-KjMLauwe.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{Bm as o,Fm as s,Hm as c,Im as l,KO as u,Lm as d,Mm as f,Nm as p,Pm as m,Ry as h,Um as g,Wm as _,ZO as v,aS as y,ad as b,id as x,od as S,zm as C}from"./loadAgentsDir-CQF8qhne.js";import{n as w,t as T}from"./PermissionDialog-BrRBxx5o.js";function E({currentGoal:e,newObjective:t,onConfirm:r,onCancel:a}){function o(e){e===`yes`?r():a()}let c=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`;return(0,D.jsx)(T,{color:`warning`,title:`Replace active goal?`,children:(0,D.jsxs)(i,{flexDirection:`column`,marginTop:1,paddingX:1,children:[(0,D.jsx)(n,{children:`A goal is already in progress. Replacing it will reset all progress and counters.`}),(0,D.jsxs)(i,{marginTop:1,flexDirection:`column`,children:[(0,D.jsx)(n,{dimColor:!0,children:`Current goal:`}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Objective: `}),e.objective]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Status: `}),l(e.status)]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Time: `}),s(e)]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Tokens: `}),c]})]}),(0,D.jsxs)(i,{marginTop:1,flexDirection:`column`,children:[(0,D.jsx)(n,{dimColor:!0,children:`New objective:`}),(0,D.jsx)(n,{children:t})]}),(0,D.jsx)(i,{marginTop:1,children:(0,D.jsx)(y,{options:[{label:`Yes, replace the goal`,value:`yes`},{label:`No, keep the current goal`,value:`no`}],onChange:o,onCancel:a})})]})})}var D,O=e((()=>{t(),r(),h(),w(),o(),D=a()}));function k(e){let t=e.split(`
2
+ `)[0]??e;return t.length<=I?t:t.slice(0,I)+`…`}function A(){v(e=>e.origin===`goal-continuation`||e.origin===`goal-budget-limit`)}function j(){let e=d();if(!e)return"No active goal. Set one with `/goal <objective>`.";let t=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`,n=[`Goal: ${e.objective}`,`Status: ${l(e.status)}`,`Time: ${s(e)}`,`Tokens: ${t}`,`Continuation turns: ${e.turnsExecuted}`];return e.status===`max_turns`&&n.push("Hint: Max continuation turns reached (150). Run `/goal continue` to reset and continue."),n.join(`
3
+ `)}function M(e){return _(e),C(),b(),`Goal set.`}async function N(e,t,n){let r=n.trim();if(!r||r.toLowerCase()===`status`)return e(j(),{display:`system`}),null;let i=r.toLowerCase();if(i===`clear`){let t=f();return t&&(S(),A()),e(t?`Goal cleared.`:`No active goal to clear.`,{display:`system`}),null}if(i===`pause`){let t=c();return t&&(b(),A()),e(t?`Goal paused.`:`No active goal to pause.`,{display:`system`}),null}if(i===`resume`){if(d()?.status===`max_turns`)return e("Goal reached max continuation turns (150). Run `/goal continue` to reset turn counter and continue.",{display:`system`}),null;let t=g();return t&&b(),e(t?`Goal resumed.`:`No paused goal to resume.`,{display:`system`,shouldQuery:!!t}),null}if(i===`continue`){let t=m();return t&&b(),e(t?`Goal continuation counter reset (0/150). Continuing...`:`Current goal is not in max-turns state.`,{display:`system`,shouldQuery:!!t}),null}if(i===`complete`){let t=p();return t&&(b(),A()),e(t?`Goal marked complete.`:`No active goal to complete.`,{display:`system`}),null}if(r.length>F)return e(`Goal objective is too long (${r.length} chars; limit ${F}). Save the detailed instructions to a file and reference it from a shorter objective.`,{display:`system`}),null;let a=d();return a&&a.status!==`complete`?(0,P.jsx)(E,{currentGoal:a,newObjective:r,onConfirm:()=>{A(),e(M(r),{display:`system`,shouldQuery:!0,displayArgs:k(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]})},onCancel:()=>{e(`Kept the current goal. New objective discarded.`,{display:`system`})}}):(e(M(r),{display:`system`,shouldQuery:!0,displayArgs:k(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]}),null)}var P,F,I;e((()=>{t(),o(),x(),u(),O(),P=a(),F=4e3,I=80}))();export{N as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{ai as t,ci as n}from"./paths-Ci1iwL5Y.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{B_ as a,G_ as o,K_ as s,Qo as c,Tm as l,Uo as u,V_ as d,W_ as f,Xo as p,dD as m,km as h,mo as g,q_ as _,st as v,uD as y,ut as b}from"./loadAgentsDir-C_wFhytF.js";import{F as x,I as S,J as C,L as w,P as T,R as E}from"./rcDebugLog-C42A0pX1.js";import{n as D,t as O}from"./openaiShared-C-AuktRP.js";import{randomUUID as k}from"crypto";async function*A(e,n,r,u,d){try{let h=C(d.model),g=c(e,r),_=await Promise.all(r.map(e=>b(e,{getToolPermissionContext:d.getToolPermissionContext,tools:r,agents:d.agents,allowedAgentTypes:d.allowedAgentTypes,model:d.model}))),v=_.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),y=E(g,n),T=w(v),O=S(d.toolChoice),A=a({maxRetries:0,fetchOverride:d.fetchOverride,source:d.querySource});i(`[Grok] Calling model=${h}, messages=${y.length}, tools=${T.length}`);let j=x(await A.chat.completions.create({model:h,messages:y,...T.length>0&&{tools:T,...O&&{tool_choice:O}},stream:!0,stream_options:{include_usage:!0},...d.temperatureOverride!==void 0&&{temperature:d.temperatureOverride}},{signal:u}),h),M={},N=[],P=null,F={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},I=0,L=Date.now();for await(let e of j){switch(e.type){case`message_start`:P=e.message,I=Date.now()-L,e.message.usage&&(F=D(F,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let n={message:{...P,content:p([t],r,d.agentId)},requestId:void 0,type:`assistant`,uuid:k(),timestamp:new Date().toISOString()};N.push(n),yield n;break}case`message_delta`:{let t=e.usage;t&&(F=D(F,t));break}case`message_stop`:break}e.type===`message_stop`&&F.input_tokens+F.output_tokens>0&&l(t(h,F),F,d.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:I}:void 0}}m(d.langfuseTrace??null,{model:h,provider:`grok`,input:f(g,n),output:o(N),usage:{input_tokens:F.input_tokens,output_tokens:F.output_tokens,cache_creation_input_tokens:F.cache_creation_input_tokens,cache_read_input_tokens:F.cache_read_input_tokens},startTime:new Date(L),endTime:new Date,completionStartTime:I>0?new Date(L+I):void 0,tools:s(_)})}catch(e){let t=e instanceof Error?e.message:String(e);i(`[Grok] Error: ${t}`,{level:`error`}),yield g({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{d(),O(),T(),u(),v(),r(),h(),n(),y(),_()}))();export{A as queryModelGrok};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{ai as t,ci as n}from"./paths-4ZWdjPP4.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{B_ as a,G_ as o,H_ as s,Qo as c,Tm as l,U_ as u,Uo as d,V_ as f,W_ as p,Xo as m,dD as h,km as g,mo as _,st as v,uD as y,ut as b}from"./loadAgentsDir-CQF8qhne.js";import{F as x,I as S,J as C,L as w,P as T,R as E}from"./rcDebugLog-DOXxIr8l.js";import{n as D,t as O}from"./openaiShared-BkVgd2rZ.js";import{randomUUID as k}from"crypto";async function*A(e,n,r,o,d){try{let f=C(d.model),g=c(e,r),_=await Promise.all(r.map(e=>b(e,{getToolPermissionContext:d.getToolPermissionContext,tools:r,agents:d.agents,allowedAgentTypes:d.allowedAgentTypes,model:d.model}))),v=_.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),y=E(g,n),T=w(v),O=S(d.toolChoice),A=a({maxRetries:0,fetchOverride:d.fetchOverride,source:d.querySource});i(`[Grok] Calling model=${f}, messages=${y.length}, tools=${T.length}`);let j=x(await A.chat.completions.create({model:f,messages:y,...T.length>0&&{tools:T,...O&&{tool_choice:O}},stream:!0,stream_options:{include_usage:!0},...d.temperatureOverride!==void 0&&{temperature:d.temperatureOverride}},{signal:o}),f),M={},N=[],P=null,F={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},I=0,L=Date.now();for await(let e of j){switch(e.type){case`message_start`:P=e.message,I=Date.now()-L,e.message.usage&&(F=D(F,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let n={message:{...P,content:m([t],r,d.agentId)},requestId:void 0,type:`assistant`,uuid:k(),timestamp:new Date().toISOString()};N.push(n),yield n;break}case`message_delta`:{let t=e.usage;t&&(F=D(F,t));break}case`message_stop`:break}e.type===`message_stop`&&F.input_tokens+F.output_tokens>0&&l(t(f,F),F,d.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:I}:void 0}}h(d.langfuseTrace??null,{model:f,provider:`grok`,input:s(g,n),output:u(N),usage:{input_tokens:F.input_tokens,output_tokens:F.output_tokens,cache_creation_input_tokens:F.cache_creation_input_tokens,cache_read_input_tokens:F.cache_read_input_tokens},startTime:new Date(L),endTime:new Date,completionStartTime:I>0?new Date(L+I):void 0,tools:p(_)})}catch(e){let t=e instanceof Error?e.message:String(e);i(`[Grok] Error: ${t}`,{level:`error`}),yield _({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{f(),O(),T(),d(),v(),r(),g(),n(),y(),o()}))();export{A as queryModelGrok};
@@ -1 +1 @@
1
- import{A as e,C as t,D as n,E as r,O as i,S as a,T as o,_ as s,b as c,d as l,f as u,g as d,h as f,k as p,l as m,m as h,p as g,u as _,v,w as y,x as b,y as x}from"./paths-Ci1iwL5Y.js";a();export{m as checkGate_CACHED_OR_BLOCKING,_ as checkSecurityRestrictionGate,l as checkStatsigFeatureGate_CACHED_MAY_BE_STALE,u as clearGrowthBookConfigOverrides,g as getAllGrowthBookFeatures,h as getApiBaseUrlHost,f as getDynamicConfig_BLOCKS_ON_INIT,d as getDynamicConfig_CACHED_MAY_BE_STALE,s as getFeatureValue_CACHED_MAY_BE_STALE,v as getFeatureValue_CACHED_WITH_REFRESH,x as getFeatureValue_DEPRECATED,c as getGrowthBookConfigOverrides,b as hasGrowthBookEnvOverride,t as initializeGrowthBook,y as onGrowthBookRefresh,o as refreshGrowthBookAfterAuthChange,r as refreshGrowthBookFeatures,n as resetGrowthBook,i as setGrowthBookConfigOverride,p as setupPeriodicGrowthBookRefresh,e as stopPeriodicGrowthBookRefresh};
1
+ import{A as e,C as t,D as n,E as r,O as i,S as a,T as o,_ as s,b as c,d as l,f as u,g as d,h as f,k as p,l as m,m as h,p as g,u as _,v,w as y,x as b,y as x}from"./paths-4ZWdjPP4.js";a();export{m as checkGate_CACHED_OR_BLOCKING,_ as checkSecurityRestrictionGate,l as checkStatsigFeatureGate_CACHED_MAY_BE_STALE,u as clearGrowthBookConfigOverrides,g as getAllGrowthBookFeatures,h as getApiBaseUrlHost,f as getDynamicConfig_BLOCKS_ON_INIT,d as getDynamicConfig_CACHED_MAY_BE_STALE,s as getFeatureValue_CACHED_MAY_BE_STALE,v as getFeatureValue_CACHED_WITH_REFRESH,x as getFeatureValue_DEPRECATED,c as getGrowthBookConfigOverrides,b as hasGrowthBookEnvOverride,t as initializeGrowthBook,y as onGrowthBookRefresh,o as refreshGrowthBookAfterAuthChange,r as refreshGrowthBookFeatures,n as resetGrowthBook,i as setGrowthBookConfigOverride,p as setupPeriodicGrowthBookRefresh,e as stopPeriodicGrowthBookRefresh};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{Uc as r,zc as i}from"./paths-Ci1iwL5Y.js";import{E as a,J as o,O as s,U as c,_ as l,h as u,l as d,p as f}from"./debug-otxXY3j-.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{o as h,s as g}from"./log-DSV4Ht5l.js";import{join as _}from"path";import{createWriteStream as v,writeFileSync as y}from"fs";import{readFile as b,readdir as x,writeFile as S}from"fs/promises";import{pipeline as C}from"stream/promises";import{getHeapSnapshot as w,getHeapSpaceStatistics as T,getHeapStatistics as E}from"v8";async function D(e,n=0){let r=process.memoryUsage(),i=E(),a=process.resourceUsage(),o=process.uptime(),s;try{s=T()}catch{}let c=process._getActiveHandles().length,l=process._getActiveRequests().length,u;try{u=(await x(`/proc/self/fd`)).length}catch{}let d;try{d=await b(`/proc/self/smaps_rollup`,`utf8`)}catch{}let f=r.rss-r.heapUsed,p=o>0?r.rss/o:0,m=p*3600/(1024*1024),h=[];return i.number_of_detached_contexts>0&&h.push(`${i.number_of_detached_contexts} detached context(s) - possible iframe/context leak`),c>100&&h.push(`${c} active handles - possible timer/socket leak`),f>r.heapUsed&&h.push(`Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)`),m>100&&h.push(`High memory growth rate: ${m.toFixed(1)} MB/hour`),u&&u>500&&h.push(`${u} open file descriptors - possible file/socket leak`),{timestamp:new Date().toISOString(),sessionId:t(),trigger:e,dumpNumber:n,uptimeSeconds:o,memoryUsage:{heapUsed:r.heapUsed,heapTotal:r.heapTotal,external:r.external,arrayBuffers:r.arrayBuffers,rss:r.rss},memoryGrowthRate:{bytesPerSecond:p,mbPerHour:m},v8HeapStats:{heapSizeLimit:i.heap_size_limit,mallocedMemory:i.malloced_memory,peakMallocedMemory:i.peak_malloced_memory,detachedContexts:i.number_of_detached_contexts,nativeContexts:i.number_of_native_contexts},v8HeapSpaces:s?.map(e=>({name:e.space_name,size:e.space_size,used:e.space_used_size,available:e.space_available_size})),resourceUsage:{maxRSS:a.maxRSS*1024,userCPUTime:a.userCPUTime,systemCPUTime:a.systemCPUTime},activeHandles:c,activeRequests:l,openFileDescriptors:u,analysis:{potentialLeaks:h,recommendation:h.length>0?`WARNING: ${h.length} potential leak indicator(s) found. See potentialLeaks array.`:`No obvious leak indicators. Check heap snapshot for retained objects.`},smapsRollup:d,platform:process.platform,nodeVersion:process.version,ccVersion:`2.7.1`}}async function O(e=`manual`,n=0){try{let r=t(),a=await D(e,n),o=e=>(e/1024/1024/1024).toFixed(3);f(`[HeapDump] Memory state:
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{Uc as r,zc as i}from"./paths-4ZWdjPP4.js";import{E as a,J as o,O as s,U as c,_ as l,h as u,l as d,p as f}from"./debug-otxXY3j-.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{o as h,s as g}from"./log-DSV4Ht5l.js";import{join as _}from"path";import{createWriteStream as v,writeFileSync as y}from"fs";import{readFile as b,readdir as x,writeFile as S}from"fs/promises";import{pipeline as C}from"stream/promises";import{getHeapSnapshot as w,getHeapSpaceStatistics as T,getHeapStatistics as E}from"v8";async function D(e,n=0){let r=process.memoryUsage(),i=E(),a=process.resourceUsage(),o=process.uptime(),s;try{s=T()}catch{}let c=process._getActiveHandles().length,l=process._getActiveRequests().length,u;try{u=(await x(`/proc/self/fd`)).length}catch{}let d;try{d=await b(`/proc/self/smaps_rollup`,`utf8`)}catch{}let f=r.rss-r.heapUsed,p=o>0?r.rss/o:0,m=p*3600/(1024*1024),h=[];return i.number_of_detached_contexts>0&&h.push(`${i.number_of_detached_contexts} detached context(s) - possible iframe/context leak`),c>100&&h.push(`${c} active handles - possible timer/socket leak`),f>r.heapUsed&&h.push(`Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)`),m>100&&h.push(`High memory growth rate: ${m.toFixed(1)} MB/hour`),u&&u>500&&h.push(`${u} open file descriptors - possible file/socket leak`),{timestamp:new Date().toISOString(),sessionId:t(),trigger:e,dumpNumber:n,uptimeSeconds:o,memoryUsage:{heapUsed:r.heapUsed,heapTotal:r.heapTotal,external:r.external,arrayBuffers:r.arrayBuffers,rss:r.rss},memoryGrowthRate:{bytesPerSecond:p,mbPerHour:m},v8HeapStats:{heapSizeLimit:i.heap_size_limit,mallocedMemory:i.malloced_memory,peakMallocedMemory:i.peak_malloced_memory,detachedContexts:i.number_of_detached_contexts,nativeContexts:i.number_of_native_contexts},v8HeapSpaces:s?.map(e=>({name:e.space_name,size:e.space_size,used:e.space_used_size,available:e.space_available_size})),resourceUsage:{maxRSS:a.maxRSS*1024,userCPUTime:a.userCPUTime,systemCPUTime:a.systemCPUTime},activeHandles:c,activeRequests:l,openFileDescriptors:u,analysis:{potentialLeaks:h,recommendation:h.length>0?`WARNING: ${h.length} potential leak indicator(s) found. See potentialLeaks array.`:`No obvious leak indicators. Check heap snapshot for retained objects.`},smapsRollup:d,platform:process.platform,nodeVersion:process.version,ccVersion:`2.8.0`}}async function O(e=`manual`,n=0){try{let r=t(),a=await D(e,n),o=e=>(e/1024/1024/1024).toFixed(3);f(`[HeapDump] Memory state:
2
2
  heapUsed: ${o(a.memoryUsage.heapUsed)} GB (in snapshot)
3
3
  external: ${o(a.memoryUsage.external)} GB (NOT in snapshot)
4
4
  rss: ${o(a.memoryUsage.rss)} GB (total process)
@@ -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-CAntGAbs.js";import{DT as g,Ji as _,OT as v,Ui as y,Vi as b,aS as x,na as S,oS as C}from"./loadAgentsDir-C_wFhytF.js";import{t as w}from"./useKeybinding-DPOUuymz.js";import{t as T}from"./useTerminalSize-Du-EamDN.js";import{n as E,t as D}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as O,r as k}from"./modalContext-c5Yqx_CQ.js";import{n as A,t as j}from"./PromptInputHelpMenu-B__j9zE6.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)(x,{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(),C(),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=E(m),g=v(`help:dismiss`,`Help`,`esc`),_=y(),x=t.filter(e=>_.has(e.name)&&!e.isHidden),S=[];if(process.env.USER_TYPE===`ant`){let e=new Set(b.map(e=>e.name));x=x.filter(t=>!e.has(t.name)),S=t.filter(t=>e.has(t.name)&&!t.isHidden)}let C=t.filter(e=>!_.has(e.name)&&!e.isHidden),w=[(0,B.jsx)(s,{title:`general`,children:(0,B.jsx)(I,{})},`general`)];return w.push((0,B.jsx)(s,{title:`commands`,children:(0,B.jsx)(M,{commands:x,maxHeight:u,columns:o,title:`Browse default commands:`,onCancel:m})},`commands`)),w.push((0,B.jsx)(s,{title:`custom-commands`,children:(0,B.jsx)(M,{commands:C,maxHeight:u,columns:o,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),process.env.USER_TYPE===`ant`&&S.length>0&&w.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:S,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.7.1`,color:`professionalBlue`,defaultTab:`general`,children:w}),(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(),D(),g(),S(),O(),T(),u(),w(),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-KjMLauwe.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{C as m,S as h}from"./startupProfiler-rCtNuhXz.js";import{DT as g,Ji as _,OT as v,Ui as y,Vi as b,aS as x,na as S,oS as C}from"./loadAgentsDir-CQF8qhne.js";import{t as w}from"./useKeybinding-DOjEx42R.js";import{t as T}from"./useTerminalSize-mqo2Swmk.js";import{n as E,t as D}from"./useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js";import{n as O,r as k}from"./modalContext-DxfeT_3m.js";import{n as A,t as j}from"./PromptInputHelpMenu-Bz7EPzzq.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)(x,{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(),C(),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=E(m),g=v(`help:dismiss`,`Help`,`esc`),_=y(),x=t.filter(e=>_.has(e.name)&&!e.isHidden),S=[];if(process.env.USER_TYPE===`ant`){let e=new Set(b.map(e=>e.name));x=x.filter(t=>!e.has(t.name)),S=t.filter(t=>e.has(t.name)&&!t.isHidden)}let C=t.filter(e=>!_.has(e.name)&&!e.isHidden),w=[(0,B.jsx)(s,{title:`general`,children:(0,B.jsx)(I,{})},`general`)];return w.push((0,B.jsx)(s,{title:`commands`,children:(0,B.jsx)(M,{commands:x,maxHeight:u,columns:o,title:`Browse default commands:`,onCancel:m})},`commands`)),w.push((0,B.jsx)(s,{title:`custom-commands`,children:(0,B.jsx)(M,{commands:C,maxHeight:u,columns:o,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),process.env.USER_TYPE===`ant`&&S.length>0&&w.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:S,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.8.0`,color:`professionalBlue`,defaultTab:`general`,children:w}),(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(),D(),g(),S(),O(),T(),u(),w(),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};