claude-code-best 1.10.4 → 1.10.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 +2 -0
- package/dist/chunks/{AddWorkspaceDirectory-DVCy9BiZ.js → AddWorkspaceDirectory-Cn8eiwrb.js} +3 -3
- package/dist/chunks/{App-BlkL8DKf.js → App-D1DLYJdM.js} +3 -3
- package/dist/chunks/{ApproveApiKey-BVRQDmjl.js → ApproveApiKey-IBh5N1p8.js} +2 -2
- package/dist/chunks/{AssistantSessionChooser-CrNkNgQA.js → AssistantSessionChooser-GRRFvfRG.js} +4 -4
- package/dist/chunks/{BackgroundTasksDialog-C5DjgwdM.js → BackgroundTasksDialog-CJYpprdE.js} +6 -6
- package/dist/chunks/{BypassPermissionsModeDialog-BBGwhTBe.js → BypassPermissionsModeDialog-COrXWack.js} +2 -2
- package/dist/chunks/{ClaudeInChromeOnboarding-DMqm-w-H.js → ClaudeInChromeOnboarding-Dm7qZLgF.js} +2 -2
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-BypOumQj.js → ClaudeMdExternalIncludesDialog-CBL6eyKA.js} +2 -2
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-Bebkgj2Y.js → ClaudeMdExternalIncludesDialog-CfBUqdME.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-CjQmXZWq.js +3 -0
- package/dist/chunks/{DesktopHandoff-iznn2WpX.js → DesktopHandoff-7MMOuuvo.js} +4 -4
- package/dist/chunks/{DevChannelsDialog-DBy16Ah7.js → DevChannelsDialog-8b8yzA-E.js} +1 -1
- package/dist/chunks/{DiffDialog-CmRfzWqn.js → DiffDialog-Cv9tWvDe.js} +3 -3
- package/dist/chunks/{Doctor-BWq7hdeP.js → Doctor-D0WsE5Hm.js} +9 -9
- package/dist/chunks/{ExitFlow-Booe5RG0.js → ExitFlow-Cmnj9sEJ.js} +2 -2
- package/dist/chunks/{Feedback-BXhOpMYP.js → Feedback-CBPkAZk0.js} +6 -6
- package/dist/chunks/{Grove-1d_IzYLF.js → Grove-DW883TKX.js} +1 -1
- package/dist/chunks/{HybridTransport-Bc5Wflp6.js → HybridTransport-DalIOCMr.js} +4 -4
- package/dist/chunks/{ITermBackend-CIZ5iua4.js → ITermBackend-Dq50bpgu.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-VcOW0rhp.js → InvalidConfigDialog-doUyRcPK.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-CbKIgUnH.js → InvalidSettingsDialog-9qcix6GZ.js} +2 -2
- package/dist/chunks/{MCPConnectionManager-BYMiwvlp.js → MCPConnectionManager-DJy3pr0U.js} +4 -4
- package/dist/chunks/{McpParsingWarnings-CGypiB6N.js → McpParsingWarnings-CS19mt92.js} +1 -1
- package/dist/chunks/{MessageSelector-CqgU9BNM.js → MessageSelector-DqdcESrb.js} +10 -10
- package/dist/chunks/{Messages-CcUvwqZg.js → Messages-BYqXOSUE.js} +21 -18
- package/dist/chunks/{Onboarding-VaXzf6WV.js → Onboarding-0YZAKRvF.js} +8 -8
- package/dist/chunks/{OverageCreditUpsell-D6HCulS4.js → OverageCreditUpsell-DoQL4iSw.js} +2 -2
- package/dist/chunks/{PluginSettings-BppprDhd.js → PluginSettings-CdWc4ExN.js} +13 -13
- package/dist/chunks/{PromptInputFooterSuggestions-BnGR94iS.js → PromptInputFooterSuggestions-F4iS1RGR.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-sJ5E03c0.js → PromptInputHelpMenu-Cl1qgxRE.js} +3 -3
- package/dist/chunks/{QueryEngine-Booichrl.js → QueryEngine-3ANU6X2_.js} +6 -6
- package/dist/chunks/{REPL-DZ6mi6Zs.js → REPL-Dq8UBgEs.js} +77 -77
- package/dist/chunks/{RemoteCallout-BKMSCusO.js → RemoteCallout-CzKwvCXH.js} +3 -3
- package/dist/chunks/{RemoteSessionManager-B42Y3Ebt.js → RemoteSessionManager-C9B47KD8.js} +11 -11
- package/dist/chunks/{ResumeConversation-CLW_csj7.js → ResumeConversation-CrovAkw2.js} +5 -5
- package/dist/chunks/{SSETransport-CBqNGHPt.js → SSETransport-Cg6SC3RF.js} +3 -3
- package/dist/chunks/{Settings-C4MWZQJg.js → Settings-D9EAoL25.js} +13 -13
- package/dist/chunks/{TeleportProgress-nMYCXHjk.js → TeleportProgress-ChykSiWy.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-Dlgasboa.js → TeleportRepoMismatchDialog-z1UvbCBl.js} +3 -3
- package/dist/chunks/{TeleportResumeWrapper-pgzs-Pnc.js → TeleportResumeWrapper-RnoTy_BM.js} +4 -4
- package/dist/chunks/{ThemePicker-CrFxbfz5.js → ThemePicker-YogbQOzf.js} +4 -4
- package/dist/chunks/{TmuxBackend-CKlr-Tq-.js → TmuxBackend-FRRWa7bz.js} +1 -1
- package/dist/chunks/{ToolSearchTool-DS0MCChC.js → ToolSearchTool-yAf8wh_M.js} +1 -1
- package/dist/chunks/{TrustDialog-DkcOyOQ8.js → TrustDialog-BZYGPhS4.js} +5 -5
- package/dist/chunks/{ValidationErrorsList-DX--Q9ps.js → ValidationErrorsList-Lkbyic4p.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-BZL2t_Hi.js → WindowsTerminalBackend-6UW2IN7S.js} +1 -1
- package/dist/chunks/{add-dir-U8-YheIW.js → add-dir-WQc6i1NE.js} +2 -2
- package/dist/chunks/{agentDisplay-Bi7wG6lO.js → agentDisplay-DrOc2Cmv.js} +2 -2
- package/dist/chunks/{agents-CjZ_blbH.js → agents-CP9e1zFG.js} +2 -2
- package/dist/chunks/{agents-jYuk_U1o.js → agents-kLDGm4aj.js} +9 -9
- package/dist/chunks/{ant-BSnzwtTD.js → ant-DGHxzE2E.js} +3 -3
- package/dist/chunks/{api-yTTqoYQQ.js → api-B8xNSO2s.js} +2 -2
- package/dist/chunks/{api-Cln3_5Uw.js → api-BDsQszu5.js} +1 -1
- package/dist/chunks/{assistant-DI_H2iWp.js → assistant-BRmUpk56.js} +6 -6
- package/dist/chunks/{assistant-BfwbGxRJ.js → assistant-CUIPlKzN.js} +2 -2
- package/dist/chunks/{attach-BqMCSqNV.js → attach-DVV_e1nF.js} +2 -2
- package/dist/chunks/auth-D6mo6w0T.js +3 -0
- package/dist/chunks/{auth-BxbyloQ-.js → auth-rEn8iPZu.js} +1 -1
- package/dist/chunks/{autoMode-CZcWZq1u.js → autoMode-CX8oiX4U.js} +3 -3
- package/dist/chunks/{autonomy-BWYKBGND.js → autonomy-C3lbibIS.js} +7 -7
- package/dist/chunks/{autonomyPanel-DarG7d9N.js → autonomyPanel-DEBiYN4J.js} +2 -2
- package/dist/chunks/{backgroundHousekeeping-QGtsFC1J.js → backgroundHousekeeping-CVw7Kuk5.js} +6 -6
- package/dist/chunks/{backgroundHousekeeping-B5DvGD7y.js → backgroundHousekeeping-DcpwSc0f.js} +1 -1
- package/dist/chunks/{banner-DEyliQiE.js → banner-2Io8Jttd.js} +1 -1
- package/dist/chunks/{bg-eXM91qlH.js → bg-2DXXMI4u.js} +5 -5
- package/dist/chunks/{bg-D3EpiIIG.js → bg-D-cs4pwp.js} +1 -1
- package/dist/chunks/{branch-Btkn5RxT.js → branch-M1OCJsr-.js} +2 -2
- package/dist/chunks/{bridge-BqrW3ptI.js → bridge-BDunNr2C.js} +9 -9
- package/dist/chunks/{bridgeConfig-CPm4YdPQ.js → bridgeConfig-B2rD8AEm.js} +1 -1
- package/dist/chunks/{bridgeConfig-B0BJiqLQ.js → bridgeConfig-B4llG1Qy.js} +1 -1
- package/dist/chunks/{bridgeEnabled-Da7NvzfD.js → bridgeEnabled-BdDSzJyK.js} +3 -3
- package/dist/chunks/{bridgeEnabled-nNSdyd6o.js → bridgeEnabled-CBon4Xe0.js} +1 -1
- package/dist/chunks/{bridgeMain-JrZb8G7_.js → bridgeMain-C8NsVWHa.js} +39 -39
- package/dist/chunks/{bridgeMessaging-Ps90kknR.js → bridgeMessaging-mQL1fqqw.js} +2 -2
- package/dist/chunks/{btw-DAIcmOFa.js → btw-Dvaa1ffB.js} +4 -4
- package/dist/chunks/{buddy-BSBr6Bqo.js → buddy-B4YBZsk_.js} +3 -3
- package/dist/chunks/{bypassPermissionsKillswitch-Be5FP_dk.js → bypassPermissionsKillswitch-DUnGSNlw.js} +1 -1
- package/dist/chunks/{caches-DXHGWpmB.js → caches-BgmmLXXG.js} +1 -1
- package/dist/chunks/{caches-DIJ6G0lk.js → caches-C3t_UPTx.js} +9 -9
- package/dist/chunks/{ccrClient-DhLq6DhZ.js → ccrClient-DyibmQoL.js} +4 -4
- package/dist/chunks/{changeDetector-C1nTwoq-.js → changeDetector-cR6xxHfP.js} +1 -1
- package/dist/chunks/{channelNotification-vWtwJURA.js → channelNotification-CxBsrYgT.js} +2 -2
- package/dist/chunks/{channelNotification-CrqpLYU8.js → channelNotification-Dp5PBfI2.js} +1 -1
- package/dist/chunks/{chrome-pf_jzIlm.js → chrome-phjK3O3e.js} +5 -5
- package/dist/chunks/{chromeNativeHost-BIFBEj1S.js → chromeNativeHost-Q6-G2bfy.js} +1 -1
- package/dist/chunks/{claim-main-CKOOfVGl.js → claim-main-CwcSUu_w.js} +2 -2
- package/dist/chunks/{cleanup-CFJJnBGR.js → cleanup-fEkK-hKc.js} +3 -3
- package/dist/chunks/{clear-BB2PwiQx.js → clear-CXXSmRTF.js} +1 -1
- package/dist/chunks/{client-B9_8hUiW.js → client-iaQg8RHp.js} +1 -1
- package/dist/chunks/{color-BjftDk5b.js → color-JtDDavyO.js} +1 -1
- package/dist/chunks/{commands-DtbNW3mY.js → commands-BmLwNQtB.js} +1 -1
- package/dist/chunks/{commitAttribution-BlIYfuYu.js → commitAttribution-C6V_TEz5.js} +1 -1
- package/dist/chunks/{commitAttribution-96_4kt9b.js → commitAttribution-D2pnNyaZ.js} +2 -2
- package/dist/chunks/{compact-BW9oKVrB.js → compact-CApWRQkW.js} +1 -1
- package/dist/chunks/{companion-DqkRzM-o.js → companion-B_DcTUnr.js} +1 -1
- package/dist/chunks/{completionCache-3o7Gw0dJ.js → completionCache-Dt9AMx4l.js} +1 -1
- package/dist/chunks/{config-Cn7EHKiB.js → config-BWdo1jD7.js} +1 -1
- package/dist/chunks/{config-3NXB2mOm.js → config-DqhW1iNY.js} +1 -1
- package/dist/chunks/{context-Cj4cYxCH.js → context-LEm1Dsfk.js} +2 -2
- package/dist/chunks/{context-noninteractive-DGpNoBXY.js → context-noninteractive-B2CgTs83.js} +2 -2
- package/dist/chunks/{conversation-E1BDmJsH.js → conversation-7D1e3BpK.js} +1 -1
- package/dist/chunks/{conversation-CYzcGEAu.js → conversation-Cpd4lbPx.js} +4 -4
- package/dist/chunks/{copy-C3alITPt.js → copy-DkoNbnQj.js} +2 -2
- package/dist/chunks/{cost-gsRKKTvI.js → cost-BijEhcqE.js} +2 -2
- package/dist/chunks/{createSSHSession-D-UbcbMK.js → createSSHSession-BkQKoEx8.js} +2 -2
- package/dist/chunks/{createSession-Bd2t1qoj.js → createSession-BmfIuPY4.js} +21 -21
- package/dist/chunks/{cronJitterConfig-C2q9_3QN.js → cronJitterConfig-DI17nwGJ.js} +5 -5
- package/dist/chunks/{crossProjectResume-BRDC5Qme.js → crossProjectResume-BtRVxMcd.js} +7 -7
- package/dist/chunks/{daemon-D8GF7h1-.js → daemon-Ci7b5c8J.js} +2 -2
- package/dist/chunks/{datadog-DNJ2Dk5e.js → datadog-DIVSdZTL.js} +1 -1
- package/dist/chunks/{datadog-CuqEpWP2.js → datadog-gkAb9ruO.js} +1 -1
- package/dist/chunks/{desktop-BqkHdIsi.js → desktop-DSjn1Eus.js} +1 -1
- package/dist/chunks/{detach-n5rNvLEp.js → detach-ahn3imIZ.js} +2 -2
- package/dist/chunks/{detached-UfjZBYLT.js → detached-BTZLi_wz.js} +1 -1
- package/dist/chunks/{detectRepository-fuaML83x.js → detectRepository-D8RQ87sr.js} +1 -1
- package/dist/chunks/{detectRepository-CKod-dqz.js → detectRepository-DePiwWvI.js} +1 -1
- package/dist/chunks/{diff-BHdXYX38.js → diff-C2v7Lbvx.js} +1 -1
- package/dist/chunks/{doctor-B3MfgdAE.js → doctor-CweCJ292.js} +1 -1
- package/dist/chunks/{effort-DTYLIG3f.js → effort-k29n1cnt.js} +3 -3
- package/dist/chunks/{entry-D3JObTgr.js → entry-lRwCpCN7.js} +3 -3
- package/dist/chunks/{envLessBridgeConfig-vgPa_UXL.js → envLessBridgeConfig-BfPtjcEj.js} +3 -3
- package/dist/chunks/{executor-C_2kY4Jz.js → executor-Bwd4Tsx-.js} +1 -1
- package/dist/chunks/{executor-Cl9Uucno.js → executor-CVtzNPdo.js} +2 -2
- package/dist/chunks/{exit-XYDXJK0v.js → exit-Pwi-2e2p.js} +3 -3
- package/dist/chunks/{export-4znd5kTe.js → export-hWJsQ1eN.js} +3 -3
- package/dist/chunks/{exportRenderer-B0eIPPmC.js → exportRenderer-CH9pqlfC.js} +2 -2
- package/dist/chunks/{extra-usage-core-WJoxHv_Q.js → extra-usage-core-CjnPLc50.js} +5 -5
- package/dist/chunks/{extra-usage-Bce_hvHV.js → extra-usage-fCvSiuPp.js} +2 -2
- package/dist/chunks/{extra-usage-noninteractive-CAXoNdk2.js → extra-usage-noninteractive-2dQqr3Q_.js} +1 -1
- package/dist/chunks/{extraUsage-DFHdpn4R.js → extraUsage-Bb6CmCIQ.js} +4 -4
- package/dist/chunks/{fast-DWO8yUD6.js → fast-CwBjwygY.js} +4 -4
- package/dist/chunks/{fast-B9RdF9_6.js → fast-DeNGck98.js} +1 -1
- package/dist/chunks/{feedback-yRUUEnh1.js → feedback-CjPZ6XG6.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-CwQnx04J.js → firstPartyEventLogger-BhnzpDvM.js} +1 -1
- package/dist/chunks/{flushGate-Cnu0XWZq.js → flushGate-DXNH3Kdv.js} +4 -4
- package/dist/chunks/{fork-DKBVRVoC.js → fork-BaPceB3e.js} +1 -1
- package/dist/chunks/{gates-B1TP-1Es.js → gates-C-vwVa28.js} +1 -1
- package/dist/chunks/{gates-BnP1g_C1.js → gates-IG3SMiJH.js} +1 -1
- package/dist/chunks/{gemini-gd5zF6ur.js → gemini-DhVYdZiU.js} +8 -4
- package/dist/chunks/{generateSessionName-CgdERugL.js → generateSessionName-Dkhp8XB1.js} +3 -3
- package/dist/chunks/{git-CNGxJWbO.js → git-CA2F_723.js} +1 -1
- package/dist/chunks/{git-C6A5_aj0.js → git-D6rV6e6k.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-CFhGM7BE.js → githubRepoPathMapping-ChKSQqbF.js} +3 -3
- package/dist/chunks/{grok-EEylnADw.js → grok-DOw0Sbbi.js} +3 -3
- package/dist/chunks/{growthbook-Cw4Y2QPB.js → growthbook-BfRKowxD.js} +1 -1
- package/dist/chunks/{heapdump-ZjxA8TVw.js → heapdump-1oXkoqG0.js} +1 -1
- package/dist/chunks/{help-Bg9HWO7X.js → help-FC4rBAOe.js} +4 -4
- package/dist/chunks/{history-Dms91gEo.js → history-vud-Tm1o.js} +1 -1
- package/dist/chunks/{hooks-Jzn_6AeT.js → hooks-CrQKfCtq.js} +1 -1
- package/dist/chunks/{hooks-efxBp0f6.js → hooks-DPHSNK1V.js} +3 -3
- package/dist/chunks/{hostAdapter-B1hL62bZ.js → hostAdapter-DPm9q7eY.js} +3 -3
- package/dist/chunks/{ide-C5G1YPb2.js → ide-BqbYV35E.js} +2 -2
- package/dist/chunks/{inboundAttachments-BdOA0JRd.js → inboundAttachments-Cix-MkyO.js} +1 -1
- package/dist/chunks/{initReplBridge-BTh721kj.js → initReplBridge-WFZ6FLKZ.js} +21 -21
- package/dist/chunks/{insights-BaaWzukN.js → insights-MTWxutKC.js} +4 -4
- package/dist/chunks/{install-SqDdk3nD.js → install-BpIf0I-C.js} +2 -2
- package/dist/chunks/{install-github-app-DHHZaht6.js → install-github-app-ya0ML_OU.js} +6 -6
- package/dist/chunks/{install-slack-app-D1mPa4xQ.js → install-slack-app-B73R4yYZ.js} +2 -2
- package/dist/chunks/{instrumentation-5gSZyv8m.js → instrumentation-QxF37Y_l.js} +2 -2
- package/dist/chunks/{job-B61D89pG.js → job-CKY_6V9-.js} +1 -1
- package/dist/chunks/{jwtUtils-30wAGF8Q.js → jwtUtils-DgPQR3cZ.js} +1 -1
- package/dist/chunks/{keybindings-CPxAP8pQ.js → keybindings-C825fSdd.js} +2 -2
- package/dist/chunks/{lang-DfnPt7tG.js → lang-DpvO99gB.js} +2 -2
- package/dist/chunks/{language-BosRrUd0.js → language-DBYPh52x.js} +1 -1
- package/dist/chunks/{loadAgentsDir-CAjOBquQ.js → loadAgentsDir-B9lyQRpj.js} +1 -1
- package/dist/chunks/{loadAgentsDir-10Jr53dd.js → loadAgentsDir-CvgrZXrt.js} +31134 -30555
- package/dist/chunks/loadPluginHooks-DutuJ2NQ.js +3 -0
- package/dist/chunks/{localSearch-DybTIV4S.js → localSearch-B_cbJHwn.js} +1 -1
- package/dist/chunks/{localSearch-Ct0GV4eu.js → localSearch-CCk02wY1.js} +1 -1
- package/dist/chunks/{login-DqsUqLSu.js → login-DDXcrvYz.js} +5 -5
- package/dist/chunks/{login-D5rJFtpT.js → login-mq_rHkSb.js} +1 -1
- package/dist/chunks/{logoV2Utils-DFhKFArj.js → logoV2Utils-B3oG3CZK.js} +4 -4
- package/dist/chunks/logout-OYc9gG4L.js +3 -0
- package/dist/chunks/{magicDocs-BqUJN2sD.js → magicDocs-C7FNx0HT.js} +2 -2
- package/dist/chunks/{main-SnCfbERT.js → main-1IxSEB11.js} +7 -7
- package/dist/chunks/{main-DWwEO60a.js → main-D3JOOK50.js} +122 -121
- package/dist/chunks/{mappers-U7tTZScx.js → mappers-DWwiJ_QI.js} +1 -1
- package/dist/chunks/{mcp-CfPBpOSp.js → mcp-C-KNcQnS.js} +7 -7
- package/dist/chunks/{mcp-DkzIVmdw.js → mcp-CawQh56x.js} +5 -5
- package/dist/chunks/{mcp-D4TjixE1.js → mcp-fK-hqo81.js} +3 -3
- package/dist/chunks/{mcpServer-BqsaX8wD.js → mcpServer-C-fsDbTU.js} +7 -7
- package/dist/chunks/{mcpServer-Bba-h7Zb.js → mcpServer-jsNTpebf.js} +6 -6
- package/dist/chunks/{memory-BRHVCjBv.js → memory-B3wLoXfj.js} +7 -7
- package/dist/chunks/{mobile-6l94_EZJ.js → mobile-DC30stZP.js} +2 -2
- package/dist/chunks/{model-DcJ76zNR.js → model-CxVnd5NI.js} +1 -1
- package/dist/chunks/{model-QQftNJyK.js → model-Mu511mJU.js} +3 -3
- package/dist/chunks/ndjsonFramer-CKtNKe0_.js +62 -0
- package/dist/chunks/{onChangeAppState-BJPve83J.js → onChangeAppState-Bv2I9Y1M.js} +3 -3
- package/dist/chunks/{openai-cb_n_2SO.js → openai-BHW9g9bp.js} +5 -4
- package/dist/chunks/{overageCreditGrant-Cd7Kh4Si.js → overageCreditGrant-BgRjewSt.js} +2 -2
- package/dist/chunks/{passes-CKhKan5j.js → passes-B1NnA5rg.js} +3 -3
- package/dist/chunks/{paths-BK4d8glq.js → paths-IfmY9nZN.js} +2 -2
- package/dist/chunks/{peers-CClNqvhW.js → peers-kb_8nELx.js} +4 -4
- package/dist/chunks/{permissions-ChevK5wn.js → permissions-CrsUd33c.js} +7 -7
- package/dist/chunks/{pipe-status-Cyyyyf1V.js → pipe-status-DlzRk4F8.js} +2 -2
- package/dist/chunks/{pipeRegistry-XwIMOBmZ.js → pipeRegistry-Bqvffg4X.js} +1 -1
- package/dist/chunks/{pipeTransport-SV4Qb4Bv.js → pipeTransport-AYEUDuAI.js} +1 -1
- package/dist/chunks/{pipes-BDie1chf.js → pipes-tMCTxKU7.js} +2 -2
- package/dist/chunks/{plan-DN-pUg4H.js → plan-DKAXA0IF.js} +2 -2
- package/dist/chunks/{plugin-B1ihdsXn.js → plugin-BYq4vQ76.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-CLe037yS.js → pluginAutoupdate-r1Z5x9LZ.js} +4 -4
- package/dist/chunks/{pluginBlocklist-CaALV_qJ.js → pluginBlocklist-BIg-Dqf5.js} +3 -3
- package/dist/chunks/{pluginCliCommands-BKSAc-SD.js → pluginCliCommands-ixpU7TAg.js} +3 -3
- package/dist/chunks/{pluginFlagging-Qx0XN68s.js → pluginFlagging-Dbz2LlEF.js} +1 -1
- package/dist/chunks/{pluginOperations-nAr-ADbk.js → pluginOperations-DMcmmnxS.js} +4 -4
- package/dist/chunks/{pluginStartupCheck-G6q5hHba.js → pluginStartupCheck-0VVk3sco.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-ClSa0mbL.js → pluginStartupCheck-eFORNf6i.js} +3 -3
- package/dist/chunks/{plugins-o_ndXrks.js → plugins-DkBY0_5o.js} +8 -8
- package/dist/chunks/{policyLimits-DJxhibdS.js → policyLimits-BoBObN5o.js} +1 -1
- package/dist/chunks/{pollConfig-Dy66V4Tx.js → pollConfig-D3SnHH-e.js} +1 -1
- package/dist/chunks/{poor-DEU0Q6vt.js → poor-DPZkYnP7.js} +1 -1
- package/dist/chunks/{poorMode-BjeIn7h8.js → poorMode-C_jhP6BN.js} +1 -1
- package/dist/chunks/{poorMode-3Tfx0Eih.js → poorMode-dzSDd3md.js} +1 -1
- package/dist/chunks/{print-BBaizmfY.js → print-oGpLNAFC.js} +47 -35
- package/dist/chunks/{privacy-settings-DvCkDfoN.js → privacy-settings-DNbCImXr.js} +2 -2
- package/dist/chunks/{processBashCommand-DDYVcoJp.js → processBashCommand-DlKRfetV.js} +3 -3
- package/dist/chunks/{processSlashCommand-BRZCVZJE.js → processSlashCommand-PmfiR9Iq.js} +5 -5
- package/dist/chunks/{prompt-D3t3BlB1.js → prompt-CLMaHdFq.js} +1 -1
- package/dist/chunks/{prompt-BPA8RpJE.js → prompt-V93UX3PY.js} +1 -1
- package/dist/chunks/{promptEditor-XZ7Mjhfh.js → promptEditor-CQQUb59w.js} +1 -1
- package/dist/chunks/{protocolHandler-DY2pjeKY.js → protocolHandler-MZuib775.js} +5 -5
- package/dist/chunks/{rate-limit-options-e9S-3CvD.js → rate-limit-options-F8KkEOgD.js} +4 -4
- package/dist/chunks/{referral-BdqSeN9K.js → referral-mwZflLAs.js} +3 -3
- package/dist/chunks/{refresh-unjg1rEA.js → refresh-tp6qQdCN.js} +1 -1
- package/dist/chunks/{registerProtocol-CT9K_9v4.js → registerProtocol-BAKRNIVA.js} +1 -1
- package/dist/chunks/{registry-NgB7utLu.js → registry-CL-eOa0O.js} +1 -1
- package/dist/chunks/{release-notes-R60E_tSm.js → release-notes-BurqRyEG.js} +1 -1
- package/dist/chunks/{releaseNotes-CuqRcioX.js → releaseNotes-UlWCgws_.js} +2 -2
- package/dist/chunks/{reload-plugins-Dv15fA4x.js → reload-plugins-BIsfYtqy.js} +4 -4
- package/dist/chunks/{remote-env-Cng7HDx5.js → remote-env-B24OAHCR.js} +3 -3
- package/dist/chunks/{remoteBridgeCore-C3q2g8AW.js → remoteBridgeCore-S6aPETMZ.js} +10 -10
- package/dist/chunks/{remoteControlServer-RWxkrqXr.js → remoteControlServer-mBPULt3y.js} +7 -7
- package/dist/chunks/{rename-sXPxWMe1.js → rename-CQXBbYJP.js} +4 -4
- package/dist/chunks/{resume-BAkMQExn.js → resume-4d0rTOCt.js} +2 -2
- package/dist/chunks/{runtimeObserver-Bxd4eqR5.js → runtimeObserver-Phgn2oZk.js} +1 -1
- package/dist/chunks/{runtimeObserver-BDaq_Wiy.js → runtimeObserver-b8hdjoHA.js} +5 -5
- package/dist/chunks/{sandbox-adapter-CHoBnmOt.js → sandbox-adapter-eiRpc-0e.js} +1 -1
- package/dist/chunks/{sandbox-toggle-Dy3XFjOu.js → sandbox-toggle-C-83L2xt.js} +3 -3
- package/dist/chunks/{send-HfPz8BJd.js → send-CojAqbPx.js} +2 -2
- package/dist/chunks/{session-CC7uRhj3.js → session-Dl82DVpX.js} +3 -3
- package/dist/chunks/{sessionActivity-BCJdW1JI.js → sessionActivity-CCwMeswC.js} +2 -2
- package/dist/chunks/{sessionDiscovery-CKGX3BOM.js → sessionDiscovery-vDCHj5to.js} +1 -1
- package/dist/chunks/{sessionFileAccessHooks-Z0XuH_BP.js → sessionFileAccessHooks-Bnh4wmBV.js} +1 -1
- package/dist/chunks/{sessionMemory-CFzgHK_g.js → sessionMemory-DvU0D-b2.js} +4 -4
- package/dist/chunks/{sessionMemoryUtils-Dbl0_h-B.js → sessionMemoryUtils-Bzvp1DLL.js} +1 -1
- package/dist/chunks/{sessionObserver-B1MRLKOu.js → sessionObserver-BKgP-a7c.js} +1 -1
- package/dist/chunks/{sessionObserver-DJtZ6_gD.js → sessionObserver-D04vPxN9.js} +3 -3
- package/dist/chunks/{sessionStorage-YqWAOjzB.js → sessionStorage-CIiV4xV8.js} +1 -1
- package/dist/chunks/{sessionTitle-D3XTQk1-.js → sessionTitle-Ciz6FCV4.js} +2 -2
- package/dist/chunks/{sessionTracing-Crlao0si.js → sessionTracing-BI3kcrbS.js} +1 -1
- package/dist/chunks/{settingsSync-BaEoZ-e0.js → settingsSync-F8m9e31u.js} +3 -3
- package/dist/chunks/{setup-ekA5ahRV.js → setup-BAYZDtvi.js} +14 -14
- package/dist/chunks/{setup-wnHwFcjv.js → setup-CrZrxm15.js} +3 -3
- package/dist/chunks/{setup-Cvq5K2VZ.js → setup-gXjPR1G4.js} +3 -3
- package/dist/chunks/{shadowedRuleDetection-qQbytMBF.js → shadowedRuleDetection-QI_Q_FqO.js} +1 -1
- package/dist/chunks/{sideQuestion-D7IDA3bH.js → sideQuestion-Cbldoblh.js} +2 -2
- package/dist/chunks/{sink-U8We9Lo1.js → sink-BSnk-1jh.js} +2 -2
- package/dist/chunks/{sink-BpX7sIm0.js → sink-zXlDlZTL.js} +1 -1
- package/dist/chunks/{sinks-D6CB26ze.js → sinks-Ty4Awq8t.js} +2 -2
- package/dist/chunks/{skill-learning-Bd2_jB0d.js → skill-learning-BP2T4NSM.js} +5 -5
- package/dist/chunks/{skillChangeDetector-D706MfSt.js → skillChangeDetector-BtJ6EktM.js} +4 -4
- package/dist/chunks/{skillGapStore-CfLP4d18.js → skillGapStore-CI3xXuYQ.js} +2 -2
- package/dist/chunks/{skillGapStore-BmG9MXP5.js → skillGapStore-EmR3IzDP.js} +1 -1
- package/dist/chunks/{skillGenerator-7rzzVY0r.js → skillGenerator-BS3H1PLp.js} +2 -2
- package/dist/chunks/{skillLearning-CYvDGpPV.js → skillLearning-QpFsMAXM.js} +6 -6
- package/dist/chunks/{skillPanel-D7zD08t9.js → skillPanel-Bd1hINf2.js} +5 -5
- package/dist/chunks/{skillSearchPanel-CGzAZ_KJ.js → skillSearchPanel-CORQYShN.js} +2 -2
- package/dist/chunks/{skills-DBO8XEqo.js → skills-C3i2yjeo.js} +2 -2
- package/dist/chunks/{sprites-B7JBIeY0.js → sprites-BO5hfS_u.js} +1 -1
- package/dist/chunks/{src-CtCFd0MR.js → src-Dx8ucMgB.js} +2 -2
- package/dist/chunks/{stats-BnGHCyC1.js → stats-BddR70ub.js} +4 -4
- package/dist/chunks/{stats-CI8kIDlO.js → stats-Dz9Wq-UY.js} +1 -1
- package/dist/chunks/{status-BrqdaxwN.js → status-DH6khFo8.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-DXoMENiV.js → statusNoticeHelpers-L5pDl7oQ.js} +1 -1
- package/dist/chunks/{stdio-DSAGcx5a.js → stdio-CWDcxFu0.js} +1 -1
- package/dist/chunks/{stickers-4CoCA5-k.js → stickers-4SNqAchz.js} +1 -1
- package/dist/chunks/{subprocessEnv-DRbeBjA6.js → subprocessEnv-D794ce8l.js} +1 -1
- package/dist/chunks/{tag-BetsxWPW.js → tag-_oG3bbIF.js} +1 -1
- package/dist/chunks/{tasks-DoHG6R-5.js → tasks-T-3OMg0_.js} +1 -1
- package/dist/chunks/{teamDiscovery-BC4_0bNS.js → teamDiscovery-BSsVZxl2.js} +1 -1
- package/dist/chunks/{teamHelpers-DdjACRyM.js → teamHelpers-C-BgllbM.js} +1 -1
- package/dist/chunks/{teamHelpers-CL_8bQPD.js → teamHelpers-DjjkwnQV.js} +2 -2
- package/dist/chunks/{teammateModeSnapshot-CYn-gTwM.js → teammateModeSnapshot-DAJpWKyJ.js} +1 -1
- package/dist/chunks/{teammateModeSnapshot-DOk0CK84.js → teammateModeSnapshot-lsPbOfKt.js} +1 -1
- package/dist/chunks/teleport-BDaO4vY6.js +3 -0
- package/dist/chunks/{templateJobs-CSMylXAl.js → templateJobs-B90vt2q3.js} +1 -1
- package/dist/chunks/{terminalSetup-B-jYDl8t.js → terminalSetup-9uGbm1X-.js} +2 -2
- package/dist/chunks/{terminalSetup-CzdHxsB5.js → terminalSetup-mouIRU-h.js} +1 -1
- package/dist/chunks/{theme-DDxD5k8-.js → theme-DS-Knutq.js} +1 -1
- package/dist/chunks/{thinkback-DuSfMEdh.js → thinkback-DP2JyeaD.js} +4 -4
- package/dist/chunks/{thinkback-play-DbFRK9fu.js → thinkback-play-MZ1fU2z5.js} +2 -2
- package/dist/chunks/{tmux-88rrvVpT.js → tmux-b0jmod-m.js} +1 -1
- package/dist/chunks/{toolEventObserver-uz1v8E9s.js → toolEventObserver-B4IuqRSS.js} +2 -2
- package/dist/chunks/{toolEventObserver-KnTpchg9.js → toolEventObserver-I-HCtbCe.js} +1 -1
- package/dist/chunks/{toolPool-DWNU_ZHS.js → toolPool-Co_2gHkY.js} +2 -2
- package/dist/chunks/{toolSearch-CWlFMZ5x.js → toolSearch-CxIsGIwz.js} +1 -1
- package/dist/chunks/{trustedDevice-BnVPCNtF.js → trustedDevice-CA2GwAwP.js} +1 -1
- package/dist/chunks/{trustedDevice-B9dnp7UL.js → trustedDevice-DZ4S9Xre.js} +1 -1
- package/dist/chunks/{udsClient-DPWuCt9x.js → udsClient-DVQqcTO1.js} +65 -13
- package/dist/chunks/udsClient-DXKBwc3t.js +3 -0
- package/dist/chunks/udsMessaging-CqD2Z113.js +598 -0
- package/dist/chunks/udsMessaging-DYuyH0-1.js +3 -0
- package/dist/chunks/{ultrareviewCommand-H9CSucZi.js → ultrareviewCommand-B3DtQHhh.js} +6 -6
- package/dist/chunks/{undercover-BqQEFYM_.js → undercover-DKEeZbP1.js} +2 -2
- package/dist/chunks/{undercover-Dh4Dbbbr.js → undercover-_Km4wVxO.js} +1 -1
- package/dist/chunks/{up-DgUz-Iid.js → up-C0eEOvrs.js} +1 -1
- package/dist/chunks/{updateCCB-C6lRZp5E.js → updateCCB-DVbDv6RL.js} +1 -1
- package/dist/chunks/{upgrade-169SEycC.js → upgrade-B2OGKi2F.js} +3 -3
- package/dist/chunks/{upload-DnQLvFF5.js → upload-CCRCHU9P.js} +1 -1
- package/dist/chunks/{usage-DYsvUNrB.js → usage-Bexx6J1a.js} +1 -1
- package/dist/chunks/{usage-Bq4VatK_.js → usage-DY9nhq5T.js} +1 -1
- package/dist/chunks/{useMainLoopModel-BDEDBcUs.js → useMainLoopModel-B_bqLyg0.js} +2 -2
- package/dist/chunks/{useManagePlugins-D6hNVtqv.js → useManagePlugins-CbpvLT1I.js} +4 -4
- package/dist/chunks/{useMasterMonitor-BlkAVzAR.js → useMasterMonitor-CDsWCPJw.js} +2 -2
- package/dist/chunks/{useMergedTools-B4ByRtos.js → useMergedTools-Dz0UIcF6.js} +2 -2
- package/dist/chunks/{useSearchInput-Cp8oVZSL.js → useSearchInput-D34JQbH-.js} +1 -1
- package/dist/chunks/{useSettingsErrors-DA9mtSoD.js → useSettingsErrors-B0BFK2dO.js} +2 -2
- package/dist/chunks/{useVoice-CiaG1pa9.js → useVoice-DUbDn60B.js} +4 -4
- package/dist/chunks/{util-BvMWW5dX.js → util-Cyrw74bF.js} +10 -10
- package/dist/chunks/{utils-DTbygW3H.js → utils-BIw-JB3l.js} +1 -1
- package/dist/chunks/{validatePlugin-D5bYap2j.js → validatePlugin-CO-DUS3f.js} +2 -2
- package/dist/chunks/{vim-Kdj1ZBrE.js → vim-tf1GZ3oL.js} +1 -1
- package/dist/chunks/{voice-DacAli8W.js → voice-uTAcC1-0.js} +5 -5
- package/dist/chunks/{voiceModeEnabled-A51xDqO9.js → voiceModeEnabled-BYwEJ3jm.js} +1 -1
- package/dist/chunks/{voiceModeEnabled-B0MNOjWV.js → voiceModeEnabled-DE6mj1m0.js} +1 -1
- package/dist/chunks/{voiceStreamSTT-DIUBqgvI.js → voiceStreamSTT-5XmaUsSo.js} +1 -1
- package/dist/chunks/{voiceStreamSTT-CXiCd5TX.js → voiceStreamSTT-BwFmVseT.js} +1 -1
- package/dist/chunks/{workerRegistry-WRHNT-vp.js → workerRegistry-C6DoSX44.js} +2 -2
- package/dist/chunks/{worktree-D5ooLN1g.js → worktree-B_DaYV6T.js} +1 -1
- package/dist/chunks/{xml-_E14RGww.js → xml-1y89Qafo.js} +1 -1
- package/dist/cli.js +30 -30
- package/package.json +1 -1
- package/dist/chunks/ConsoleOAuthFlow-__Bht0Rl.js +0 -3
- package/dist/chunks/auth-DtzPs5dg.js +0 -3
- package/dist/chunks/loadPluginHooks-DCVfM2KU.js +0 -3
- package/dist/chunks/logout-SUSB7E5o.js +0 -3
- package/dist/chunks/ndjsonFramer-CyriTbGZ.js +0 -27
- package/dist/chunks/teleport-D0v4rOF6.js +0 -3
- package/dist/chunks/udsClient-dfOpC3BY.js +0 -3
- package/dist/chunks/udsMessaging-0beFKlGY.js +0 -178
- package/dist/chunks/udsMessaging-BSPpH_V9.js +0 -3
- /package/dist/chunks/{Dialog-eTwnuTV6.js → Dialog-XEoAY-lo.js} +0 -0
- /package/dist/chunks/{ListItem-D7JJPgOQ.js → ListItem-BLRpONzN.js} +0 -0
- /package/dist/chunks/{WelcomeV2-CQJED0ff.js → WelcomeV2-BrLgacxm.js} +0 -0
- /package/dist/chunks/{bridgePointer-DVI4BG2c.js → bridgePointer-D_ikNrjn.js} +0 -0
- /package/dist/chunks/{browser-DUiMTsmF.js → browser-JbnSg475.js} +0 -0
- /package/dist/chunks/{capacityWake-CKrytIuS.js → capacityWake-D0JN23wy.js} +0 -0
- /package/dist/chunks/{cliLaunch-BEj4sK86.js → cliLaunch-CzauAJZe.js} +0 -0
- /package/dist/chunks/{common-D_Lzg07P.js → common-DL26eBsR.js} +0 -0
- /package/dist/chunks/{completionCache-CowUmRUD.js → completionCache-B6qfGLtC.js} +0 -0
- /package/dist/chunks/{computerUseLock-Cbybd8n_.js → computerUseLock-fzTsJC9V.js} +0 -0
- /package/dist/chunks/{controlMessageCompat-D5XDq4ml.js → controlMessageCompat-DWv-mIPh.js} +0 -0
- /package/dist/chunks/{debugUtils-CECBUMmn.js → debugUtils-CIJkCH7t.js} +0 -0
- /package/dist/chunks/{escHotkey-Cn1CrmBz.js → escHotkey-GP2RHYMe.js} +0 -0
- /package/dist/chunks/{exit-CZzpqNPw.js → exit-Bc29hy_j.js} +0 -0
- /package/dist/chunks/{featureCheck-vRp5XaAp.js → featureCheck-JUrjwkqY.js} +0 -0
- /package/dist/chunks/{lib-C0Q5Y6kG.js → lib-LxJ6DoZY.js} +0 -0
- /package/dist/chunks/{prompt-BQ9g8IWl.js → prompt-BnKv9_mj.js} +0 -0
- /package/dist/chunks/{semver-T0QpYeiZ.js → semver-BygjACLN.js} +0 -0
- /package/dist/chunks/{sentry-BsXV-B72.js → sentry-B3BXMLsG.js} +0 -0
- /package/dist/chunks/{slashCommandParsing-DZgibipB.js → slashCommandParsing-rs-ERr7C.js} +0 -0
- /package/dist/chunks/{src-Diw72n1A.js → src-2yhJaeQZ.js} +0 -0
- /package/dist/chunks/{src-DZivc_Ym.js → src-CUx0XajG.js} +0 -0
- /package/dist/chunks/{src-D56ieAkT.js → src-C__qTDYF.js} +0 -0
- /package/dist/chunks/{src-CC2_wD5_.js → src-D54OFZO5.js} +0 -0
- /package/dist/chunks/{state-C-ld-klb.js → state-BVnzrPu7.js} +0 -0
- /package/dist/chunks/{stdio-cYV0RCwe.js → stdio-CeCU5wUQ.js} +0 -0
- /package/dist/chunks/{subprocessEnv-Ms9m811a.js → subprocessEnv-EX_V1EV4.js} +0 -0
- /package/dist/chunks/{systemTheme-COUe0KXR.js → systemTheme-Dp21I3Xt.js} +0 -0
- /package/dist/chunks/{useKeybinding-rHTP8lBO.js → useKeybinding-BnzwmphY.js} +0 -0
- /package/dist/chunks/{workSecret-DczTawTC.js → workSecret-CMZkIeol.js} +0 -0
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
import { n as __esmMin, r as __exportAll } from "./chunk-CyLJMB0t.js";
|
|
2
|
+
import { n as getClaudeConfigHomeDir, s as init_envUtils } from "./envUtils-DVwWVCmJ.js";
|
|
3
|
+
import { E as jsonStringify, J as init_cleanupRegistry, L as errorMessage, T as jsonParse, V as init_errors, Y as registerCleanup, d as logForDebugging, s as init_debug, w as init_slowOperations } from "./debug-CWVskDes.js";
|
|
4
|
+
import { o as init_log, s as logError } from "./log-BtGcZqeW.js";
|
|
5
|
+
import { n as init_ndjsonFramer, t as attachNdjsonFramer } from "./ndjsonFramer-CKtNKe0_.js";
|
|
6
|
+
import { tmpdir } from "os";
|
|
7
|
+
import { dirname, join } from "path";
|
|
8
|
+
import { createHash, randomBytes, timingSafeEqual } from "crypto";
|
|
9
|
+
import { chmod, lstat, mkdir, open, readFile, rename, unlink } from "fs/promises";
|
|
10
|
+
import { createServer } from "net";
|
|
11
|
+
import { StringDecoder } from "node:string_decoder";
|
|
12
|
+
//#region src/utils/udsResponseReader.ts
|
|
13
|
+
function getChunkBytes(chunk) {
|
|
14
|
+
return typeof chunk === "string" ? Buffer.byteLength(chunk, "utf8") : chunk.byteLength;
|
|
15
|
+
}
|
|
16
|
+
function parseResponseLine(line) {
|
|
17
|
+
try {
|
|
18
|
+
return jsonParse(line);
|
|
19
|
+
} catch {
|
|
20
|
+
throw new Error("Invalid UDS response frame");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function attachUdsResponseReader(socket, options) {
|
|
24
|
+
let buffer = "";
|
|
25
|
+
let bufferBytes = 0;
|
|
26
|
+
let settled = false;
|
|
27
|
+
const decoder = new StringDecoder("utf8");
|
|
28
|
+
function cleanupListeners() {
|
|
29
|
+
socket.off("data", onData);
|
|
30
|
+
socket.off("error", onError);
|
|
31
|
+
socket.off("end", onEnd);
|
|
32
|
+
socket.off("close", onClose);
|
|
33
|
+
}
|
|
34
|
+
function finish(error) {
|
|
35
|
+
if (settled) return;
|
|
36
|
+
settled = true;
|
|
37
|
+
buffer = "";
|
|
38
|
+
bufferBytes = 0;
|
|
39
|
+
cleanupListeners();
|
|
40
|
+
if (error) socket.destroy();
|
|
41
|
+
else socket.end();
|
|
42
|
+
options.onSettled(error);
|
|
43
|
+
}
|
|
44
|
+
function onData(chunk) {
|
|
45
|
+
const decoded = decoder.write(chunk);
|
|
46
|
+
const decodedBytes = Buffer.byteLength(decoded, "utf8");
|
|
47
|
+
if (bufferBytes + decodedBytes > options.maxFrameBytes) {
|
|
48
|
+
finish(/* @__PURE__ */ new Error("UDS response frame exceeded size limit"));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
buffer += decoded;
|
|
52
|
+
bufferBytes += decodedBytes;
|
|
53
|
+
let newlineIndex = buffer.indexOf("\n");
|
|
54
|
+
while (newlineIndex !== -1) {
|
|
55
|
+
const line = buffer.slice(0, newlineIndex);
|
|
56
|
+
const consumed = buffer.slice(0, newlineIndex + 1);
|
|
57
|
+
buffer = buffer.slice(newlineIndex + 1);
|
|
58
|
+
bufferBytes -= Buffer.byteLength(consumed, "utf8");
|
|
59
|
+
if (!line.trim()) {
|
|
60
|
+
newlineIndex = buffer.indexOf("\n");
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
let response;
|
|
64
|
+
try {
|
|
65
|
+
response = parseResponseLine(line);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
finish(error instanceof Error ? error : new Error(errorMessage(error)));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (response.type === "response" || options.acceptPong === true && response.type === "pong") {
|
|
71
|
+
finish();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (response.type === "error") {
|
|
75
|
+
finish(new Error(response.data ?? "UDS receiver rejected message"));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
newlineIndex = buffer.indexOf("\n");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function onError(error) {
|
|
82
|
+
finish(options.formatSocketError?.(error) ?? (error instanceof Error ? error : new Error(errorMessage(error))));
|
|
83
|
+
}
|
|
84
|
+
function onEnd() {
|
|
85
|
+
finish(/* @__PURE__ */ new Error("UDS socket ended before response"));
|
|
86
|
+
}
|
|
87
|
+
function onClose(hadError) {
|
|
88
|
+
if (hadError) return;
|
|
89
|
+
finish(/* @__PURE__ */ new Error("UDS socket closed before response"));
|
|
90
|
+
}
|
|
91
|
+
socket.on("data", onData);
|
|
92
|
+
socket.on("error", onError);
|
|
93
|
+
socket.on("end", onEnd);
|
|
94
|
+
socket.on("close", onClose);
|
|
95
|
+
}
|
|
96
|
+
var init_udsResponseReader = __esmMin((() => {
|
|
97
|
+
init_errors();
|
|
98
|
+
init_slowOperations();
|
|
99
|
+
}));
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/utils/udsMessaging.ts
|
|
102
|
+
/**
|
|
103
|
+
* UDS Messaging Layer — Unix Domain Socket IPC for Claude Code instances.
|
|
104
|
+
*
|
|
105
|
+
* Each session auto-creates a UDS server so peer sessions can send messages.
|
|
106
|
+
* Protocol: newline-delimited JSON (NDJSON), one message per line.
|
|
107
|
+
*
|
|
108
|
+
* Socket path defaults to a tmpdir-based path derived from the session PID,
|
|
109
|
+
* but can be overridden via --messaging-socket-path.
|
|
110
|
+
*/
|
|
111
|
+
var udsMessaging_exports = /* @__PURE__ */ __exportAll({
|
|
112
|
+
MAX_UDS_CLIENTS: () => 128,
|
|
113
|
+
MAX_UDS_FRAME_BYTES: () => MAX_UDS_FRAME_BYTES,
|
|
114
|
+
MAX_UDS_INBOX_BYTES: () => MAX_UDS_INBOX_BYTES,
|
|
115
|
+
MAX_UDS_INBOX_ENTRIES: () => MAX_UDS_INBOX_ENTRIES,
|
|
116
|
+
UDS_AUTH_TIMEOUT_MS: () => UDS_AUTH_TIMEOUT_MS,
|
|
117
|
+
UDS_IDLE_TIMEOUT_MS: () => UDS_IDLE_TIMEOUT_MS,
|
|
118
|
+
drainInbox: () => drainInbox,
|
|
119
|
+
formatUdsAddress: () => formatUdsAddress,
|
|
120
|
+
getDefaultUdsSocketPath: () => getDefaultUdsSocketPath,
|
|
121
|
+
getUdsMessagingSocketPath: () => getUdsMessagingSocketPath,
|
|
122
|
+
parseUdsTarget: () => parseUdsTarget,
|
|
123
|
+
readUdsCapabilityToken: () => readUdsCapabilityToken,
|
|
124
|
+
sendUdsMessage: () => sendUdsMessage,
|
|
125
|
+
setOnEnqueue: () => setOnEnqueue,
|
|
126
|
+
startUdsMessaging: () => startUdsMessaging,
|
|
127
|
+
stopUdsMessaging: () => stopUdsMessaging
|
|
128
|
+
});
|
|
129
|
+
/**
|
|
130
|
+
* Default socket path based on PID, placed in a tmpdir subdirectory so it
|
|
131
|
+
* survives across config-home changes and avoids polluting ~/.claude.
|
|
132
|
+
*
|
|
133
|
+
* On Windows, Node.js requires named pipe paths in the `\\.\pipe\` namespace;
|
|
134
|
+
* file-system paths like `C:\...\Temp\x.sock` cause EACCES. Bun handles both
|
|
135
|
+
* transparently, but we use the pipe format on Windows for Node.js compat.
|
|
136
|
+
*/
|
|
137
|
+
function getDefaultUdsSocketPath() {
|
|
138
|
+
if (defaultSocketPath) return defaultSocketPath;
|
|
139
|
+
const nonce = randomBytes(16).toString("hex");
|
|
140
|
+
if (process.platform === "win32") {
|
|
141
|
+
defaultSocketPath = `\\\\.\\pipe\\claude-code-${process.pid}-${nonce}`;
|
|
142
|
+
return defaultSocketPath;
|
|
143
|
+
}
|
|
144
|
+
defaultSocketPath = join(tmpdir(), "claude-code-socks", `${process.pid}-${nonce}`, "messaging.sock");
|
|
145
|
+
return defaultSocketPath;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns the socket path of the currently running server, or undefined
|
|
149
|
+
* if the server has not been started.
|
|
150
|
+
*/
|
|
151
|
+
function getUdsMessagingSocketPath() {
|
|
152
|
+
return socketPath ?? void 0;
|
|
153
|
+
}
|
|
154
|
+
function formatUdsAddress(socket) {
|
|
155
|
+
return `uds:${socket}`;
|
|
156
|
+
}
|
|
157
|
+
function parseUdsTarget(target) {
|
|
158
|
+
if (target.includes("#token=")) throw new Error("UDS target must not include an inline auth token; use the ListPeers address");
|
|
159
|
+
return { socketPath: target };
|
|
160
|
+
}
|
|
161
|
+
function getCapabilityDir() {
|
|
162
|
+
return join(getClaudeConfigHomeDir(), "messaging-capabilities");
|
|
163
|
+
}
|
|
164
|
+
function getCapabilityPath(socket) {
|
|
165
|
+
const digest = createHash("sha256").update(socket).digest("hex");
|
|
166
|
+
return join(getCapabilityDir(), `${digest}.json`);
|
|
167
|
+
}
|
|
168
|
+
function isNotFound(error) {
|
|
169
|
+
return typeof error === "object" && error !== null && error.code === "ENOENT";
|
|
170
|
+
}
|
|
171
|
+
async function assertPrivateCapabilityDir(dir) {
|
|
172
|
+
let stat;
|
|
173
|
+
try {
|
|
174
|
+
stat = await lstat(dir);
|
|
175
|
+
} catch (error) {
|
|
176
|
+
if (!isNotFound(error)) throw error;
|
|
177
|
+
await mkdir(dir, {
|
|
178
|
+
recursive: true,
|
|
179
|
+
mode: 448
|
|
180
|
+
});
|
|
181
|
+
stat = await lstat(dir);
|
|
182
|
+
}
|
|
183
|
+
assertPrivateDirectory(stat, dir, "capability directory");
|
|
184
|
+
await chmod(dir, 448);
|
|
185
|
+
}
|
|
186
|
+
function assertPrivateDirectory(stat, dir, label) {
|
|
187
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) throw new Error(`[udsMessaging] ${label} is not a private directory: ${dir}`);
|
|
188
|
+
if (process.platform !== "win32") {
|
|
189
|
+
if ((Number(stat.mode) & 63) !== 0) throw new Error(`[udsMessaging] ${label} permissions are too broad: ${dir}`);
|
|
190
|
+
if (typeof process.getuid === "function" && Number(stat.uid) !== process.getuid()) throw new Error(`[udsMessaging] ${label} owner does not match current user: ${dir}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
async function writePrivateFileExclusive(path, content) {
|
|
194
|
+
const handle = await open(path, "wx", 384);
|
|
195
|
+
try {
|
|
196
|
+
await handle.writeFile(content, "utf-8");
|
|
197
|
+
} finally {
|
|
198
|
+
await handle.close();
|
|
199
|
+
}
|
|
200
|
+
await chmod(path, 384);
|
|
201
|
+
}
|
|
202
|
+
async function ensureSocketParent(path) {
|
|
203
|
+
const dir = dirname(path);
|
|
204
|
+
try {
|
|
205
|
+
const stat = await lstat(dir);
|
|
206
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) throw new Error(`[udsMessaging] socket parent is not a directory: ${dir}`);
|
|
207
|
+
assertPrivateDirectory(stat, dir, "socket parent");
|
|
208
|
+
return;
|
|
209
|
+
} catch (error) {
|
|
210
|
+
if (!isNotFound(error)) throw error;
|
|
211
|
+
}
|
|
212
|
+
await mkdir(dir, {
|
|
213
|
+
recursive: true,
|
|
214
|
+
mode: 448
|
|
215
|
+
});
|
|
216
|
+
await chmod(dir, 448);
|
|
217
|
+
}
|
|
218
|
+
async function writeCapabilityFile(socket, token) {
|
|
219
|
+
await assertPrivateCapabilityDir(getCapabilityDir());
|
|
220
|
+
const target = getCapabilityPath(socket);
|
|
221
|
+
const temp = `${target}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
222
|
+
try {
|
|
223
|
+
await writePrivateFileExclusive(temp, jsonStringify({
|
|
224
|
+
socketPath: socket,
|
|
225
|
+
authToken: token
|
|
226
|
+
}));
|
|
227
|
+
await rename(temp, target);
|
|
228
|
+
} catch (error) {
|
|
229
|
+
try {
|
|
230
|
+
await unlink(temp);
|
|
231
|
+
} catch {}
|
|
232
|
+
throw error;
|
|
233
|
+
}
|
|
234
|
+
capabilityFilePath = target;
|
|
235
|
+
}
|
|
236
|
+
async function readUdsCapabilityToken(socket) {
|
|
237
|
+
try {
|
|
238
|
+
const parsed = jsonParse(await readFile(getCapabilityPath(socket), "utf-8"));
|
|
239
|
+
if (parsed.socketPath === socket && typeof parsed.authToken === "string") return parsed.authToken;
|
|
240
|
+
} catch {}
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Register a callback invoked whenever a message is enqueued into the inbox.
|
|
244
|
+
* Used by the print/SDK query loop to kick off processing.
|
|
245
|
+
*/
|
|
246
|
+
function setOnEnqueue(cb) {
|
|
247
|
+
onEnqueueCb = cb;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Drain all pending inbox messages and release retained history.
|
|
251
|
+
*/
|
|
252
|
+
function drainInbox() {
|
|
253
|
+
const pending = inbox.splice(0, inbox.length);
|
|
254
|
+
inboxBytes = 0;
|
|
255
|
+
for (const entry of pending) entry.status = "processed";
|
|
256
|
+
return pending;
|
|
257
|
+
}
|
|
258
|
+
function getMessageBytes(message) {
|
|
259
|
+
return Buffer.byteLength(jsonStringify(message), "utf8");
|
|
260
|
+
}
|
|
261
|
+
function enqueueInboxEntry(entry) {
|
|
262
|
+
const entryBytes = getMessageBytes(entry.message);
|
|
263
|
+
if (entryBytes > 65536 || inbox.length >= 1e3 || inboxBytes + entryBytes > 2097152) {
|
|
264
|
+
logError(/* @__PURE__ */ new Error(`[udsMessaging] inbox full (${inbox.length}/${MAX_UDS_INBOX_ENTRIES}, ${inboxBytes}/${MAX_UDS_INBOX_BYTES} bytes); dropping message type=${entry.message.type}`));
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
inbox.push(entry);
|
|
268
|
+
inboxBytes += entryBytes;
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
function ensureAuthToken() {
|
|
272
|
+
if (!authToken) authToken = randomBytes(32).toString("hex");
|
|
273
|
+
return authToken;
|
|
274
|
+
}
|
|
275
|
+
function getMessageAuthToken(message) {
|
|
276
|
+
const token = message.meta?.authToken;
|
|
277
|
+
return typeof token === "string" ? token : void 0;
|
|
278
|
+
}
|
|
279
|
+
function isAuthorizedMessage(message) {
|
|
280
|
+
const provided = getMessageAuthToken(message);
|
|
281
|
+
if (!provided || !authToken) return false;
|
|
282
|
+
const providedBuffer = Buffer.from(provided, "utf8");
|
|
283
|
+
const expectedBuffer = Buffer.from(authToken, "utf8");
|
|
284
|
+
if (providedBuffer.length !== expectedBuffer.length) return false;
|
|
285
|
+
return timingSafeEqual(providedBuffer, expectedBuffer);
|
|
286
|
+
}
|
|
287
|
+
function writeSocketMessage(socket, message) {
|
|
288
|
+
if (socket.destroyed) return;
|
|
289
|
+
socket.write(jsonStringify(message) + "\n");
|
|
290
|
+
}
|
|
291
|
+
function writeSocketMessageAndDestroy(socket, message) {
|
|
292
|
+
if (socket.destroyed) return;
|
|
293
|
+
socket.write(jsonStringify(message) + "\n", () => {
|
|
294
|
+
if (!socket.destroyed) socket.destroy();
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
function writeSocketErrorAndDestroy(socket, data) {
|
|
298
|
+
writeSocketMessageAndDestroy(socket, {
|
|
299
|
+
type: "error",
|
|
300
|
+
data,
|
|
301
|
+
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
function unrefTimer(timer) {
|
|
305
|
+
const maybeUnref = timer.unref;
|
|
306
|
+
if (typeof maybeUnref === "function") maybeUnref.call(timer);
|
|
307
|
+
}
|
|
308
|
+
async function closeServer(serverToClose) {
|
|
309
|
+
await new Promise((resolve) => {
|
|
310
|
+
serverToClose.close(() => resolve());
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
async function removeSocketPath(path) {
|
|
314
|
+
if (process.platform === "win32") return;
|
|
315
|
+
try {
|
|
316
|
+
await unlink(path);
|
|
317
|
+
} catch {}
|
|
318
|
+
}
|
|
319
|
+
function stripAuthToken(message) {
|
|
320
|
+
const { authToken: _authToken, ...metaWithoutAuth } = message.meta ?? {};
|
|
321
|
+
return {
|
|
322
|
+
...message,
|
|
323
|
+
meta: Object.keys(metaWithoutAuth).length > 0 ? metaWithoutAuth : void 0
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function withRequestAuthToken(message, token) {
|
|
327
|
+
return {
|
|
328
|
+
...message,
|
|
329
|
+
meta: {
|
|
330
|
+
...message.meta,
|
|
331
|
+
authToken: token
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Start the UDS messaging server on the given socket path.
|
|
337
|
+
*
|
|
338
|
+
* Exports `CLAUDE_CODE_MESSAGING_SOCKET` into `process.env` so child
|
|
339
|
+
* processes (hooks, spawned agents) can discover and connect back.
|
|
340
|
+
*/
|
|
341
|
+
async function startUdsMessaging(path, opts) {
|
|
342
|
+
if (server) {
|
|
343
|
+
logForDebugging("[udsMessaging] server already running, skipping start");
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
if (process.platform !== "win32") await ensureSocketParent(path);
|
|
347
|
+
if (process.platform !== "win32") try {
|
|
348
|
+
await unlink(path);
|
|
349
|
+
} catch {}
|
|
350
|
+
const token = ensureAuthToken();
|
|
351
|
+
let startedServer = null;
|
|
352
|
+
let exportedSocketEnv = false;
|
|
353
|
+
try {
|
|
354
|
+
await new Promise((resolve, reject) => {
|
|
355
|
+
const srv = createServer((socket) => {
|
|
356
|
+
if (clients.size >= 128) {
|
|
357
|
+
logForDebugging(`[udsMessaging] rejected client: ${clients.size}/128 clients already connected`);
|
|
358
|
+
socket.destroy();
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
clients.add(socket);
|
|
362
|
+
logForDebugging(`[udsMessaging] client connected (total: ${clients.size})`);
|
|
363
|
+
let authenticated = false;
|
|
364
|
+
let closing = false;
|
|
365
|
+
const closeWithError = (data) => {
|
|
366
|
+
if (closing || socket.destroyed) return;
|
|
367
|
+
closing = true;
|
|
368
|
+
socket.pause();
|
|
369
|
+
writeSocketErrorAndDestroy(socket, data);
|
|
370
|
+
};
|
|
371
|
+
const authTimer = setTimeout(() => {
|
|
372
|
+
if (authenticated || socket.destroyed) return;
|
|
373
|
+
logForDebugging("[udsMessaging] closing unauthenticated idle client");
|
|
374
|
+
closeWithError("authentication timeout");
|
|
375
|
+
}, UDS_AUTH_TIMEOUT_MS);
|
|
376
|
+
unrefTimer(authTimer);
|
|
377
|
+
socket.setTimeout(UDS_IDLE_TIMEOUT_MS, () => {
|
|
378
|
+
logForDebugging("[udsMessaging] closing idle client");
|
|
379
|
+
closeWithError("idle timeout");
|
|
380
|
+
});
|
|
381
|
+
attachNdjsonFramer(socket, (msg) => {
|
|
382
|
+
if (!isAuthorizedMessage(msg)) {
|
|
383
|
+
logForDebugging(`[udsMessaging] rejected unauthenticated message type=${msg.type}`);
|
|
384
|
+
closeWithError("unauthorized");
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
if (!authenticated) {
|
|
388
|
+
authenticated = true;
|
|
389
|
+
clearTimeout(authTimer);
|
|
390
|
+
}
|
|
391
|
+
if (msg.type === "ping") {
|
|
392
|
+
writeSocketMessage(socket, {
|
|
393
|
+
type: "pong",
|
|
394
|
+
from: socketPath ?? void 0,
|
|
395
|
+
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
396
|
+
});
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
const sanitizedMessage = stripAuthToken(msg);
|
|
400
|
+
const entry = {
|
|
401
|
+
id: `uds-${nextId++}`,
|
|
402
|
+
message: sanitizedMessage,
|
|
403
|
+
receivedAt: Date.now(),
|
|
404
|
+
status: "pending"
|
|
405
|
+
};
|
|
406
|
+
if (!enqueueInboxEntry(entry)) {
|
|
407
|
+
closeWithError("inbox full");
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
logForDebugging(`[udsMessaging] enqueued message type=${msg.type} from=${msg.from ?? "unknown"}`);
|
|
411
|
+
writeSocketMessage(socket, {
|
|
412
|
+
type: "response",
|
|
413
|
+
data: "ok",
|
|
414
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
415
|
+
meta: { id: entry.id }
|
|
416
|
+
});
|
|
417
|
+
onEnqueueCb?.();
|
|
418
|
+
}, (text) => jsonParse(text), {
|
|
419
|
+
maxFrameBytes: MAX_UDS_FRAME_BYTES,
|
|
420
|
+
onFrameError: (error) => {
|
|
421
|
+
logForDebugging(`[udsMessaging] ${error.message}`);
|
|
422
|
+
closeWithError(error.message);
|
|
423
|
+
},
|
|
424
|
+
onInvalidFrame: (error) => {
|
|
425
|
+
logForDebugging(`[udsMessaging] invalid client frame: ${errorMessage(error)}`);
|
|
426
|
+
closeWithError("invalid frame");
|
|
427
|
+
},
|
|
428
|
+
destroyOnFrameError: false
|
|
429
|
+
});
|
|
430
|
+
socket.on("close", () => {
|
|
431
|
+
clearTimeout(authTimer);
|
|
432
|
+
clients.delete(socket);
|
|
433
|
+
});
|
|
434
|
+
socket.on("error", (err) => {
|
|
435
|
+
clearTimeout(authTimer);
|
|
436
|
+
clients.delete(socket);
|
|
437
|
+
logForDebugging(`[udsMessaging] client error: ${errorMessage(err)}`);
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
const rejectBeforeListen = (error) => {
|
|
441
|
+
reject(error);
|
|
442
|
+
};
|
|
443
|
+
const logRuntimeError = (error) => {
|
|
444
|
+
logForDebugging(`[udsMessaging] server error on ${path}${opts?.isExplicit ? " (explicit)" : ""}: ${errorMessage(error)}`);
|
|
445
|
+
};
|
|
446
|
+
srv.once("error", rejectBeforeListen);
|
|
447
|
+
srv.listen(path, () => {
|
|
448
|
+
(async () => {
|
|
449
|
+
try {
|
|
450
|
+
if (process.platform !== "win32") await chmod(path, 384);
|
|
451
|
+
srv.off("error", rejectBeforeListen);
|
|
452
|
+
srv.on("error", logRuntimeError);
|
|
453
|
+
server = srv;
|
|
454
|
+
startedServer = srv;
|
|
455
|
+
resolve();
|
|
456
|
+
} catch (error) {
|
|
457
|
+
srv.off("error", rejectBeforeListen);
|
|
458
|
+
const closeError = error instanceof Error ? error : new Error(errorMessage(error));
|
|
459
|
+
let rejected = false;
|
|
460
|
+
const rejectOnce = () => {
|
|
461
|
+
if (rejected) return;
|
|
462
|
+
rejected = true;
|
|
463
|
+
reject(closeError);
|
|
464
|
+
};
|
|
465
|
+
const fallback = setTimeout(rejectOnce, 1e3);
|
|
466
|
+
unrefTimer(fallback);
|
|
467
|
+
srv.close(() => {
|
|
468
|
+
clearTimeout(fallback);
|
|
469
|
+
rejectOnce();
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
})();
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
await writeCapabilityFile(path, token);
|
|
476
|
+
socketPath = path;
|
|
477
|
+
process.env.CLAUDE_CODE_MESSAGING_SOCKET = path;
|
|
478
|
+
exportedSocketEnv = true;
|
|
479
|
+
logForDebugging(`[udsMessaging] server listening on ${path}${opts?.isExplicit ? " (explicit)" : ""}`);
|
|
480
|
+
} catch (error) {
|
|
481
|
+
if (capabilityFilePath) {
|
|
482
|
+
try {
|
|
483
|
+
await unlink(capabilityFilePath);
|
|
484
|
+
} catch {}
|
|
485
|
+
capabilityFilePath = null;
|
|
486
|
+
}
|
|
487
|
+
if (startedServer) await closeServer(startedServer);
|
|
488
|
+
if (server === startedServer) server = null;
|
|
489
|
+
await removeSocketPath(path);
|
|
490
|
+
if (exportedSocketEnv) delete process.env.CLAUDE_CODE_MESSAGING_SOCKET;
|
|
491
|
+
socketPath = null;
|
|
492
|
+
defaultSocketPath = null;
|
|
493
|
+
authToken = null;
|
|
494
|
+
throw error;
|
|
495
|
+
}
|
|
496
|
+
registerCleanup(async () => {
|
|
497
|
+
await stopUdsMessaging();
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Stop the UDS messaging server and clean up the socket file.
|
|
502
|
+
*/
|
|
503
|
+
async function stopUdsMessaging() {
|
|
504
|
+
defaultSocketPath = null;
|
|
505
|
+
if (!server) return;
|
|
506
|
+
for (const socket of clients) socket.destroy();
|
|
507
|
+
clients.clear();
|
|
508
|
+
await new Promise((resolve) => {
|
|
509
|
+
server.close(() => resolve());
|
|
510
|
+
});
|
|
511
|
+
server = null;
|
|
512
|
+
inbox.length = 0;
|
|
513
|
+
inboxBytes = 0;
|
|
514
|
+
onEnqueueCb = null;
|
|
515
|
+
if (socketPath) {
|
|
516
|
+
await removeSocketPath(socketPath);
|
|
517
|
+
delete process.env.CLAUDE_CODE_MESSAGING_SOCKET;
|
|
518
|
+
logForDebugging(`[udsMessaging] server stopped, socket removed: ${socketPath}`);
|
|
519
|
+
socketPath = null;
|
|
520
|
+
authToken = null;
|
|
521
|
+
}
|
|
522
|
+
if (capabilityFilePath) {
|
|
523
|
+
try {
|
|
524
|
+
await unlink(capabilityFilePath);
|
|
525
|
+
} catch {}
|
|
526
|
+
capabilityFilePath = null;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Send a UDS message to a specific socket path (outbound — used when this
|
|
531
|
+
* session wants to push a message to a peer's server).
|
|
532
|
+
*/
|
|
533
|
+
async function sendUdsMessage(targetSocketPath, message, opts = {}) {
|
|
534
|
+
const { createConnection } = await import("net");
|
|
535
|
+
const token = opts.authToken ?? authToken;
|
|
536
|
+
if (!token) throw new Error("Cannot send UDS message without auth token");
|
|
537
|
+
const outbound = withRequestAuthToken({
|
|
538
|
+
...message,
|
|
539
|
+
from: message.from ?? socketPath ?? void 0,
|
|
540
|
+
ts: message.ts ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
541
|
+
}, token);
|
|
542
|
+
return new Promise((resolve, reject) => {
|
|
543
|
+
let settled = false;
|
|
544
|
+
let conn;
|
|
545
|
+
const finish = (error) => {
|
|
546
|
+
if (settled) return;
|
|
547
|
+
settled = true;
|
|
548
|
+
if (error) {
|
|
549
|
+
conn.destroy(error);
|
|
550
|
+
reject(error);
|
|
551
|
+
} else {
|
|
552
|
+
conn.end();
|
|
553
|
+
resolve();
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
conn = createConnection(targetSocketPath, () => {
|
|
557
|
+
conn.write(jsonStringify(outbound) + "\n", (err) => {
|
|
558
|
+
if (err) finish(err);
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
attachUdsResponseReader(conn, {
|
|
562
|
+
maxFrameBytes: MAX_UDS_FRAME_BYTES,
|
|
563
|
+
acceptPong: true,
|
|
564
|
+
onSettled: finish
|
|
565
|
+
});
|
|
566
|
+
conn.setTimeout(5e3, () => {
|
|
567
|
+
finish(/* @__PURE__ */ new Error("Connection timed out"));
|
|
568
|
+
});
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
var server, socketPath, onEnqueueCb, clients, inbox, nextId, defaultSocketPath, authToken, capabilityFilePath, inboxBytes, MAX_UDS_INBOX_ENTRIES, MAX_UDS_FRAME_BYTES, MAX_UDS_INBOX_BYTES, UDS_AUTH_TIMEOUT_MS, UDS_IDLE_TIMEOUT_MS;
|
|
572
|
+
var init_udsMessaging = __esmMin((() => {
|
|
573
|
+
init_cleanupRegistry();
|
|
574
|
+
init_debug();
|
|
575
|
+
init_errors();
|
|
576
|
+
init_envUtils();
|
|
577
|
+
init_ndjsonFramer();
|
|
578
|
+
init_udsResponseReader();
|
|
579
|
+
init_log();
|
|
580
|
+
init_slowOperations();
|
|
581
|
+
server = null;
|
|
582
|
+
socketPath = null;
|
|
583
|
+
onEnqueueCb = null;
|
|
584
|
+
clients = /* @__PURE__ */ new Set();
|
|
585
|
+
inbox = [];
|
|
586
|
+
nextId = 1;
|
|
587
|
+
defaultSocketPath = null;
|
|
588
|
+
authToken = null;
|
|
589
|
+
capabilityFilePath = null;
|
|
590
|
+
inboxBytes = 0;
|
|
591
|
+
MAX_UDS_INBOX_ENTRIES = 1e3;
|
|
592
|
+
MAX_UDS_FRAME_BYTES = 64 * 1024;
|
|
593
|
+
MAX_UDS_INBOX_BYTES = 2 * 1024 * 1024;
|
|
594
|
+
UDS_AUTH_TIMEOUT_MS = 2e3;
|
|
595
|
+
UDS_IDLE_TIMEOUT_MS = 3e4;
|
|
596
|
+
}));
|
|
597
|
+
//#endregion
|
|
598
|
+
export { udsMessaging_exports as _, UDS_IDLE_TIMEOUT_MS as a, init_udsResponseReader as b, getDefaultUdsSocketPath as c, parseUdsTarget as d, readUdsCapabilityToken as f, stopUdsMessaging as g, startUdsMessaging as h, UDS_AUTH_TIMEOUT_MS as i, getUdsMessagingSocketPath as l, setOnEnqueue as m, MAX_UDS_INBOX_BYTES as n, drainInbox as o, sendUdsMessage as p, MAX_UDS_INBOX_ENTRIES as r, formatUdsAddress as s, MAX_UDS_FRAME_BYTES as t, init_udsMessaging as u, attachUdsResponseReader as v, getChunkBytes as y };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { c as getDefaultUdsSocketPath, d as parseUdsTarget, f as readUdsCapabilityToken, h as startUdsMessaging, l as getUdsMessagingSocketPath, u as init_udsMessaging } from "./udsMessaging-CqD2Z113.js";
|
|
2
|
+
init_udsMessaging();
|
|
3
|
+
export { getDefaultUdsSocketPath, getUdsMessagingSocketPath, parseUdsTarget, readUdsCapabilityToken, startUdsMessaging };
|
|
@@ -2,16 +2,16 @@ import { n as __esmMin, o as __toESM } from "./chunk-CyLJMB0t.js";
|
|
|
2
2
|
import { n as axios, t as init_axios } from "./axios-i4OSNWFR.js";
|
|
3
3
|
import { b as ThemedText, f as Dialog, t as init_src, x as ThemedBox } from "./src-D-Y8UkL2.js";
|
|
4
4
|
import { n as require_react, t as require_jsx_runtime } from "./jsx-runtime-U0-f0qxU.js";
|
|
5
|
-
import { S as init_growthbook, _ as getFeatureValue_CACHED_MAY_BE_STALE, dn as isClaudeAISubscriber, mn as isEnterpriseSubscriber, on as init_auth, xn as isTeamSubscriber } from "./paths-
|
|
5
|
+
import { S as init_growthbook, _ as getFeatureValue_CACHED_MAY_BE_STALE, dn as isClaudeAISubscriber, mn as isEnterpriseSubscriber, on as init_auth, xn as isTeamSubscriber } from "./paths-IfmY9nZN.js";
|
|
6
6
|
import { d as logForDebugging, s as init_debug } from "./debug-CWVskDes.js";
|
|
7
7
|
import { n as init_analytics, r as logEvent } from "./analytics-BUe7uXWv.js";
|
|
8
|
-
import { _ as gitExe, a as getDefaultBranch, v as init_git } from "./git-
|
|
8
|
+
import { _ as gitExe, a as getDefaultBranch, v as init_git } from "./git-CA2F_723.js";
|
|
9
9
|
import { l as getOauthConfig, u as init_oauth } from "./oauth-DiKu2bJI.js";
|
|
10
10
|
import { r as init_execFileNoThrow, t as execFileNoThrow } from "./execFileNoThrow-DslIaQ3v.js";
|
|
11
|
-
import {
|
|
12
|
-
import { a as init_detectRepository, r as detectCurrentRepositoryWithHost } from "./detectRepository-
|
|
13
|
-
import { a as getOAuthHeaders, c as prepareApiRequest, o as init_api } from "./api-
|
|
14
|
-
import { n as init_usage, t as fetchUtilization } from "./usage-
|
|
11
|
+
import { F_ as formatPreconditionError, H_ as init_teleport, I_ as getRemoteTaskSessionUrl, L_ as init_RemoteAgentTask, Nx as Select, P_ as checkRemoteAgentEligibility, Px as init_select, R_ as registerRemoteAgentTask, q_ as teleportToRemote } from "./loadAgentsDir-CvgrZXrt.js";
|
|
12
|
+
import { a as init_detectRepository, r as detectCurrentRepositoryWithHost } from "./detectRepository-DePiwWvI.js";
|
|
13
|
+
import { a as getOAuthHeaders, c as prepareApiRequest, o as init_api } from "./api-B8xNSO2s.js";
|
|
14
|
+
import { n as init_usage, t as fetchUtilization } from "./usage-DY9nhq5T.js";
|
|
15
15
|
//#region src/services/api/ultrareviewQuota.ts
|
|
16
16
|
/**
|
|
17
17
|
* Peek the ultrareview quota for display and nudge decisions. Consume
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __esmMin } from "./chunk-CyLJMB0t.js";
|
|
2
2
|
import { s as init_envUtils, u as isEnvTruthy } from "./envUtils-DVwWVCmJ.js";
|
|
3
|
-
import { Dc as init_config, yc as getGlobalConfig } from "./paths-
|
|
4
|
-
import { l as init_commitAttribution, s as getRepoClassCached } from "./commitAttribution-
|
|
3
|
+
import { Dc as init_config, yc as getGlobalConfig } from "./paths-IfmY9nZN.js";
|
|
4
|
+
import { l as init_commitAttribution, s as getRepoClassCached } from "./commitAttribution-D2pnNyaZ.js";
|
|
5
5
|
//#region src/utils/undercover.ts
|
|
6
6
|
function isUndercover() {
|
|
7
7
|
if (process.env.USER_TYPE === "ant") {
|
|
@@ -2,7 +2,7 @@ import { Fn as chalk, In as init_source } from "./src-D-Y8UkL2.js";
|
|
|
2
2
|
import { d as logForDebugging, s as init_debug } from "./debug-CWVskDes.js";
|
|
3
3
|
import { o as writeToStdout, t as init_process } from "./process-LOMmIsyv.js";
|
|
4
4
|
import { n as execFileNoThrowWithCwd, r as init_execFileNoThrow } from "./execFileNoThrow-DslIaQ3v.js";
|
|
5
|
-
import {
|
|
5
|
+
import { YT as init_gracefulShutdown, qT as gracefulShutdown } from "./loadAgentsDir-CvgrZXrt.js";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
import { execSync } from "node:child_process";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __esmMin } from "./chunk-CyLJMB0t.js";
|
|
2
2
|
import { n as require_react, t as require_jsx_runtime } from "./jsx-runtime-U0-f0qxU.js";
|
|
3
|
-
import { Jt as getClaudeAIOAuthTokens, dn as isClaudeAISubscriber, ga as init_getOauthProfile, ha as getOauthProfileFromOauthToken, on as init_auth } from "./paths-
|
|
3
|
+
import { Jt as getClaudeAIOAuthTokens, dn as isClaudeAISubscriber, ga as init_getOauthProfile, ha as getOauthProfileFromOauthToken, on as init_auth } from "./paths-IfmY9nZN.js";
|
|
4
4
|
import { o as init_log, s as logError } from "./log-BtGcZqeW.js";
|
|
5
|
-
import { n as openBrowser, t as init_browser } from "./browser-
|
|
6
|
-
import { r as init_login, t as Login } from "./login-
|
|
5
|
+
import { n as openBrowser, t as init_browser } from "./browser-JbnSg475.js";
|
|
6
|
+
import { r as init_login, t as Login } from "./login-DDXcrvYz.js";
|
|
7
7
|
//#region src/commands/upgrade/upgrade.tsx
|
|
8
8
|
async function call(onDone, context) {
|
|
9
9
|
try {
|
|
@@ -5,7 +5,7 @@ import { t as init_v4 } from "./v4-pqEJ8Dq2.js";
|
|
|
5
5
|
import { E as jsonStringify, d as logForDebugging, s as init_debug, w as init_slowOperations } from "./debug-CWVskDes.js";
|
|
6
6
|
import { l as getOauthConfig, u as init_oauth } from "./oauth-DiKu2bJI.js";
|
|
7
7
|
import { n as lazySchema, t as init_lazySchema } from "./lazySchema-DCmLE9e3.js";
|
|
8
|
-
import { a as init_bridgeConfig, r as getBridgeBaseUrlOverride, t as getBridgeAccessToken } from "./bridgeConfig-
|
|
8
|
+
import { a as init_bridgeConfig, r as getBridgeBaseUrlOverride, t as getBridgeAccessToken } from "./bridgeConfig-B2rD8AEm.js";
|
|
9
9
|
import { basename, extname } from "path";
|
|
10
10
|
import { randomUUID } from "crypto";
|
|
11
11
|
import { readFile } from "fs/promises";
|