claude-code-best 2.6.0 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AddWorkspaceDirectory-Cj5bvJgD.js → AddWorkspaceDirectory-BYyM_V0q.js} +1 -1
- package/dist/chunks/{App-2tgSv9lb.js → App-BboadKdn.js} +1 -1
- package/dist/chunks/{ApproveApiKey-DWa-XTLb.js → ApproveApiKey-BLp4742y.js} +1 -1
- package/dist/chunks/ApproveApiKey-DiEe4eui.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-DF9eeJZS.js → AssistantSessionChooser-B88DM0Oq.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-DXJdube9.js → BackgroundTasksDialog-ByraVuXh.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-BOSW4Zdy.js → BypassPermissionsModeDialog-BDvmz12S.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-BW4XHmkw.js → ClaudeInChromeOnboarding-B6XNhFqq.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +1 -0
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-Bz0JyaOG.js → ClaudeMdExternalIncludesDialog-BNhlq7_K.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +1 -0
- package/dist/chunks/{DesktopHandoff-CcsM_OAS.js → DesktopHandoff-S-w4bs5T.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-DXRgY00D.js → DevChannelsDialog-BljR0X9X.js} +1 -1
- package/dist/chunks/{DiffDialog-PvNZfZby.js → DiffDialog-BhQ2QaLW.js} +1 -1
- package/dist/chunks/{Doctor-CE_jL9jC.js → Doctor-BXb0qv6n.js} +1 -1
- package/dist/chunks/Doctor-C5DYPEGl.js +1 -0
- package/dist/chunks/{ExitFlow-C4ybxKPn.js → ExitFlow-CSBDxw9H.js} +1 -1
- package/dist/chunks/{Feedback-B5rPGl_C.js → Feedback-DwHzc4UT.js} +1 -1
- package/dist/chunks/{Grove-CKVpREDU.js → Grove-DSXRnXKv.js} +1 -1
- package/dist/chunks/Grove-DnTo982-.js +1 -0
- package/dist/chunks/{HybridTransport-Byjvz-DL.js → HybridTransport-CuT3KI5e.js} +1 -1
- package/dist/chunks/{ITermBackend-Co9XpeS4.js → ITermBackend-mokGZVH_.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-CNsqbNU3.js → InvalidConfigDialog-Bi4RKYlk.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-ClnZaN6b.js → InvalidSettingsDialog-0zKo4-so.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-CDsa79pu.js → MCPConnectionManager-DYGoS1Ht.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-DZkzoeZf.js → McpParsingWarnings-EzgsOoHw.js} +1 -1
- package/dist/chunks/{MessageSelector-CkeGQPNM.js → MessageSelector-DTmUuEKJ.js} +1 -1
- package/dist/chunks/{Messages-PfbzLYOU.js → Messages-DWiKTx5o.js} +2 -2
- package/dist/chunks/{Onboarding-BwoGQB4g.js → Onboarding-odmthwzz.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-Q5g2YjQw.js → OverageCreditUpsell-Cpk_5Lv0.js} +1 -1
- package/dist/chunks/{PluginSettings-B2ASJ0Rx.js → PluginSettings-eYcWehI8.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-D4lMVCqj.js → PromptInputFooterSuggestions-DrrkNOuS.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-BvLtS6an.js → PromptInputHelpMenu-DMsF4D6d.js} +1 -1
- package/dist/chunks/{QueryEngine-Av0G5fze.js → QueryEngine-C_KZts4y.js} +1 -1
- package/dist/chunks/REPL-C6YR0VKU.js +1 -0
- package/dist/chunks/{REPL-Dh8vzGmF.js → REPL-DzHz-LOY.js} +6 -6
- package/dist/chunks/{RemoteCallout-BV_hoz98.js → RemoteCallout-CnpCWRPk.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-Cxoy1ud2.js → RemoteSessionManager-OWg_Yccq.js} +1 -1
- package/dist/chunks/{ResumeConversation-B3WuB8rs.js → ResumeConversation-BktSnsCm.js} +1 -1
- package/dist/chunks/{SSETransport-pIm26VJq.js → SSETransport-BpnapvlK.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-B6EWoJml.js → SentryErrorBoundary-C-NlfQZw.js} +1 -1
- package/dist/chunks/{Settings-CreAhCsb.js → Settings-vfFvcweR.js} +2 -2
- package/dist/chunks/{TeleportProgress-DPzGpyyM.js → TeleportProgress-CYXay2ZL.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-DqWQX6j8.js → TeleportRepoMismatchDialog-_zbZTvcJ.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-DPSO0S49.js → TeleportResumeWrapper-DiHQeZIM.js} +1 -1
- package/dist/chunks/{ThemePicker-DueihHcy.js → ThemePicker-BRh027fA.js} +1 -1
- package/dist/chunks/{TmuxBackend-BNaZNAeP.js → TmuxBackend-BaX2U7iZ.js} +1 -1
- package/dist/chunks/{TrustDialog-CIzAlGn9.js → TrustDialog-CVbzrv6g.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-1k1qbsRo.js → ValidationErrorsList-CdCUgfIl.js} +1 -1
- package/dist/chunks/{WelcomeV2-CR6TtXXM.js → WelcomeV2-DCXcYd2x.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-C5SeTXqC.js → WindowsTerminalBackend-BE9NX5IH.js} +1 -1
- package/dist/chunks/{add-dir-DAMizKzF.js → add-dir-ldGd3Ppz.js} +1 -1
- package/dist/chunks/{agentDisplay-B9z7i8b_.js → agentDisplay-CVnAeURF.js} +1 -1
- package/dist/chunks/{agents-DCh_gEvJ.js → agents-C08NzRZx.js} +1 -1
- package/dist/chunks/{agents-D5u0p1UC.js → agents-DH5fmbVw.js} +1 -1
- package/dist/chunks/{ant-DRJq-cEg.js → ant-DJren1Aa.js} +1 -1
- package/dist/chunks/api-6tcwJlf_.js +1 -0
- package/dist/chunks/{api-B6URs6nc.js → api-CGOR_Xfl.js} +1 -1
- package/dist/chunks/{assistant-BRGDWkKB.js → assistant-BlzrMSkM.js} +1 -1
- package/dist/chunks/assistant-CwbhlCM-.js +1 -0
- package/dist/chunks/{assistant-tPxOUa-Z.js → assistant-aWkDcurV.js} +1 -1
- package/dist/chunks/{auth-CqURlg4d.js → auth-CSB2RDKF.js} +1 -1
- package/dist/chunks/auth-GxZhOvQ1.js +1 -0
- package/dist/chunks/{autoMode-DVt4K4I2.js → autoMode-CWvZs1jO.js} +1 -1
- package/dist/chunks/{autonomy-Ffv0QIyl.js → autonomy-BkVcSMCZ.js} +1 -1
- package/dist/chunks/{autonomy-BZzW8QJZ.js → autonomy-DK42aJYt.js} +1 -1
- package/dist/chunks/{autonomyPanel-MwuzDvv_.js → autonomyPanel-Cn4IhXgE.js} +1 -1
- package/dist/chunks/{backgroundHousekeeping-CYnAG60-.js → backgroundHousekeeping-BIZTAYho.js} +2 -2
- package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +1 -0
- package/dist/chunks/{branch-DXefFdDE.js → branch-juox_fko.js} +1 -1
- package/dist/chunks/{bridge-qr4GQW_c.js → bridge-DudsCZkh.js} +2 -2
- package/dist/chunks/bridgeConfig-D4tpc568.js +1 -0
- package/dist/chunks/{bridgeConfig-CJ-KznTS.js → bridgeConfig-lRZfQqmA.js} +1 -1
- package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +1 -0
- package/dist/chunks/{bridgeEnabled-5vsPrjuq.js → bridgeEnabled-D2IykaHE.js} +1 -1
- package/dist/chunks/{bridgeMain-BimZwc2P.js → bridgeMain-C5RDihlX.js} +6 -6
- package/dist/chunks/bridgeMain-D7_lg2iJ.js +1 -0
- package/dist/chunks/{bridgeMessaging-BiE0CTqq.js → bridgeMessaging-CqNURC4-.js} +1 -1
- package/dist/chunks/{btw-FpimqEqk.js → btw-DKlE3Dea.js} +1 -1
- package/dist/chunks/{buddy-BA3Cr067.js → buddy-DQYgHR63.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-CSC9p8mO.js → bypassPermissionsKillswitch-Bof-UtM-.js} +1 -1
- package/dist/chunks/{caches-BUBkfP2Q.js → caches-B5QZDncQ.js} +2 -2
- package/dist/chunks/caches-dGk7xsDu.js +1 -0
- package/dist/chunks/{ccrClient-BOxUn9EJ.js → ccrClient-BaWg4E9-.js} +1 -1
- package/dist/chunks/changeDetector-DoLfg8a6.js +1 -0
- package/dist/chunks/{channelNotification-l3EXKDNB.js → channelNotification-B7A-9DIl.js} +1 -1
- package/dist/chunks/channelNotification-DDErroWn.js +1 -0
- package/dist/chunks/{chrome-BnKyWWQL.js → chrome-jMAks7-w.js} +1 -1
- package/dist/chunks/clear-OudnCGa7.js +1 -0
- package/dist/chunks/client-DxDmXXTh.js +1 -0
- package/dist/chunks/{color-D5MCzz9h.js → color-DG_R5-hl.js} +1 -1
- package/dist/chunks/commands-BWIOEBPs.js +1 -0
- package/dist/chunks/commitAttribution-BA4fcbHf.js +1 -0
- package/dist/chunks/{commitAttribution-BFshsh2H.js → commitAttribution-C22a3OCi.js} +1 -1
- package/dist/chunks/{compact-DWNaf1wR.js → compact-BWvnb4or.js} +1 -1
- package/dist/chunks/{companion-CyK_Dr1U.js → companion-Bkn2lSLj.js} +1 -1
- package/dist/chunks/{config-DNz6Eitr.js → config-BvpTbJ5p.js} +1 -1
- package/dist/chunks/{config-BdCuh6eA.js → config-D-dzD6n-.js} +1 -1
- package/dist/chunks/{context-BOjdTj0i.js → context-DzNahdyP.js} +1 -1
- package/dist/chunks/context-noninteractive-CM1-lUSe.js +1 -0
- package/dist/chunks/{context-noninteractive-k2ibficU.js → context-noninteractive-yiyJriiw.js} +1 -1
- package/dist/chunks/{conversation-Ci8O_eZ-.js → conversation-DKlz47xf.js} +1 -1
- package/dist/chunks/conversation-cUxdb8MN.js +1 -0
- package/dist/chunks/{copy-B0VUJ2rH.js → copy-9k9JPRqW.js} +1 -1
- package/dist/chunks/{createSSHSession-DqmkCS_k.js → createSSHSession-BZf-Loo5.js} +1 -1
- package/dist/chunks/createSession-BuJcoBAj.js +1 -0
- package/dist/chunks/{createSession-CJEsHz58.js → createSession-kiTHYXSL.js} +1 -1
- package/dist/chunks/{cronJitterConfig-BzPaa52I.js → cronJitterConfig-CYP7yrQu.js} +1 -1
- package/dist/chunks/{crossProjectResume-tWsqBUHc.js → crossProjectResume-BJisir9Z.js} +1 -1
- package/dist/chunks/{datadog-Bd1s_VFj.js → datadog-Bg-zL-i7.js} +1 -1
- package/dist/chunks/datadog-CVeFkaQu.js +1 -0
- package/dist/chunks/{desktop-BDowrzvG.js → desktop-DpaStjc-.js} +1 -1
- package/dist/chunks/{diff-auU5sUOw.js → diff-N_VSBo3Z.js} +1 -1
- package/dist/chunks/{doctor-bKPp6AeL.js → doctor-CUWjbh1X.js} +1 -1
- package/dist/chunks/{effort-BQj2QnnA.js → effort-loH1TUvE.js} +3 -3
- package/dist/chunks/{entry-CUu6-QhT.js → entry-D58E-E6Y.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +1 -0
- package/dist/chunks/{envLessBridgeConfig-Ju4W58xf.js → envLessBridgeConfig-SPEr9oqO.js} +1 -1
- package/dist/chunks/{exit-DijkO8eo.js → exit-D-tuPpbx.js} +1 -1
- package/dist/chunks/{export-DA-bBZkX.js → export-BIZ_SPXJ.js} +1 -1
- package/dist/chunks/{exportRenderer-3y4tGdSB.js → exportRenderer-CWPSMaqM.js} +1 -1
- package/dist/chunks/{extra-usage-CS6VwKJt.js → extra-usage-CCMwIa85.js} +1 -1
- package/dist/chunks/{extra-usage-core-DOgT4u4i.js → extra-usage-core-BNW4VT7o.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-DYnfiRlV.js → extra-usage-noninteractive-B_WjXO1E.js} +1 -1
- package/dist/chunks/extra-usage-rdJ7ecEb.js +1 -0
- package/dist/chunks/{extraUsage-CfxgfpX_.js → extraUsage-CNMMTNJi.js} +1 -1
- package/dist/chunks/extractMemories-BrvZVsmM.js +1 -0
- package/dist/chunks/{fast-CzRUJBTK.js → fast-CG1v3fRr.js} +1 -1
- package/dist/chunks/fast-CLKKsx2H.js +1 -0
- package/dist/chunks/{feedback-FoXtdHAV.js → feedback-CG4mS_-B.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-KIwaBY-E.js → firstPartyEventLogger-Y_jAnHoR.js} +1 -1
- package/dist/chunks/{flushGate-C2Icy43G.js → flushGate-COPcye5f.js} +1 -1
- package/dist/chunks/gates-CSHuXnUx.js +1 -0
- package/dist/chunks/{gates-CbQLZHtm.js → gates-CSKxLmMJ.js} +1 -1
- package/dist/chunks/{gemini-BrNJGX4k.js → gemini-B3uSLiNp.js} +1 -1
- package/dist/chunks/{generateRecap-B0fvSCjo.js → generateRecap-D7rG3jIm.js} +1 -1
- package/dist/chunks/{generateSessionName-DvRYa39O.js → generateSessionName-zbqanivg.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-Dut3d6nn.js → githubRepoPathMapping-B04nEUDG.js} +1 -1
- package/dist/chunks/{grok-Ftoheab3.js → grok-CDOpos8E.js} +1 -1
- package/dist/chunks/{growthbook-BynnuVTn.js → growthbook-C_EY78Sn.js} +1 -1
- package/dist/chunks/{heapdump-hQ_w0LPC.js → heapdump-CpmhJ55b.js} +1 -1
- package/dist/chunks/{help-DQsHHv6r.js → help-EHn2neTv.js} +1 -1
- package/dist/chunks/hooks-BFdX17Za.js +1 -0
- package/dist/chunks/{hooks-BhVDc8yb.js → hooks-BV6HqbU4.js} +1 -1
- package/dist/chunks/{hostAdapter-D1eWmmhu.js → hostAdapter-_SmFAVNf.js} +1 -1
- package/dist/chunks/{ide-CPmMXLL-.js → ide-DkN0KdTR.js} +1 -1
- package/dist/chunks/inboundAttachments-BVUunfAX.js +1 -0
- package/dist/chunks/{inboundAttachments-Bmf6vYsE.js → inboundAttachments-DnGQw7Pf.js} +1 -1
- package/dist/chunks/{initReplBridge-BiHXpDEY.js → initReplBridge-tPRGPBq7.js} +1 -1
- package/dist/chunks/{insights-CTlTyvjj.js → insights-Bs9kJDG6.js} +1 -1
- package/dist/chunks/{install-IPuD3Lq8.js → install-CFX_ph9z.js} +1 -1
- package/dist/chunks/{install-github-app-Bmu_sA9e.js → install-github-app-CvRjY1Wi.js} +1 -1
- package/dist/chunks/{install-slack-app-Rfl81Jqo.js → install-slack-app-DjhnVSe0.js} +1 -1
- package/dist/chunks/{instrumentation-DWwmOmr0.js → instrumentation-c5zlOWom.js} +3 -3
- package/dist/chunks/{job-BXEt0izn.js → job-3QwLq609.js} +1 -1
- package/dist/chunks/{keybindings-DRDgVvqz.js → keybindings-7mDm3UKD.js} +1 -1
- package/dist/chunks/{lang-D3ZHlfT6.js → lang-DyyjY20G.js} +1 -1
- package/dist/chunks/{language-DcSjogBx.js → language-CPRGmY8Q.js} +1 -1
- package/dist/chunks/language-Cf6bMI4N.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-BPm_VMln.js → launchAgentsPlatform-CpsMsTqQ.js} +1 -1
- package/dist/chunks/{launchAutofixPr-D2qac07g.js → launchAutofixPr-D9h6YAZY.js} +1 -1
- package/dist/chunks/{launchLocalMemory-D_hBbXKE.js → launchLocalMemory-DlYQcEQJ.js} +1 -1
- package/dist/chunks/{launchLocalVault-CPzNWvQ9.js → launchLocalVault-CP0AyPjj.js} +1 -1
- package/dist/chunks/{launchMemoryStores-Djq2KhKb.js → launchMemoryStores-BHoDFkJ5.js} +1 -1
- package/dist/chunks/{launchOnboarding-Bh6E7vdc.js → launchOnboarding-CFTNXcnc.js} +1 -1
- package/dist/chunks/{launchSchedule-C988bQ-5.js → launchSchedule-5KQr6x_A.js} +1 -1
- package/dist/chunks/{launchSkillStore-DqrP6Gme.js → launchSkillStore-D0yGuE68.js} +1 -1
- package/dist/chunks/{launchTeleport-DFhybaq_.js → launchTeleport-DRKnXOwY.js} +1 -1
- package/dist/chunks/{launchVault-p_CSK4ZQ.js → launchVault-XA-zAswX.js} +1 -1
- package/dist/chunks/loadAgentsDir-DCyiY0MN.js +1 -0
- package/dist/chunks/{loadAgentsDir-Ci5mr0vm.js → loadAgentsDir-DI1a76pd.js} +700 -700
- package/dist/chunks/{loadPluginHooks-xYCEZ6t5.js → loadPluginHooks-C0Ei-0E2.js} +1 -1
- package/dist/chunks/{localSearch-Vpn6W5aY.js → localSearch-CDOJNc_E.js} +1 -1
- package/dist/chunks/localSearch-MBx7KzC2.js +1 -0
- package/dist/chunks/login-D8UKKaud.js +1 -0
- package/dist/chunks/{login-D9IWjvza.js → login-nwTOoyxv.js} +1 -1
- package/dist/chunks/{logoV2Utils-SAulcC5x.js → logoV2Utils-DDUoPClc.js} +1 -1
- package/dist/chunks/logout-B0BjqlGi.js +1 -0
- package/dist/chunks/{magicDocs-BfoeYhin.js → magicDocs-CmUlOWjI.js} +1 -1
- package/dist/chunks/{main-DhMlhVj3.js → main-CeG_nUsC.js} +15 -15
- package/dist/chunks/{mappers-uIrAj-Wd.js → mappers-CJ8IO1o1.js} +1 -1
- package/dist/chunks/{mcp-DlM0OC6R.js → mcp-CanCqnch.js} +1 -1
- package/dist/chunks/{mcp-COQap0SM.js → mcp-Dq0kxZFx.js} +2 -2
- package/dist/chunks/{mcp-CAYGNxCb.js → mcp-zbxZM9BP.js} +1 -1
- package/dist/chunks/{mcpServer-DXvS3v4x.js → mcpServer-DPHQVYdC.js} +1 -1
- package/dist/chunks/{mcpServer-1SnOWb8_.js → mcpServer-lIneUZ5p.js} +1 -1
- package/dist/chunks/{memory-XccPLQLt.js → memory-BcWBkKV8.js} +1 -1
- package/dist/chunks/{model-CbiDGGJU.js → model-DJLzVvcF.js} +1 -1
- package/dist/chunks/model-H3rtl6eR.js +1 -0
- package/dist/chunks/{onChangeAppState-Dp0JIXd8.js → onChangeAppState-Dxbl8fvk.js} +1 -1
- package/dist/chunks/{openai-6KcHd4Hw.js → openai-DkYK4THc.js} +1 -1
- package/dist/chunks/{overageCreditGrant-DYiB4sr-.js → overageCreditGrant-DLKadMYU.js} +1 -1
- package/dist/chunks/{passes-Cbc6T_Tj.js → passes-BIfuerjL.js} +1 -1
- package/dist/chunks/{paths-Q2255dD7.js → paths-BBvuDQl9.js} +2 -2
- package/dist/chunks/{permissions-BLzPHh_3.js → permissions-S2EvIRKj.js} +1 -1
- package/dist/chunks/{pipeTransport-D7NIp3aA.js → pipeTransport-DVoIA1uN.js} +1 -1
- package/dist/chunks/{plan-DloFVJK7.js → plan--lnWxB3Q.js} +1 -1
- package/dist/chunks/{plugin-XR9IBPMM.js → plugin-DWLyrLw4.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-Cr9hP0zG.js → pluginAutoupdate-CGXIWBrb.js} +1 -1
- package/dist/chunks/{pluginBlocklist-CM9uP8CY.js → pluginBlocklist-DJrMdzT0.js} +1 -1
- package/dist/chunks/{pluginCliCommands-BQkrvES5.js → pluginCliCommands-C08q9dHk.js} +1 -1
- package/dist/chunks/{pluginFlagging-CJ1--2Kw.js → pluginFlagging-Dggxke70.js} +1 -1
- package/dist/chunks/{pluginOperations-B0rLuSvo.js → pluginOperations-CNCImIe8.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-Bjdc8zhz.js → pluginStartupCheck-BW2fjg2P.js} +1 -1
- package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +1 -0
- package/dist/chunks/{plugins-BgOP_8TX.js → plugins-DQ3CRWWO.js} +1 -1
- package/dist/chunks/policyLimits-BotYrS-v.js +1 -0
- package/dist/chunks/{pollConfig-DhptuhFw.js → pollConfig-DAQ-ives.js} +1 -1
- package/dist/chunks/{poor-DF0aqXDx.js → poor-DqfrQT61.js} +1 -1
- package/dist/chunks/poorMode-DEAe3hiK.js +1 -0
- package/dist/chunks/{poorMode-C5Frra4j.js → poorMode-DzYT47KW.js} +1 -1
- package/dist/chunks/{print-CPtR0KTa.js → print-GGVp62vj.js} +4 -4
- package/dist/chunks/{privacy-settings-e-7lc7Un.js → privacy-settings-agwqjYJo.js} +1 -1
- package/dist/chunks/{processBashCommand-D5dC6Mya.js → processBashCommand-DHHN8Ca4.js} +1 -1
- package/dist/chunks/{processSlashCommand-DHRUtZ-C.js → processSlashCommand-COtIO6Jy.js} +1 -1
- package/dist/chunks/prompt-CO160cIr.js +1 -0
- package/dist/chunks/{prompt-DEPUnJdB.js → prompt-CjFAtm3w.js} +1 -1
- package/dist/chunks/prompt-GY9hlRvI.js +1 -0
- package/dist/chunks/{promptEditor-Ci-h04-5.js → promptEditor-EgosPsy-.js} +1 -1
- package/dist/chunks/{protocolHandler-DhqM32qE.js → protocolHandler-mtPUT9U0.js} +1 -1
- package/dist/chunks/{rate-limit-options-B0l29Zx8.js → rate-limit-options-C6SFOHue.js} +1 -1
- package/dist/chunks/{rcDebugLog-BbPkkigY.js → rcDebugLog-CPKZCtR8.js} +1 -1
- package/dist/chunks/{referral-ByevBJrE.js → referral-DeDr9zAE.js} +1 -1
- package/dist/chunks/{refresh-B_CwwIRX.js → refresh-D7pdoY_X.js} +1 -1
- package/dist/chunks/{registerProtocol-DzhaQH02.js → registerProtocol-BZBH8Zgl.js} +1 -1
- package/dist/chunks/{registry-DkHA4cRu.js → registry-Dz6AbiYP.js} +1 -1
- package/dist/chunks/{release-notes-CZthYkei.js → release-notes-DiUNOrg9.js} +1 -1
- package/dist/chunks/{releaseNotes-CwKpIsyd.js → releaseNotes-CnhQit0y.js} +2 -2
- package/dist/chunks/{reload-plugins-DxWfXvrN.js → reload-plugins-Dx52GcaG.js} +1 -1
- package/dist/chunks/{remote-env-BiRLWIrh.js → remote-env-B67Oo3sI.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-nz1fPY1U.js → remoteBridgeCore-BzSUgPbt.js} +1 -1
- package/dist/chunks/{remoteControlServer-FzLUxh2B.js → remoteControlServer-L8smP7Zu.js} +1 -1
- package/dist/chunks/{rename-DmGuyncE.js → rename-C4PauyTZ.js} +1 -1
- package/dist/chunks/{resume-7GeU7RMS.js → resume-CrSn26xq.js} +1 -1
- package/dist/chunks/{runtimeObserver-OgM9ZYxZ.js → runtimeObserver-YNy3mIb7.js} +1 -1
- package/dist/chunks/{runtimeObserver-Duod-ign.js → runtimeObserver-nAhH4Wca.js} +2 -2
- package/dist/chunks/sandbox-adapter-CzwHes1i.js +1 -0
- package/dist/chunks/{sandbox-toggle-Cc96R6Ox.js → sandbox-toggle-BYqbcI5d.js} +1 -1
- package/dist/chunks/searchExtraTools-CcpdCO6l.js +1 -0
- package/dist/chunks/{sentry-BUHYuYGj.js → sentry-BNVxoVLS.js} +1 -1
- package/dist/chunks/{session-DgLqm7ZI.js → session-BuEmHrqM.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DgNea6qa.js → sessionDiscovery-Mcsfa0g-.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +1 -0
- package/dist/chunks/{sessionMemory-_dmj8lcH.js → sessionMemory-CMahwDdW.js} +1 -1
- package/dist/chunks/sessionMemory-pFSn4HSN.js +1 -0
- package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +1 -0
- package/dist/chunks/{sessionObserver-CuWMVPlT.js → sessionObserver-DG2zQgfi.js} +1 -1
- package/dist/chunks/sessionObserver-Je868MC9.js +1 -0
- package/dist/chunks/sessionStorage-D3FhAADV.js +1 -0
- package/dist/chunks/{sessionTitle-DzkMzHer.js → sessionTitle-zUVSAHO7.js} +1 -1
- package/dist/chunks/{sessionTracing-DTjmc0EF.js → sessionTracing-DoRJ4nSa.js} +1 -1
- package/dist/chunks/{settingsSync-CfYDkakY.js → settingsSync-B9bz77E1.js} +1 -1
- package/dist/chunks/{setup-BKUG46jQ.js → setup-B1JbPepL.js} +1 -1
- package/dist/chunks/{setup-CmLngvpJ.js → setup-CCOLlRtP.js} +1 -1
- package/dist/chunks/{setup-TqJ7-Nxh.js → setup-DWkSjA49.js} +2 -2
- package/dist/chunks/{shadowedRuleDetection-DesT0yKM.js → shadowedRuleDetection-BBR3uEgx.js} +1 -1
- package/dist/chunks/{sideQuestion-BAq0YyKY.js → sideQuestion-DHW5rgKz.js} +1 -1
- package/dist/chunks/{sink-B3uP8Cf8.js → sink-DxDOsLa2.js} +1 -1
- package/dist/chunks/sink-cQOgsnw3.js +1 -0
- package/dist/chunks/{sinks-COcy5GnB.js → sinks-BrrTUxkC.js} +2 -2
- package/dist/chunks/sinks-Djiz_5-Z.js +1 -0
- package/dist/chunks/{skill-learning-DOIMPtWE.js → skill-learning-C0nOKZfg.js} +1 -1
- package/dist/chunks/{skillChangeDetector-CA_Tdx8N.js → skillChangeDetector-D8C-uQSQ.js} +1 -1
- package/dist/chunks/{skillGapStore-CWuw1dYh.js → skillGapStore-Czi5jKjJ.js} +1 -1
- package/dist/chunks/{skillGapStore-DpEoKhn-.js → skillGapStore-_YuJP5KI.js} +2 -2
- package/dist/chunks/{skillGenerator-9y3Q4YoO.js → skillGenerator-kbaRbpqJ.js} +2 -2
- package/dist/chunks/skillLearning-3KWrBczS.js +1 -0
- package/dist/chunks/skillLearning-DBbdGbk-.js +1 -0
- package/dist/chunks/{skillPanel-Dt24mZTZ.js → skillPanel-BxDvlPzd.js} +3 -3
- package/dist/chunks/{skillSearchPanel-gaXN64Fu.js → skillSearchPanel-D-MX6Qgt.js} +2 -2
- package/dist/chunks/{skills-Dx3dMHYk.js → skills-NpEgFkFZ.js} +1 -1
- package/dist/chunks/{sprites-5OAB-Ui2.js → sprites-DD4eIkN7.js} +1 -1
- package/dist/chunks/{stats-TUExo9iU.js → stats-xL3NHwhp.js} +1 -1
- package/dist/chunks/{status-Dghaz1my.js → status-B5E70xRv.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-DVZSSXeK.js → statusNoticeHelpers-DcssRhLw.js} +1 -1
- package/dist/chunks/{tag-ZcVkzFjz.js → tag-BELr-qIa.js} +1 -1
- package/dist/chunks/{tasks-DbB33ekt.js → tasks-CrdWcSt-.js} +1 -1
- package/dist/chunks/{teamHelpers-BmN9nKz-.js → teamHelpers--3ZyNDlv.js} +1 -1
- package/dist/chunks/teamHelpers-CUAiXng3.js +1 -0
- package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-CPjJJDL1.js → teammateModeSnapshot-DOQMTKbQ.js} +1 -1
- package/dist/chunks/{teleport-JHgpwZIh.js → teleport-LXFOan9C.js} +1 -1
- package/dist/chunks/{templateJobs-Db630FZD.js → templateJobs-8IY2Cgig.js} +1 -1
- package/dist/chunks/{terminalSetup-ygKHrVKR.js → terminalSetup-C4psrmpb.js} +1 -1
- package/dist/chunks/{terminalSetup-DJqWE8fc.js → terminalSetup-Lyg4NbGA.js} +1 -1
- package/dist/chunks/{theme-MmfFhdTD.js → theme-B8GNnJ_q.js} +1 -1
- package/dist/chunks/{thinkback-CrNirB0V.js → thinkback-DPXwEK3B.js} +1 -1
- package/dist/chunks/thinkback-DZW3Mcx_.js +1 -0
- package/dist/chunks/{thinkback-play-CQ1s7oqg.js → thinkback-play-BMOE-ceh.js} +1 -1
- package/dist/chunks/{toolEventObserver-DBq2XBYY.js → toolEventObserver-D0TSHm01.js} +1 -1
- package/dist/chunks/{toolEventObserver-BqMplcIk.js → toolEventObserver-DzLd0MSn.js} +1 -1
- package/dist/chunks/toolPool-DVOfpjDz.js +1 -0
- package/dist/chunks/{toolPool-BkCtTKXz.js → toolPool-Dq-Vtvrj.js} +1 -1
- package/dist/chunks/{trustedDevice-DEuQUTbz.js → trustedDevice-1iTu4LEm.js} +1 -1
- package/dist/chunks/{trustedDevice-C9Zevohz.js → trustedDevice-BvYYXfd8.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-DrlfRrXq.js → ultrareviewCommand-BTXAN2wP.js} +1 -1
- package/dist/chunks/undercover-C_44e3oN.js +1 -0
- package/dist/chunks/{undercover-DKn95mh9.js → undercover-DvvnEmsX.js} +1 -1
- package/dist/chunks/{updateCCB-CJ7dCUan.js → updateCCB-C-qfLi0j.js} +1 -1
- package/dist/chunks/upgrade-CGXa5Dwy.js +1 -0
- package/dist/chunks/{upgrade-Degqbu8S.js → upgrade-DTBZSxwv.js} +1 -1
- package/dist/chunks/{upload-pTZQCPLt.js → upload-BF8tf_Eo.js} +1 -1
- package/dist/chunks/{usage-DVQMUMcC.js → usage-BRYRRgNt.js} +1 -1
- package/dist/chunks/{usage-D96a7Cke.js → usage-DvSTXEYY.js} +1 -1
- package/dist/chunks/{useMainLoopModel-B7ch2o9K.js → useMainLoopModel-CwvuTRXn.js} +1 -1
- package/dist/chunks/{useManagePlugins-BfGzHMvO.js → useManagePlugins-GmnI9K53.js} +1 -1
- package/dist/chunks/{useMergedTools-TemEvCrX.js → useMergedTools-Dah5KDMi.js} +1 -1
- package/dist/chunks/{useSearchInput-B-V4kIa-.js → useSearchInput-BV_azHiA.js} +1 -1
- package/dist/chunks/{useSettingsErrors-B2JGz1s8.js → useSettingsErrors-C-j_Zt7g.js} +1 -1
- package/dist/chunks/{useVoice-BuwYDm2U.js → useVoice-DR69NLxp.js} +1 -1
- package/dist/chunks/{util-CeIKZmj9.js → util-BpyJ4Bom.js} +1 -1
- package/dist/chunks/utils-CrZcpypC.js +1 -0
- package/dist/chunks/{validatePlugin-BlVho93x.js → validatePlugin-vptAYuYu.js} +1 -1
- package/dist/chunks/{vim-DUZQCWUP.js → vim-DvOw8dfR.js} +1 -1
- package/dist/chunks/{voice-BkRIHZiM.js → voice-B3BZs53f.js} +1 -1
- package/dist/chunks/{voiceModeEnabled-CPQUE3PU.js → voiceModeEnabled-DA76xN1Q.js} +1 -1
- package/dist/chunks/voiceModeEnabled-DIveLYGb.js +1 -0
- package/dist/chunks/{voiceStreamSTT-Dr_wH1Kh.js → voiceStreamSTT-_w1VjIOs.js} +1 -1
- package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +1 -0
- package/dist/chunks/{workerRegistry-CT7_kjvY.js → workerRegistry-2_MZVih1.js} +1 -1
- package/dist/chunks/worktree-CCuDwRmS.js +1 -0
- package/dist/chunks/{xml-DD_ldd3X.js → xml-Dx--sNE1.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-SIUwkD8j.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B8oAAHSI.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-DYhmGSkx.js +0 -1
- package/dist/chunks/Doctor--B1HUENo.js +0 -1
- package/dist/chunks/Grove-C2YjB3zL.js +0 -1
- package/dist/chunks/REPL-DCwqua0C.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-D70C-cmA.js +0 -1
- package/dist/chunks/SentryErrorBoundary-oJUBarGg.js +0 -1
- package/dist/chunks/api-Dz_3z1kl.js +0 -1
- package/dist/chunks/assistant-zVegFdAO.js +0 -1
- package/dist/chunks/auth-D4isgfuK.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DUmxC6h0.js +0 -1
- package/dist/chunks/bridgeConfig-CNbOKpAg.js +0 -1
- package/dist/chunks/bridgeEnabled-BUJTCUHY.js +0 -1
- package/dist/chunks/bridgeMain-DYL4fl6A.js +0 -1
- package/dist/chunks/caches-CTfNpKhW.js +0 -1
- package/dist/chunks/changeDetector-Y9KV5LgG.js +0 -1
- package/dist/chunks/channelNotification-CC7Xb06W.js +0 -1
- package/dist/chunks/clear-OUVFUt8Z.js +0 -1
- package/dist/chunks/client-B47ZvTMo.js +0 -1
- package/dist/chunks/commands-FJGWgQsa.js +0 -1
- package/dist/chunks/commitAttribution-DSv9FggK.js +0 -1
- package/dist/chunks/context-noninteractive-Bd2HO-vU.js +0 -1
- package/dist/chunks/conversation-BP0phkOY.js +0 -1
- package/dist/chunks/createSession-B9MhWusY.js +0 -1
- package/dist/chunks/datadog-DJowkWhh.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CixkwbRF.js +0 -1
- package/dist/chunks/extra-usage-DGHEQOrY.js +0 -1
- package/dist/chunks/extractMemories-jvjCvtpC.js +0 -1
- package/dist/chunks/fast-Bbtx_Bs1.js +0 -1
- package/dist/chunks/gates-DSI3vpwO.js +0 -1
- package/dist/chunks/hooks-BLLL4iPv.js +0 -1
- package/dist/chunks/inboundAttachments-D-p91z3w.js +0 -1
- package/dist/chunks/language-B_-BfBT4.js +0 -1
- package/dist/chunks/loadAgentsDir-vB1QEZ7H.js +0 -1
- package/dist/chunks/localSearch-DtVqtfvk.js +0 -1
- package/dist/chunks/login-D-N78G6r.js +0 -1
- package/dist/chunks/logout-CFggVS-9.js +0 -1
- package/dist/chunks/model-DdbcxKub.js +0 -1
- package/dist/chunks/pluginStartupCheck-Cu2ezD51.js +0 -1
- package/dist/chunks/policyLimits-CKy_gTEt.js +0 -1
- package/dist/chunks/poorMode-DJvjO2nW.js +0 -1
- package/dist/chunks/prompt-CQC-mh6u.js +0 -1
- package/dist/chunks/prompt-DawxLANl.js +0 -1
- package/dist/chunks/sandbox-adapter-CxkhKgaa.js +0 -1
- package/dist/chunks/searchExtraTools-DQ6e601b.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-7Svz-7S-.js +0 -1
- package/dist/chunks/sessionMemory-DIrR3zvb.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BdQtSkRx.js +0 -1
- package/dist/chunks/sessionObserver-_adufOGQ.js +0 -1
- package/dist/chunks/sessionStorage-W7okgAlQ.js +0 -1
- package/dist/chunks/sink-CaWMZBw_.js +0 -1
- package/dist/chunks/sinks-oFfsKySL.js +0 -1
- package/dist/chunks/skillLearning-BhM09bQD.js +0 -1
- package/dist/chunks/skillLearning-_o2D06yM.js +0 -1
- package/dist/chunks/teamHelpers-yeTNtZbb.js +0 -1
- package/dist/chunks/teammateModeSnapshot-CsNIJTKi.js +0 -1
- package/dist/chunks/thinkback-Quc7KPmi.js +0 -1
- package/dist/chunks/toolPool-C7bOwJfR.js +0 -1
- package/dist/chunks/undercover-CBeHiWUd.js +0 -1
- package/dist/chunks/upgrade-ucJ-lnlY.js +0 -1
- package/dist/chunks/utils-CwhszpkT.js +0 -1
- package/dist/chunks/voiceModeEnabled-DB8GCzAF.js +0 -1
- package/dist/chunks/voiceStreamSTT-DgoDscHn.js +0 -1
- package/dist/chunks/worktree-DU3xtwKW.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,p as i,t as a,tt as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{d as l,s as u}from"./debug-UI3T040K.js";import{MS as d,jS as f}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,p as i,t as a,tt as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{d as l,s as u}from"./debug-UI3T040K.js";import{MS as d,jS as f}from"./loadAgentsDir-DI1a76pd.js";import{t as p}from"./useKeybinding-FsOnjW6T.js";import{t as m}from"./lib-B4Q0Nrpb.js";function h({onDone:e}){let t=d(e=>e.remoteSessionUrl),[n,a]=(0,_.useState)(``);if((0,_.useEffect)(()=>{if(!t)return;let e=t;async function n(){a(await(0,g.toString)(e,{type:`utf8`,errorCorrectionLevel:`L`}))}n().catch(e=>{l(`QR code generation failed`,e)})},[t]),o(`confirm:no`,e,{context:`Confirmation`}),!t)return(0,v.jsxs)(i,{children:[(0,v.jsx)(r,{color:`warning`,children:"Not in remote mode. Start with `claude --remote` to use this command."}),(0,v.jsx)(r,{dimColor:!0,children:`(press esc to close)`})]});let c=n.split(`
|
|
2
2
|
`).filter(e=>e.length>0),u=c.length===0;return(0,v.jsxs)(i,{children:[(0,v.jsx)(s,{marginBottom:1,children:(0,v.jsx)(r,{bold:!0,children:`Remote session`})}),u?(0,v.jsx)(r,{dimColor:!0,children:`Generating QR code…`}):c.map((e,t)=>(0,v.jsx)(r,{children:e},t)),(0,v.jsxs)(s,{marginTop:1,children:[(0,v.jsx)(r,{dimColor:!0,children:`Open in browser: `}),(0,v.jsx)(r,{color:`ide`,children:t})]}),(0,v.jsx)(s,{marginTop:1,children:(0,v.jsx)(r,{dimColor:!0,children:`(press esc to close)`})})]})}var g,_,v,y;e((()=>{g=m(),n(),_=t(n(),1),a(),p(),f(),u(),v=c(),y=async e=>(0,v.jsx)(h,{onDone:e})}))();export{y as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,s as t}from"./debug-UI3T040K.js";t();async function n(){let{fetchCodeSessionsFromSessionsAPI:t}=await import(`./api-
|
|
1
|
+
import{d as e,s as t}from"./debug-UI3T040K.js";t();async function n(){let{fetchCodeSessionsFromSessionsAPI:t}=await import(`./api-6tcwJlf_.js`),n;try{n=await t()}catch(t){throw e(`[assistant:discovery] fetchCodeSessionsFromSessionsAPI failed: ${t}`),t}return n.filter(e=>e.status===`idle`||e.status===`working`||e.status===`waiting`).map(e=>({id:e.id,title:e.title||`Untitled`,status:e.status,created_at:e.created_at??``}))}export{n as discoverAssistantSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gu as e,vu as t}from"./loadAgentsDir-DI1a76pd.js";e();export{t as registerSessionFileAccessHooks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{W as r,cn as i}from"./state-sIHsFpDu.js";import{S as a,_ as o,g as s,mc as c,pc as l}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{W as r,cn as i}from"./state-sIHsFpDu.js";import{S as a,_ as o,g as s,mc as c,pc as l}from"./paths-BBvuDQl9.js";import{L as u,R as d,V as f,h as ee,p as te}from"./debug-UI3T040K.js";import{n as ne,r as p}from"./analytics-DqMQntaB.js";import{b as m,x as h}from"./teammate-DMYOtLTK.js";import{$O as g,Bc as re,DD as _,Fo as v,GO as y,In as b,JO as x,KO as S,Ln as ie,Lo as ae,Ml as oe,OD as se,Ol as ce,Pl as C,QO as le,Rn as ue,UO as w,VO as T,Vc as E,XO as D,YO as O,ZO as k,bo as A,cl as j,dk as M,dt as N,ek as P,fk as F,fl as I,ft as L,jO as R,kl as z,lk as B,ml as V,ok as H,pk as de,pl as fe,qO as pe,sk as me,sl as he,tk as ge}from"./loadAgentsDir-DI1a76pd.js";import{On as U,jn as _e}from"./prompt-CjFAtm3w.js";import{X as ve}from"./rcDebugLog-CPKZCtR8.js";import{writeFile as W}from"fs/promises";function ye(){return o(`tengu_session_memory`,!1)}function G(){return s(`tengu_sm_config`,{})}function be(e,t){let n=0,r=t==null;for(let i of e){if(!r){i.uuid===t&&(r=!0);continue}if(i.type===`assistant`){let e=i.message.content;Array.isArray(e)&&(n+=m(e,e=>e.type===`tool_use`))}}return n}function K(e){let t=B(e);if(!O()){if(!S(t))return!1;le()}let n=pe(t),r=be(e,X)>=y(),i=v(e);if(n&&r||n&&!i){let t=e[e.length-1];return t?.uuid&&(X=t.uuid),!0}return!1}async function q(e){let t=te(),n=b();await t.mkdir(n,{mode:448});let r=ie();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await V(),{encoding:`utf-8`,mode:384})}catch(e){if(d(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await re.call({file_path:r},e),a=``,o=i.data;return o.type===`text`&&(a=o.file.content),p(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function xe(){if(r())return;let e=j();process.env.USER_TYPE===`ant`&&p(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&se($)}async function Se(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};k();try{let n=z(t),{memoryPath:r,currentMemory:i}=await q(n),a=await I(i,r),{tools:o,mainLoopModel:s}=t.options,[c,l,u]=await Promise.all([N(o,s),F(),M()]),d=ve(c);return await C({promptMessages:[A({content:a})],cacheSafeParams:{systemPrompt:d,userContext:l,systemContext:u,toolUseContext:n,forkContextMessages:e},canUseTool:J(r),querySource:`session_memory`,forkLabel:`session_memory_manual`,overrides:{readFileState:n.readFileState}}),p(`tengu_session_memory_manual_extraction`,{}),g(B(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:u(e)}}finally{D()}}function J(e){return async(t,n)=>{if(t.name===`Edit`&&typeof n==`object`&&n&&`file_path`in n){let t=n.file_path;if(typeof t==`string`&&t===e)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${U} on ${e} is allowed`,decisionReason:{type:`other`,reason:`only ${U} on ${e} is allowed`}}}}function Y(e){if(!v(e)){let t=e[e.length-1];t?.uuid&&P(t.uuid)}}var X,Z,Q,$,Ce=e((()=>{n(),i(),L(),de(),_e(),E(),h(),oe(),ee(),_(),ae(),ue(),l(),R(),me(),ne(),he(),fe(),x(),f(),a(),Z=t(()=>{let e=G();ge({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:T.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:T.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:T.toolCallsBetweenUpdates})}),Q=!1,$=c(async function(e){let{messages:t,toolUseContext:n,querySource:r}=e;if(r!==`repl_main_thread`)return;{let{isPoorModeActive:e}=await import(`./poorMode-DEAe3hiK.js`);if(e())return}if(!ye()){process.env.USER_TYPE===`ant`&&!Q&&(Q=!0,p(`tengu_session_memory_gate_disabled`,{}));return}if(Z(),!K(t))return;k();let i=z(n),{memoryPath:a,currentMemory:o}=await q(i);await C({promptMessages:[A({content:await I(o,a)})],cacheSafeParams:ce(e),canUseTool:J(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],c=s?H(s):void 0,l=w();p(`tengu_session_memory_extraction`,{input_tokens:c?.input_tokens,output_tokens:c?.output_tokens,cache_read_input_tokens:c?.cache_read_input_tokens??void 0,cache_creation_input_tokens:c?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:l.minimumMessageTokensToInit,config_min_tokens_between_update:l.minimumTokensBetweenUpdate,config_tool_calls_between_updates:l.toolCallsBetweenUpdates}),g(B(t)),Y(t),D()})}));export{K as a,Se as i,xe as n,Ce as r,J as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./sessionMemory-CMahwDdW.js";t();export{e as manuallyExtractSessionMemory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{JO as e,WO as t}from"./loadAgentsDir-DI1a76pd.js";e();export{t as getSessionMemoryContent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{jO as t,nt as n,tt as r}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{jO as t,nt as n,tt as r}from"./loadAgentsDir-DI1a76pd.js";import{X as i}from"./rcDebugLog-CPKZCtR8.js";import{i as a,l as o,r as s,t as c,u as l}from"./instinctParser-DHMa8xa0.js";function u(e){g.set(e.name,e),_||(_=e.name)}function d(e){if(!g.has(e))throw Error(`Observer backend "${e}" is not registered`);_=e}function f(){let e=_?g.get(_):void 0;if(!e)throw Error(`No observer backend is active — register one before analyzing observations`);return e}async function p(e,t){return Promise.resolve(f().analyze(e,t))}function m(){let e=process.env.SKILL_LEARNING_OBSERVER_BACKEND?.trim();return e&&g.has(e)?e:void 0}function h(){let e=m();return e&&d(e),f()}var g,_,v=e((()=>{g=new Map})),y,b=e((()=>{y=[`workflow`,`testing`,`debugging`,`code-style`,`security`,`git`,`project`]}));async function x(e,t){if(e.length===0)return[];if(Date.now()<L)return S(e,t);let r=e.slice(-P),a=C(r),s=N(o().llm.timeoutMs),c;try{let e=await n({systemPrompt:i([R]),userPrompt:a,signal:s,options:{querySource:`skill_learning_observer`,enablePromptCaching:!0,agents:[],isNonInteractiveSession:!0,hasAppendSystemPrompt:!1,mcpTools:[]}});I=0,c=E(e.message?.content)}catch{return I++,I>=o().llm.failureThreshold&&(L=Date.now()+o().llm.circuitCooldownMs),S(e,t)}let l=D(c,t,r);return l.length===0?(I++,I>=o().llm.failureThreshold&&(L=Date.now()+o().llm.circuitCooldownMs),S(e,t)):l}async function S(e,t){try{let{heuristicObserverBackend:n}=await import(`./sessionObserver-Je868MC9.js`),r=n.analyze(e,t);return Array.isArray(r)?r:await r}catch{return[]}}function C(e){return`Observations (chronological, newest last):\n${e.map((e,t)=>w(e,t)).join(`
|
|
2
2
|
`)}\n\nExtract up to ${F} atomic instincts. JSON array only.`}function w(e,t){let n=[`#${t+1}`,`event=${e.event}`];return e.toolName&&n.push(`tool=${e.toolName}`),e.outcome&&n.push(`outcome=${e.outcome}`),e.messageText&&n.push(`text=${JSON.stringify(T(e.messageText,200))}`),e.toolInput&&n.push(`in=${JSON.stringify(T(e.toolInput,120))}`),e.toolOutput&&n.push(`out=${JSON.stringify(T(e.toolOutput,120))}`),n.join(` | `)}function T(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function E(e){if(!Array.isArray(e))return``;let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;e.type===`text`&&typeof e.text==`string`&&t.push(e.text)}return t.join(``).trim()}function D(e,t,n){let r=O(e);if(!r)return[];let i;try{i=JSON.parse(r)}catch{return[]}if(!Array.isArray(i))return[];let a=n.map(e=>e.id),o=[];for(let e of i.slice(0,F)){let n=k(e,t,a);n&&o.push(n)}return o}function O(e){if(!e)return;let t=e.indexOf(`[`),n=e.lastIndexOf(`]`);if(!(t<0||n<=t))return e.slice(t,n+1)}function k(e,t,n){if(!e||typeof e!=`object`)return;let r=e,i=A(r.trigger,80),a=A(r.action,120);if(!i||!a)return;let o=te(r.evidence);if(o.length!==0)return{trigger:i,action:a,confidence:j(r.confidence),domain:M(r.domain),source:`session-observation`,scope:ee(r.scope),projectId:t?.project?.projectId,projectName:t?.project?.projectName,evidence:o,observationIds:n}}function A(e,t){if(typeof e!=`string`)return;let n=e.trim();if(n)return n.length>t?n.slice(0,t):n}function j(e){return typeof e!=`number`||!Number.isFinite(e)?.5:e<0?0:e>1?1:e}function M(e){return typeof e==`string`&&y.includes(e)?e:`project`}function ee(e){return e===`global`?`global`:`project`}function te(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();if(e&&(t.push(e.length>200?`${e.slice(0,200)}…`:e),t.length===3))break}return t}function N(e){return AbortSignal.timeout(e)}var P,F,I,L,R,z,B=e((()=>{r(),t(),l(),b(),P=30,F=3,I=0,L=0,R=`You analyse a short sequence of observations from a coding-assistant session (user messages, tool invocations with outcomes, assistant messages) and extract atomic, reusable "instincts" — behavioural patterns that would help the assistant act correctly in future similar situations.
|
|
3
3
|
|
|
4
4
|
Respond with ONLY a JSON array (no prose, no code fences, no commentary). Each item must match this schema:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./sessionObserver-DG2zQgfi.js";e();export{t as heuristicObserverBackend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ar as e,Lr as t,oi as n}from"./loadAgentsDir-DI1a76pd.js";e();export{t as linkSessionToPR,n as recordTranscript};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Ln as t,wn as n}from"./schemas-BGAvj1T4.js";import{t as r}from"./v4-f1i_CNUT.js";import{U as i,cn as a}from"./state-sIHsFpDu.js";import{d as o,s}from"./debug-UI3T040K.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{s as u,u as d}from"./types-Csi32ZXh.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{Co as m,Lo as h,jO as g,nt as _,tt as v}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ln as t,wn as n}from"./schemas-BGAvj1T4.js";import{t as r}from"./v4-f1i_CNUT.js";import{U as i,cn as a}from"./state-sIHsFpDu.js";import{d as o,s}from"./debug-UI3T040K.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{s as u,u as d}from"./types-Csi32ZXh.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{Co as m,Lo as h,jO as g,nt as _,tt as v}from"./loadAgentsDir-DI1a76pd.js";import{X as y}from"./rcDebugLog-CPKZCtR8.js";function b(e){let t=[];for(let n of e){if(n.type!==`user`&&n.type!==`assistant`||`isMeta`in n&&n.isMeta||`origin`in n&&n.origin&&n.origin.kind!==`human`)continue;let e=n.message.content;if(typeof e==`string`)t.push(e);else if(Array.isArray(e))for(let n of e)`type`in n&&n.type===`text`&&`text`in n&&t.push(n.text)}let n=t.join(`
|
|
2
2
|
`);return n.length>S?n.slice(-S):n}async function x(e,t){let n=e.trim();if(!n)return null;try{let e=m((await _({systemPrompt:y([C]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{title:{type:`string`}},required:[`title`],additionalProperties:!1}},signal:t,options:{querySource:`generate_session_title`,agents:[],isNonInteractiveSession:i(),hasAppendSystemPrompt:!1,mcpTools:[]}})).message.content),r=w().safeParse(d(e)),a=r.success&&r.data.title.trim()||null;return l(`tengu_session_title_generated`,{success:a!==null}),a}catch(e){return o(`generateSessionTitle failed: ${e}`,{level:`error`}),l(`tengu_session_title_generated`,{success:!1}),null}}var S,C,w,T=e((()=>{r(),a(),c(),v(),s(),u(),p(),h(),g(),S=1e3,C=`Generate a concise, sentence-case title (3-7 words) that captures the main topic or goal of this coding session. The title should be clear enough that the user recognizes the session in a list. Use sentence case: capitalize only the first word and proper nouns.
|
|
3
3
|
|
|
4
4
|
Return JSON with a single "title" field.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{n as r,r as i,s as a}from"./esm-CJlBxjtx.js";import{Ct as o,N as s,U as c,cn as l,pt as u}from"./state-sIHsFpDu.js";import{Ac as d,Ec as f,J as p,S as m,Z as h,Zt as ee,_ as g,at as _,on as te,st as ne}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{n as r,r as i,s as a}from"./esm-CJlBxjtx.js";import{Ct as o,N as s,U as c,cn as l,pt as u}from"./state-sIHsFpDu.js";import{Ac as d,Ec as f,J as p,S as m,Z as h,Zt as ee,_ as g,at as _,on as te,st as ne}from"./paths-BBvuDQl9.js";import{E as v,T as re,V as ie,d as ae,s as oe,w as se}from"./debug-UI3T040K.js";import{i as ce,t as le}from"./hash-BRmOQc3c.js";import{i as ue,l as de,n as fe,t as pe}from"./teammate-DMYOtLTK.js";import"path";import"fs";import{createHash as me}from"crypto";import"fs/promises";import{AsyncLocalStorage as he}from"async_hooks";function ge(e){let t=BigInt(58),n=Array(b).fill(y[0]),r=b-1,i=e;for(;i>0n;)n[r]=y[Number(i%t)],i/=t,r--;return n.join(``)}function _e(e){let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Invalid UUID hex length: ${t.length}`);return BigInt(`0x`+t)}function ve(e,t){return`${e}_${ye}${ge(_e(t))}`}var y,ye,b,be=e((()=>{y=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,ye=`01`,b=22}));function x(e){let t=xe[e],r=process.env[e];return r===void 0?t:n(r)}function S(){let e=f(),t=o(),n={"user.id":e};x(`OTEL_METRICS_INCLUDE_SESSION_ID`)&&(n[`session.id`]=t),x(`OTEL_METRICS_INCLUDE_VERSION`)&&(n[`app.version`]=`2.6.5`);let r=ee();if(r){let e=r.organizationUuid,t=r.emailAddress,i=r.accountUuid;e&&(n[`organization.id`]=e),t&&(n[`user.email`]=t),i&&x(`OTEL_METRICS_INCLUDE_ACCOUNT_UUID`)&&(n[`user.account_uuid`]=i,n[`user.account_id`]=process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID||ve(`user`,i))}return _.terminal&&(n[`terminal.type`]=_.terminal),n}var xe,C=e((()=>{l(),te(),d(),ne(),t(),be(),xe={OTEL_METRICS_INCLUDE_SESSION_ID:!0,OTEL_METRICS_INCLUDE_VERSION:!1,OTEL_METRICS_INCLUDE_ACCOUNT_UUID:!0}}));function Se(){return n(process.env.OTEL_LOG_USER_PROMPTS)}function Ce(e){return Se()?e:`<REDACTED>`}async function w(e,t={}){let n=s();if(!n){T||(T=!0,ae(`[3P telemetry] Event dropped (no event logger initialized): ${e}`,{level:`warn`}));return}let r={...S(),"event.name":e,"event.timestamp":new Date().toISOString(),"event.sequence":we++},i=u();i&&(r[`prompt.id`]=i);let a=process.env.CLAUDE_CODE_WORKSPACE_HOST_PATHS;a&&(r[`workspace.host_paths`]=a.split(`|`));for(let[e,n]of Object.entries(t))n!==void 0&&(r[e]=n);n.emit({body:`claude_code.${e}`,attributes:r})}var we,T,Te=e((()=>{l(),oe(),t(),C(),we=0,T=!1}));function Ee(e){return Math.abs(le(e))||1}function De(e){let t=L.get(e);return t===void 0?(I++,L.set(e,I),I):t}function E(){let e=pe()??o(),t=fe()??`main`,n=ue(),r=P.get(e);if(r)return r;let i={agentId:e,agentName:t,parentAgentId:n,processId:e===o()?1:De(e),threadId:Ee(t)};return P.set(e,i),F++,i}function D(){return(Date.now()-Be)*1e3}function O(){return`span_${++Ve}`}function Oe(){let e=process.env.CLAUDE_CODE_PERFETTO_TRACE;ae(`[Perfetto] initializePerfettoTracing called, env value: ${e}`)}function ke(e){A&&(j.push({name:`process_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{name:e.agentName}}),j.push({name:`thread_name`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:e.threadId,args:{name:e.agentName}}),e.parentAgentId&&j.push({name:`parent_agent`,cat:`__metadata`,ph:`M`,ts:0,pid:e.processId,tid:0,args:{parent_agent_id:e.parentAgentId}}))}function k(){return A}function Ae(e,t,n){if(!A)return;let r={agentId:e,agentName:t,parentAgentId:n,processId:De(e),threadId:Ee(t)};P.set(e,r),F++,ke(r)}function je(e){A&&(P.delete(e),L.delete(e))}function Me(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`API Call`,category:`api`,startTime:D(),agentInfo:n,args:{model:e.model,prompt_tokens:e.promptTokens,message_id:e.messageId,is_speculative:e.isSpeculative??!1,query_source:e.querySource}}),M.push({name:`API Call`,cat:`api`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function Ne(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a=t.promptTokens??n.args.prompt_tokens,o=t.ttftMs,s=t.ttltMs,c=t.outputTokens,l=t.cacheReadTokens,u=o!==void 0&&a!==void 0&&o>0?Math.round(a/(o/1e3)*100)/100:void 0,d=s!==void 0&&o!==void 0?s-o:void 0,f=d!==void 0&&c!==void 0&&d>0?Math.round(c/(d/1e3)*100)/100:void 0,p=l!==void 0&&a!==void 0&&a>0?Math.round(l/a*1e4)/100:void 0,m=t.requestSetupMs,h=t.attemptStartTimes,ee={...n.args,ttft_ms:o,ttlt_ms:s,prompt_tokens:a,output_tokens:c,cache_read_tokens:l,cache_creation_tokens:t.cacheCreationTokens,message_id:t.messageId??n.args.message_id,success:t.success??!0,error:t.error,duration_ms:i/1e3,request_setup_ms:m,itps:u,otps:f,cache_hit_rate_pct:p},g=m!==void 0&&m>0?m*1e3:0;if(g>0){let e=n.startTime+g;if(M.push({name:`Request Setup`,cat:`api,setup`,ph:`B`,ts:n.startTime,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{request_setup_ms:m,attempt_count:h?.length??1}}),h&&h.length>1){let e=h[0];for(let t=0;t<h.length-1;t++){let r=n.startTime+(h[t]-e)*1e3,i=n.startTime+(h[t+1]-e)*1e3;M.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`B`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{attempt:t+1}}),M.push({name:`Attempt ${t+1} (retry)`,cat:`api,retry`,ph:`E`,ts:i,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}}M.push({name:`Request Setup`,cat:`api,setup`,ph:`E`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId})}if(o!==void 0){let e=n.startTime+g,t=e+o*1e3;M.push({name:`First Token`,cat:`api,ttft`,ph:`B`,ts:e,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{ttft_ms:o,prompt_tokens:a,itps:u,cache_hit_rate_pct:p}}),M.push({name:`First Token`,cat:`api,ttft`,ph:`E`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId});let r=s===void 0?void 0:s-o-g/1e3;r!==void 0&&r>0&&(M.push({name:`Sampling`,cat:`api,sampling`,ph:`B`,ts:t,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:{sampling_ms:r,output_tokens:c,otps:f}}),M.push({name:`Sampling`,cat:`api,sampling`,ph:`E`,ts:t+r*1e3,pid:n.agentInfo.processId,tid:n.agentInfo.threadId}))}M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:ee}),N.delete(e)}function Pe(e,t){if(!A)return``;let n=O(),r=E();return N.set(n,{name:`Tool: ${e}`,category:`tool`,startTime:D(),agentInfo:r,args:{tool_name:e,...t}}),M.push({name:`Tool: ${e}`,cat:`tool`,ph:`B`,ts:N.get(n).startTime,pid:r.processId,tid:r.threadId,args:N.get(n).args}),n}function Fe(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a={...n.args,success:t?.success??!0,error:t?.error,result_tokens:t?.resultTokens,duration_ms:i/1e3};M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),N.delete(e)}function Ie(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`Waiting for User Input`,category:`user_input`,startTime:D(),agentInfo:n,args:{context:e}}),M.push({name:`Waiting for User Input`,cat:`user_input`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function Le(e,t){if(!A||!e)return;let n=N.get(e);if(!n)return;let r=D(),i=r-n.startTime,a={...n.args,decision:t?.decision,source:t?.source,duration_ms:i/1e3};M.push({name:n.name,cat:n.category,ph:`E`,ts:r,pid:n.agentInfo.processId,tid:n.agentInfo.threadId,args:a}),N.delete(e)}function Re(e){if(!A)return``;let t=O(),n=E();return N.set(t,{name:`Interaction`,category:`interaction`,startTime:D(),agentInfo:n,args:{user_prompt_length:e?.length}}),M.push({name:`Interaction`,cat:`interaction`,ph:`B`,ts:N.get(t).startTime,pid:n.processId,tid:n.threadId,args:N.get(t).args}),t}function ze(e){if(!A||!e)return;let t=N.get(e);if(!t)return;let n=D(),r=n-t.startTime;M.push({name:t.name,cat:t.category,ph:`E`,ts:n,pid:t.agentInfo.processId,tid:t.agentInfo.threadId,args:{...t.args,duration_ms:r/1e3}}),N.delete(e)}var A,j,M,N,P,F,Be,Ve,I,L,He=e((()=>{l(),oe(),t(),ie(),ce(),se(),de(),A=!1,j=[],M=[],N=new Map,P=new Map,F=0,Be=0,Ve=0,I=1,L=new Map}));function Ue(){H.clear(),U.clear()}function R(){return n(process.env.ENABLE_BETA_TRACING_DETAILED)&&process.env.BETA_TRACING_ENDPOINT?process.env.USER_TYPE===`ant`?!0:c()||g(`tengu_trace_lantern`,!1):!1}function z(e,t=Qe){return e.length<=t?{content:e,truncated:!1}:{content:e.slice(0,t)+`
|
|
2
2
|
|
|
3
3
|
[TRUNCATED - Content exceeds 60KB limit]`,truncated:!0}}function B(e){return me(`sha256`).update(e).digest(`hex`).slice(0,12)}function We(e){return`sp_${B(e)}`}function Ge(e){return`msg_${B(v(e.message.content))}`}function V(e){let t=e.trim().match($e);return t&&t[1]?t[1].trim():null}function Ke(e){let t=[],n=[];for(let r of e){let e=r.message.content;if(typeof e==`string`){let r=V(e);r?n.push(r):t.push(`[USER]\n${e}`)}else if(Array.isArray(e)){for(let r of e)if(r.type===`text`){let e=V(r.text);e?n.push(e):t.push(`[USER]\n${r.text}`)}else if(r.type===`tool_result`){let e=typeof r.content==`string`?r.content:v(r.content),i=V(e);i?n.push(i):t.push(`[TOOL RESULT: ${r.tool_use_id}]\n${e}`)}}}return{contextParts:t,systemReminders:n}}function qe(e,t){if(!R())return;let{content:n,truncated:r}=z(`[USER PROMPT]\n${t}`);e.setAttributes({new_context:n,...r&&{new_context_truncated:!0,new_context_original_length:t.length}})}function Je(e,t,n){if(R()){if(t?.systemPrompt){let n=We(t.systemPrompt),r=t.systemPrompt.slice(0,500);if(e.setAttribute(`system_prompt_hash`,n),e.setAttribute(`system_prompt_preview`,r),e.setAttribute(`system_prompt_length`,t.systemPrompt.length),!H.has(n)){H.add(n);let{content:e,truncated:r}=z(t.systemPrompt);w(`system_prompt`,{system_prompt_hash:n,system_prompt:e,system_prompt_length:String(t.systemPrompt.length),...r&&{system_prompt_truncated:`true`}})}}if(t?.tools)try{let n=re(t.tools).map(e=>{let t=v(e),n=B(t);return{name:typeof e.name==`string`?e.name:`unknown`,hash:n,json:t}});e.setAttribute(`tools`,v(n.map(({name:e,hash:t})=>({name:e,hash:t})))),e.setAttribute(`tools_count`,n.length);for(let{name:e,hash:t,json:r}of n)if(!H.has(`tool_${t}`)){H.add(`tool_${t}`);let{content:n,truncated:i}=z(r);w(`tool`,{tool_name:h(e),tool_hash:t,tool:n,...i&&{tool_truncated:`true`}})}}catch{e.setAttribute(`tools_parse_error`,!0)}if(n&&n.length>0&&t?.querySource){let r=t.querySource,i=U.get(r),a=0;if(i)for(let e=0;e<n.length;e++){let t=n[e];if(t&&Ge(t)===i){a=e+1;break}}let o=n.slice(a).filter(e=>e.type===`user`);if(o.length>0){let{contextParts:t,systemReminders:i}=Ke(o);if(t.length>0){let n=t.join(`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,Mn as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{cn as o}from"./state-sIHsFpDu.js";import{Ac as s,Fa as c,S as l,on as u,oo as d}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,Mn as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{cn as o}from"./state-sIHsFpDu.js";import{Ac as s,Fa as c,S as l,on as u,oo as d}from"./paths-BBvuDQl9.js";import{V as f}from"./debug-UI3T040K.js";import{P as p,v as m}from"./git-CN3qtTb_.js";import{u as h}from"./oauth-CdZEzMww.js";import{n as g,t as _}from"./lazySchema-2sOku3cX.js";import{qa as v,xk as y}from"./loadAgentsDir-DI1a76pd.js";import"path";import"fs/promises";var b,x=e((()=>{a(),_(),b=g(()=>i({entries:r(n(),n())})),g(()=>i({userId:n(),version:t(),lastModified:n(),checksum:n(),content:b()}))})),S=e((()=>{o(),h(),u(),y(),s(),p(),f(),m(),c(),d(),l(),v(),x()}));export{S as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,n,s as r,u as i}from"./envUtils-BWeoiL4Y.js";import{i as a,t as o}from"./src-BJz1KAd_.js";import{H as ee,U as s,cn as te,yt as ne}from"./state-sIHsFpDu.js";import{Ac as c,Pc as l,S as u,Sc as d,_ as f}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,n,s as r,u as i}from"./envUtils-BWeoiL4Y.js";import{i as a,t as o}from"./src-BJz1KAd_.js";import{H as ee,U as s,cn as te,yt as ne}from"./state-sIHsFpDu.js";import{Ac as c,Pc as l,S as u,Sc as d,_ as f}from"./paths-BBvuDQl9.js";import{E as p,V as m,W as re,d as h,s as g,w as _}from"./debug-UI3T040K.js";import{n as v,t as ie}from"./bundledMode-kSQejuY4.js";import{i as y,o as ae}from"./platform-CuyedWpe.js";import{n as oe,r as se}from"./execFileNoThrow-CuQN1sz8.js";import{n as b,t as x}from"./distRoot-CcxmnzqQ.js";import{a as S,c as C,d as w,n as T,r as E,t as D}from"./common-CMCv4N_v.js";import{a as O,i as k}from"./prompt-4tea6NJQ.js";import{homedir as A}from"os";import{join as j}from"path";import{chmod as M,mkdir as N,readFile as P,readdir as F,writeFile as I}from"fs/promises";function L(){return process.env.USER_TYPE===`ant`?[B,V,H]:[B]}async function R(e,t){if(e.length===0)return t?.(`[Claude in Chrome] No browser paths to check`),{isInstalled:!1,browser:null};let n=L();for(let{browser:r,path:i}of e){let e=[];try{e=await F(i,{withFileTypes:!0})}catch(e){if(re(e))continue;throw e}let a=e.filter(e=>e.isDirectory()).filter(e=>e.name===`Default`||e.name.startsWith(`Profile `)).map(e=>e.name);a.length>0&&t?.(`[Claude in Chrome] Found ${r} profiles: ${a.join(`, `)}`);for(let e of a)for(let a of n){let n=j(i,e,`Extensions`,a);try{return await F(n),t?.(`[Claude in Chrome] Extension ${a} found in ${r} ${e}`),{isInstalled:!0,browser:r}}catch{}}}return t?.(`[Claude in Chrome] Extension not found in any browser`),{isInstalled:!1,browser:null}}async function z(e,t){return(await R(e,t)).isInstalled}var B,V,H,U=e((()=>{m(),B=`fcoeoabgfenejglbffodgkkbkcdhcgfn`,V=`dihbgbndebgnbjfmelmegjepbnkhlgni`,H=`dngcpimnedloihjnnfngkgjoidhnaolf`}));function W(e){if(s()&&e!==!0)return!1;if(e===!0)return!0;if(e===!1)return!1;if(i(process.env.CLAUDE_CODE_ENABLE_CFC))return!0;if(t(process.env.CLAUDE_CODE_ENABLE_CFC))return!1;let n=d();return n.claudeInChromeDefaultEnabled===void 0?!1:n.claudeInChromeDefaultEnabled}function G(){return $===void 0&&($=ee()&&ue()&&(process.env.USER_TYPE===`ant`||f(`tengu_chrome_auto_enable`,!1))),$}function K(){let e=v(),t=a.map(e=>`mcp__claude-in-chrome__${e.name}`),n={};ne()&&(n.CLAUDE_CHROME_PERMISSION_MODE=`skip_all_permission_checks`);let r=Object.keys(n).length>0;if(e)return J(`"${process.execPath}" --chrome-native-host`).then(e=>q(e)).catch(e=>h(`[Claude in Chrome] Failed to install native host: ${e}`,{level:`error`})),{mcpConfig:{[D]:{type:`stdio`,command:process.execPath,args:[`--claude-in-chrome-mcp`],scope:`dynamic`,...r&&{env:n}}},allowedTools:t,systemPrompt:k()};{let e=j(x,`cli.js`);return J(`"${process.execPath}" "${e}" --chrome-native-host`).then(e=>q(e)).catch(e=>h(`[Claude in Chrome] Failed to install native host: ${e}`,{level:`error`})),{mcpConfig:{[D]:{type:`stdio`,command:process.execPath,args:[`${e}`,`--claude-in-chrome-mcp`],scope:`dynamic`,...r&&{env:n}}},allowedTools:t,systemPrompt:k()}}}function ce(){if(y()===`windows`){let e=A();return[j(process.env.APPDATA||j(e,`AppData`,`Local`),`Claude Code`,`ChromeNativeHost`)]}return E().map(({path:e})=>e)}async function q(e){let t=ce();if(t.length===0)throw Error(`Claude in Chrome Native Host not supported on this platform`);let n=p({name:Z,description:`Claude Code Browser Extension Native Host`,path:e,type:`stdio`,allowed_origins:[`chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/`,...process.env.USER_TYPE===`ant`?[`chrome-extension://dihbgbndebgnbjfmelmegjepbnkhlgni/`,`chrome-extension://dngcpimnedloihjnnfngkgjoidhnaolf/`]:[]]},null,2),r=!1;for(let e of t){let t=j(e,Q);if(await P(t,`utf-8`).catch(()=>null)!==n)try{await N(e,{recursive:!0}),await I(t,n),h(`[Claude in Chrome] Installed native host manifest at: ${t}`),r=!0}catch(e){h(`[Claude in Chrome] Failed to install manifest at ${t}: ${e}`)}}y()===`windows`&&le(j(t[0],Q)),r&&Y().then(e=>{e?(h(`[Claude in Chrome] First-time install detected, opening reconnect page in browser`),w(X)):h(`[Claude in Chrome] First-time install detected, but extension not installed, skipping reconnect`)})}function le(e){let t=S();for(let{browser:n,key:r}of t){let t=`${r}\\${Z}`;oe(`reg`,[`add`,t,`/ve`,`/t`,`REG_SZ`,`/d`,e,`/f`]).then(e=>{e.code===0?h(`[Claude in Chrome] Registered native host for ${n} in Windows registry: ${t}`):h(`[Claude in Chrome] Failed to register native host for ${n} in Windows registry: ${e.stderr}`)})}}async function J(e){let t=y(),r=j(n(),`chrome`),i=t===`windows`?j(r,`chrome-native-host.bat`):j(r,`chrome-native-host`),a=t===`windows`?`@echo off
|
|
2
2
|
REM Chrome native host wrapper script
|
|
3
3
|
REM Generated by Claude Code - do not edit manually
|
|
4
4
|
${e}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{is as e,ls as t}from"./paths-
|
|
1
|
+
import{is as e,ls as t}from"./paths-BBvuDQl9.js";import{n,t as r}from"./bundledMode-kSQejuY4.js";import{o as i,r as a,t as o}from"./common-B379wT22.js";import{n as s,t as c}from"./distRoot-CcxmnzqQ.js";import{i as l,t as u}from"./src-BlLavFUS.js";import{i as d,t as f}from"./gates-CSKxLmMJ.js";import{join as p}from"path";u(),t(),r(),s(),i(),d();function m(){let t=l(o,f()).map(t=>e(a,t.name)),r=n()?[`--computer-use-mcp`]:[p(c,`cli.js`),`--computer-use-mcp`];return{mcpConfig:{[a]:{type:`stdio`,command:process.execPath,args:r,scope:`dynamic`}},allowedTools:t}}export{m as setupComputerUseMCP};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{In as r,Ln as i}from"./src-Di342QoJ.js";import{Ct as ee,U as a,cn as o,dr as s,jr as c,lr as l,ut as te}from"./state-sIHsFpDu.js";import{Ac as u,Cn as ne,Pc as d,Sc as f,at as p,bc as m,it as h,on as g,rt as _,st as v}from"./paths-
|
|
2
|
-
`)),process.exit(1)),e!==(O(w())??w())&&(T(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),J(e)),a=g?Z(e,U(i)):void 0}else a=g?Z(w(),U(i)):void 0;let o;try{o=await ce(ee(),i,a,v?{prNumber:v}:void 0)}catch(e){process.stderr.write(r.red(`Error creating worktree: ${y(e)}\n`)),process.exit(1)}if(S(`tengu_worktree_created`,{tmux_enabled:g}),g&&a){let e=await X(a,o.worktreePath);e.created?console.log(r.green(`Created tmux session: ${r.bold(a)}\nTo attach: ${r.bold(`tmux attach -t ${a}`)}`)):console.error(r.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(o.worktreePath),J(o.worktreePath),l(w()),s(w()),ue(o),ae(),pe()}T(`info`,`setup_background_jobs_starting`),e()||(Q(),xe()),q(),T(`info`,`setup_background_jobs_launched`),P(`setup_before_prefetch`),T(`info`,`setup_prefetch_starting`);let E=a()&&n(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||e();if(E||R(te()),import(`./loadPluginHooks-
|
|
1
|
+
import{c as e,s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{In as r,Ln as i}from"./src-Di342QoJ.js";import{Ct as ee,U as a,cn as o,dr as s,jr as c,lr as l,ut as te}from"./state-sIHsFpDu.js";import{Ac as u,Cn as ne,Pc as d,Sc as f,at as p,bc as m,it as h,on as g,rt as _,st as v}from"./paths-BBvuDQl9.js";import{L as y,V as b}from"./debug-UI3T040K.js";import{n as x,r as S}from"./analytics-DqMQntaB.js";import{n as C,t as w}from"./cwd--iizewsn.js";import{F as T,P as E,f as re,n as D,r as O,v as k}from"./git-CN3qtTb_.js";import{a as A,n as j}from"./env-chR0gV31.js";import{o as M,s as N}from"./log-CzsijfHZ.js";import{a as P,n as F}from"./startupProfiler-DnXZaX4A.js";import{Ar as I,Bv as L,Gi as R,Hm as z,Hv as B,LS as V,Mb as H,Mt as U,Mv as W,Nv as G,RS as K,Rb as q,Um as J,Xi as Y,_t as X,bt as Z,gE as ie,gk as ae,hE as oe,vn as se,vt as ce,wt as le,xi as ue,xk as de,yn as fe,zS as pe}from"./loadAgentsDir-DI1a76pd.js";import{l as me,u as he}from"./terminalSetup-Lyg4NbGA.js";import{c as ge,n as _e}from"./releaseNotes-CnhQit0y.js";import{s as ve,u as ye}from"./logoV2Utils-DDUoPClc.js";import{i as be,r as xe}from"./runtimeObserver-nAhH4Wca.js";import{n as Q,r as Se}from"./sessionMemory-CMahwDdW.js";import{t as Ce}from"./sinks-BrrTUxkC.js";import{homedir as we}from"os";import{join as Te}from"path";import{copyFile as Ee,stat as De}from"fs/promises";t(),i(),o(),x(),C(),b(),E(),A(),k(),g(),v(),_(),de(),ie(),K(),he(),W(),z(),Y(),I(),fe(),ge(),be(),Se(),u(),M();function $(){d(e=>({...e,iterm2SetupInProgress:!1}))}function Oe(){let e=f();return{inProgress:e.iterm2SetupInProgress??!1,backupPath:e.iterm2BackupPath||null}}function ke(){return Te(we(),`Library`,`Preferences`,`com.googlecode.iterm2.plist`)}async function Ae(){let{inProgress:e,backupPath:t}=Oe();if(!e)return{status:`no_backup`};if(!t)return $(),{status:`no_backup`};try{await De(t)}catch{return $(),{status:`no_backup`}}try{return await Ee(t,ke()),$(),{status:`restored`}}catch(e){return N(Error(`Failed to restore iTerm2 settings with: ${e}`)),$(),{status:`failed`,backupPath:t}}}u(),M(),ye(),H(),B(),F(),le();async function je(t,i,o,u,d,g,_,v,b){T(`info`,`setup_started`);let x=process.version.match(/^v(\d+)\./)?.[1];if((!x||parseInt(x,10)<18)&&(console.error(r.bold.red(`Error: Claude Code requires Node.js version 18 or higher.`)),process.exit(1)),_&&c(oe(_)),e(),!e()&&h()){let{captureTeammateModeSnapshot:e}=await import(`./teammateModeSnapshot-C6EWhR0X.js`);e()}if(!a()){if(h()){let e=await Ae();e.status===`restored`?console.log(r.yellow(`Detected an interrupted iTerm2 setup. Your original settings have been restored. You may need to restart iTerm2 for the changes to take effect.`)):e.status===`failed`&&console.error(r.red(`Failed to restore iTerm2 settings. Please manually restore your original settings with: defaults import com.googlecode.iterm2 ${e.backupPath}.`))}try{let e=await me();e.status===`restored`?console.log(r.yellow(`Detected an interrupted Terminal.app setup. Your original settings have been restored. You may need to restart Terminal.app for the changes to take effect.`)):e.status===`failed`&&console.error(r.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${e.backupPath}.`))}catch(e){N(e)}}J(t);let C=Date.now();if(V(),T(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-C}),G(t),u){let e=se(),n=await re();!e&&!n&&(process.stderr.write(r.red(`Error: Can only use --worktree in a git repository, but ${r.bold(t)} is not a git repository. Configure a WorktreeCreate hook in settings.json to use --worktree with other VCS systems.\n`)),process.exit(1));let i=v?`pr-${v}`:d??L(),a;if(n){let e=D(w());e||(process.stderr.write(r.red(`Error: Could not determine the main git repository root.
|
|
2
|
+
`)),process.exit(1)),e!==(O(w())??w())&&(T(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),J(e)),a=g?Z(e,U(i)):void 0}else a=g?Z(w(),U(i)):void 0;let o;try{o=await ce(ee(),i,a,v?{prNumber:v}:void 0)}catch(e){process.stderr.write(r.red(`Error creating worktree: ${y(e)}\n`)),process.exit(1)}if(S(`tengu_worktree_created`,{tmux_enabled:g}),g&&a){let e=await X(a,o.worktreePath);e.created?console.log(r.green(`Created tmux session: ${r.bold(a)}\nTo attach: ${r.bold(`tmux attach -t ${a}`)}`)):console.error(r.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(o.worktreePath),J(o.worktreePath),l(w()),s(w()),ue(o),ae(),pe()}T(`info`,`setup_background_jobs_starting`),e()||(Q(),xe()),q(),T(`info`,`setup_background_jobs_launched`),P(`setup_before_prefetch`),T(`info`,`setup_prefetch_starting`);let E=a()&&n(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||e();if(E||R(te()),import(`./loadPluginHooks-C0Ei-0E2.js`).then(e=>{E||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),e()||(process.env.USER_TYPE===`ant`&&import(`./commitAttribution-BA4fcbHf.js`).then(async e=>{if(await e.isInternalModelRepo()){let{clearSystemPromptSections:e}=await import(`./systemPromptSections-DB93ZNWP.js`);e()}}),setImmediate(()=>{import(`./attributionHooks-PygdohOh.js`).then(({registerAttributionHooks:e})=>{e()})}),import(`./sessionFileAccessHooks-qnNiGMnE.js`).then(e=>e.registerSessionFileAccessHooks())),Ce(),S(`tengu_started`,{}),ne(a()),P(`setup_after_prefetch`),!e()){let{hasReleaseNotes:e}=await _e(f().lastReleaseNotesSeen);e&&await ve()}if((i===`bypassPermissions`||o)&&(process.platform!==`win32`&&typeof process.getuid==`function`&&process.getuid()===0&&process.env.IS_SANDBOX!==`1`&&!n(process.env.CLAUDE_CODE_BUBBLEWRAP)&&(console.error(`--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`),process.exit(1)),process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`claude-desktop`)){let[e,t]=await Promise.all([p.getIsDocker(),j.hasInternetAccess()]),n=p.getIsBubblewrapSandbox(),r=process.env.IS_SANDBOX===`1`;(!(e||n||r)||t)&&(console.error(`--dangerously-skip-permissions can only be used in Docker/sandbox containers with no internet access but got Docker: ${e}, Bubblewrap: ${n}, IS_SANDBOX: ${r}, hasInternet: ${t}`),process.exit(1))}let k=m();k.lastCost!==void 0&&k.lastDuration!==void 0&&S(`tengu_exit`,{last_session_cost:k.lastCost,last_session_api_duration:k.lastAPIDuration,last_session_tool_duration:k.lastToolDuration,last_session_duration:k.lastDuration,last_session_lines_added:k.lastLinesAdded,last_session_lines_removed:k.lastLinesRemoved,last_session_total_input_tokens:k.lastTotalInputTokens,last_session_total_output_tokens:k.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:k.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:k.lastTotalCacheReadInputTokens,last_session_fps_average:k.lastFpsAverage,last_session_fps_low_1_pct:k.lastFpsLow1Pct,last_session_id:k.lastSessionId,...k.lastSessionMetrics})}export{je as setup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{H as t,K as n,U as r,W as i,q as a}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{H as t,K as n,U as r,W as i,q as a}from"./loadAgentsDir-DI1a76pd.js";import{In as o}from"./prompt-CjFAtm3w.js";function s(e){return e===`projectSettings`||e===`policySettings`||e===`command`}function c(e){return a(e)}function l(e,t,n){let r=c(t.source),i=c(n.source),a=t.ruleValue.toolName;return e===`deny`?`Remove the "${a}" deny rule from ${r}, or remove the specific allow rule from ${i}`:`Remove the "${a}" ask rule from ${r}, or remove the specific allow rule from ${i}`}function u(e,t,n){let{toolName:r,ruleContent:i}=e.ruleValue;if(i===void 0)return{shadowed:!1};let a=t.find(e=>e.ruleValue.toolName===r&&e.ruleValue.ruleContent===void 0);return!a||r===`Bash`&&n.sandboxAutoAllowEnabled&&!s(a.source)?{shadowed:!1}:{shadowed:!0,shadowedBy:a,shadowType:`ask`}}function d(e,t){let{toolName:n,ruleContent:r}=e.ruleValue;if(r===void 0)return{shadowed:!1};let i=t.find(e=>e.ruleValue.toolName===n&&e.ruleValue.ruleContent===void 0);return i?{shadowed:!0,shadowedBy:i,shadowType:`deny`}:{shadowed:!1}}function f(e,n){let a=[],o=t(e),s=r(e),f=i(e);for(let e of o){let t=d(e,f);if(t.shadowed){let n=c(t.shadowedBy.source);a.push({rule:e,reason:`Blocked by "${t.shadowedBy.ruleValue.toolName}" deny rule (from ${n})`,shadowedBy:t.shadowedBy,shadowType:`deny`,fix:l(`deny`,t.shadowedBy,e)});continue}let r=u(e,s,n);if(r.shadowed){let t=c(r.shadowedBy.source);a.push({rule:e,reason:`Shadowed by "${r.shadowedBy.ruleValue.toolName}" ask rule (from ${t})`,shadowedBy:r.shadowedBy,shadowType:`ask`,fix:l(`ask`,r.shadowedBy,e)})}}return a}var p=e((()=>{o(),n()}));export{p as n,f as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Co as t,Lo as n,Ml as r,Pl as i,bo as a}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Co as t,Lo as n,Ml as r,Pl as i,bo as a}from"./loadAgentsDir-DI1a76pd.js";import{B as o,P as s}from"./rcDebugLog-CPKZCtR8.js";function c(e){let t=[],n=e.matchAll(d);for(let e of n)e.index!==void 0&&t.push({word:e[0],start:e.index,end:e.index+e[0].length});return t}async function l({question:e,cacheSafeParams:t}){let n=await i({promptMessages:[a({content:`<system-reminder>This is a side question from the user. You must answer this question directly in a single response.
|
|
2
2
|
|
|
3
3
|
IMPORTANT CONTEXT:
|
|
4
4
|
- You are a separate, lightweight agent spawned to answer this one question
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,F as n,M as r,R as i,S as a,V as o,d as s}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,F as n,M as r,R as i,S as a,V as o,d as s}from"./paths-BBvuDQl9.js";import{a as c,n as l,t as u}from"./analytics-DqMQntaB.js";import{i as d,t as f}from"./datadog-Bg-zL-i7.js";function p(){if(o(`datadog`))return!1;if(y!==void 0)return y;try{return s(v)}catch{return!1}}function m(e,t){let r=i(e);if(r===0)return;let a=r===null?t:{...t,sample_rate:r};p()&&d(e,c(a)),n(e,a)}function h(e,t){return m(e,t),Promise.resolve()}function g(){y=s(v)}function _(){u({logEvent:m,logEventAsync:h})}var v,y,b=e((()=>{f(),r(),a(),l(),t(),v=`tengu_log_datadog_events`}));export{g as n,_ as r,b as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./sink-DxDOsLa2.js";t();export{e as initializeAnalyticsSink};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,t}from"./axios-DhfaybwJ.js";import{Ct as n,cn as r}from"./state-sIHsFpDu.js";import{E as i,J as a,X as o,Y as s,d as c,h as l,p as u,q as d,s as f,w as p}from"./debug-UI3T040K.js";import{o as m,r as h,t as g,v as _,y as v}from"./log-CzsijfHZ.js";import{i as y,t as b}from"./sentry-
|
|
2
|
-
`)},flush:t.flush,dispose:t.dispose}}var k=new Map;function A(e){let t=k.get(e);if(!t){let n=C(e);t=O({writeFn:t=>{try{u().appendFileSync(e,t)}catch{u().mkdirSync(n),u().appendFileSync(e,t)}},flushIntervalMs:1e3,maxBufferSize:50}),k.set(e,t),o(async()=>t?.dispose())}return t}function j(e,t){if(process.env.USER_TYPE!==`ant`)return;let r={timestamp:new Date().toISOString(),...t,cwd:u().cwd(),userType:process.env.USER_TYPE,sessionId:n(),version:`2.6.
|
|
1
|
+
import{n as e,t}from"./axios-DhfaybwJ.js";import{Ct as n,cn as r}from"./state-sIHsFpDu.js";import{E as i,J as a,X as o,Y as s,d as c,h as l,p as u,q as d,s as f,w as p}from"./debug-UI3T040K.js";import{o as m,r as h,t as g,v as _,y as v}from"./log-CzsijfHZ.js";import{i as y,t as b}from"./sentry-BNVxoVLS.js";import{r as x,t as S}from"./sink-DxDOsLa2.js";import{dirname as C,join as w}from"path";t(),r(),a(),v(),s(),f(),l(),m(),p(),y();var T=h(new Date);function E(){return w(_.errors(),T+`.jsonl`)}function D(e){return w(_.mcpLogs(e),T+`.jsonl`)}function O(e){let t=d(e);return{write(e){t.write(i(e)+`
|
|
2
|
+
`)},flush:t.flush,dispose:t.dispose}}var k=new Map;function A(e){let t=k.get(e);if(!t){let n=C(e);t=O({writeFn:t=>{try{u().appendFileSync(e,t)}catch{u().mkdirSync(n),u().appendFileSync(e,t)}},flushIntervalMs:1e3,maxBufferSize:50}),k.set(e,t),o(async()=>t?.dispose())}return t}function j(e,t){if(process.env.USER_TYPE!==`ant`)return;let r={timestamp:new Date().toISOString(),...t,cwd:u().cwd(),userType:process.env.USER_TYPE,sessionId:n(),version:`2.6.5`};A(e).write(r)}function M(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;if(typeof t.message==`string`)return t.message;if(typeof t.error==`object`&&t.error&&`message`in t.error&&typeof t.error.message==`string`)return t.error.message}}function N(t){let n=t.stack||t.message,r=``;if(e.isAxiosError(t)&&t.config?.url){let e=[`url=${t.config.url}`];t.response?.status!==void 0&&e.push(`status=${t.response.status}`);let n=M(t.response?.data);n&&e.push(`body=${n}`),r=`[${e.join(`,`)}] `}c(`${t.name}: ${r}${n}`,{level:`error`}),j(E(),{error:`${r}${n}`}),b(t)}function P(e,t){c(`MCP server "${e}" ${t}`,{level:`error`});let r=D(e),i={error:t instanceof Error?t.stack||t.message:String(t),timestamp:new Date().toISOString(),sessionId:n(),cwd:u().cwd()};A(r).write(i)}function F(e,t){c(`MCP server "${e}": ${t}`);let r=D(e),i={debug:t,timestamp:new Date().toISOString(),sessionId:n(),cwd:u().cwd()};A(r).write(i)}function I(){g({logError:N,logMCPError:P,logMCPDebug:F,getErrorsPath:E,getMCPLogsPath:D}),c(`Error log sink initialized`)}S();function L(){I(),x()}export{L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./sinks-BrrTUxkC.js";export{e as initSinks};
|
|
@@ -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{c as r,d as i,f as a}from"./skillGenerator-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{c as r,d as i,f as a}from"./skillGenerator-kbaRbpqJ.js";import{d as o,g as s,h as c,l,m as u,p as d,x as f}from"./runtimeObserver-nAhH4Wca.js";import{o as p,r as m}from"./observationStore-tvkldXUo.js";import{c as h,o as g}from"./projectContext-eXMSfgdZ.js";import{t as _}from"./sessionObserver-DG2zQgfi.js";import{i as v,r as y}from"./skillGapStore-_YuJP5KI.js";import{t as b}from"./skillLearning-DBbdGbk-.js";import{join as x}from"node:path";function S(e,t){let n=e.find(e=>e.startsWith(`${t}=`));if(n)return n.slice(t.length+1)||void 0;let r=e.indexOf(t);if(r>=0&&e[r+1]&&!e[r+1].startsWith(`--`))return e[r+1]}function C(e,t,n){let r=S(e,t);if(r===void 0)return n;let i=Number(r);return Number.isFinite(i)?i:n}var w;e((()=>{n(),b(),w=async e=>{let n=e.trim().split(/\s+/).filter(Boolean),b=n[0]??`status`,w=h(process.cwd()),T=process.env.CLAUDE_SKILL_LEARNING_HOME,E={project:w,rootDir:T};switch(b){case`status`:{let[e,t]=await Promise.all([p(E),d(E)]);return{type:`text`,value:[`Skill Learning status for ${w.projectName} (${w.projectId})`,`Observations: ${e.length}`,`Instincts: ${t.length}`].join(`
|
|
2
2
|
`)}}case`ingest`:{let e=n[1];if(!e)return{type:`text`,value:`Usage: /skill-learning ingest <transcript.jsonl> [--min-session-length=<n>]`};let t=C(n,`--min-session-length`,10),r=await m(e,E);if(r.length<t)return{type:`text`,value:`Session too short for learning (${r.length} < min=${t}). Skipping instinct extraction.`};let i=_(r),a=[];for(let e of i)a.push(await s(e,E));return{type:`text`,value:`Ingested ${r.length} observations and saved ${a.length} instincts.`}}case`evolve`:{let e=n.includes(`--generate`),o=f(await d(E),{cwd:process.cwd()}),s=[];if(e)for(let e of o){let n=a(e,await i(e,[x(process.cwd(),`.claude`,`skills`),x(t(),`skills`)])),o=await r(n);s.push(`${n.type}: ${o.activePath??o.archivedPath??o.deletedPath??`no active write`}`)}return{type:`text`,value:e?`Generated ${s.length} learned skill(s):\n${s.join(`
|
|
3
3
|
`)}`:`Found ${o.length} skill candidate(s). Use --generate to write them.`}}case`export`:{let e=n[1]??`skill-learning-instincts.json`,t=S(n,`--scope`),r=C(n,`--min-conf`,void 0),i=S(n,`--domain`),a=e=>e.filter(e=>!(t&&e.scope!==t||r!==void 0&&e.confidence<r||i&&e.domain!==i)),s=await d(E),c=a(s);if(c.length!==s.length){await o(e,E);let{writeFile:t}=await import(`node:fs/promises`);await t(e,`${JSON.stringify(c,null,2)}\n`)}else await o(e,E);let l=[`Exported ${c.length} instincts to ${e}`];if(t||r!==void 0||i){let e=[];t&&e.push(`scope=${t}`),r!==void 0&&e.push(`min-conf=${r}`),i&&e.push(`domain=${i}`),l.push(`(filters: ${e.join(`, `)})`)}return{type:`text`,value:l.join(` `)}}case`import`:{let e=n[1];if(!e)return{type:`text`,value:`Usage: /skill-learning import <instincts.json> [--scope=<scope>] [--min-conf=<n>] [--domain=<d>] [--dry-run]`};let t=S(n,`--scope`),r=C(n,`--min-conf`,void 0),i=S(n,`--domain`),a=n.includes(`--dry-run`),{readFile:o}=await import(`node:fs/promises`),c=JSON.parse(await o(e,`utf8`)),l=c.filter(e=>!(t&&e.scope!==t||r!==void 0&&e.confidence<r||i&&e.domain!==i));if(a)return{type:`text`,value:`Dry run: would import ${l.length}/${c.length} instincts.`};for(let e of l)await s(e,E);return{type:`text`,value:`Imported ${l.length}/${c.length} instincts.`}}case`prune`:{let e=n.indexOf(`--max-age`);return{type:`text`,value:`Pruned ${(await u(e>=0&&n[e+1]?Number(n[e+1]):30,E)).length} pending instincts.`}}case`promote`:{let e=n[1];if(!e){let e=await v(w,T),t=l(await d(E));return{type:`text`,value:[`Promotion candidates for ${w.projectName} (${w.projectId}):`,`Pending gaps: ${e.filter(e=>e.status===`pending`).length}`,`Global-eligible instincts (>=2 projects, avg confidence >=0.8): ${t.length}`,``,`Usage:`,` /skill-learning promote gap <gap-key> # pending gap -> draft`,` /skill-learning promote instinct <instinct-id> # project instinct -> global`].join(`
|
|
4
4
|
`)}}if(e===`gap`){let e=n[2];if(!e)return{type:`text`,value:`Usage: /skill-learning promote gap <gap-key>`};let t=await y(e,w,T);return t?{type:`text`,value:`Promoted gap ${e} to status=${t.status} (draft=${t.draft?.skillPath??`none`}).`}:{type:`text`,value:`No gap found for key "${e}".`}}if(e===`instinct`){let e=n[2];if(!e)return{type:`text`,value:`Usage: /skill-learning promote instinct <instinct-id>`};let t=(await d(E)).find(t=>t.id===e);return t?t.scope===`global`?{type:`text`,value:`Instinct ${e} is already global.`}:(await c({...t,scope:`global`},{scope:`global`,rootDir:T}),{type:`text`,value:`Promoted instinct ${e} to global scope.`}):{type:`text`,value:`No project-scoped instinct found for id "${e}".`}}return{type:`text`,value:`Usage: /skill-learning promote [gap <gap-key>|instinct <instinct-id>]`}}case`projects`:{let e=g();if(e.length===0)return{type:`text`,value:`No known project scopes yet.`};let t=[`Known project scopes:`];for(let n of e){let e={project:n,rootDir:T},[r,i]=await Promise.all([d(e),p(e)]);t.push(`- ${n.projectName} (${n.projectId}) — instincts: ${r.length}, observations: ${i.length}, lastSeen: ${n.lastSeenAt}`)}return{type:`text`,value:t.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t}from"./chokidar-SzksMqYp.js";import{Ct as n,Fr as r,Pr as i,cn as a,et as o,g as s,jr as ee,lr as c,nr as l,tr as te}from"./state-sIHsFpDu.js";import{Br as ne,Pr as re}from"./paths-
|
|
1
|
+
import{i as e,r as t}from"./chokidar-SzksMqYp.js";import{Ct as n,Fr as r,Pr as i,cn as a,et as o,g as s,jr as ee,lr as c,nr as l,tr as te}from"./state-sIHsFpDu.js";import{Br as ne,Pr as re}from"./paths-BBvuDQl9.js";import{X as ie,Y as ae,d as u,h as oe,p as se,s as d}from"./debug-UI3T040K.js";import{n as ce,r as le}from"./analytics-DqMQntaB.js";import{n as ue,t as f}from"./cwd--iizewsn.js";import{$v as de,Ac as fe,Ar as pe,At as p,Cm as m,Hm as h,Hv as g,Lo as me,Pt as he,Ri as ge,Tm as _e,Um as _,Vv as v,Xi as ve,Yn as ye,_m as y,_o as b,cd as x,di as S,ei as C,fi as w,gE as T,gk as E,gn as D,hE as O,i as k,iE as A,kc as j,o as M,pd as N,r as P,rE as be,ty as xe,vi as Se,vm as Ce,wm as we,wt as Te,xi as F,xk as Ee,xm as De,xt as I,yn as Oe,zi as ke}from"./loadAgentsDir-DI1a76pd.js";import{zt as L}from"./prompt-CjFAtm3w.js";import{f as Ae,l as je,t as Me}from"./commitAttribution-C22a3OCi.js";import{F as Ne,P as Pe}from"./teamHelpers--3ZyNDlv.js";import{n as R,r as Fe}from"./systemPromptSections-BcN_XBTx.js";import{r as Ie}from"./asciicast-o5Zg4dJt.js";import*as z from"path";import{dirname as Le}from"path";a(),Fe(),y(),M(),L(),T(),Ee(),je(),x(),ue(),d(),xe(),me(),re(),g(),h(),pe(),Pe(),A(),Te();function Re(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type!==`assistant`)continue;let r=n.message.content.find(e=>e.type===`tool_use`&&e.name===`TodoWrite`);if(!r||r.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=be().safeParse(i.todos);return a.success?a.data:[]}return[]}function ze(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&de(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),e.attributionSnapshots&&e.attributionSnapshots.length>0&&Me(e.attributionSnapshots,e=>{t(t=>({...t,attribution:e}))}),!Ne()&&e.messages&&e.messages.length>0){let r=Re(e.messages);if(r.length>0){let e=n();t(t=>({...t,todos:{...t.todos,[e]:r}}))}}}function Be(e){if(e.attributionSnapshots&&e.attributionSnapshots.length>0)return Ae(e.attributionSnapshots)}function B(e,t){if(!(!e&&!t))return{name:e??``,color:t===`default`?void 0:t}}function V(e,t,n){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return l(void 0),{agentDefinition:void 0,agentType:void 0};let r=n.activeAgents.find(t=>t.agentType===e);return r?(l(r.agentType),!o()&&r.model&&r.model!==`inherit`&&te(ne(r.model)),{agentDefinition:r,agentType:r.agentType}):(u(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),l(void 0),{agentDefinition:void 0,agentType:void 0})}async function Ve(e,t,n,r){if(!e)return r;k.cache.clear?.();let i=await k(t),a=[...i.allAgents,...n];return{...i,allAgents:a,activeAgents:P(a)}}function H(e){let t=I();if(t){F(t);return}if(e){try{process.chdir(e.worktreePath)}catch{F(null);return}_(e.worktreePath),c(f()),p(e),E(),R(),v.cache.clear?.()}}function He(){let e=I();if(e){p(null),E(),R(),v.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}_(e.originalCwd),c(f())}}async function Ue(e,t,n){let r;if(r=n.modeApi?.matchSessionMode(e.mode),r&&e.messages.push(b(r,`warning`)),t.forkSession)e.contentReplacements?.length&&await C(e.contentReplacements);else{let n=t.sessionIdOverride??e.sessionId;n&&(ee(O(n),t.transcriptPath?Le(t.transcriptPath):null),await Ie(),await S(),Ce(n))}w(t.forkSession?{...e,worktreeSession:void 0}:e),t.forkSession||(H(e.worktreeSession),ye());let{agentDefinition:i,agentType:a}=V(e.agentSetting,n.mainThreadAgentDefinition,n.agentDefinitions);Se(n.modeApi?.isCoordinatorMode()?`coordinator`:`normal`);let o=t.includeAttribution?Be(e):void 0,s=B(e.agentName,e.agentColor);N(e.agentName);let c=await Ve(!!r,n.currentCwd,n.cliAgents,n.agentDefinitions);return{messages:e.messages,fileHistorySnapshots:e.fileHistorySnapshots,contentReplacements:e.contentReplacements,agentName:e.agentName,agentColor:e.agentColor===`default`?void 0:e.agentColor,restoredAgentDef:i,initialState:{...n.initialState,...a&&{agent:a},...o&&{attribution:o},...s&&{standaloneAgentContext:s},agentDefinitions:c}}}e(),a(),ve(),ce(),we(),j(),ae(),d(),oe(),Oe(),r();var We=1e3,Ge=500,Ke=300,qe=2e3,Je=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=i(),Z=null;async function Ye(){if(K||q)return;K=!0,J||(J=!0,_e(()=>{ge(),X.emit()}));let e=await Ze();e.length!==0&&(u(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=t.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??We,pollInterval:Z?.pollInterval??Ge},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Je,interval:Z?.chokidarInterval??qe,atomic:!0}),U.on(`add`,$),U.on(`change`,$),U.on(`unlink`,$),Y=ie(async()=>{await Q()}))}function Q(){q=!0,Y&&(Y(),Y=null);let e=Promise.resolve();return U&&(e=U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),e}var Xe=X.subscribe;async function Ze(){let e=se(),t=[],n=m(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=m(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=m(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=m(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of s()){let r=z.join(n,`.claude`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){u(`Detected skill change: ${e}`),le(`tengu_skill_file_changed`,{source:`chokidar`}),Qe(e)}function Qe(e){G.add(e),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let e=[...G];if(G.clear(),D(await he(`skills`,e[0]))){u(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}De(),ke(),fe(),X.emit()},Z?.reloadDebounce??Ke)}async function $e(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var et={initialize:Ye,dispose:Q,subscribe:Xe,resetForTesting:$e};export{V as a,Ue as i,B as n,ze as o,He as r,H as s,et as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./skillGapStore-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./skillGapStore-_YuJP5KI.js";i();export{c as findGapKeyByDraftPath,o as promoteGapToDraft,n as readSkillGaps,e as recordDraftHit,a as recordSkillGap,s as rejectSkillGap,t as shouldPromoteToActive,r as shouldPromoteToDraft};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,r as n}from"./instinctParser-DHMa8xa0.js";import{i as r,o as i,s as a}from"./skillGenerator-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,r as n}from"./instinctParser-DHMa8xa0.js";import{i as r,o as i,s as a}from"./skillGenerator-kbaRbpqJ.js";import{a as o,c as s,n as c}from"./projectContext-eXMSfgdZ.js";import{dirname as l,join as u}from"node:path";import{existsSync as d}from"node:fs";import{createHash as f}from"node:crypto";import{mkdir as p,readFile as m,rename as h,writeFile as g}from"node:fs/promises";async function _(e){let t=e.prompt.trim();if(!t)throw Error(`Cannot record an empty skill gap`);let n=e.project??s(e.cwd),r=await A(n,e.rootDir),i=F(t),a=new Date().toISOString(),o=r.gaps[i],c={key:i,prompt:t,count:(o?.count??0)+1,draftHits:o?.draftHits??0,draftHitSessions:o?.draftHitSessions??[],status:o?.status??`pending`,sessionId:e.sessionId??`unknown-session`,cwd:e.cwd??n.cwd,projectId:n.projectId,projectName:n.projectName,recommendations:(e.recommendations??[]).slice(0,5).map(e=>({name:e.name,description:e.description,score:e.score})),createdAt:o?.createdAt??a,updatedAt:a,draft:o?.draft,active:o?.active};return c.status===`rejected`?(r.gaps[i]=c,await N(n,r,e.rootDir),c):(!c.draft&&C(c)&&(c.draft=await T(c,n),c.status=`draft`,await z()),c.draft&&!c.active&&w(c)&&(c.active=await E(c,n),c.status=`active`,await z()),r.gaps[i]=c,await N(n,r,e.rootDir),c)}async function v(e=s(),t){let n=await A(e,t);return Object.values(n.gaps).sort((e,t)=>e.key.localeCompare(t.key))}async function y(e,t=s(),n){let r=await A(t,n);for(let t of Object.values(r.gaps))if(t.draft?.skillPath===e)return t.key}async function b(e,t=s(),n,r=`unknown-session`){let i=await A(t,n),a=i.gaps[e];if(!a||!a.draft||a.active)return a;let o=a.draftHitSessions??[];if(o.includes(r))return a;let c=new Date().toISOString(),l={...a,draftHits:a.draftHits+1,draftHitSessions:[...o,r],updatedAt:c};return w(l)&&(l.active=await E(l,t),l.status=`active`,await z()),i.gaps[e]=l,await N(t,i,n),l}async function x(e,t=s(),n){let r=await A(t,n),i=r.gaps[e];if(!i)return;if(i.status===`rejected`||i.draft)return i;let a={...i,draft:await T(i,t),status:`draft`,updatedAt:new Date().toISOString()};return r.gaps[e]=a,await N(t,r,n),await z(),a}async function S(e,t=s(),n){let r=await A(t,n),i=r.gaps[e];if(!i)return;let a={...i,status:`rejected`,updatedAt:new Date().toISOString()};return r.gaps[e]=a,await N(t,r,n),a}function C(e){return e.count>=B}function w(e){return e.draft?e.count>=V||e.draftHits>=H:!1}async function T(e,t){let n=D(e,`pending`),i=u(t.projectRoot??t.cwd,`.claude`,`skills`,`.drafts`),o=r([n],{cwd:t.projectRoot??t.cwd,outputRoot:i,scope:`project`,name:`draft-${I(e.prompt)}`,description:`Draft learned skill candidate. Promote after repeated evidence or explicit user correction.`}),s=u(o.outputPath,`SKILL.md`);return d(s)||await a({...o,content:o.content+`
|
|
2
2
|
## Promotion Rule
|
|
3
3
|
|
|
4
4
|
Do not move this draft into active skills until the same gap repeats or the user explicitly confirms this should become reusable.
|
|
5
|
-
`}),{type:`draft`,name:o.name,skillPath:s}}async function E(e,t){let n=r([D(e,`active`)],{cwd:t.projectRoot??t.cwd,scope:`project`,name:I(e.prompt),description:O(e.prompt)}),i=u(n.outputPath,`SKILL.md`);return d(i)||await a(n),{type:`active`,name:n.name,skillPath:i}}function D(e,t){return n({trigger:`When the user asks for ${L(e.prompt,120)}`,action:O(e.prompt),confidence:t===`active`?.82:.55,domain:k(e.prompt),source:`session-observation`,scope:`project`,projectId:e.projectId,projectName:e.projectName,evidence:[`Skill gap prompt: ${L(e.prompt,180)}`,`No high-confidence active skill was auto-loaded.`,`Observed ${e.count} time(s).`],status:t})}function O(e){return/feature\s*\(|feature flag|flag_name|stub|no-op|noop|最小实现/i.test(e)?`Audit feature flags by scanning feature() call sites, excluding generated/dependency noise, classifying each candidate as stub, shell, MVP, or thin-toggle, and writing an evidence-backed document.`:/skill|技能|学习|进化|evolve|learning/i.test(e)?`Run skill discovery first; auto-load only high-confidence matching skills; record a skill gap when none match; promote repeated or corrected gaps into learned skills.`:/test|测试|stub|调用链|参数/i.test(e)?`Infer tests from existing files, parameters, exports, and call chains before simplifying mocks or inventing behavior.`:`Reuse the workflow learned from this prompt: ${L(e,180)}.`}function k(e){let t=e.toLowerCase();return/test|测试|stub|fixture|断言/.test(t)?`testing`:/error|bug|fix|失败|错误|修复|debug/.test(t)?`debugging`:/security|安全|漏洞|secret|token/.test(t)?`security`:/git|commit|branch|pr\b/.test(t)?`git`:/style|lint|format|命名|规范/.test(t)?`code-style`:`workflow`}async function A(e,t){let n=P(e,t),r;try{r=await m(n,`utf8`)}catch(e){if(e.code===`ENOENT`)return{version:1,gaps:{}};throw e}try{return j(JSON.parse(r))}catch{let e=`${n}.corrupt-${Date.now()}`;try{await g(e,r,`utf8`)}catch{}return{version:1,gaps:{}}}}function j(e){let t={};for(let[n,r]of Object.entries(e.gaps??{})){let e=r,i=typeof e.draftHits==`number`&&Number.isFinite(e.draftHits)?e.draftHits:0,a=typeof e.count==`number`?e.count:1,o=M(e.status),s=!!e.draft,c=!!e.active,l=o;l===`draft`&&a<B&&!s&&(l=`pending`),l===`active`&&!c&&(l=s?`draft`:`pending`);let u=Array.isArray(e.draftHitSessions)?e.draftHitSessions.filter(e=>typeof e==`string`):[];t[n]={...r,count:a,draftHits:i,draftHitSessions:u,status:l}}return{version:1,gaps:t}}function M(e){return e===`pending`||e===`draft`||e===`active`||e===`rejected`?e:`pending`}async function N(e,t,n){let r=P(e,n);await p(l(r),{recursive:!0});let i=`${r}.tmp-${process.pid}-${Date.now()}`;await g(i,`${JSON.stringify(t,null,2)}\n`,`utf8`),await h(i,r)}function P(e,t){return u(t?e.projectId===`global`?u(t,`global`):u(t,`projects`,e.projectId):c(e.projectId),`skill-gaps.json`)}function F(e){return`${I(e)}-${R(e).slice(0,8)}`}function I(e){let t=e.replaceAll(`技能`,` skill `).replaceAll(`学习`,` learning `).replaceAll(`进化`,` evolution `).replaceAll(`测试`,` testing `).replaceAll(`最小实现`,` minimal implementation `).toLowerCase(),n=new Set([`the`,`and`,`for`,`with`,`this`,`that`,`user`,`about`,`feature`,`flag`,`name`]);return((t.match(/[a-z0-9][a-z0-9_-]{2,}/g)??[]).filter(e=>!n.has(e)).slice(0,5).join(`-`)||`learned-gap`).slice(0,54).replace(/-+$/g,``)}function L(e,t){return e.replace(/\s+/g,` `).trim().slice(0,t)}function R(e){return f(`sha1`).update(e).digest(`hex`)}async function z(){try{let{clearCommandsCache:e}=await import(`./commands-
|
|
5
|
+
`}),{type:`draft`,name:o.name,skillPath:s}}async function E(e,t){let n=r([D(e,`active`)],{cwd:t.projectRoot??t.cwd,scope:`project`,name:I(e.prompt),description:O(e.prompt)}),i=u(n.outputPath,`SKILL.md`);return d(i)||await a(n),{type:`active`,name:n.name,skillPath:i}}function D(e,t){return n({trigger:`When the user asks for ${L(e.prompt,120)}`,action:O(e.prompt),confidence:t===`active`?.82:.55,domain:k(e.prompt),source:`session-observation`,scope:`project`,projectId:e.projectId,projectName:e.projectName,evidence:[`Skill gap prompt: ${L(e.prompt,180)}`,`No high-confidence active skill was auto-loaded.`,`Observed ${e.count} time(s).`],status:t})}function O(e){return/feature\s*\(|feature flag|flag_name|stub|no-op|noop|最小实现/i.test(e)?`Audit feature flags by scanning feature() call sites, excluding generated/dependency noise, classifying each candidate as stub, shell, MVP, or thin-toggle, and writing an evidence-backed document.`:/skill|技能|学习|进化|evolve|learning/i.test(e)?`Run skill discovery first; auto-load only high-confidence matching skills; record a skill gap when none match; promote repeated or corrected gaps into learned skills.`:/test|测试|stub|调用链|参数/i.test(e)?`Infer tests from existing files, parameters, exports, and call chains before simplifying mocks or inventing behavior.`:`Reuse the workflow learned from this prompt: ${L(e,180)}.`}function k(e){let t=e.toLowerCase();return/test|测试|stub|fixture|断言/.test(t)?`testing`:/error|bug|fix|失败|错误|修复|debug/.test(t)?`debugging`:/security|安全|漏洞|secret|token/.test(t)?`security`:/git|commit|branch|pr\b/.test(t)?`git`:/style|lint|format|命名|规范/.test(t)?`code-style`:`workflow`}async function A(e,t){let n=P(e,t),r;try{r=await m(n,`utf8`)}catch(e){if(e.code===`ENOENT`)return{version:1,gaps:{}};throw e}try{return j(JSON.parse(r))}catch{let e=`${n}.corrupt-${Date.now()}`;try{await g(e,r,`utf8`)}catch{}return{version:1,gaps:{}}}}function j(e){let t={};for(let[n,r]of Object.entries(e.gaps??{})){let e=r,i=typeof e.draftHits==`number`&&Number.isFinite(e.draftHits)?e.draftHits:0,a=typeof e.count==`number`?e.count:1,o=M(e.status),s=!!e.draft,c=!!e.active,l=o;l===`draft`&&a<B&&!s&&(l=`pending`),l===`active`&&!c&&(l=s?`draft`:`pending`);let u=Array.isArray(e.draftHitSessions)?e.draftHitSessions.filter(e=>typeof e==`string`):[];t[n]={...r,count:a,draftHits:i,draftHitSessions:u,status:l}}return{version:1,gaps:t}}function M(e){return e===`pending`||e===`draft`||e===`active`||e===`rejected`?e:`pending`}async function N(e,t,n){let r=P(e,n);await p(l(r),{recursive:!0});let i=`${r}.tmp-${process.pid}-${Date.now()}`;await g(i,`${JSON.stringify(t,null,2)}\n`,`utf8`),await h(i,r)}function P(e,t){return u(t?e.projectId===`global`?u(t,`global`):u(t,`projects`,e.projectId):c(e.projectId),`skill-gaps.json`)}function F(e){return`${I(e)}-${R(e).slice(0,8)}`}function I(e){let t=e.replaceAll(`技能`,` skill `).replaceAll(`学习`,` learning `).replaceAll(`进化`,` evolution `).replaceAll(`测试`,` testing `).replaceAll(`最小实现`,` minimal implementation `).toLowerCase(),n=new Set([`the`,`and`,`for`,`with`,`this`,`that`,`user`,`about`,`feature`,`flag`,`name`]);return((t.match(/[a-z0-9][a-z0-9_-]{2,}/g)??[]).filter(e=>!n.has(e)).slice(0,5).join(`-`)||`learned-gap`).slice(0,54).replace(/-+$/g,``)}function L(e,t){return e.replace(/\s+/g,` `).trim().slice(0,t)}function R(e){return f(`sha1`).update(e).digest(`hex`)}async function z(){try{let{clearCommandsCache:e}=await import(`./commands-BWIOEBPs.js`);e()}catch{}}var B,V,H,U=e((()=>{t(),o(),i(),B=2,V=4,H=2}));export{b as a,w as c,v as i,C as l,U as n,_ as o,x as r,S as s,y as t};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{o as r,t as i}from"./localSearch-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{o as r,t as i}from"./localSearch-CDOJNc_E.js";import{l as a,u as o}from"./instinctParser-DHMa8xa0.js";import{basename as s,dirname as c,join as l}from"node:path";import{existsSync as u}from"node:fs";import{mkdir as d,readFile as f,readdir as p,rename as ee,rm as m,writeFile as h}from"node:fs/promises";function g(e){return e.length===0?!1:e.reduce((e,t)=>e+t.confidence,0)/e.length>=a().minConfidence}function _(e){let t=b[e[0]?.domain??`project`],n=new Set;for(let t of e){for(let e of`${t.trigger} ${t.action}`.toLowerCase().split(/[^a-z0-9]+/))if(te(e)&&n.add(e),n.size>=5)break;if(n.size>=5)break}let r=v([t,...n].join(`-`));return y(r)?`${t}-learned-pattern`:r}function v(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,64).replace(/-$/g,``)||`learned-skill`}function y(e){return x.has(e)}function te(e){return e.length>2&&![`when`,`with`,`this`,`that`,`user`,`project`,`prefer`,`avoid`,`use`,`using`,`the`,`and`,`for`].includes(e)}var b,x,S=e((()=>{o(),b={workflow:`workflow`,testing:`testing`,debugging:`debugging`,"code-style":`style`,security:`security`,git:`git`,project:`project`},x=new Set([`learned-skill`,`better-skill`,`new-skill`,`project-skill`,`workflow-skill`])}));async function C(e,t,n){let r=n.length>0&&typeof n[0]==`string`?await w(e,n):n,i=L(`${t.name} ${t.description} ${t.content}`);return r.map(e=>({skill:e,score:R(i,L(`${e.name} ${e.description} ${e.content}`))})).filter(e=>e.score>=.18).sort((e,t)=>t.score-e.score).map(e=>e.skill)}async function ne(e,t){return C(`skill`,e,t)}async function w(e,t){if(e===`skill`)return D(t);let n=[];for(let e of t)u(e)&&await P(e,n);return n}function T(e,t,n={}){let r=t.find(e=>j(e));if(n.allowHardDelete&&r)return{type:`delete`,targetSkill:r,reason:`Existing skill is low quality, unreferenced, and safe to delete.`,confirmed:!0};let i=t[0];if(!i)return{type:`create`,draft:e,reason:`No overlapping active skill found.`};let a=R(L(`${e.name} ${e.description} ${e.content}`),L(`${i.name} ${i.description} ${i.content}`));return a>=.72&&e.confidence>=.75&&ae(e,i)?{type:`replace`,targetSkill:i,draft:e,reason:`New learned skill has high overlap (${a.toFixed(2)}) and higher confidence.`}:a>=.35?{type:`merge`,targetSkill:i,patch:ie(e),reason:`Existing skill overlaps with the learned pattern (${a.toFixed(2)}).`}:{type:`create`,draft:e,reason:`Overlap is too low to merge.`}}async function E(e,t={}){switch(e.type){case`create`:return{activePath:await W(e.draft)};case`merge`:return I(e.targetSkill)?{activePath:await re(e.targetSkill,e.patch)}:(process.stderr.write(`[skill-learning] skip user-authored skill: ${e.targetSkill.path}\n`),{});case`replace`:{if(!I(e.targetSkill))return process.stderr.write(`[skill-learning] skip user-authored skill: ${e.targetSkill.path}\n`),{};let n=e.draft.outputPath;if(e.hardDelete){let{deletedPath:r,manifestPath:i,tombstonePath:a}=await k(e.targetSkill,e.reason,{newSkill:e.draft.name,newPath:n},{...t,allowHardDelete:!0});return{activePath:await W(e.draft),deletedPath:r,manifestPath:i,tombstonePath:a}}let{archivedPath:r,manifestPath:i}=await O(e.targetSkill,e.reason,{newSkill:e.draft.name,newPath:n},t);return{activePath:await W(e.draft),archivedPath:r,manifestPath:i}}case`archive`:return await O(e.targetSkill,e.reason,void 0,t);case`delete`:return await k(e.targetSkill,e.reason,void 0,{...t,allowHardDelete:t.allowHardDelete&&e.confirmed!==!1})}}async function D(e){let t=[];for(let n of e)u(n)&&await N(n,t);return t}async function O(e,t,n,r={}){let a=c(e.path),o=r.archiveRoot??l(c(a),`.archive`),u=l(o,`${s(a)}-${M(r.now)}`);await d(o,{recursive:!0}),await ee(a,u);let f=await A(r.manifestRoot??u,{oldSkill:e.name,oldPath:e.path,newSkill:n?.newSkill,newPath:n?.newPath,action:`archive`,reason:t,replacedAt:(r.now??new Date).toISOString(),recoverable:!0});return i(),{archivedPath:u,manifestPath:f}}async function k(e,t,n,r={}){if(!r.allowHardDelete)throw Error(`Hard delete requires allowHardDelete=true`);let a=c(e.path),o=u(e.path)?await f(e.path,`utf8`):``,s=r.manifestRoot??l(c(a),`.tombstones`),d=await A(s,{oldSkill:e.name,oldPath:e.path,newSkill:n?.newSkill,newPath:n?.newPath,action:`delete`,reason:t,replacedAt:(r.now??new Date).toISOString(),recoverable:!1}),p=l(s,`${e.name}-${M(r.now)}.tombstone.json`);return await h(p,`${JSON.stringify({deletedSkill:e.name,oldPath:e.path,content:o},null,2)}\n`,`utf8`),await m(a,{recursive:!0,force:!0}),i(),{deletedPath:e.path,manifestPath:d,tombstonePath:p}}async function A(e,t){await d(e,{recursive:!0});let n=l(e,`replacement-manifest.json`);return await h(n,`${JSON.stringify(t,null,2)}\n`,`utf8`),n}async function re(e,t){let n=l(c(e.path),`learned-skill.patch.md`);return await h(n,t,`utf8`),i(),n}function ie(e){return[`# Learned Skill Merge Patch`,``,`Target learned skill: ${e.name}`,`Confidence: ${e.confidence}`,``,`## Suggested additions`,``,e.content].join(`
|
|
2
2
|
`)}function ae(e,t){if(t.status===`superseded`||t.status===`archived`)return!0;let n=e.confidence-(t.confidence??.5),r=e.content.length-t.content.length;return n>=.15||r>160}function j(e){return e.safeToDelete===!0&&(e.referencedBy?.length??0)===0&&e.quality===`low`}function M(e=new Date){return e.toISOString().replace(/[:.]/g,`-`)}async function N(e,t){let n=await p(e,{withFileTypes:!0});for(let r of n){let n=l(e,r.name);if(r.isDirectory()){if(r.name===`.archive`)continue;await N(n,t);continue}if(r.isFile()&&r.name===`SKILL.md`){let e=await f(n,`utf8`);t.push({name:F(e,`name`)??s(c(n)),description:F(e,`description`)??``,path:n,content:e})}}}async function P(e,t){let n=await p(e,{withFileTypes:!0});for(let r of n){let n=l(e,r.name);if(r.isDirectory()){if(r.name===`.archive`)continue;await P(n,t);continue}if(r.isFile()&&r.name.endsWith(`.md`)){let e=await f(n,`utf8`);t.push({name:F(e,`name`)??r.name.replace(/\.md$/,``),description:F(e,`description`)??``,path:n,content:e})}}}function F(e,t){let n=e.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n)return n[1].match(RegExp(`^${t}:\\s*"?([^"\\n]+)"?`,`m`))?.[1]?.trim()}function I(e){return F(e.content,`origin`)===`skill-learning`}function L(e){return new Set(e.toLowerCase().split(/[^a-z0-9]+/).filter(e=>e.length>2))}function R(e,t){if(e.size===0||t.size===0)return 0;let n=0;for(let r of e)t.has(r)&&n++;return n/Math.min(e.size,t.size)}function z(e,t){return R(L(`${e.name} ${e.description} ${e.content}`),L(`${t.name} ${t.description} ${t.content}`))}var B=e((()=>{r(),$()}));function V(e,t){if(e.length===0)throw Error(`Cannot generate a skill draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=t?.name?v(t.name):K(e),i=e.reduce((e,t)=>e+t.confidence,0)/e.length,a=t?.description??q(e),o=G(r,n,t),s=J({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 H(e,t,n){let r=V(e,t),i=await C(`skill`,r,n);for(let t of i){let n=z(r,t);if(n>=.8)return{action:`append-evidence`,target:t,overlap:n,appendedPath:await U(t,e)}}return{action:`create`,draft:r}}async function U(e,t){let n=await f(e.path,`utf8`).catch(()=>e.content);if(Buffer.byteLength(n,`utf8`)>=Q)return e.path;let r=t.flatMap(e=>e.evidence.map(e=>`- ${e}`)),a=r.slice(0,X);a.length<r.length&&a.push(`- [... ${r.length-a.length} more evidence entries omitted]`);let o=[``,`## Learned evidence (${new Date().toISOString()})`,``,...a,``].join(`
|
|
3
3
|
`),s=n.endsWith(`
|
|
4
|
-
`)?n+o:`${n}\n${o}`,c=Buffer.byteLength(s,`utf8`)>Q?s.slice(0,Q):s;return await h(e.path,c,`utf8`),i(),e.path}async function W(e){await d(e.outputPath,{recursive:!0});let t=l(e.outputPath,`SKILL.md`);await h(t,e.content,`utf8`),i();try{let{clearCommandsCache:e}=await import(`./commands-
|
|
4
|
+
`)?n+o:`${n}\n${o}`,c=Buffer.byteLength(s,`utf8`)>Q?s.slice(0,Q):s;return await h(e.path,c,`utf8`),i(),e.path}async function W(e){await d(e.outputPath,{recursive:!0});let t=l(e.outputPath,`SKILL.md`);await h(t,e.content,`utf8`),i();try{let{clearCommandsCache:e}=await import(`./commands-BWIOEBPs.js`);e()}catch{}return t}function G(e,n,r){return r?.outputRoot?l(r.outputRoot,e):n===`project`?l(r?.cwd??process.cwd(),`.claude`,`skills`,e):l(r?.globalSkillsDir??l(t(),`skills`),e)}function K(e){return _(e)}function q(e){let t=(e[0]?.action??`Apply a learned project pattern`).replace(/\s+/g,` `).slice(0,120);return t.length>0?t:`Apply learned project patterns`}function J(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(`, `)}]`,`---`,``,`# ${oe(t)}`,``,`## Trigger`,``,i.map(e=>`- ${e.trigger}`).join(`
|
|
5
5
|
`),``,`## Action`,``,i.map(e=>`- ${e.action}`).join(`
|
|
6
6
|
`),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,Z).join(`
|
|
7
7
|
`),``].join(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./featureCheck-Cm0YNDXO.js";import"./instinctParser-DHMa8xa0.js";import"./skillGenerator-kbaRbpqJ.js";import{p as e}from"./runtimeObserver-nAhH4Wca.js";import{o as t}from"./observationStore-tvkldXUo.js";import{c as n}from"./projectContext-eXMSfgdZ.js";import"./sessionObserver-DG2zQgfi.js";import"./toolEventObserver-DzLd0MSn.js";import"./skillGapStore-_YuJP5KI.js";import{t as r}from"./skillLearning-DBbdGbk-.js";r();export{e as loadInstincts,t as readObservations,n as resolveProjectContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./featureCheck-Cm0YNDXO.js";import{b as n,m as r,o as i}from"./skillGenerator-kbaRbpqJ.js";import{S as a,T as o,f as s,i as c,k as l,u}from"./runtimeObserver-nAhH4Wca.js";import{i as d}from"./observationStore-tvkldXUo.js";import{a as f}from"./projectContext-eXMSfgdZ.js";import{a as p,c as m,d as h,i as g}from"./sessionObserver-DG2zQgfi.js";import{n as _}from"./toolEventObserver-DzLd0MSn.js";import{n as v}from"./skillGapStore-_YuJP5KI.js";var y=e((()=>{t(),a(),n(),s(),d(),u(),f(),c(),h(),p(),l(),o(),_(),g(),v(),i(),r(),m()}));export{y as t};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Mx as l,kx as u}from"./loadAgentsDir-
|
|
2
|
-
`)}async function m(){let e=[];d()?e.push(`Skill Learning: already enabled`):(process.env.SKILL_LEARNING_ENABLED=`1`,e.push(`Skill Learning: enabled (SKILL_LEARNING_ENABLED=1)`));try{let{initSkillLearning:t}=await import(`./runtimeObserver-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Mx as l,kx as u}from"./loadAgentsDir-DI1a76pd.js";import{r as d,t as f}from"./featureCheck-Cm0YNDXO.js";async function p(){let{readObservations:e,loadInstincts:t,resolveProjectContext:n}=await import(`./skillLearning-3KWrBczS.js`),r=n(process.cwd()),[i,a]=await Promise.all([e({project:r}),t({project:r})]);return[`Skill Learning status for ${r.projectName} (${r.projectId})`,`Observations: ${i.length}`,`Instincts: ${a.length}`,``,`Skill Learning: ${d()?`enabled`:`disabled`}`].join(`
|
|
2
|
+
`)}async function m(){let e=[];d()?e.push(`Skill Learning: already enabled`):(process.env.SKILL_LEARNING_ENABLED=`1`,e.push(`Skill Learning: enabled (SKILL_LEARNING_ENABLED=1)`));try{let{initSkillLearning:t}=await import(`./runtimeObserver-YNy3mIb7.js`);t(),e.push(`Runtime observer: initialized`)}catch{e.push(`Runtime observer: init skipped (not available)`)}return e.join(`
|
|
3
3
|
`)}async function h(){let e=[];return d()?(process.env.SKILL_LEARNING_ENABLED=`0`,process.env.CLAUDE_SKILL_LEARNING_DISABLE=`1`,e.push(`Skill Learning: disabled (SKILL_LEARNING_ENABLED=0)`)):e.push(`Skill Learning: already disabled`),e.join(`
|
|
4
|
-
`)}function g({onDone:e}){l(`skill-panel`);let[t,n]=(0,v.useState)(0),a=(0,v.useMemo)(()=>[{label:`Status`,description:`Show skill learning status for current project`,run:p},{label:`Start`,description:`Enable skill learning for this session`,run:m},{label:`Stop`,description:`Disable skill learning for this session`,run:h},{label:`About`,description:`Detailed description of skill learning features`,run:()=>Promise.resolve(x)}],[]),c=()=>{let n=a[t];n&&n.run().then(t=>{e(t,{display:`system`})})};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,y.jsx)(i,{title:`Skill Learning`,subtitle:`${a.length} actions`,onCancel:()=>e(`Skill panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,y.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,y.jsxs)(o,{flexDirection:`row`,children:[(0,y.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(b)}),(0,y.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,y.jsx)(o,{marginTop:1,children:(0,y.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function _(e,t,n){let r=n?.trim()??``;if(r===`start`)return e(await m(),{display:`system`}),null;if(r===`stop`)return e(await h(),{display:`system`}),null;if(r===`about`)return e(x,{display:`system`}),null;if(r===`status`)return e(await p(),{display:`system`}),null;if(r){let{call:t}=await import(`./skill-learning-
|
|
4
|
+
`)}function g({onDone:e}){l(`skill-panel`);let[t,n]=(0,v.useState)(0),a=(0,v.useMemo)(()=>[{label:`Status`,description:`Show skill learning status for current project`,run:p},{label:`Start`,description:`Enable skill learning for this session`,run:m},{label:`Stop`,description:`Disable skill learning for this session`,run:h},{label:`About`,description:`Detailed description of skill learning features`,run:()=>Promise.resolve(x)}],[]),c=()=>{let n=a[t];n&&n.run().then(t=>{e(t,{display:`system`})})};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,y.jsx)(i,{title:`Skill Learning`,subtitle:`${a.length} actions`,onCancel:()=>e(`Skill panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,y.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,y.jsxs)(o,{flexDirection:`row`,children:[(0,y.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(b)}),(0,y.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,y.jsx)(o,{marginTop:1,children:(0,y.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function _(e,t,n){let r=n?.trim()??``;if(r===`start`)return e(await m(),{display:`system`}),null;if(r===`stop`)return e(await h(),{display:`system`}),null;if(r===`about`)return e(x,{display:`system`}),null;if(r===`status`)return e(await p(),{display:`system`}),null;if(r){let{call:t}=await import(`./skill-learning-C0nOKZfg.js`),n=await t(r,{});return n&&typeof n==`object`&&`value`in n&&e(n.value,{display:`system`}),null}return(0,y.jsx)(g,{onDone:e})}var v,y,b,x;e((()=>{v=t(n(),1),a(),u(),f(),y=c(),b=28,x=`# Skill Learning (自动学习)
|
|
5
5
|
|
|
6
6
|
Skill Learning 是一个闭环学习系统,通过观察用户的操作模式自动提取直觉(instinct),
|
|
7
7
|
并在达到阈值后生成可复用的 skill 文件、agent 和 command。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Eh as l,Mx as u,Th as d,kx as f}from"./loadAgentsDir-
|
|
2
|
-
`)}async function m(){if(l()&&process.env.SKILL_SEARCH_ENABLED!==`0`)return`Skill Search: already enabled`;process.env.SKILL_SEARCH_ENABLED=`1`;let e=[`Skill Search: enabled (SKILL_SEARCH_ENABLED=1)`];try{let{clearSkillIndexCache:t}=await import(`./localSearch-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Eh as l,Mx as u,Th as d,kx as f}from"./loadAgentsDir-DI1a76pd.js";function p(){return[`Skill Search (自动技能匹配)`,`Status: ${l()?`enabled`:`disabled`}`,``,`When enabled, relevant skills are automatically matched and`,`injected into conversation context each turn.`].join(`
|
|
2
|
+
`)}async function m(){if(l()&&process.env.SKILL_SEARCH_ENABLED!==`0`)return`Skill Search: already enabled`;process.env.SKILL_SEARCH_ENABLED=`1`;let e=[`Skill Search: enabled (SKILL_SEARCH_ENABLED=1)`];try{let{clearSkillIndexCache:t}=await import(`./localSearch-MBx7KzC2.js`);t(),e.push(`Skill index cache: cleared (will rebuild on next search)`)}catch{e.push(`Skill index cache: clear skipped`)}return e.join(`
|
|
3
3
|
`)}async function h(){return l()?(process.env.SKILL_SEARCH_ENABLED=`0`,`Skill Search: disabled (SKILL_SEARCH_ENABLED=0)`):`Skill Search: already disabled`}function g({onDone:e}){u(`skill-search-panel`);let[t,n]=(0,v.useState)(0),a=(0,v.useMemo)(()=>[{label:`Status`,description:`Show whether automatic skill matching is active`,run:()=>Promise.resolve(p())},{label:`Start`,description:`Enable automatic skill matching for this session`,run:m},{label:`Stop`,description:`Disable automatic skill matching for this session`,run:h},{label:`About`,description:`How automatic skill matching works`,run:()=>Promise.resolve(x)}],[]),c=()=>{let n=a[t];n&&n.run().then(t=>{e(t,{display:`system`})})};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,y.jsx)(i,{title:`Skill Search`,subtitle:`${a.length} actions`,onCancel:()=>e(`Skill search panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,y.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,y.jsxs)(o,{flexDirection:`row`,children:[(0,y.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(b)}),(0,y.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,y.jsx)(o,{marginTop:1,children:(0,y.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function _(e,t,n){let r=n?.trim()??``;return r===`start`?(e(await m(),{display:`system`}),null):r===`stop`?(e(await h(),{display:`system`}),null):r===`about`?(e(x,{display:`system`}),null):r===`status`?(e(p(),{display:`system`}),null):(0,y.jsx)(g,{onDone:e})}var v,y,b,x;e((()=>{v=t(n(),1),a(),f(),d(),y=c(),b=28,x=`# Skill Search (自动技能匹配)
|
|
4
4
|
|
|
5
5
|
Skill Search 控制对话中的自动技能匹配功能。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,u as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Po as l,ec as u,jo as d,nc as f}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,u as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Po as l,ec as u,jo as d,nc as f}from"./paths-BBvuDQl9.js";import{b as p,x as m}from"./startupProfiler-DnXZaX4A.js";import{JS as h,Sm as g,Xi as _,YS as v,la as y,wm as b}from"./loadAgentsDir-DI1a76pd.js";function x(e,t){let n=t.trim();if(n===``)return e.slice();let r=n.toLowerCase().split(/\s+/);return e.filter(e=>{let t=`${e.name} ${e.description}`.toLowerCase();return r.every(e=>t.includes(e))})}var S=e((()=>{}));function C(e){return e===`plugin`?`plugin`:e===`mcp`?`mcp`:u(e)}function w({onExit:e,commands:t}){let[n,a]=(0,T.useState)(``),c=(0,T.useMemo)(()=>t.filter(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`commands_DEPRECATED`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)),[t]),u=(0,T.useMemo)(()=>x(c.map(e=>({...e,name:y(e),description:e.description??``})),n),[c,n]),d=(0,T.useMemo)(()=>{let e={policySettings:[],userSettings:[],projectSettings:[],localSettings:[],flagSettings:[],plugin:[],mcp:[]};for(let t of u){let n=t.source;n in e&&e[n].push(t)}for(let t of Object.values(e))t.sort((e,t)=>y(e).localeCompare(y(t)));return e},[u]),f=()=>{e(`Skills dialog dismissed`,{display:`system`})};if(c.length===0)return(0,E.jsxs)(i,{title:`Skills`,subtitle:`No skills found`,onCancel:f,hideInputGuide:!0,children:[(0,E.jsx)(r,{dimColor:!0,children:`Create skills in .claude/skills/ or ~/.claude/skills/`}),(0,E.jsx)(r,{dimColor:!0,italic:!0,children:(0,E.jsx)(h,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`close`})})]});let m=e=>{switch(e){case`projectSettings`:case`localSettings`:return{label:`local`,color:`yellow`};case`userSettings`:return{label:`global`,color:`cyan`};case`policySettings`:return{label:`managed`,color:`magenta`};default:return}},_=(e,t)=>{let n=`~${p(g(e))}`,i=e.source===`plugin`?e.pluginInfo?.pluginManifest.name:void 0,a=m(e.source);return(0,E.jsxs)(s,{children:[(0,E.jsx)(r,{color:t?`suggestion`:void 0,children:y(e)}),a&&(0,E.jsxs)(r,{color:a.color,children:[` [`,a.label,`]`]}),(0,E.jsxs)(r,{dimColor:!0,children:[i?` · ${i}`:``,` · `,C(e.source),` · `,n,` tokens`]})]})};return(0,E.jsx)(o,{title:`Skills`,placeholder:`Type to filter skills…`,items:(0,T.useMemo)(()=>D.flatMap(e=>d[e]),[d]),getKey:e=>`${e.name}-${e.source}`,visibleCount:12,direction:`down`,onQueryChange:a,onSelect:t=>{e(`/${y(t)}`,{display:`user`})},onCancel:f,emptyMessage:e=>e.trim()?`No skills matching "${e.trim()}"`:`No skills found`,matchLabel:n.trim()===``?`${c.length} ${l(c.length,`skill`)}`:`${u.length}/${c.length} ${l(c.length,`skill`)}`,selectAction:`invoke skill`,renderItem:(e,t)=>_(e,t)})}var T,E,D,O=e((()=>{n(),T=t(n(),1),_(),a(),b(),m(),f(),d(),v(),S(),E=c(),D=[`projectSettings`,`localSettings`,`userSettings`,`flagSettings`,`policySettings`,`plugin`,`mcp`]}));async function k(e,t){return(0,A.jsx)(w,{onExit:e,commands:t.options.commands})}var A;e((()=>{n(),O(),A=c()}))();export{k as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{C as t,E as n,S as r,T as i,_ as a,b as o,c as s,d as c,f as l,g as u,h as d,l as f,m as p,p as m,u as h,v as g,w as _,x as v,y}from"./companion-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{C as t,E as n,S as r,T as i,_ as a,b as o,c as s,d as c,f as l,g as u,h as d,l as f,m as p,p as m,u as h,v as g,w as _,x as v,y}from"./companion-Bkn2lSLj.js";function b(e,t=0){let n=C[e.species],r=[...n[t%n.length].map(t=>t.replaceAll(`{E}`,e.eye))];return e.hat!==`none`&&!r[0].trim()&&(r[0]=w[e.hat]),!r[0].trim()&&n.every(e=>!e[0].trim())&&r.shift(),r}function x(e){return C[e].length}function S(e){let g=e.eye;switch(e.species){case d:case a:return`(${g}>`;case f:return`(${g}${g})`;case l:return`=${g}ω${g}=`;case p:return`<${g}~${g}>`;case o:return`~(${g}${g})~`;case v:return`(${g})(${g})`;case r:return`(${g}>)`;case n:return`[${g}_${g}]`;case i:return`${g}(@)`;case u:return`/${g}${g}\\`;case s:return`}${g}.${g}{`;case c:return`(${g}oo${g})`;case h:return`|${g} ${g}|`;case _:return`[${g}${g}]`;case t:return`(${g}..${g})`;case y:return`|${g} ${g}|`;case m:return`(${g}.${g})`}}var C,w,T=e((()=>{g(),C={[d]:[[` `,` __ `,` <({E} )___ `,` ( ._> `," `--´ "],[` `,` __ `,` <({E} )___ `,` ( ._> `," `--´~ "],[` `,` __ `,` <({E} )___ `,` ( .__> `," `--´ "]],[a]:[[` `,` ({E}> `,` || `,` _(__)_ `,` ^^^^ `],[` `,` ({E}> `,` || `,` _(__)_ `,` ^^^^ `],[` `,` ({E}>> `,` || `,` _(__)_ `,` ^^^^ `]],[f]:[[` `,` .----. `,` ( {E} {E} ) `,` ( ) `," `----´ "],[` `,` .------. `,` ( {E} {E} ) `,` ( ) `," `------´ "],[` `,` .--. `,` ({E} {E}) `,` ( ) `," `--´ "]],[l]:[[` `,` /\\_/\\ `,` ( {E} {E}) `,` ( ω ) `,` (")_(") `],[` `,` /\\_/\\ `,` ( {E} {E}) `,` ( ω ) `,` (")_(")~ `],[` `,` /\\-/\\ `,` ( {E} {E}) `,` ( ω ) `,` (")_(") `]],[p]:[[` `,` /^\\ /^\\ `,` < {E} {E} > `,` ( ~~ ) `," `-vvvv-´ "],[` `,` /^\\ /^\\ `,` < {E} {E} > `,` ( ) `," `-vvvv-´ "],[` ~ ~ `,` /^\\ /^\\ `,` < {E} {E} > `,` ( ~~ ) `," `-vvvv-´ "]],[o]:[[` `,` .----. `,` ( {E} {E} ) `,` (______) `,` /\\/\\/\\/\\ `],[` `,` .----. `,` ( {E} {E} ) `,` (______) `,` \\/\\/\\/\\/ `],[` o `,` .----. `,` ( {E} {E} ) `,` (______) `,` /\\/\\/\\/\\ `]],[v]:[[` `,` /\\ /\\ `,` (({E})({E})) `,` ( >< ) `," `----´ "],[` `,` /\\ /\\ `,` (({E})({E})) `,` ( >< ) `,` .----. `],[` `,` /\\ /\\ `,` (({E})(-)) `,` ( >< ) `," `----´ "]],[r]:[[` `,` .---. `,` ({E}>{E}) `,` /( )\\ `," `---´ "],[` `,` .---. `,` ({E}>{E}) `,` |( )| `," `---´ "],[` .---. `,` ({E}>{E}) `,` /( )\\ `," `---´ ",` ~ ~ `]],[n]:[[` `,` _,--._ `,` ( {E} {E} ) `,` /[______]\\ `," `` `` "],[` `,` _,--._ `,` ( {E} {E} ) `,` /[______]\\ `," `` `` "],[` `,` _,--._ `,` ( {E} {E} ) `,` /[======]\\ `," `` `` "]],[i]:[[` `,` {E} .--. `,` \\ ( @ ) `," \\_`--´ ",` ~~~~~~~ `],[` `,` {E} .--. `,` | ( @ ) `," \\_`--´ ",` ~~~~~~~ `],[` `,` {E} .--. `,` \\ ( @ ) `," \\_`--´ ",` ~~~~~~ `]],[u]:[[` `,` .----. `,` / {E} {E} \\ `,` | | `," ~`~``~`~ "],[` `,` .----. `,` / {E} {E} \\ `,` | | `," `~`~~`~` "],[` ~ ~ `,` .----. `,` / {E} {E} \\ `,` | | `," ~~`~~`~~ "]],[s]:[[` `,`}~(______)~{`,`}~({E} .. {E})~{`,` ( .--. ) `,` (_/ \\_) `],[` `,`~}(______){~`,`~}({E} .. {E}){~`,` ( .--. ) `,` (_/ \\_) `],[` `,`}~(______)~{`,`}~({E} .. {E})~{`,` ( -- ) `,` ~_/ \\_~ `]],[c]:[[` `,` n______n `,` ( {E} {E} ) `,` ( oo ) `," `------´ "],[` `,` n______n `,` ( {E} {E} ) `,` ( Oo ) `," `------´ "],[` ~ ~ `,` u______n `,` ( {E} {E} ) `,` ( oo ) `," `------´ "]],[h]:[[` `,` n ____ n `,` | |{E} {E}| | `,` |_| |_| `,` | | `],[` `,` ____ `,` n |{E} {E}| n `,` |_| |_| `,` | | `],[` n n `,` | ____ | `,` | |{E} {E}| | `,` |_| |_| `,` | | `]],[_]:[[` `,` .[||]. `,` [ {E} {E} ] `,` [ ==== ] `," `------´ "],[` `,` .[||]. `,` [ {E} {E} ] `,` [ -==- ] `," `------´ "],[` * `,` .[||]. `,` [ {E} {E} ] `,` [ ==== ] `," `------´ "]],[t]:[[` `,` (\\__/) `,` ( {E} {E} ) `,` =( .. )= `,` (")__(") `],[` `,` (|__/) `,` ( {E} {E} ) `,` =( .. )= `,` (")__(") `],[` `,` (\\__/) `,` ( {E} {E} ) `,` =( . . )= `,` (")__(") `]],[y]:[[` `,` .-o-OO-o-. `,`(__________)`,` |{E} {E}| `,` |____| `],[` `,` .-O-oo-O-. `,`(__________)`,` |{E} {E}| `,` |____| `],[` . o . `,` .-o-OO-o-. `,`(__________)`,` |{E} {E}| `,` |____| `]],[m]:[[` `,` /\\ /\\ `,` ( {E} {E} ) `,` ( .. ) `," `------´ "],[` `,` /\\ /| `,` ( {E} {E} ) `,` ( .. ) `," `------´ "],[` `,` /\\ /\\ `,` ( {E} {E} ) `,` ( .. ) `," `------´~ "]]},w={none:``,crown:` \\^^^/ `,tophat:` [___] `,propeller:` -+- `,halo:` ( ) `,wizard:` /^\\ `,beanie:` (___) `,tinyduck:` ,> `}}));export{x as i,S as n,b as r,T as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{Ac as r,Nc as i}from"./paths-
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{Ac as r,Nc as i}from"./paths-BBvuDQl9.js";var a=e(t(),1);r();var o=n();function s(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);return r===i?e[r]:e[r]+(e[i]-e[r])*(n-r)}var c=1024;function l(){let e=new Map,t=new Map,n=new Map;return{increment(t,n=1){e.set(t,(e.get(t)??0)+n)},set(t,n){e.set(t,n)},observe(e,n){let r=t.get(e);if(r||(r={reservoir:[],count:0,sum:0,min:n,max:n},t.set(e,r)),r.count++,r.sum+=n,n<r.min&&(r.min=n),n>r.max&&(r.max=n),r.reservoir.length<c)r.reservoir.push(n);else{let e=Math.floor(Math.random()*r.count);e<c&&(r.reservoir[e]=n)}},add(e,t){let r=n.get(e);r||(r=new Set,n.set(e,r)),r.add(t)},getAll(){let r=Object.fromEntries(e);for(let[e,n]of t){if(n.count===0)continue;r[`${e}_count`]=n.count,r[`${e}_min`]=n.min,r[`${e}_max`]=n.max,r[`${e}_avg`]=n.sum/n.count;let t=[...n.reservoir].sort((e,t)=>e-t);r[`${e}_p50`]=s(t,50),r[`${e}_p95`]=s(t,95),r[`${e}_p99`]=s(t,99)}for(let[e,t]of n)r[e]=t.size;return r}}}var u=(0,a.createContext)(null);function d({store:e,children:t}){let n=(0,a.useMemo)(()=>l(),[]),r=e??n;return(0,a.useEffect)(()=>{let e=()=>{let e=r.getAll();Object.keys(e).length>0&&i(t=>({...t,lastSessionMetrics:e}))};return process.on(`exit`,e),()=>{process.off(`exit`,e)}},[r]),(0,o.jsx)(u.Provider,{value:r,children:t})}export{l as n,d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Settings-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Settings-vfFvcweR.js";async function a(e,t){return(0,o.jsx)(i,{onClose:e,context:t,defaultTab:`Status`})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Uc as t,Wc as n}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Uc as t,Wc as n}from"./loadAgentsDir-DI1a76pd.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,t)=>e+n(`${t.agentType}: ${t.whenToUse}`),0):0}var i,a=e((()=>{t(),i=15e3}));export{r as n,a as r,i as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i,b as a,f as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ct as u,cn as d}from"./state-sIHsFpDu.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{A as m,et as h,j as g}from"./log-CzsijfHZ.js";import{Ar as _,Dx as v,Ox as y,Tr as b,mr as x,yi as S}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i,b as a,f as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ct as u,cn as d}from"./state-sIHsFpDu.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{A as m,et as h,j as g}from"./log-CzsijfHZ.js";import{Ar as _,Dx as v,Ox as y,Tr as b,mr as x,yi as S}from"./loadAgentsDir-DI1a76pd.js";import{r as C,t as w}from"./sanitization-CYp-9DbE.js";function T({tagName:e,onConfirm:t,onCancel:n}){return(0,A.jsx)(o,{title:`Remove tag?`,subtitle:`Current tag: #${e}`,onCancel:n,color:`warning`,children:(0,A.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,A.jsx)(a,{children:`This will remove the tag from the current session.`}),(0,A.jsx)(v,{onChange:e=>e===`yes`?t():n(),options:[{label:`Yes, remove tag`,value:`yes`},{label:`No, keep tag`,value:`no`}]})]})})}function E({tagName:e,onDone:t}){let[r,i]=k.useState(!1),[a,o]=k.useState(null),s=C(e).trim();return k.useEffect(()=>{let e=u();if(!e){t(`No active session to tag`,{display:`system`});return}if(!s){t(`Tag name cannot be empty`,{display:`system`});return}o(e);let r=x(e);r===s?(p(`tengu_tag_command_remove_prompt`,{}),i(!0)):(p(`tengu_tag_command_add`,{is_replacing:!!r}),(async()=>{await S(e,s,b()),t(`Tagged session with ${n.cyan(`#${s}`)}`,{display:`system`})})())},[s,t]),r&&a?(0,A.jsx)(T,{tagName:s,onConfirm:async()=>{p(`tengu_tag_command_remove_confirmed`,{}),await S(a,``,b()),t(`Removed tag ${n.cyan(`#${s}`)}`,{display:`system`})},onCancel:()=>{p(`tengu_tag_command_remove_cancelled`,{}),t(`Kept tag ${n.cyan(`#${s}`)}`,{display:`system`})}}):null}function D({onDone:e}){return k.useEffect(()=>{e(`Usage: /tag <tag-name>
|
|
2
2
|
|
|
3
3
|
Toggle a searchable tag on the current session.
|
|
4
4
|
Run the same command again to remove the tag.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./BackgroundTasksDialog-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./BackgroundTasksDialog-ByraVuXh.js";async function a(e,t){return(0,o.jsx)(i,{toolUseContext:t,onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|