claude-code-best 2.8.0 → 2.8.2
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 +3 -0
- package/dist/chunks/{AddWorkspaceDirectory-DRO4tbYd.js → AddWorkspaceDirectory-BCCbaWoh.js} +1 -1
- package/dist/chunks/{App-DJyiiVKi.js → App-BIAYUFvT.js} +1 -1
- package/dist/chunks/{ApproveApiKey-DygOEAkM.js → ApproveApiKey-DRARgWX3.js} +1 -1
- package/dist/chunks/ApproveApiKey-Do-Qth0X.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-C67mOxVi.js → AssistantSessionChooser-eUrEGDlX.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-Bqk_Cn3j.js → BackgroundTasksDialog-DSeAqhMC.js} +2 -2
- package/dist/chunks/{BypassPermissionsModeDialog-C4z7RkFV.js → BypassPermissionsModeDialog-8z7R5EpU.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-CyVFdjBe.js → ClaudeInChromeOnboarding-B7mDm5Hb.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-IpqqBuJs.js → ClaudeMdExternalIncludesDialog-DE9dpWtg.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +1 -0
- package/dist/chunks/{DesktopHandoff-CJpa8Xy-.js → DesktopHandoff-Ce0nE7D6.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-CfAuHVRL.js → DevChannelsDialog-mt0lA5wR.js} +1 -1
- package/dist/chunks/Dialog-91X6ZGg9.js +1 -0
- package/dist/chunks/{DiffDialog-CV3brWsG.js → DiffDialog-BfSnz8L-.js} +2 -2
- package/dist/chunks/{Doctor-D3GysagF.js → Doctor-BOVjkAKn.js} +1 -1
- package/dist/chunks/Doctor-osWC5WVY.js +1 -0
- package/dist/chunks/{ExitFlow-L2sh80sm.js → ExitFlow-C3BGvwv-.js} +1 -1
- package/dist/chunks/{Feedback-DfkBCvva.js → Feedback-BtZb1A8b.js} +1 -1
- package/dist/chunks/Grove-DyC_Wrfx.js +1 -0
- package/dist/chunks/{Grove-Bo74aZx-.js → Grove-HpMLktXp.js} +1 -1
- package/dist/chunks/{HybridTransport-BItIDJyC.js → HybridTransport-COk7jAC7.js} +1 -1
- package/dist/chunks/{ITermBackend-3iS8Bvmo.js → ITermBackend-BlwyeN8U.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-6lPGcuOX.js → InvalidConfigDialog-QVIRDXwA.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-D8DwHiys.js → InvalidSettingsDialog-CZRZm0oa.js} +1 -1
- package/dist/chunks/ListItem-DCQhApdJ.js +1 -0
- package/dist/chunks/{MCPConnectionManager-CsPizxTx.js → MCPConnectionManager-2Fulnp8q.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-Cepe7RPZ.js → McpParsingWarnings-DWMO0bV6.js} +1 -1
- package/dist/chunks/{MessageSelector-BzUQUeDn.js → MessageSelector-B4jJQ-KQ.js} +2 -2
- package/dist/chunks/Messages-ltcn1Qkf.js +11 -0
- package/dist/chunks/{Onboarding-BZUXID6q.js → Onboarding-CHcND5Tt.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-Dhm7HBuD.js → OverageCreditUpsell-CMBqZrnz.js} +1 -1
- package/dist/chunks/{PermissionDialog-BrRBxx5o.js → PermissionDialog-R-Vl4Tk-.js} +1 -1
- package/dist/chunks/{PluginSettings-BZ-PX9Tg.js → PluginSettings-DIS_qrVA.js} +1 -1
- package/dist/chunks/{PressEnterToContinue-DtA_p3X6.js → PressEnterToContinue-BYdiZwYD.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-Da8Fty6P.js → PromptInputFooterSuggestions-DAFZfAT0.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-Bz7EPzzq.js → PromptInputHelpMenu-CAwbW7z2.js} +1 -1
- package/dist/chunks/{QueryEngine-CmJK27jU.js → QueryEngine-BQs519Rb.js} +1 -1
- package/dist/chunks/REPL-DJh_wVWI.js +1 -0
- package/dist/chunks/{REPL-DxEJZpIp.js → REPL-Dx3SPe95.js} +13 -13
- package/dist/chunks/{RemoteCallout-DONJj8l2.js → RemoteCallout-CwI1mLQ9.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-BvvNspY8.js → RemoteSessionManager-BXMBhfQD.js} +1 -1
- package/dist/chunks/{ResumeConversation-EpjJdFHu.js → ResumeConversation-BK7L_YBI.js} +1 -1
- package/dist/chunks/{SSETransport-D51Jfdaj.js → SSETransport-Co-0nMlR.js} +1 -1
- package/dist/chunks/SearchBox-Bu4gYF0J.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +1 -0
- package/dist/chunks/SentryErrorBoundary-DLML64E_.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-nYTimi4l.js → SentryErrorBoundary-kEgE7qeH.js} +1 -1
- package/dist/chunks/{Settings-C2vEJjLx.js → Settings-DOve7mW1.js} +2 -2
- package/dist/chunks/{TeleportProgress--jgrqIfW.js → TeleportProgress--n-u7MYY.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-BKDaFT_L.js → TeleportRepoMismatchDialog-CzQzdYb2.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-CxlpiHIz.js → TeleportResumeWrapper-CtANoO1Z.js} +1 -1
- package/dist/chunks/{ThemePicker-CYL4C-F-.js → ThemePicker-kBt6obJb.js} +1 -1
- package/dist/chunks/{TmuxBackend-C_N4ww8i.js → TmuxBackend-Q5xdOkW4.js} +1 -1
- package/dist/chunks/{TrustDialog-CYdftZ1M.js → TrustDialog-CoCFqyRD.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-CaTwOP3f.js → ValidationErrorsList-CL42YlaS.js} +1 -1
- package/dist/chunks/{WelcomeV2-5rgKm4Mz.js → WelcomeV2-B0d9sH1c.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-BzoSs0VA.js → WindowsTerminalBackend-CLSeqqHh.js} +1 -1
- package/dist/chunks/{add-dir-RNzFR3XZ.js → add-dir-IrADCHV-.js} +1 -1
- package/dist/chunks/{agentDisplay-DgeOQY1E.js → agentDisplay-BUXpQhYh.js} +1 -1
- package/dist/chunks/{agents-iMtFurok.js → agents-BqQtaTaM.js} +1 -1
- package/dist/chunks/{agents-D7cgzb3f.js → agents-Cx0f6suK.js} +1 -1
- package/dist/chunks/{ant-CF1iRpXD.js → ant-BUkS8Em4.js} +1 -1
- package/dist/chunks/api-CoBZPEi-.js +1 -0
- package/dist/chunks/{api-DMbWqJlK.js → api-Cy1N7XAQ.js} +1 -1
- package/dist/chunks/{artifacts-D2kY_AMp.js → artifacts-DH8c2yG0.js} +1 -1
- package/dist/chunks/assistant-B2_c5C4T.js +1 -0
- package/dist/chunks/{assistant-CZ4VXgzH.js → assistant-BGzd9a5x.js} +1 -1
- package/dist/chunks/{assistant-JAqAZqaE.js → assistant-C3dP-BSJ.js} +1 -1
- package/dist/chunks/auth-CRVuUNwf.js +1 -0
- package/dist/chunks/{auth-BemPA3ot.js → auth-DVtMm7Hj.js} +1 -1
- package/dist/chunks/{autoMode-CGovMAzJ.js → autoMode-ThlM20qr.js} +1 -1
- package/dist/chunks/{autonomy-BVXyNEj0.js → autonomy-B637YdCF.js} +1 -1
- package/dist/chunks/{autonomy-BnAHLZWH.js → autonomy-B_vxYZbV.js} +1 -1
- package/dist/chunks/{autonomyPanel-COMI2iR0.js → autonomyPanel-BM2VhTsn.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-BRtG20l2.js → backgroundHousekeeping-Cll7XHG1.js} +2 -2
- package/dist/chunks/{banner-D_rqe2XQ.js → banner-DUL-7A0b.js} +1 -1
- package/dist/chunks/{branch-BnKwIQtC.js → branch-BlH5WYNu.js} +1 -1
- package/dist/chunks/{break-cache-CDzQDHwY.js → break-cache-DjCRzxDv.js} +1 -1
- package/dist/chunks/{bridge-ChVjEHVq.js → bridge-QRFJRzVG.js} +2 -2
- package/dist/chunks/{bridgeConfig-e0MGfed6.js → bridgeConfig-Di9LziJ3.js} +1 -1
- package/dist/chunks/bridgeConfig-pVTHa_ED.js +1 -0
- package/dist/chunks/bridgeEnabled-c_BeJX3S.js +1 -0
- package/dist/chunks/{bridgeEnabled-DR-v8AXw.js → bridgeEnabled-z1fPRzzV.js} +1 -1
- package/dist/chunks/bridgeMain-CHk_DCxy.js +1 -0
- package/dist/chunks/{bridgeMain-OsR-_PRp.js → bridgeMain-DVoobI7G.js} +11 -11
- package/dist/chunks/{bridgeMessaging-BvBnxgD4.js → bridgeMessaging-BG8fNZac.js} +1 -1
- package/dist/chunks/{btw-_b16RGoh.js → btw-DpeWZQbf.js} +1 -1
- package/dist/chunks/{buddy-DJ3QSQyd.js → buddy-Bni2g0Km.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-OhGSWZrB.js → bypassPermissionsKillswitch-7e56Rquc.js} +1 -1
- package/dist/chunks/caches-3byHT6VF.js +1 -0
- package/dist/chunks/{caches-Bp4F7tZ5.js → caches-CzEBsMvP.js} +2 -2
- package/dist/chunks/{ccrClient-D7pEGzQa.js → ccrClient-iR6zwGb1.js} +1 -1
- package/dist/chunks/changeDetector-Cg75mKOu.js +1 -0
- package/dist/chunks/channelNotification-BSmZprUZ.js +1 -0
- package/dist/chunks/{channelNotification-BZFMAWln.js → channelNotification-CSmLgwtO.js} +1 -1
- package/dist/chunks/{chrome-B5IxDA16.js → chrome-BO1vbvZ0.js} +1 -1
- package/dist/chunks/clear-CTOCrXv_.js +1 -0
- package/dist/chunks/client-BgdjJNnC.js +1 -0
- package/dist/chunks/{color-BYVWpzI8.js → color-BP4FmcMn.js} +1 -1
- package/dist/chunks/commands-CkfOhzGE.js +1 -0
- package/dist/chunks/commitAttribution-DKvggTZx.js +1 -0
- package/dist/chunks/{commitAttribution-ClSlXMPG.js → commitAttribution-Djh1ZpYH.js} +1 -1
- package/dist/chunks/{compact-B9c12JXf.js → compact-BtAvCkY0.js} +1 -1
- package/dist/chunks/{companion-C8e7dVlu.js → companion-C-jfFhlz.js} +1 -1
- package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
- package/dist/chunks/{completionCache-Br6OwASx.js → completionCache-C7hDqIDL.js} +1 -1
- package/dist/chunks/{config-Bxgfx_nO.js → config-CloXpblh.js} +1 -1
- package/dist/chunks/{config-C-yz-f4W.js → config-DwsIX0hc.js} +1 -1
- package/dist/chunks/{context-Bf5t6C-a.js → context-DdwMoH4j.js} +1 -1
- package/dist/chunks/{context-noninteractive-CJu7hZCM.js → context-noninteractive-BWbEqad6.js} +13 -13
- package/dist/chunks/context-noninteractive-DNOyQYnM.js +1 -0
- package/dist/chunks/{conversation-BYMS5Hqa.js → conversation-DR4MFYYi.js} +1 -1
- package/dist/chunks/conversation-DVhyJA1O.js +1 -0
- package/dist/chunks/{copy-C0BZ7Gm0.js → copy-tl-41wwU.js} +1 -1
- package/dist/chunks/{createSSHSession-DNXCWneI.js → createSSHSession-B_IyqOll.js} +1 -1
- package/dist/chunks/createSession-CIM50iEU.js +1 -0
- package/dist/chunks/{createSession-DjM6Ev45.js → createSession-Csaqw8kb.js} +1 -1
- package/dist/chunks/{cronJitterConfig-CaFkPXKB.js → cronJitterConfig-2sHTXBLu.js} +1 -1
- package/dist/chunks/crossProjectResume-C1I0X__e.js +40 -0
- package/dist/chunks/{datadog-ClZjR-jM.js → datadog-BzkFYNcv.js} +1 -1
- package/dist/chunks/datadog-vQKKqB6Z.js +1 -0
- package/dist/chunks/desktop-oTXppB2O.js +1 -0
- package/dist/chunks/{diff-D9hjPq4W.js → diff-B23DUoT8.js} +1 -1
- package/dist/chunks/{doctor-4-im_J_h.js → doctor-o2MJvjAE.js} +1 -1
- package/dist/chunks/{effort-Bz-9GIpe.js → effort-B1X_S_oa.js} +1 -1
- package/dist/chunks/entry-BAXMpXJ0.js +14 -0
- package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +1 -0
- package/dist/chunks/{envLessBridgeConfig-DW4-nPbZ.js → envLessBridgeConfig-YNTOVEqU.js} +1 -1
- package/dist/chunks/{exit-DBNDTR4b.js → exit-CwGJifQF.js} +1 -1
- package/dist/chunks/{export-CQHUM_Nv.js → export-CqbYdFmJ.js} +1 -1
- package/dist/chunks/{exportRenderer-CuIDQBLH.js → exportRenderer-DP_z8YD1.js} +1 -1
- package/dist/chunks/extra-usage-1FUBiJOE.js +1 -0
- package/dist/chunks/{extra-usage-DTr6gExD.js → extra-usage-BQ5Z1wJb.js} +1 -1
- package/dist/chunks/{extra-usage-core-D3CwYO_8.js → extra-usage-core-B1oJoxYa.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-d-QVg1D5.js → extra-usage-noninteractive-BV_6cpdd.js} +1 -1
- package/dist/chunks/{extraUsage-BNRQOkgU.js → extraUsage-Ca_6qcke.js} +1 -1
- package/dist/chunks/extractMemories-B-yrLjpP.js +1 -0
- package/dist/chunks/{fast-bkGXbuHX.js → fast-BJMGfO_S.js} +1 -1
- package/dist/chunks/fast-CFtN26up.js +1 -0
- package/dist/chunks/{feedback-BvFgE_FF.js → feedback-O0Gushxg.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-D-ifHvWu.js → firstPartyEventLogger-0s2WJ6SR.js} +1 -1
- package/dist/chunks/{flushGate-BA24vFBg.js → flushGate-CLjpgnG6.js} +1 -1
- package/dist/chunks/{fpsMetrics-CBFlAGTS.js → fpsMetrics-DH78PzGr.js} +1 -1
- package/dist/chunks/gates-4fq2Ws2D.js +1 -0
- package/dist/chunks/{gates-C66Nz9b2.js → gates-C5y8P5t9.js} +1 -1
- package/dist/chunks/{gemini-DuQl4hTA.js → gemini-D6lfJRGH.js} +1 -1
- package/dist/chunks/{generateRecap-CwBU76xi.js → generateRecap-AYujRzfu.js} +1 -1
- package/dist/chunks/{generateSessionName-LnmjE9jh.js → generateSessionName-CXg1uVLN.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-DrreQj47.js → githubRepoPathMapping-CdjkMIX3.js} +1 -1
- package/dist/chunks/{goal-BIvjF6B7.js → goal-BGr-SlcA.js} +1 -1
- package/dist/chunks/{grok-KNLYSRBQ.js → grok-DxyRt4Jq.js} +1 -1
- package/dist/chunks/{growthbook-ksjGAskq.js → growthbook-D93ZmHUL.js} +1 -1
- package/dist/chunks/{heapdump-Cz8vkcOr.js → heapdump-DZz5qnZg.js} +1 -1
- package/dist/chunks/{help-Cx9OordP.js → help-C8HhaC70.js} +1 -1
- package/dist/chunks/hooks-CmW7bdtz.js +1 -0
- package/dist/chunks/{hooks-BW-d9Bdu.js → hooks-De2yBPig.js} +1 -1
- package/dist/chunks/{hostAdapter-DLmaB6eN.js → hostAdapter-CZdJUeS1.js} +1 -1
- package/dist/chunks/{ide-CECrIg1r.js → ide-GnSLasRI.js} +1 -1
- package/dist/chunks/{inboundAttachments-B0sGIu79.js → inboundAttachments-C8y3D5mp.js} +1 -1
- package/dist/chunks/inboundAttachments-DZiITyN8.js +1 -0
- package/dist/chunks/{initReplBridge-BAEMZEcg.js → initReplBridge-YGXqLbNZ.js} +1 -1
- package/dist/chunks/{insights-DeWggLxC.js → insights-23tyPxXV.js} +1 -1
- package/dist/chunks/{install-pxH_HR1p.js → install-BXi4d63r.js} +1 -1
- package/dist/chunks/{install-github-app-DqKEiHQ1.js → install-github-app-D2X7BgzJ.js} +1 -1
- package/dist/chunks/{install-slack-app-P1L9x-YI.js → install-slack-app-_J1t0kSP.js} +1 -1
- package/dist/chunks/{instrumentation-Dx0s2jzr.js → instrumentation-C9WDRy-K.js} +3 -3
- package/dist/chunks/{job-CbxxkPgE.js → job-DXX7dNN_.js} +1 -1
- package/dist/chunks/{keybindings-BBPC7FAc.js → keybindings-CChhkkE0.js} +1 -1
- package/dist/chunks/{lang-CKp0Tn76.js → lang-COIVItM_.js} +1 -1
- package/dist/chunks/language-CiMwEWO-.js +1 -0
- package/dist/chunks/{language-iERMuOEu.js → language-DzWvcLCu.js} +1 -1
- package/dist/chunks/{launchAgentsPlatform-DQvKVtl2.js → launchAgentsPlatform-Du_WvKeU.js} +1 -1
- package/dist/chunks/{launchAutofixPr-B7hu9C8h.js → launchAutofixPr-CypNniKH.js} +1 -1
- package/dist/chunks/{launchCommand-CJsikSlW.js → launchCommand-9eYsPG7W.js} +1 -1
- package/dist/chunks/{launchLocalMemory-Cpz7L5j5.js → launchLocalMemory-GkqB_Gcr.js} +1 -1
- package/dist/chunks/{launchLocalVault-XLfOQtP7.js → launchLocalVault-CBihJDzq.js} +1 -1
- package/dist/chunks/{launchMemoryStores-Cz04PaDE.js → launchMemoryStores-BkK0wwq0.js} +1 -1
- package/dist/chunks/{launchOnboarding-XPbUNdHS.js → launchOnboarding-BubTG5vY.js} +1 -1
- package/dist/chunks/{launchSchedule-B1VEe3o-.js → launchSchedule-CkV6Ai-0.js} +1 -1
- package/dist/chunks/{launchSkillStore-Cy59z5xx.js → launchSkillStore-DIrFg_WZ.js} +1 -1
- package/dist/chunks/{launchTeleport-ZPM_DvzK.js → launchTeleport-DFrgN9sU.js} +1 -1
- package/dist/chunks/{launchVault-BhnTOZq8.js → launchVault-CIiNsg91.js} +1 -1
- package/dist/chunks/loadAgentsDir-CjhNkoq0.js +1 -0
- package/dist/chunks/{loadAgentsDir-CQF8qhne.js → loadAgentsDir-DC4jN6-f.js} +777 -777
- package/dist/chunks/{loadPluginHooks-TyULD8KH.js → loadPluginHooks-DukITDP2.js} +1 -1
- package/dist/chunks/{localSearch-BNYypHsK.js → localSearch-But4wyLg.js} +1 -1
- package/dist/chunks/localSearch-D8FFon8N.js +1 -0
- package/dist/chunks/login-B3TV33p4.js +1 -0
- package/dist/chunks/{login-CxbcJk9_.js → login-ajsn1Sg7.js} +1 -1
- package/dist/chunks/{logoV2Utils-Br_w1z39.js → logoV2Utils-CpeUvaOM.js} +1 -1
- package/dist/chunks/logout-BqbTEPv9.js +1 -0
- package/dist/chunks/{magicDocs-DnxdS9yV.js → magicDocs-TF6U6QoB.js} +1 -1
- package/dist/chunks/{main-FBmdv32j.js → main-bjQRqaUr.js} +31 -31
- package/dist/chunks/mappers-Bg-xtimK.js +1 -0
- package/dist/chunks/{mcp-BhAGhDQE.js → mcp-DtHGTZUo.js} +1 -1
- package/dist/chunks/{mcp-esqdO_lV.js → mcp-Vj0ijoSq.js} +3 -3
- package/dist/chunks/{mcp-DbqUZ1Cf.js → mcp-i8lqdWTr.js} +1 -1
- package/dist/chunks/{mcpServer-DeL2ADSF.js → mcpServer-CuqaXxiJ.js} +1 -1
- package/dist/chunks/{mcpServer-Ct-GVL-y.js → mcpServer-Dr9UfcEd.js} +1 -1
- package/dist/chunks/{memory-DwapBEsD.js → memory-DVJxsbcO.js} +1 -1
- package/dist/chunks/{mobile-D7MSmMhc.js → mobile-DLGq6g08.js} +1 -1
- package/dist/chunks/{modalContext-DxfeT_3m.js → modalContext-CuTwi_eD.js} +1 -1
- package/dist/chunks/{mode-B5cmHCvz.js → mode-C9yWWppB.js} +1 -1
- package/dist/chunks/model-BYSyXf9-.js +1 -0
- package/dist/chunks/{model-BePO0VaC.js → model-Dq-13vaB.js} +1 -1
- package/dist/chunks/{onChangeAppState-B3d5iy6T.js → onChangeAppState-Cc4zOnqx.js} +1 -1
- package/dist/chunks/{openai-fRhGOIQq.js → openai-DMCGGZts.js} +1 -1
- package/dist/chunks/{overageCreditGrant-B6sx7IFi.js → overageCreditGrant-CzkWDmsQ.js} +1 -1
- package/dist/chunks/{panel-CAVG5BOM.js → panel-BY6q16am.js} +1 -1
- package/dist/chunks/{panel-DU8y_jcf.js → panel-BdRBXAv3.js} +1 -1
- package/dist/chunks/panelCall-D36EWzwF.js +1 -0
- package/dist/chunks/{passes-CWPPUigp.js → passes-CPAwB9_F.js} +1 -1
- package/dist/chunks/{paths-4ZWdjPP4.js → paths-CEAy4QCs.js} +3 -3
- package/dist/chunks/{permissions-DW8CRuJp.js → permissions-B39hfy0O.js} +1 -1
- package/dist/chunks/{pipeTransport-CUeYRWJn.js → pipeTransport-7auNUakO.js} +1 -1
- package/dist/chunks/{plan-Cf-tHvGq.js → plan-pCEs76NM.js} +1 -1
- package/dist/chunks/plugin-BSC-7wQh.js +1 -0
- package/dist/chunks/{pluginAutoupdate-CdmKzIRf.js → pluginAutoupdate-Cre72Rtf.js} +1 -1
- package/dist/chunks/{pluginBlocklist-C9XwbFSo.js → pluginBlocklist-D2Cj4TR2.js} +1 -1
- package/dist/chunks/{pluginCliCommands-CmY_maYg.js → pluginCliCommands-CTxmCPph.js} +1 -1
- package/dist/chunks/{pluginFlagging-DyzxZolj.js → pluginFlagging-C5EGcjZe.js} +1 -1
- package/dist/chunks/{pluginOperations-mr4I7Jw9.js → pluginOperations-DDI1CG0K.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-B6OdK29Z.js → pluginStartupCheck-B3QqfRt6.js} +1 -1
- package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +1 -0
- package/dist/chunks/{plugins-rdPgpjF8.js → plugins-Bz7JxD43.js} +1 -1
- package/dist/chunks/policyLimits-C-oHygGe.js +1 -0
- package/dist/chunks/{pollConfig-DLbuHBse.js → pollConfig-CyO4Ycwc.js} +1 -1
- package/dist/chunks/{poor-pmz2b7zu.js → poor-eRoBwI0Z.js} +1 -1
- package/dist/chunks/{poorMode-DD-q_w6Z.js → poorMode-BdNsLBQ-.js} +1 -1
- package/dist/chunks/poorMode-D2-4vRxb.js +1 -0
- package/dist/chunks/{print-luaON-Cg.js → print-Ogibzjap.js} +4 -4
- package/dist/chunks/{privacy-settings-BpigC4oX.js → privacy-settings-Dd7PtKbY.js} +1 -1
- package/dist/chunks/{processBashCommand-f_84bSlP.js → processBashCommand-BjdUo_Na.js} +1 -1
- package/dist/chunks/{processSlashCommand-BkBqV3Jd.js → processSlashCommand-tetvMLMl.js} +1 -1
- package/dist/chunks/projectContext-2CzYVggO.js +1 -0
- package/dist/chunks/projectContext-CVk2Ix1r.js +1 -0
- package/dist/chunks/prompt-BHI7PZe4.js +227 -0
- package/dist/chunks/prompt-DZ1EAUlC.js +1 -0
- package/dist/chunks/prompt-DeRHlPn1.js +1 -0
- package/dist/chunks/{promptEditor-C___2FFs.js → promptEditor-DoJ-xPi4.js} +1 -1
- package/dist/chunks/{protocolHandler-qwll5gSY.js → protocolHandler-Dgzu5UWb.js} +1 -1
- package/dist/chunks/{rate-limit-options-nQcTipEp.js → rate-limit-options-B6QH2-xn.js} +1 -1
- package/dist/chunks/{rcDebugLog-DOXxIr8l.js → rcDebugLog-C0Bam8V9.js} +1 -1
- package/dist/chunks/{referral-CMPZjf3I.js → referral-B10JtHMk.js} +1 -1
- package/dist/chunks/{refresh-CP7Dnjp4.js → refresh-DmEsCaJ0.js} +1 -1
- package/dist/chunks/{registerProtocol-DCNuqdCC.js → registerProtocol-CQjmvg7a.js} +1 -1
- package/dist/chunks/{registry-DLqZJleQ.js → registry-CLaXh4Gk.js} +1 -1
- package/dist/chunks/{release-notes-BsDW6T9f.js → release-notes-dxng0ob_.js} +1 -1
- package/dist/chunks/{releaseNotes-Tbd018Qz.js → releaseNotes-CS5L5W0H.js} +2 -2
- package/dist/chunks/{reload-plugins-iG9ZE9wF.js → reload-plugins-CgzAjBDp.js} +1 -1
- package/dist/chunks/{remote-env-BFntnltf.js → remote-env-BasfU8Ra.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-Dpko9c-J.js → remoteBridgeCore-IJI5koHz.js} +1 -1
- package/dist/chunks/{remoteControlServer-D3P82kVF.js → remoteControlServer-BBCt7ySV.js} +1 -1
- package/dist/chunks/{rename-Codm2nfB.js → rename-eEdSZsJ2.js} +1 -1
- package/dist/chunks/{resume-BB1ceL_x.js → resume-DjnfattK.js} +1 -1
- package/dist/chunks/{runtimeObserver-D6aF77Dq.js → runtimeObserver-ByTBtmBf.js} +2 -2
- package/dist/chunks/{runtimeObserver-BpRn0RiL.js → runtimeObserver-COpkJmg-.js} +1 -1
- package/dist/chunks/sandbox-adapter-DagBhoTC.js +1 -0
- package/dist/chunks/{sandbox-toggle-DZ-8qXDS.js → sandbox-toggle-CQohaYND.js} +1 -1
- package/dist/chunks/searchExtraTools-kk-wV-cC.js +1 -0
- package/dist/chunks/{sentry-CVdHlmNQ.js → sentry-C0bQlih_.js} +1 -1
- package/dist/chunks/{session-B4j1ViVc.js → session-Dx_ODOHl.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DkIIFsWX.js → sessionDiscovery-DAqs0Ra6.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +1 -0
- package/dist/chunks/sessionMemory-BMtFup-Y.js +1 -0
- package/dist/chunks/{sessionMemory-CnT3-Mj7.js → sessionMemory-Bq3ECr1S.js} +1 -1
- package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +1 -0
- package/dist/chunks/sessionObserver-BwAfzGUg.js +1 -0
- package/dist/chunks/{sessionObserver-gjdJ91cv.js → sessionObserver-rd6RRTzc.js} +1 -1
- package/dist/chunks/sessionStorage-X2u45U9z.js +1 -0
- package/dist/chunks/{sessionTitle-CSU5-VK9.js → sessionTitle-1k_2BhFL.js} +1 -1
- package/dist/chunks/{sessionTracing-BDN64fWh.js → sessionTracing-DNSDPYdR.js} +1 -1
- package/dist/chunks/{settingsSync-Nixbcaox.js → settingsSync-3xG2A_wN.js} +1 -1
- package/dist/chunks/{setup-n3Ixr_gs.js → setup-C2V4elOv.js} +2 -2
- package/dist/chunks/{setup-CZxLEcQh.js → setup-CY808VaY.js} +1 -1
- package/dist/chunks/{setup-9nXlu56r.js → setup-Hlga8GJ_.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-CCS7R7F1.js → shadowedRuleDetection-BdBNo5eP.js} +1 -1
- package/dist/chunks/{sideQuestion-MzExGTvn.js → sideQuestion-DWOCUKMh.js} +1 -1
- package/dist/chunks/{sink-BL75jACh.js → sink-DCh0VJ4g.js} +1 -1
- package/dist/chunks/sink-nZmawD5W.js +1 -0
- package/dist/chunks/sinks-BTZnXPr_.js +1 -0
- package/dist/chunks/{sinks-C-gxj_Eu.js → sinks-_9T2oPB_.js} +2 -2
- package/dist/chunks/{skill-learning-B9Msm4jG.js → skill-learning-CzZFGFZO.js} +2 -2
- package/dist/chunks/{skillChangeDetector-DlWPJTny.js → skillChangeDetector-345QNWDp.js} +1 -1
- package/dist/chunks/{skillGapStore-CsADiV5a.js → skillGapStore-Bz_qbwI1.js} +2 -2
- package/dist/chunks/{skillGapStore-Cpmbwyo3.js → skillGapStore-DJm3SULe.js} +1 -1
- package/dist/chunks/{skillGenerator-_khb-Gmc.js → skillGenerator-BcNv-VZ5.js} +2 -2
- package/dist/chunks/skillLearning-BJAfTX2G.js +1 -0
- package/dist/chunks/skillLearning-DPhuKS4j.js +1 -0
- package/dist/chunks/{skillPanel-DQmj3Yh1.js → skillPanel-Q85P-Gg4.js} +3 -3
- package/dist/chunks/{skillSearchPanel-6w_zzoI3.js → skillSearchPanel-CMCQDAcX.js} +2 -2
- package/dist/chunks/{skills-B3LN9tp9.js → skills-D3eUg3HG.js} +1 -1
- package/dist/chunks/{sprites-8JVWnXzp.js → sprites-ChoMSqpa.js} +1 -1
- package/dist/chunks/{src-KjMLauwe.js → src-Di342QoJ.js} +1 -1
- package/dist/chunks/{src-BJM0zMNO.js → src-poaoYkuc.js} +1 -1
- package/dist/chunks/startupProfiler-CBcN1Chw.js +3 -0
- package/dist/chunks/startupProfiler-DtTgsdnI.js +1 -0
- package/dist/chunks/{staticRender-DboURbK0.js → staticRender-DKFIRhkH.js} +1 -1
- package/dist/chunks/{stats-BDlygx5X.js → stats-DdhEa_6-.js} +1 -1
- package/dist/chunks/status-CX7Kgn21.js +1 -0
- package/dist/chunks/{statusNoticeHelpers-Cd_LDPvn.js → statusNoticeHelpers-AibXOONm.js} +1 -1
- package/dist/chunks/{tag-BLPgXlQZ.js → tag-BJ_u3aJm.js} +1 -1
- package/dist/chunks/tasks-DeEWOchP.js +1 -0
- package/dist/chunks/teamHelpers-CxoQp7OY.js +1 -0
- package/dist/chunks/{teamHelpers-B-poMJeE.js → teamHelpers-WmWa_h3B.js} +1 -1
- package/dist/chunks/{teammateModeSnapshot-B1_3D1CQ.js → teammateModeSnapshot-DZ6ulELC.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +1 -0
- package/dist/chunks/{teleport-CSo3PT05.js → teleport-CuDXJj_f.js} +1 -1
- package/dist/chunks/{templateJobs-BVebX2BK.js → templateJobs-nFBp68za.js} +1 -1
- package/dist/chunks/{terminalSetup-DZTEKKne.js → terminalSetup-BORjK3qH.js} +1 -1
- package/dist/chunks/{terminalSetup-DHWL0gnz.js → terminalSetup-DULcnnWe.js} +1 -1
- package/dist/chunks/{theme-BHQSNwSe.js → theme-Bf2QD0ja.js} +1 -1
- package/dist/chunks/thinkback-C1nnGg5r.js +1 -0
- package/dist/chunks/{thinkback-DOzxcgMy.js → thinkback-DZEhr3Ii.js} +1 -1
- package/dist/chunks/{thinkback-play-CK1C_F7G.js → thinkback-play-BtEBESXM.js} +1 -1
- package/dist/chunks/{toolEventObserver-XPorjjtG.js → toolEventObserver-CNZy5TpN.js} +1 -1
- package/dist/chunks/{toolEventObserver-BIjUIh4k.js → toolEventObserver-DMdrez6V.js} +1 -1
- package/dist/chunks/toolPool-DDj2TbY6.js +1 -0
- package/dist/chunks/{toolPool-hQlvQn-j.js → toolPool-DHQyHmDY.js} +1 -1
- package/dist/chunks/{trustedDevice-D-L5uAor.js → trustedDevice-DWb5CPB_.js} +1 -1
- package/dist/chunks/{trustedDevice-CyfQd_GU.js → trustedDevice-Dw2crViN.js} +1 -1
- package/dist/chunks/{tui-C7aBeORE.js → tui-DcXIK0fP.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-rnMsUWTn.js → ultrareviewCommand-BfN25zni.js} +1 -1
- package/dist/chunks/undercover-DSp7SB7e.js +1 -0
- package/dist/chunks/{undercover-ClLYK52H.js → undercover-rcR56jZx.js} +1 -1
- package/dist/chunks/{updateCCB-pqkACWbs.js → updateCCB-DlTAqQJq.js} +1 -1
- package/dist/chunks/{upgrade-DpfZlPyC.js → upgrade-ClLcX7zy.js} +1 -1
- package/dist/chunks/upgrade-kf1QWUo7.js +1 -0
- package/dist/chunks/{upload-D98tqZnO.js → upload-BqEzK59v.js} +1 -1
- package/dist/chunks/{usage-CRquq5_O.js → usage-BgKDh8pQ.js} +1 -1
- package/dist/chunks/{usage-BWd5R6DU.js → usage-DW-akzSR.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js → useExitOnCtrlCDWithKeybindings-BHi41Ku_.js} +1 -1
- package/dist/chunks/useKeybinding-DPOUuymz.js +1 -0
- package/dist/chunks/useMainLoopModel-BTpZ8k3k.js +1 -0
- package/dist/chunks/{useManagePlugins-DMY74XAk.js → useManagePlugins-z0qezP5r.js} +1 -1
- package/dist/chunks/{useMergedTools-NN58Kguw.js → useMergedTools-B78rAreW.js} +1 -1
- package/dist/chunks/{useSearchInput-CodP_5SB.js → useSearchInput-CwxF3CHN.js} +1 -1
- package/dist/chunks/{useSettingsErrors-BRxaYl6B.js → useSettingsErrors-CjDaon07.js} +1 -1
- package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
- package/dist/chunks/{useVoice-ByU-q_w4.js → useVoice-X5WSnyed.js} +1 -1
- package/dist/chunks/{util-SpgBY5_I.js → util-CP-_gsEO.js} +1 -1
- package/dist/chunks/utils-CULcnflj.js +1 -0
- package/dist/chunks/{validatePlugin-CxCXNV8o.js → validatePlugin-DUuaprqR.js} +1 -1
- package/dist/chunks/{vim-ByXlYzf9.js → vim-BfmsdxOa.js} +1 -1
- package/dist/chunks/{voice-BnLS_SdQ.js → voice-B3GIfFlB.js} +1 -1
- package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +1 -0
- package/dist/chunks/{voiceModeEnabled-D070o6QK.js → voiceModeEnabled-C1Q9j5q6.js} +1 -1
- package/dist/chunks/{voiceStreamSTT-vkQ-Aop7.js → voiceStreamSTT-BguyxdrW.js} +1 -1
- package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +1 -0
- package/dist/chunks/{web-tools-1yM0ZBfA.js → web-tools-qf_VwWRn.js} +1 -1
- package/dist/chunks/{workerRegistry-7xGv_sNB.js → workerRegistry-SbiLJIsG.js} +1 -1
- package/dist/chunks/worktree-Djga1wtm.js +1 -0
- package/dist/chunks/{xml-BUaEXGXx.js → xml-D7-jJqSA.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-oTZKoMvB.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-5FCT81WS.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-BmGziW64.js +0 -1
- package/dist/chunks/Dialog-C8eGKH-e.js +0 -1
- package/dist/chunks/Doctor-DohPtIKu.js +0 -1
- package/dist/chunks/Grove-C_ocvHd3.js +0 -1
- package/dist/chunks/ListItem-DDMe4CJ3.js +0 -1
- package/dist/chunks/Messages-KmeXIJqL.js +0 -11
- package/dist/chunks/REPL-BBmn_itf.js +0 -1
- package/dist/chunks/SearchBox-CciJ8giD.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-kjVFsFkT.js +0 -1
- package/dist/chunks/SentryErrorBoundary-DsrmgmKF.js +0 -1
- package/dist/chunks/api-DkgaFAzq.js +0 -1
- package/dist/chunks/assistant-CiNV3Q0f.js +0 -1
- package/dist/chunks/auth-CbQCc9vz.js +0 -1
- package/dist/chunks/backgroundHousekeeping-LYpOamcN.js +0 -1
- package/dist/chunks/bridgeConfig-Budgp2Go.js +0 -1
- package/dist/chunks/bridgeEnabled-DmvmwuUY.js +0 -1
- package/dist/chunks/bridgeMain-KYR5iq6H.js +0 -1
- package/dist/chunks/caches-CkH9F-Fd.js +0 -1
- package/dist/chunks/ccshareResume-DPP1blaU.js +0 -1
- package/dist/chunks/changeDetector-IFbty4jj.js +0 -1
- package/dist/chunks/channelNotification-CIyWY0hs.js +0 -1
- package/dist/chunks/clear-BVjSQsUL.js +0 -1
- package/dist/chunks/client-BUUsZdSe.js +0 -1
- package/dist/chunks/commands-pTQdOvN6.js +0 -1
- package/dist/chunks/commitAttribution-QPrKt_BF.js +0 -1
- package/dist/chunks/completionCache-BB7-y2BX.js +0 -1
- package/dist/chunks/context-noninteractive-OUTZ6BKj.js +0 -1
- package/dist/chunks/conversation-Bs8l0KNl.js +0 -1
- package/dist/chunks/createSession-DpqtD4ML.js +0 -1
- package/dist/chunks/crossProjectResume-BCr6jfGz.js +0 -40
- package/dist/chunks/datadog-DlzPb5oG.js +0 -1
- package/dist/chunks/desktop-WH8s-9-6.js +0 -1
- package/dist/chunks/entry-CEBaLwEG.js +0 -14
- package/dist/chunks/envLessBridgeConfig-izoVnE8s.js +0 -1
- package/dist/chunks/extra-usage-VSASGlte.js +0 -1
- package/dist/chunks/extractMemories-hQlhiVOD.js +0 -1
- package/dist/chunks/fast-2gWrhEFZ.js +0 -1
- package/dist/chunks/gates-dO6m4Hdp.js +0 -1
- package/dist/chunks/hooks-BWoN0nQP.js +0 -1
- package/dist/chunks/inboundAttachments-D8vq1NQO.js +0 -1
- package/dist/chunks/language-CSDpzbTz.js +0 -1
- package/dist/chunks/loadAgentsDir-B-4D2dVE.js +0 -1
- package/dist/chunks/localSearch-DsFH9yls.js +0 -1
- package/dist/chunks/login-CEJEl2mW.js +0 -1
- package/dist/chunks/logout-BXr4jzNY.js +0 -1
- package/dist/chunks/mappers-BNI_df3v.js +0 -1
- package/dist/chunks/model-CgH43-hO.js +0 -1
- package/dist/chunks/panelCall-DUQdjDee.js +0 -1
- package/dist/chunks/plugin-DXhCgoNC.js +0 -1
- package/dist/chunks/pluginStartupCheck-BFuZqpnX.js +0 -1
- package/dist/chunks/policyLimits-B3dtp_Fe.js +0 -1
- package/dist/chunks/poorMode-BPIUnFFi.js +0 -1
- package/dist/chunks/projectContext-2Z2w8AI8.js +0 -1
- package/dist/chunks/projectContext-fS1t-xRh.js +0 -1
- package/dist/chunks/prompt-CogZQuTN.js +0 -227
- package/dist/chunks/prompt-CriAIdkT.js +0 -1
- package/dist/chunks/prompt-TGc_H1cL.js +0 -1
- package/dist/chunks/sandbox-adapter-DrHD1mch.js +0 -1
- package/dist/chunks/searchExtraTools-Dwg6ZafS.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-n7HcOfZ7.js +0 -1
- package/dist/chunks/sessionMemory-DVq43VXP.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BjkdLRvh.js +0 -1
- package/dist/chunks/sessionObserver-CrfmnMzL.js +0 -1
- package/dist/chunks/sessionStorage-BTbr9wkZ.js +0 -1
- package/dist/chunks/sink-CoUVbLFs.js +0 -1
- package/dist/chunks/sinks-wuo1yQ_m.js +0 -1
- package/dist/chunks/skillLearning-CFnZiM5J.js +0 -1
- package/dist/chunks/skillLearning-D6mvGN90.js +0 -1
- package/dist/chunks/startupProfiler-BmnoJtfF.js +0 -1
- package/dist/chunks/startupProfiler-rCtNuhXz.js +0 -3
- package/dist/chunks/status-DlT1tUmc.js +0 -1
- package/dist/chunks/tasks-Bf1Nf3WX.js +0 -1
- package/dist/chunks/teamHelpers-DeQCfdgu.js +0 -1
- package/dist/chunks/teammateModeSnapshot-BRuKcJNr.js +0 -1
- package/dist/chunks/thinkback-CVYpxAyO.js +0 -1
- package/dist/chunks/toolPool-CDEeuQd2.js +0 -1
- package/dist/chunks/undercover-BviGW-bQ.js +0 -1
- package/dist/chunks/upgrade-DAuhXFVI.js +0 -1
- package/dist/chunks/useKeybinding-DOjEx42R.js +0 -1
- package/dist/chunks/useMainLoopModel-BZoZdEdj.js +0 -1
- package/dist/chunks/useTerminalSize-mqo2Swmk.js +0 -1
- package/dist/chunks/utils-CM5oEyAY.js +0 -1
- package/dist/chunks/voiceModeEnabled-B3njLfhA.js +0 -1
- package/dist/chunks/voiceStreamSTT-BkeyhhFJ.js +0 -1
- package/dist/chunks/worktree-UA9gKCwL.js +0 -1
- /package/dist/chunks/{chromeNativeHost-DfYuJafI.js → chromeNativeHost-BldB1Zzi.js} +0 -0
- /package/dist/chunks/{claudeDesktop-CEQCLZmG.js → claudeDesktop-BqTW_pbB.js} +0 -0
- /package/dist/chunks/{cleanup-DUVwlFl7.js → cleanup-rCLlo4w8.js} +0 -0
- /package/dist/chunks/{eventLoopStallDetector-MNrFR4OH.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
- /package/dist/chunks/{postCommitAttribution-Br4g4R6h.js → postCommitAttribution-D8MoHFoz.js} +0 -0
- /package/dist/chunks/{sdkHeapDumpMonitor-DTHI5WbD.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
- /package/dist/chunks/{sessionDataUploader-BgmJTXQr.js → sessionDataUploader-CsNePsOb.js} +0 -0
- /package/dist/chunks/{udsClient-B85rNglp.js → udsClient-CBF_cZFW.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,f as c,g as l,h as u,l as d,t as f,tt as p}from"./src-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,f as c,g as l,h as u,l as d,t as f,tt as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{Gs as h,Qa as g,Rs as _,Us as v,lo as y,no as b,oo as x}from"./paths-CEAy4QCs.js";import{J as S,U as C}from"./debug-otxXY3j-.js";import{o as w,s as T}from"./log-DSV4Ht5l.js";import{AE as E,DC as D,EC as O,aS as k,jE as A,oS as j}from"./loadAgentsDir-DC4jN6-f.js";import{t as M}from"./useKeybinding-DPOUuymz.js";async function N(){let e=await E();if(e.length===0)return{availableEnvironments:[],selectedEnvironment:null,selectedEnvironmentSource:null};let t=b()?.remote?.defaultEnvironmentId,n=e.find(e=>e.kind!==`bridge`)??e[0],r=null;if(t){let i=e.find(e=>e.environment_id===t);if(i){n=i;for(let e=_.length-1;e>=0;e--){let n=_[e];if(!(!n||n===`flagSettings`)&&g(n)?.remote?.defaultEnvironmentId===t){r=n;break}}}}return{availableEnvironments:e,selectedEnvironment:n,selectedEnvironmentSource:r}}var P=e((()=>{h(),x(),A()}));function F({onDone:e}){let[t,n]=(0,z.useState)(`loading`),[r,a]=(0,z.useState)([]),[o,l]=(0,z.useState)(null),[u,f]=(0,z.useState)(null),[p,m]=(0,z.useState)(null);(0,z.useEffect)(()=>{let e=!1;async function t(){try{let t=await N();if(e)return;a(t.availableEnvironments),l(t.selectedEnvironment),f(t.selectedEnvironmentSource),n(null)}catch(t){if(e)return;let r=S(t);T(r),m(r.message),n(null)}}return t(),()=>{e=!0}},[]);function h(t){if(t===`cancel`){e();return}n(`updating`);let a=r.find(e=>e.environment_id===t);if(!a){e(`Error: Selected environment not found`);return}y(`localSettings`,{remote:{defaultEnvironmentId:a.environment_id}}),e(`Set default remote environment to ${i.bold(a.name)} (${a.environment_id})`)}return t===`loading`?(0,B.jsx)(c,{title:V,onCancel:e,hideInputGuide:!0,children:(0,B.jsx)(d,{message:`Loading environments…`})}):p?(0,B.jsx)(c,{title:V,onCancel:e,children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,p]})}):o?r.length===1?(0,B.jsx)(L,{environment:o,onDone:e}):(0,B.jsx)(R,{environments:r,selectedEnvironment:o,selectedEnvironmentSource:u,loadingState:t,onSelect:h,onCancel:e}):(0,B.jsx)(c,{title:V,subtitle:H,onCancel:e,children:(0,B.jsx)(s,{children:`No remote environments available.`})})}function I({environment:e}){return(0,B.jsxs)(s,{children:[r.tick,` Using `,(0,B.jsx)(s,{bold:!0,children:e.name}),` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]})}function L({environment:e,onDone:t}){return p(`confirm:yes`,t,{context:`Confirmation`}),(0,B.jsx)(c,{title:V,subtitle:H,onCancel:t,children:(0,B.jsx)(I,{environment:e})})}function R({environments:e,selectedEnvironment:t,selectedEnvironmentSource:n,loadingState:r,onSelect:i,onCancel:a}){let o=n&&n!==`localSettings`?` (from ${v(n)} settings)`:``;return(0,B.jsxs)(c,{title:V,subtitle:(0,B.jsxs)(s,{children:[`Currently using: `,(0,B.jsx)(s,{bold:!0,children:t.name}),o]}),onCancel:a,hideInputGuide:!0,children:[(0,B.jsx)(s,{dimColor:!0,children:H}),r===`updating`?(0,B.jsx)(d,{message:`Updating…`}):(0,B.jsx)(k,{options:e.map(e=>({label:(0,B.jsxs)(s,{children:[e.name,` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]}),value:e.environment_id})),defaultValue:t.environment_id,onChange:i,onCancel:()=>i(`cancel`),layout:`compact-vertical`}),(0,B.jsx)(s,{dimColor:!0,children:(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`Enter`,action:`select`}),(0,B.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})}var z,B,V,H,U=e((()=>{a(),n(),o(),z=t(o(),1),f(),M(),C(),w(),h(),x(),P(),D(),j(),B=m(),V=`Select Remote Environment`,H=`Configure environments at: https://claude.ai/code`}));async function W(e){return(0,G.jsx)(F,{onDone:e})}var G;e((()=>{o(),U(),G=m()}))();export{W as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{E as i,O as a,Q as o,U as s,Z as c,l,p as u,z as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{F as m,P as h}from"./git-C0IuvuIy.js";import{n as g,t as _}from"./sleep-C6koP5Ka.js";import{_ as ee,d as v}from"./rcDebugLog-DOXxIr8l.js";import{c as y,d as b,i as x,o as S,s as C}from"./debugUtils-l8nsUZ6R.js";import{a as w,i as T}from"./trustedDevice-D-L5uAor.js";import{a as E,r as D}from"./bridgeConfig-e0MGfed6.js";import{t as te}from"./jwtUtils-BQXXBwqW.js";import{t as O}from"./workSecret-DJu7k30X.js";import{i as k,r as ne}from"./envLessBridgeConfig-DW4-nPbZ.js";import{a as A,c as j,i as re,n as ie,o as M,r as ae,s as oe,t as N}from"./bridgeMessaging-BvBnxgD4.js";import{r as P,t as se}from"./flushGate-BA24vFBg.js";t(),f(),c(),h(),_(),y(),w(),v(),k(),r(),l(),s(),i(),S();var F=`2023-06-01`;function I(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":F}}async function ce(e,t,r,i,o){let s=`${e}/v1/code/sessions`,c;try{c=await n.post(s,{title:r,bridge:{},...o?.length?{tags:o}:{}},{headers:I(t),timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] Session create request failed: ${d(e)}`),null}if(c.status!==200&&c.status!==201){let e=x(c.data);return u(`[code-session] Session create failed ${c.status}${e?`: ${e}`:``}`),null}let l=c.data;return!l||typeof l!=`object`||!(`session`in l)||!l.session||typeof l.session!=`object`||!(`id`in l.session)||typeof l.session.id!=`string`||!l.session.id.startsWith(`cse_`)?(u(`[code-session] No session.id (cse_*) in response: ${a(l).slice(0,200)}`),null):l.session.id}async function L(e,t,r,i,o){let s=`${t}/v1/code/sessions/${e}/bridge`,c=I(r);o&&(c[`X-Trusted-Device-Token`]=o);let l;try{l=await n.post(s,{},{headers:c,timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] /bridge request failed: ${d(e)}`),null}if(l.status!==200){let e=x(l.data);return u(`[code-session] /bridge failed ${l.status}${e?`: ${e}`:``}`),null}let f=l.data;if(typeof f!=`object`||!f||!(`worker_jwt`in f)||typeof f.worker_jwt!=`string`||!(`expires_in`in f)||typeof f.expires_in!=`number`||!(`api_base_url`in f)||typeof f.api_base_url!=`string`||!(`worker_epoch`in f))return u(`[code-session] /bridge response malformed (need worker_jwt, expires_in, api_base_url, worker_epoch): ${a(f).slice(0,200)}`),null;let p=f.worker_epoch,m=typeof p==`string`?Number(p):p;return typeof m!=`number`||!Number.isFinite(m)||!Number.isSafeInteger(m)?(u(`[code-session] /bridge worker_epoch invalid: ${a(p)}`),null):{worker_jwt:f.worker_jwt,api_base_url:f.api_base_url,expires_in:f.expires_in,worker_epoch:m}}r(),S(),l(),s(),E();var R=`2023-06-01`;function z(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":R}}async function B(t){let{baseUrl:n,orgUUID:r,title:i,getAccessToken:a,onAuth401:s,toSDKMessages:c,initialHistoryCap:l,initialMessages:f,onInboundMessage:h,onUserMessage:g,onPermissionResponse:_,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,onStateChange:S,outboundOnly:w,tags:T}=t,E=await ne(),D=a();if(!D)return u(`[remote-bridge] No OAuth token`),null;let k=await V(()=>ce(n,D,i,E.http_timeout_ms,T),`createCodeSession`,E);if(!k)return S?.(`failed`,`Session creation failed — see debug log`),C(`v2_session_create_failed`,void 0,!0),null;let F=k;u(`[remote-bridge] Created session ${F}`),m(`info`,`bridge_repl_v2_session_created`);let I=await V(()=>H(F,n,D,E.http_timeout_ms),`fetchRemoteCredentials`,E);if(!I)return S?.(`failed`,`Remote credentials fetch failed — see debug log`),C(`v2_remote_creds_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null;u(`[remote-bridge] Fetched bridge credentials (expires_in=${I.expires_in}s)`);let L=O(I.api_base_url,F);u(`[remote-bridge] v2 session URL: ${L}`);let R;try{R=await P({sessionUrl:L,ingressToken:I.worker_jwt,sessionId:F,epoch:I.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,getAuthToken:()=>I.worker_jwt,outboundOnly:w})}catch(e){return u(`[remote-bridge] v2 transport setup failed: ${d(e)}`,{level:`error`}),S?.(`failed`,`Transport setup failed: ${d(e)}`),C(`v2_transport_setup_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null}u(`[remote-bridge] v2 transport created (epoch=${I.worker_epoch})`),S?.(`ready`);let z=new N(E.uuid_dedup_buffer_size),B=new Set;if(f)for(let e of f)B.add(e.uuid),z.add(e.uuid);let le=new N(E.uuid_dedup_buffer_size),W=new se,G=!1,K=!1,q=!1,J=!g,Y=`initial`,X;function Z(e){K||p(`tengu_bridge_repl_connect_timeout`,{v2:!0,elapsed_ms:E.connect_timeout_ms,cause:e})}ee(e=>{K||R.reportMetadata(e)},{replayCurrent:!0});let Q=te({refreshBufferMs:E.token_refresh_buffer_ms,getAccessToken:async()=>{let e=a();return s&&await s(e??``),a()??e},onRefresh:(e,t)=>{(async()=>{if(q||K){u(`[remote-bridge] Recovery already in flight, skipping proactive refresh`);return}q=!0;try{let r=await V(()=>H(e,n,t,E.http_timeout_ms),`fetchRemoteCredentials (proactive)`,E);if(!r||K)return;await ue(r,`proactive_refresh`),u(`[remote-bridge] Transport rebuilt (proactive refresh)`)}catch(e){u(`[remote-bridge] Proactive refresh rebuild failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_proactive_refresh_failed`),K||S?.(`failed`,`Refresh failed: ${d(e)}`)}finally{q=!1}})()},label:`remote`});Q.scheduleFromExpiresIn(F,I.expires_in);function $(){R.setOnConnect(()=>{if(clearTimeout(X),u(`[remote-bridge] v2 transport connected`),m(`info`,`bridge_repl_v2_transport_connected`),p(`tengu_bridge_repl_ws_connected`,{v2:!0,cause:Y}),!G&&f&&f.length>0){G=!0;let e=R;pe(f).catch(e=>u(`[remote-bridge] flushHistory failed: ${e}`)).finally(()=>{R!==e||K||q||(fe(),S?.(`connected`))})}else W.active||S?.(`connected`)}),R.setOnData(e=>{ae(e,z,le,h,_?e=>{R.reportState(`running`),_(e)}:void 0,e=>re(e,{transport:R,sessionId:F,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,outboundOnly:w}))}),R.setOnClose(e=>{if(clearTimeout(X),!K){if(u(`[remote-bridge] v2 transport closed (code=${e})`),p(`tengu_bridge_repl_ws_closed`,{code:e,v2:!0}),e===401&&!q){de();return}S?.(`failed`,`Transport closed (code ${e})`)}})}async function ue(e,t){Y=t,W.start();try{let t=R.getLastSequenceNum();if(R.close(),R=await P({sessionUrl:O(e.api_base_url,F),ingressToken:e.worker_jwt,sessionId:F,epoch:e.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,initialSequenceNum:t,getAuthToken:()=>e.worker_jwt,outboundOnly:w}),K){R.close();return}$(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y),Q.scheduleFromExpiresIn(F,e.expires_in),fe()}finally{W.drop()}}async function de(){if(!q){q=!0,S?.(`reconnecting`,`JWT expired — refreshing`),u(`[remote-bridge] 401 on SSE — attempting JWT refresh`);try{let e=a();s&&await s(e??``);let t=a()??e;if(!t||K){K||S?.(`failed`,`JWT refresh failed: no OAuth token`);return}let r=await V(()=>H(F,n,t,E.http_timeout_ms),`fetchRemoteCredentials (recovery)`,E);if(!r||K){K||S?.(`failed`,`JWT refresh failed after 401`);return}G=!1,await ue(r,`auth_401_recovery`),u(`[remote-bridge] Transport rebuilt after 401`)}catch(e){u(`[remote-bridge] 401 recovery failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_jwt_refresh_failed`),K||S?.(`failed`,`JWT refresh failed: ${d(e)}`)}finally{q=!1}}}$(),f&&f.length>0&&W.start(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y);function fe(){let e=W.end();if(e.length===0)return;for(let t of e)z.add(t.uuid);let t=c(e).map(e=>({...e,session_id:F}));j(e)&&R.reportState(`running`),u(`[remote-bridge] Drained ${e.length} queued message(s) after flush`),R.writeBatch(t)}async function pe(e){let t=e.filter(A),n=l>0&&t.length>l?t.slice(-l):t;n.length<t.length&&u(`[remote-bridge] Capped initial flush: ${t.length} -> ${n.length} (cap=${l})`);let r=c(n).map(e=>({...e,session_id:F}));if(r.length===0)return;let i=t.at(-1);i&&oe(i)&&R.reportState(`running`),u(`[remote-bridge] Flushing ${r.length} history events`),await R.writeBatch(r)}async function me(){if(K)return;K=!0,Q.cancelAll(),clearTimeout(X),W.drop(),R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e);let t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms);if(i===401&&s)try{await s(t??``),t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms)}catch(e){u(`[remote-bridge] Teardown 401 retry threw: ${d(e)}`,{level:`error`})}R.close();let o=i===`no_token`?`skipped_no_token`:i===`timeout`||i===`error`?`network_error`:i>=500?`server_5xx`:i>=400?`server_4xx`:`ok`;u(`[remote-bridge] Torn down (archive=${i})`),m(`info`,`bridge_repl_v2_teardown`),p(`tengu_bridge_repl_teardown`,{v2:!0,archive_status:o,archive_ok:typeof i==`number`&&i<400,archive_http_status:typeof i==`number`?i:void 0,archive_timeout:i===`timeout`,archive_no_token:i===`no_token`})}let he=o(me);return p(`tengu_bridge_repl_started`,{has_initial_messages:!!(f&&f.length>0),v2:!0,expires_in_s:I.expires_in,inProtectedNamespace:e()}),{bridgeSessionId:F,environmentId:``,sessionIngressUrl:I.api_base_url,writeMessages(e){let t=e.filter(e=>A(e)&&!B.has(e.uuid)&&!z.has(e.uuid));if(t.length===0)return;if(!J)for(let e of t){let t=ie(e);if(t!==void 0&&g?.(t,F)){J=!0;break}}if(W.enqueue(...t)){u(`[remote-bridge] Queued ${t.length} message(s) during flush`);return}for(let e of t)z.add(e.uuid);let n=c(t).map(e=>({...e,session_id:F}));j(t)&&R.reportState(`running`),u(`[remote-bridge] Sending ${t.length} message(s)`),R.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!z.has(e.uuid));if(t.length===0)return;for(let e of t)e.uuid&&z.add(e.uuid);let n=t.map(e=>({...e,session_id:F}));R.writeBatch(n)},sendControlRequest(e){if(q){u(`[remote-bridge] Dropping control_request during 401 recovery: ${e.request_id}`);return}let t={...e,session_id:F};e.request?.subtype===`can_use_tool`&&R.reportState(`requires_action`),R.write(t),u(`[remote-bridge] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(q){u(`[remote-bridge] Dropping control_response during 401 recovery`);return}let t={...e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_response`)},sendControlCancelRequest(e){if(q){u(`[remote-bridge] Dropping control_cancel_request during 401 recovery: ${e}`);return}let t={type:`control_cancel_request`,request_id:e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_cancel_request request_id=${e}`)},sendResult(){if(q){u(`[remote-bridge] Dropping result during 401 recovery`);return}R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e),u(`[remote-bridge] Sent result`)},async teardown(){he(),await me()}}}async function V(e,t,n){let r=n.init_retry_max_attempts;for(let i=1;i<=r;i++){let a=await e();if(a!==null)return a;if(i<r){let e=n.init_retry_base_delay_ms*2**(i-1),a=e*n.init_retry_jitter_fraction*(2*Math.random()-1),o=Math.min(e+a,n.init_retry_max_delay_ms);u(`[remote-bridge] ${t} failed (attempt ${i}/${r}), retrying in ${Math.round(o)}ms`),await g(o)}}return null}async function H(e,t,n,r){let i=await L(e,t,n,r,T());return i?D()?{...i,api_base_url:t}:i:null}async function U(e,t,r,i,a){if(!r)return`no_token`;let o=b(e);try{let e=await n.post(`${t}/v1/sessions/${o}/archive`,{},{headers:{...z(r),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":i},timeout:a,validateStatus:()=>!0});return u(`[remote-bridge] Archive ${o} status=${e.status}`),e.status}catch(e){return u(`[remote-bridge] Archive failed: ${d(e)}`),n.isAxiosError(e)&&e.code===`ECONNABORTED`?`timeout`:`error`}}export{B as initEnvLessBridgeCore};
|
|
1
|
+
import{d as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{E as i,O as a,Q as o,U as s,Z as c,l,p as u,z as d}from"./debug-otxXY3j-.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{F as m,P as h}from"./git-C0IuvuIy.js";import{n as g,t as _}from"./sleep-C6koP5Ka.js";import{_ as ee,d as v}from"./rcDebugLog-C0Bam8V9.js";import{c as y,d as b,i as x,o as S,s as C}from"./debugUtils-l8nsUZ6R.js";import{a as w,i as T}from"./trustedDevice-DWb5CPB_.js";import{a as E,r as D}from"./bridgeConfig-Di9LziJ3.js";import{t as te}from"./jwtUtils-BQXXBwqW.js";import{t as O}from"./workSecret-DJu7k30X.js";import{i as k,r as ne}from"./envLessBridgeConfig-YNTOVEqU.js";import{a as A,c as j,i as re,n as ie,o as M,r as ae,s as oe,t as N}from"./bridgeMessaging-BG8fNZac.js";import{r as P,t as se}from"./flushGate-CLjpgnG6.js";t(),f(),c(),h(),_(),y(),w(),v(),k(),r(),l(),s(),i(),S();var F=`2023-06-01`;function I(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":F}}async function ce(e,t,r,i,o){let s=`${e}/v1/code/sessions`,c;try{c=await n.post(s,{title:r,bridge:{},...o?.length?{tags:o}:{}},{headers:I(t),timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] Session create request failed: ${d(e)}`),null}if(c.status!==200&&c.status!==201){let e=x(c.data);return u(`[code-session] Session create failed ${c.status}${e?`: ${e}`:``}`),null}let l=c.data;return!l||typeof l!=`object`||!(`session`in l)||!l.session||typeof l.session!=`object`||!(`id`in l.session)||typeof l.session.id!=`string`||!l.session.id.startsWith(`cse_`)?(u(`[code-session] No session.id (cse_*) in response: ${a(l).slice(0,200)}`),null):l.session.id}async function L(e,t,r,i,o){let s=`${t}/v1/code/sessions/${e}/bridge`,c=I(r);o&&(c[`X-Trusted-Device-Token`]=o);let l;try{l=await n.post(s,{},{headers:c,timeout:i,validateStatus:e=>e<500})}catch(e){return u(`[code-session] /bridge request failed: ${d(e)}`),null}if(l.status!==200){let e=x(l.data);return u(`[code-session] /bridge failed ${l.status}${e?`: ${e}`:``}`),null}let f=l.data;if(typeof f!=`object`||!f||!(`worker_jwt`in f)||typeof f.worker_jwt!=`string`||!(`expires_in`in f)||typeof f.expires_in!=`number`||!(`api_base_url`in f)||typeof f.api_base_url!=`string`||!(`worker_epoch`in f))return u(`[code-session] /bridge response malformed (need worker_jwt, expires_in, api_base_url, worker_epoch): ${a(f).slice(0,200)}`),null;let p=f.worker_epoch,m=typeof p==`string`?Number(p):p;return typeof m!=`number`||!Number.isFinite(m)||!Number.isSafeInteger(m)?(u(`[code-session] /bridge worker_epoch invalid: ${a(p)}`),null):{worker_jwt:f.worker_jwt,api_base_url:f.api_base_url,expires_in:f.expires_in,worker_epoch:m}}r(),S(),l(),s(),E();var R=`2023-06-01`;function z(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":R}}async function B(t){let{baseUrl:n,orgUUID:r,title:i,getAccessToken:a,onAuth401:s,toSDKMessages:c,initialHistoryCap:l,initialMessages:f,onInboundMessage:h,onUserMessage:g,onPermissionResponse:_,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,onStateChange:S,outboundOnly:w,tags:T}=t,E=await ne(),D=a();if(!D)return u(`[remote-bridge] No OAuth token`),null;let k=await V(()=>ce(n,D,i,E.http_timeout_ms,T),`createCodeSession`,E);if(!k)return S?.(`failed`,`Session creation failed — see debug log`),C(`v2_session_create_failed`,void 0,!0),null;let F=k;u(`[remote-bridge] Created session ${F}`),m(`info`,`bridge_repl_v2_session_created`);let I=await V(()=>H(F,n,D,E.http_timeout_ms),`fetchRemoteCredentials`,E);if(!I)return S?.(`failed`,`Remote credentials fetch failed — see debug log`),C(`v2_remote_creds_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null;u(`[remote-bridge] Fetched bridge credentials (expires_in=${I.expires_in}s)`);let L=O(I.api_base_url,F);u(`[remote-bridge] v2 session URL: ${L}`);let R;try{R=await P({sessionUrl:L,ingressToken:I.worker_jwt,sessionId:F,epoch:I.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,getAuthToken:()=>I.worker_jwt,outboundOnly:w})}catch(e){return u(`[remote-bridge] v2 transport setup failed: ${d(e)}`,{level:`error`}),S?.(`failed`,`Transport setup failed: ${d(e)}`),C(`v2_transport_setup_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null}u(`[remote-bridge] v2 transport created (epoch=${I.worker_epoch})`),S?.(`ready`);let z=new N(E.uuid_dedup_buffer_size),B=new Set;if(f)for(let e of f)B.add(e.uuid),z.add(e.uuid);let le=new N(E.uuid_dedup_buffer_size),W=new se,G=!1,K=!1,q=!1,J=!g,Y=`initial`,X;function Z(e){K||p(`tengu_bridge_repl_connect_timeout`,{v2:!0,elapsed_ms:E.connect_timeout_ms,cause:e})}ee(e=>{K||R.reportMetadata(e)},{replayCurrent:!0});let Q=te({refreshBufferMs:E.token_refresh_buffer_ms,getAccessToken:async()=>{let e=a();return s&&await s(e??``),a()??e},onRefresh:(e,t)=>{(async()=>{if(q||K){u(`[remote-bridge] Recovery already in flight, skipping proactive refresh`);return}q=!0;try{let r=await V(()=>H(e,n,t,E.http_timeout_ms),`fetchRemoteCredentials (proactive)`,E);if(!r||K)return;await ue(r,`proactive_refresh`),u(`[remote-bridge] Transport rebuilt (proactive refresh)`)}catch(e){u(`[remote-bridge] Proactive refresh rebuild failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_proactive_refresh_failed`),K||S?.(`failed`,`Refresh failed: ${d(e)}`)}finally{q=!1}})()},label:`remote`});Q.scheduleFromExpiresIn(F,I.expires_in);function $(){R.setOnConnect(()=>{if(clearTimeout(X),u(`[remote-bridge] v2 transport connected`),m(`info`,`bridge_repl_v2_transport_connected`),p(`tengu_bridge_repl_ws_connected`,{v2:!0,cause:Y}),!G&&f&&f.length>0){G=!0;let e=R;pe(f).catch(e=>u(`[remote-bridge] flushHistory failed: ${e}`)).finally(()=>{R!==e||K||q||(fe(),S?.(`connected`))})}else W.active||S?.(`connected`)}),R.setOnData(e=>{ae(e,z,le,h,_?e=>{R.reportState(`running`),_(e)}:void 0,e=>re(e,{transport:R,sessionId:F,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,outboundOnly:w}))}),R.setOnClose(e=>{if(clearTimeout(X),!K){if(u(`[remote-bridge] v2 transport closed (code=${e})`),p(`tengu_bridge_repl_ws_closed`,{code:e,v2:!0}),e===401&&!q){de();return}S?.(`failed`,`Transport closed (code ${e})`)}})}async function ue(e,t){Y=t,W.start();try{let t=R.getLastSequenceNum();if(R.close(),R=await P({sessionUrl:O(e.api_base_url,F),ingressToken:e.worker_jwt,sessionId:F,epoch:e.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,initialSequenceNum:t,getAuthToken:()=>e.worker_jwt,outboundOnly:w}),K){R.close();return}$(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y),Q.scheduleFromExpiresIn(F,e.expires_in),fe()}finally{W.drop()}}async function de(){if(!q){q=!0,S?.(`reconnecting`,`JWT expired — refreshing`),u(`[remote-bridge] 401 on SSE — attempting JWT refresh`);try{let e=a();s&&await s(e??``);let t=a()??e;if(!t||K){K||S?.(`failed`,`JWT refresh failed: no OAuth token`);return}let r=await V(()=>H(F,n,t,E.http_timeout_ms),`fetchRemoteCredentials (recovery)`,E);if(!r||K){K||S?.(`failed`,`JWT refresh failed after 401`);return}G=!1,await ue(r,`auth_401_recovery`),u(`[remote-bridge] Transport rebuilt after 401`)}catch(e){u(`[remote-bridge] 401 recovery failed: ${d(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_jwt_refresh_failed`),K||S?.(`failed`,`JWT refresh failed: ${d(e)}`)}finally{q=!1}}}$(),f&&f.length>0&&W.start(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y);function fe(){let e=W.end();if(e.length===0)return;for(let t of e)z.add(t.uuid);let t=c(e).map(e=>({...e,session_id:F}));j(e)&&R.reportState(`running`),u(`[remote-bridge] Drained ${e.length} queued message(s) after flush`),R.writeBatch(t)}async function pe(e){let t=e.filter(A),n=l>0&&t.length>l?t.slice(-l):t;n.length<t.length&&u(`[remote-bridge] Capped initial flush: ${t.length} -> ${n.length} (cap=${l})`);let r=c(n).map(e=>({...e,session_id:F}));if(r.length===0)return;let i=t.at(-1);i&&oe(i)&&R.reportState(`running`),u(`[remote-bridge] Flushing ${r.length} history events`),await R.writeBatch(r)}async function me(){if(K)return;K=!0,Q.cancelAll(),clearTimeout(X),W.drop(),R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e);let t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms);if(i===401&&s)try{await s(t??``),t=a(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms)}catch(e){u(`[remote-bridge] Teardown 401 retry threw: ${d(e)}`,{level:`error`})}R.close();let o=i===`no_token`?`skipped_no_token`:i===`timeout`||i===`error`?`network_error`:i>=500?`server_5xx`:i>=400?`server_4xx`:`ok`;u(`[remote-bridge] Torn down (archive=${i})`),m(`info`,`bridge_repl_v2_teardown`),p(`tengu_bridge_repl_teardown`,{v2:!0,archive_status:o,archive_ok:typeof i==`number`&&i<400,archive_http_status:typeof i==`number`?i:void 0,archive_timeout:i===`timeout`,archive_no_token:i===`no_token`})}let he=o(me);return p(`tengu_bridge_repl_started`,{has_initial_messages:!!(f&&f.length>0),v2:!0,expires_in_s:I.expires_in,inProtectedNamespace:e()}),{bridgeSessionId:F,environmentId:``,sessionIngressUrl:I.api_base_url,writeMessages(e){let t=e.filter(e=>A(e)&&!B.has(e.uuid)&&!z.has(e.uuid));if(t.length===0)return;if(!J)for(let e of t){let t=ie(e);if(t!==void 0&&g?.(t,F)){J=!0;break}}if(W.enqueue(...t)){u(`[remote-bridge] Queued ${t.length} message(s) during flush`);return}for(let e of t)z.add(e.uuid);let n=c(t).map(e=>({...e,session_id:F}));j(t)&&R.reportState(`running`),u(`[remote-bridge] Sending ${t.length} message(s)`),R.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!z.has(e.uuid));if(t.length===0)return;for(let e of t)e.uuid&&z.add(e.uuid);let n=t.map(e=>({...e,session_id:F}));R.writeBatch(n)},sendControlRequest(e){if(q){u(`[remote-bridge] Dropping control_request during 401 recovery: ${e.request_id}`);return}let t={...e,session_id:F};e.request?.subtype===`can_use_tool`&&R.reportState(`requires_action`),R.write(t),u(`[remote-bridge] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(q){u(`[remote-bridge] Dropping control_response during 401 recovery`);return}let t={...e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_response`)},sendControlCancelRequest(e){if(q){u(`[remote-bridge] Dropping control_cancel_request during 401 recovery: ${e}`);return}let t={type:`control_cancel_request`,request_id:e,session_id:F};R.reportState(`running`),R.write(t),u(`[remote-bridge] Sent control_cancel_request request_id=${e}`)},sendResult(){if(q){u(`[remote-bridge] Dropping result during 401 recovery`);return}R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e),u(`[remote-bridge] Sent result`)},async teardown(){he(),await me()}}}async function V(e,t,n){let r=n.init_retry_max_attempts;for(let i=1;i<=r;i++){let a=await e();if(a!==null)return a;if(i<r){let e=n.init_retry_base_delay_ms*2**(i-1),a=e*n.init_retry_jitter_fraction*(2*Math.random()-1),o=Math.min(e+a,n.init_retry_max_delay_ms);u(`[remote-bridge] ${t} failed (attempt ${i}/${r}), retrying in ${Math.round(o)}ms`),await g(o)}}return null}async function H(e,t,n,r){let i=await L(e,t,n,r,T());return i?D()?{...i,api_base_url:t}:i:null}async function U(e,t,r,i,a){if(!r)return`no_token`;let o=b(e);try{let e=await n.post(`${t}/v1/sessions/${o}/archive`,{},{headers:{...z(r),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":i},timeout:a,validateStatus:()=>!0});return u(`[remote-bridge] Archive ${o} status=${e.status}`),e.status}catch(e){return u(`[remote-bridge] Archive failed: ${d(e)}`),n.isAxiosError(e)&&e.code===`ECONNABORTED`?`timeout`:`error`}}export{B as initEnvLessBridgeCore};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,d as i,f as a,nt as o,t as s,x as c}from"./src-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,d as i,f as a,nt as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{U as u,z as d}from"./debug-otxXY3j-.js";import{sS as f,uS as p}from"./loadAgentsDir-DC4jN6-f.js";import{t as m}from"./useKeybinding-DPOUuymz.js";import{a as h,t as g}from"./bridgeConfig-Di9LziJ3.js";import{n as _,r as v}from"./bridgeEnabled-z1fPRzzV.js";import{a as y,n as b}from"./types-C0nqJFkV.js";import{t as x}from"./Dialog-91X6ZGg9.js";import{t as S}from"./ListItem-DCQhApdJ.js";import{i as C,o as w,t as T}from"./cliLaunch-Citfs01Q.js";import{resolve as E}from"path";function D({onDone:e}){let[t,n]=(0,N.useState)(I),[r,i]=(0,N.useState)(null);return(0,N.useEffect)(()=>{if(F&&!F.killed){n(`running`);return}let t=!1;return(async()=>{let r=await k();if(!t){if(r){e(r,{display:`system`});return}n(`starting`);try{A(),t||(n(`running`),I=`running`,e(`Remote Control Server started. Use /remote-control-server to manage.`,{display:`system`}))}catch(r){if(!t){let t=d(r);n(`error`),i(t),I=`error`,e(`Remote Control Server failed to start: ${t}`,{display:`system`})}}}})(),()=>{t=!0}},[]),t===`running`&&F&&!F.killed?(0,P.jsx)(O,{onDone:e}):null}function O({onDone:e}){p(`remote-control-server-dialog`);let[t,n]=(0,N.useState)(2),s=L.slice(-5);function l(){j(),e(`Remote Control Server stopped.`,{display:`system`})}function u(){j();try{A(),e(`Remote Control Server restarted.`,{display:`system`})}catch(t){e(`Failed to restart: ${d(t)}`,{display:`system`})}}function f(){e(void 0,{display:`skip`})}return o({"select:next":()=>n(e=>(e+1)%3),"select:previous":()=>n(e=>(e-1+3)%3),"select:accept":()=>{t===0?l():t===1?u():f()}},{context:`Select`}),(0,P.jsx)(a,{title:`Remote Control Server`,onCancel:f,hideInputGuide:!0,children:(0,P.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,P.jsxs)(r,{children:[`Remote Control Server is`,` `,(0,P.jsx)(r,{bold:!0,color:`success`,children:`running`}),F?` (PID: ${F.pid})`:``]}),s.length>0&&(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(r,{dimColor:!0,children:`Recent logs:`}),s.map((e,t)=>(0,P.jsx)(r,{dimColor:!0,children:e},t))]}),(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(i,{isFocused:t===0,children:(0,P.jsx)(r,{children:`Stop server`})}),(0,P.jsx)(i,{isFocused:t===1,children:(0,P.jsx)(r,{children:`Restart server`})}),(0,P.jsx)(i,{isFocused:t===2,children:(0,P.jsx)(r,{children:`Continue`})})]}),(0,P.jsx)(r,{dimColor:!0,children:`Enter to select · Esc to continue`})]})})}async function k(){return await _()||(g()?null:b)}function A(){let e=E(`.`),t=w(T([`daemon`,`start`,`--dir=${e}`]),{cwd:e,stdio:[`ignore`,`pipe`,`pipe`],detached:!1});F=t,L=[],t.stdout?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
|
|
2
2
|
`);for(let e of t)L.push(e),L.length>R&&L.shift()}),t.stderr?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
|
|
3
3
|
`);for(let e of t)L.push(`[err] ${e}`),L.length>R&&L.shift()}),t.on(`exit`,(e,t)=>{F=null,I=`stopped`,L.push(`[daemon] exited (code=${e??`unknown`}, signal=${t})`)}),t.on(`error`,e=>{F=null,I=`error`,L.push(`[daemon] error: ${e.message}`)})}function j(){if(F&&!F.killed){F.kill(`SIGTERM`);let e=F.pid;setTimeout(()=>{try{e&&process.kill(e,0),F&&!F.killed&&F.kill(`SIGKILL`)}catch{}},1e4)}F=null,I=`stopped`}async function M(e,t,n){return(0,P.jsx)(D,{onDone:e})}var N,P,F,I,L,R;e((()=>{n(),N=t(n(),1),v(),h(),y(),x(),S(),f(),s(),m(),C(),u(),P=l(),F=null,I=`stopped`,L=[],R=50}))();export{M as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-CbskW5G9.js";import{Ar as a,Fr as o,Po as s,Si as c,Uo as l,yi as u}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-CbskW5G9.js";import{Ar as a,Fr as o,Po as s,Si as c,Uo as l,yi as u}from"./loadAgentsDir-DC4jN6-f.js";import{a as d,i as f,r as p}from"./bridgeConfig-Di9LziJ3.js";import{n as m,t as h}from"./generateSessionName-CXg1uVLN.js";async function g(e,n,i){if(r())return e(`Cannot rename: This session is a swarm teammate. Teammate names are set by the team leader.`,{display:`system`}),null;let o;if(!i||i.trim()===``){let t=await h(s(n.messages),n.abortController.signal);if(!t)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;o=t}else o=i.trim();let l=t(),d=a();await c(l,o,d);let m=n.getAppState().replBridgeSessionId;if(m){let e=f();import(`./createSession-CIM50iEU.js`).then(({updateBridgeSessionTitle:t})=>t(m,o,{baseUrl:p(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await u(l,o,d),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:o}})),e(`Session renamed to: ${o}`,{display:`system`}),null}e((()=>{n(),d(),l(),o(),i(),m()}))();export{g as call};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,Ln as o,Rn as s,b as c,t as l,tn as u,x as d}from"./src-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,Ln as o,Rn as s,b as c,t as l,tn as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Ct as p,cn as m,ot as h}from"./state-sIHsFpDu.js";import{o as g,s as _}from"./log-DSV4Ht5l.js";import{Fr as v,Gr as y,Jr as b,Ky as x,Lr as S,Oi as C,Ri as w,Sr as T,Wy as E,Xr as D,dv as O,gT as k,hT as A,kr as j,uv as M,zi as N,zr as P}from"./loadAgentsDir-DC4jN6-f.js";import{t as F}from"./useTerminalSize-Du-EamDN.js";import{n as I,r as L}from"./modalContext-CuTwi_eD.js";import{a as R,i as z,n as B,o as V,r as H,t as U}from"./crossProjectResume-C1I0X__e.js";function W(e){switch(e.resultType){case`sessionNotFound`:return`Session ${a.bold(e.arg)} was not found. Run ${a.bold(`/resume`)} without arguments to browse all sessions.`;case`multipleMatches`:return`Found ${e.count} sessions matching ${a.bold(e.arg)}. Run ${a.bold(`/resume`)} to pick one from the list.`}}function G({message:e,args:t,onDone:n}){return J.useEffect(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsxs)(c,{dimColor:!0,children:[r.pointer,` /resume `,t]}),(0,Y.jsx)(A,{children:(0,Y.jsx)(c,{children:e})})]})}function K({onDone:e,onResume:t}){let[n,r]=J.useState([]),[a,o]=J.useState([]),[s,l]=J.useState(!0),[f,m]=J.useState(!1),[g,_]=J.useState(!1),{rows:v}=i(),x=L(),S=J.useCallback(async(t,n)=>{l(!0);try{let i=q(t?await y():await D(n),p());if(i.length===0){e(`No conversations found to resume`);return}r(i)}catch{e(`Failed to load conversations`)}finally{l(!1)}},[e]);J.useEffect(()=>{async function e(){let e=await w(h());o(e),S(!1,e)}e()},[S]);let C=J.useCallback(()=>{let e=!g;_(e),S(e,a)},[g,S,a]);async function T(n){let r=O(j(n));if(!r){e(`Failed to resume conversation`);return}let i=P(n)?await b(n):n,o=U(i,g,a);if(o.isCrossProject){if(o.isSameRepoWorktree){m(!0),t(r,i,`slash_command_picker`);return}let n=await u(o.command);n&&process.stdout.write(n),e([``,`This conversation is from a different directory.`,``,`To resume, run:`,` ${o.command}`,``,`(Command copied to clipboard)`,``].join(`
|
|
2
2
|
`),{display:`user`});return}m(!0),t(r,i,`slash_command_picker`)}function k(){e(`Resume cancelled`,{display:`system`})}return s?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(c,{children:` Loading conversations…`})]}):f?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(c,{children:` Resuming conversation…`})]}):(0,Y.jsx)(R,{logs:n,maxHeight:x?Math.floor(v/2):v-2,onCancel:k,onSelect:T,onLogsChanged:()=>S(g,a),showAllProjects:g,onToggleAllProjects:C,onAgenticSearch:H})}function q(e,t){return e.filter(e=>!e.isSidechain&&j(e)!==t)}var J,Y,X;e((()=>{o(),n(),J=t(s(),1),m(),V(),k(),x(),I(),F(),l(),z(),B(),N(),g(),v(),M(),Y=f(),X=async(e,t,n)=>{let r=async(n,r,i)=>{try{await t.resume?.(n,r,i),e(void 0,{display:`skip`})}catch(t){_(t),e(`Failed to resume: ${t.message}`)}},i=n?.trim();if(!i)return(0,Y.jsx)(K,{onDone:e,onResume:r},Date.now());let a=await D(await w(h()));if(a.length===0){let t=`No conversations found to resume.`;return(0,Y.jsx)(G,{message:t,args:i,onDone:()=>e(t)})}let o=O(i);if(o){let e=a.filter(e=>j(e)===o).sort((e,t)=>t.modified.getTime()-e.modified.getTime());if(e.length>0){let t=e[0];return r(o,P(t)?await b(t):t,`slash_command_session_id`),null}let t=await T(o);if(t)return r(o,t,`slash_command_session_id`),null}if(S()){let t=await C(i,{exact:!0});if(t.length===1){let e=t[0],n=j(e);if(n)return r(n,P(e)?await b(e):e,`slash_command_title`),null}if(t.length>1){let n=W({resultType:`multipleMatches`,arg:i,count:t.length});return(0,Y.jsx)(G,{message:n,args:i,onDone:()=>e(n)})}}let s=W({resultType:`sessionNotFound`,arg:i});return(0,Y.jsx)(G,{message:s,args:i,onDone:()=>e(s)})}}))();export{X as call,q as filterResumableSessions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{Gi as r,aO as i,iO as a,na as o}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{Gi as r,aO as i,iO as a,na as o}from"./loadAgentsDir-DC4jN6-f.js";import{r as s,t as c}from"./featureCheck-j7P30mry.js";import{a as l,c as u,i as d,l as f,n as p,o as m,r as ee,s as te,u as ne}from"./instinctParser-BMtAMLSx.js";import{C as h,S as g,b as _,c as re,f as ie,i as ae,m as oe,o as v,r as se,u as y}from"./skillGenerator-BcNv-VZ5.js";import{a as ce,i as b,l as le,n as x,o as ue,t as de}from"./observationStore-Bi1rRKcD.js";import{a as fe,s as pe}from"./projectContext-2CzYVggO.js";import{d as me,i as he,l as ge,p as _e}from"./sessionObserver-rd6RRTzc.js";import{dirname as ve,join as S}from"node:path";import{existsSync as C}from"node:fs";import{randomBytes as ye}from"node:crypto";import{mkdir as w,readFile as be,readdir as T,rename as xe,unlink as Se,writeFile as E}from"node:fs/promises";function D(e,t){if(e.length===0)throw Error(`Cannot generate a command draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Ce(e)),i=Ee(e),a=t?.description??we(e),o=k(r,n,t),s=Te({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function O(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),r(),t)}function k(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`commands`):r?.globalCommandsDir??S(t(),`commands`)}function Ce(e){return g([`learned`,...De(e,4)].join(`-`))||`learned-command`}function we(e){return(e[0]?.trigger??`Reuse the learned workflow`).replace(/\s+/g,` `).slice(0,120)}function Te(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# /${t}`,``,`## When to use`,``,i.map(e=>`- ${e.trigger}`).join(`
|
|
2
2
|
`),``,`## Steps`,``,i.map(e=>`- ${e.action}`).join(`
|
|
3
3
|
`),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).join(`
|
|
4
4
|
`),``].join(`
|
|
@@ -6,5 +6,5 @@ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWe
|
|
|
6
6
|
`),``,`## Playbook`,``,i.map(e=>`- ${e.action}`).join(`
|
|
7
7
|
`),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,20).join(`
|
|
8
8
|
`),``].join(`
|
|
9
|
-
`)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),o(),_()}));function F(e){let t=new Map;for(let n of e){if(n.status!==`active`&&n.status!==`pending`)continue;let e=`${n.domain}:${Pe(n.trigger)}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return Array.from(t.values()).filter(e=>e.length>=f().minClusterSize).map(e=>{let t=e.reduce((e,t)=>e+t.confidence,0)/e.length;return{target:I(e),trigger:e[0]?.trigger??`learned pattern`,domain:e[0]?.domain??`project`,instincts:e,averageConfidence:Number(t.toFixed(2))}}).sort((e,t)=>t.averageConfidence-e.averageConfidence)}function I(e){let t=Array.isArray(e)?e:e.instincts,n=t.map(e=>`${e.trigger} ${e.action}`).join(` `).toLowerCase();return/user asks|explicitly request|command|run /.test(n)?`command`:t.length>=4&&/(debug|investigate|research|multi-step)/.test(n)?`agent`:`skill`}function Ne(e,t){return F(e).filter(e=>e.target===`skill`&&h(e.instincts)).map(e=>ae(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function L(e,t){return F(e).filter(e=>e.target===`command`&&h(e.instincts)).map(e=>D(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function R(e,t){return F(e).filter(e=>e.target===`agent`&&h(e.instincts)).map(e=>j(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function Pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,` `).split(/\s+/).filter(Boolean).slice(0,6).join(` `)}var z=e((()=>{_(),v(),A(),P(),ne()}));function B(e){let t=x(e),n=e?.project;return(e?.scope??n?.scope??`project`)===`global`||!n||n.projectId===`global`?S(t,`global`,`instincts`,`personal`):S(t,`projects`,n.projectId,`instincts`,`personal`)}async function V(e,t){let n=m(e);await w(B(t),{recursive:!0});let r=He(n.id,t),i=`${r}.${ye(6).toString(`hex`)}.tmp`;return await E(i,u(n)),await xe(i,r),n}async function H(e){let t=B(e),n=[];try{n=await T(t)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.filter(e=>e.endsWith(`.json`))){let n=await be(S(t,e),`utf8`);r.push(te(n))}return r.sort((e,t)=>e.id.localeCompare(t.id))}function Fe(e,t){let n=U.then(()=>Ie(e,t));return U=n.catch(()=>{}),n}async function Ie(e,t){let n=await H(t),r=n.find(t=>t.id===e.id)??n.find(t=>t.trigger.toLowerCase()===e.trigger.toLowerCase()&&l(t,e)),i=new Date().toISOString();if(!r)return V(e,t);let a=l(r,e),o=a?-.1:ze(e.evidenceOutcome),s=p(r.confidence+o),c=Le(r.status,s,a);return V(m({...r,confidence:s,evidence:[...r.evidence,...e.evidence],evidenceOutcome:e.evidenceOutcome??r.evidenceOutcome,observationIds:[...r.observationIds??[],...e.observationIds??[]],updatedAt:i,status:c}),t)}function Le(e,t,n){return n&&t<.3?`conflict-hold`:e===`conflict-hold`&&t>=.5||e===`pending`&&t>=.8?`active`:e}async function Re(e){let t=await H(e),n=Date.now(),r=0;for(let i of t){if(i.status!==`pending`&&i.status!==`active`)continue;let t=Date.parse(i.updatedAt);if(Number.isNaN(t))continue;let a=Math.floor((n-t)/We);if(a<1)continue;let o=-Ue*a,s=p(i.confidence+o);s!==i.confidence&&(await V(m({...i,confidence:s,updatedAt:new Date(n).toISOString()}),e),r+=1)}return r}function ze(e){return e===`failure`?-.05:.05}async function Be(e,t){let n=await H(t);return await w(ve(e),{recursive:!0}),await E(e,`${JSON.stringify(n,null,2)}\n`),n}async function Ve(e,t){let n=await H(t),r=Date.now()-e*24*60*60*1e3,i=[];for(let e of n)e.status===`pending`&&Date.parse(e.updatedAt)<r&&(await Se(He(e.id,t)),i.push(e));return i}function He(e,t){return S(B(t),`${e}.json`)}var U,Ue,We,W=e((()=>{b(),d(),U=Promise.resolve(),Ue=.02,We=10080*60*1e3}));function Ge(e){if(G.add(e),G.size>Xe){let e=G.size-Ze,t=G.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;G.delete(e.value)}}}function Ke(e,t=2,n=.8){let r=new Map;for(let t of e){if(t.scope!==`project`)continue;let e=r.get(t.id)??[];e.push(t),r.set(t.id,e)}return Array.from(r.entries()).flatMap(([e,r])=>{let i=Array.from(new Set(r.map(e=>e.projectId).filter(Boolean))),a=r.reduce((e,t)=>e+t.confidence,0)/r.length;return i.length>=t&&a>=n?[{instinctId:e,projectIds:i,averageConfidence:Number(a.toFixed(2))}]:[]})}async function qe(e={}){let t=e.minProjects??2,n=e.minConfidence??.8,r=await Je(e.rootDir),i=Ke(r,t,n),a=[];for(let t of i){if(G.has(t.instinctId))continue;let n=r.find(e=>e.id===t.instinctId);n&&(await V({...n,scope:`global`,projectId:void 0,projectName:void 0,confidence:t.averageConfidence,updatedAt:new Date().toISOString()},{rootDir:e.rootDir,scope:`global`,project:Ye(e.rootDir)}),Ge(t.instinctId),a.push(t))}return a}async function Je(e){let t=S(x(e?{rootDir:e}:void 0),`projects`);if(!C(t))return[];let n=await T(t,{withFileTypes:!0}),r=[];for(let i of n){if(!i.isDirectory())continue;let n=await H({rootDir:e,project:{projectId:i.name,projectName:i.name,scope:`project`,source:`git_root`,cwd:t,storageDir:S(t,i.name)},scope:`project`});r.push(...n)}return r}function Ye(e){let t=x(e?{rootDir:e}:void 0);return{projectId:`global`,projectName:`Global`,scope:`global`,source:`global`,cwd:t,storageDir:S(t,`global`)}}var Xe,Ze,G,Qe=e((()=>{W(),b(),Xe=256,Ze=192,G=new Set}));function $e(){X=0,Z=0,Q.clear()}function et(){return J}function tt(){if(!q){q=!0;try{_e()}catch{}i(it),nt().catch(()=>{})}}async function nt(){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE)return;let e={project:pe(process.cwd())};await Promise.allSettled([Re(e),ce(e),Ve(30,e)])}function rt(e){try{let t=x();return e.startsWith(t)}catch{return!1}}async function it(e){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE||!e.querySource?.startsWith(`repl_main_thread`)||e.toolUseContext.agentId)return;let t=process.cwd();if(rt(t))return;let n=pe(t),r={project:n};++J;let i=[];for(let t of st(e.messages,n))i.push(await de(t,r));let a=(await ue(r)).filter(e=>e.source===`tool-hook`&&e.sessionId===`runtime-session`&&typeof e.timestamp==`string`&&e.timestamp>Y);i.push(...a);for(let e of a)e.timestamp>Y&&(Y=e.timestamp);if(i.length===0)return;let o=Date.now(),{llm:c}=f(),l=i.length>=5&&X<c.maxCallsPerSession&&o-Z>=c.cooldownMs,u;if(l)X++,Z=o,u=await ge(i,{project:n});else{let{heuristicObserverBackend:e}=await import(`./sessionObserver-
|
|
9
|
+
`)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),o(),_()}));function F(e){let t=new Map;for(let n of e){if(n.status!==`active`&&n.status!==`pending`)continue;let e=`${n.domain}:${Pe(n.trigger)}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return Array.from(t.values()).filter(e=>e.length>=f().minClusterSize).map(e=>{let t=e.reduce((e,t)=>e+t.confidence,0)/e.length;return{target:I(e),trigger:e[0]?.trigger??`learned pattern`,domain:e[0]?.domain??`project`,instincts:e,averageConfidence:Number(t.toFixed(2))}}).sort((e,t)=>t.averageConfidence-e.averageConfidence)}function I(e){let t=Array.isArray(e)?e:e.instincts,n=t.map(e=>`${e.trigger} ${e.action}`).join(` `).toLowerCase();return/user asks|explicitly request|command|run /.test(n)?`command`:t.length>=4&&/(debug|investigate|research|multi-step)/.test(n)?`agent`:`skill`}function Ne(e,t){return F(e).filter(e=>e.target===`skill`&&h(e.instincts)).map(e=>ae(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function L(e,t){return F(e).filter(e=>e.target===`command`&&h(e.instincts)).map(e=>D(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function R(e,t){return F(e).filter(e=>e.target===`agent`&&h(e.instincts)).map(e=>j(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function Pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,` `).split(/\s+/).filter(Boolean).slice(0,6).join(` `)}var z=e((()=>{_(),v(),A(),P(),ne()}));function B(e){let t=x(e),n=e?.project;return(e?.scope??n?.scope??`project`)===`global`||!n||n.projectId===`global`?S(t,`global`,`instincts`,`personal`):S(t,`projects`,n.projectId,`instincts`,`personal`)}async function V(e,t){let n=m(e);await w(B(t),{recursive:!0});let r=He(n.id,t),i=`${r}.${ye(6).toString(`hex`)}.tmp`;return await E(i,u(n)),await xe(i,r),n}async function H(e){let t=B(e),n=[];try{n=await T(t)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.filter(e=>e.endsWith(`.json`))){let n=await be(S(t,e),`utf8`);r.push(te(n))}return r.sort((e,t)=>e.id.localeCompare(t.id))}function Fe(e,t){let n=U.then(()=>Ie(e,t));return U=n.catch(()=>{}),n}async function Ie(e,t){let n=await H(t),r=n.find(t=>t.id===e.id)??n.find(t=>t.trigger.toLowerCase()===e.trigger.toLowerCase()&&l(t,e)),i=new Date().toISOString();if(!r)return V(e,t);let a=l(r,e),o=a?-.1:ze(e.evidenceOutcome),s=p(r.confidence+o),c=Le(r.status,s,a);return V(m({...r,confidence:s,evidence:[...r.evidence,...e.evidence],evidenceOutcome:e.evidenceOutcome??r.evidenceOutcome,observationIds:[...r.observationIds??[],...e.observationIds??[]],updatedAt:i,status:c}),t)}function Le(e,t,n){return n&&t<.3?`conflict-hold`:e===`conflict-hold`&&t>=.5||e===`pending`&&t>=.8?`active`:e}async function Re(e){let t=await H(e),n=Date.now(),r=0;for(let i of t){if(i.status!==`pending`&&i.status!==`active`)continue;let t=Date.parse(i.updatedAt);if(Number.isNaN(t))continue;let a=Math.floor((n-t)/We);if(a<1)continue;let o=-Ue*a,s=p(i.confidence+o);s!==i.confidence&&(await V(m({...i,confidence:s,updatedAt:new Date(n).toISOString()}),e),r+=1)}return r}function ze(e){return e===`failure`?-.05:.05}async function Be(e,t){let n=await H(t);return await w(ve(e),{recursive:!0}),await E(e,`${JSON.stringify(n,null,2)}\n`),n}async function Ve(e,t){let n=await H(t),r=Date.now()-e*24*60*60*1e3,i=[];for(let e of n)e.status===`pending`&&Date.parse(e.updatedAt)<r&&(await Se(He(e.id,t)),i.push(e));return i}function He(e,t){return S(B(t),`${e}.json`)}var U,Ue,We,W=e((()=>{b(),d(),U=Promise.resolve(),Ue=.02,We=10080*60*1e3}));function Ge(e){if(G.add(e),G.size>Xe){let e=G.size-Ze,t=G.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;G.delete(e.value)}}}function Ke(e,t=2,n=.8){let r=new Map;for(let t of e){if(t.scope!==`project`)continue;let e=r.get(t.id)??[];e.push(t),r.set(t.id,e)}return Array.from(r.entries()).flatMap(([e,r])=>{let i=Array.from(new Set(r.map(e=>e.projectId).filter(Boolean))),a=r.reduce((e,t)=>e+t.confidence,0)/r.length;return i.length>=t&&a>=n?[{instinctId:e,projectIds:i,averageConfidence:Number(a.toFixed(2))}]:[]})}async function qe(e={}){let t=e.minProjects??2,n=e.minConfidence??.8,r=await Je(e.rootDir),i=Ke(r,t,n),a=[];for(let t of i){if(G.has(t.instinctId))continue;let n=r.find(e=>e.id===t.instinctId);n&&(await V({...n,scope:`global`,projectId:void 0,projectName:void 0,confidence:t.averageConfidence,updatedAt:new Date().toISOString()},{rootDir:e.rootDir,scope:`global`,project:Ye(e.rootDir)}),Ge(t.instinctId),a.push(t))}return a}async function Je(e){let t=S(x(e?{rootDir:e}:void 0),`projects`);if(!C(t))return[];let n=await T(t,{withFileTypes:!0}),r=[];for(let i of n){if(!i.isDirectory())continue;let n=await H({rootDir:e,project:{projectId:i.name,projectName:i.name,scope:`project`,source:`git_root`,cwd:t,storageDir:S(t,i.name)},scope:`project`});r.push(...n)}return r}function Ye(e){let t=x(e?{rootDir:e}:void 0);return{projectId:`global`,projectName:`Global`,scope:`global`,source:`global`,cwd:t,storageDir:S(t,`global`)}}var Xe,Ze,G,Qe=e((()=>{W(),b(),Xe=256,Ze=192,G=new Set}));function $e(){X=0,Z=0,Q.clear()}function et(){return J}function tt(){if(!q){q=!0;try{_e()}catch{}i(it),nt().catch(()=>{})}}async function nt(){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE)return;let e={project:pe(process.cwd())};await Promise.allSettled([Re(e),ce(e),Ve(30,e)])}function rt(e){try{let t=x();return e.startsWith(t)}catch{return!1}}async function it(e){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE||!e.querySource?.startsWith(`repl_main_thread`)||e.toolUseContext.agentId)return;let t=process.cwd();if(rt(t))return;let n=pe(t),r={project:n};++J;let i=[];for(let t of st(e.messages,n))i.push(await de(t,r));let a=(await ue(r)).filter(e=>e.source===`tool-hook`&&e.sessionId===`runtime-session`&&typeof e.timestamp==`string`&&e.timestamp>Y);i.push(...a);for(let e of a)e.timestamp>Y&&(Y=e.timestamp);if(i.length===0)return;let o=Date.now(),{llm:c}=f(),l=i.length>=5&&X<c.maxCallsPerSession&&o-Z>=c.cooldownMs,u;if(l)X++,Z=o,u=await ge(i,{project:n});else{let{heuristicObserverBackend:e}=await import(`./sessionObserver-BwAfzGUg.js`),t=e.analyze(i,{project:n});u=Array.isArray(t)?t:await t}for(let e of u)await Fe(ee(e),r);await ot(r)}function at(){J=0,Y=``,$e()}async function ot(e){let n=await H(e),r=process.cwd(),i=[S(r,`.claude`,`skills`),S(t(),`skills`)],a=F(n).filter(e=>e.target===`skill`&&h(e.instincts));for(let e of a){let t=await se(e.instincts,{cwd:r,scope:e.instincts[0]?.scope??`project`},i);if(t.action===`append-evidence`)continue;let n=t.draft;C(S(n.outputPath,`SKILL.md`))||await re(ie(n,await y(`skill`,n,i)))}let o=L(n,{cwd:r});for(let e of o)(await y(`command`,e,[S(r,`.claude`,`commands`),S(t(),`commands`)])).length>0||await O(e);let s=R(n,{cwd:r});for(let e of s)(await y(`agent`,e,[S(r,`.claude`,`agents`),S(t(),`agents`)])).length>0||await M(e);await qe()}function st(e,t){let n=K,r={sessionId:n,projectId:t.projectId,projectName:t.projectName,cwd:t.cwd,timestamp:new Date().toISOString(),source:`hook`};return e.flatMap(e=>{let t=`${n}:${String(e.uuid)}`;if(Q.has(t))return[];if(Q.add(t),Q.size>dt){let e=Q.size-$,t=Q.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;Q.delete(e.value)}}if(e.type===`user`){let t=ut(e.message?.content);if(t.length>0)return t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_complete`,toolName:e.toolName,toolOutput:e.output,outcome:e.isError?`failure`:`success`}));let n=ct(e.message?.content);return n.trim()?[{...r,id:crypto.randomUUID(),event:`user_message`,messageText:n}]:[]}if(e.type===`assistant`){let t=lt(e.message?.content),n=ct(e.message?.content);return[...t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_start`,toolName:e.toolName,toolInput:e.input})),...n.trim()?[{...r,id:crypto.randomUUID(),event:`assistant_message`,messageText:n}]:[]]}return[]})}function ct(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
|
|
10
10
|
`):``}function lt(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_use`?[{toolName:String(t.name??`unknown_tool`),input:le(t.input)}]:[]}):[]}function ut(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_result`?[{toolName:String(t.name??t.tool_name??`unknown_tool`),output:le(t.content),isError:t.is_error===!0}]:[]}):[]}var K,q,J,Y,X,Z,Q,dt,$,ft=e((()=>{a(),ne(),c(),b(),fe(),he(),d(),me(),W(),oe(),z(),v(),_(),A(),P(),Qe(),n(),K=`runtime-session`,q=!1,J=0,Y=``,X=0,Z=0,Q=new Set,dt=1e3,$=500}));export{O as A,j as C,D,M as E,k as O,z as S,P as T,I as _,$e as a,L as b,qe as c,Be as d,W as f,Fe as g,V as h,ft as i,A as k,Ke as l,Ve as m,et as n,at as o,H as p,tt as r,it as s,K as t,Qe as u,F as v,N as w,Ne as x,R as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./runtimeObserver-
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./runtimeObserver-ByTBtmBf.js";t();export{o as RUNTIME_SESSION_ID,n as getRuntimeTurn,i as initSkillLearning,e as resetRuntimeLLMBookkeeping,r as resetRuntimeObserverForTest,a as runSkillLearningPostSampling};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FA as e,MA as t}from"./loadAgentsDir-DC4jN6-f.js";e();export{t as SandboxManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,T as r,b as i,i as a,n as o,nt as s,p as c,r as l,t as u,v as d,x as f}from"./src-KjMLauwe.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,j as h}from"./state-sIHsFpDu.js";import{Za as g,no as _,oo as v}from"./paths-4ZWdjPP4.js";import{i as y,o as b}from"./platform-mh9ypxS8.js";import{FA as x,MA as S,NA as C,RA as w,aS as T,oS as E}from"./loadAgentsDir-CQF8qhne.js";import{t as D}from"./useKeybinding-DOjEx42R.js";import{relative as O}from"path";function k(){let e=S.isSandboxingEnabled(),t=S.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(f,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(i,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=S.getFsReadConfig(),a=S.getFsWriteConfig(),o=S.getNetworkRestrictionConfig(),s=S.getAllowUnixSockets(),c=S.getExcludedCommands(),l=S.getLinuxGlobPatternWarnings();return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(f,{flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(i,{dimColor:!0,children:c.length>0?c.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),a.allowOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,a.allowOnly.join(`, `)]}),a.denyWithinAllow.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied within allowed: `,a.denyWithinAllow.join(`, `)]})]}),(o.allowedHosts&&o.allowedHosts.length>0||o.deniedHosts&&o.deniedHosts.length>0)&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(i,{bold:!0,color:`permission`,children:[`Network Restrictions`,w()?` (Managed)`:``,`:`]}),o.allowedHosts&&o.allowedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,o.allowedHosts.join(`, `)]}),o.deniedHosts&&o.deniedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,o.deniedHosts.join(`, `)]})]}),s&&s.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(i,{dimColor:!0,children:s.join(`, `)})]}),l.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(i,{dimColor:!0,children:[`The following patterns will be ignored: `,l.slice(0,3).join(`, `),l.length>3&&` (${l.length-3} more)`]})]}),n]})}var A,j=e((()=>{n(),u(),x(),A=p()}));function M({depCheck:e}){let t=y()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),a=e.errors.some(e=>e.includes(`socat`)),o=e.warnings.length>0,s=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(f,{flexDirection:`column`,children:(0,N.jsxs)(i,{children:[`seatbelt: `,(0,N.jsx)(i,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`ripgrep (rg): `,n?(0,N.jsx)(i,{color:`error`,children:`not found`}):(0,N.jsx)(i,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`bubblewrap (bwrap):`,` `,r?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),r&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`socat: `,a?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),a&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`seccomp filter:`,` `,o?(0,N.jsx)(i,{color:`warning`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`}),o&&(0,N.jsx)(i,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),o&&(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),s.map(e=>(0,N.jsx)(i,{color:`error`,children:e},e))]})}var N,P=e((()=>{n(),u(),b(),N=p()}));function F({onComplete:e}){let t=S.isSandboxingEnabled(),n=S.areSandboxSettingsLockedByPolicy(),r=S.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(i,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(f,{marginTop:1,children:(0,L.jsxs)(i,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:r?`open`:`closed`}):(0,L.jsx)(f,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:n}){let[o]=r(),{headerFocused:s,focusHeader:c}=a(),l=d(`success`,o)(`(current)`),u=[{label:n===`open`?`Allow unsandboxed fallback ${l}`:`Allow unsandboxed fallback`,value:`open`},{label:n===`closed`?`Strict sandbox mode ${l}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await S.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(f,{marginBottom:1,children:(0,L.jsx)(i,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(T,{options:u,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,L.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{n(),u(),x(),E(),L=p()}));function z({onComplete:e,depCheck:t}){let[n]=r(),i=S.isSandboxingEnabled(),a=S.isAutoAllowBashIfSandboxedEnabled(),u=t.warnings.length>0,f=_().sandbox?.network?.allowAllUnixSockets,p=u&&!f,m=i?a?`auto-allow`:`regular`:`disabled`,h=d(`success`,n)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await S.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}s({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(o,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(o,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(o,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(c,{color:`permission`,children:(0,V.jsx)(l,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[y,...u?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:n,onSelect:r,onComplete:o}){let{headerFocused:s,focusHeader:c}=a();return(0,V.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(T,{options:n,onChange:r,onCancel:()=>o(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,V.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(i,{dimColor:!0,children:[(0,V.jsx)(i,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{n(),u(),D(),x(),v(),E(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=_().theme||`light`,i=y();if(!S.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(d(`error`,r)(t)),null}let a=S.checkDependencies();if(!S.isPlatformInEnabledList())return e(d(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(S.areSandboxSettingsLockedByPolicy())return e(d(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(d(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);C(n);let i=g(`localSettings`),a=i?O(h(),i):`.claude/settings.local.json`;return e(d(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(d(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{n(),m(),H(),u(),b(),x(),v(),W=p()}))();export{U as call};
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,T as r,b as i,i as a,n as o,nt as s,p as c,r as l,t as u,v as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,j as h}from"./state-sIHsFpDu.js";import{Za as g,no as _,oo as v}from"./paths-CEAy4QCs.js";import{i as y,o as b}from"./platform-mh9ypxS8.js";import{FA as x,MA as S,NA as C,RA as w,aS as T,oS as E}from"./loadAgentsDir-DC4jN6-f.js";import{t as D}from"./useKeybinding-DPOUuymz.js";import{relative as O}from"path";function k(){let e=S.isSandboxingEnabled(),t=S.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(f,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(i,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=S.getFsReadConfig(),a=S.getFsWriteConfig(),o=S.getNetworkRestrictionConfig(),s=S.getAllowUnixSockets(),c=S.getExcludedCommands(),l=S.getLinuxGlobPatternWarnings();return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(f,{flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(i,{dimColor:!0,children:c.length>0?c.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),a.allowOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,a.allowOnly.join(`, `)]}),a.denyWithinAllow.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied within allowed: `,a.denyWithinAllow.join(`, `)]})]}),(o.allowedHosts&&o.allowedHosts.length>0||o.deniedHosts&&o.deniedHosts.length>0)&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(i,{bold:!0,color:`permission`,children:[`Network Restrictions`,w()?` (Managed)`:``,`:`]}),o.allowedHosts&&o.allowedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,o.allowedHosts.join(`, `)]}),o.deniedHosts&&o.deniedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,o.deniedHosts.join(`, `)]})]}),s&&s.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(i,{dimColor:!0,children:s.join(`, `)})]}),l.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(i,{dimColor:!0,children:[`The following patterns will be ignored: `,l.slice(0,3).join(`, `),l.length>3&&` (${l.length-3} more)`]})]}),n]})}var A,j=e((()=>{n(),u(),x(),A=p()}));function M({depCheck:e}){let t=y()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),a=e.errors.some(e=>e.includes(`socat`)),o=e.warnings.length>0,s=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(f,{flexDirection:`column`,children:(0,N.jsxs)(i,{children:[`seatbelt: `,(0,N.jsx)(i,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`ripgrep (rg): `,n?(0,N.jsx)(i,{color:`error`,children:`not found`}):(0,N.jsx)(i,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`bubblewrap (bwrap):`,` `,r?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),r&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`socat: `,a?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),a&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`seccomp filter:`,` `,o?(0,N.jsx)(i,{color:`warning`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`}),o&&(0,N.jsx)(i,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),o&&(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),s.map(e=>(0,N.jsx)(i,{color:`error`,children:e},e))]})}var N,P=e((()=>{n(),u(),b(),N=p()}));function F({onComplete:e}){let t=S.isSandboxingEnabled(),n=S.areSandboxSettingsLockedByPolicy(),r=S.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(i,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(f,{marginTop:1,children:(0,L.jsxs)(i,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:r?`open`:`closed`}):(0,L.jsx)(f,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:n}){let[o]=r(),{headerFocused:s,focusHeader:c}=a(),l=d(`success`,o)(`(current)`),u=[{label:n===`open`?`Allow unsandboxed fallback ${l}`:`Allow unsandboxed fallback`,value:`open`},{label:n===`closed`?`Strict sandbox mode ${l}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await S.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(f,{marginBottom:1,children:(0,L.jsx)(i,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(T,{options:u,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,L.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{n(),u(),x(),E(),L=p()}));function z({onComplete:e,depCheck:t}){let[n]=r(),i=S.isSandboxingEnabled(),a=S.isAutoAllowBashIfSandboxedEnabled(),u=t.warnings.length>0,f=_().sandbox?.network?.allowAllUnixSockets,p=u&&!f,m=i?a?`auto-allow`:`regular`:`disabled`,h=d(`success`,n)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await S.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}s({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(o,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(o,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(o,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(c,{color:`permission`,children:(0,V.jsx)(l,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[y,...u?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:n,onSelect:r,onComplete:o}){let{headerFocused:s,focusHeader:c}=a();return(0,V.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(T,{options:n,onChange:r,onCancel:()=>o(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,V.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(i,{dimColor:!0,children:[(0,V.jsx)(i,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{n(),u(),D(),x(),v(),E(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=_().theme||`light`,i=y();if(!S.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(d(`error`,r)(t)),null}let a=S.checkDependencies();if(!S.isPlatformInEnabledList())return e(d(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(S.areSandboxSettingsLockedByPolicy())return e(d(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(d(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);C(n);let i=g(`localSettings`),a=i?O(h(),i):`.claude/settings.local.json`;return e(d(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(d(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{n(),m(),H(),u(),b(),x(),v(),W=p()}))();export{U as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{rl as e,tl as t}from"./loadAgentsDir-DC4jN6-f.js";t();export{e as isSearchExtraToolsEnabled};
|