claude-code-best 1.9.4 → 1.9.5
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.
- package/README.md +57 -0
- package/dist/chunks/{AddWorkspaceDirectory-zhNNLYJA.js → AddWorkspaceDirectory-wb1A6A1V.js} +5 -5
- package/dist/chunks/{App-CuYPQrrd.js → App-Bcnrh3dc.js} +3 -3
- package/dist/chunks/{ApproveApiKey-Ccw6bh45.js → ApproveApiKey-CSciZ4oT.js} +3 -3
- package/dist/chunks/{AssistantSessionChooser-vQDdy6y6.js → AssistantSessionChooser-BXkPQwIC.js} +5 -5
- package/dist/chunks/{BackgroundTasksDialog-DqG3-ibG.js → BackgroundTasksDialog-BS2W-VtT.js} +9 -9
- package/dist/chunks/{BypassPermissionsModeDialog-BBZZNv33.js → BypassPermissionsModeDialog-CXrUnA-1.js} +3 -3
- package/dist/chunks/{ClaudeInChromeOnboarding-CkKfKhvm.js → ClaudeInChromeOnboarding-B9V6mUEB.js} +3 -3
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-DKv8GTI_.js → ClaudeMdExternalIncludesDialog-CIGEco9W.js} +3 -3
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-BwXFkCDL.js → ClaudeMdExternalIncludesDialog-DI2MKt3q.js} +1 -1
- package/dist/chunks/{ConsoleOAuthFlow-D7IBLsQW.js → ConsoleOAuthFlow-D1JR57Uu.js} +1 -1
- package/dist/chunks/{DesktopHandoff-D3uIq4jf.js → DesktopHandoff-BD_pGqfl.js} +8 -8
- package/dist/chunks/{DevChannelsDialog-Cp_dx7gN.js → DevChannelsDialog-BF4w_ywL.js} +2 -2
- package/dist/chunks/{Dialog-CZec2tNS.js → Dialog-DOTV_0Ki.js} +1 -1
- package/dist/chunks/{DiffDialog-BOS10I4D.js → DiffDialog-CIIwMyNt.js} +6 -6
- package/dist/chunks/{Doctor-fcfLIzRa.js → Doctor-CO_8BG9f.js} +12 -12
- package/dist/chunks/{ExitFlow-GDXAnO8z.js → ExitFlow-TFclga90.js} +5 -5
- package/dist/chunks/{Feedback-cEHa_J0I.js → Feedback-rD7pqrNe.js} +11 -11
- package/dist/chunks/{Grove-Bd8ApGu1.js → Grove-B3Ze1SL8.js} +2 -2
- package/dist/chunks/{HybridTransport-QkLw8jko.js → HybridTransport-BGdrFPgE.js} +6 -6
- package/dist/chunks/{ITermBackend-DYMydNl0.js → ITermBackend-Dzu5vwQw.js} +4 -4
- package/dist/chunks/{InvalidConfigDialog-DUR-szsZ.js → InvalidConfigDialog-CF_wp7tW.js} +4 -4
- package/dist/chunks/{InvalidSettingsDialog-CwnW9Y0P.js → InvalidSettingsDialog-CwDNbVj7.js} +3 -3
- package/dist/chunks/{ListItem-CU8k4VnD.js → ListItem-DIAtDRD8.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-DXJbMjis.js → MCPConnectionManager-CdKtgwno.js} +7 -7
- package/dist/chunks/{McpParsingWarnings-DADlM1gO.js → McpParsingWarnings-2qbImsD6.js} +2 -2
- package/dist/chunks/{MessageSelector-DgAUFiJN.js → MessageSelector-C0gb98sA.js} +15 -15
- package/dist/chunks/{Messages-hHrs3wYs.js → Messages-DG01c5hz.js} +21 -21
- package/dist/chunks/{Onboarding-CE0Xo1-2.js → Onboarding-CPjeMLR2.js} +11 -11
- package/dist/chunks/{OverageCreditUpsell-QwEYaQe-.js → OverageCreditUpsell-D9tKSU06.js} +4 -4
- package/dist/chunks/{PermissionDialog-D43s11-I.js → PermissionDialog-DB8eqOcd.js} +1 -1
- package/dist/chunks/{PluginSettings-CE6tUXyK.js → PluginSettings-BXs3lVW6.js} +18 -18
- package/dist/chunks/{PressEnterToContinue-nHG0rhu_.js → PressEnterToContinue-BF2xeV__.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-2OHrIJk1.js → PromptInputFooterSuggestions-auVniUkk.js} +3 -3
- package/dist/chunks/{PromptInputHelpMenu-CUnAciDA.js → PromptInputHelpMenu-NbwMFcir.js} +6 -6
- package/dist/chunks/{QueryEngine-TahzcpZ0.js → QueryEngine-CO8sCOqK.js} +9 -9
- package/dist/chunks/{REPL-DqB8JA4D.js → REPL-CyGdFn7l.js} +92 -92
- package/dist/chunks/{RemoteCallout-B3nN2ZPX.js → RemoteCallout-oPPit3z-.js} +5 -5
- package/dist/chunks/{RemoteSessionManager-DOvqhjGQ.js → RemoteSessionManager-Dj8PdAXf.js} +19 -19
- package/dist/chunks/{ResumeConversation-aMDd4hwZ.js → ResumeConversation-O2Lh5Mzg.js} +9 -9
- package/dist/chunks/{SSETransport-B6RwoPAZ.js → SSETransport-DPwwpeGH.js} +4 -4
- package/dist/chunks/{SearchBox-BpSb3tny.js → SearchBox-DfecoYTt.js} +1 -1
- package/dist/chunks/{Settings-Dso_WTvS.js → Settings-CxEC77fr.js} +21 -21
- package/dist/chunks/{TeleportProgress-CqhUjgsq.js → TeleportProgress-CNsuhhpw.js} +2 -2
- package/dist/chunks/{TeleportRepoMismatchDialog-6CBLTj0S.js → TeleportRepoMismatchDialog-Ch_HkgNd.js} +4 -4
- package/dist/chunks/{TeleportResumeWrapper-D-5lccQw.js → TeleportResumeWrapper-DQIvtBeh.js} +8 -8
- package/dist/chunks/{ThemePicker-C8ogNmAv.js → ThemePicker-B1Xo4HfR.js} +5 -5
- package/dist/chunks/{TmuxBackend-BtnAJ9so.js → TmuxBackend-Pg6enHAQ.js} +5 -5
- package/dist/chunks/{ToolSearchTool-BU6vbhV_.js → ToolSearchTool-VcA-CILN.js} +1 -1
- package/dist/chunks/{TrustDialog-D3nEHma8.js → TrustDialog-BZrwub6D.js} +9 -9
- package/dist/chunks/{ValidationErrorsList-uzeZzluk.js → ValidationErrorsList-D8OVyvcE.js} +2 -2
- package/dist/chunks/{WelcomeV2-DxaPFoCn.js → WelcomeV2-BRWuYWhq.js} +2 -2
- package/dist/chunks/{WindowsTerminalBackend-D_O14euN.js → WindowsTerminalBackend-BUg1EZoB.js} +5 -5
- package/dist/chunks/{add-dir-ByGWyxIi.js → add-dir-BGObjyo5.js} +4 -4
- package/dist/chunks/{agentDisplay-U1f-lgXm.js → agentDisplay-DtqOlSJi.js} +2 -2
- package/dist/chunks/{agents-DPZBZpKc.js → agents-Czm4sQJP.js} +3 -3
- package/dist/chunks/{agents-BOEM2K_H.js → agents-DbX7Bf3V.js} +16 -15
- package/dist/chunks/{ant-BI0HpnOt.js → ant-DwHHAdkl.js} +3 -3
- package/dist/chunks/{api-D-Zpiees.js → api-BcYM-Y0Z.js} +4 -4
- package/dist/chunks/{api-BYy26Ske.js → api-C550ZZlZ.js} +1 -1
- package/dist/chunks/asciicast-BlKKqP0a.js +2 -0
- package/dist/chunks/{asciicast-CQ46Hq4k.js → asciicast-C1IcXy7c.js} +3 -3
- package/dist/chunks/{assistant-C6y1rLfR.js → assistant-Dn8olJwy.js} +4 -4
- package/dist/chunks/{assistant-C3OBf-ex.js → assistant-tPHV-pdr.js} +8 -8
- package/dist/chunks/{attach-D-R78t1x.js → attach-D_B-NuRj.js} +3 -3
- package/dist/chunks/{auth-BgnzDtFF.js → auth-BYWR6kEP.js} +1 -1
- package/dist/chunks/{auth-DcJQBQuM.js → auth-BpaFcNUd.js} +1 -1
- package/dist/chunks/{autoMode-B_IbfbsO.js → autoMode-Bd2O_Bt4.js} +4 -4
- package/dist/chunks/{autonomy-trsUfun_.js → autonomy-Cr9cWfOu.js} +8 -8
- package/dist/chunks/{autonomyPanel-BvBSRp69.js → autonomyPanel-lr3zJ2So.js} +3 -3
- package/dist/chunks/{backgroundHousekeeping-CVai9xvo.js → backgroundHousekeeping-D-AEE4Ac.js} +1 -1
- package/dist/chunks/{backgroundHousekeeping-BYe1Y9NH.js → backgroundHousekeeping-TS1j-ri8.js} +10 -10
- package/dist/chunks/{banner-CDACbAop.js → banner-OL0CJzmt.js} +2 -2
- package/dist/chunks/{bg-CZoE3o7u.js → bg-CmlN_bwD.js} +1 -1
- package/dist/chunks/{bg-CE728X5C.js → bg-D95Xlo7V.js} +7 -7
- package/dist/chunks/{branch-DBlbYHmp.js → branch-BDANpH0D.js} +5 -5
- package/dist/chunks/{bridge-Bnn0ExJM.js → bridge-4srG328A.js} +10 -10
- package/dist/chunks/{bridgeConfig-ZrUt-rxF.js → bridgeConfig-Dx9ViB1F.js} +1 -1
- package/dist/chunks/{bridgeConfig-NJewmxrq.js → bridgeConfig-sDPLv_Ox.js} +1 -1
- package/dist/chunks/{bridgeEnabled-PWUd1tRS.js → bridgeEnabled-BfCT0CJA.js} +2 -2
- package/dist/chunks/{bridgeEnabled-Ba2j3mry.js → bridgeEnabled-BjvQPVPL.js} +1 -1
- package/dist/chunks/{bridgeMain-D3GIGofo.js → bridgeMain-CKsY3GL0.js} +36 -36
- package/dist/chunks/{bridgeMessaging-DyX147gP.js → bridgeMessaging-C5o1TIVE.js} +3 -3
- package/dist/chunks/{bridgePointer-B8Bt_BO_.js → bridgePointer-BigJ73yW.js} +1 -1
- package/dist/chunks/{browser-DtuWzqWs.js → browser-CbXaypXm.js} +1 -1
- package/dist/chunks/{btw-HcCcj0jP.js → btw-CJF2ChXT.js} +6 -6
- package/dist/chunks/{buddy-BzOP6bxj.js → buddy-OtTyos-D.js} +4 -4
- package/dist/chunks/{bypassPermissionsKillswitch-Byi8e_y7.js → bypassPermissionsKillswitch-DWwkWke8.js} +4 -4
- package/dist/chunks/{caches-B3mCgL9E.js → caches-BWYlDRi6.js} +16 -16
- package/dist/chunks/{caches-ClQnkdu0.js → caches-CU_mj9D4.js} +1 -1
- package/dist/chunks/{ccrClient-CPrXaic2.js → ccrClient-C0LZWUt6.js} +6 -6
- package/dist/chunks/{changeDetector-BNhqMKl7.js → changeDetector-jAKVg8tv.js} +1 -1
- package/dist/chunks/{channelNotification-Bcsy3vhf.js → channelNotification-CSewS40o.js} +1 -1
- package/dist/chunks/{channelNotification-D7edxKDA.js → channelNotification-eAS9eJ0r.js} +4 -4
- package/dist/chunks/{chrome-BuoTKZfe.js → chrome-Bzn1q9eH.js} +7 -7
- package/dist/chunks/{chromeNativeHost-B0utU2CB.js → chromeNativeHost-sfcv0y4a.js} +2 -2
- package/dist/chunks/{claim-main-D9iBYpr1.js → claim-main-2xxuBY3N.js} +2 -2
- package/dist/chunks/{claudeDesktop-B-OCMf9f.js → claudeDesktop-NpT_WeY6.js} +4 -4
- package/dist/chunks/{claudemd-BGcTrLfq.js → claudemd-D2Trew6y.js} +1 -1
- package/dist/chunks/{cleanup-D_D9Jitx.js → cleanup-BIj7xXNh.js} +4 -4
- package/dist/chunks/{clear-jbJuIXb-.js → clear-CmRvSupr.js} +1 -1
- package/dist/chunks/{cliLaunch-oBRF5tZ7.js → cliLaunch-CB8tcH_K.js} +1 -1
- package/dist/chunks/{client-BW6o5Ruf.js → client-CRy8Ta-P.js} +1 -1
- package/dist/chunks/{color-BhkBxUAC.js → color-DhaU5AJ3.js} +2 -2
- package/dist/chunks/{commands-DgmBRcZT.js → commands-C0ZY-Qpj.js} +1 -1
- package/dist/chunks/{commitAttribution-WseMGDik.js → commitAttribution-Cz3kUq66.js} +1 -1
- package/dist/chunks/{commitAttribution-bPZl2rF7.js → commitAttribution-DrCXRAUR.js} +7 -7
- package/dist/chunks/{common-C1ZTKqXM.js → common-Cn4oifCc.js} +1 -1
- package/dist/chunks/{common-D7JOrtJs.js → common-D1pudu7G.js} +1 -1
- package/dist/chunks/{common-BhjdGsSG.js → common-DKcQrRC2.js} +4 -4
- package/dist/chunks/{compact-DVoVFku0.js → compact-DtYqdVoA.js} +5 -5
- package/dist/chunks/{companion-hcA23P-j.js → companion-Cbhvn2z1.js} +1 -1
- package/dist/chunks/{completionCache-B4-U8yjV.js → completionCache-BgMI8PqE.js} +4 -4
- package/dist/chunks/{completionCache-P-jiiDmx.js → completionCache-DFcKxnVp.js} +1 -1
- package/dist/chunks/{computerUseLock-DQyFsaZG.js → computerUseLock-B3HX6Thr.js} +2 -2
- package/dist/chunks/{config-22GbhrrO.js → config-CBMqNTot.js} +1 -1
- package/dist/chunks/{config-0uLfcFaQ.js → config-CVeuXV3W.js} +1 -1
- package/dist/chunks/{context-Emx8TLWs.js → context-CfBDn8De.js} +5 -5
- package/dist/chunks/{context-noninteractive-jOJoMrCH.js → context-noninteractive-Cs_755Tj.js} +3 -3
- package/dist/chunks/{conversation-BODIFbDz.js → conversation-DYFPvCu8.js} +6 -6
- package/dist/chunks/{conversation-VrHR5ZYH.js → conversation-DwzFbp6s.js} +1 -1
- package/dist/chunks/{copy-D6mEXUXo.js → copy-CgP1HEWa.js} +3 -3
- package/dist/chunks/{cost-CY__tVgM.js → cost-Bl45KVsu.js} +2 -2
- package/dist/chunks/createSSHSession-BAD-vv-M.js +732 -0
- package/dist/chunks/{createSession-CndW8U7a.js → createSession-CIiYDqgd.js} +22 -22
- package/dist/chunks/{cronJitterConfig-0813sGn3.js → cronJitterConfig-BaEf4KmI.js} +9 -9
- package/dist/chunks/{crossProjectResume-CXpLQLuF.js → crossProjectResume-DWBDNl3V.js} +14 -14
- package/dist/chunks/{cwd-CqncjZYX.js → cwd-CCWcHNRR.js} +1 -1
- package/dist/chunks/cwd-DPgo1LqI.js +3 -0
- package/dist/chunks/{daemon-CKVXmSnL.js → daemon-DxejuC2k.js} +2 -2
- package/dist/chunks/{datadog-1K2Wu92h.js → datadog-CDWnddDQ.js} +2 -2
- package/dist/chunks/{datadog-C_jCZ-Eb.js → datadog-DLYdBC-v.js} +1 -1
- package/dist/chunks/{debug-BLN7ke6U.js → debug-BtDqOvvl.js} +1 -1
- package/dist/chunks/{debug-CYCG2cYf.js → debug-D_K6AIuH.js} +1 -1
- package/dist/chunks/{debugUtils-BJ3gskJf.js → debugUtils-CqqdWMTE.js} +1 -1
- package/dist/chunks/{desktop-CX_a0xIZ.js → desktop-Dh-uQbtQ.js} +1 -1
- package/dist/chunks/{detach-DE9nbWtV.js → detach-aRTS4EhP.js} +2 -2
- package/dist/chunks/{detached-RZ28jU8l.js → detached-lUSr_BB_.js} +1 -1
- package/dist/chunks/{detectRepository-DRC5qn-z.js → detectRepository-Cade8bQI.js} +1 -1
- package/dist/chunks/{detectRepository-DS3yyuFO.js → detectRepository-CsWDTQUo.js} +3 -3
- package/dist/chunks/{detection-CldH1250.js → detection-Bjo5CZ0q.js} +1 -1
- package/dist/chunks/{detection-CH1YAHMX.js → detection-CYmmuiCb.js} +2 -2
- package/dist/chunks/{diff-C7okdvIl.js → diff-Bz1q6n8K.js} +1 -1
- package/dist/chunks/{directoryCompletion-f8JaCRrX.js → directoryCompletion-CWvAcsXk.js} +4 -4
- package/dist/chunks/{doctor-D49UQila.js → doctor-B77iRjVI.js} +1 -1
- package/dist/chunks/{earlyInput-CcC2TllM.js → earlyInput-7RMY00Lt.js} +12 -0
- package/dist/chunks/earlyInput-A4y7C5xx.js +2 -0
- package/dist/chunks/{effort-r8kirlKp.js → effort-44s3ydPg.js} +3 -3
- package/dist/chunks/{entry-B8Ud79vX.js → entry-By52fXV5.js} +4 -4
- package/dist/chunks/{env-B1GZN_AA.js → env-zXoD9MNx.js} +2 -2
- package/dist/chunks/{envLessBridgeConfig-IXr-NZjB.js → envLessBridgeConfig-Dp-GNK14.js} +2 -2
- package/dist/chunks/{escHotkey-DvqPnNKD.js → escHotkey-h-UQ0vM_.js} +1 -1
- package/dist/chunks/{esm-y9Ub5O9W.js → esm-Cwx4xn2M.js} +1 -1
- package/dist/chunks/{execFileNoThrow-D5IIIunf.js → execFileNoThrow-CHJiVcAG.js} +3 -3
- package/dist/chunks/{execSyncWrapper-IRNc4LnC.js → execSyncWrapper-DpNnbp24.js} +1 -1
- package/dist/chunks/{executor-CXorHX4Y.js → executor-0-U1fxvi.js} +4 -4
- package/dist/chunks/{executor-CkiMwp_x.js → executor-BuHXb9td.js} +1 -1
- package/dist/chunks/{exit-DCcNG-vW.js → exit-r2QeGNsS.js} +3 -3
- package/dist/chunks/{export-CSptIcK0.js → export-nt3HMavy.js} +6 -6
- package/dist/chunks/{exportRenderer-CcuBLMdk.js → exportRenderer-Bc9-t1b9.js} +4 -4
- package/dist/chunks/{extra-usage-CX-tcMCl.js → extra-usage-RbDyDToi.js} +2 -2
- package/dist/chunks/{extra-usage-core-C1D4TMyR.js → extra-usage-core-cqznEI9U.js} +6 -6
- package/dist/chunks/{extra-usage-noninteractive-BfqQnRAU.js → extra-usage-noninteractive-D7_Oj7Kk.js} +1 -1
- package/dist/chunks/{extraUsage-D57wp-4h.js → extraUsage-BcPJKHjs.js} +5 -5
- package/dist/chunks/{fast-Bdf_9wM5.js → fast-CJovk6bU.js} +5 -5
- package/dist/chunks/{fast-BvJOBHMT.js → fast-CbCFCKi0.js} +1 -1
- package/dist/chunks/{featureCheck-BSCkca4o.js → featureCheck-BAPcPLx9.js} +1 -1
- package/dist/chunks/{feedback-DKzNAVrs.js → feedback-C9qDFyAQ.js} +1 -1
- package/dist/chunks/{files-LOO4dHCo.js → files-DfsyyoM9.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-CoGxhRjU.js → firstPartyEventLogger-BU_b35e1.js} +1 -1
- package/dist/chunks/{flushGate-UE-i3NU0.js → flushGate-CExNYE2Y.js} +5 -5
- package/dist/chunks/{fork-BrQEdpAs.js → fork-Oubmq7mJ.js} +2 -2
- package/dist/chunks/{gates-BGYAOZQz.js → gates-BsGaCHeS.js} +1 -1
- package/dist/chunks/{gates-I0AaMs-A.js → gates-ClBTF1NH.js} +1 -1
- package/dist/chunks/{gemini-Dn7iNCWk.js → gemini-D473aKLC.js} +5 -5
- package/dist/chunks/{generateSessionName-Del-U1ac.js → generateSessionName-D6qSttFw.js} +5 -5
- package/dist/chunks/{genericProcessUtils-CZD-h_VO.js → genericProcessUtils-67zrxVVv.js} +1 -1
- package/dist/chunks/{git-Bm_SA_Mc.js → git-BGircftK.js} +1 -1
- package/dist/chunks/{git-CNp3SqeD.js → git-CuG29xq6.js} +8 -8
- package/dist/chunks/{githubRepoPathMapping-D7vR7Qh0.js → githubRepoPathMapping-DgDzxU1t.js} +5 -5
- package/dist/chunks/{grok-2Dz7OVeu.js → grok-7MquQMKG.js} +5 -5
- package/dist/chunks/{growthbook-B4-FfWEV.js → growthbook-CUEozfkg.js} +1 -1
- package/dist/chunks/{heapdump-CSfiNYty.js → heapdump-DHQC-lzP.js} +4 -4
- package/dist/chunks/{help-DsiVnX43.js → help-CfQFuqUz.js} +6 -6
- package/dist/chunks/{history-D_7_gRvC.js → history-C8RT_YhN.js} +1 -1
- package/dist/chunks/{hooks-BLoEn5XD.js → hooks-C5dT-WTY.js} +1 -1
- package/dist/chunks/{hooks-CFCzX4H4.js → hooks-DPS8v_fe.js} +5 -5
- package/dist/chunks/{hostAdapter-BnZmvd0p.js → hostAdapter-BbR37Ca-.js} +5 -5
- package/dist/chunks/{ide-DnmbOLgd.js → ide-mrjRo5P7.js} +5 -5
- package/dist/chunks/{inboundAttachments-8wwEUmFi.js → inboundAttachments-roZyodf6.js} +3 -3
- package/dist/chunks/{initReplBridge-BMqGj9uK.js → initReplBridge-CZKZNVhE.js} +23 -23
- package/dist/chunks/{insights-C2sUEw7G.js → insights-CbzvBpv9.js} +7 -7
- package/dist/chunks/{install-BSyPIvox.js → install-Btg7eB9A.js} +5 -5
- package/dist/chunks/{install-github-app-DtUC5pWW.js → install-github-app-BzLSQesg.js} +9 -9
- package/dist/chunks/{install-slack-app-Cy3SPi5k.js → install-slack-app-3KC1VGf6.js} +2 -2
- package/dist/chunks/{instrumentation-iJ65FkaY.js → instrumentation-CgiHSpCa.js} +10 -10
- package/dist/chunks/{job-ouk9uxEM.js → job-8LAFU_17.js} +1 -1
- package/dist/chunks/{jwtUtils-CkQViOho.js → jwtUtils-Bir8AREG.js} +2 -2
- package/dist/chunks/{keybindings-BvxUQter.js → keybindings-2UJ2ZpfF.js} +3 -3
- package/dist/chunks/{lanBeacon-k0XhnL9p.js → lanBeacon-D9zDvF80.js} +1 -1
- package/dist/chunks/{lang-BKJmzKq2.js → lang-L4TQFq3i.js} +2 -2
- package/dist/chunks/{language-mumpwvgn.js → language-CwDnvpeK.js} +1 -1
- package/dist/chunks/{loadAgentsDir-DlljKB-H.js → loadAgentsDir-D-bpsROW.js} +1 -1
- package/dist/chunks/{loadAgentsDir-Drucl9La.js → loadAgentsDir-DKcLWr2P.js} +204 -227
- package/dist/chunks/{loadPluginHooks-Dt_BBpwy.js → loadPluginHooks-Dm67sJAN.js} +1 -1
- package/dist/chunks/{localSearch-CzdWGQZI.js → localSearch-BuUFGJGg.js} +1 -1
- package/dist/chunks/{localSearch-DfzdBuGH.js → localSearch-YKxn-T4H.js} +2 -2
- package/dist/chunks/{log-CyMzjziw.js → log-DGkxzzCV.js} +2 -2
- package/dist/chunks/{login-BC6ItvSR.js → login-DtZEAegF.js} +7 -7
- package/dist/chunks/{login-DLc1uw4L.js → login-soI09LwA.js} +1 -1
- package/dist/chunks/{logoV2Utils-BGFrEIbz.js → logoV2Utils-DCXXFcvl.js} +7 -7
- package/dist/chunks/{logout-DvDSpkHK.js → logout-CZsxKqBw.js} +1 -1
- package/dist/chunks/{magicDocs-8lPrL26g.js → magicDocs-CABOmtSO.js} +3 -3
- package/dist/chunks/{main-Boz1Wrlp.js → main-D2fKd1MF.js} +6 -6
- package/dist/chunks/{main-BNrp9RCL.js → main-DgrmjM9R.js} +275 -135
- package/dist/chunks/{mappers-Cr0QAV4N.js → mappers-Civ3u6V4.js} +4 -4
- package/dist/chunks/{mcp-BceJfE-d.js → mcp-CpgdWK5w.js} +4 -4
- package/dist/chunks/{mcp-BkkQKwzd.js → mcp-DCfYbWTD.js} +9 -9
- package/dist/chunks/{mcp-DQCB9hqM.js → mcp-uKcUU_3f.js} +9 -9
- package/dist/chunks/{mcpServer-CHgDe9YQ.js → mcpServer-CCY1S5MW.js} +6 -6
- package/dist/chunks/{mcpServer-YaIEyGuM.js → mcpServer-HuzH__Rz.js} +6 -6
- package/dist/chunks/{memoize-CyaV6_yS.js → memoize-CQ0XdEGb.js} +2 -2
- package/dist/chunks/{memory-DoQNxdQ9.js → memory-DcTwPX__.js} +13 -13
- package/dist/chunks/{mobile-CO6YayvR.js → mobile-C5VSo-Yk.js} +2 -2
- package/dist/chunks/{model-COVU6ibq.js → model-CXNSmugO.js} +5 -5
- package/dist/chunks/{model-csq9pVOs.js → model-DaIrfI2l.js} +1 -1
- package/dist/chunks/{onChangeAppState-CxXDUzcz.js → onChangeAppState-CwlzX5h2.js} +6 -6
- package/dist/chunks/{openai-1eP9Imj5.js → openai-CYsekMDQ.js} +6 -7
- package/dist/chunks/{overageCreditGrant-C26fkpe2.js → overageCreditGrant-C4Wz369o.js} +3 -3
- package/dist/chunks/{parser-C_IW8xDK.js → parser-Bk2ybObQ.js} +1 -1
- package/dist/chunks/parser-Csyjhcis.js +3 -0
- package/dist/chunks/{passes-CCnYaS3J.js → passes-B8Lprjx8.js} +5 -5
- package/dist/chunks/{path-B_zSAlFT.js → path-C47m1pha.js} +4 -4
- package/dist/chunks/{paths-Brg1hJ3x.js → paths-BhuR2zCK.js} +19 -18
- package/dist/chunks/{peers-oaeyYw_A.js → peers-DWtGT1AQ.js} +2 -2
- package/dist/chunks/{permissions-DZ1Z0cdm.js → permissions-BI5F6OtX.js} +11 -11
- package/dist/chunks/{pipe-status-CK-w5p9w.js → pipe-status-CUIwxY3_.js} +2 -2
- package/dist/chunks/{pipeRegistry-Cyemxhjm.js → pipeRegistry-Bbtlrt6S.js} +1 -1
- package/dist/chunks/{pipeTransport-T4IY07qE.js → pipeTransport-D1LYUfUc.js} +1 -1
- package/dist/chunks/{pipes-CxW4AJc_.js → pipes-CRNXoiOE.js} +3 -3
- package/dist/chunks/{plan-BHnYnxa2.js → plan-CZ4jq1cR.js} +5 -5
- package/dist/chunks/{platform-U27kw_Yj.js → platform-DPjJX-cO.js} +2 -2
- package/dist/chunks/{plugin-BCMU7Z3-.js → plugin-BwFm_5nZ.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-DFYXmH4s.js → pluginAutoupdate-D7HuYeNK.js} +6 -6
- package/dist/chunks/{pluginBlocklist-B2fvFuMh.js → pluginBlocklist-CXg3FRAt.js} +4 -4
- package/dist/chunks/{pluginCliCommands-CnPuJVRS.js → pluginCliCommands-CMKVutl6.js} +5 -5
- package/dist/chunks/{pluginFlagging-B8pjniEf.js → pluginFlagging-Cn1jNK8h.js} +3 -3
- package/dist/chunks/{pluginOperations-pkT3kwCg.js → pluginOperations-FUjQfGDl.js} +7 -7
- package/dist/chunks/{pluginStartupCheck-D0mKfYB1.js → pluginStartupCheck-BTRwVooa.js} +6 -6
- package/dist/chunks/{pluginStartupCheck-Co9iIIJ4.js → pluginStartupCheck-DLMQ4Db0.js} +1 -1
- package/dist/chunks/{plugins-CSwK00CJ.js → plugins-DN36V_px.js} +10 -10
- package/dist/chunks/{policyLimits-DfsKQXEE.js → policyLimits-DKtgPiCx.js} +1 -1
- package/dist/chunks/{pollConfig-DGTCrsji.js → pollConfig-BP6d-2Iw.js} +1 -1
- package/dist/chunks/{poor-qdbCL48X.js → poor-Dsf-5Nr3.js} +1 -1
- package/dist/chunks/{poorMode-COxs0seH.js → poorMode-BKrUlZeQ.js} +1 -1
- package/dist/chunks/{poorMode-D86QYQ3V.js → poorMode-P-3nK7Dz.js} +1 -1
- package/dist/chunks/{print-YqaKf-4l.js → print-Wt4GbZU1.js} +35 -35
- package/dist/chunks/{privacy-settings-rCP8S5C5.js → privacy-settings-D3CDhQxS.js} +2 -2
- package/dist/chunks/{processBashCommand-DxRWK-Lq.js → processBashCommand-DrbtqRhk.js} +5 -5
- package/dist/chunks/{processSlashCommand-CRR_qOur.js → processSlashCommand-BDPNG-gz.js} +7 -7
- package/dist/chunks/{prompt-elfsp6Tz.js → prompt-C1U0uA98.js} +1 -1
- package/dist/chunks/{prompt-CKX1QEUZ.js → prompt-F-DMlVxe.js} +1 -1
- package/dist/chunks/{promptEditor-O6j4Wblt.js → promptEditor-Bf9Cb4Bk.js} +5 -5
- package/dist/chunks/{protocolHandler-riSKEZcy.js → protocolHandler-CLMA5GfH.js} +7 -7
- package/dist/chunks/{proxy-V9avvg3N.js → proxy-CoydwcUQ.js} +1 -1
- package/dist/chunks/{rate-limit-options-D6S2nxPn.js → rate-limit-options-C1A3rW9t.js} +5 -5
- package/dist/chunks/{referral-CbT6CFX3.js → referral-DFau-4BS.js} +6 -6
- package/dist/chunks/{refresh-B61QE1UF.js → refresh-DKyNYcYP.js} +4 -4
- package/dist/chunks/{registerProtocol-BQU1XPdr.js → registerProtocol-qH69Co0S.js} +4 -4
- package/dist/chunks/{registry-DyjvNsIk.js → registry-Ejz8nK0x.js} +1 -1
- package/dist/chunks/{release-notes-C0o0dhvv.js → release-notes-XUvjPjR8.js} +1 -1
- package/dist/chunks/{releaseNotes-Cq1INs19.js → releaseNotes-Cvl86uUw.js} +4 -4
- package/dist/chunks/{reload-plugins-Dys0mggF.js → reload-plugins-BIjtgppw.js} +5 -5
- package/dist/chunks/{remote-env-B527w_I9.js → remote-env-UMAnhJ_T.js} +6 -6
- package/dist/chunks/{remoteBridgeCore-BMEzxedH.js → remoteBridgeCore-ColDXbJD.js} +11 -11
- package/dist/chunks/{remoteControlServer--P6qP41v.js → remoteControlServer-guNYf0UI.js} +9 -9
- package/dist/chunks/{rename-Bddm8XHP.js → rename-BSTAJwaq.js} +5 -5
- package/dist/chunks/{renderOptions-BCYKGkp5.js → renderOptions-Cr9xc66z.js} +1 -1
- package/dist/chunks/{resume-D9jecpTz.js → resume-BDcUCF1q.js} +5 -5
- package/dist/chunks/{runtimeObserver-DQDB9vzg.js → runtimeObserver-CqvbopXS.js} +5 -5
- package/dist/chunks/{runtimeObserver-DqAjG5dK.js → runtimeObserver-DV_6vReh.js} +1 -1
- package/dist/chunks/{sandbox-adapter-D9ohsP4o.js → sandbox-adapter-5HWxPado.js} +1 -1
- package/dist/chunks/{sandbox-toggle-BkbSji6R.js → sandbox-toggle-hpjJ8Ujs.js} +6 -6
- package/dist/chunks/{send-BsekakaL.js → send-CXLmQamO.js} +2 -2
- package/dist/chunks/{sentry-D83p9rft.js → sentry-BoZHHVJ0.js} +3 -3
- package/dist/chunks/{session-DgK-SpBY.js → session-COUQkouX.js} +4 -4
- package/dist/chunks/{sessionActivity-Hq74qblO.js → sessionActivity-B8EJ66XT.js} +16 -41
- package/dist/chunks/{sessionDiscovery-hM955hvT.js → sessionDiscovery-BsXXXYKQ.js} +2 -2
- package/dist/chunks/{sessionFileAccessHooks-C0dX1HuL.js → sessionFileAccessHooks-D-crcVgF.js} +1 -1
- package/dist/chunks/{sessionMemory-C24Bamyi.js → sessionMemory-TcN4T9k1.js} +6 -6
- package/dist/chunks/{sessionMemoryUtils-BPkpSq8b.js → sessionMemoryUtils-ZwpE7PP6.js} +1 -1
- package/dist/chunks/{sessionObserver-CnknTzAL.js → sessionObserver-CKSC19s3.js} +1 -1
- package/dist/chunks/{sessionObserver-BE6flcZ3.js → sessionObserver-DMgELyXc.js} +3 -3
- package/dist/chunks/{sessionStorage-CMMXpKF6.js → sessionStorage-qAjKigNy.js} +1 -1
- package/dist/chunks/{sessionTitle-BZOaTNSZ.js → sessionTitle-CTf9qhks.js} +5 -5
- package/dist/chunks/{sessionTracing-DpGjtBu8.js → sessionTracing-W20weaub.js} +3 -3
- package/dist/chunks/{settingsSync-DlAmMYQE.js → settingsSync-DDYSNlXf.js} +5 -5
- package/dist/chunks/{setup-DSBE0jSe.js → setup-Bdo9259s.js} +6 -6
- package/dist/chunks/{setup-CUH8LTa2.js → setup-D8_pX0f2.js} +3 -3
- package/dist/chunks/{setup-gynKNqd_.js → setup-vFj2lhTv.js} +24 -24
- package/dist/chunks/{shadowedRuleDetection-AEBJSMAm.js → shadowedRuleDetection-Cbb7i4Yj.js} +1 -1
- package/dist/chunks/{shellQuote-DG3wCDEC.js → shellQuote-Dm_jIubQ.js} +2 -2
- package/dist/chunks/{sideQuestion-D1KGdZLh.js → sideQuestion-mTXiSg-z.js} +2 -2
- package/dist/chunks/{sink-DxvCtbqw.js → sink-Dn_XSe3s.js} +1 -1
- package/dist/chunks/{sink-CmyiGJus.js → sink-tSmHuNoI.js} +2 -2
- package/dist/chunks/{sinks-B_yMOwTY.js → sinks-Bwi2ka8c.js} +5 -5
- package/dist/chunks/{skill-learning-C1VjTDzD.js → skill-learning-BJBvgYM6.js} +5 -5
- package/dist/chunks/{skillChangeDetector-Dag2gkNV.js → skillChangeDetector-UnjcIUqY.js} +9 -9
- package/dist/chunks/{skillGapStore-DukgdH6m.js → skillGapStore-CTupMn-0.js} +2 -2
- package/dist/chunks/{skillGapStore-CjsUHfNj.js → skillGapStore-DcuEHLOy.js} +1 -1
- package/dist/chunks/{skillGenerator-B6Pfw8n7.js → skillGenerator-D12kdBCU.js} +2 -2
- package/dist/chunks/{skillLearning-CKW3MmpW.js → skillLearning-Dl2guSnQ.js} +6 -6
- package/dist/chunks/{skillPanel-BkmeqJxZ.js → skillPanel-BEfFcn19.js} +6 -6
- package/dist/chunks/{skillSearchPanel-DsgeqKkI.js → skillSearchPanel-CZ5edsXF.js} +3 -3
- package/dist/chunks/{skills-Cw8fQpR5.js → skills-WH9OmAVZ.js} +4 -4
- package/dist/chunks/{sprites-Uf0YDEbE.js → sprites-fjZ8f7sl.js} +1 -1
- package/dist/chunks/{src-kETUnY1r.js → src--hsdGWE3.js} +1 -1
- package/dist/chunks/{src-SOmOGVox.js → src-BYXK1wdQ.js} +3 -0
- package/dist/chunks/{startupProfiler-ywNkd6mp.js → startupProfiler-2-1GNddc.js} +1 -1
- package/dist/chunks/{startupProfiler-bB37yXKi.js → startupProfiler-CkoqjsgJ.js} +3 -3
- package/dist/chunks/{state-E_LcWQfv.js → state-TjZ9ZtUE.js} +1 -9
- package/dist/chunks/state-uTUicVRB.js +3 -0
- package/dist/chunks/{staticRender-BDVSn-uP.js → staticRender-DwTIX82b.js} +1 -1
- package/dist/chunks/{stats-BPbHS4lE.js → stats-BDWvBOR6.js} +1 -1
- package/dist/chunks/{stats-DxlJxOBj.js → stats-Vc6ufieK.js} +10 -10
- package/dist/chunks/{status-Cszk35-r.js → status-XI6Lj_BZ.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-BeSGx90v.js → statusNoticeHelpers-DxFvPj2R.js} +1 -1
- package/dist/chunks/{stickers-CMEdyNJ6.js → stickers-CSfwbSCx.js} +1 -1
- package/dist/chunks/{systemPromptSections-Bw4x27Kf.js → systemPromptSections-Dtynxn99.js} +1 -1
- package/dist/chunks/{systemPromptSections-oyuS5qc8.js → systemPromptSections-DwNXBQve.js} +1 -1
- package/dist/chunks/{tag-BLJwPBnl.js → tag-CI0k0bzH.js} +4 -4
- package/dist/chunks/{tasks-C8Me7W81.js → tasks-CxEABT7C.js} +1 -1
- package/dist/chunks/{teamDiscovery-P3gsmMLJ.js → teamDiscovery-CLodP46f.js} +1 -1
- package/dist/chunks/{teamHelpers-CZ9OM-lQ.js → teamHelpers--RRiVJLK.js} +6 -6
- package/dist/chunks/{teamHelpers-BQNCSnYG.js → teamHelpers-DACf7T4w.js} +1 -1
- package/dist/chunks/{teammateModeSnapshot-BduMNBxa.js → teammateModeSnapshot-Bj7nmCPG.js} +3 -3
- package/dist/chunks/{teammateModeSnapshot-CNhVTq2a.js → teammateModeSnapshot-DQYaIC34.js} +1 -1
- package/dist/chunks/{teleport-Bo-FlFhs.js → teleport-CaftslOM.js} +1 -1
- package/dist/chunks/{templateJobs-BIPu-pU8.js → templateJobs-CA0jzzwH.js} +1 -1
- package/dist/chunks/{terminalSetup-CcwWKKTu.js → terminalSetup-BcgL8ONe.js} +1 -1
- package/dist/chunks/{terminalSetup-CuV9budX.js → terminalSetup-vrKnh1sw.js} +10 -10
- package/dist/chunks/{theme-CtBehRmt.js → theme-2RmPuvD1.js} +2 -2
- package/dist/chunks/{thinkback-BexRT0D5.js → thinkback-Du9K-GoB.js} +9 -9
- package/dist/chunks/{thinkback-play-UoHn-NF7.js → thinkback-play-BQfQFH2k.js} +2 -2
- package/dist/chunks/{tmux-v-mtTVmh.js → tmux-Q-UNspO-.js} +2 -2
- package/dist/chunks/{toolEventObserver-CifNb76b.js → toolEventObserver-BOm-FdA9.js} +4 -4
- package/dist/chunks/{toolEventObserver-DH16eRZI.js → toolEventObserver-CoD8flDN.js} +1 -1
- package/dist/chunks/{toolPool-CjiI8krS.js → toolPool-BIZ9HVCO.js} +1 -1
- package/dist/chunks/{toolPool-CaTk4NcM.js → toolPool-C7CnL9Fq.js} +2 -2
- package/dist/chunks/{toolSearch-BESWHoQ1.js → toolSearch-CFO7Bb0O.js} +1 -1
- package/dist/chunks/{trustedDevice-DDlgpR0L.js → trustedDevice-3c44O1Bg.js} +1 -1
- package/dist/chunks/{trustedDevice-GXak9hL2.js → trustedDevice-BDV9pJSr.js} +3 -3
- package/dist/chunks/{types-BjLh1QoB.js → types-DbdJ3X9a.js} +3 -3
- package/dist/chunks/{udsClient-GH7VeCM-.js → udsClient-Bi6eO298.js} +1 -1
- package/dist/chunks/{udsClient-CgMZxF2q.js → udsClient-Dno4pvAK.js} +3 -3
- package/dist/chunks/{udsMessaging-D78rGLTl.js → udsMessaging-B1LryLWh.js} +1 -1
- package/dist/chunks/{udsMessaging-ORowKSN1.js → udsMessaging-OTNxhsn9.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-Gy-DssLU.js → ultrareviewCommand-kC_2FefR.js} +9 -9
- package/dist/chunks/{undercover-DyB99rBm.js → undercover-Bt5Eame7.js} +2 -2
- package/dist/chunks/{undercover-JhisSNNu.js → undercover-C2F5jBuT.js} +1 -1
- package/dist/chunks/{up-J6IPDDx_.js → up-BUSOwJgd.js} +1 -1
- package/dist/chunks/{updateCCB-mDZlxwJi.js → updateCCB-BHnAqrsr.js} +4 -4
- package/dist/chunks/{upgrade-CPOA_om5.js → upgrade-Jgrl8lX4.js} +4 -4
- package/dist/chunks/{upload-CK57_GVU.js → upload-D3Zxz3v7.js} +2 -2
- package/dist/chunks/{upstreamproxy-uSL3hKxH.js → upstreamproxy-fA4phsMl.js} +2 -2
- package/dist/chunks/{usage-Bh-ZfXno.js → usage-DPk7bJCg.js} +1 -1
- package/dist/chunks/{usage-TW0g_PV9.js → usage-DTprv2Jl.js} +1 -1
- package/dist/chunks/{useKeybinding-C4WKGmZu.js → useKeybinding-DlqJiGPF.js} +1 -1
- package/dist/chunks/{useMainLoopModel-CKcxhhTm.js → useMainLoopModel-BCZAAZy0.js} +2 -2
- package/dist/chunks/{useManagePlugins-D4IkYFFo.js → useManagePlugins-DMEqBCX7.js} +6 -6
- package/dist/chunks/{useMasterMonitor-25gbp2EP.js → useMasterMonitor-GCL4UdDK.js} +3 -3
- package/dist/chunks/{useMergedTools-BBI5UwTL.js → useMergedTools-DnwLEI5l.js} +2 -2
- package/dist/chunks/{useSearchInput-C6QiVHG-.js → useSearchInput-CYoKv9G5.js} +2 -2
- package/dist/chunks/{useSettingsErrors-DBgBu4gb.js → useSettingsErrors-CjWqkcTT.js} +2 -2
- package/dist/chunks/{useVoice-CYyW16Xt.js → useVoice-CZijyYAL.js} +10 -10
- package/dist/chunks/{util-sfwbzNSi.js → util-D3SQSHfy.js} +11 -11
- package/dist/chunks/{utils-BV5dHqxi.js → utils-CCIgJXKH.js} +1 -1
- package/dist/chunks/{validatePlugin-DLt2okMR.js → validatePlugin-C8IsLj_h.js} +4 -4
- package/dist/chunks/{vim-Bc7oZ7DZ.js → vim-BJ6uBjKx.js} +1 -1
- package/dist/chunks/{voice-CUJFouL7.js → voice-6JbaA9hc.js} +3 -3
- package/dist/chunks/{voice-BPD3ki7G.js → voice-BkDE9Eir.js} +7 -7
- package/dist/chunks/{voiceModeEnabled-1kC5TdsR.js → voiceModeEnabled-CcHbEHtR.js} +1 -1
- package/dist/chunks/{voiceModeEnabled-C4smQ373.js → voiceModeEnabled-g9XrUcwm.js} +1 -1
- package/dist/chunks/{voiceStreamSTT-CA0-zj19.js → voiceStreamSTT-DfHBe4eb.js} +1 -1
- package/dist/chunks/{voiceStreamSTT-Cm8eEG9_.js → voiceStreamSTT-DkWb7ZRV.js} +4 -4
- package/dist/chunks/{watcher-BtVaynBT.js → watcher-CtQuFExO.js} +1 -1
- package/dist/chunks/{which-DeADgx_r.js → which-BQZnVED5.js} +1 -1
- package/dist/chunks/{windowsPaths-COhmnpQN.js → windowsPaths-DWBsYlcf.js} +5 -5
- package/dist/chunks/{windowsPaths-RiADCAoF.js → windowsPaths-DdIec0U3.js} +1 -1
- package/dist/chunks/{workSecret-DGuWIERZ.js → workSecret-BAVX01ox.js} +1 -1
- package/dist/chunks/{worktree-ChzirPA1.js → worktree-C4nZOwR0.js} +1 -1
- package/dist/chunks/{xml-D5H3duAs.js → xml-JeMw5q1N.js} +1 -1
- package/dist/cli.js +34 -34
- package/package.json +1 -1
- package/dist/chunks/asciicast-DIjfsiY9.js +0 -2
- package/dist/chunks/cwd-D898OCNT.js +0 -3
- package/dist/chunks/earlyInput-BBsnXNTJ.js +0 -2
- package/dist/chunks/parser-D9tr4tpa.js +0 -3
- package/dist/chunks/state-DaWet081.js +0 -3
- /package/dist/chunks/{attributionHooks-BCQa-uW2.js → attributionHooks-CBNzyZrr.js} +0 -0
- /package/dist/chunks/{attributionTrailer-DCDHV7Dl.js → attributionTrailer-Ct5EJgh8.js} +0 -0
- /package/dist/chunks/{ccshareResume-BdrQri9w.js → ccshareResume-DMkpRP_X.js} +0 -0
- /package/dist/chunks/{eventLoopStallDetector-BAhq5Re4.js → eventLoopStallDetector-Dntcccr1.js} +0 -0
- /package/dist/chunks/{postCommitAttribution-CyroksEH.js → postCommitAttribution-EDFXh9XV.js} +0 -0
- /package/dist/chunks/{sdkHeapDumpMonitor-b934YZTX.js → sdkHeapDumpMonitor-Db7EUUEA.js} +0 -0
- /package/dist/chunks/{sessionDataUploader-BYm9I7OM.js → sessionDataUploader-B8OqaPVq.js} +0 -0
|
@@ -0,0 +1,732 @@
|
|
|
1
|
+
import { n as init_defineProperty, t as _defineProperty } from "./defineProperty-Cq4c5J8x.js";
|
|
2
|
+
import { Vn as init_auth, kn as getClaudeAIOAuthTokens } from "./paths-BhuR2zCK.js";
|
|
3
|
+
import { E as jsonStringify, T as jsonParse, d as logForDebugging, s as init_debug, w as init_slowOperations } from "./debug-BtDqOvvl.js";
|
|
4
|
+
import { l as getOauthConfig, u as init_oauth } from "./oauth-CtvNqWks.js";
|
|
5
|
+
import { i as init_cliLaunch, t as buildCliLaunch } from "./cliLaunch-CB8tcH_K.js";
|
|
6
|
+
import { resolve } from "path";
|
|
7
|
+
import { existsSync, unlinkSync } from "fs";
|
|
8
|
+
import { randomUUID } from "crypto";
|
|
9
|
+
//#region src/ssh/SSHSessionManager.ts
|
|
10
|
+
init_debug();
|
|
11
|
+
init_slowOperations();
|
|
12
|
+
init_defineProperty();
|
|
13
|
+
function isStdoutMessage(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
|
|
15
|
+
}
|
|
16
|
+
var BASE_RECONNECT_DELAY_MS = 2e3;
|
|
17
|
+
var MAX_RECONNECT_DELAY_MS = 15e3;
|
|
18
|
+
var DEFAULT_MAX_RECONNECT_ATTEMPTS = 3;
|
|
19
|
+
var SSHSessionManagerImpl = class {
|
|
20
|
+
constructor(proc, options) {
|
|
21
|
+
_defineProperty(this, "proc", void 0);
|
|
22
|
+
_defineProperty(this, "options", void 0);
|
|
23
|
+
_defineProperty(this, "connected", false);
|
|
24
|
+
_defineProperty(this, "disconnected", false);
|
|
25
|
+
_defineProperty(this, "readLoopAbort", null);
|
|
26
|
+
_defineProperty(this, "reconnectAttempt", 0);
|
|
27
|
+
_defineProperty(this, "maxReconnectAttempts", void 0);
|
|
28
|
+
_defineProperty(this, "userInitiatedDisconnect", false);
|
|
29
|
+
_defineProperty(this, "reconnecting", false);
|
|
30
|
+
this.proc = proc;
|
|
31
|
+
this.options = options;
|
|
32
|
+
this.maxReconnectAttempts = options.maxReconnectAttempts ?? DEFAULT_MAX_RECONNECT_ATTEMPTS;
|
|
33
|
+
}
|
|
34
|
+
connect() {
|
|
35
|
+
if (this.connected) return;
|
|
36
|
+
this.readLoopAbort = new AbortController();
|
|
37
|
+
this.startReadLoop();
|
|
38
|
+
this.monitorExit();
|
|
39
|
+
this.connected = true;
|
|
40
|
+
this.options.onConnected();
|
|
41
|
+
}
|
|
42
|
+
async startReadLoop() {
|
|
43
|
+
const stdout = this.proc.stdout;
|
|
44
|
+
if (!stdout) {
|
|
45
|
+
this.options.onError(/* @__PURE__ */ new Error("SSH process stdout is not available"));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const reader = stdout.getReader();
|
|
49
|
+
const decoder = new TextDecoder();
|
|
50
|
+
let lineBuffer = "";
|
|
51
|
+
try {
|
|
52
|
+
while (!this.disconnected) {
|
|
53
|
+
const { done, value } = await reader.read();
|
|
54
|
+
if (done) break;
|
|
55
|
+
lineBuffer += decoder.decode(value, { stream: true });
|
|
56
|
+
const lines = lineBuffer.split("\n");
|
|
57
|
+
lineBuffer = lines.pop() ?? "";
|
|
58
|
+
for (const line of lines) {
|
|
59
|
+
const trimmed = line.trim();
|
|
60
|
+
if (!trimmed) continue;
|
|
61
|
+
this.processLine(trimmed);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
if (!this.disconnected) this.options.onError(err instanceof Error ? err : new Error(String(err)));
|
|
66
|
+
} finally {
|
|
67
|
+
reader.releaseLock();
|
|
68
|
+
if (!this.disconnected && !this.userInitiatedDisconnect) this.handleProcessExit();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
monitorExit() {
|
|
72
|
+
if (this.proc.exitCode !== null) {
|
|
73
|
+
if (!this.userInitiatedDisconnect) this.handleProcessExit();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.proc.exited.then(() => {
|
|
77
|
+
if (!this.disconnected && !this.userInitiatedDisconnect) this.handleProcessExit();
|
|
78
|
+
}).catch(() => {
|
|
79
|
+
if (!this.disconnected && !this.userInitiatedDisconnect) this.handleProcessExit();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async handleProcessExit() {
|
|
83
|
+
if (this.disconnected || this.reconnecting) return;
|
|
84
|
+
this.connected = false;
|
|
85
|
+
if (!this.options.reconnect) {
|
|
86
|
+
this.disconnected = true;
|
|
87
|
+
this.options.onDisconnected();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (this.reconnectAttempt >= this.maxReconnectAttempts) {
|
|
91
|
+
this.disconnected = true;
|
|
92
|
+
this.options.onDisconnected();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this.reconnecting = true;
|
|
96
|
+
try {
|
|
97
|
+
await this.attemptReconnect();
|
|
98
|
+
} finally {
|
|
99
|
+
this.reconnecting = false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async attemptReconnect() {
|
|
103
|
+
const reconnect = this.options.reconnect;
|
|
104
|
+
while (this.reconnectAttempt < this.maxReconnectAttempts) {
|
|
105
|
+
this.reconnectAttempt++;
|
|
106
|
+
this.options.onReconnecting(this.reconnectAttempt, this.maxReconnectAttempts);
|
|
107
|
+
const delay = Math.min(BASE_RECONNECT_DELAY_MS * 2 ** (this.reconnectAttempt - 1), MAX_RECONNECT_DELAY_MS);
|
|
108
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
109
|
+
if (this.userInitiatedDisconnect) return;
|
|
110
|
+
try {
|
|
111
|
+
this.proc = await reconnect();
|
|
112
|
+
this.reconnectAttempt = 0;
|
|
113
|
+
this.connected = true;
|
|
114
|
+
this.startReadLoop();
|
|
115
|
+
this.monitorExit();
|
|
116
|
+
this.options.onConnected();
|
|
117
|
+
return;
|
|
118
|
+
} catch (err) {
|
|
119
|
+
logForDebugging(`[SSH] reconnect attempt ${this.reconnectAttempt} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
this.disconnected = true;
|
|
123
|
+
this.options.onDisconnected();
|
|
124
|
+
}
|
|
125
|
+
processLine(line) {
|
|
126
|
+
let raw;
|
|
127
|
+
try {
|
|
128
|
+
raw = jsonParse(line);
|
|
129
|
+
} catch {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (!isStdoutMessage(raw)) return;
|
|
133
|
+
const parsed = raw;
|
|
134
|
+
if (parsed.type === "control_request") {
|
|
135
|
+
const request = parsed;
|
|
136
|
+
if (request.request.subtype === "can_use_tool") this.options.onPermissionRequest(request.request, request.request_id);
|
|
137
|
+
else {
|
|
138
|
+
logForDebugging(`[SSH] Unsupported control request subtype: ${request.request.subtype}`);
|
|
139
|
+
this.sendErrorResponse(request.request_id, `Unsupported control request subtype: ${request.request.subtype}`);
|
|
140
|
+
}
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (parsed.type !== "control_response" && parsed.type !== "keep_alive" && parsed.type !== "control_cancel_request" && parsed.type !== "streamlined_text" && parsed.type !== "streamlined_tool_use_summary" && !(parsed.type === "system" && parsed.subtype === "post_turn_summary")) this.options.onMessage(parsed);
|
|
144
|
+
}
|
|
145
|
+
writeToStdin(data) {
|
|
146
|
+
try {
|
|
147
|
+
const stdin = this.proc.stdin;
|
|
148
|
+
if (!stdin || typeof stdin === "number" || this.disconnected) return false;
|
|
149
|
+
const encoded = new TextEncoder().encode(data + "\n");
|
|
150
|
+
stdin.write(encoded);
|
|
151
|
+
stdin.flush?.();
|
|
152
|
+
return true;
|
|
153
|
+
} catch {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async sendMessage(content) {
|
|
158
|
+
const message = jsonStringify({
|
|
159
|
+
type: "user",
|
|
160
|
+
message: {
|
|
161
|
+
role: "user",
|
|
162
|
+
content
|
|
163
|
+
},
|
|
164
|
+
parent_tool_use_id: null,
|
|
165
|
+
session_id: ""
|
|
166
|
+
});
|
|
167
|
+
return this.writeToStdin(message);
|
|
168
|
+
}
|
|
169
|
+
sendInterrupt() {
|
|
170
|
+
const request = jsonStringify({
|
|
171
|
+
type: "control_request",
|
|
172
|
+
request_id: crypto.randomUUID(),
|
|
173
|
+
request: { subtype: "interrupt" }
|
|
174
|
+
});
|
|
175
|
+
this.writeToStdin(request);
|
|
176
|
+
}
|
|
177
|
+
respondToPermissionRequest(requestId, response) {
|
|
178
|
+
const msg = jsonStringify({
|
|
179
|
+
type: "control_response",
|
|
180
|
+
response: {
|
|
181
|
+
subtype: "success",
|
|
182
|
+
request_id: requestId,
|
|
183
|
+
response: {
|
|
184
|
+
behavior: response.behavior,
|
|
185
|
+
...response.behavior === "allow" ? { updatedInput: response.updatedInput } : { message: response.message }
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
this.writeToStdin(msg);
|
|
190
|
+
}
|
|
191
|
+
sendErrorResponse(requestId, error) {
|
|
192
|
+
const response = jsonStringify({
|
|
193
|
+
type: "control_response",
|
|
194
|
+
response: {
|
|
195
|
+
subtype: "error",
|
|
196
|
+
request_id: requestId,
|
|
197
|
+
error
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
this.writeToStdin(response);
|
|
201
|
+
}
|
|
202
|
+
disconnect() {
|
|
203
|
+
if (this.disconnected) return;
|
|
204
|
+
this.userInitiatedDisconnect = true;
|
|
205
|
+
this.disconnected = true;
|
|
206
|
+
this.connected = false;
|
|
207
|
+
this.readLoopAbort?.abort();
|
|
208
|
+
try {
|
|
209
|
+
const stdin = this.proc.stdin;
|
|
210
|
+
if (stdin && typeof stdin !== "number") stdin.end?.();
|
|
211
|
+
} catch {}
|
|
212
|
+
try {
|
|
213
|
+
this.proc.kill();
|
|
214
|
+
} catch {}
|
|
215
|
+
}
|
|
216
|
+
isConnected() {
|
|
217
|
+
return this.connected && !this.disconnected;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/ssh/SSHAuthProxy.ts
|
|
222
|
+
init_auth();
|
|
223
|
+
init_oauth();
|
|
224
|
+
init_debug();
|
|
225
|
+
var isWindows = process.platform === "win32";
|
|
226
|
+
function resolveAuthHeaders() {
|
|
227
|
+
const apiKey = process.env.ANTHROPIC_API_KEY;
|
|
228
|
+
if (apiKey) return { "x-api-key": apiKey };
|
|
229
|
+
const oauthTokens = getClaudeAIOAuthTokens();
|
|
230
|
+
if (oauthTokens?.accessToken) return { Authorization: `Bearer ${oauthTokens.accessToken}` };
|
|
231
|
+
return {};
|
|
232
|
+
}
|
|
233
|
+
function resolveUpstreamBaseUrl() {
|
|
234
|
+
return process.env.ANTHROPIC_BASE_URL || getOauthConfig().BASE_API_URL;
|
|
235
|
+
}
|
|
236
|
+
async function proxyFetch(req, nonce) {
|
|
237
|
+
if (nonce && req.headers.get("x-auth-nonce") !== nonce) return new Response("Forbidden", { status: 403 });
|
|
238
|
+
const upstreamBase = resolveUpstreamBaseUrl();
|
|
239
|
+
const url = new URL(req.url);
|
|
240
|
+
const upstreamUrl = `${upstreamBase}${url.pathname}${url.search}`;
|
|
241
|
+
const authHeaders = resolveAuthHeaders();
|
|
242
|
+
if (Object.keys(authHeaders).length === 0) return new Response(JSON.stringify({ error: "No API credentials available on local machine" }), {
|
|
243
|
+
status: 401,
|
|
244
|
+
headers: { "content-type": "application/json" }
|
|
245
|
+
});
|
|
246
|
+
const forwardHeaders = new Headers(req.headers);
|
|
247
|
+
for (const [k, v] of Object.entries(authHeaders)) forwardHeaders.set(k, v);
|
|
248
|
+
forwardHeaders.delete("host");
|
|
249
|
+
forwardHeaders.delete("x-auth-nonce");
|
|
250
|
+
logForDebugging(`[SSHAuthProxy] ${req.method} ${url.pathname} -> ${upstreamUrl}`);
|
|
251
|
+
try {
|
|
252
|
+
const upstreamRes = await fetch(upstreamUrl, {
|
|
253
|
+
method: req.method,
|
|
254
|
+
headers: forwardHeaders,
|
|
255
|
+
body: req.body,
|
|
256
|
+
duplex: "half"
|
|
257
|
+
});
|
|
258
|
+
const responseHeaders = new Headers(upstreamRes.headers);
|
|
259
|
+
responseHeaders.delete("content-encoding");
|
|
260
|
+
responseHeaders.delete("content-length");
|
|
261
|
+
return new Response(upstreamRes.body, {
|
|
262
|
+
status: upstreamRes.status,
|
|
263
|
+
statusText: upstreamRes.statusText,
|
|
264
|
+
headers: responseHeaders
|
|
265
|
+
});
|
|
266
|
+
} catch (err) {
|
|
267
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
268
|
+
logForDebugging(`[SSHAuthProxy] upstream error: ${message}`);
|
|
269
|
+
return new Response(JSON.stringify({ error: `Proxy upstream error: ${message}` }), {
|
|
270
|
+
status: 502,
|
|
271
|
+
headers: { "content-type": "application/json" }
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
async function createAuthProxy() {
|
|
276
|
+
const id = randomUUID();
|
|
277
|
+
if (isWindows) return createTcpAuthProxy(id);
|
|
278
|
+
return createUnixSocketAuthProxy(id);
|
|
279
|
+
}
|
|
280
|
+
async function createUnixSocketAuthProxy(id) {
|
|
281
|
+
const socketPath = `/tmp/claude-ssh-auth-${id}.sock`;
|
|
282
|
+
const server = Bun.serve({
|
|
283
|
+
unix: socketPath,
|
|
284
|
+
fetch: (req) => proxyFetch(req, null)
|
|
285
|
+
});
|
|
286
|
+
logForDebugging(`[SSHAuthProxy] listening on unix:${socketPath}`);
|
|
287
|
+
return {
|
|
288
|
+
proxy: { stop() {
|
|
289
|
+
server.stop(true);
|
|
290
|
+
try {
|
|
291
|
+
unlinkSync(socketPath);
|
|
292
|
+
} catch {}
|
|
293
|
+
} },
|
|
294
|
+
localAddress: socketPath,
|
|
295
|
+
authEnv: { ANTHROPIC_AUTH_SOCKET: socketPath }
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
async function createTcpAuthProxy(id) {
|
|
299
|
+
const nonce = randomUUID();
|
|
300
|
+
const server = Bun.serve({
|
|
301
|
+
port: 0,
|
|
302
|
+
hostname: "127.0.0.1",
|
|
303
|
+
fetch: (req) => proxyFetch(req, nonce)
|
|
304
|
+
});
|
|
305
|
+
const port = server.port;
|
|
306
|
+
logForDebugging(`[SSHAuthProxy] listening on TCP 127.0.0.1:${port} (nonce-protected)`);
|
|
307
|
+
return {
|
|
308
|
+
proxy: { stop() {
|
|
309
|
+
server.stop(true);
|
|
310
|
+
} },
|
|
311
|
+
localAddress: `127.0.0.1:${port}`,
|
|
312
|
+
authEnv: {
|
|
313
|
+
ANTHROPIC_BASE_URL: `http://127.0.0.1:${port}`,
|
|
314
|
+
ANTHROPIC_AUTH_NONCE: nonce
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/ssh/SSHProbe.ts
|
|
320
|
+
init_debug();
|
|
321
|
+
var PROBE_TIMEOUT_MS = 15e3;
|
|
322
|
+
var SSHProbeError = class extends Error {
|
|
323
|
+
constructor(message) {
|
|
324
|
+
super(message);
|
|
325
|
+
this.name = "SSHProbeError";
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
async function probeRemote(host, onProgress) {
|
|
329
|
+
onProgress?.("Probing remote host…");
|
|
330
|
+
const proc = Bun.spawn([
|
|
331
|
+
"ssh",
|
|
332
|
+
"-o",
|
|
333
|
+
"BatchMode=yes",
|
|
334
|
+
"-o",
|
|
335
|
+
"ConnectTimeout=10",
|
|
336
|
+
host,
|
|
337
|
+
"CLAUDE_BIN=$(test -x \"$HOME/.local/bin/claude\" && echo \"$HOME/.local/bin/claude\" || command -v claude 2>/dev/null); echo \"$CLAUDE_BIN\"; $CLAUDE_BIN --version 2>/dev/null; uname -sm; pwd"
|
|
338
|
+
], {
|
|
339
|
+
stdin: "ignore",
|
|
340
|
+
stdout: "pipe",
|
|
341
|
+
stderr: "pipe"
|
|
342
|
+
});
|
|
343
|
+
const result = await Promise.race([proc.exited, new Promise((_, reject) => setTimeout(() => reject(new SSHProbeError(`SSH probe timed out after ${PROBE_TIMEOUT_MS / 1e3}s`)), PROBE_TIMEOUT_MS))]);
|
|
344
|
+
const stdout = await new Response(proc.stdout).text();
|
|
345
|
+
const stderr = await new Response(proc.stderr).text();
|
|
346
|
+
if (result !== 0) throw new SSHProbeError(`SSH probe failed: ${stderr.trim() || `exit code ${result}`}`);
|
|
347
|
+
const lines = stdout.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
348
|
+
logForDebugging(`[SSHProbe] raw lines: ${JSON.stringify(lines)}`);
|
|
349
|
+
const unameIdx = lines.findIndex((l) => /^(Linux|Darwin)\s/.test(l));
|
|
350
|
+
if (unameIdx === -1) throw new SSHProbeError("Could not detect remote platform (uname output missing)");
|
|
351
|
+
const binaryPath = unameIdx >= 2 ? lines[unameIdx - 2] || null : null;
|
|
352
|
+
const versionLine = unameIdx >= 1 ? lines[unameIdx - 1] || null : null;
|
|
353
|
+
const remoteVersion = versionLine && /^\d+\.\d+/.test(versionLine) ? versionLine : null;
|
|
354
|
+
const hasBinary = binaryPath !== null && binaryPath.startsWith("/");
|
|
355
|
+
const defaultCwd = lines[unameIdx + 1] || "/";
|
|
356
|
+
const [osName, arch] = lines[unameIdx].split(/\s+/);
|
|
357
|
+
const remotePlatform = osName === "Darwin" ? "darwin" : "linux";
|
|
358
|
+
const remoteArch = arch === "aarch64" || arch === "arm64" ? "arm64" : "x64";
|
|
359
|
+
onProgress?.(`Detected ${remotePlatform}/${remoteArch}`);
|
|
360
|
+
return {
|
|
361
|
+
hasBinary: hasBinary && remoteVersion !== null,
|
|
362
|
+
remoteVersion,
|
|
363
|
+
remotePlatform,
|
|
364
|
+
remoteArch,
|
|
365
|
+
defaultCwd,
|
|
366
|
+
binaryPath: hasBinary ? binaryPath : null
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/ssh/SSHDeploy.ts
|
|
371
|
+
init_debug();
|
|
372
|
+
var SSH_TIMEOUT_MS = 6e4;
|
|
373
|
+
var REMOTE_BIN_DIR = "~/.local/bin";
|
|
374
|
+
var REMOTE_CLI_FILE = "claude-code-cli.js";
|
|
375
|
+
var REMOTE_WRAPPER = "claude";
|
|
376
|
+
async function runSshCommand(host, command, timeoutMs = SSH_TIMEOUT_MS) {
|
|
377
|
+
const proc = Bun.spawn([
|
|
378
|
+
"ssh",
|
|
379
|
+
"-o",
|
|
380
|
+
"ConnectTimeout=10",
|
|
381
|
+
host,
|
|
382
|
+
command
|
|
383
|
+
], {
|
|
384
|
+
stdout: "pipe",
|
|
385
|
+
stderr: "pipe"
|
|
386
|
+
});
|
|
387
|
+
const timer = setTimeout(() => proc.kill(), timeoutMs);
|
|
388
|
+
try {
|
|
389
|
+
const [stdout, stderr] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text()]);
|
|
390
|
+
const exitCode = await proc.exited;
|
|
391
|
+
return {
|
|
392
|
+
stdout: stdout.trim(),
|
|
393
|
+
stderr: stderr.trim(),
|
|
394
|
+
exitCode
|
|
395
|
+
};
|
|
396
|
+
} finally {
|
|
397
|
+
clearTimeout(timer);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function findLocalBinary() {
|
|
401
|
+
const projectRoot = resolve(import.meta.dir, "../..");
|
|
402
|
+
const distPath = resolve(projectRoot, "dist/cli.js");
|
|
403
|
+
if (existsSync(distPath)) return distPath;
|
|
404
|
+
const devPath = resolve(projectRoot, "src/entrypoints/cli.tsx");
|
|
405
|
+
if (existsSync(devPath)) return devPath;
|
|
406
|
+
throw new Error("Cannot find local CLI binary to deploy. Run `bun run build` first.");
|
|
407
|
+
}
|
|
408
|
+
async function deployBinary(options) {
|
|
409
|
+
const { host, remotePlatform, remoteArch, localVersion, onProgress } = options;
|
|
410
|
+
if (remotePlatform !== "linux" && remotePlatform !== "darwin") throw new Error(`Remote platform "${remotePlatform}" is not supported. Only linux and darwin are supported.`);
|
|
411
|
+
logForDebugging(`[SSHDeploy] deploying to ${host} (${remotePlatform}/${remoteArch}, v${localVersion})`);
|
|
412
|
+
const localBinary = findLocalBinary();
|
|
413
|
+
logForDebugging(`[SSHDeploy] local binary: ${localBinary}`);
|
|
414
|
+
onProgress?.("Creating remote directory...");
|
|
415
|
+
const mkdirResult = await runSshCommand(host, `mkdir -p ${REMOTE_BIN_DIR}`);
|
|
416
|
+
if (mkdirResult.exitCode !== 0) throw new Error(`Failed to create remote directory: ${mkdirResult.stderr}`);
|
|
417
|
+
onProgress?.("Uploading binary...");
|
|
418
|
+
const remotePath = `${REMOTE_BIN_DIR}/${REMOTE_CLI_FILE}`;
|
|
419
|
+
const scpProc = Bun.spawn([
|
|
420
|
+
"scp",
|
|
421
|
+
"-o",
|
|
422
|
+
"ConnectTimeout=10",
|
|
423
|
+
localBinary,
|
|
424
|
+
`${host}:${remotePath}`
|
|
425
|
+
], {
|
|
426
|
+
stdout: "pipe",
|
|
427
|
+
stderr: "pipe"
|
|
428
|
+
});
|
|
429
|
+
const scpTimer = setTimeout(() => scpProc.kill(), SSH_TIMEOUT_MS);
|
|
430
|
+
const scpStderr = await new Response(scpProc.stderr).text();
|
|
431
|
+
const scpExit = await scpProc.exited;
|
|
432
|
+
clearTimeout(scpTimer);
|
|
433
|
+
if (scpExit !== 0) throw new Error(`SCP upload failed (exit ${scpExit}): ${scpStderr.trim()}`);
|
|
434
|
+
onProgress?.("Installing wrapper script...");
|
|
435
|
+
const wrapperResult = await runSshCommand(host, [
|
|
436
|
+
`cat > ${REMOTE_BIN_DIR}/${REMOTE_WRAPPER} << 'WRAPPER'`,
|
|
437
|
+
"#!/bin/sh",
|
|
438
|
+
`exec bun ${REMOTE_BIN_DIR}/${REMOTE_CLI_FILE} "$@"`,
|
|
439
|
+
"WRAPPER",
|
|
440
|
+
`chmod +x ${REMOTE_BIN_DIR}/${REMOTE_WRAPPER}`
|
|
441
|
+
].join("\n"));
|
|
442
|
+
if (wrapperResult.exitCode !== 0) throw new Error(`Failed to install wrapper script: ${wrapperResult.stderr}`);
|
|
443
|
+
onProgress?.("Verifying installation...");
|
|
444
|
+
const verifyResult = await runSshCommand(host, `${REMOTE_BIN_DIR}/${REMOTE_WRAPPER} --version`);
|
|
445
|
+
if (verifyResult.exitCode !== 0) throw new Error(`Binary deployed but verification failed (exit ${verifyResult.exitCode}): ${verifyResult.stderr}`);
|
|
446
|
+
logForDebugging(`[SSHDeploy] deployed successfully, remote version: ${verifyResult.stdout}`);
|
|
447
|
+
onProgress?.(`Deployed v${verifyResult.stdout}`);
|
|
448
|
+
return `${REMOTE_BIN_DIR}/${REMOTE_WRAPPER}`;
|
|
449
|
+
}
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region src/ssh/createSSHSession.ts
|
|
452
|
+
init_cliLaunch();
|
|
453
|
+
init_debug();
|
|
454
|
+
init_slowOperations();
|
|
455
|
+
var INIT_TIMEOUT_MS = 3e4;
|
|
456
|
+
var STDERR_TAIL_LINES = 20;
|
|
457
|
+
var SSHSessionError = class extends Error {
|
|
458
|
+
constructor(message) {
|
|
459
|
+
super(message);
|
|
460
|
+
this.name = "SSHSessionError";
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
async function createSSHSession(config, callbacks) {
|
|
464
|
+
const { host, localVersion, extraCliArgs, remoteBin } = config;
|
|
465
|
+
const onProgress = callbacks?.onProgress;
|
|
466
|
+
let remoteBinaryPath;
|
|
467
|
+
let defaultCwd = "/";
|
|
468
|
+
if (remoteBin) {
|
|
469
|
+
onProgress?.("Using custom remote binary, skipping probe/deploy…");
|
|
470
|
+
remoteBinaryPath = remoteBin;
|
|
471
|
+
logForDebugging(`[SSH] custom remoteBin: ${remoteBin}`);
|
|
472
|
+
try {
|
|
473
|
+
const pwdProc = Bun.spawn([
|
|
474
|
+
"ssh",
|
|
475
|
+
"-o",
|
|
476
|
+
"BatchMode=yes",
|
|
477
|
+
"-o",
|
|
478
|
+
"ConnectTimeout=5",
|
|
479
|
+
host,
|
|
480
|
+
"pwd"
|
|
481
|
+
], {
|
|
482
|
+
stdin: "ignore",
|
|
483
|
+
stdout: "pipe",
|
|
484
|
+
stderr: "ignore"
|
|
485
|
+
});
|
|
486
|
+
await pwdProc.exited;
|
|
487
|
+
const pwd = (await new Response(pwdProc.stdout).text()).trim();
|
|
488
|
+
if (pwd.startsWith("/")) defaultCwd = pwd;
|
|
489
|
+
} catch {}
|
|
490
|
+
} else {
|
|
491
|
+
const probe = await probeRemote(host, onProgress);
|
|
492
|
+
logForDebugging(`[SSH] probe result: ${JSON.stringify(probe)}`);
|
|
493
|
+
defaultCwd = probe.defaultCwd;
|
|
494
|
+
remoteBinaryPath = probe.binaryPath ?? "~/.local/bin/claude";
|
|
495
|
+
if (!probe.hasBinary || probe.remoteVersion !== localVersion) {
|
|
496
|
+
onProgress?.(probe.hasBinary ? `Updating remote binary (${probe.remoteVersion} → ${localVersion})…` : "Deploying binary to remote…");
|
|
497
|
+
remoteBinaryPath = await deployBinary({
|
|
498
|
+
host,
|
|
499
|
+
remotePlatform: probe.remotePlatform,
|
|
500
|
+
remoteArch: probe.remoteArch,
|
|
501
|
+
localVersion,
|
|
502
|
+
onProgress
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
const { proxy, localAddress, authEnv } = await createAuthProxy();
|
|
507
|
+
logForDebugging(`[SSH] auth proxy listening on ${localAddress}`);
|
|
508
|
+
const remoteSocketId = randomUUID().slice(0, 8);
|
|
509
|
+
const isWindows = process.platform === "win32";
|
|
510
|
+
const remoteCli = [];
|
|
511
|
+
for (const [k, v] of Object.entries(authEnv)) remoteCli.push(`${k}=${v}`);
|
|
512
|
+
remoteCli.push(remoteBinaryPath, "--output-format", "stream-json", "--input-format", "stream-json", "--verbose", "-p");
|
|
513
|
+
if (config.cwd) remoteCli.push("--cwd", config.cwd);
|
|
514
|
+
if (config.permissionMode) remoteCli.push("--permission-mode", config.permissionMode);
|
|
515
|
+
if (config.dangerouslySkipPermissions) remoteCli.push("--dangerously-skip-permissions");
|
|
516
|
+
remoteCli.push(...extraCliArgs);
|
|
517
|
+
const sshArgs = ["ssh"];
|
|
518
|
+
if (!isWindows) {
|
|
519
|
+
const remoteSocket = `/tmp/claude-ssh-auth-${remoteSocketId}.sock`;
|
|
520
|
+
sshArgs.push("-R", `${remoteSocket}:${localAddress}`);
|
|
521
|
+
sshArgs.push("-o", "StreamLocalBindUnlink=yes");
|
|
522
|
+
const idx = remoteCli.indexOf(`ANTHROPIC_AUTH_SOCKET=${authEnv.ANTHROPIC_AUTH_SOCKET}`);
|
|
523
|
+
if (idx !== -1) remoteCli[idx] = `ANTHROPIC_AUTH_SOCKET=${remoteSocket}`;
|
|
524
|
+
} else {
|
|
525
|
+
const localPort = localAddress.split(":")[1];
|
|
526
|
+
const remotePort = 1e4 + Math.floor(Math.random() * 5e4);
|
|
527
|
+
sshArgs.push("-R", `${remotePort}:127.0.0.1:${localPort}`);
|
|
528
|
+
const baseIdx = remoteCli.findIndex((s) => s.startsWith("ANTHROPIC_BASE_URL="));
|
|
529
|
+
if (baseIdx !== -1) remoteCli[baseIdx] = `ANTHROPIC_BASE_URL=http://127.0.0.1:${remotePort}`;
|
|
530
|
+
}
|
|
531
|
+
sshArgs.push(host, remoteCli.join(" "));
|
|
532
|
+
onProgress?.("Starting remote session…");
|
|
533
|
+
logForDebugging(`[SSH] spawning: ${sshArgs.join(" ")}`);
|
|
534
|
+
let proc;
|
|
535
|
+
try {
|
|
536
|
+
proc = Bun.spawn(sshArgs, {
|
|
537
|
+
stdin: "pipe",
|
|
538
|
+
stdout: "pipe",
|
|
539
|
+
stderr: "pipe"
|
|
540
|
+
});
|
|
541
|
+
} catch (err) {
|
|
542
|
+
proxy.stop();
|
|
543
|
+
throw new SSHSessionError(`Failed to spawn SSH process: ${err instanceof Error ? err.message : String(err)}`);
|
|
544
|
+
}
|
|
545
|
+
const stderrChunks = [];
|
|
546
|
+
collectStderr(proc, stderrChunks);
|
|
547
|
+
let remoteCwd;
|
|
548
|
+
if (remoteBin) {
|
|
549
|
+
const earlyExit = await Promise.race([proc.exited.then((code) => code), new Promise((r) => setTimeout(() => r(null), 3e3))]);
|
|
550
|
+
if (earlyExit !== null) {
|
|
551
|
+
proxy.stop();
|
|
552
|
+
const tail = stderrChunks.join("").trim();
|
|
553
|
+
throw new SSHSessionError(`Remote process exited immediately (code ${earlyExit})${tail ? `: ${tail}` : ""}`);
|
|
554
|
+
}
|
|
555
|
+
remoteCwd = config.cwd || defaultCwd || "/";
|
|
556
|
+
} else try {
|
|
557
|
+
remoteCwd = await waitForInit(proc, config.cwd || defaultCwd);
|
|
558
|
+
} catch (err) {
|
|
559
|
+
proxy.stop();
|
|
560
|
+
proc.kill();
|
|
561
|
+
throw err;
|
|
562
|
+
}
|
|
563
|
+
logForDebugging(`[SSH] remote session initialized, remoteCwd=${remoteCwd}`);
|
|
564
|
+
let currentProc = proc;
|
|
565
|
+
const reconnect = async () => {
|
|
566
|
+
logForDebugging("[SSH] reconnect: re-spawning SSH process with --continue");
|
|
567
|
+
const reconnectArgs = [...sshArgs];
|
|
568
|
+
const cmdIdx = reconnectArgs.length - 1;
|
|
569
|
+
const existingCmd = reconnectArgs[cmdIdx];
|
|
570
|
+
if (!existingCmd.includes("--continue")) reconnectArgs[cmdIdx] = existingCmd.replace(/ -p(?:\s|$)/, " -p --continue ");
|
|
571
|
+
const newProc = Bun.spawn(reconnectArgs, {
|
|
572
|
+
stdin: "pipe",
|
|
573
|
+
stdout: "pipe",
|
|
574
|
+
stderr: "pipe"
|
|
575
|
+
});
|
|
576
|
+
const newStderrChunks = [];
|
|
577
|
+
collectStderr(newProc, newStderrChunks);
|
|
578
|
+
await waitForInit(newProc, remoteCwd);
|
|
579
|
+
currentProc = newProc;
|
|
580
|
+
stderrChunks.length = 0;
|
|
581
|
+
stderrChunks.push(...newStderrChunks);
|
|
582
|
+
return newProc;
|
|
583
|
+
};
|
|
584
|
+
return {
|
|
585
|
+
remoteCwd,
|
|
586
|
+
get proc() {
|
|
587
|
+
return currentProc;
|
|
588
|
+
},
|
|
589
|
+
proxy,
|
|
590
|
+
createManager(options) {
|
|
591
|
+
return new SSHSessionManagerImpl(currentProc, {
|
|
592
|
+
...options,
|
|
593
|
+
reconnect
|
|
594
|
+
});
|
|
595
|
+
},
|
|
596
|
+
getStderrTail() {
|
|
597
|
+
return stderrChunks.slice(-STDERR_TAIL_LINES).join("");
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
async function createLocalSSHSession(config) {
|
|
602
|
+
const { proxy, authEnv } = await createAuthProxy();
|
|
603
|
+
const cliArgs = [
|
|
604
|
+
"--output-format",
|
|
605
|
+
"stream-json",
|
|
606
|
+
"--input-format",
|
|
607
|
+
"stream-json",
|
|
608
|
+
"-p"
|
|
609
|
+
];
|
|
610
|
+
if (config.cwd) cliArgs.push("--cwd", config.cwd);
|
|
611
|
+
if (config.permissionMode) cliArgs.push("--permission-mode", config.permissionMode);
|
|
612
|
+
if (config.dangerouslySkipPermissions) cliArgs.push("--dangerously-skip-permissions");
|
|
613
|
+
const spec = buildCliLaunch(cliArgs);
|
|
614
|
+
let proc;
|
|
615
|
+
try {
|
|
616
|
+
proc = Bun.spawn([spec.execPath, ...spec.args], {
|
|
617
|
+
stdin: "pipe",
|
|
618
|
+
stdout: "pipe",
|
|
619
|
+
stderr: "pipe",
|
|
620
|
+
env: {
|
|
621
|
+
...spec.env,
|
|
622
|
+
...authEnv
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
} catch (err) {
|
|
626
|
+
proxy.stop();
|
|
627
|
+
throw new SSHSessionError(`Failed to spawn local CLI process: ${err instanceof Error ? err.message : String(err)}`);
|
|
628
|
+
}
|
|
629
|
+
logForDebugging("[SSH] local session spawned, waiting for init message...");
|
|
630
|
+
const stderrChunks = [];
|
|
631
|
+
collectStderr(proc, stderrChunks);
|
|
632
|
+
let remoteCwd;
|
|
633
|
+
try {
|
|
634
|
+
remoteCwd = await waitForInit(proc, config.cwd);
|
|
635
|
+
} catch (err) {
|
|
636
|
+
proxy.stop();
|
|
637
|
+
proc.kill();
|
|
638
|
+
throw err;
|
|
639
|
+
}
|
|
640
|
+
logForDebugging(`[SSH] local session initialized, remoteCwd=${remoteCwd}`);
|
|
641
|
+
let currentProc = proc;
|
|
642
|
+
const reconnect = async () => {
|
|
643
|
+
logForDebugging("[SSH] local reconnect: re-spawning CLI with --continue");
|
|
644
|
+
const reconnectCliArgs = [...cliArgs];
|
|
645
|
+
if (!reconnectCliArgs.includes("--continue")) reconnectCliArgs.push("--continue");
|
|
646
|
+
const reconnectSpec = buildCliLaunch(reconnectCliArgs);
|
|
647
|
+
const newProc = Bun.spawn([reconnectSpec.execPath, ...reconnectSpec.args], {
|
|
648
|
+
stdin: "pipe",
|
|
649
|
+
stdout: "pipe",
|
|
650
|
+
stderr: "pipe",
|
|
651
|
+
env: {
|
|
652
|
+
...reconnectSpec.env,
|
|
653
|
+
...authEnv
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
const newStderrChunks = [];
|
|
657
|
+
collectStderr(newProc, newStderrChunks);
|
|
658
|
+
await waitForInit(newProc, remoteCwd);
|
|
659
|
+
currentProc = newProc;
|
|
660
|
+
stderrChunks.length = 0;
|
|
661
|
+
stderrChunks.push(...newStderrChunks);
|
|
662
|
+
return newProc;
|
|
663
|
+
};
|
|
664
|
+
return {
|
|
665
|
+
remoteCwd,
|
|
666
|
+
get proc() {
|
|
667
|
+
return currentProc;
|
|
668
|
+
},
|
|
669
|
+
proxy,
|
|
670
|
+
createManager(options) {
|
|
671
|
+
return new SSHSessionManagerImpl(currentProc, {
|
|
672
|
+
...options,
|
|
673
|
+
reconnect
|
|
674
|
+
});
|
|
675
|
+
},
|
|
676
|
+
getStderrTail() {
|
|
677
|
+
return stderrChunks.slice(-STDERR_TAIL_LINES).join("");
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
async function waitForInit(proc, fallbackCwd) {
|
|
682
|
+
const stdout = proc.stdout;
|
|
683
|
+
if (!stdout) throw new SSHSessionError("Child process stdout is not readable");
|
|
684
|
+
const reader = stdout.getReader();
|
|
685
|
+
const decoder = new TextDecoder();
|
|
686
|
+
let buffer = "";
|
|
687
|
+
const deadline = Date.now() + INIT_TIMEOUT_MS;
|
|
688
|
+
try {
|
|
689
|
+
while (Date.now() < deadline) {
|
|
690
|
+
const remaining = deadline - Date.now();
|
|
691
|
+
const result = await Promise.race([reader.read(), new Promise((_, reject) => setTimeout(() => reject(new SSHSessionError("Remote CLI did not initialize within 30 seconds. Check SSH connectivity and remote binary.")), remaining))]);
|
|
692
|
+
if (result.done) throw new SSHSessionError("Child process exited before sending init message");
|
|
693
|
+
buffer += decoder.decode(result.value, { stream: true });
|
|
694
|
+
const lines = buffer.split("\n");
|
|
695
|
+
buffer = lines.pop() ?? "";
|
|
696
|
+
for (const line of lines) {
|
|
697
|
+
const trimmed = line.trim();
|
|
698
|
+
if (!trimmed) continue;
|
|
699
|
+
try {
|
|
700
|
+
const msg = jsonParse(trimmed);
|
|
701
|
+
if (msg.type === "system" && msg.subtype === "init") {
|
|
702
|
+
reader.releaseLock();
|
|
703
|
+
return msg.cwd || fallbackCwd || process.cwd();
|
|
704
|
+
}
|
|
705
|
+
} catch {}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
} catch (err) {
|
|
709
|
+
reader.releaseLock();
|
|
710
|
+
throw err instanceof SSHSessionError ? err : new SSHSessionError(`Error reading init message: ${err instanceof Error ? err.message : String(err)}`);
|
|
711
|
+
}
|
|
712
|
+
reader.releaseLock();
|
|
713
|
+
throw new SSHSessionError("Remote CLI did not initialize within 30 seconds. Check SSH connectivity and remote binary.");
|
|
714
|
+
}
|
|
715
|
+
function collectStderr(proc, chunks) {
|
|
716
|
+
const stderr = proc.stderr;
|
|
717
|
+
if (!stderr) return;
|
|
718
|
+
const reader = stderr.getReader();
|
|
719
|
+
const decoder = new TextDecoder();
|
|
720
|
+
(async () => {
|
|
721
|
+
try {
|
|
722
|
+
while (true) {
|
|
723
|
+
const { done, value } = await reader.read();
|
|
724
|
+
if (done) break;
|
|
725
|
+
chunks.push(decoder.decode(value, { stream: true }));
|
|
726
|
+
if (chunks.length > STDERR_TAIL_LINES * 2) chunks.splice(0, chunks.length - STDERR_TAIL_LINES);
|
|
727
|
+
}
|
|
728
|
+
} catch {}
|
|
729
|
+
})();
|
|
730
|
+
}
|
|
731
|
+
//#endregion
|
|
732
|
+
export { SSHSessionError, createLocalSSHSession, createSSHSession };
|