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 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{U as r,l as i,p as a,z as o}from"./debug-otxXY3j-.js";import{o as s,s as c}from"./log-DSV4Ht5l.js";import{Bh as l,Gh as u,Hh as d,Oc as f,Wh as p,Yp as m,gc as h,hc as g,i as _,kc as v,nT as y,o as b,oy as x,qp as S,sy as C,tT as w,vs as T,ys as E}from"./loadAgentsDir-C_wFhytF.js";async function D(e){a(`refreshActivePlugins: clearing all plugin caches`),g(),S();let t=await E(),[r,i]=await Promise.all([f(),_(n())]),{enabled:s,disabled:l,errors:p}=t,[m,h]=await Promise.all([Promise.all(s.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await y(e,p);return t&&(e.mcpServers=t),t?Object.keys(t).length:0})),Promise.all(s.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await u(e,p);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))]),v=m.reduce((e,t)=>e+t,0),b=h.reduce((e,t)=>e+t,0);e(e=>({...e,plugins:{...e.plugins,enabled:s,disabled:l,commands:r,errors:O(e.plugins.errors,p),needsRefresh:!1},agentDefinitions:i,mcp:{...e.mcp,pluginReconnectKey:e.mcp.pluginReconnectKey+1}})),d();let x=!1;try{await C()}catch(e){x=!0,c(e),a(`refreshActivePlugins: loadPluginHooks failed: ${o(e)}`)}let w=s.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return a(`refreshActivePlugins: ${s.length} enabled, ${r.length} commands, ${i.allAgents.length} agents, ${w} hooks, ${v} MCP, ${b} LSP`),{enabled_count:s.length,disabled_count:l.length,command_count:r.length,agent_count:i.allAgents.length,hook_count:w,mcp_count:v,lsp_count:b,error_count:p.length+ +!!x,agentDefinitions:i,pluginCommands:r}}function O(e,t){let n=e.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(t.map(k));return[...n.filter(e=>!r.has(k(e))),...t]}function k(e){return e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`}var A=e((()=>{t(),l(),b(),i(),r(),s(),h(),v(),x(),p(),w(),m(),T()}));export{D as n,A as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{U as r,l as i,p as a,z as o}from"./debug-otxXY3j-.js";import{o as s,s as c}from"./log-DSV4Ht5l.js";import{Bh as l,Gh as u,Hh as d,Oc as f,Wh as p,Yp as m,ay as h,gc as g,hc as _,i as v,iy as y,kc as b,nT as x,o as S,qp as C,tT as w,vs as T,ys as E}from"./loadAgentsDir-CQF8qhne.js";async function D(e){a(`refreshActivePlugins: clearing all plugin caches`),_(),C();let t=await E(),[r,i]=await Promise.all([f(),v(n())]),{enabled:s,disabled:l,errors:p}=t,[m,g]=await Promise.all([Promise.all(s.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await x(e,p);return t&&(e.mcpServers=t),t?Object.keys(t).length:0})),Promise.all(s.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await u(e,p);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))]),y=m.reduce((e,t)=>e+t,0),b=g.reduce((e,t)=>e+t,0);e(e=>({...e,plugins:{...e.plugins,enabled:s,disabled:l,commands:r,errors:O(e.plugins.errors,p),needsRefresh:!1},agentDefinitions:i,mcp:{...e.mcp,pluginReconnectKey:e.mcp.pluginReconnectKey+1}})),d();let S=!1;try{await h()}catch(e){S=!0,c(e),a(`refreshActivePlugins: loadPluginHooks failed: ${o(e)}`)}let w=s.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return a(`refreshActivePlugins: ${s.length} enabled, ${r.length} commands, ${i.allAgents.length} agents, ${w} hooks, ${y} MCP, ${b} LSP`),{enabled_count:s.length,disabled_count:l.length,command_count:r.length,agent_count:i.allAgents.length,hook_count:w,mcp_count:y,lsp_count:b,error_count:p.length+ +!!S,agentDefinitions:i,pluginCommands:r}}function O(e,t){let n=e.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(t.map(k));return[...n.filter(e=>!r.has(k(e))),...t]}function k(e){return e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`}var A=e((()=>{t(),l(),S(),i(),r(),s(),g(),b(),y(),p(),w(),m(),T()}));export{D as n,A as t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{Ka as i,S as a,_ as o,oo as s}from"./paths-Ci1iwL5Y.js";import{B as c,U as l,l as u,p as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./which-BnEnzWhs.js";import{r as g,t as _}from"./execFileNoThrow-azCkYhmF.js";import{a as v,r as y,t as b}from"./xdg-BFD9ydDV.js";import{n as x,t as S}from"./sanitization-Ds6zRQyx.js";import*as C from"os";import*as w from"path";import{promises as T}from"fs";function E(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function D(e){let t=e.startsWith(`claude-cli://`)?e:e.startsWith(`claude-cli:`)?e.replace(`${O}:`,`${O}://`):null;if(!t)throw Error(`Invalid deep link: expected ${O}:// scheme, got "${e}"`);let n;try{n=new URL(t)}catch{throw Error(`Invalid deep link URL: "${e}"`)}if(n.hostname!==`open`)throw Error(`Unknown deep link action: "${n.hostname}"`);let r=n.searchParams.get(`cwd`)??void 0,i=n.searchParams.get(`repo`)??void 0,a=n.searchParams.get(`q`);if(r&&!r.startsWith(`/`)&&!/^[a-zA-Z]:[/\\]/.test(r))throw Error(`Invalid cwd in deep link: must be an absolute path, got "${r}"`);if(r&&E(r))throw Error(`Deep link cwd contains disallowed control characters`);if(r&&r.length>j)throw Error(`Deep link cwd exceeds ${j} characters (got ${r.length})`);if(i&&!k.test(i))throw Error(`Invalid repo in deep link: expected "owner/repo", got "${i}"`);let o;if(a&&a.trim().length>0){if(o=x(a.trim()),E(o))throw Error(`Deep link query contains disallowed control characters`);if(o.length>A)throw Error(`Deep link query exceeds ${A} characters (got ${o.length})`)}return{query:o,cwd:r,repo:i}}var O,k,A,j,M=e((()=>{S(),O=`claude-cli`,k=/^[\w.-]+\/[\w.-]+$/,A=5e3,j=4096})),N=t({MACOS_BUNDLE_ID:()=>W,ensureDeepLinkProtocolRegistered:()=>U,isProtocolHandlerCurrent:()=>H,registerProtocolHandler:()=>B});function P(){return w.join(y(),`applications`,K)}function F(e){return`Exec="${e}" --handle-uri %u`}function I(e){return`"${e}" --handle-uri "%1"`}async function L(e){let t=w.join(q,`Contents`);try{await T.rm(q,{recursive:!0})}catch(e){if(c(e)!==`ENOENT`)throw e}await T.mkdir(w.dirname(J),{recursive:!0});let n=`<?xml version="1.0" encoding="UTF-8"?>
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{Ka as i,S as a,_ as o,oo as s}from"./paths-4ZWdjPP4.js";import{B as c,U as l,l as u,p as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./which-BnEnzWhs.js";import{r as g,t as _}from"./execFileNoThrow-azCkYhmF.js";import{a as v,r as y,t as b}from"./xdg-BFD9ydDV.js";import{n as x,t as S}from"./sanitization-B-JlvWcf.js";import*as C from"os";import*as w from"path";import{promises as T}from"fs";function E(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function D(e){let t=e.startsWith(`claude-cli://`)?e:e.startsWith(`claude-cli:`)?e.replace(`${O}:`,`${O}://`):null;if(!t)throw Error(`Invalid deep link: expected ${O}:// scheme, got "${e}"`);let n;try{n=new URL(t)}catch{throw Error(`Invalid deep link URL: "${e}"`)}if(n.hostname!==`open`)throw Error(`Unknown deep link action: "${n.hostname}"`);let r=n.searchParams.get(`cwd`)??void 0,i=n.searchParams.get(`repo`)??void 0,a=n.searchParams.get(`q`);if(r&&!r.startsWith(`/`)&&!/^[a-zA-Z]:[/\\]/.test(r))throw Error(`Invalid cwd in deep link: must be an absolute path, got "${r}"`);if(r&&E(r))throw Error(`Deep link cwd contains disallowed control characters`);if(r&&r.length>j)throw Error(`Deep link cwd exceeds ${j} characters (got ${r.length})`);if(i&&!k.test(i))throw Error(`Invalid repo in deep link: expected "owner/repo", got "${i}"`);let o;if(a&&a.trim().length>0){if(o=x(a.trim()),E(o))throw Error(`Deep link query contains disallowed control characters`);if(o.length>A)throw Error(`Deep link query exceeds ${A} characters (got ${o.length})`)}return{query:o,cwd:r,repo:i}}var O,k,A,j,M=e((()=>{S(),O=`claude-cli`,k=/^[\w.-]+\/[\w.-]+$/,A=5e3,j=4096})),N=t({MACOS_BUNDLE_ID:()=>W,ensureDeepLinkProtocolRegistered:()=>U,isProtocolHandlerCurrent:()=>H,registerProtocolHandler:()=>B});function P(){return w.join(y(),`applications`,K)}function F(e){return`Exec="${e}" --handle-uri %u`}function I(e){return`"${e}" --handle-uri "%1"`}async function L(e){let t=w.join(q,`Contents`);try{await T.rm(q,{recursive:!0})}catch(e){if(c(e)!==`ENOENT`)throw e}await T.mkdir(w.dirname(J),{recursive:!0});let n=`<?xml version="1.0" encoding="UTF-8"?>
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
@@ -0,0 +1 @@
1
+ import{Ad as e,Dd as t,Ed as n,Fd as r,Id as i,Ld as a,Md as o,Nd as s,Od as c,Pd as l,Rd as u,Td as d,jd as f,kd as p,zd as m}from"./loadAgentsDir-CQF8qhne.js";s();export{d as detectAndGetBackend,n as ensureBackendsRegistered,t as getBackendByType,c as getCachedBackend,p as getCachedDetectionResult,e as getInProcessBackend,f as getResolvedTeammateMode,o as getTeammateExecutor,l as isInProcessEnabled,r as markInProcessFallback,i as registerITermBackend,a as registerTmuxBackend,u as registerWindowsTerminalBackend,m as resetBackendDetection};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,c as n,i as r,o as i,t as a}from"./releaseNotes-C8KQGZHq.js";function o(e){return e.map(([e,t])=>`${`Version ${e}:`}\n${t.map(e=>`· ${e}`).join(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,c as n,i as r,o as i,t as a}from"./releaseNotes-Tbd018Qz.js";function o(e){return e.map(([e,t])=>`${`Version ${e}:`}\n${t.map(e=>`· ${e}`).join(`
2
2
  `)}`).join(`
3
3
 
4
4
  `)}async function s(){let e=[];try{let n=new Promise((e,t)=>{setTimeout(e=>e(Error(`Timeout`)),500,t)});await Promise.race([r(),n]),e=t(await i())}catch{}if(e.length>0)return{type:`text`,value:o(e)};let n=t(await i());return n.length>0?{type:`text`,value:o(n)}:{type:`text`,value:`See the full changelog at: ${a}`}}e((()=>{n()}))();export{s as call};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{t as r}from"./semver-Cq33BYay.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{U as o,cn as s}from"./state-sIHsFpDu.js";import{Cc as c,dc as l,yc as u}from"./paths-Ci1iwL5Y.js";import{J as d,U as f}from"./debug-otxXY3j-.js";import{d as p,f as m,o as h,s as g}from"./log-DSV4Ht5l.js";import{r as _,t as v}from"./semver-Di5OaTd5.js";import{dirname as y,join as b}from"path";import{mkdir as x,readFile as S,writeFile as C}from"fs/promises";function w(){return b(t(),`cache`,`changelog.md`)}async function T(){let e=l();if(!e.cachedChangelog)return;let t=w();try{await x(y(t),{recursive:!0}),await C(t,e.cachedChangelog,{encoding:`utf-8`,flag:`wx`})}catch{}c(({cachedChangelog:e,...t})=>t)}async function E(){if(o()||m())return;let e=await i.get(L);if(e.status===200){let t=e.data;if(t===R)return;let n=w();await x(y(n),{recursive:!0}),await C(n,t,{encoding:`utf-8`}),R=t;let r=Date.now();c(e=>({...e,changelogLastFetched:r}))}}async function D(){if(R!==null)return R;let e=w();try{let t=await S(e,`utf-8`);return R=t,t}catch{return R=``,``}}function O(){return R??``}function k(e){try{if(!e)return{};let t={},n=e.split(/^## /gm).slice(1);for(let e of n){let n=e.trim().split(`
2
- `);if(n.length===0)continue;let r=n[0];if(!r)continue;let i=r.split(` - `)[0]?.trim()||``;if(!i)continue;let a=n.slice(1).filter(e=>e.trim().startsWith(`- `)).map(e=>e.trim().substring(2).trim()).filter(Boolean);a.length>0&&(t[i]=a)}return t}catch(e){return g(d(e)),{}}}function A(e,t,n=O()){try{let r=k(n),i=(0,P.coerce)(e),a=t?(0,P.coerce)(t):null;if(!a||i&&v(i.version,a.version))return Object.entries(r).filter(([e])=>!a||v(e,a.version)).sort(([e],[t])=>v(e,t)?-1:1).flatMap(([e,t])=>t).filter(Boolean).slice(0,F)}catch(e){return g(d(e)),[]}return[]}function j(e=O()){try{let t=k(e);return Object.keys(t).sort((e,t)=>v(e,t)?1:-1).map(e=>{let n=t[e];if(!n||n.length===0)return null;let r=n.filter(Boolean);return r.length===0?null:[e,r]}).filter(e=>e!==null)}catch(e){return g(d(e)),[]}}async function M(e,t=`2.7.1`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=await D();(e!==t||!n)&&E().catch(e=>g(d(e)));let r=A(t,e,n);return{hasReleaseNotes:r.length>0,releaseNotes:r}}function N(e,t=`2.7.1`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=A(t,e);return{hasReleaseNotes:n.length>0,releaseNotes:n}}var P,F,I,L,R,z=e((()=>{a(),P=r(),s(),u(),n(),f(),h(),p(),_(),F=5,I=`https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md`,L=`https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md`,R=null}));export{j as a,z as c,E as i,T as l,M as n,D as o,N as r,O as s,I as t,k as u};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{t as r}from"./semver-Cq33BYay.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{U as o,cn as s}from"./state-sIHsFpDu.js";import{Cc as c,dc as l,yc as u}from"./paths-4ZWdjPP4.js";import{J as d,U as f}from"./debug-otxXY3j-.js";import{d as p,f as m,o as h,s as g}from"./log-DSV4Ht5l.js";import{r as _,t as v}from"./semver-Di5OaTd5.js";import{dirname as y,join as b}from"path";import{mkdir as x,readFile as S,writeFile as C}from"fs/promises";function w(){return b(t(),`cache`,`changelog.md`)}async function T(){let e=l();if(!e.cachedChangelog)return;let t=w();try{await x(y(t),{recursive:!0}),await C(t,e.cachedChangelog,{encoding:`utf-8`,flag:`wx`})}catch{}c(({cachedChangelog:e,...t})=>t)}async function E(){if(o()||m())return;let e=await i.get(L);if(e.status===200){let t=e.data;if(t===R)return;let n=w();await x(y(n),{recursive:!0}),await C(n,t,{encoding:`utf-8`}),R=t;let r=Date.now();c(e=>({...e,changelogLastFetched:r}))}}async function D(){if(R!==null)return R;let e=w();try{let t=await S(e,`utf-8`);return R=t,t}catch{return R=``,``}}function O(){return R??``}function k(e){try{if(!e)return{};let t={},n=e.split(/^## /gm).slice(1);for(let e of n){let n=e.trim().split(`
2
+ `);if(n.length===0)continue;let r=n[0];if(!r)continue;let i=r.split(` - `)[0]?.trim()||``;if(!i)continue;let a=n.slice(1).filter(e=>e.trim().startsWith(`- `)).map(e=>e.trim().substring(2).trim()).filter(Boolean);a.length>0&&(t[i]=a)}return t}catch(e){return g(d(e)),{}}}function A(e,t,n=O()){try{let r=k(n),i=(0,P.coerce)(e),a=t?(0,P.coerce)(t):null;if(!a||i&&v(i.version,a.version))return Object.entries(r).filter(([e])=>!a||v(e,a.version)).sort(([e],[t])=>v(e,t)?-1:1).flatMap(([e,t])=>t).filter(Boolean).slice(0,F)}catch(e){return g(d(e)),[]}return[]}function j(e=O()){try{let t=k(e);return Object.keys(t).sort((e,t)=>v(e,t)?1:-1).map(e=>{let n=t[e];if(!n||n.length===0)return null;let r=n.filter(Boolean);return r.length===0?null:[e,r]}).filter(e=>e!==null)}catch(e){return g(d(e)),[]}}async function M(e,t=`2.8.0`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=await D();(e!==t||!n)&&E().catch(e=>g(d(e)));let r=A(t,e,n);return{hasReleaseNotes:r.length>0,releaseNotes:r}}function N(e,t=`2.8.0`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=A(t,e);return{hasReleaseNotes:n.length>0,releaseNotes:n}}var P,F,I,L,R,z=e((()=>{a(),P=r(),s(),u(),n(),f(),h(),p(),_(),F=5,I=`https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md`,L=`https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md`,R=null}));export{j as a,z as c,E as i,T as l,M as n,D as o,N as r,O as s,I as t,k as u};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{s as t}from"./envUtils-BWeoiL4Y.js";import{cn as n}from"./state-sIHsFpDu.js";import{l as r,o as i}from"./stringUtils-KZoO4GUd.js";import{BA as a}from"./loadAgentsDir-C_wFhytF.js";import{t as o}from"./settingsSync-BWt3oUR7.js";import{n as s,t as c}from"./refresh-DTGEx7X_.js";function l(e,t){return`${e} ${r(e,t)}`}var u;e((()=>{n(),o(),t(),c(),a(),i(),u=async(e,t)=>{let n=await s(t.setAppState),r=`Reloaded: ${[l(n.enabled_count,`plugin`),l(n.command_count,`skill`),l(n.agent_count,`agent`),l(n.hook_count,`hook`),l(n.mcp_count,`plugin MCP server`),l(n.lsp_count,`plugin LSP server`)].join(` · `)}`;return n.error_count>0&&(r+=`\n${l(n.error_count,`error`)} during load. Run /doctor for details.`),{type:`text`,value:r}}}))();export{u as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{s as t}from"./envUtils-BWeoiL4Y.js";import{cn as n}from"./state-sIHsFpDu.js";import{l as r,o as i}from"./stringUtils-KZoO4GUd.js";import{BA as a}from"./loadAgentsDir-CQF8qhne.js";import{t as o}from"./settingsSync-Nixbcaox.js";import{n as s,t as c}from"./refresh-CP7Dnjp4.js";function l(e,t){return`${e} ${r(e,t)}`}var u;e((()=>{n(),o(),t(),c(),a(),i(),u=async(e,t)=>{let n=await s(t.setAppState),r=`Reloaded: ${[l(n.enabled_count,`plugin`),l(n.command_count,`skill`),l(n.agent_count,`agent`),l(n.hook_count,`hook`),l(n.mcp_count,`plugin MCP server`),l(n.lsp_count,`plugin LSP server`)].join(` · `)}`;return n.error_count>0&&(r+=`\n${l(n.error_count,`error`)} during load. Run /doctor for details.`),{type:`text`,value:r}}}))();export{u as call};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,f as c,g as l,h as u,l as d,t as f,tt as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{Gs as h,Qa as g,Rs as _,Us as v,lo as y,no as b,oo as x}from"./paths-Ci1iwL5Y.js";import{J as S,U as C}from"./debug-otxXY3j-.js";import{o as w,s as T}from"./log-DSV4Ht5l.js";import{AE as E,DC as D,EC as O,aS as k,jE as A,oS as j}from"./loadAgentsDir-C_wFhytF.js";import{t as M}from"./useKeybinding-DPOUuymz.js";async function N(){let e=await E();if(e.length===0)return{availableEnvironments:[],selectedEnvironment:null,selectedEnvironmentSource:null};let t=b()?.remote?.defaultEnvironmentId,n=e.find(e=>e.kind!==`bridge`)??e[0],r=null;if(t){let i=e.find(e=>e.environment_id===t);if(i){n=i;for(let e=_.length-1;e>=0;e--){let n=_[e];if(!(!n||n===`flagSettings`)&&g(n)?.remote?.defaultEnvironmentId===t){r=n;break}}}}return{availableEnvironments:e,selectedEnvironment:n,selectedEnvironmentSource:r}}var P=e((()=>{h(),x(),A()}));function F({onDone:e}){let[t,n]=(0,z.useState)(`loading`),[r,a]=(0,z.useState)([]),[o,l]=(0,z.useState)(null),[u,f]=(0,z.useState)(null),[p,m]=(0,z.useState)(null);(0,z.useEffect)(()=>{let e=!1;async function t(){try{let t=await N();if(e)return;a(t.availableEnvironments),l(t.selectedEnvironment),f(t.selectedEnvironmentSource),n(null)}catch(t){if(e)return;let r=S(t);T(r),m(r.message),n(null)}}return t(),()=>{e=!0}},[]);function h(t){if(t===`cancel`){e();return}n(`updating`);let a=r.find(e=>e.environment_id===t);if(!a){e(`Error: Selected environment not found`);return}y(`localSettings`,{remote:{defaultEnvironmentId:a.environment_id}}),e(`Set default remote environment to ${i.bold(a.name)} (${a.environment_id})`)}return t===`loading`?(0,B.jsx)(c,{title:V,onCancel:e,hideInputGuide:!0,children:(0,B.jsx)(d,{message:`Loading environments…`})}):p?(0,B.jsx)(c,{title:V,onCancel:e,children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,p]})}):o?r.length===1?(0,B.jsx)(L,{environment:o,onDone:e}):(0,B.jsx)(R,{environments:r,selectedEnvironment:o,selectedEnvironmentSource:u,loadingState:t,onSelect:h,onCancel:e}):(0,B.jsx)(c,{title:V,subtitle:H,onCancel:e,children:(0,B.jsx)(s,{children:`No remote environments available.`})})}function I({environment:e}){return(0,B.jsxs)(s,{children:[r.tick,` Using `,(0,B.jsx)(s,{bold:!0,children:e.name}),` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]})}function L({environment:e,onDone:t}){return p(`confirm:yes`,t,{context:`Confirmation`}),(0,B.jsx)(c,{title:V,subtitle:H,onCancel:t,children:(0,B.jsx)(I,{environment:e})})}function R({environments:e,selectedEnvironment:t,selectedEnvironmentSource:n,loadingState:r,onSelect:i,onCancel:a}){let o=n&&n!==`localSettings`?` (from ${v(n)} settings)`:``;return(0,B.jsxs)(c,{title:V,subtitle:(0,B.jsxs)(s,{children:[`Currently using: `,(0,B.jsx)(s,{bold:!0,children:t.name}),o]}),onCancel:a,hideInputGuide:!0,children:[(0,B.jsx)(s,{dimColor:!0,children:H}),r===`updating`?(0,B.jsx)(d,{message:`Updating…`}):(0,B.jsx)(k,{options:e.map(e=>({label:(0,B.jsxs)(s,{children:[e.name,` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]}),value:e.environment_id})),defaultValue:t.environment_id,onChange:i,onCancel:()=>i(`cancel`),layout:`compact-vertical`}),(0,B.jsx)(s,{dimColor:!0,children:(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`Enter`,action:`select`}),(0,B.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})}var z,B,V,H,U=e((()=>{a(),n(),o(),z=t(o(),1),f(),M(),C(),w(),h(),x(),P(),D(),j(),B=m(),V=`Select Remote Environment`,H=`Configure environments at: https://claude.ai/code`}));async function W(e){return(0,G.jsx)(F,{onDone:e})}var G;e((()=>{o(),U(),G=m()}))();export{W as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,f as c,g as l,h as u,l as d,t as f,tt as p}from"./src-KjMLauwe.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{Gs as h,Qa as g,Rs as _,Us as v,lo as y,no as b,oo as x}from"./paths-4ZWdjPP4.js";import{J as S,U as C}from"./debug-otxXY3j-.js";import{o as w,s as T}from"./log-DSV4Ht5l.js";import{AE as E,DC as D,EC as O,aS as k,jE as A,oS as j}from"./loadAgentsDir-CQF8qhne.js";import{t as M}from"./useKeybinding-DOjEx42R.js";async function N(){let e=await E();if(e.length===0)return{availableEnvironments:[],selectedEnvironment:null,selectedEnvironmentSource:null};let t=b()?.remote?.defaultEnvironmentId,n=e.find(e=>e.kind!==`bridge`)??e[0],r=null;if(t){let i=e.find(e=>e.environment_id===t);if(i){n=i;for(let e=_.length-1;e>=0;e--){let n=_[e];if(!(!n||n===`flagSettings`)&&g(n)?.remote?.defaultEnvironmentId===t){r=n;break}}}}return{availableEnvironments:e,selectedEnvironment:n,selectedEnvironmentSource:r}}var P=e((()=>{h(),x(),A()}));function F({onDone:e}){let[t,n]=(0,z.useState)(`loading`),[r,a]=(0,z.useState)([]),[o,l]=(0,z.useState)(null),[u,f]=(0,z.useState)(null),[p,m]=(0,z.useState)(null);(0,z.useEffect)(()=>{let e=!1;async function t(){try{let t=await N();if(e)return;a(t.availableEnvironments),l(t.selectedEnvironment),f(t.selectedEnvironmentSource),n(null)}catch(t){if(e)return;let r=S(t);T(r),m(r.message),n(null)}}return t(),()=>{e=!0}},[]);function h(t){if(t===`cancel`){e();return}n(`updating`);let a=r.find(e=>e.environment_id===t);if(!a){e(`Error: Selected environment not found`);return}y(`localSettings`,{remote:{defaultEnvironmentId:a.environment_id}}),e(`Set default remote environment to ${i.bold(a.name)} (${a.environment_id})`)}return t===`loading`?(0,B.jsx)(c,{title:V,onCancel:e,hideInputGuide:!0,children:(0,B.jsx)(d,{message:`Loading environments…`})}):p?(0,B.jsx)(c,{title:V,onCancel:e,children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,p]})}):o?r.length===1?(0,B.jsx)(L,{environment:o,onDone:e}):(0,B.jsx)(R,{environments:r,selectedEnvironment:o,selectedEnvironmentSource:u,loadingState:t,onSelect:h,onCancel:e}):(0,B.jsx)(c,{title:V,subtitle:H,onCancel:e,children:(0,B.jsx)(s,{children:`No remote environments available.`})})}function I({environment:e}){return(0,B.jsxs)(s,{children:[r.tick,` Using `,(0,B.jsx)(s,{bold:!0,children:e.name}),` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]})}function L({environment:e,onDone:t}){return p(`confirm:yes`,t,{context:`Confirmation`}),(0,B.jsx)(c,{title:V,subtitle:H,onCancel:t,children:(0,B.jsx)(I,{environment:e})})}function R({environments:e,selectedEnvironment:t,selectedEnvironmentSource:n,loadingState:r,onSelect:i,onCancel:a}){let o=n&&n!==`localSettings`?` (from ${v(n)} settings)`:``;return(0,B.jsxs)(c,{title:V,subtitle:(0,B.jsxs)(s,{children:[`Currently using: `,(0,B.jsx)(s,{bold:!0,children:t.name}),o]}),onCancel:a,hideInputGuide:!0,children:[(0,B.jsx)(s,{dimColor:!0,children:H}),r===`updating`?(0,B.jsx)(d,{message:`Updating…`}):(0,B.jsx)(k,{options:e.map(e=>({label:(0,B.jsxs)(s,{children:[e.name,` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]}),value:e.environment_id})),defaultValue:t.environment_id,onChange:i,onCancel:()=>i(`cancel`),layout:`compact-vertical`}),(0,B.jsx)(s,{dimColor:!0,children:(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`Enter`,action:`select`}),(0,B.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})}var z,B,V,H,U=e((()=>{a(),n(),o(),z=t(o(),1),f(),M(),C(),w(),h(),x(),P(),D(),j(),B=m(),V=`Select Remote Environment`,H=`Configure environments at: https://claude.ai/code`}));async function W(e){return(0,G.jsx)(F,{onDone:e})}var G;e((()=>{o(),U(),G=m()}))();export{W as call};
@@ -1 +1 @@
1
- import{d as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{E as i,O as a,Q as o,U as s,Z as c,l,p as u,z as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{F as m,P as h}from"./git-C0IuvuIy.js";import{n as g,t as _}from"./sleep-C6koP5Ka.js";import{_ as ee,d as v}from"./rcDebugLog-C42A0pX1.js";import{c as y,d as b,i as x,o as S,s as C}from"./debugUtils-l8nsUZ6R.js";import{a as w,i as T}from"./trustedDevice-C5s2au0k.js";import{a as E,r as D}from"./bridgeConfig-pjDV5Z2l.js";import{t as te}from"./jwtUtils-BQXXBwqW.js";import{t as O}from"./workSecret-DJu7k30X.js";import{i as k,r as ne}from"./envLessBridgeConfig-C9UUbQCo.js";import{a as A,c as j,i as re,n as ie,o as M,r as ae,s as oe,t as N}from"./bridgeMessaging-DN0X35NX.js";import{r as P,t as se}from"./flushGate-DNutWuOE.js";t(),f(),c(),h(),_(),y(),w(),v(),k(),r(),l(),s(),i(),S();var F=`2023-06-01`;function I(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":F}}async function ce(e,t,r,i,o){let s=`${e}/v1/code/sessions`,c;try{c=await n.post(s,{title:r,bridge:{},...o?.length?{tags:o}:{}},{headers:I(t),timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] Session create request failed: ${d(e)}`),null}if(c.status!==200&&c.status!==201){let e=x(c.data);return u(`[code-session] Session create failed ${c.status}${e?`: ${e}`:``}`),null}let l=c.data;return!l||typeof l!=`object`||!(`session`in l)||!l.session||typeof l.session!=`object`||!(`id`in l.session)||typeof l.session.id!=`string`||!l.session.id.startsWith(`cse_`)?(u(`[code-session] No session.id (cse_*) in response: ${a(l).slice(0,200)}`),null):l.session.id}async function L(e,t,r,i,o){let s=`${t}/v1/code/sessions/${e}/bridge`,c=I(r);o&&(c[`X-Trusted-Device-Token`]=o);let l;try{l=await n.post(s,{},{headers:c,timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] /bridge request failed: ${d(e)}`),null}if(l.status!==200){let e=x(l.data);return u(`[code-session] /bridge failed ${l.status}${e?`: ${e}`:``}`),null}let f=l.data;if(typeof f!=`object`||!f||!(`worker_jwt`in f)||typeof f.worker_jwt!=`string`||!(`expires_in`in f)||typeof f.expires_in!=`number`||!(`api_base_url`in f)||typeof f.api_base_url!=`string`||!(`worker_epoch`in f))return u(`[code-session] /bridge response malformed (need worker_jwt, expires_in, api_base_url, worker_epoch): ${a(f).slice(0,200)}`),null;let p=f.worker_epoch,m=typeof p==`string`?Number(p):p;return typeof m!=`number`||!Number.isFinite(m)||!Number.isSafeInteger(m)?(u(`[code-session] /bridge worker_epoch invalid: ${a(p)}`),null):{worker_jwt:f.worker_jwt,api_base_url:f.api_base_url,expires_in:f.expires_in,worker_epoch:m}}r(),S(),l(),s(),E();var R=`2023-06-01`;function z(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":R}}async function B(t){let{baseUrl:n,orgUUID:r,title:i,getAccessToken:a,onAuth401:s,toSDKMessages:c,initialHistoryCap:l,initialMessages:f,onInboundMessage:h,onUserMessage:g,onPermissionResponse:_,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,onStateChange:S,outboundOnly:w,tags:T}=t,E=await ne(),D=a();if(!D)return u(`[remote-bridge] No OAuth token`),null;let k=await V(()=>ce(n,D,i,E.http_timeout_ms,T),`createCodeSession`,E);if(!k)return S?.(`failed`,`Session creation failed — see debug log`),C(`v2_session_create_failed`,void 0,!0),null;let F=k;u(`[remote-bridge] Created session ${F}`),m(`info`,`bridge_repl_v2_session_created`);let I=await V(()=>H(F,n,D,E.http_timeout_ms),`fetchRemoteCredentials`,E);if(!I)return S?.(`failed`,`Remote credentials fetch failed — see debug log`),C(`v2_remote_creds_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null;u(`[remote-bridge] Fetched bridge credentials (expires_in=${I.expires_in}s)`);let L=O(I.api_base_url,F);u(`[remote-bridge] v2 session URL: ${L}`);let R;try{R=await P({sessionUrl:L,ingressToken:I.worker_jwt,sessionId:F,epoch:I.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,getAuthToken:()=>I.worker_jwt,outboundOnly:w})}catch(e){return u(`[remote-bridge] v2 transport setup failed: ${d(e)}`,{level:`error`}),S?.(`failed`,`Transport setup failed: ${d(e)}`),C(`v2_transport_setup_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null}u(`[remote-bridge] v2 transport created (epoch=${I.worker_epoch})`),S?.(`ready`);let z=new N(E.uuid_dedup_buffer_size),B=new Set;if(f)for(let e of f)B.add(e.uuid),z.add(e.uuid);let le=new N(E.uuid_dedup_buffer_size),W=new se,G=!1,K=!1,q=!1,J=!g,Y=`initial`,X;function Z(e){K||p(`tengu_bridge_repl_connect_timeout`,{v2:!0,elapsed_ms:E.connect_timeout_ms,cause:e})}ee(e=>{K||R.reportMetadata(e)},{replayCurrent:!0});let Q=te({refreshBufferMs:E.token_refresh_buffer_ms,getAccessToken:async()=>{let e=a();return s&&await s(e??``),a()??e},onRefresh:(e,t)=>{(async()=>{if(q||K){u(`[remote-bridge] Recovery already in flight, skipping proactive refresh`);return}q=!0;try{let r=await V(()=>H(e,n,t,E.http_timeout_ms),`fetchRemoteCredentials (proactive)`,E);if(!r||K)return;await ue(r,`proactive_refresh`),u(`[remote-bridge] Transport rebuilt (proactive refresh)`)}catch(e){u(`[remote-bridge] Proactive refresh rebuild failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_proactive_refresh_failed`),K||S?.(`failed`,`Refresh failed: ${d(e)}`)}finally{q=!1}})()},label:`remote`});Q.scheduleFromExpiresIn(F,I.expires_in);function $(){R.setOnConnect(()=>{if(clearTimeout(X),u(`[remote-bridge] v2 transport connected`),m(`info`,`bridge_repl_v2_transport_connected`),p(`tengu_bridge_repl_ws_connected`,{v2:!0,cause:Y}),!G&&f&&f.length>0){G=!0;let e=R;pe(f).catch(e=>u(`[remote-bridge] flushHistory failed: ${e}`)).finally(()=>{R!==e||K||q||(fe(),S?.(`connected`))})}else W.active||S?.(`connected`)}),R.setOnData(e=>{ae(e,z,le,h,_?e=>{R.reportState(`running`),_(e)}:void 0,e=>re(e,{transport:R,sessionId:F,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,outboundOnly:w}))}),R.setOnClose(e=>{if(clearTimeout(X),!K){if(u(`[remote-bridge] v2 transport closed (code=${e})`),p(`tengu_bridge_repl_ws_closed`,{code:e,v2:!0}),e===401&&!q){de();return}S?.(`failed`,`Transport closed (code ${e})`)}})}async function ue(e,t){Y=t,W.start();try{let t=R.getLastSequenceNum();if(R.close(),R=await P({sessionUrl:O(e.api_base_url,F),ingressToken:e.worker_jwt,sessionId:F,epoch:e.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,initialSequenceNum:t,getAuthToken:()=>e.worker_jwt,outboundOnly:w}),K){R.close();return}$(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y),Q.scheduleFromExpiresIn(F,e.expires_in),fe()}finally{W.drop()}}async function de(){if(!q){q=!0,S?.(`reconnecting`,`JWT expired — refreshing`),u(`[remote-bridge] 401 on SSE — attempting JWT refresh`);try{let e=a();s&&await s(e??``);let t=a()??e;if(!t||K){K||S?.(`failed`,`JWT refresh failed: no OAuth token`);return}let r=await V(()=>H(F,n,t,E.http_timeout_ms),`fetchRemoteCredentials (recovery)`,E);if(!r||K){K||S?.(`failed`,`JWT refresh failed after 401`);return}G=!1,await ue(r,`auth_401_recovery`),u(`[remote-bridge] Transport rebuilt after 401`)}catch(e){u(`[remote-bridge] 401 recovery failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_jwt_refresh_failed`),K||S?.(`failed`,`JWT refresh failed: ${d(e)}`)}finally{q=!1}}}$(),f&&f.length>0&&W.start(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y);function fe(){let e=W.end();if(e.length===0)return;for(let t of e)z.add(t.uuid);let t=c(e).map(e=>({...e,session_id:F}));j(e)&&R.reportState(`running`),u(`[remote-bridge] Drained ${e.length} queued message(s) after flush`),R.writeBatch(t)}async function pe(e){let t=e.filter(A),n=l>0&&t.length>l?t.slice(-l):t;n.length<t.length&&u(`[remote-bridge] Capped initial flush: ${t.length} -> ${n.length} (cap=${l})`);let r=c(n).map(e=>({...e,session_id:F}));if(r.length===0)return;let i=t.at(-1);i&&oe(i)&&R.reportState(`running`),u(`[remote-bridge] Flushing ${r.length} history events`),await R.writeBatch(r)}async function me(){if(K)return;K=!0,Q.cancelAll(),clearTimeout(X),W.drop(),R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e);let t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms);if(i===401&&s)try{await s(t??``),t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms)}catch(e){u(`[remote-bridge] Teardown 401 retry threw: ${d(e)}`,{level:`error`})}R.close();let o=i===`no_token`?`skipped_no_token`:i===`timeout`||i===`error`?`network_error`:i>=500?`server_5xx`:i>=400?`server_4xx`:`ok`;u(`[remote-bridge] Torn down (archive=${i})`),m(`info`,`bridge_repl_v2_teardown`),p(`tengu_bridge_repl_teardown`,{v2:!0,archive_status:o,archive_ok:typeof i==`number`&&i<400,archive_http_status:typeof i==`number`?i:void 0,archive_timeout:i===`timeout`,archive_no_token:i===`no_token`})}let he=o(me);return p(`tengu_bridge_repl_started`,{has_initial_messages:!!(f&&f.length>0),v2:!0,expires_in_s:I.expires_in,inProtectedNamespace:e()}),{bridgeSessionId:F,environmentId:``,sessionIngressUrl:I.api_base_url,writeMessages(e){let t=e.filter(e=>A(e)&&!B.has(e.uuid)&&!z.has(e.uuid));if(t.length===0)return;if(!J)for(let e of t){let t=ie(e);if(t!==void 0&&g?.(t,F)){J=!0;break}}if(W.enqueue(...t)){u(`[remote-bridge] Queued ${t.length} message(s) during flush`);return}for(let e of t)z.add(e.uuid);let n=c(t).map(e=>({...e,session_id:F}));j(t)&&R.reportState(`running`),u(`[remote-bridge] Sending ${t.length} message(s)`),R.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!z.has(e.uuid));if(t.length===0)return;for(let e of t)e.uuid&&z.add(e.uuid);let n=t.map(e=>({...e,session_id:F}));R.writeBatch(n)},sendControlRequest(e){if(q){u(`[remote-bridge] Dropping control_request during 401 recovery: ${e.request_id}`);return}let t={...e,session_id:F};e.request?.subtype===`can_use_tool`&&R.reportState(`requires_action`),R.write(t),u(`[remote-bridge] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(q){u(`[remote-bridge] Dropping control_response during 401 recovery`);return}let t={...e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_response`)},sendControlCancelRequest(e){if(q){u(`[remote-bridge] Dropping control_cancel_request during 401 recovery: ${e}`);return}let t={type:`control_cancel_request`,request_id:e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_cancel_request request_id=${e}`)},sendResult(){if(q){u(`[remote-bridge] Dropping result during 401 recovery`);return}R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e),u(`[remote-bridge] Sent result`)},async teardown(){he(),await me()}}}async function V(e,t,n){let r=n.init_retry_max_attempts;for(let i=1;i<=r;i++){let a=await e();if(a!==null)return a;if(i<r){let e=n.init_retry_base_delay_ms*2**(i-1),a=e*n.init_retry_jitter_fraction*(2*Math.random()-1),o=Math.min(e+a,n.init_retry_max_delay_ms);u(`[remote-bridge] ${t} failed (attempt ${i}/${r}), retrying in ${Math.round(o)}ms`),await g(o)}}return null}async function H(e,t,n,r){let i=await L(e,t,n,r,T());return i?D()?{...i,api_base_url:t}:i:null}async function U(e,t,r,i,a){if(!r)return`no_token`;let o=b(e);try{let e=await n.post(`${t}/v1/sessions/${o}/archive`,{},{headers:{...z(r),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":i},timeout:a,validateStatus:()=>!0});return u(`[remote-bridge] Archive ${o} status=${e.status}`),e.status}catch(e){return u(`[remote-bridge] Archive failed: ${d(e)}`),n.isAxiosError(e)&&e.code===`ECONNABORTED`?`timeout`:`error`}}export{B as initEnvLessBridgeCore};
1
+ import{d as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{E as i,O as a,Q as o,U as s,Z as c,l,p as u,z as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{F as m,P as h}from"./git-C0IuvuIy.js";import{n as g,t as _}from"./sleep-C6koP5Ka.js";import{_ as ee,d as v}from"./rcDebugLog-DOXxIr8l.js";import{c as y,d as b,i as x,o as S,s as C}from"./debugUtils-l8nsUZ6R.js";import{a as w,i as T}from"./trustedDevice-D-L5uAor.js";import{a as E,r as D}from"./bridgeConfig-e0MGfed6.js";import{t as te}from"./jwtUtils-BQXXBwqW.js";import{t as O}from"./workSecret-DJu7k30X.js";import{i as k,r as ne}from"./envLessBridgeConfig-DW4-nPbZ.js";import{a as A,c as j,i as re,n as ie,o as M,r as ae,s as oe,t as N}from"./bridgeMessaging-BvBnxgD4.js";import{r as P,t as se}from"./flushGate-BA24vFBg.js";t(),f(),c(),h(),_(),y(),w(),v(),k(),r(),l(),s(),i(),S();var F=`2023-06-01`;function I(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":F}}async function ce(e,t,r,i,o){let s=`${e}/v1/code/sessions`,c;try{c=await n.post(s,{title:r,bridge:{},...o?.length?{tags:o}:{}},{headers:I(t),timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] Session create request failed: ${d(e)}`),null}if(c.status!==200&&c.status!==201){let e=x(c.data);return u(`[code-session] Session create failed ${c.status}${e?`: ${e}`:``}`),null}let l=c.data;return!l||typeof l!=`object`||!(`session`in l)||!l.session||typeof l.session!=`object`||!(`id`in l.session)||typeof l.session.id!=`string`||!l.session.id.startsWith(`cse_`)?(u(`[code-session] No session.id (cse_*) in response: ${a(l).slice(0,200)}`),null):l.session.id}async function L(e,t,r,i,o){let s=`${t}/v1/code/sessions/${e}/bridge`,c=I(r);o&&(c[`X-Trusted-Device-Token`]=o);let l;try{l=await n.post(s,{},{headers:c,timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] /bridge request failed: ${d(e)}`),null}if(l.status!==200){let e=x(l.data);return u(`[code-session] /bridge failed ${l.status}${e?`: ${e}`:``}`),null}let f=l.data;if(typeof f!=`object`||!f||!(`worker_jwt`in f)||typeof f.worker_jwt!=`string`||!(`expires_in`in f)||typeof f.expires_in!=`number`||!(`api_base_url`in f)||typeof f.api_base_url!=`string`||!(`worker_epoch`in f))return u(`[code-session] /bridge response malformed (need worker_jwt, expires_in, api_base_url, worker_epoch): ${a(f).slice(0,200)}`),null;let p=f.worker_epoch,m=typeof p==`string`?Number(p):p;return typeof m!=`number`||!Number.isFinite(m)||!Number.isSafeInteger(m)?(u(`[code-session] /bridge worker_epoch invalid: ${a(p)}`),null):{worker_jwt:f.worker_jwt,api_base_url:f.api_base_url,expires_in:f.expires_in,worker_epoch:m}}r(),S(),l(),s(),E();var R=`2023-06-01`;function z(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":R}}async function B(t){let{baseUrl:n,orgUUID:r,title:i,getAccessToken:a,onAuth401:s,toSDKMessages:c,initialHistoryCap:l,initialMessages:f,onInboundMessage:h,onUserMessage:g,onPermissionResponse:_,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,onStateChange:S,outboundOnly:w,tags:T}=t,E=await ne(),D=a();if(!D)return u(`[remote-bridge] No OAuth token`),null;let k=await V(()=>ce(n,D,i,E.http_timeout_ms,T),`createCodeSession`,E);if(!k)return S?.(`failed`,`Session creation failed — see debug log`),C(`v2_session_create_failed`,void 0,!0),null;let F=k;u(`[remote-bridge] Created session ${F}`),m(`info`,`bridge_repl_v2_session_created`);let I=await V(()=>H(F,n,D,E.http_timeout_ms),`fetchRemoteCredentials`,E);if(!I)return S?.(`failed`,`Remote credentials fetch failed — see debug log`),C(`v2_remote_creds_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null;u(`[remote-bridge] Fetched bridge credentials (expires_in=${I.expires_in}s)`);let L=O(I.api_base_url,F);u(`[remote-bridge] v2 session URL: ${L}`);let R;try{R=await P({sessionUrl:L,ingressToken:I.worker_jwt,sessionId:F,epoch:I.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,getAuthToken:()=>I.worker_jwt,outboundOnly:w})}catch(e){return u(`[remote-bridge] v2 transport setup failed: ${d(e)}`,{level:`error`}),S?.(`failed`,`Transport setup failed: ${d(e)}`),C(`v2_transport_setup_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null}u(`[remote-bridge] v2 transport created (epoch=${I.worker_epoch})`),S?.(`ready`);let z=new N(E.uuid_dedup_buffer_size),B=new Set;if(f)for(let e of f)B.add(e.uuid),z.add(e.uuid);let le=new N(E.uuid_dedup_buffer_size),W=new se,G=!1,K=!1,q=!1,J=!g,Y=`initial`,X;function Z(e){K||p(`tengu_bridge_repl_connect_timeout`,{v2:!0,elapsed_ms:E.connect_timeout_ms,cause:e})}ee(e=>{K||R.reportMetadata(e)},{replayCurrent:!0});let Q=te({refreshBufferMs:E.token_refresh_buffer_ms,getAccessToken:async()=>{let e=a();return s&&await s(e??``),a()??e},onRefresh:(e,t)=>{(async()=>{if(q||K){u(`[remote-bridge] Recovery already in flight, skipping proactive refresh`);return}q=!0;try{let r=await V(()=>H(e,n,t,E.http_timeout_ms),`fetchRemoteCredentials (proactive)`,E);if(!r||K)return;await ue(r,`proactive_refresh`),u(`[remote-bridge] Transport rebuilt (proactive refresh)`)}catch(e){u(`[remote-bridge] Proactive refresh rebuild failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_proactive_refresh_failed`),K||S?.(`failed`,`Refresh failed: ${d(e)}`)}finally{q=!1}})()},label:`remote`});Q.scheduleFromExpiresIn(F,I.expires_in);function $(){R.setOnConnect(()=>{if(clearTimeout(X),u(`[remote-bridge] v2 transport connected`),m(`info`,`bridge_repl_v2_transport_connected`),p(`tengu_bridge_repl_ws_connected`,{v2:!0,cause:Y}),!G&&f&&f.length>0){G=!0;let e=R;pe(f).catch(e=>u(`[remote-bridge] flushHistory failed: ${e}`)).finally(()=>{R!==e||K||q||(fe(),S?.(`connected`))})}else W.active||S?.(`connected`)}),R.setOnData(e=>{ae(e,z,le,h,_?e=>{R.reportState(`running`),_(e)}:void 0,e=>re(e,{transport:R,sessionId:F,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,outboundOnly:w}))}),R.setOnClose(e=>{if(clearTimeout(X),!K){if(u(`[remote-bridge] v2 transport closed (code=${e})`),p(`tengu_bridge_repl_ws_closed`,{code:e,v2:!0}),e===401&&!q){de();return}S?.(`failed`,`Transport closed (code ${e})`)}})}async function ue(e,t){Y=t,W.start();try{let t=R.getLastSequenceNum();if(R.close(),R=await P({sessionUrl:O(e.api_base_url,F),ingressToken:e.worker_jwt,sessionId:F,epoch:e.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,initialSequenceNum:t,getAuthToken:()=>e.worker_jwt,outboundOnly:w}),K){R.close();return}$(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y),Q.scheduleFromExpiresIn(F,e.expires_in),fe()}finally{W.drop()}}async function de(){if(!q){q=!0,S?.(`reconnecting`,`JWT expired — refreshing`),u(`[remote-bridge] 401 on SSE — attempting JWT refresh`);try{let e=a();s&&await s(e??``);let t=a()??e;if(!t||K){K||S?.(`failed`,`JWT refresh failed: no OAuth token`);return}let r=await V(()=>H(F,n,t,E.http_timeout_ms),`fetchRemoteCredentials (recovery)`,E);if(!r||K){K||S?.(`failed`,`JWT refresh failed after 401`);return}G=!1,await ue(r,`auth_401_recovery`),u(`[remote-bridge] Transport rebuilt after 401`)}catch(e){u(`[remote-bridge] 401 recovery failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_jwt_refresh_failed`),K||S?.(`failed`,`JWT refresh failed: ${d(e)}`)}finally{q=!1}}}$(),f&&f.length>0&&W.start(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y);function fe(){let e=W.end();if(e.length===0)return;for(let t of e)z.add(t.uuid);let t=c(e).map(e=>({...e,session_id:F}));j(e)&&R.reportState(`running`),u(`[remote-bridge] Drained ${e.length} queued message(s) after flush`),R.writeBatch(t)}async function pe(e){let t=e.filter(A),n=l>0&&t.length>l?t.slice(-l):t;n.length<t.length&&u(`[remote-bridge] Capped initial flush: ${t.length} -> ${n.length} (cap=${l})`);let r=c(n).map(e=>({...e,session_id:F}));if(r.length===0)return;let i=t.at(-1);i&&oe(i)&&R.reportState(`running`),u(`[remote-bridge] Flushing ${r.length} history events`),await R.writeBatch(r)}async function me(){if(K)return;K=!0,Q.cancelAll(),clearTimeout(X),W.drop(),R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e);let t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms);if(i===401&&s)try{await s(t??``),t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms)}catch(e){u(`[remote-bridge] Teardown 401 retry threw: ${d(e)}`,{level:`error`})}R.close();let o=i===`no_token`?`skipped_no_token`:i===`timeout`||i===`error`?`network_error`:i>=500?`server_5xx`:i>=400?`server_4xx`:`ok`;u(`[remote-bridge] Torn down (archive=${i})`),m(`info`,`bridge_repl_v2_teardown`),p(`tengu_bridge_repl_teardown`,{v2:!0,archive_status:o,archive_ok:typeof i==`number`&&i<400,archive_http_status:typeof i==`number`?i:void 0,archive_timeout:i===`timeout`,archive_no_token:i===`no_token`})}let he=o(me);return p(`tengu_bridge_repl_started`,{has_initial_messages:!!(f&&f.length>0),v2:!0,expires_in_s:I.expires_in,inProtectedNamespace:e()}),{bridgeSessionId:F,environmentId:``,sessionIngressUrl:I.api_base_url,writeMessages(e){let t=e.filter(e=>A(e)&&!B.has(e.uuid)&&!z.has(e.uuid));if(t.length===0)return;if(!J)for(let e of t){let t=ie(e);if(t!==void 0&&g?.(t,F)){J=!0;break}}if(W.enqueue(...t)){u(`[remote-bridge] Queued ${t.length} message(s) during flush`);return}for(let e of t)z.add(e.uuid);let n=c(t).map(e=>({...e,session_id:F}));j(t)&&R.reportState(`running`),u(`[remote-bridge] Sending ${t.length} message(s)`),R.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!z.has(e.uuid));if(t.length===0)return;for(let e of t)e.uuid&&z.add(e.uuid);let n=t.map(e=>({...e,session_id:F}));R.writeBatch(n)},sendControlRequest(e){if(q){u(`[remote-bridge] Dropping control_request during 401 recovery: ${e.request_id}`);return}let t={...e,session_id:F};e.request?.subtype===`can_use_tool`&&R.reportState(`requires_action`),R.write(t),u(`[remote-bridge] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(q){u(`[remote-bridge] Dropping control_response during 401 recovery`);return}let t={...e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_response`)},sendControlCancelRequest(e){if(q){u(`[remote-bridge] Dropping control_cancel_request during 401 recovery: ${e}`);return}let t={type:`control_cancel_request`,request_id:e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_cancel_request request_id=${e}`)},sendResult(){if(q){u(`[remote-bridge] Dropping result during 401 recovery`);return}R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e),u(`[remote-bridge] Sent result`)},async teardown(){he(),await me()}}}async function V(e,t,n){let r=n.init_retry_max_attempts;for(let i=1;i<=r;i++){let a=await e();if(a!==null)return a;if(i<r){let e=n.init_retry_base_delay_ms*2**(i-1),a=e*n.init_retry_jitter_fraction*(2*Math.random()-1),o=Math.min(e+a,n.init_retry_max_delay_ms);u(`[remote-bridge] ${t} failed (attempt ${i}/${r}), retrying in ${Math.round(o)}ms`),await g(o)}}return null}async function H(e,t,n,r){let i=await L(e,t,n,r,T());return i?D()?{...i,api_base_url:t}:i:null}async function U(e,t,r,i,a){if(!r)return`no_token`;let o=b(e);try{let e=await n.post(`${t}/v1/sessions/${o}/archive`,{},{headers:{...z(r),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":i},timeout:a,validateStatus:()=>!0});return u(`[remote-bridge] Archive ${o} status=${e.status}`),e.status}catch(e){return u(`[remote-bridge] Archive failed: ${d(e)}`),n.isAxiosError(e)&&e.code===`ECONNABORTED`?`timeout`:`error`}}export{B as initEnvLessBridgeCore};
@@ -1,3 +1,3 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,d as i,f as a,nt as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{U as u,z as d}from"./debug-otxXY3j-.js";import{sS as f,uS as p}from"./loadAgentsDir-C_wFhytF.js";import{t as m}from"./useKeybinding-DPOUuymz.js";import{a as h,t as g}from"./bridgeConfig-pjDV5Z2l.js";import{n as _,r as v}from"./bridgeEnabled-D9jI6X-w.js";import{a as y,n as b}from"./types-C0nqJFkV.js";import{t as x}from"./Dialog-91X6ZGg9.js";import{t as S}from"./ListItem-DCQhApdJ.js";import{i as C,o as w,t as T}from"./cliLaunch-Citfs01Q.js";import{resolve as E}from"path";function D({onDone:e}){let[t,n]=(0,N.useState)(I),[r,i]=(0,N.useState)(null);return(0,N.useEffect)(()=>{if(F&&!F.killed){n(`running`);return}let t=!1;return(async()=>{let r=await k();if(!t){if(r){e(r,{display:`system`});return}n(`starting`);try{A(),t||(n(`running`),I=`running`,e(`Remote Control Server started. Use /remote-control-server to manage.`,{display:`system`}))}catch(r){if(!t){let t=d(r);n(`error`),i(t),I=`error`,e(`Remote Control Server failed to start: ${t}`,{display:`system`})}}}})(),()=>{t=!0}},[]),t===`running`&&F&&!F.killed?(0,P.jsx)(O,{onDone:e}):null}function O({onDone:e}){p(`remote-control-server-dialog`);let[t,n]=(0,N.useState)(2),s=L.slice(-5);function l(){j(),e(`Remote Control Server stopped.`,{display:`system`})}function u(){j();try{A(),e(`Remote Control Server restarted.`,{display:`system`})}catch(t){e(`Failed to restart: ${d(t)}`,{display:`system`})}}function f(){e(void 0,{display:`skip`})}return o({"select:next":()=>n(e=>(e+1)%3),"select:previous":()=>n(e=>(e-1+3)%3),"select:accept":()=>{t===0?l():t===1?u():f()}},{context:`Select`}),(0,P.jsx)(a,{title:`Remote Control Server`,onCancel:f,hideInputGuide:!0,children:(0,P.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,P.jsxs)(r,{children:[`Remote Control Server is`,` `,(0,P.jsx)(r,{bold:!0,color:`success`,children:`running`}),F?` (PID: ${F.pid})`:``]}),s.length>0&&(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(r,{dimColor:!0,children:`Recent logs:`}),s.map((e,t)=>(0,P.jsx)(r,{dimColor:!0,children:e},t))]}),(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(i,{isFocused:t===0,children:(0,P.jsx)(r,{children:`Stop server`})}),(0,P.jsx)(i,{isFocused:t===1,children:(0,P.jsx)(r,{children:`Restart server`})}),(0,P.jsx)(i,{isFocused:t===2,children:(0,P.jsx)(r,{children:`Continue`})})]}),(0,P.jsx)(r,{dimColor:!0,children:`Enter to select · Esc to continue`})]})})}async function k(){return await _()||(g()?null:b)}function A(){let e=E(`.`),t=w(T([`daemon`,`start`,`--dir=${e}`]),{cwd:e,stdio:[`ignore`,`pipe`,`pipe`],detached:!1});F=t,L=[],t.stdout?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,d as i,f as a,nt as o,t as s,x as c}from"./src-KjMLauwe.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{U as u,z as d}from"./debug-otxXY3j-.js";import{sS as f,uS as p}from"./loadAgentsDir-CQF8qhne.js";import{t as m}from"./useKeybinding-DOjEx42R.js";import{a as h,t as g}from"./bridgeConfig-e0MGfed6.js";import{n as _,r as v}from"./bridgeEnabled-DR-v8AXw.js";import{a as y,n as b}from"./types-C0nqJFkV.js";import{t as x}from"./Dialog-C8eGKH-e.js";import{t as S}from"./ListItem-DDMe4CJ3.js";import{i as C,o as w,t as T}from"./cliLaunch-Citfs01Q.js";import{resolve as E}from"path";function D({onDone:e}){let[t,n]=(0,N.useState)(I),[r,i]=(0,N.useState)(null);return(0,N.useEffect)(()=>{if(F&&!F.killed){n(`running`);return}let t=!1;return(async()=>{let r=await k();if(!t){if(r){e(r,{display:`system`});return}n(`starting`);try{A(),t||(n(`running`),I=`running`,e(`Remote Control Server started. Use /remote-control-server to manage.`,{display:`system`}))}catch(r){if(!t){let t=d(r);n(`error`),i(t),I=`error`,e(`Remote Control Server failed to start: ${t}`,{display:`system`})}}}})(),()=>{t=!0}},[]),t===`running`&&F&&!F.killed?(0,P.jsx)(O,{onDone:e}):null}function O({onDone:e}){p(`remote-control-server-dialog`);let[t,n]=(0,N.useState)(2),s=L.slice(-5);function l(){j(),e(`Remote Control Server stopped.`,{display:`system`})}function u(){j();try{A(),e(`Remote Control Server restarted.`,{display:`system`})}catch(t){e(`Failed to restart: ${d(t)}`,{display:`system`})}}function f(){e(void 0,{display:`skip`})}return o({"select:next":()=>n(e=>(e+1)%3),"select:previous":()=>n(e=>(e-1+3)%3),"select:accept":()=>{t===0?l():t===1?u():f()}},{context:`Select`}),(0,P.jsx)(a,{title:`Remote Control Server`,onCancel:f,hideInputGuide:!0,children:(0,P.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,P.jsxs)(r,{children:[`Remote Control Server is`,` `,(0,P.jsx)(r,{bold:!0,color:`success`,children:`running`}),F?` (PID: ${F.pid})`:``]}),s.length>0&&(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(r,{dimColor:!0,children:`Recent logs:`}),s.map((e,t)=>(0,P.jsx)(r,{dimColor:!0,children:e},t))]}),(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(i,{isFocused:t===0,children:(0,P.jsx)(r,{children:`Stop server`})}),(0,P.jsx)(i,{isFocused:t===1,children:(0,P.jsx)(r,{children:`Restart server`})}),(0,P.jsx)(i,{isFocused:t===2,children:(0,P.jsx)(r,{children:`Continue`})})]}),(0,P.jsx)(r,{dimColor:!0,children:`Enter to select · Esc to continue`})]})})}async function k(){return await _()||(g()?null:b)}function A(){let e=E(`.`),t=w(T([`daemon`,`start`,`--dir=${e}`]),{cwd:e,stdio:[`ignore`,`pipe`,`pipe`],detached:!1});F=t,L=[],t.stdout?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
2
2
  `);for(let e of t)L.push(e),L.length>R&&L.shift()}),t.stderr?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
3
3
  `);for(let e of t)L.push(`[err] ${e}`),L.length>R&&L.shift()}),t.on(`exit`,(e,t)=>{F=null,I=`stopped`,L.push(`[daemon] exited (code=${e??`unknown`}, signal=${t})`)}),t.on(`error`,e=>{F=null,I=`error`,L.push(`[daemon] error: ${e.message}`)})}function j(){if(F&&!F.killed){F.kill(`SIGTERM`);let e=F.pid;setTimeout(()=>{try{e&&process.kill(e,0),F&&!F.killed&&F.kill(`SIGKILL`)}catch{}},1e4)}F=null,I=`stopped`}async function M(e,t,n){return(0,P.jsx)(D,{onDone:e})}var N,P,F,I,L,R;e((()=>{n(),N=t(n(),1),v(),h(),y(),x(),S(),f(),s(),m(),C(),u(),P=l(),F=null,I=`stopped`,L=[],R=50}))();export{M as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-CbskW5G9.js";import{Ar as a,Fr as o,Po as s,Si as c,Uo as l,yi as u}from"./loadAgentsDir-C_wFhytF.js";import{a as d,i as f,r as p}from"./bridgeConfig-pjDV5Z2l.js";import{n as m,t as h}from"./generateSessionName-CoFR2wgK.js";async function g(e,n,i){if(r())return e(`Cannot rename: This session is a swarm teammate. Teammate names are set by the team leader.`,{display:`system`}),null;let o;if(!i||i.trim()===``){let t=await h(s(n.messages),n.abortController.signal);if(!t)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;o=t}else o=i.trim();let l=t(),d=a();await c(l,o,d);let m=n.getAppState().replBridgeSessionId;if(m){let e=f();import(`./createSession-Czx7_nf6.js`).then(({updateBridgeSessionTitle:t})=>t(m,o,{baseUrl:p(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await u(l,o,d),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:o}})),e(`Session renamed to: ${o}`,{display:`system`}),null}e((()=>{n(),d(),l(),o(),i(),m()}))();export{g as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-CbskW5G9.js";import{Ar as a,Fr as o,Po as s,Si as c,Uo as l,yi as u}from"./loadAgentsDir-CQF8qhne.js";import{a as d,i as f,r as p}from"./bridgeConfig-e0MGfed6.js";import{n as m,t as h}from"./generateSessionName-LnmjE9jh.js";async function g(e,n,i){if(r())return e(`Cannot rename: This session is a swarm teammate. Teammate names are set by the team leader.`,{display:`system`}),null;let o;if(!i||i.trim()===``){let t=await h(s(n.messages),n.abortController.signal);if(!t)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;o=t}else o=i.trim();let l=t(),d=a();await c(l,o,d);let m=n.getAppState().replBridgeSessionId;if(m){let e=f();import(`./createSession-DpqtD4ML.js`).then(({updateBridgeSessionTitle:t})=>t(m,o,{baseUrl:p(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await u(l,o,d),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:o}})),e(`Session renamed to: ${o}`,{display:`system`}),null}e((()=>{n(),d(),l(),o(),i(),m()}))();export{g as call};
@@ -1,2 +1,2 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,Ln as o,Rn as s,b as c,t as l,tn as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Ct as p,cn as m,ot as h}from"./state-sIHsFpDu.js";import{o as g,s as _}from"./log-DSV4Ht5l.js";import{Fr as v,Gr as y,Jr as b,Jy as x,Ky as S,Lr as C,Oi as w,Ri as T,Sr as E,Xr as D,fv as O,gT as k,hT as A,kr as j,pv as M,zi as N,zr as P}from"./loadAgentsDir-C_wFhytF.js";import{t as F}from"./useTerminalSize-Du-EamDN.js";import{n as I,r as L}from"./modalContext-c5Yqx_CQ.js";import{a as R,i as z,n as B,o as V,r as H,t as U}from"./crossProjectResume-CjJISRBQ.js";function W(e){switch(e.resultType){case`sessionNotFound`:return`Session ${a.bold(e.arg)} was not found. Run ${a.bold(`/resume`)} without arguments to browse all sessions.`;case`multipleMatches`:return`Found ${e.count} sessions matching ${a.bold(e.arg)}. Run ${a.bold(`/resume`)} to pick one from the list.`}}function G({message:e,args:t,onDone:n}){return J.useEffect(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsxs)(c,{dimColor:!0,children:[r.pointer,` /resume `,t]}),(0,Y.jsx)(A,{children:(0,Y.jsx)(c,{children:e})})]})}function K({onDone:e,onResume:t}){let[n,r]=J.useState([]),[a,o]=J.useState([]),[s,l]=J.useState(!0),[f,m]=J.useState(!1),[g,_]=J.useState(!1),{rows:v}=i(),x=L(),C=J.useCallback(async(t,n)=>{l(!0);try{let i=q(t?await y():await D(n),p());if(i.length===0){e(`No conversations found to resume`);return}r(i)}catch{e(`Failed to load conversations`)}finally{l(!1)}},[e]);J.useEffect(()=>{async function e(){let e=await T(h());o(e),C(!1,e)}e()},[C]);let w=J.useCallback(()=>{let e=!g;_(e),C(e,a)},[g,C,a]);async function E(n){let r=M(j(n));if(!r){e(`Failed to resume conversation`);return}let i=P(n)?await b(n):n,o=U(i,g,a);if(o.isCrossProject){if(o.isSameRepoWorktree){m(!0),t(r,i,`slash_command_picker`);return}let n=await u(o.command);n&&process.stdout.write(n),e([``,`This conversation is from a different directory.`,``,`To resume, run:`,` ${o.command}`,``,`(Command copied to clipboard)`,``].join(`
2
- `),{display:`user`});return}m(!0),t(r,i,`slash_command_picker`)}function O(){e(`Resume cancelled`,{display:`system`})}return s?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(S,{}),(0,Y.jsx)(c,{children:` Loading conversations…`})]}):f?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(S,{}),(0,Y.jsx)(c,{children:` Resuming conversation…`})]}):(0,Y.jsx)(R,{logs:n,maxHeight:x?Math.floor(v/2):v-2,onCancel:O,onSelect:E,onLogsChanged:()=>C(g,a),showAllProjects:g,onToggleAllProjects:w,onAgenticSearch:H})}function q(e,t){return e.filter(e=>!e.isSidechain&&j(e)!==t)}var J,Y,X;e((()=>{o(),n(),J=t(s(),1),m(),V(),k(),x(),I(),F(),l(),z(),B(),N(),g(),v(),O(),Y=f(),X=async(e,t,n)=>{let r=async(n,r,i)=>{try{await t.resume?.(n,r,i),e(void 0,{display:`skip`})}catch(t){_(t),e(`Failed to resume: ${t.message}`)}},i=n?.trim();if(!i)return(0,Y.jsx)(K,{onDone:e,onResume:r},Date.now());let a=await D(await T(h()));if(a.length===0){let t=`No conversations found to resume.`;return(0,Y.jsx)(G,{message:t,args:i,onDone:()=>e(t)})}let o=M(i);if(o){let e=a.filter(e=>j(e)===o).sort((e,t)=>t.modified.getTime()-e.modified.getTime());if(e.length>0){let t=e[0];return r(o,P(t)?await b(t):t,`slash_command_session_id`),null}let t=await E(o);if(t)return r(o,t,`slash_command_session_id`),null}if(C()){let t=await w(i,{exact:!0});if(t.length===1){let e=t[0],n=j(e);if(n)return r(n,P(e)?await b(e):e,`slash_command_title`),null}if(t.length>1){let n=W({resultType:`multipleMatches`,arg:i,count:t.length});return(0,Y.jsx)(G,{message:n,args:i,onDone:()=>e(n)})}}let s=W({resultType:`sessionNotFound`,arg:i});return(0,Y.jsx)(G,{message:s,args:i,onDone:()=>e(s)})}}))();export{X as call,q as filterResumableSessions};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,Ln as o,Rn as s,b as c,t as l,tn as u,x as d}from"./src-KjMLauwe.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Ct as p,cn as m,ot as h}from"./state-sIHsFpDu.js";import{o as g,s as _}from"./log-DSV4Ht5l.js";import{Fr as v,Gr as y,Jr as b,Ky as x,Lr as S,Oi as C,Ri as w,Sr as T,Wy as E,Xr as D,dv as O,gT as k,hT as A,kr as j,uv as M,zi as N,zr as P}from"./loadAgentsDir-CQF8qhne.js";import{t as F}from"./useTerminalSize-mqo2Swmk.js";import{n as I,r as L}from"./modalContext-DxfeT_3m.js";import{a as R,i as z,n as B,o as V,r as H,t as U}from"./crossProjectResume-BCr6jfGz.js";function W(e){switch(e.resultType){case`sessionNotFound`:return`Session ${a.bold(e.arg)} was not found. Run ${a.bold(`/resume`)} without arguments to browse all sessions.`;case`multipleMatches`:return`Found ${e.count} sessions matching ${a.bold(e.arg)}. Run ${a.bold(`/resume`)} to pick one from the list.`}}function G({message:e,args:t,onDone:n}){return J.useEffect(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsxs)(c,{dimColor:!0,children:[r.pointer,` /resume `,t]}),(0,Y.jsx)(A,{children:(0,Y.jsx)(c,{children:e})})]})}function K({onDone:e,onResume:t}){let[n,r]=J.useState([]),[a,o]=J.useState([]),[s,l]=J.useState(!0),[f,m]=J.useState(!1),[g,_]=J.useState(!1),{rows:v}=i(),x=L(),S=J.useCallback(async(t,n)=>{l(!0);try{let i=q(t?await y():await D(n),p());if(i.length===0){e(`No conversations found to resume`);return}r(i)}catch{e(`Failed to load conversations`)}finally{l(!1)}},[e]);J.useEffect(()=>{async function e(){let e=await w(h());o(e),S(!1,e)}e()},[S]);let C=J.useCallback(()=>{let e=!g;_(e),S(e,a)},[g,S,a]);async function T(n){let r=O(j(n));if(!r){e(`Failed to resume conversation`);return}let i=P(n)?await b(n):n,o=U(i,g,a);if(o.isCrossProject){if(o.isSameRepoWorktree){m(!0),t(r,i,`slash_command_picker`);return}let n=await u(o.command);n&&process.stdout.write(n),e([``,`This conversation is from a different directory.`,``,`To resume, run:`,` ${o.command}`,``,`(Command copied to clipboard)`,``].join(`
2
+ `),{display:`user`});return}m(!0),t(r,i,`slash_command_picker`)}function k(){e(`Resume cancelled`,{display:`system`})}return s?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(c,{children:` Loading conversations…`})]}):f?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(c,{children:` Resuming conversation…`})]}):(0,Y.jsx)(R,{logs:n,maxHeight:x?Math.floor(v/2):v-2,onCancel:k,onSelect:T,onLogsChanged:()=>S(g,a),showAllProjects:g,onToggleAllProjects:C,onAgenticSearch:H})}function q(e,t){return e.filter(e=>!e.isSidechain&&j(e)!==t)}var J,Y,X;e((()=>{o(),n(),J=t(s(),1),m(),V(),k(),x(),I(),F(),l(),z(),B(),N(),g(),v(),M(),Y=f(),X=async(e,t,n)=>{let r=async(n,r,i)=>{try{await t.resume?.(n,r,i),e(void 0,{display:`skip`})}catch(t){_(t),e(`Failed to resume: ${t.message}`)}},i=n?.trim();if(!i)return(0,Y.jsx)(K,{onDone:e,onResume:r},Date.now());let a=await D(await w(h()));if(a.length===0){let t=`No conversations found to resume.`;return(0,Y.jsx)(G,{message:t,args:i,onDone:()=>e(t)})}let o=O(i);if(o){let e=a.filter(e=>j(e)===o).sort((e,t)=>t.modified.getTime()-e.modified.getTime());if(e.length>0){let t=e[0];return r(o,P(t)?await b(t):t,`slash_command_session_id`),null}let t=await T(o);if(t)return r(o,t,`slash_command_session_id`),null}if(S()){let t=await C(i,{exact:!0});if(t.length===1){let e=t[0],n=j(e);if(n)return r(n,P(e)?await b(e):e,`slash_command_title`),null}if(t.length>1){let n=W({resultType:`multipleMatches`,arg:i,count:t.length});return(0,Y.jsx)(G,{message:n,args:i,onDone:()=>e(n)})}}let s=W({resultType:`sessionNotFound`,arg:i});return(0,Y.jsx)(G,{message:s,args:i,onDone:()=>e(s)})}}))();export{X as call,q as filterResumableSessions};
@@ -1 +1 @@
1
- import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./runtimeObserver-DaKaKNVW.js";t();export{o as RUNTIME_SESSION_ID,n as getRuntimeTurn,i as initSkillLearning,e as resetRuntimeLLMBookkeeping,r as resetRuntimeObserverForTest,a as runSkillLearningPostSampling};
1
+ import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./runtimeObserver-D6aF77Dq.js";t();export{o as RUNTIME_SESSION_ID,n as getRuntimeTurn,i as initSkillLearning,e as resetRuntimeLLMBookkeeping,r as resetRuntimeObserverForTest,a as runSkillLearningPostSampling};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{Gi as r,aO as i,iO as a,na as o}from"./loadAgentsDir-C_wFhytF.js";import{r as s,t as c}from"./featureCheck-j7P30mry.js";import{a as l,c as u,i as d,l as f,n as p,o as m,r as ee,s as te,u as ne}from"./instinctParser-DOtj1Kni.js";import{C as h,S as g,b as _,c as re,f as ie,i as ae,m as oe,o as v,r as se,u as y}from"./skillGenerator-CBuoIFsH.js";import{a as ce,i as b,l as le,n as x,o as ue,t as de}from"./observationStore-rLlDwRtG.js";import{a as fe,c as pe}from"./projectContext-Dn7umMp6.js";import{d as me,i as he,l as ge,p as _e}from"./sessionObserver-ardnTJ37.js";import{dirname as ve,join as S}from"node:path";import{existsSync as C}from"node:fs";import{randomBytes as ye}from"node:crypto";import{mkdir as w,readFile as be,readdir as T,rename as xe,unlink as Se,writeFile as E}from"node:fs/promises";function D(e,t){if(e.length===0)throw Error(`Cannot generate a command draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Ce(e)),i=Ee(e),a=t?.description??we(e),o=k(r,n,t),s=Te({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function O(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),r(),t)}function k(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`commands`):r?.globalCommandsDir??S(t(),`commands`)}function Ce(e){return g([`learned`,...De(e,4)].join(`-`))||`learned-command`}function we(e){return(e[0]?.trigger??`Reuse the learned workflow`).replace(/\s+/g,` `).slice(0,120)}function Te(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# /${t}`,``,`## When to use`,``,i.map(e=>`- ${e.trigger}`).join(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{Gi as r,aO as i,iO as a,na as o}from"./loadAgentsDir-CQF8qhne.js";import{r as s,t as c}from"./featureCheck-j7P30mry.js";import{a as l,c as u,i as d,l as f,n as p,o as m,r as ee,s as te,u as ne}from"./instinctParser-BMtAMLSx.js";import{C as h,S as g,b as _,c as re,f as ie,i as ae,m as oe,o as v,r as se,u as y}from"./skillGenerator-_khb-Gmc.js";import{a as ce,i as b,l as le,n as x,o as ue,t as de}from"./observationStore-Bi1rRKcD.js";import{a as fe,c as pe}from"./projectContext-2Z2w8AI8.js";import{d as me,i as he,l as ge,p as _e}from"./sessionObserver-gjdJ91cv.js";import{dirname as ve,join as S}from"node:path";import{existsSync as C}from"node:fs";import{randomBytes as ye}from"node:crypto";import{mkdir as w,readFile as be,readdir as T,rename as xe,unlink as Se,writeFile as E}from"node:fs/promises";function D(e,t){if(e.length===0)throw Error(`Cannot generate a command draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Ce(e)),i=Ee(e),a=t?.description??we(e),o=k(r,n,t),s=Te({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function O(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),r(),t)}function k(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`commands`):r?.globalCommandsDir??S(t(),`commands`)}function Ce(e){return g([`learned`,...De(e,4)].join(`-`))||`learned-command`}function we(e){return(e[0]?.trigger??`Reuse the learned workflow`).replace(/\s+/g,` `).slice(0,120)}function Te(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# /${t}`,``,`## When to use`,``,i.map(e=>`- ${e.trigger}`).join(`
2
2
  `),``,`## Steps`,``,i.map(e=>`- ${e.action}`).join(`
3
3
  `),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).join(`
4
4
  `),``].join(`
@@ -6,5 +6,5 @@ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWe
6
6
  `),``,`## Playbook`,``,i.map(e=>`- ${e.action}`).join(`
7
7
  `),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,20).join(`
8
8
  `),``].join(`
9
- `)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),o(),_()}));function F(e){let t=new Map;for(let n of e){if(n.status!==`active`&&n.status!==`pending`)continue;let e=`${n.domain}:${Pe(n.trigger)}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return Array.from(t.values()).filter(e=>e.length>=f().minClusterSize).map(e=>{let t=e.reduce((e,t)=>e+t.confidence,0)/e.length;return{target:I(e),trigger:e[0]?.trigger??`learned pattern`,domain:e[0]?.domain??`project`,instincts:e,averageConfidence:Number(t.toFixed(2))}}).sort((e,t)=>t.averageConfidence-e.averageConfidence)}function I(e){let t=Array.isArray(e)?e:e.instincts,n=t.map(e=>`${e.trigger} ${e.action}`).join(` `).toLowerCase();return/user asks|explicitly request|command|run /.test(n)?`command`:t.length>=4&&/(debug|investigate|research|multi-step)/.test(n)?`agent`:`skill`}function Ne(e,t){return F(e).filter(e=>e.target===`skill`&&h(e.instincts)).map(e=>ae(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function L(e,t){return F(e).filter(e=>e.target===`command`&&h(e.instincts)).map(e=>D(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function R(e,t){return F(e).filter(e=>e.target===`agent`&&h(e.instincts)).map(e=>j(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function Pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,` `).split(/\s+/).filter(Boolean).slice(0,6).join(` `)}var z=e((()=>{_(),v(),A(),P(),ne()}));function B(e){let t=x(e),n=e?.project;return(e?.scope??n?.scope??`project`)===`global`||!n||n.projectId===`global`?S(t,`global`,`instincts`,`personal`):S(t,`projects`,n.projectId,`instincts`,`personal`)}async function V(e,t){let n=m(e);await w(B(t),{recursive:!0});let r=He(n.id,t),i=`${r}.${ye(6).toString(`hex`)}.tmp`;return await E(i,u(n)),await xe(i,r),n}async function H(e){let t=B(e),n=[];try{n=await T(t)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.filter(e=>e.endsWith(`.json`))){let n=await be(S(t,e),`utf8`);r.push(te(n))}return r.sort((e,t)=>e.id.localeCompare(t.id))}function Fe(e,t){let n=U.then(()=>Ie(e,t));return U=n.catch(()=>{}),n}async function Ie(e,t){let n=await H(t),r=n.find(t=>t.id===e.id)??n.find(t=>t.trigger.toLowerCase()===e.trigger.toLowerCase()&&l(t,e)),i=new Date().toISOString();if(!r)return V(e,t);let a=l(r,e),o=a?-.1:ze(e.evidenceOutcome),s=p(r.confidence+o),c=Le(r.status,s,a);return V(m({...r,confidence:s,evidence:[...r.evidence,...e.evidence],evidenceOutcome:e.evidenceOutcome??r.evidenceOutcome,observationIds:[...r.observationIds??[],...e.observationIds??[]],updatedAt:i,status:c}),t)}function Le(e,t,n){return n&&t<.3?`conflict-hold`:e===`conflict-hold`&&t>=.5||e===`pending`&&t>=.8?`active`:e}async function Re(e){let t=await H(e),n=Date.now(),r=0;for(let i of t){if(i.status!==`pending`&&i.status!==`active`)continue;let t=Date.parse(i.updatedAt);if(Number.isNaN(t))continue;let a=Math.floor((n-t)/We);if(a<1)continue;let o=-Ue*a,s=p(i.confidence+o);s!==i.confidence&&(await V(m({...i,confidence:s,updatedAt:new Date(n).toISOString()}),e),r+=1)}return r}function ze(e){return e===`failure`?-.05:.05}async function Be(e,t){let n=await H(t);return await w(ve(e),{recursive:!0}),await E(e,`${JSON.stringify(n,null,2)}\n`),n}async function Ve(e,t){let n=await H(t),r=Date.now()-e*24*60*60*1e3,i=[];for(let e of n)e.status===`pending`&&Date.parse(e.updatedAt)<r&&(await Se(He(e.id,t)),i.push(e));return i}function He(e,t){return S(B(t),`${e}.json`)}var U,Ue,We,W=e((()=>{b(),d(),U=Promise.resolve(),Ue=.02,We=10080*60*1e3}));function Ge(e){if(G.add(e),G.size>Xe){let e=G.size-Ze,t=G.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;G.delete(e.value)}}}function Ke(e,t=2,n=.8){let r=new Map;for(let t of e){if(t.scope!==`project`)continue;let e=r.get(t.id)??[];e.push(t),r.set(t.id,e)}return Array.from(r.entries()).flatMap(([e,r])=>{let i=Array.from(new Set(r.map(e=>e.projectId).filter(Boolean))),a=r.reduce((e,t)=>e+t.confidence,0)/r.length;return i.length>=t&&a>=n?[{instinctId:e,projectIds:i,averageConfidence:Number(a.toFixed(2))}]:[]})}async function qe(e={}){let t=e.minProjects??2,n=e.minConfidence??.8,r=await Je(e.rootDir),i=Ke(r,t,n),a=[];for(let t of i){if(G.has(t.instinctId))continue;let n=r.find(e=>e.id===t.instinctId);n&&(await V({...n,scope:`global`,projectId:void 0,projectName:void 0,confidence:t.averageConfidence,updatedAt:new Date().toISOString()},{rootDir:e.rootDir,scope:`global`,project:Ye(e.rootDir)}),Ge(t.instinctId),a.push(t))}return a}async function Je(e){let t=S(x(e?{rootDir:e}:void 0),`projects`);if(!C(t))return[];let n=await T(t,{withFileTypes:!0}),r=[];for(let i of n){if(!i.isDirectory())continue;let n=await H({rootDir:e,project:{projectId:i.name,projectName:i.name,scope:`project`,source:`git_root`,cwd:t,storageDir:S(t,i.name)},scope:`project`});r.push(...n)}return r}function Ye(e){let t=x(e?{rootDir:e}:void 0);return{projectId:`global`,projectName:`Global`,scope:`global`,source:`global`,cwd:t,storageDir:S(t,`global`)}}var Xe,Ze,G,Qe=e((()=>{W(),b(),Xe=256,Ze=192,G=new Set}));function $e(){X=0,Z=0,Q.clear()}function et(){return J}function tt(){if(!q){q=!0;try{_e()}catch{}i(it),nt().catch(()=>{})}}async function nt(){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE)return;let e={project:pe(process.cwd())};await Promise.allSettled([Re(e),ce(e),Ve(30,e)])}function rt(e){try{let t=x();return e.startsWith(t)}catch{return!1}}async function it(e){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE||!e.querySource?.startsWith(`repl_main_thread`)||e.toolUseContext.agentId)return;let t=process.cwd();if(rt(t))return;let n=pe(t),r={project:n};++J;let i=[];for(let t of st(e.messages,n))i.push(await de(t,r));let a=(await ue(r)).filter(e=>e.source===`tool-hook`&&e.sessionId===`runtime-session`&&typeof e.timestamp==`string`&&e.timestamp>Y);i.push(...a);for(let e of a)e.timestamp>Y&&(Y=e.timestamp);if(i.length===0)return;let o=Date.now(),{llm:c}=f(),l=i.length>=5&&X<c.maxCallsPerSession&&o-Z>=c.cooldownMs,u;if(l)X++,Z=o,u=await ge(i,{project:n});else{let{heuristicObserverBackend:e}=await import(`./sessionObserver-j8D9hidw.js`),t=e.analyze(i,{project:n});u=Array.isArray(t)?t:await t}for(let e of u)await Fe(ee(e),r);await ot(r)}function at(){J=0,Y=``,$e()}async function ot(e){let n=await H(e),r=process.cwd(),i=[S(r,`.claude`,`skills`),S(t(),`skills`)],a=F(n).filter(e=>e.target===`skill`&&h(e.instincts));for(let e of a){let t=await se(e.instincts,{cwd:r,scope:e.instincts[0]?.scope??`project`},i);if(t.action===`append-evidence`)continue;let n=t.draft;C(S(n.outputPath,`SKILL.md`))||await re(ie(n,await y(`skill`,n,i)))}let o=L(n,{cwd:r});for(let e of o)(await y(`command`,e,[S(r,`.claude`,`commands`),S(t(),`commands`)])).length>0||await O(e);let s=R(n,{cwd:r});for(let e of s)(await y(`agent`,e,[S(r,`.claude`,`agents`),S(t(),`agents`)])).length>0||await M(e);await qe()}function st(e,t){let n=K,r={sessionId:n,projectId:t.projectId,projectName:t.projectName,cwd:t.cwd,timestamp:new Date().toISOString(),source:`hook`};return e.flatMap(e=>{let t=`${n}:${String(e.uuid)}`;if(Q.has(t))return[];if(Q.add(t),Q.size>dt){let e=Q.size-$,t=Q.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;Q.delete(e.value)}}if(e.type===`user`){let t=ut(e.message?.content);if(t.length>0)return t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_complete`,toolName:e.toolName,toolOutput:e.output,outcome:e.isError?`failure`:`success`}));let n=ct(e.message?.content);return n.trim()?[{...r,id:crypto.randomUUID(),event:`user_message`,messageText:n}]:[]}if(e.type===`assistant`){let t=lt(e.message?.content),n=ct(e.message?.content);return[...t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_start`,toolName:e.toolName,toolInput:e.input})),...n.trim()?[{...r,id:crypto.randomUUID(),event:`assistant_message`,messageText:n}]:[]]}return[]})}function ct(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
9
+ `)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),o(),_()}));function F(e){let t=new Map;for(let n of e){if(n.status!==`active`&&n.status!==`pending`)continue;let e=`${n.domain}:${Pe(n.trigger)}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return Array.from(t.values()).filter(e=>e.length>=f().minClusterSize).map(e=>{let t=e.reduce((e,t)=>e+t.confidence,0)/e.length;return{target:I(e),trigger:e[0]?.trigger??`learned pattern`,domain:e[0]?.domain??`project`,instincts:e,averageConfidence:Number(t.toFixed(2))}}).sort((e,t)=>t.averageConfidence-e.averageConfidence)}function I(e){let t=Array.isArray(e)?e:e.instincts,n=t.map(e=>`${e.trigger} ${e.action}`).join(` `).toLowerCase();return/user asks|explicitly request|command|run /.test(n)?`command`:t.length>=4&&/(debug|investigate|research|multi-step)/.test(n)?`agent`:`skill`}function Ne(e,t){return F(e).filter(e=>e.target===`skill`&&h(e.instincts)).map(e=>ae(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function L(e,t){return F(e).filter(e=>e.target===`command`&&h(e.instincts)).map(e=>D(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function R(e,t){return F(e).filter(e=>e.target===`agent`&&h(e.instincts)).map(e=>j(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function Pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,` `).split(/\s+/).filter(Boolean).slice(0,6).join(` `)}var z=e((()=>{_(),v(),A(),P(),ne()}));function B(e){let t=x(e),n=e?.project;return(e?.scope??n?.scope??`project`)===`global`||!n||n.projectId===`global`?S(t,`global`,`instincts`,`personal`):S(t,`projects`,n.projectId,`instincts`,`personal`)}async function V(e,t){let n=m(e);await w(B(t),{recursive:!0});let r=He(n.id,t),i=`${r}.${ye(6).toString(`hex`)}.tmp`;return await E(i,u(n)),await xe(i,r),n}async function H(e){let t=B(e),n=[];try{n=await T(t)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.filter(e=>e.endsWith(`.json`))){let n=await be(S(t,e),`utf8`);r.push(te(n))}return r.sort((e,t)=>e.id.localeCompare(t.id))}function Fe(e,t){let n=U.then(()=>Ie(e,t));return U=n.catch(()=>{}),n}async function Ie(e,t){let n=await H(t),r=n.find(t=>t.id===e.id)??n.find(t=>t.trigger.toLowerCase()===e.trigger.toLowerCase()&&l(t,e)),i=new Date().toISOString();if(!r)return V(e,t);let a=l(r,e),o=a?-.1:ze(e.evidenceOutcome),s=p(r.confidence+o),c=Le(r.status,s,a);return V(m({...r,confidence:s,evidence:[...r.evidence,...e.evidence],evidenceOutcome:e.evidenceOutcome??r.evidenceOutcome,observationIds:[...r.observationIds??[],...e.observationIds??[]],updatedAt:i,status:c}),t)}function Le(e,t,n){return n&&t<.3?`conflict-hold`:e===`conflict-hold`&&t>=.5||e===`pending`&&t>=.8?`active`:e}async function Re(e){let t=await H(e),n=Date.now(),r=0;for(let i of t){if(i.status!==`pending`&&i.status!==`active`)continue;let t=Date.parse(i.updatedAt);if(Number.isNaN(t))continue;let a=Math.floor((n-t)/We);if(a<1)continue;let o=-Ue*a,s=p(i.confidence+o);s!==i.confidence&&(await V(m({...i,confidence:s,updatedAt:new Date(n).toISOString()}),e),r+=1)}return r}function ze(e){return e===`failure`?-.05:.05}async function Be(e,t){let n=await H(t);return await w(ve(e),{recursive:!0}),await E(e,`${JSON.stringify(n,null,2)}\n`),n}async function Ve(e,t){let n=await H(t),r=Date.now()-e*24*60*60*1e3,i=[];for(let e of n)e.status===`pending`&&Date.parse(e.updatedAt)<r&&(await Se(He(e.id,t)),i.push(e));return i}function He(e,t){return S(B(t),`${e}.json`)}var U,Ue,We,W=e((()=>{b(),d(),U=Promise.resolve(),Ue=.02,We=10080*60*1e3}));function Ge(e){if(G.add(e),G.size>Xe){let e=G.size-Ze,t=G.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;G.delete(e.value)}}}function Ke(e,t=2,n=.8){let r=new Map;for(let t of e){if(t.scope!==`project`)continue;let e=r.get(t.id)??[];e.push(t),r.set(t.id,e)}return Array.from(r.entries()).flatMap(([e,r])=>{let i=Array.from(new Set(r.map(e=>e.projectId).filter(Boolean))),a=r.reduce((e,t)=>e+t.confidence,0)/r.length;return i.length>=t&&a>=n?[{instinctId:e,projectIds:i,averageConfidence:Number(a.toFixed(2))}]:[]})}async function qe(e={}){let t=e.minProjects??2,n=e.minConfidence??.8,r=await Je(e.rootDir),i=Ke(r,t,n),a=[];for(let t of i){if(G.has(t.instinctId))continue;let n=r.find(e=>e.id===t.instinctId);n&&(await V({...n,scope:`global`,projectId:void 0,projectName:void 0,confidence:t.averageConfidence,updatedAt:new Date().toISOString()},{rootDir:e.rootDir,scope:`global`,project:Ye(e.rootDir)}),Ge(t.instinctId),a.push(t))}return a}async function Je(e){let t=S(x(e?{rootDir:e}:void 0),`projects`);if(!C(t))return[];let n=await T(t,{withFileTypes:!0}),r=[];for(let i of n){if(!i.isDirectory())continue;let n=await H({rootDir:e,project:{projectId:i.name,projectName:i.name,scope:`project`,source:`git_root`,cwd:t,storageDir:S(t,i.name)},scope:`project`});r.push(...n)}return r}function Ye(e){let t=x(e?{rootDir:e}:void 0);return{projectId:`global`,projectName:`Global`,scope:`global`,source:`global`,cwd:t,storageDir:S(t,`global`)}}var Xe,Ze,G,Qe=e((()=>{W(),b(),Xe=256,Ze=192,G=new Set}));function $e(){X=0,Z=0,Q.clear()}function et(){return J}function tt(){if(!q){q=!0;try{_e()}catch{}i(it),nt().catch(()=>{})}}async function nt(){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE)return;let e={project:pe(process.cwd())};await Promise.allSettled([Re(e),ce(e),Ve(30,e)])}function rt(e){try{let t=x();return e.startsWith(t)}catch{return!1}}async function it(e){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE||!e.querySource?.startsWith(`repl_main_thread`)||e.toolUseContext.agentId)return;let t=process.cwd();if(rt(t))return;let n=pe(t),r={project:n};++J;let i=[];for(let t of st(e.messages,n))i.push(await de(t,r));let a=(await ue(r)).filter(e=>e.source===`tool-hook`&&e.sessionId===`runtime-session`&&typeof e.timestamp==`string`&&e.timestamp>Y);i.push(...a);for(let e of a)e.timestamp>Y&&(Y=e.timestamp);if(i.length===0)return;let o=Date.now(),{llm:c}=f(),l=i.length>=5&&X<c.maxCallsPerSession&&o-Z>=c.cooldownMs,u;if(l)X++,Z=o,u=await ge(i,{project:n});else{let{heuristicObserverBackend:e}=await import(`./sessionObserver-CrfmnMzL.js`),t=e.analyze(i,{project:n});u=Array.isArray(t)?t:await t}for(let e of u)await Fe(ee(e),r);await ot(r)}function at(){J=0,Y=``,$e()}async function ot(e){let n=await H(e),r=process.cwd(),i=[S(r,`.claude`,`skills`),S(t(),`skills`)],a=F(n).filter(e=>e.target===`skill`&&h(e.instincts));for(let e of a){let t=await se(e.instincts,{cwd:r,scope:e.instincts[0]?.scope??`project`},i);if(t.action===`append-evidence`)continue;let n=t.draft;C(S(n.outputPath,`SKILL.md`))||await re(ie(n,await y(`skill`,n,i)))}let o=L(n,{cwd:r});for(let e of o)(await y(`command`,e,[S(r,`.claude`,`commands`),S(t(),`commands`)])).length>0||await O(e);let s=R(n,{cwd:r});for(let e of s)(await y(`agent`,e,[S(r,`.claude`,`agents`),S(t(),`agents`)])).length>0||await M(e);await qe()}function st(e,t){let n=K,r={sessionId:n,projectId:t.projectId,projectName:t.projectName,cwd:t.cwd,timestamp:new Date().toISOString(),source:`hook`};return e.flatMap(e=>{let t=`${n}:${String(e.uuid)}`;if(Q.has(t))return[];if(Q.add(t),Q.size>dt){let e=Q.size-$,t=Q.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;Q.delete(e.value)}}if(e.type===`user`){let t=ut(e.message?.content);if(t.length>0)return t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_complete`,toolName:e.toolName,toolOutput:e.output,outcome:e.isError?`failure`:`success`}));let n=ct(e.message?.content);return n.trim()?[{...r,id:crypto.randomUUID(),event:`user_message`,messageText:n}]:[]}if(e.type===`assistant`){let t=lt(e.message?.content),n=ct(e.message?.content);return[...t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_start`,toolName:e.toolName,toolInput:e.input})),...n.trim()?[{...r,id:crypto.randomUUID(),event:`assistant_message`,messageText:n}]:[]]}return[]})}function ct(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
10
10
  `):``}function lt(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_use`?[{toolName:String(t.name??`unknown_tool`),input:le(t.input)}]:[]}):[]}function ut(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_result`?[{toolName:String(t.name??t.tool_name??`unknown_tool`),output:le(t.content),isError:t.is_error===!0}]:[]}):[]}var K,q,J,Y,X,Z,Q,dt,$,ft=e((()=>{a(),ne(),c(),b(),fe(),he(),d(),me(),W(),oe(),z(),v(),_(),A(),P(),Qe(),n(),K=`runtime-session`,q=!1,J=0,Y=``,X=0,Z=0,Q=new Set,dt=1e3,$=500}));export{O as A,j as C,D,M as E,k as O,z as S,P as T,I as _,$e as a,L as b,qe as c,Be as d,W as f,Fe as g,V as h,ft as i,A as k,Ke as l,Ve as m,et as n,at as o,H as p,tt as r,it as s,K as t,Qe as u,F as v,N as w,Ne as x,R as y};
@@ -0,0 +1 @@
1
+ import{FA as e,MA as t}from"./loadAgentsDir-CQF8qhne.js";e();export{t as SandboxManager};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,T as r,b as i,i as a,n as o,nt as s,p as c,r as l,t as u,v as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,j as h}from"./state-sIHsFpDu.js";import{Za as g,no as _,oo as v}from"./paths-Ci1iwL5Y.js";import{i as y,o as b}from"./platform-mh9ypxS8.js";import{FA as x,MA as S,NA as C,RA as w,aS as T,oS as E}from"./loadAgentsDir-C_wFhytF.js";import{t as D}from"./useKeybinding-DPOUuymz.js";import{relative as O}from"path";function k(){let e=S.isSandboxingEnabled(),t=S.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(f,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(i,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=S.getFsReadConfig(),a=S.getFsWriteConfig(),o=S.getNetworkRestrictionConfig(),s=S.getAllowUnixSockets(),c=S.getExcludedCommands(),l=S.getLinuxGlobPatternWarnings();return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(f,{flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(i,{dimColor:!0,children:c.length>0?c.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),a.allowOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,a.allowOnly.join(`, `)]}),a.denyWithinAllow.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied within allowed: `,a.denyWithinAllow.join(`, `)]})]}),(o.allowedHosts&&o.allowedHosts.length>0||o.deniedHosts&&o.deniedHosts.length>0)&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(i,{bold:!0,color:`permission`,children:[`Network Restrictions`,w()?` (Managed)`:``,`:`]}),o.allowedHosts&&o.allowedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,o.allowedHosts.join(`, `)]}),o.deniedHosts&&o.deniedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,o.deniedHosts.join(`, `)]})]}),s&&s.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(i,{dimColor:!0,children:s.join(`, `)})]}),l.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(i,{dimColor:!0,children:[`The following patterns will be ignored: `,l.slice(0,3).join(`, `),l.length>3&&` (${l.length-3} more)`]})]}),n]})}var A,j=e((()=>{n(),u(),x(),A=p()}));function M({depCheck:e}){let t=y()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),a=e.errors.some(e=>e.includes(`socat`)),o=e.warnings.length>0,s=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(f,{flexDirection:`column`,children:(0,N.jsxs)(i,{children:[`seatbelt: `,(0,N.jsx)(i,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`ripgrep (rg): `,n?(0,N.jsx)(i,{color:`error`,children:`not found`}):(0,N.jsx)(i,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`bubblewrap (bwrap):`,` `,r?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),r&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`socat: `,a?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),a&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`seccomp filter:`,` `,o?(0,N.jsx)(i,{color:`warning`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`}),o&&(0,N.jsx)(i,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),o&&(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),s.map(e=>(0,N.jsx)(i,{color:`error`,children:e},e))]})}var N,P=e((()=>{n(),u(),b(),N=p()}));function F({onComplete:e}){let t=S.isSandboxingEnabled(),n=S.areSandboxSettingsLockedByPolicy(),r=S.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(i,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(f,{marginTop:1,children:(0,L.jsxs)(i,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:r?`open`:`closed`}):(0,L.jsx)(f,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:n}){let[o]=r(),{headerFocused:s,focusHeader:c}=a(),l=d(`success`,o)(`(current)`),u=[{label:n===`open`?`Allow unsandboxed fallback ${l}`:`Allow unsandboxed fallback`,value:`open`},{label:n===`closed`?`Strict sandbox mode ${l}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await S.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(f,{marginBottom:1,children:(0,L.jsx)(i,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(T,{options:u,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,L.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{n(),u(),x(),E(),L=p()}));function z({onComplete:e,depCheck:t}){let[n]=r(),i=S.isSandboxingEnabled(),a=S.isAutoAllowBashIfSandboxedEnabled(),u=t.warnings.length>0,f=_().sandbox?.network?.allowAllUnixSockets,p=u&&!f,m=i?a?`auto-allow`:`regular`:`disabled`,h=d(`success`,n)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await S.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}s({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(o,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(o,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(o,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(c,{color:`permission`,children:(0,V.jsx)(l,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[y,...u?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:n,onSelect:r,onComplete:o}){let{headerFocused:s,focusHeader:c}=a();return(0,V.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(T,{options:n,onChange:r,onCancel:()=>o(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,V.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(i,{dimColor:!0,children:[(0,V.jsx)(i,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{n(),u(),D(),x(),v(),E(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=_().theme||`light`,i=y();if(!S.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(d(`error`,r)(t)),null}let a=S.checkDependencies();if(!S.isPlatformInEnabledList())return e(d(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(S.areSandboxSettingsLockedByPolicy())return e(d(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(d(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);C(n);let i=g(`localSettings`),a=i?O(h(),i):`.claude/settings.local.json`;return e(d(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(d(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{n(),m(),H(),u(),b(),x(),v(),W=p()}))();export{U as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,T as r,b as i,i as a,n as o,nt as s,p as c,r as l,t as u,v as d,x as f}from"./src-KjMLauwe.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,j as h}from"./state-sIHsFpDu.js";import{Za as g,no as _,oo as v}from"./paths-4ZWdjPP4.js";import{i as y,o as b}from"./platform-mh9ypxS8.js";import{FA as x,MA as S,NA as C,RA as w,aS as T,oS as E}from"./loadAgentsDir-CQF8qhne.js";import{t as D}from"./useKeybinding-DOjEx42R.js";import{relative as O}from"path";function k(){let e=S.isSandboxingEnabled(),t=S.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(f,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(i,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=S.getFsReadConfig(),a=S.getFsWriteConfig(),o=S.getNetworkRestrictionConfig(),s=S.getAllowUnixSockets(),c=S.getExcludedCommands(),l=S.getLinuxGlobPatternWarnings();return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(f,{flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(i,{dimColor:!0,children:c.length>0?c.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),a.allowOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,a.allowOnly.join(`, `)]}),a.denyWithinAllow.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied within allowed: `,a.denyWithinAllow.join(`, `)]})]}),(o.allowedHosts&&o.allowedHosts.length>0||o.deniedHosts&&o.deniedHosts.length>0)&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(i,{bold:!0,color:`permission`,children:[`Network Restrictions`,w()?` (Managed)`:``,`:`]}),o.allowedHosts&&o.allowedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,o.allowedHosts.join(`, `)]}),o.deniedHosts&&o.deniedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,o.deniedHosts.join(`, `)]})]}),s&&s.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(i,{dimColor:!0,children:s.join(`, `)})]}),l.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(i,{dimColor:!0,children:[`The following patterns will be ignored: `,l.slice(0,3).join(`, `),l.length>3&&` (${l.length-3} more)`]})]}),n]})}var A,j=e((()=>{n(),u(),x(),A=p()}));function M({depCheck:e}){let t=y()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),a=e.errors.some(e=>e.includes(`socat`)),o=e.warnings.length>0,s=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(f,{flexDirection:`column`,children:(0,N.jsxs)(i,{children:[`seatbelt: `,(0,N.jsx)(i,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`ripgrep (rg): `,n?(0,N.jsx)(i,{color:`error`,children:`not found`}):(0,N.jsx)(i,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`bubblewrap (bwrap):`,` `,r?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),r&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`socat: `,a?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),a&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`seccomp filter:`,` `,o?(0,N.jsx)(i,{color:`warning`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`}),o&&(0,N.jsx)(i,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),o&&(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),s.map(e=>(0,N.jsx)(i,{color:`error`,children:e},e))]})}var N,P=e((()=>{n(),u(),b(),N=p()}));function F({onComplete:e}){let t=S.isSandboxingEnabled(),n=S.areSandboxSettingsLockedByPolicy(),r=S.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(i,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(f,{marginTop:1,children:(0,L.jsxs)(i,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:r?`open`:`closed`}):(0,L.jsx)(f,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:n}){let[o]=r(),{headerFocused:s,focusHeader:c}=a(),l=d(`success`,o)(`(current)`),u=[{label:n===`open`?`Allow unsandboxed fallback ${l}`:`Allow unsandboxed fallback`,value:`open`},{label:n===`closed`?`Strict sandbox mode ${l}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await S.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(f,{marginBottom:1,children:(0,L.jsx)(i,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(T,{options:u,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,L.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{n(),u(),x(),E(),L=p()}));function z({onComplete:e,depCheck:t}){let[n]=r(),i=S.isSandboxingEnabled(),a=S.isAutoAllowBashIfSandboxedEnabled(),u=t.warnings.length>0,f=_().sandbox?.network?.allowAllUnixSockets,p=u&&!f,m=i?a?`auto-allow`:`regular`:`disabled`,h=d(`success`,n)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await S.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}s({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(o,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(o,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(o,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(c,{color:`permission`,children:(0,V.jsx)(l,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[y,...u?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:n,onSelect:r,onComplete:o}){let{headerFocused:s,focusHeader:c}=a();return(0,V.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(T,{options:n,onChange:r,onCancel:()=>o(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,V.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(i,{dimColor:!0,children:[(0,V.jsx)(i,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{n(),u(),D(),x(),v(),E(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=_().theme||`light`,i=y();if(!S.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(d(`error`,r)(t)),null}let a=S.checkDependencies();if(!S.isPlatformInEnabledList())return e(d(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(S.areSandboxSettingsLockedByPolicy())return e(d(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(d(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);C(n);let i=g(`localSettings`),a=i?O(h(),i):`.claude/settings.local.json`;return e(d(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(d(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{n(),m(),H(),u(),b(),x(),v(),W=p()}))();export{U as call};
@@ -0,0 +1 @@
1
+ import{rl as e,tl as t}from"./loadAgentsDir-CQF8qhne.js";t();export{e as isSearchExtraToolsEnabled};