claude-code-best 2.8.1 → 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/dist/chunks/{AddWorkspaceDirectory-CNyPaerF.js → AddWorkspaceDirectory-BCCbaWoh.js} +1 -1
- package/dist/chunks/{App-hiKxO6UA.js → App-BIAYUFvT.js} +1 -1
- package/dist/chunks/{ApproveApiKey-Cd43j9Wa.js → ApproveApiKey-DRARgWX3.js} +1 -1
- package/dist/chunks/ApproveApiKey-Do-Qth0X.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-C8OxwSGM.js → AssistantSessionChooser-eUrEGDlX.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-VKhuyQLe.js → BackgroundTasksDialog-DSeAqhMC.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-Ddjzluka.js → BypassPermissionsModeDialog-8z7R5EpU.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-BhvrEJlm.js → ClaudeInChromeOnboarding-B7mDm5Hb.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-DoNd72PS.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-DVUOZjb0.js → DesktopHandoff-Ce0nE7D6.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-DJbRHAIy.js → DevChannelsDialog-mt0lA5wR.js} +1 -1
- package/dist/chunks/{DiffDialog-D0RK4t-9.js → DiffDialog-BfSnz8L-.js} +1 -1
- package/dist/chunks/{Doctor-0Nv3L1Oy.js → Doctor-BOVjkAKn.js} +1 -1
- package/dist/chunks/Doctor-osWC5WVY.js +1 -0
- package/dist/chunks/{ExitFlow-BPbtGcEg.js → ExitFlow-C3BGvwv-.js} +1 -1
- package/dist/chunks/{Feedback-BSagYjmf.js → Feedback-BtZb1A8b.js} +1 -1
- package/dist/chunks/Grove-DyC_Wrfx.js +1 -0
- package/dist/chunks/{Grove-BrP9JNpK.js → Grove-HpMLktXp.js} +1 -1
- package/dist/chunks/{HybridTransport-DLaxmXCR.js → HybridTransport-COk7jAC7.js} +1 -1
- package/dist/chunks/{ITermBackend-tXN55G2D.js → ITermBackend-BlwyeN8U.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-BzFQdfwu.js → InvalidConfigDialog-QVIRDXwA.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-KFg61s41.js → InvalidSettingsDialog-CZRZm0oa.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-N-oJu3qn.js → MCPConnectionManager-2Fulnp8q.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-DsHSSgsx.js → McpParsingWarnings-DWMO0bV6.js} +1 -1
- package/dist/chunks/{MessageSelector-D10JMnsc.js → MessageSelector-B4jJQ-KQ.js} +1 -1
- package/dist/chunks/{Messages-CQdQJ2AA.js → Messages-ltcn1Qkf.js} +2 -2
- package/dist/chunks/{Onboarding-DBJX6Cnf.js → Onboarding-CHcND5Tt.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-B4beCEX2.js → OverageCreditUpsell-CMBqZrnz.js} +1 -1
- package/dist/chunks/{PluginSettings-BBrFCSpQ.js → PluginSettings-DIS_qrVA.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-Bjjr3tYl.js → PromptInputHelpMenu-CAwbW7z2.js} +1 -1
- package/dist/chunks/{QueryEngine-BSk8-8vB.js → QueryEngine-BQs519Rb.js} +1 -1
- package/dist/chunks/REPL-DJh_wVWI.js +1 -0
- package/dist/chunks/{REPL-CXcCBQuz.js → REPL-Dx3SPe95.js} +6 -6
- package/dist/chunks/{RemoteCallout-CuxqarhC.js → RemoteCallout-CwI1mLQ9.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-BhPF41Wn.js → RemoteSessionManager-BXMBhfQD.js} +1 -1
- package/dist/chunks/{ResumeConversation-hmIOkZ2U.js → ResumeConversation-BK7L_YBI.js} +1 -1
- package/dist/chunks/{SSETransport-8yaTbdSK.js → SSETransport-Co-0nMlR.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +1 -0
- package/dist/chunks/SentryErrorBoundary-DLML64E_.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-ydwbrVTx.js → SentryErrorBoundary-kEgE7qeH.js} +1 -1
- package/dist/chunks/{Settings-BSbzT25q.js → Settings-DOve7mW1.js} +2 -2
- package/dist/chunks/{TeleportProgress-CNcl_DxR.js → TeleportProgress--n-u7MYY.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-DJc8_mjE.js → TeleportRepoMismatchDialog-CzQzdYb2.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-Cw438s-J.js → TeleportResumeWrapper-CtANoO1Z.js} +1 -1
- package/dist/chunks/{ThemePicker-8X6yAwuQ.js → ThemePicker-kBt6obJb.js} +1 -1
- package/dist/chunks/{TmuxBackend-CqAnVFoI.js → TmuxBackend-Q5xdOkW4.js} +1 -1
- package/dist/chunks/{TrustDialog-Ch1FJzxi.js → TrustDialog-CoCFqyRD.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-sgfvJPWZ.js → ValidationErrorsList-CL42YlaS.js} +1 -1
- package/dist/chunks/{WelcomeV2-Bu8l3w90.js → WelcomeV2-B0d9sH1c.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-Bvq7nHOp.js → WindowsTerminalBackend-CLSeqqHh.js} +1 -1
- package/dist/chunks/{add-dir-DqrRNnxe.js → add-dir-IrADCHV-.js} +1 -1
- package/dist/chunks/{agentDisplay-DcxzWi1v.js → agentDisplay-BUXpQhYh.js} +1 -1
- package/dist/chunks/{agents-QqLm1wcM.js → agents-BqQtaTaM.js} +1 -1
- package/dist/chunks/{agents-Do1ynqiW.js → agents-Cx0f6suK.js} +1 -1
- package/dist/chunks/{ant-D5gD6O-r.js → ant-BUkS8Em4.js} +1 -1
- package/dist/chunks/api-CoBZPEi-.js +1 -0
- package/dist/chunks/{api-hcsOinLV.js → api-Cy1N7XAQ.js} +1 -1
- package/dist/chunks/assistant-B2_c5C4T.js +1 -0
- package/dist/chunks/{assistant-DkECAILU.js → assistant-BGzd9a5x.js} +1 -1
- package/dist/chunks/{assistant-CemNvrYr.js → assistant-C3dP-BSJ.js} +1 -1
- package/dist/chunks/auth-CRVuUNwf.js +1 -0
- package/dist/chunks/{auth-Dm8aWPRh.js → auth-DVtMm7Hj.js} +1 -1
- package/dist/chunks/{autoMode-dygqoN_C.js → autoMode-ThlM20qr.js} +1 -1
- package/dist/chunks/{autonomy-BdxnxJnk.js → autonomy-B637YdCF.js} +1 -1
- package/dist/chunks/{autonomy-DPeEmb00.js → autonomy-B_vxYZbV.js} +1 -1
- package/dist/chunks/{autonomyPanel-Bocl2taZ.js → autonomyPanel-BM2VhTsn.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-zf-tDimg.js → backgroundHousekeeping-Cll7XHG1.js} +2 -2
- package/dist/chunks/{branch-DwdVgun5.js → branch-BlH5WYNu.js} +1 -1
- package/dist/chunks/{bridge-DkkMogD_.js → bridge-QRFJRzVG.js} +2 -2
- package/dist/chunks/{bridgeConfig-l6Ldi_hk.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-DYclTb9d.js → bridgeEnabled-z1fPRzzV.js} +1 -1
- package/dist/chunks/bridgeMain-CHk_DCxy.js +1 -0
- package/dist/chunks/{bridgeMain-Ct5oDosG.js → bridgeMain-DVoobI7G.js} +6 -6
- package/dist/chunks/{bridgeMessaging-CYe1Cixl.js → bridgeMessaging-BG8fNZac.js} +1 -1
- package/dist/chunks/{btw-CyOlY5R-.js → btw-DpeWZQbf.js} +1 -1
- package/dist/chunks/{buddy-q-utA1_5.js → buddy-Bni2g0Km.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-CTrRxzdz.js → bypassPermissionsKillswitch-7e56Rquc.js} +1 -1
- package/dist/chunks/caches-3byHT6VF.js +1 -0
- package/dist/chunks/{caches-Bz4yVQyE.js → caches-CzEBsMvP.js} +2 -2
- package/dist/chunks/{ccrClient-DXiEw9xU.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-CLPdvxGZ.js → channelNotification-CSmLgwtO.js} +1 -1
- package/dist/chunks/{chrome-DxbhLWDW.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-DiLtK8_L.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-CJXF8wMs.js → commitAttribution-Djh1ZpYH.js} +1 -1
- package/dist/chunks/{compact-C6xm1N5a.js → compact-BtAvCkY0.js} +1 -1
- package/dist/chunks/{companion-rXSt0nmz.js → companion-C-jfFhlz.js} +1 -1
- package/dist/chunks/{config-CzC08IjE.js → config-CloXpblh.js} +1 -1
- package/dist/chunks/{config-BE3jrcr-.js → config-DwsIX0hc.js} +1 -1
- package/dist/chunks/{context-BHE99SMA.js → context-DdwMoH4j.js} +1 -1
- package/dist/chunks/{context-noninteractive-BZQIUH_y.js → context-noninteractive-BWbEqad6.js} +1 -1
- package/dist/chunks/context-noninteractive-DNOyQYnM.js +1 -0
- package/dist/chunks/{conversation-CBPRFDod.js → conversation-DR4MFYYi.js} +1 -1
- package/dist/chunks/conversation-DVhyJA1O.js +1 -0
- package/dist/chunks/{copy-TgphIVzy.js → copy-tl-41wwU.js} +1 -1
- package/dist/chunks/{createSSHSession-CSKEZ4ic.js → createSSHSession-B_IyqOll.js} +1 -1
- package/dist/chunks/createSession-CIM50iEU.js +1 -0
- package/dist/chunks/{createSession-Ce218tQj.js → createSession-Csaqw8kb.js} +1 -1
- package/dist/chunks/{cronJitterConfig-CnKed5Gi.js → cronJitterConfig-2sHTXBLu.js} +1 -1
- package/dist/chunks/{crossProjectResume-BFlsTYOq.js → crossProjectResume-C1I0X__e.js} +1 -1
- package/dist/chunks/{datadog-D5jSRybW.js → datadog-BzkFYNcv.js} +1 -1
- package/dist/chunks/datadog-vQKKqB6Z.js +1 -0
- package/dist/chunks/{desktop-cjA0tGOa.js → desktop-oTXppB2O.js} +1 -1
- package/dist/chunks/{diff-DMd61IjE.js → diff-B23DUoT8.js} +1 -1
- package/dist/chunks/{doctor-ueUYyjyL.js → doctor-o2MJvjAE.js} +1 -1
- package/dist/chunks/{effort-B9IvAstG.js → effort-B1X_S_oa.js} +1 -1
- package/dist/chunks/{entry-Bq_KRMWs.js → entry-BAXMpXJ0.js} +5 -5
- package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +1 -0
- package/dist/chunks/{envLessBridgeConfig-CpjlwmvF.js → envLessBridgeConfig-YNTOVEqU.js} +1 -1
- package/dist/chunks/{exit-DtjFIrvJ.js → exit-CwGJifQF.js} +1 -1
- package/dist/chunks/{export-CP638-TO.js → export-CqbYdFmJ.js} +1 -1
- package/dist/chunks/{exportRenderer-B5emJDvn.js → exportRenderer-DP_z8YD1.js} +1 -1
- package/dist/chunks/extra-usage-1FUBiJOE.js +1 -0
- package/dist/chunks/{extra-usage-DIm8nrKj.js → extra-usage-BQ5Z1wJb.js} +1 -1
- package/dist/chunks/{extra-usage-core-DERKSEe1.js → extra-usage-core-B1oJoxYa.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-Dq5dog_-.js → extra-usage-noninteractive-BV_6cpdd.js} +1 -1
- package/dist/chunks/{extraUsage-BMvDY0Sk.js → extraUsage-Ca_6qcke.js} +1 -1
- package/dist/chunks/extractMemories-B-yrLjpP.js +1 -0
- package/dist/chunks/{fast-BP2t1xDM.js → fast-BJMGfO_S.js} +1 -1
- package/dist/chunks/fast-CFtN26up.js +1 -0
- package/dist/chunks/{feedback-C-mR6zJr.js → feedback-O0Gushxg.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-sMmHdYjg.js → firstPartyEventLogger-0s2WJ6SR.js} +1 -1
- package/dist/chunks/{flushGate-C18XwNsa.js → flushGate-CLjpgnG6.js} +1 -1
- package/dist/chunks/gates-4fq2Ws2D.js +1 -0
- package/dist/chunks/{gates-Be5r2kKS.js → gates-C5y8P5t9.js} +1 -1
- package/dist/chunks/{gemini-BberPcp1.js → gemini-D6lfJRGH.js} +1 -1
- package/dist/chunks/{generateRecap-B76UcVUS.js → generateRecap-AYujRzfu.js} +1 -1
- package/dist/chunks/{generateSessionName-BwtXd8TC.js → generateSessionName-CXg1uVLN.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-5IlVgR2l.js → githubRepoPathMapping-CdjkMIX3.js} +1 -1
- package/dist/chunks/{goal-DQ0jNcLO.js → goal-BGr-SlcA.js} +1 -1
- package/dist/chunks/{grok-Dh_thT2_.js → grok-DxyRt4Jq.js} +1 -1
- package/dist/chunks/{growthbook-4ADV3CAt.js → growthbook-D93ZmHUL.js} +1 -1
- package/dist/chunks/{heapdump-Dwqmh4SX.js → heapdump-DZz5qnZg.js} +1 -1
- package/dist/chunks/{help-Bznaywoi.js → help-C8HhaC70.js} +1 -1
- package/dist/chunks/hooks-CmW7bdtz.js +1 -0
- package/dist/chunks/{hooks-F-82cg6M.js → hooks-De2yBPig.js} +1 -1
- package/dist/chunks/{hostAdapter-DpfLr3hX.js → hostAdapter-CZdJUeS1.js} +1 -1
- package/dist/chunks/{ide-BfAKWufQ.js → ide-GnSLasRI.js} +1 -1
- package/dist/chunks/{inboundAttachments-CFV_eqMu.js → inboundAttachments-C8y3D5mp.js} +1 -1
- package/dist/chunks/inboundAttachments-DZiITyN8.js +1 -0
- package/dist/chunks/{initReplBridge-DV9KhSic.js → initReplBridge-YGXqLbNZ.js} +1 -1
- package/dist/chunks/{insights-BNsCwNYa.js → insights-23tyPxXV.js} +1 -1
- package/dist/chunks/{install-Bszzs98N.js → install-BXi4d63r.js} +1 -1
- package/dist/chunks/{install-github-app-DVxGR2rp.js → install-github-app-D2X7BgzJ.js} +1 -1
- package/dist/chunks/{install-slack-app-CjlRL19o.js → install-slack-app-_J1t0kSP.js} +1 -1
- package/dist/chunks/{instrumentation-BOYPOtyu.js → instrumentation-C9WDRy-K.js} +3 -3
- package/dist/chunks/{job-BvD5_lGz.js → job-DXX7dNN_.js} +1 -1
- package/dist/chunks/{keybindings-RPmPPGhp.js → keybindings-CChhkkE0.js} +1 -1
- package/dist/chunks/{lang-9VNaOJMz.js → lang-COIVItM_.js} +1 -1
- package/dist/chunks/language-CiMwEWO-.js +1 -0
- package/dist/chunks/{language-Ct5Nkqm6.js → language-DzWvcLCu.js} +1 -1
- package/dist/chunks/{launchAgentsPlatform-CnoxFIXV.js → launchAgentsPlatform-Du_WvKeU.js} +1 -1
- package/dist/chunks/{launchAutofixPr-ChaDUtvx.js → launchAutofixPr-CypNniKH.js} +1 -1
- package/dist/chunks/{launchLocalMemory-MwZfEJxz.js → launchLocalMemory-GkqB_Gcr.js} +1 -1
- package/dist/chunks/{launchLocalVault-B6Ib5WXx.js → launchLocalVault-CBihJDzq.js} +1 -1
- package/dist/chunks/{launchMemoryStores-D6xyGwQ1.js → launchMemoryStores-BkK0wwq0.js} +1 -1
- package/dist/chunks/{launchOnboarding-BtdAOO3p.js → launchOnboarding-BubTG5vY.js} +1 -1
- package/dist/chunks/{launchSchedule-XVljzNKg.js → launchSchedule-CkV6Ai-0.js} +1 -1
- package/dist/chunks/{launchSkillStore-QT8Qcc5N.js → launchSkillStore-DIrFg_WZ.js} +1 -1
- package/dist/chunks/{launchTeleport-DwxPesKQ.js → launchTeleport-DFrgN9sU.js} +1 -1
- package/dist/chunks/{launchVault-Dbti6pph.js → launchVault-CIiNsg91.js} +1 -1
- package/dist/chunks/loadAgentsDir-CjhNkoq0.js +1 -0
- package/dist/chunks/{loadAgentsDir-BYWykYwn.js → loadAgentsDir-DC4jN6-f.js} +53 -53
- package/dist/chunks/{loadPluginHooks-2U3UO__Q.js → loadPluginHooks-DukITDP2.js} +1 -1
- package/dist/chunks/{localSearch-eWjZxMc8.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-D1aQCqp0.js → login-ajsn1Sg7.js} +1 -1
- package/dist/chunks/{logoV2Utils-CPNvLtol.js → logoV2Utils-CpeUvaOM.js} +1 -1
- package/dist/chunks/logout-BqbTEPv9.js +1 -0
- package/dist/chunks/{magicDocs-DAvjAbAJ.js → magicDocs-TF6U6QoB.js} +1 -1
- package/dist/chunks/{main-BKlQiSuc.js → main-bjQRqaUr.js} +15 -15
- package/dist/chunks/mappers-Bg-xtimK.js +1 -0
- package/dist/chunks/{mcp-Cmw8ecKk.js → mcp-DtHGTZUo.js} +1 -1
- package/dist/chunks/{mcp-C3jlClk0.js → mcp-Vj0ijoSq.js} +2 -2
- package/dist/chunks/{mcp-ya96irNP.js → mcp-i8lqdWTr.js} +1 -1
- package/dist/chunks/{mcpServer-B1q9blAc.js → mcpServer-CuqaXxiJ.js} +1 -1
- package/dist/chunks/{mcpServer-BJB5g6j2.js → mcpServer-Dr9UfcEd.js} +1 -1
- package/dist/chunks/{memory-CxiukAGg.js → memory-DVJxsbcO.js} +1 -1
- package/dist/chunks/{mode-DqAJ2y6R.js → mode-C9yWWppB.js} +1 -1
- package/dist/chunks/model-BYSyXf9-.js +1 -0
- package/dist/chunks/{model-C8TW-qjl.js → model-Dq-13vaB.js} +1 -1
- package/dist/chunks/{onChangeAppState-BG1pF7ht.js → onChangeAppState-Cc4zOnqx.js} +1 -1
- package/dist/chunks/{openai-CHoRhRtf.js → openai-DMCGGZts.js} +1 -1
- package/dist/chunks/{overageCreditGrant-DYMg1lV4.js → overageCreditGrant-CzkWDmsQ.js} +1 -1
- package/dist/chunks/{panelCall-SYrmrKt9.js → panelCall-D36EWzwF.js} +1 -1
- package/dist/chunks/{passes-CSV-SZJc.js → passes-CPAwB9_F.js} +1 -1
- package/dist/chunks/{paths-BZjPDxMm.js → paths-CEAy4QCs.js} +2 -2
- package/dist/chunks/{permissions-DBddT2NP.js → permissions-B39hfy0O.js} +1 -1
- package/dist/chunks/{pipeTransport-uK7GxbSG.js → pipeTransport-7auNUakO.js} +1 -1
- package/dist/chunks/{plan-DEbo-Adi.js → plan-pCEs76NM.js} +1 -1
- package/dist/chunks/{plugin-Cops24hg.js → plugin-BSC-7wQh.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-Bg7JMOHN.js → pluginAutoupdate-Cre72Rtf.js} +1 -1
- package/dist/chunks/{pluginBlocklist-DEM_RWc2.js → pluginBlocklist-D2Cj4TR2.js} +1 -1
- package/dist/chunks/{pluginCliCommands-DyYEg7Cv.js → pluginCliCommands-CTxmCPph.js} +1 -1
- package/dist/chunks/{pluginFlagging-DwChUZMJ.js → pluginFlagging-C5EGcjZe.js} +1 -1
- package/dist/chunks/{pluginOperations-COyT4tHs.js → pluginOperations-DDI1CG0K.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-DCxJJkYs.js → pluginStartupCheck-B3QqfRt6.js} +1 -1
- package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +1 -0
- package/dist/chunks/{plugins-BanQjHmw.js → plugins-Bz7JxD43.js} +1 -1
- package/dist/chunks/policyLimits-C-oHygGe.js +1 -0
- package/dist/chunks/{pollConfig-DBNHhvHf.js → pollConfig-CyO4Ycwc.js} +1 -1
- package/dist/chunks/{poor-aPQce502.js → poor-eRoBwI0Z.js} +1 -1
- package/dist/chunks/{poorMode-CFRuV-nB.js → poorMode-BdNsLBQ-.js} +1 -1
- package/dist/chunks/poorMode-D2-4vRxb.js +1 -0
- package/dist/chunks/{print-Cf2tY__0.js → print-Ogibzjap.js} +4 -4
- package/dist/chunks/{privacy-settings-CYkM3Aem.js → privacy-settings-Dd7PtKbY.js} +1 -1
- package/dist/chunks/{processBashCommand-BLSC8o8M.js → processBashCommand-BjdUo_Na.js} +1 -1
- package/dist/chunks/{processSlashCommand-Ch9B-6nh.js → processSlashCommand-tetvMLMl.js} +1 -1
- 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-U03qQWbq.js → promptEditor-DoJ-xPi4.js} +1 -1
- package/dist/chunks/{protocolHandler-3yBj9w5N.js → protocolHandler-Dgzu5UWb.js} +1 -1
- package/dist/chunks/{rate-limit-options-D-xl_9PO.js → rate-limit-options-B6QH2-xn.js} +1 -1
- package/dist/chunks/{rcDebugLog-ClX1msJX.js → rcDebugLog-C0Bam8V9.js} +1 -1
- package/dist/chunks/{referral-qe-yqXJE.js → referral-B10JtHMk.js} +1 -1
- package/dist/chunks/{refresh-CO_P3WKA.js → refresh-DmEsCaJ0.js} +1 -1
- package/dist/chunks/{registerProtocol-CClQph00.js → registerProtocol-CQjmvg7a.js} +1 -1
- package/dist/chunks/{registry-C0zdU2Hb.js → registry-CLaXh4Gk.js} +1 -1
- package/dist/chunks/{release-notes-CyZHxWTF.js → release-notes-dxng0ob_.js} +1 -1
- package/dist/chunks/{releaseNotes-BtxL5R5Q.js → releaseNotes-CS5L5W0H.js} +2 -2
- package/dist/chunks/{reload-plugins-B0eR8JHH.js → reload-plugins-CgzAjBDp.js} +1 -1
- package/dist/chunks/{remote-env-B_sIjY87.js → remote-env-BasfU8Ra.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-C3WRaLpU.js → remoteBridgeCore-IJI5koHz.js} +1 -1
- package/dist/chunks/{remoteControlServer-BOj9qmgH.js → remoteControlServer-BBCt7ySV.js} +1 -1
- package/dist/chunks/{rename-BFAC3WLD.js → rename-eEdSZsJ2.js} +1 -1
- package/dist/chunks/{resume-CpivBr9S.js → resume-DjnfattK.js} +1 -1
- package/dist/chunks/{runtimeObserver-sOnfVR7t.js → runtimeObserver-ByTBtmBf.js} +2 -2
- package/dist/chunks/{runtimeObserver-C2_7Vsnd.js → runtimeObserver-COpkJmg-.js} +1 -1
- package/dist/chunks/sandbox-adapter-DagBhoTC.js +1 -0
- package/dist/chunks/{sandbox-toggle-Bv68-Ca7.js → sandbox-toggle-CQohaYND.js} +1 -1
- package/dist/chunks/searchExtraTools-kk-wV-cC.js +1 -0
- package/dist/chunks/{sentry-BBCn6RGP.js → sentry-C0bQlih_.js} +1 -1
- package/dist/chunks/{session-DfvxYP8o.js → session-Dx_ODOHl.js} +1 -1
- package/dist/chunks/{sessionDiscovery-CyuRBTAm.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-kYQnpcyG.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-CTkIYplM.js → sessionObserver-rd6RRTzc.js} +1 -1
- package/dist/chunks/sessionStorage-X2u45U9z.js +1 -0
- package/dist/chunks/{sessionTitle-ePQRpeV2.js → sessionTitle-1k_2BhFL.js} +1 -1
- package/dist/chunks/{sessionTracing-81-RIJBo.js → sessionTracing-DNSDPYdR.js} +1 -1
- package/dist/chunks/{settingsSync-DEFWnE1o.js → settingsSync-3xG2A_wN.js} +1 -1
- package/dist/chunks/{setup-BJSk1czd.js → setup-C2V4elOv.js} +2 -2
- package/dist/chunks/{setup-2611vmGJ.js → setup-CY808VaY.js} +1 -1
- package/dist/chunks/{setup-CTfYsKsz.js → setup-Hlga8GJ_.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-CGD7Nx03.js → shadowedRuleDetection-BdBNo5eP.js} +1 -1
- package/dist/chunks/{sideQuestion-BcP9Mm-5.js → sideQuestion-DWOCUKMh.js} +1 -1
- package/dist/chunks/{sink-D_t1TIt9.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-DXsozhmS.js → sinks-_9T2oPB_.js} +2 -2
- package/dist/chunks/{skill-learning-CZm2iMik.js → skill-learning-CzZFGFZO.js} +1 -1
- package/dist/chunks/{skillChangeDetector-1aFn40GC.js → skillChangeDetector-345QNWDp.js} +1 -1
- package/dist/chunks/{skillGapStore-cWo6Ra90.js → skillGapStore-Bz_qbwI1.js} +2 -2
- package/dist/chunks/{skillGapStore-DzHv8v-D.js → skillGapStore-DJm3SULe.js} +1 -1
- package/dist/chunks/{skillGenerator-D_W1IeP3.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-ChmOZu4F.js → skillPanel-Q85P-Gg4.js} +3 -3
- package/dist/chunks/{skillSearchPanel-CVx2b4Pr.js → skillSearchPanel-CMCQDAcX.js} +2 -2
- package/dist/chunks/{skills-CWX1SydA.js → skills-D3eUg3HG.js} +1 -1
- package/dist/chunks/{sprites-BuvEFwW6.js → sprites-ChoMSqpa.js} +1 -1
- package/dist/chunks/{stats-wjMQA-CA.js → stats-DdhEa_6-.js} +1 -1
- package/dist/chunks/{status-CyU7IQhO.js → status-CX7Kgn21.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-JNibsI_v.js → statusNoticeHelpers-AibXOONm.js} +1 -1
- package/dist/chunks/{tag-opEEZI5B.js → tag-BJ_u3aJm.js} +1 -1
- package/dist/chunks/{tasks-CCtnU5u1.js → tasks-DeEWOchP.js} +1 -1
- package/dist/chunks/teamHelpers-CxoQp7OY.js +1 -0
- package/dist/chunks/{teamHelpers-BJJs8taN.js → teamHelpers-WmWa_h3B.js} +1 -1
- package/dist/chunks/{teammateModeSnapshot-CLiiOCkO.js → teammateModeSnapshot-DZ6ulELC.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +1 -0
- package/dist/chunks/{teleport-ClxQigSQ.js → teleport-CuDXJj_f.js} +1 -1
- package/dist/chunks/{templateJobs-C6D7GC-Q.js → templateJobs-nFBp68za.js} +1 -1
- package/dist/chunks/{terminalSetup-B3bN4Cj8.js → terminalSetup-BORjK3qH.js} +1 -1
- package/dist/chunks/{terminalSetup-2ioFcRAA.js → terminalSetup-DULcnnWe.js} +1 -1
- package/dist/chunks/{theme-Dgq_Og2P.js → theme-Bf2QD0ja.js} +1 -1
- package/dist/chunks/thinkback-C1nnGg5r.js +1 -0
- package/dist/chunks/{thinkback-C43WBHis.js → thinkback-DZEhr3Ii.js} +1 -1
- package/dist/chunks/{thinkback-play-D2_n_aoQ.js → thinkback-play-BtEBESXM.js} +1 -1
- package/dist/chunks/{toolEventObserver-BG_3sGCL.js → toolEventObserver-CNZy5TpN.js} +1 -1
- package/dist/chunks/{toolEventObserver-B7EA-nNa.js → toolEventObserver-DMdrez6V.js} +1 -1
- package/dist/chunks/toolPool-DDj2TbY6.js +1 -0
- package/dist/chunks/{toolPool-HYKCHxDA.js → toolPool-DHQyHmDY.js} +1 -1
- package/dist/chunks/{trustedDevice-DeNxe6bl.js → trustedDevice-DWb5CPB_.js} +1 -1
- package/dist/chunks/{trustedDevice-S34i6Jc9.js → trustedDevice-Dw2crViN.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-C45bmZqN.js → ultrareviewCommand-BfN25zni.js} +1 -1
- package/dist/chunks/undercover-DSp7SB7e.js +1 -0
- package/dist/chunks/{undercover-DoUSM8d6.js → undercover-rcR56jZx.js} +1 -1
- package/dist/chunks/{updateCCB-BuAm25MX.js → updateCCB-DlTAqQJq.js} +1 -1
- package/dist/chunks/{upgrade-BDKg286g.js → upgrade-ClLcX7zy.js} +1 -1
- package/dist/chunks/upgrade-kf1QWUo7.js +1 -0
- package/dist/chunks/{upload-CMptZXZs.js → upload-BqEzK59v.js} +1 -1
- package/dist/chunks/{usage-Bw_LK9YI.js → usage-BgKDh8pQ.js} +1 -1
- package/dist/chunks/{usage-DEWsKPXj.js → usage-DW-akzSR.js} +1 -1
- package/dist/chunks/{useMainLoopModel-D0PmGDuy.js → useMainLoopModel-BTpZ8k3k.js} +1 -1
- package/dist/chunks/{useManagePlugins-B-ejJsXy.js → useManagePlugins-z0qezP5r.js} +1 -1
- package/dist/chunks/{useMergedTools-B6x9qtfj.js → useMergedTools-B78rAreW.js} +1 -1
- package/dist/chunks/{useSearchInput-BpMLsxaS.js → useSearchInput-CwxF3CHN.js} +1 -1
- package/dist/chunks/{useSettingsErrors-DUe4k_RK.js → useSettingsErrors-CjDaon07.js} +1 -1
- package/dist/chunks/{useVoice-C3ryR2HE.js → useVoice-X5WSnyed.js} +1 -1
- package/dist/chunks/{util-DWl5gjmI.js → util-CP-_gsEO.js} +1 -1
- package/dist/chunks/utils-CULcnflj.js +1 -0
- package/dist/chunks/{validatePlugin-8EMSASvV.js → validatePlugin-DUuaprqR.js} +1 -1
- package/dist/chunks/{vim-CaZ20SrQ.js → vim-BfmsdxOa.js} +1 -1
- package/dist/chunks/{voice-BrnKguEV.js → voice-B3GIfFlB.js} +1 -1
- package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +1 -0
- package/dist/chunks/{voiceModeEnabled-3eg8vSqy.js → voiceModeEnabled-C1Q9j5q6.js} +1 -1
- package/dist/chunks/{voiceStreamSTT-D7jWIYwz.js → voiceStreamSTT-BguyxdrW.js} +1 -1
- package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +1 -0
- package/dist/chunks/{web-tools-BT3TbzG5.js → web-tools-qf_VwWRn.js} +1 -1
- package/dist/chunks/{workerRegistry-C_i5wwjL.js → workerRegistry-SbiLJIsG.js} +1 -1
- package/dist/chunks/worktree-Djga1wtm.js +1 -0
- package/dist/chunks/{xml-DOXio8vw.js → xml-D7-jJqSA.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-DUoUTxFp.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-COO2W0ij.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CPWq7O57.js +0 -1
- package/dist/chunks/Doctor-Ba9zhV0V.js +0 -1
- package/dist/chunks/Grove-DyvIToPa.js +0 -1
- package/dist/chunks/REPL-D-akKdFc.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-wDSdfnRo.js +0 -1
- package/dist/chunks/SentryErrorBoundary-Duyg6HeT.js +0 -1
- package/dist/chunks/api-VMfJpk1G.js +0 -1
- package/dist/chunks/assistant-D7D1sqTB.js +0 -1
- package/dist/chunks/auth-CGdLe3rq.js +0 -1
- package/dist/chunks/backgroundHousekeeping-4H6yTjsj.js +0 -1
- package/dist/chunks/bridgeConfig-CTJBoASk.js +0 -1
- package/dist/chunks/bridgeEnabled-SMuWz3Is.js +0 -1
- package/dist/chunks/bridgeMain-UqwOi37W.js +0 -1
- package/dist/chunks/caches-DKMoKTAZ.js +0 -1
- package/dist/chunks/changeDetector--KPj2maX.js +0 -1
- package/dist/chunks/channelNotification-fJgjqRMx.js +0 -1
- package/dist/chunks/clear-CYVCwiwu.js +0 -1
- package/dist/chunks/client-DvWRsIpi.js +0 -1
- package/dist/chunks/commands-BT2_ICaW.js +0 -1
- package/dist/chunks/commitAttribution-Bpbro1a4.js +0 -1
- package/dist/chunks/context-noninteractive-BQDOgVUW.js +0 -1
- package/dist/chunks/conversation-Bt6QdGd-.js +0 -1
- package/dist/chunks/createSession-BaHXBnfG.js +0 -1
- package/dist/chunks/datadog-DgYqUGa-.js +0 -1
- package/dist/chunks/envLessBridgeConfig-D_GCqhTu.js +0 -1
- package/dist/chunks/extra-usage-C4dUWLhg.js +0 -1
- package/dist/chunks/extractMemories-DS7XXeEo.js +0 -1
- package/dist/chunks/fast-D1xIHYaN.js +0 -1
- package/dist/chunks/gates-CUAwAhPL.js +0 -1
- package/dist/chunks/hooks-DynUngv2.js +0 -1
- package/dist/chunks/inboundAttachments-Cug-8Xdy.js +0 -1
- package/dist/chunks/language-CjFs6_la.js +0 -1
- package/dist/chunks/loadAgentsDir-tPgCg0WD.js +0 -1
- package/dist/chunks/localSearch-CxwxzM8W.js +0 -1
- package/dist/chunks/login-CVVFklZw.js +0 -1
- package/dist/chunks/logout-BYsszpXx.js +0 -1
- package/dist/chunks/mappers-BBkM1aA5.js +0 -1
- package/dist/chunks/model-VB4ItNVB.js +0 -1
- package/dist/chunks/pluginStartupCheck-DjfIaOch.js +0 -1
- package/dist/chunks/policyLimits-D-Y_soHx.js +0 -1
- package/dist/chunks/poorMode-DQagHYWe.js +0 -1
- package/dist/chunks/prompt-BGNhFY1n.js +0 -227
- package/dist/chunks/prompt-CrNwH5kr.js +0 -1
- package/dist/chunks/prompt-dH0MMivt.js +0 -1
- package/dist/chunks/sandbox-adapter-jX_WzvnK.js +0 -1
- package/dist/chunks/searchExtraTools-xPuOKDpi.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-DiKsr7H7.js +0 -1
- package/dist/chunks/sessionMemory-C34-eFnJ.js +0 -1
- package/dist/chunks/sessionMemoryUtils-CcJcgftx.js +0 -1
- package/dist/chunks/sessionObserver-B73s6yu8.js +0 -1
- package/dist/chunks/sessionStorage-BHi7PKs-.js +0 -1
- package/dist/chunks/sink-i8NmYch9.js +0 -1
- package/dist/chunks/sinks-3w0mLszx.js +0 -1
- package/dist/chunks/skillLearning-Bddmbx8E.js +0 -1
- package/dist/chunks/skillLearning-C-uI_jZB.js +0 -1
- package/dist/chunks/teamHelpers-D41zdxpl.js +0 -1
- package/dist/chunks/teammateModeSnapshot-q-bARbLL.js +0 -1
- package/dist/chunks/thinkback-BE8NNmAo.js +0 -1
- package/dist/chunks/toolPool-BLshLuvo.js +0 -1
- package/dist/chunks/undercover-B4sdXe12.js +0 -1
- package/dist/chunks/upgrade-BiWGhm2d.js +0 -1
- package/dist/chunks/utils-DP3EtI6F.js +0 -1
- package/dist/chunks/voiceModeEnabled-B1ARFTcz.js +0 -1
- package/dist/chunks/voiceStreamSTT-CONK4g-B.js +0 -1
- package/dist/chunks/worktree-CFNQKVGn.js +0 -1
|
@@ -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-ClX1msJX.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-DeNxe6bl.js";import{a as E,r as D}from"./bridgeConfig-l6Ldi_hk.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-CpjlwmvF.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-CYe1Cixl.js";import{r as P,t as se}from"./flushGate-C18XwNsa.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-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-
|
|
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-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-
|
|
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-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-BZjPDxMm.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-BYWykYwn.js";import{t as D}from"./useKeybinding-DPOUuymz.js";import{relative as O}from"path";function k(){let e=S.isSandboxingEnabled(),t=S.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(f,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(i,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=S.getFsReadConfig(),a=S.getFsWriteConfig(),o=S.getNetworkRestrictionConfig(),s=S.getAllowUnixSockets(),c=S.getExcludedCommands(),l=S.getLinuxGlobPatternWarnings();return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(f,{flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(i,{dimColor:!0,children:c.length>0?c.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),a.allowOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,a.allowOnly.join(`, `)]}),a.denyWithinAllow.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied within allowed: `,a.denyWithinAllow.join(`, `)]})]}),(o.allowedHosts&&o.allowedHosts.length>0||o.deniedHosts&&o.deniedHosts.length>0)&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(i,{bold:!0,color:`permission`,children:[`Network Restrictions`,w()?` (Managed)`:``,`:`]}),o.allowedHosts&&o.allowedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,o.allowedHosts.join(`, `)]}),o.deniedHosts&&o.deniedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,o.deniedHosts.join(`, `)]})]}),s&&s.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(i,{dimColor:!0,children:s.join(`, `)})]}),l.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(i,{dimColor:!0,children:[`The following patterns will be ignored: `,l.slice(0,3).join(`, `),l.length>3&&` (${l.length-3} more)`]})]}),n]})}var A,j=e((()=>{n(),u(),x(),A=p()}));function M({depCheck:e}){let t=y()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),a=e.errors.some(e=>e.includes(`socat`)),o=e.warnings.length>0,s=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(f,{flexDirection:`column`,children:(0,N.jsxs)(i,{children:[`seatbelt: `,(0,N.jsx)(i,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`ripgrep (rg): `,n?(0,N.jsx)(i,{color:`error`,children:`not found`}):(0,N.jsx)(i,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`bubblewrap (bwrap):`,` `,r?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),r&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`socat: `,a?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),a&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`seccomp filter:`,` `,o?(0,N.jsx)(i,{color:`warning`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`}),o&&(0,N.jsx)(i,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),o&&(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),s.map(e=>(0,N.jsx)(i,{color:`error`,children:e},e))]})}var N,P=e((()=>{n(),u(),b(),N=p()}));function F({onComplete:e}){let t=S.isSandboxingEnabled(),n=S.areSandboxSettingsLockedByPolicy(),r=S.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(i,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(f,{marginTop:1,children:(0,L.jsxs)(i,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:r?`open`:`closed`}):(0,L.jsx)(f,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:n}){let[o]=r(),{headerFocused:s,focusHeader:c}=a(),l=d(`success`,o)(`(current)`),u=[{label:n===`open`?`Allow unsandboxed fallback ${l}`:`Allow unsandboxed fallback`,value:`open`},{label:n===`closed`?`Strict sandbox mode ${l}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await S.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(f,{marginBottom:1,children:(0,L.jsx)(i,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(T,{options:u,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,L.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{n(),u(),x(),E(),L=p()}));function z({onComplete:e,depCheck:t}){let[n]=r(),i=S.isSandboxingEnabled(),a=S.isAutoAllowBashIfSandboxedEnabled(),u=t.warnings.length>0,f=_().sandbox?.network?.allowAllUnixSockets,p=u&&!f,m=i?a?`auto-allow`:`regular`:`disabled`,h=d(`success`,n)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await S.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await S.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}s({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(o,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(o,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(o,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(c,{color:`permission`,children:(0,V.jsx)(l,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[y,...u?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:n,onSelect:r,onComplete:o}){let{headerFocused:s,focusHeader:c}=a();return(0,V.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(T,{options:n,onChange:r,onCancel:()=>o(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,V.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(i,{dimColor:!0,children:[(0,V.jsx)(i,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{n(),u(),D(),x(),v(),E(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=_().theme||`light`,i=y();if(!S.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(d(`error`,r)(t)),null}let a=S.checkDependencies();if(!S.isPlatformInEnabledList())return e(d(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(S.areSandboxSettingsLockedByPolicy())return e(d(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(d(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);C(n);let i=g(`localSettings`),a=i?O(h(),i):`.claude/settings.local.json`;return e(d(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(d(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{n(),m(),H(),u(),b(),x(),v(),W=p()}))();export{U as call};
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,T as r,b as i,i as a,n as o,nt as s,p as c,r as l,t as u,v as d,x as f}from"./src-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};
|