claude-code-best 2.6.12 → 2.7.0
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-BqR8LhJq.js +1 -0
- package/dist/chunks/App-DkBMWXkK.js +1 -0
- package/dist/chunks/ApproveApiKey-5xd0lUV7.js +1 -0
- package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +1 -0
- package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +1 -0
- package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +1 -0
- package/dist/chunks/DevChannelsDialog-ws8prcNK.js +1 -0
- package/dist/chunks/DiffDialog-BhqgxA7o.js +3 -0
- package/dist/chunks/Doctor-BWouB_9X.js +1 -0
- package/dist/chunks/Doctor-Ts5k8hn1.js +3 -0
- package/dist/chunks/ExitFlow-BBoImtT_.js +2 -0
- package/dist/chunks/Feedback-BVbSMBwY.js +2 -0
- package/dist/chunks/Grove-CTQrX7WO.js +1 -0
- package/dist/chunks/Grove-ZMHK4CBZ.js +11 -0
- package/dist/chunks/HybridTransport-B9g074Y1.js +4 -0
- package/dist/chunks/ITermBackend-DaFK8DOH.js +1 -0
- package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +1 -0
- package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +1 -0
- package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +1 -0
- package/dist/chunks/MessageSelector-BT1FDbwv.js +3 -0
- package/dist/chunks/Messages-DT2gDtrJ.js +11 -0
- package/dist/chunks/Onboarding-DsqnXQel.js +1 -0
- package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +1 -0
- package/dist/chunks/PluginSettings-OJQz3d5V.js +17 -0
- package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +1 -0
- package/dist/chunks/QueryEngine-_re1pGHr.js +1 -0
- package/dist/chunks/REPL-eBTeslsR.js +147 -0
- package/dist/chunks/REPL-wIg0cBqS.js +1 -0
- package/dist/chunks/RemoteCallout-DMQai8_P.js +1 -0
- package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +2 -0
- package/dist/chunks/ResumeConversation-D81hDeTl.js +1 -0
- package/dist/chunks/SSETransport-BbeM6bi9.js +4 -0
- package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +2 -0
- package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +1 -0
- package/dist/chunks/Settings-DiXc-_IG.js +2 -0
- package/dist/chunks/TeleportProgress-B3oRJlWH.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +1 -0
- package/dist/chunks/ThemePicker-BjSRjA_L.js +1 -0
- package/dist/chunks/TmuxBackend-BE3zsPKE.js +9 -0
- package/dist/chunks/TrustDialog-B6Qg0xUr.js +1 -0
- package/dist/chunks/ValidationErrorsList-C5BoLiye.js +2 -0
- package/dist/chunks/WelcomeV2-BJAKZYz1.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +2 -0
- package/dist/chunks/add-dir-OR7-VVcq.js +1 -0
- package/dist/chunks/agentDisplay-CMqTUh0A.js +1 -0
- package/dist/chunks/agents-DRtgUZ6t.js +103 -0
- package/dist/chunks/agents-EolUGDZB.js +2 -0
- package/dist/chunks/ant-Bgl31h7a.js +1 -0
- package/dist/chunks/api-BpQPVgif.js +1 -0
- package/dist/chunks/api-xFvB7WoB.js +1 -0
- package/dist/chunks/asciicast-CJObpRg9.js +1 -0
- package/dist/chunks/asciicast-Dr_Div_R.js +4 -0
- package/dist/chunks/assistant-CENsWvTb.js +1 -0
- package/dist/chunks/assistant-CHawoD04.js +1 -0
- package/dist/chunks/assistant-s7XNIA76.js +1 -0
- package/dist/chunks/auth-DX12yVM8.js +1 -0
- package/dist/chunks/auth-h6VL9BbC.js +1 -0
- package/dist/chunks/autoMode-BDzVqEPm.js +45 -0
- package/dist/chunks/autonomy-CeqOXzJl.js +19 -0
- package/dist/chunks/autonomy-D2YudQnH.js +1 -0
- package/dist/chunks/autonomyPanel-B0OQV4lv.js +1 -0
- package/dist/chunks/backgroundHousekeeping-CvHD981l.js +17 -0
- package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +1 -0
- package/dist/chunks/banner-DNLUJFS_.js +2 -0
- package/dist/chunks/bg-D_H-uZDS.js +9 -0
- package/dist/chunks/bg-FtpmvQuT.js +1 -0
- package/dist/chunks/branch-D44HjlJp.js +3 -0
- package/dist/chunks/bridge-4sldfa8u.js +2 -0
- package/dist/chunks/bridgeConfig-BM7iHryd.js +1 -0
- package/dist/chunks/bridgeConfig-CcCNsSBX.js +1 -0
- package/dist/chunks/bridgeEnabled-CYddgTU1.js +1 -0
- package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +1 -0
- package/dist/chunks/bridgeMain-DaO51duk.js +68 -0
- package/dist/chunks/bridgeMain-Dc4-ZK69.js +1 -0
- package/dist/chunks/bridgeMessaging-IlSWKGmC.js +1 -0
- package/dist/chunks/bridgePointer-fFD_tbSk.js +1 -0
- package/dist/chunks/browser-DwnUS505.js +1 -0
- package/dist/chunks/btw-CrdUyRUP.js +1 -0
- package/dist/chunks/buddy-Ci0hdCf9.js +3 -0
- package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +1 -0
- package/dist/chunks/caches-BHRJHGlc.js +1 -0
- package/dist/chunks/caches-CitduRKp.js +3 -0
- package/dist/chunks/ccrClient-yNKhQYnf.js +1 -0
- package/dist/chunks/changeDetector-B1tCH9Pa.js +1 -0
- package/dist/chunks/channelNotification-D8NPg8I8.js +1 -0
- package/dist/chunks/channelNotification-oE3eipDZ.js +1 -0
- package/dist/chunks/chrome-CwAwCY0V.js +1 -0
- package/dist/chunks/chromeNativeHost-63xqELw-.js +1 -0
- package/dist/chunks/claudeDesktop-CX1AsJie.js +1 -0
- package/dist/chunks/cleanup-C0gyKaOb.js +1 -0
- package/dist/chunks/clear-B5D08sZ0.js +1 -0
- package/dist/chunks/cliLaunch-8aeIk2ts.js +1 -0
- package/dist/chunks/client-un1k_6md.js +1 -0
- package/dist/chunks/color-BtVvrSvq.js +1 -0
- package/dist/chunks/commands--qEK1j9j.js +1 -0
- package/dist/chunks/commitAttribution-AEb-sE-t.js +1 -0
- package/dist/chunks/commitAttribution-HP_CWP0X.js +2 -0
- package/dist/chunks/common-BBRP_KzA.js +1 -0
- package/dist/chunks/common-BD4Q7osK.js +1 -0
- package/dist/chunks/common-C56I-_O3.js +1 -0
- package/dist/chunks/compact-BNhxD2UA.js +3 -0
- package/dist/chunks/companion-BlhNrZiL.js +1 -0
- package/dist/chunks/completionCache-BHSsdkBs.js +1 -0
- package/dist/chunks/completionCache-Daqaxlf3.js +4 -0
- package/dist/chunks/computerUseLock-BoEK9xYv.js +1 -0
- package/dist/chunks/config-9z8716kz.js +1 -0
- package/dist/chunks/config-f8Cx16Z6.js +1 -0
- package/dist/chunks/context-BdOjhAmM.js +1 -0
- package/dist/chunks/context-noninteractive-CnaDbgvf.js +54 -0
- package/dist/chunks/context-noninteractive-DRM7gbFk.js +1 -0
- package/dist/chunks/conversation-B9pq-m4L.js +1 -0
- package/dist/chunks/conversation-DUxXVrGj.js +1 -0
- package/dist/chunks/copy-Cjl0-hg1.js +7 -0
- package/dist/chunks/createSSHSession-CYaHalxc.js +6 -0
- package/dist/chunks/createSession-DoR2K7ay.js +1 -0
- package/dist/chunks/createSession-VlSLvi7J.js +1 -0
- package/dist/chunks/cronJitterConfig-DjSd7nvj.js +6 -0
- package/dist/chunks/crossProjectResume-CDWr5DFl.js +40 -0
- package/dist/chunks/daemon-FAp0WyY6.js +2 -0
- package/dist/chunks/datadog-CahWdK03.js +1 -0
- package/dist/chunks/datadog-DPkKCR8M.js +1 -0
- package/dist/chunks/debug-DIYxb3SF.js +1 -0
- package/dist/chunks/debug-otxXY3j-.js +5 -0
- package/dist/chunks/debugUtils-CiEnbhiz.js +1 -0
- package/dist/chunks/desktop-y3mzgaWo.js +1 -0
- package/dist/chunks/detached-Brq3-vHi.js +5 -0
- package/dist/chunks/detectRepository-CSN3yxkq.js +1 -0
- package/dist/chunks/detectRepository-CbR0WgtE.js +1 -0
- package/dist/chunks/detection-BPPZCanO.js +1 -0
- package/dist/chunks/detection-DrdKrqbQ.js +1 -0
- package/dist/chunks/diff-hpp0dp6U.js +1 -0
- package/dist/chunks/directoryCompletion-DAc3u1K2.js +1 -0
- package/dist/chunks/doctor-B230p0R_.js +1 -0
- package/dist/chunks/earlyInput-vv9abU2L.js +1 -0
- package/dist/chunks/effort-D7i2v6vd.js +9 -0
- package/dist/chunks/entry-Du3gtq9o.js +14 -0
- package/dist/chunks/env-BH-OBzcA.js +1 -0
- package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +1 -0
- package/dist/chunks/escHotkey-DfdC44i7.js +259 -0
- package/dist/chunks/execFileNoThrow-B_aZH_GP.js +1 -0
- package/dist/chunks/execSyncWrapper-Bn7EJqtD.js +1 -0
- package/dist/chunks/executor-BJb5d6mo.js +1 -0
- package/dist/chunks/executor-Dmn3RTuI.js +1561 -0
- package/dist/chunks/exit-fntBGxEC.js +1 -0
- package/dist/chunks/export-Dy9M7FnZ.js +2 -0
- package/dist/chunks/exportRenderer-Ckv4v0ye.js +1 -0
- package/dist/chunks/extra-usage-DLEvlKzs.js +1 -0
- package/dist/chunks/extra-usage-core-3KkeQSve.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +1 -0
- package/dist/chunks/extra-usage-pU11YXHS.js +1 -0
- package/dist/chunks/extraUsage-B-l-oe-7.js +1 -0
- package/dist/chunks/extractMemories-CXarlmZp.js +1 -0
- package/dist/chunks/fast-BzfzSH7K.js +1 -0
- package/dist/chunks/fast-CbLu_WYL.js +1 -0
- package/dist/chunks/feedback-DiyZIbov.js +1 -0
- package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +1 -0
- package/dist/chunks/flushGate-Ci3NHOV4.js +1 -0
- package/dist/chunks/gates-CtkQH6jy.js +1 -0
- package/dist/chunks/gates-xscCu8-N.js +1 -0
- package/dist/chunks/gemini-BCuY2aYj.js +1 -0
- package/dist/chunks/generateRecap-DA0SNyFR.js +1 -0
- package/dist/chunks/generateSessionName-BtQ4NGXP.js +1 -0
- package/dist/chunks/genericProcessUtils-D-78JZxz.js +23 -0
- package/dist/chunks/git-BZEgupMC.js +1 -0
- package/dist/chunks/git-DayFjsvj.js +6 -0
- package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +1 -0
- package/dist/chunks/goal-B6GHfd9J.js +3 -0
- package/dist/chunks/grok-DDM6xYuy.js +1 -0
- package/dist/chunks/growthbook-D-Po5Uxl.js +1 -0
- package/dist/chunks/heapdump-DHlUfpVV.js +5 -0
- package/dist/chunks/help-BulgC9m7.js +1 -0
- package/dist/chunks/hooks-D5AcFnD1.js +1 -0
- package/dist/chunks/hooks-jxIrev-X.js +79 -0
- package/dist/chunks/hostAdapter-BvraKy0o.js +1 -0
- package/dist/chunks/hostGuard-CWijeIyE.js +1 -0
- package/dist/chunks/ide-tx4qMFln.js +2 -0
- package/dist/chunks/inboundAttachments-C93Q7Dvt.js +1 -0
- package/dist/chunks/inboundAttachments-DxcFiX4f.js +1 -0
- package/dist/chunks/initReplBridge-BEldrf6f.js +1 -0
- package/dist/chunks/insights-HEsEDeCQ.js +822 -0
- package/dist/chunks/install-DRsM0bJO.js +1 -0
- package/dist/chunks/install-github-app-BVK5Z95c.js +147 -0
- package/dist/chunks/install-slack-app-DCw3O2J_.js +1 -0
- package/dist/chunks/instrumentation-DJ-R1s8C.js +12 -0
- package/dist/chunks/job-CUz_OGIq.js +2 -0
- package/dist/chunks/jwtUtils-DVyv2jab.js +1 -0
- package/dist/chunks/keybindings-Chr5nGBu.js +2 -0
- package/dist/chunks/lang-C7kJlPIh.js +1 -0
- package/dist/chunks/language-CQXwoDkI.js +1 -0
- package/dist/chunks/language-Lx3WlBN6.js +1 -0
- package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +1 -0
- package/dist/chunks/launchAutofixPr-Cww8uS_5.js +18 -0
- package/dist/chunks/launchLocalMemory-BywmyvSJ.js +3 -0
- package/dist/chunks/launchLocalVault-BU3a5NV7.js +3 -0
- package/dist/chunks/launchMemoryStores-QUCODCJS.js +1 -0
- package/dist/chunks/launchOnboarding-BriZ0oIA.js +8 -0
- package/dist/chunks/launchSchedule-uLm7zt_B.js +1 -0
- package/dist/chunks/launchSkillStore-DMo2bV8X.js +1 -0
- package/dist/chunks/launchTeleport-DgQWSfXM.js +3 -0
- package/dist/chunks/launchVault-DfnBBFne.js +1 -0
- package/dist/chunks/loadAgentsDir-Br5fGLLI.js +4697 -0
- package/dist/chunks/loadAgentsDir-DDYPdQKP.js +1 -0
- package/dist/chunks/loadPluginHooks-C4soqr6g.js +1 -0
- package/dist/chunks/localSearch-CELyiWF6.js +1 -0
- package/dist/chunks/localSearch-DhZMcy5t.js +1 -0
- package/dist/chunks/log-DS97_rIr.js +1 -0
- package/dist/chunks/login-CvvIpkpq.js +1 -0
- package/dist/chunks/login-DjgITOAw.js +1 -0
- package/dist/chunks/logoV2Utils-BN_HrHSc.js +1 -0
- package/dist/chunks/logout-DOFJpZEJ.js +1 -0
- package/dist/chunks/magicDocs-2Zr7bYY_.js +57 -0
- package/dist/chunks/main-BafHJuKH.js +31 -0
- package/dist/chunks/main-D61CvHRy.js +1312 -0
- package/dist/chunks/mappers-BCiceNt3.js +1 -0
- package/dist/chunks/mcp-BV4m1Gbl.js +2 -0
- package/dist/chunks/mcp-CrAgAK9u.js +1 -0
- package/dist/chunks/mcp-DK4m73gO.js +6 -0
- package/dist/chunks/mcpServer-7zyXl9Wg.js +1 -0
- package/dist/chunks/mcpServer-sa9Z183j.js +1 -0
- package/dist/chunks/memoize-CPexXTP7.js +1 -0
- package/dist/chunks/memory-BrJPVgxn.js +1 -0
- package/dist/chunks/mode-Cr-NTlRa.js +2 -0
- package/dist/chunks/model-CCjuMV6k.js +1 -0
- package/dist/chunks/model-aJS_plgM.js +1 -0
- package/dist/chunks/onChangeAppState-C9EvI3EH.js +1 -0
- package/dist/chunks/openai-Cvb_-1A-.js +10 -0
- package/dist/chunks/overageCreditGrant-cGQilawd.js +1 -0
- package/dist/chunks/panel-DO_faHV-.js +1 -0
- package/dist/chunks/panelCall-DqZuxAf0.js +1 -0
- package/dist/chunks/parser-BXWr_mLL.js +1 -0
- package/dist/chunks/parser-DbKSpFRq.js +1 -0
- package/dist/chunks/passes-DsrceO14.js +1 -0
- package/dist/chunks/path-nCzt96pE.js +1 -0
- package/dist/chunks/paths-DfGsIjPm.js +39 -0
- package/dist/chunks/permissions-CjPIu4IE.js +3 -0
- package/dist/chunks/pipeTransport-C5u1K0wu.js +1 -0
- package/dist/chunks/plan-YjMAcn6g.js +1 -0
- package/dist/chunks/platform-DYZVoA9J.js +2 -0
- package/dist/chunks/plugin-Oux5bBQj.js +1 -0
- package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +1 -0
- package/dist/chunks/pluginBlocklist-BzI5DNeN.js +1 -0
- package/dist/chunks/pluginCliCommands-CExAcsaR.js +1 -0
- package/dist/chunks/pluginFlagging-BeqrbhgG.js +1 -0
- package/dist/chunks/pluginOperations-s0FQGOBm.js +2 -0
- package/dist/chunks/pluginStartupCheck-BVag9B-T.js +1 -0
- package/dist/chunks/pluginStartupCheck-BuorUEEf.js +1 -0
- package/dist/chunks/plugins-DTQHVJtY.js +4 -0
- package/dist/chunks/policyLimits-zoyF_6O4.js +1 -0
- package/dist/chunks/pollConfig-C19GiX7i.js +1 -0
- package/dist/chunks/poor-Bx5vvamq.js +1 -0
- package/dist/chunks/poorMode-BCoeB5zB.js +1 -0
- package/dist/chunks/poorMode-CTd_csCl.js +1 -0
- package/dist/chunks/print-UXl3rG8y.js +39 -0
- package/dist/chunks/privacy-settings-e43D9a4o.js +1 -0
- package/dist/chunks/processBashCommand-CvR9-gf8.js +1 -0
- package/dist/chunks/processSlashCommand-CB3wyAX7.js +6 -0
- package/dist/chunks/projectContext-D3_u80TY.js +1 -0
- package/dist/chunks/prompt-53lRY98R.js +1 -0
- package/dist/chunks/prompt-B8M-HLIS.js +227 -0
- package/dist/chunks/prompt-CooZNM1u.js +1 -0
- package/dist/chunks/promptEditor-CHiopfD7.js +4 -0
- package/dist/chunks/protocolHandler-DjivYn8H.js +13 -0
- package/dist/chunks/proxy-nPT6a6QY.js +99 -0
- package/dist/chunks/rate-limit-options-B-vndk5W.js +1 -0
- package/dist/chunks/rcDebugLog-BoroyfjB.js +11 -0
- package/dist/chunks/referral-DOqhciQu.js +1 -0
- package/dist/chunks/refresh-C8uLznwm.js +1 -0
- package/dist/chunks/registerProtocol-4lQ7O4Cc.js +36 -0
- package/dist/chunks/registry-q6v98JYd.js +1 -0
- package/dist/chunks/release-notes-C7JHshX3.js +4 -0
- package/dist/chunks/releaseNotes-CXY-xAja.js +2 -0
- package/dist/chunks/reload-plugins-DLS5lQcc.js +1 -0
- package/dist/chunks/remote-env-DhHea8yK.js +1 -0
- package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +1 -0
- package/dist/chunks/remoteControlServer-CI0F83pg.js +3 -0
- package/dist/chunks/rename-DiKWWCzB.js +1 -0
- package/dist/chunks/renderOptions-DKe32LfM.js +1 -0
- package/dist/chunks/resume-DA4ToJFW.js +2 -0
- package/dist/chunks/runtimeObserver-BfVC8KK9.js +1 -0
- package/dist/chunks/runtimeObserver-DetZ5Tek.js +10 -0
- package/dist/chunks/sandbox-adapter-wh4cKN45.js +1 -0
- package/dist/chunks/sandbox-toggle-D8MgV0DT.js +1 -0
- package/dist/chunks/searchExtraTools-DbPpcAPw.js +1 -0
- package/dist/chunks/sentry-C3sL9nhF.js +13 -0
- package/dist/chunks/session-Bd-4QCqc.js +2 -0
- package/dist/chunks/sessionDiscovery-D_KPF86E.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +1 -0
- package/dist/chunks/sessionMemory-0Jqo1_MV.js +1 -0
- package/dist/chunks/sessionMemory-BDt_8bNB.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +1 -0
- package/dist/chunks/sessionObserver-CEky1SLb.js +1 -0
- package/dist/chunks/sessionObserver-CQxIKV8D.js +20 -0
- package/dist/chunks/sessionStorage-D1XhqZyW.js +1 -0
- package/dist/chunks/sessionTitle-CB0ZEkS_.js +14 -0
- package/dist/chunks/sessionTracing-BIKXLTJZ.js +11 -0
- package/dist/chunks/settingsSync-pI3L3CeR.js +1 -0
- package/dist/chunks/setup-BSi50fkU.js +1 -0
- package/dist/chunks/setup-DjsmjRKQ.js +2 -0
- package/dist/chunks/setup-Dq0_SRA1.js +9 -0
- package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +1 -0
- package/dist/chunks/shellQuote-D8XPeqkc.js +1 -0
- package/dist/chunks/sideQuestion-BrTA8ooG.js +20 -0
- package/dist/chunks/sink-CqWxcRl9.js +1 -0
- package/dist/chunks/sink-Dkat5kH9.js +1 -0
- package/dist/chunks/sinks--frMI4-5.js +2 -0
- package/dist/chunks/sinks-CvPAVcMY.js +1 -0
- package/dist/chunks/skill-learning-2LV0yuwF.js +5 -0
- package/dist/chunks/skillChangeDetector-B5CGPl7e.js +1 -0
- package/dist/chunks/skillGapStore-Dc29T-OG.js +1 -0
- package/dist/chunks/skillGapStore-KzRf6Ezr.js +5 -0
- package/dist/chunks/skillGenerator-BdOHsgc4.js +8 -0
- package/dist/chunks/skillLearning-CdcVIG14.js +1 -0
- package/dist/chunks/skillLearning-DXWMxSA2.js +1 -0
- package/dist/chunks/skillPanel-zMY8o-86.js +28 -0
- package/dist/chunks/skillSearchPanel-l8aolUP8.js +21 -0
- package/dist/chunks/skills-BeMWJPup.js +1 -0
- package/dist/chunks/sprites-qel_EgTP.js +1 -0
- package/dist/chunks/startupProfiler-CnDpob1v.js +3 -0
- package/dist/chunks/startupProfiler-TrMfE6Q4.js +1 -0
- package/dist/chunks/stats-CEBfahqM.js +1 -0
- package/dist/chunks/status-C9KXyfDk.js +1 -0
- package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +1 -0
- package/dist/chunks/stickers-eHrGA1W5.js +1 -0
- package/dist/chunks/tag-Dvl7Us9y.js +11 -0
- package/dist/chunks/tasks-BhiwUF0n.js +1 -0
- package/dist/chunks/teamHelpers-COQazluD.js +1 -0
- package/dist/chunks/teamHelpers-Mgfrv-Jf.js +1 -0
- package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +1 -0
- package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +1 -0
- package/dist/chunks/teleport-U5Zgqw3H.js +1 -0
- package/dist/chunks/templateJobs-C3idypN_.js +12 -0
- package/dist/chunks/terminalSetup-CmAEgt-5.js +33 -0
- package/dist/chunks/terminalSetup-mvAN4no7.js +1 -0
- package/dist/chunks/theme-BD2H4vJi.js +1 -0
- package/dist/chunks/thinkback-BOByXYp2.js +1 -0
- package/dist/chunks/thinkback-Dzu2mnNF.js +1 -0
- package/dist/chunks/thinkback-play-BX1K2UMY.js +1 -0
- package/dist/chunks/tmux-DruHFjDy.js +1 -0
- package/dist/chunks/toolEventObserver-B6cLV_dK.js +1 -0
- package/dist/chunks/toolEventObserver-i6it3p2_.js +1 -0
- package/dist/chunks/toolPool--2gNFbrz.js +1 -0
- package/dist/chunks/toolPool-dNV2JxUI.js +1 -0
- package/dist/chunks/trustedDevice-DY8OosTr.js +1 -0
- package/dist/chunks/trustedDevice-zya_Ml1N.js +1 -0
- package/dist/chunks/tui-KoYD82tT.js +6 -0
- package/dist/chunks/types-D5R26wwH.js +17 -0
- package/dist/chunks/udsClient-RkYuzeZC.js +1 -0
- package/dist/chunks/ultrareviewCommand-CCkKby4J.js +3 -0
- package/dist/chunks/undercover-CIutVLEO.js +1 -0
- package/dist/chunks/undercover-D9O2McNG.js +31 -0
- package/dist/chunks/up-BPM85EYl.js +12 -0
- package/dist/chunks/updateCCB-Bmn3Y63Y.js +11 -0
- package/dist/chunks/upgrade-D3rVOeHO.js +1 -0
- package/dist/chunks/upgrade-Dq3l14ZY.js +1 -0
- package/dist/chunks/upload-1PmElPfW.js +1 -0
- package/dist/chunks/upstreamproxy-BBTSJnad.js +11 -0
- package/dist/chunks/usage-B5G8FOZ3.js +1 -0
- package/dist/chunks/usage-VtTu7beE.js +1 -0
- package/dist/chunks/useMainLoopModel-CaQLIr1V.js +1 -0
- package/dist/chunks/useManagePlugins-BvoeOnqq.js +1 -0
- package/dist/chunks/useMergedTools-C133BfRp.js +1 -0
- package/dist/chunks/useSearchInput-CROB7AbC.js +1 -0
- package/dist/chunks/useSettingsErrors-DRxtFXoe.js +1 -0
- package/dist/chunks/useVoice-BQ9aSFJe.js +1 -0
- package/dist/chunks/util-BZnJgF79.js +1 -0
- package/dist/chunks/utils-4gsxQpga.js +1 -0
- package/dist/chunks/validatePlugin-DlrnBhPA.js +1 -0
- package/dist/chunks/vim-BXQCLoFJ.js +1 -0
- package/dist/chunks/voice-CeRmLRHT.js +2 -0
- package/dist/chunks/voice-QHyDff3f.js +8 -0
- package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +1 -0
- package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +1 -0
- package/dist/chunks/voiceStreamSTT-BDKenO5F.js +1 -0
- package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +1 -0
- package/dist/chunks/which-BnEnzWhs.js +1 -0
- package/dist/chunks/windowsPaths-43st5EQF.js +1 -0
- package/dist/chunks/windowsPaths-DerzGPcz.js +2 -0
- package/dist/chunks/workSecret-qRMNrQy2.js +1 -0
- package/dist/chunks/workerRegistry-BUD3lBk_.js +1 -0
- package/dist/chunks/worktree-C0f9Ke-R.js +1 -0
- package/dist/chunks/xml-DvVQHZ1N.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-LhW1QZFL.js +0 -1
- package/dist/chunks/App-DYMNbl0d.js +0 -1
- package/dist/chunks/ApproveApiKey-B1XCQNW6.js +0 -1
- package/dist/chunks/ApproveApiKey-Bi2Iq_gN.js +0 -1
- package/dist/chunks/AssistantSessionChooser-Dv6yYR3s.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-qS15If6H.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-Bhjd2F2o.js +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-CxBS5xZY.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CiANFiNV.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-nuKXhM2t.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-C8FzG3uF.js +0 -1
- package/dist/chunks/DesktopHandoff-BSpzQF0U.js +0 -1
- package/dist/chunks/DevChannelsDialog-B2xqlZtS.js +0 -1
- package/dist/chunks/DiffDialog-XmOsaUeN.js +0 -3
- package/dist/chunks/Doctor-C6FXh99k.js +0 -1
- package/dist/chunks/Doctor-DLx7Z_sA.js +0 -3
- package/dist/chunks/ExitFlow-CHDj7fv7.js +0 -2
- package/dist/chunks/Feedback-CUjTJbIh.js +0 -2
- package/dist/chunks/Grove-B8ZQOflC.js +0 -1
- package/dist/chunks/Grove-fenDMHVw.js +0 -11
- package/dist/chunks/HybridTransport-CP63usH9.js +0 -4
- package/dist/chunks/ITermBackend-Bp_3qpix.js +0 -1
- package/dist/chunks/InvalidConfigDialog-CgD7HSg0.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-pYMa5Fp4.js +0 -1
- package/dist/chunks/MCPConnectionManager-ip1xShU_.js +0 -1
- package/dist/chunks/McpParsingWarnings-DhobExFM.js +0 -1
- package/dist/chunks/MessageSelector-B2X6zrsb.js +0 -3
- package/dist/chunks/Messages-CmsZIA66.js +0 -11
- package/dist/chunks/Onboarding-BaoLhLiT.js +0 -1
- package/dist/chunks/OverageCreditUpsell-DnLMobAh.js +0 -1
- package/dist/chunks/PluginSettings-BetzicTb.js +0 -17
- package/dist/chunks/PromptInputFooterSuggestions-D-1hRFAD.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-DnQj3Hpq.js +0 -1
- package/dist/chunks/QueryEngine-BwvqdZVN.js +0 -1
- package/dist/chunks/REPL-CCgaPc2g.js +0 -1
- package/dist/chunks/REPL-zS2s1JnV.js +0 -97
- package/dist/chunks/RemoteCallout-B9hClSYj.js +0 -1
- package/dist/chunks/RemoteSessionManager-BgLIvi8Z.js +0 -2
- package/dist/chunks/ResumeConversation-DAMMGHGc.js +0 -1
- package/dist/chunks/SSETransport-CD7R7FfS.js +0 -4
- package/dist/chunks/SearchExtraToolsTool-CP6G9xhL.js +0 -1
- package/dist/chunks/SentryErrorBoundary-6dQQW6kh.js +0 -2
- package/dist/chunks/SentryErrorBoundary-B2e3QmqR.js +0 -1
- package/dist/chunks/Settings-DgW58gbY.js +0 -2
- package/dist/chunks/TeleportProgress-D_USKi0I.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-C1-iWmRP.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-BX9nUVsC.js +0 -1
- package/dist/chunks/ThemePicker-C0JghXSS.js +0 -1
- package/dist/chunks/TmuxBackend-BxPiis2l.js +0 -9
- package/dist/chunks/TrustDialog-BZD-KGrA.js +0 -1
- package/dist/chunks/ValidationErrorsList-CTFdkGiH.js +0 -2
- package/dist/chunks/WelcomeV2-C7F1y8zh.js +0 -1
- package/dist/chunks/WindowsTerminalBackend-DLxmmXo4.js +0 -2
- package/dist/chunks/add-dir-Dhv9aEca.js +0 -1
- package/dist/chunks/agentDisplay-BoBFMmGh.js +0 -1
- package/dist/chunks/agents-Bt9kYpgi.js +0 -2
- package/dist/chunks/agents-CdsfzK3E.js +0 -103
- package/dist/chunks/ant-Bo6XJuE9.js +0 -1
- package/dist/chunks/api-CRPzfBL5.js +0 -1
- package/dist/chunks/api-CslgFoHj.js +0 -1
- package/dist/chunks/asciicast-C3nf97NR.js +0 -1
- package/dist/chunks/asciicast-DIsaWcsJ.js +0 -4
- package/dist/chunks/assistant--L1Ll62G.js +0 -1
- package/dist/chunks/assistant-DypEudjI.js +0 -1
- package/dist/chunks/assistant-od6Nf6EJ.js +0 -1
- package/dist/chunks/auth-BaaTtn3M.js +0 -1
- package/dist/chunks/auth-yKNn60lZ.js +0 -1
- package/dist/chunks/autoMode-C4b9u7WQ.js +0 -45
- package/dist/chunks/autonomy-7nZpCyNC.js +0 -19
- package/dist/chunks/autonomy-rMsykUYN.js +0 -1
- package/dist/chunks/autonomyPanel-j0q1dMDj.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DGAYPsK9.js +0 -1
- package/dist/chunks/backgroundHousekeeping-KCpR7i2h.js +0 -17
- package/dist/chunks/banner-32EBTKI7.js +0 -2
- package/dist/chunks/bg-DK0E4ZtW.js +0 -9
- package/dist/chunks/bg-Dbh5z3Y8.js +0 -1
- package/dist/chunks/branch-GL4WvvLa.js +0 -3
- package/dist/chunks/bridge-BVzpVEsr.js +0 -2
- package/dist/chunks/bridgeConfig-B1OTOi0O.js +0 -1
- package/dist/chunks/bridgeConfig-C110hgnb.js +0 -1
- package/dist/chunks/bridgeEnabled-DrW-kkAr.js +0 -1
- package/dist/chunks/bridgeEnabled-Zk2slA-p.js +0 -1
- package/dist/chunks/bridgeMain-C-MUVlCX.js +0 -68
- package/dist/chunks/bridgeMain-L1ScqrgM.js +0 -1
- package/dist/chunks/bridgeMessaging-DobCpZGY.js +0 -1
- package/dist/chunks/bridgePointer-B2FPGDWR.js +0 -1
- package/dist/chunks/browser-fLRXxIsQ.js +0 -1
- package/dist/chunks/btw-CSDRs-n8.js +0 -1
- package/dist/chunks/buddy-D3Owb2U5.js +0 -3
- package/dist/chunks/bypassPermissionsKillswitch-B_5qku-e.js +0 -1
- package/dist/chunks/caches-CpgRh__l.js +0 -1
- package/dist/chunks/caches-Di_WVMtD.js +0 -3
- package/dist/chunks/ccrClient-CWH1f8Nk.js +0 -1
- package/dist/chunks/changeDetector-DEStinxa.js +0 -1
- package/dist/chunks/channelNotification-DxAS15nL.js +0 -1
- package/dist/chunks/channelNotification-Y5fNpq-B.js +0 -1
- package/dist/chunks/chrome-Cgl-Sq1y.js +0 -1
- package/dist/chunks/chromeNativeHost-DX8f9Y2L.js +0 -1
- package/dist/chunks/claudeDesktop-C1qQs6os.js +0 -1
- package/dist/chunks/cleanup-Pv6U3HiI.js +0 -1
- package/dist/chunks/clear-Dja0RB_p.js +0 -1
- package/dist/chunks/cliLaunch-BQa48gsr.js +0 -1
- package/dist/chunks/client-DuWXRBa0.js +0 -1
- package/dist/chunks/color-tvVGbuuv.js +0 -1
- package/dist/chunks/commands-ElmJnxRE.js +0 -1
- package/dist/chunks/commitAttribution-CedoNRL0.js +0 -2
- package/dist/chunks/commitAttribution-D6vYpAMS.js +0 -1
- package/dist/chunks/common-B379wT22.js +0 -1
- package/dist/chunks/common-B_BC3eMY.js +0 -1
- package/dist/chunks/common-CMCv4N_v.js +0 -1
- package/dist/chunks/compact-BwsLImWZ.js +0 -3
- package/dist/chunks/companion-C3hWMSgF.js +0 -1
- package/dist/chunks/completionCache-DHfUBBMH.js +0 -1
- package/dist/chunks/completionCache-DORrtxkS.js +0 -4
- package/dist/chunks/computerUseLock-BjoDJH2h.js +0 -1
- package/dist/chunks/config-BHCIawwx.js +0 -1
- package/dist/chunks/config-Dh0QGc4B.js +0 -1
- package/dist/chunks/context-CSHiU4LG.js +0 -1
- package/dist/chunks/context-noninteractive-CKFY_j1P.js +0 -54
- package/dist/chunks/context-noninteractive-DirFwn0d.js +0 -1
- package/dist/chunks/conversation-DfIv8Jzc.js +0 -1
- package/dist/chunks/conversation-Dyb5kfil.js +0 -1
- package/dist/chunks/copy-BSyDpOx5.js +0 -7
- package/dist/chunks/createSSHSession-PfzB7zZR.js +0 -6
- package/dist/chunks/createSession-Bk6r39b1.js +0 -1
- package/dist/chunks/createSession-DdsaDZoq.js +0 -1
- package/dist/chunks/cronJitterConfig-BFVNIkjD.js +0 -6
- package/dist/chunks/crossProjectResume-CdoH1cwH.js +0 -40
- package/dist/chunks/daemon-CCtZ9wY3.js +0 -2
- package/dist/chunks/datadog-By0GhDXI.js +0 -1
- package/dist/chunks/datadog-CTRRIaBJ.js +0 -1
- package/dist/chunks/debug-DM5ezCBS.js +0 -1
- package/dist/chunks/debug-UI3T040K.js +0 -5
- package/dist/chunks/debugUtils-BBMFODKH.js +0 -1
- package/dist/chunks/desktop-BV6CI329.js +0 -1
- package/dist/chunks/detached-D300jlhj.js +0 -5
- package/dist/chunks/detectRepository-CBk3S2zv.js +0 -1
- package/dist/chunks/detectRepository-DCTvg4p0.js +0 -1
- package/dist/chunks/detection-CQsNad64.js +0 -1
- package/dist/chunks/detection-DJ-vTbBf.js +0 -1
- package/dist/chunks/diff-qDuBFv-P.js +0 -1
- package/dist/chunks/directoryCompletion-D7EGwonO.js +0 -1
- package/dist/chunks/doctor-BtTsew-G.js +0 -1
- package/dist/chunks/earlyInput-RoVleNEN.js +0 -1
- package/dist/chunks/effort-DSpAOBeU.js +0 -9
- package/dist/chunks/entry-CYCQJU7M.js +0 -14
- package/dist/chunks/env-chR0gV31.js +0 -1
- package/dist/chunks/envLessBridgeConfig-B3o52JMX.js +0 -1
- package/dist/chunks/envLessBridgeConfig-BKs6Mk4e.js +0 -1
- package/dist/chunks/escHotkey-Cyz0yyh1.js +0 -259
- package/dist/chunks/execFileNoThrow-CuQN1sz8.js +0 -1
- package/dist/chunks/execSyncWrapper-C2XQnFVo.js +0 -1
- package/dist/chunks/executor-4EeD8GNm.js +0 -1561
- package/dist/chunks/executor-BHEuNh5F.js +0 -1
- package/dist/chunks/exit-BgaIlRuS.js +0 -1
- package/dist/chunks/export-BOQCWSMm.js +0 -2
- package/dist/chunks/exportRenderer-B-2J3ocI.js +0 -1
- package/dist/chunks/extra-usage-BLVbAE1O.js +0 -1
- package/dist/chunks/extra-usage-S4WYpDn5.js +0 -1
- package/dist/chunks/extra-usage-core-Sq4JALS7.js +0 -1
- package/dist/chunks/extra-usage-noninteractive-BlJVTTwe.js +0 -1
- package/dist/chunks/extraUsage-CMJ1LEPS.js +0 -1
- package/dist/chunks/extractMemories-BpN0fQF-.js +0 -1
- package/dist/chunks/fast-B8a-zz4X.js +0 -1
- package/dist/chunks/fast-OzVowRYW.js +0 -1
- package/dist/chunks/feedback-BZet1Qu_.js +0 -1
- package/dist/chunks/firstPartyEventLogger-DeytNcUC.js +0 -1
- package/dist/chunks/flushGate-CeFJrqgK.js +0 -1
- package/dist/chunks/gates-Be4ovdxj.js +0 -1
- package/dist/chunks/gates-WmmZ-8JT.js +0 -1
- package/dist/chunks/gemini-DExthrur.js +0 -1
- package/dist/chunks/generateRecap-BIFrnTIe.js +0 -1
- package/dist/chunks/generateSessionName-DlC0lhSv.js +0 -1
- package/dist/chunks/genericProcessUtils-BGvcwuPt.js +0 -23
- package/dist/chunks/git-CN3qtTb_.js +0 -6
- package/dist/chunks/git-D23Mzu_K.js +0 -1
- package/dist/chunks/githubRepoPathMapping-BKB2G52c.js +0 -1
- package/dist/chunks/grok-BNxCseLh.js +0 -1
- package/dist/chunks/growthbook-B3_MJJ45.js +0 -1
- package/dist/chunks/heapdump-sPWpCjXq.js +0 -5
- package/dist/chunks/help-BuUi6cM0.js +0 -1
- package/dist/chunks/hooks-5vDlGpNp.js +0 -79
- package/dist/chunks/hooks-CVJA4uQu.js +0 -1
- package/dist/chunks/hostAdapter-BfBHV5nj.js +0 -1
- package/dist/chunks/hostGuard-zim_4F9V.js +0 -1
- package/dist/chunks/ide-DvUftvRn.js +0 -2
- package/dist/chunks/inboundAttachments-CQyeysIk.js +0 -1
- package/dist/chunks/inboundAttachments-CiF42Eku.js +0 -1
- package/dist/chunks/initReplBridge-Bzg5Gx97.js +0 -1
- package/dist/chunks/insights-CvwFcRQt.js +0 -822
- package/dist/chunks/install-github-app-DxxG2VlZ.js +0 -147
- package/dist/chunks/install-slack-app-Bc5m1UFG.js +0 -1
- package/dist/chunks/install-tclc0QHM.js +0 -1
- package/dist/chunks/instrumentation-Dn_FDn6G.js +0 -12
- package/dist/chunks/job-ssZ2ESAX.js +0 -2
- package/dist/chunks/jwtUtils-CpXwh_du.js +0 -1
- package/dist/chunks/keybindings-DVZlobLM.js +0 -2
- package/dist/chunks/lang-BQ--zwb1.js +0 -1
- package/dist/chunks/language-BM5numKK.js +0 -1
- package/dist/chunks/language-CcxtaVJA.js +0 -1
- package/dist/chunks/launchAgentsPlatform-CLwlpK5C.js +0 -1
- package/dist/chunks/launchAutofixPr-vGLlC4Jm.js +0 -18
- package/dist/chunks/launchLocalMemory-DJ4pR8a2.js +0 -3
- package/dist/chunks/launchLocalVault-Cl7Dds3W.js +0 -3
- package/dist/chunks/launchMemoryStores-Czk-a1P6.js +0 -1
- package/dist/chunks/launchOnboarding-66gN_781.js +0 -8
- package/dist/chunks/launchSchedule-Tx5efcfv.js +0 -1
- package/dist/chunks/launchSkillStore-BGPd1KCD.js +0 -1
- package/dist/chunks/launchTeleport-DzXrNn2h.js +0 -3
- package/dist/chunks/launchVault-C5djf6XO.js +0 -1
- package/dist/chunks/loadAgentsDir-DaApSWNv.js +0 -4671
- package/dist/chunks/loadAgentsDir-_BePoo3r.js +0 -1
- package/dist/chunks/loadPluginHooks-GENkKqO8.js +0 -1
- package/dist/chunks/localSearch-BQuH38SB.js +0 -1
- package/dist/chunks/localSearch-BSR9byCr.js +0 -1
- package/dist/chunks/log-CzsijfHZ.js +0 -1
- package/dist/chunks/login-C64M5OdJ.js +0 -1
- package/dist/chunks/login-dkrrvdEl.js +0 -1
- package/dist/chunks/logoV2Utils-D6ceZmK0.js +0 -1
- package/dist/chunks/logout-BITK5qkB.js +0 -1
- package/dist/chunks/magicDocs-KPodA4bi.js +0 -57
- package/dist/chunks/main-D9fUXJiD.js +0 -31
- package/dist/chunks/main-wb2H0Xbt.js +0 -1108
- package/dist/chunks/mappers-D54WYYhL.js +0 -1
- package/dist/chunks/mcp-Bgeq8jbd.js +0 -6
- package/dist/chunks/mcp-CJvRg7ft.js +0 -2
- package/dist/chunks/mcp-Ddvz5we7.js +0 -1
- package/dist/chunks/mcpServer-VYXTzAFl.js +0 -1
- package/dist/chunks/mcpServer-d0863d94.js +0 -1
- package/dist/chunks/memoize-DxwLawI2.js +0 -1
- package/dist/chunks/memory-BNyVCuw9.js +0 -1
- package/dist/chunks/mode-D_L3DNsz.js +0 -2
- package/dist/chunks/model-DevOJk2A.js +0 -1
- package/dist/chunks/model-Dy_oUo2C.js +0 -1
- package/dist/chunks/onChangeAppState-GPs10FBm.js +0 -1
- package/dist/chunks/openai-C0CrRENO.js +0 -10
- package/dist/chunks/overageCreditGrant-DCiIf_SF.js +0 -1
- package/dist/chunks/panel-s9fbCKfl.js +0 -1
- package/dist/chunks/parser-CmngCwjB.js +0 -1
- package/dist/chunks/parser-SWIZo39J.js +0 -1
- package/dist/chunks/passes-C9oR06Fa.js +0 -1
- package/dist/chunks/path-B3lx7yHn.js +0 -1
- package/dist/chunks/paths-BZbIj1Z1.js +0 -39
- package/dist/chunks/permissions-DNb8DG22.js +0 -3
- package/dist/chunks/pipeTransport-Cx55TUNu.js +0 -1
- package/dist/chunks/plan-D-RJTUxb.js +0 -1
- package/dist/chunks/platform-CuyedWpe.js +0 -2
- package/dist/chunks/plugin-BV-DabiK.js +0 -1
- package/dist/chunks/pluginAutoupdate-DPciQRLz.js +0 -1
- package/dist/chunks/pluginBlocklist-CtSUf3sp.js +0 -1
- package/dist/chunks/pluginCliCommands-Cbcc-AQq.js +0 -1
- package/dist/chunks/pluginFlagging-D2d7jd4v.js +0 -1
- package/dist/chunks/pluginOperations-rU56uptC.js +0 -2
- package/dist/chunks/pluginStartupCheck-DuhCLRbp.js +0 -1
- package/dist/chunks/pluginStartupCheck-DwY7j_Cg.js +0 -1
- package/dist/chunks/plugins-LbLpZOhz.js +0 -4
- package/dist/chunks/policyLimits-Dl863Z85.js +0 -1
- package/dist/chunks/pollConfig-orFqIbGd.js +0 -1
- package/dist/chunks/poor-2u_yWIRG.js +0 -1
- package/dist/chunks/poorMode-BBr7GGQ3.js +0 -1
- package/dist/chunks/poorMode-DtQVZvON.js +0 -1
- package/dist/chunks/print-BgLbepaC.js +0 -39
- package/dist/chunks/privacy-settings-CC_FyvjV.js +0 -1
- package/dist/chunks/processBashCommand-DnekNzlT.js +0 -1
- package/dist/chunks/processSlashCommand-sLL0pyIW.js +0 -6
- package/dist/chunks/projectContext-D5FgyE-d.js +0 -1
- package/dist/chunks/prompt-DHHypkUR.js +0 -222
- package/dist/chunks/prompt-Dexwn9YP.js +0 -1
- package/dist/chunks/prompt-DhaPVt1T.js +0 -1
- package/dist/chunks/promptEditor-I8ZpszKv.js +0 -4
- package/dist/chunks/protocolHandler-CEsrhel_.js +0 -13
- package/dist/chunks/proxy-CfZp-wce.js +0 -99
- package/dist/chunks/rate-limit-options-B0Iyzr4x.js +0 -1
- package/dist/chunks/rcDebugLog-CF73Wofq.js +0 -11
- package/dist/chunks/referral-Nz20w4pB.js +0 -1
- package/dist/chunks/refresh-DecpoOX1.js +0 -1
- package/dist/chunks/registerProtocol-CAoaYyt8.js +0 -36
- package/dist/chunks/registry-BQdQRu-K.js +0 -1
- package/dist/chunks/release-notes-C0HeOmQY.js +0 -4
- package/dist/chunks/releaseNotes-BDzfbUAu.js +0 -2
- package/dist/chunks/reload-plugins-BZ4LTYY3.js +0 -1
- package/dist/chunks/remote-env-CPalv-BL.js +0 -1
- package/dist/chunks/remoteBridgeCore-B2yFfG6S.js +0 -1
- package/dist/chunks/remoteControlServer-CsnLedUv.js +0 -3
- package/dist/chunks/rename-CQPtjj_Q.js +0 -1
- package/dist/chunks/renderOptions-rmj4Mkls.js +0 -1
- package/dist/chunks/resume-Ycuezjv2.js +0 -2
- package/dist/chunks/runtimeObserver-CW0_wm1t.js +0 -1
- package/dist/chunks/runtimeObserver-DnhLm9O1.js +0 -10
- package/dist/chunks/sandbox-adapter-BOsa-en7.js +0 -1
- package/dist/chunks/sandbox-toggle-Bl5Drxeo.js +0 -1
- package/dist/chunks/searchExtraTools-CgdrY8XO.js +0 -1
- package/dist/chunks/sentry-BN3GTgYM.js +0 -13
- package/dist/chunks/session-ULekTZVn.js +0 -2
- package/dist/chunks/sessionDiscovery-DAmbR6o-.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-C-o5001P.js +0 -1
- package/dist/chunks/sessionMemory-Bg458voj.js +0 -1
- package/dist/chunks/sessionMemory-DR-esdhZ.js +0 -1
- package/dist/chunks/sessionMemoryUtils-DgVGiwjB.js +0 -1
- package/dist/chunks/sessionObserver-C5cujEe6.js +0 -1
- package/dist/chunks/sessionObserver-CQ3PQWgU.js +0 -20
- package/dist/chunks/sessionStorage-BIDUQ8wo.js +0 -1
- package/dist/chunks/sessionTitle-DyexSH43.js +0 -14
- package/dist/chunks/sessionTracing-gKle2qzF.js +0 -11
- package/dist/chunks/settingsSync-BWW4FOMm.js +0 -1
- package/dist/chunks/setup-DX6984LY.js +0 -1
- package/dist/chunks/setup-OvlOCIFL.js +0 -2
- package/dist/chunks/setup-n91rSYO2.js +0 -9
- package/dist/chunks/shadowedRuleDetection-uYIZBoii.js +0 -1
- package/dist/chunks/shellQuote-DgjT8KBA.js +0 -1
- package/dist/chunks/sideQuestion-DIMsNoEc.js +0 -20
- package/dist/chunks/sink-BBn0HwoH.js +0 -1
- package/dist/chunks/sink-DLRpC2qX.js +0 -1
- package/dist/chunks/sinks-BI1hGD9c.js +0 -2
- package/dist/chunks/sinks-DKGE2sSC.js +0 -1
- package/dist/chunks/skill-learning-Dz-Zq-xT.js +0 -5
- package/dist/chunks/skillChangeDetector-C2Te20cK.js +0 -1
- package/dist/chunks/skillGapStore-BFpryJIe.js +0 -5
- package/dist/chunks/skillGapStore-CxPjoWci.js +0 -1
- package/dist/chunks/skillGenerator-BGOIb5p-.js +0 -8
- package/dist/chunks/skillLearning-BRvWwB8E.js +0 -1
- package/dist/chunks/skillLearning-DTo7lCKd.js +0 -1
- package/dist/chunks/skillPanel-DzYZLnuH.js +0 -28
- package/dist/chunks/skillSearchPanel-DrysL5R-.js +0 -21
- package/dist/chunks/skills-CTfNqisc.js +0 -1
- package/dist/chunks/sprites-CHzZCAGE.js +0 -1
- package/dist/chunks/startupProfiler-DnXZaX4A.js +0 -3
- package/dist/chunks/startupProfiler-SOE--nM9.js +0 -1
- package/dist/chunks/stats-D2s-hIY8.js +0 -1
- package/dist/chunks/status-XxrX2kHw.js +0 -1
- package/dist/chunks/statusNoticeHelpers-CUm1pflC.js +0 -1
- package/dist/chunks/stickers-BMh2qjgF.js +0 -1
- package/dist/chunks/tag-FV031rKW.js +0 -11
- package/dist/chunks/tasks-aK2rp8CW.js +0 -1
- package/dist/chunks/teamHelpers-2m66Mr8w.js +0 -1
- package/dist/chunks/teamHelpers-Bg3nHlWr.js +0 -1
- package/dist/chunks/teammateModeSnapshot-BtdUJBKp.js +0 -1
- package/dist/chunks/teammateModeSnapshot-VojvAMbR.js +0 -1
- package/dist/chunks/teleport-4x9eIl8c.js +0 -1
- package/dist/chunks/templateJobs-fEz4DGWh.js +0 -12
- package/dist/chunks/terminalSetup-Cjdlcznm.js +0 -33
- package/dist/chunks/terminalSetup-EirH-l0a.js +0 -1
- package/dist/chunks/theme-BjdEyakL.js +0 -1
- package/dist/chunks/thinkback-CrW3VlCR.js +0 -1
- package/dist/chunks/thinkback-DHyz-lmU.js +0 -1
- package/dist/chunks/thinkback-play-B46ystVF.js +0 -1
- package/dist/chunks/tmux-CvbhsfwG.js +0 -1
- package/dist/chunks/toolEventObserver-CJ68x4wM.js +0 -1
- package/dist/chunks/toolEventObserver-Dak6ETA6.js +0 -1
- package/dist/chunks/toolPool-3CMCh3QU.js +0 -1
- package/dist/chunks/toolPool-BHdCDihh.js +0 -1
- package/dist/chunks/trustedDevice-QhApqKq4.js +0 -1
- package/dist/chunks/trustedDevice-oDn6E85N.js +0 -1
- package/dist/chunks/tui-geoc3zxu.js +0 -6
- package/dist/chunks/types-Csi32ZXh.js +0 -17
- package/dist/chunks/udsClient-BdPOrL1H.js +0 -1
- package/dist/chunks/ultrareviewCommand-Ar9zzqz4.js +0 -3
- package/dist/chunks/undercover-D1ieJ54D.js +0 -1
- package/dist/chunks/undercover-DZq2Tf-o.js +0 -31
- package/dist/chunks/up-D-U4wUCe.js +0 -12
- package/dist/chunks/updateCCB-Db3CfFcn.js +0 -11
- package/dist/chunks/upgrade-B28O0zeQ.js +0 -1
- package/dist/chunks/upgrade-BZvNOhEJ.js +0 -1
- package/dist/chunks/upload-DAmbsBq4.js +0 -1
- package/dist/chunks/upstreamproxy-Ci5T_JCo.js +0 -11
- package/dist/chunks/usage-COv9UCxX.js +0 -1
- package/dist/chunks/usage-Dtv3YQf8.js +0 -1
- package/dist/chunks/useMainLoopModel-BpM3dlzJ.js +0 -1
- package/dist/chunks/useManagePlugins-DZ-_Ll9E.js +0 -1
- package/dist/chunks/useMergedTools-INKnp2ij.js +0 -1
- package/dist/chunks/useSearchInput-DobM3JKI.js +0 -1
- package/dist/chunks/useSettingsErrors-DjvaCC5-.js +0 -1
- package/dist/chunks/useVoice-exDfbv1t.js +0 -1
- package/dist/chunks/util-CDzNDmax.js +0 -1
- package/dist/chunks/utils-B0iiiW_p.js +0 -1
- package/dist/chunks/validatePlugin-DaLnfLSC.js +0 -1
- package/dist/chunks/vim-CPKu15l_.js +0 -1
- package/dist/chunks/voice-BcA5h8ya.js +0 -8
- package/dist/chunks/voice-gNxUce-I.js +0 -2
- package/dist/chunks/voiceModeEnabled-CwPbMJ9C.js +0 -1
- package/dist/chunks/voiceModeEnabled-DEwGjUP6.js +0 -1
- package/dist/chunks/voiceStreamSTT-6b3Oslnl.js +0 -1
- package/dist/chunks/voiceStreamSTT-BjX-mTB_.js +0 -1
- package/dist/chunks/which-DqSAIvp2.js +0 -1
- package/dist/chunks/windowsPaths-C9CigqoF.js +0 -1
- package/dist/chunks/windowsPaths-swxCp7bX.js +0 -2
- package/dist/chunks/workSecret-mS2OrpxF.js +0 -1
- package/dist/chunks/workerRegistry-Bc6t6VlK.js +0 -1
- package/dist/chunks/worktree-NnuvJmoP.js +0 -1
- package/dist/chunks/xml-Dg8-vY8G.js +0 -1
- /package/dist/chunks/{InProcessTransport-gJLr5CIx.js → InProcessTransport-B0mmAoxw.js} +0 -0
- /package/dist/chunks/{attributionHooks-Br5LZ6bk.js → attributionHooks-DZJjA8p9.js} +0 -0
- /package/dist/chunks/{attributionTrailer-BMTuK4Ax.js → attributionTrailer-CZY9XTcr.js} +0 -0
- /package/dist/chunks/{autoModeDenials-D8eQ1CoM.js → autoModeDenials-CGAtAGGf.js} +0 -0
- /package/dist/chunks/{bedrockClient-Ci523Btx.js → bedrockClient-DZgaJTHp.js} +0 -0
- /package/dist/chunks/{ccshareResume-CqNm2k-J.js → ccshareResume-CZggHNOf.js} +0 -0
- /package/dist/chunks/{connectHeadless-DFCrE6O4.js → connectHeadless-KNT0Sg7Z.js} +0 -0
- /package/dist/chunks/{dangerousBackend-Du0K4q5Z.js → dangerousBackend-ByOAEFld.js} +0 -0
- /package/dist/chunks/{earlyInput-feVuZGzR.js → earlyInput-BFcdUMaX.js} +0 -0
- /package/dist/chunks/{eventLoopStallDetector-XfubcyMN.js → eventLoopStallDetector-l83_98VR.js} +0 -0
- /package/dist/chunks/{fpsMetrics-CEQt6Tk1.js → fpsMetrics-DOI_SIeY.js} +0 -0
- /package/dist/chunks/{fuse-TM-TeOo_.js → fuse-Bp7rmZ5x.js} +0 -0
- /package/dist/chunks/{instinctParser-CJPM8VjX.js → instinctParser-Bxhe2LOF.js} +0 -0
- /package/dist/chunks/{lockfile-Y1hwdHrQ.js → lockfile-CeCEBLtN.js} +0 -0
- /package/dist/chunks/{mobile-umu5P0cM.js → mobile-Cydobb55.js} +0 -0
- /package/dist/chunks/{observationStore-gFvWXJmc.js → observationStore-BaPq7CKI.js} +0 -0
- /package/dist/chunks/{openaiShared-Dy78YERG.js → openaiShared-Crt0cZLO.js} +0 -0
- /package/dist/chunks/{output-style-BmEQscMd.js → output-style-BkOnFmfe.js} +0 -0
- /package/dist/chunks/{parseConnectUrl-C6cvMkkH.js → parseConnectUrl-BFNiff4c.js} +0 -0
- /package/dist/chunks/{poller-Dbo07OEA.js → poller-DADqVTWi.js} +0 -0
- /package/dist/chunks/{postCommitAttribution-DhFkZMxJ.js → postCommitAttribution-CA9Z2sqn.js} +0 -0
- /package/dist/chunks/{projectContext-iWPqcl0Z.js → projectContext-CwJlxP2Y.js} +0 -0
- /package/dist/chunks/{rewind-DAn-nNs-.js → rewind-DTk4TFYB.js} +0 -0
- /package/dist/chunks/{sanitization-JYRkZFrK.js → sanitization-DD414_3t.js} +0 -0
- /package/dist/chunks/{sdkHeapDumpMonitor-DKtfJW5o.js → sdkHeapDumpMonitor-fNRF2fbK.js} +0 -0
- /package/dist/chunks/{server-CswFAYwN.js → server-DTd90dmm.js} +0 -0
- /package/dist/chunks/{serverBanner-CImTYGhY.js → serverBanner-B7UaaCCl.js} +0 -0
- /package/dist/chunks/{serverLog-Bwt7XEmk.js → serverLog-DRvGpDtt.js} +0 -0
- /package/dist/chunks/{sessionDataUploader-CKRXCBxI.js → sessionDataUploader-BDsz_1Uy.js} +0 -0
- /package/dist/chunks/{sessionManager-Ca2O821f.js → sessionManager-Bh-Z-YXy.js} +0 -0
|
@@ -0,0 +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{l,p as u}from"./debug-otxXY3j-.js";import{lC as d,uC as f}from"./loadAgentsDir-Br5fGLLI.js";import{t as p}from"./useKeybinding-FsOnjW6T.js";import{t as m}from"./lib-B4Q0Nrpb.js";function h({onDone:e}){let t=f(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=>{u(`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
|
+
`).filter(e=>e.length>0),l=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`})}),l?(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(),d(),l(),v=c(),y=async e=>(0,v.jsx)(h,{onDone:e})}))();export{y as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e,p as t}from"./debug-otxXY3j-.js";e();async function n(){let{fetchCodeSessionsFromSessionsAPI:e}=await import(`./api-xFvB7WoB.js`),n;try{n=await e()}catch(e){throw t(`[assistant:discovery] fetchCodeSessionsFromSessionsAPI failed: ${e}`),e}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{Su as e,wu as t}from"./loadAgentsDir-Br5fGLLI.js";e();export{t as registerSessionFileAccessHooks};
|
|
@@ -0,0 +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-DfGsIjPm.js";import{B as u,U as d,_ as ee,h as te,z as ne}from"./debug-otxXY3j-.js";import{n as re,r as f}from"./analytics-DqMQntaB.js";import{b as p,x as ie}from"./teammate-DMYOtLTK.js";import{Ak as m,Bl as h,Bn as ae,Ck as g,Dk as _,Ek as v,Eo as y,Fl as b,Gk as oe,Hn as se,Kc as ce,Mk as le,Nk as ue,Ok as x,Pl as de,Rk as fe,Rl as S,Tk as C,Uk as w,Uo as T,Vk as E,Vn as D,Vo as O,Wk as k,aO as A,bl as j,dt as M,ft as N,jk as P,kk as F,lk as I,ml as L,oO as R,pl as z,qc as B,vl as V,wk as pe,xk as me,yk as H,yl as he,zk as ge}from"./loadAgentsDir-Br5fGLLI.js";import{Hn as _e,zn as U}from"./prompt-B8M-HLIS.js";import{X as ve}from"./rcDebugLog-BoroyfjB.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+=p(e,e=>e.type===`tool_use`))}}return n}function K(e){let t=E(e);if(!_()){if(!pe(t))return!1;m()}let n=C(t),r=be(e,X)>=g(),i=O(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=ae();await t.mkdir(n,{mode:448});let r=D();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await j(),{encoding:`utf-8`,mode:384})}catch(e){if(u(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await ce.call({file_path:r},e),a=``,o=i.data;return o.type===`text`&&(a=o.file.content),f(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function xe(){if(r())return;let e=L();process.env.USER_TYPE===`ant`&&f(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&R($)}async function Se(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};F();try{let n=b(t),{memoryPath:r,currentMemory:i}=await q(n),a=await V(i,r),{tools:o,mainLoopModel:s}=t.options,[c,l,u]=await Promise.all([M(o,s),k(),w()]),d=ve(c);return await h({promptMessages:[y({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}}),f(`tengu_session_memory_manual_extraction`,{}),P(E(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:ne(e)}}finally{x()}}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(!O(e)){let t=e[e.length-1];t?.uuid&&le(t.uuid)}}var X,Z,Q,$,Ce=e((()=>{n(),i(),N(),oe(),_e(),B(),ie(),S(),ee(),A(),T(),se(),l(),I(),ge(),re(),z(),he(),v(),d(),a(),Z=t(()=>{let e=G();ue({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:H.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:H.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:H.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-BCoeB5zB.js`);if(e())return}if(!ye()){process.env.USER_TYPE===`ant`&&!Q&&(Q=!0,f(`tengu_session_memory_gate_disabled`,{}));return}if(Z(),!K(t))return;F();let i=b(n),{memoryPath:a,currentMemory:o}=await q(i);await h({promptMessages:[y({content:await V(o,a)})],cacheSafeParams:de(e),canUseTool:J(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],c=s?fe(s):void 0,l=me();f(`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}),P(E(t)),Y(t),x()})}));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-0Jqo1_MV.js";t();export{e as manuallyExtractSessionMemory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ek as e,Sk as t}from"./loadAgentsDir-Br5fGLLI.js";e();export{t as getSessionMemoryContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./sessionObserver-CQxIKV8D.js";e();export{t as heuristicObserverBackend};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{lk as t,nt as n,tt as r}from"./loadAgentsDir-Br5fGLLI.js";import{X as i}from"./rcDebugLog-BoroyfjB.js";import{i as a,l as o,r as s,t as c,u as l}from"./instinctParser-Bxhe2LOF.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-CEky1SLb.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
|
+
`)}\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
|
+
|
|
4
|
+
Respond with ONLY a JSON array (no prose, no code fences, no commentary). Each item must match this schema:
|
|
5
|
+
|
|
6
|
+
{
|
|
7
|
+
"trigger": string, // <= 80 chars, short phrase describing WHEN the instinct applies
|
|
8
|
+
"action": string, // <= 120 chars, short phrase describing WHAT to do
|
|
9
|
+
"confidence": number, // 0..1 — how strongly these observations support the pattern
|
|
10
|
+
"domain": "workflow"|"testing"|"debugging"|"code-style"|"security"|"git"|"project",
|
|
11
|
+
"scope": "project"|"global",
|
|
12
|
+
"evidence": string[] // 1..3 short excerpts copied/paraphrased from the observations
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
Rules:
|
|
16
|
+
- Return [] if nothing clearly reusable. No guessing.
|
|
17
|
+
- At most 3 items, highest confidence first.
|
|
18
|
+
- confidence > 0.7 only when observations show the pattern in action (a correction followed by a successful retry, a repeated sequence, an explicit rule).
|
|
19
|
+
- Never include secrets, tokens, full file contents, or personally-identifying data.
|
|
20
|
+
- Scope "global" only when the pattern is obviously project-agnostic (generic testing, git hygiene); default to "project".`,z={name:`llm`,analyze(e,t){return x(e,t)}}}));function V(e,t){return[...W(e),...G(e),...K(e,t),...q(e)]}function H(e,t){let n=f();return(n.name===`heuristic`?V(e,t):U(n.analyze(e))).map(e=>s(e))}function U(e){if(Array.isArray(e))return e;throw Error(`Active observer backend returned a Promise; use analyzeObservationsAsync instead`)}function W(e){return e.flatMap((t,n)=>{if(t.event!==`user_message`||!t.messageText)return[];let r=t.messageText.trim(),i=X(r);return i?[{...c(t),trigger:i.trigger,action:i.action,confidence:.7,domain:Z(r),source:`session-observation`,scope:`project`,evidence:[r],evidenceOutcome:J(e,n),observationIds:[t.id]}]:[]})}function G(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r.event!==`tool_complete`||r.outcome!==`failure`)continue;let i=e.slice(n+1,n+6).find(e=>e.event===`tool_complete`&&e.outcome===`success`&&e.toolName===r.toolName);!i||!r.toolName||t.push({...c(r),trigger:`When ${r.toolName} fails during this project`,action:`Use the follow-up successful ${r.toolName} invocation as the resolution pattern before retrying blindly.`,confidence:.5,domain:`debugging`,source:`session-observation`,scope:`project`,evidence:[r.toolOutput??`${r.toolName} failed`,i.toolOutput??`${i.toolName} succeeded`],evidenceOutcome:`success`,observationIds:[r.id,i.id]})}return t}function K(e,t){let n=t?.minRepeatedSequenceCount??Q,r=e.filter(e=>e.event===`tool_start`||e.event===`tool_complete`),i=r.map(e=>e.toolName??``),a=[`Grep`,`Read`,`Edit`],o=[],s=0;for(let e=0;e<=i.length-a.length;e++)a.every((t,n)=>i[e+n]===t)&&(s++,o.push(...r.slice(e,e+a.length).map(e=>e.id)));if(s<n)return[];let l=`Observed ${s} repeated Grep -> Read -> Edit workflow sequences.`,u=r.find(e=>o.includes(e.id)),d=o[o.length-1],f=r.find(e=>e.id===d),p=f?.event===`tool_complete`?f.outcome:void 0;return[{...c(u??e[0]),trigger:`When changing code in this project`,action:`Prefer the Grep -> Read -> Edit workflow: locate symbols, inspect context, then apply the smallest edit.`,confidence:s>=3?.65:.5,domain:`workflow`,source:`session-observation`,scope:`project`,evidence:[l],evidenceOutcome:Y(p),observationIds:Array.from(new Set(o))}]}function q(e){return e.flatMap((t,n)=>{if(t.event!==`user_message`||!t.messageText)return[];let r=t.messageText.trim();return/(项目约定|规范|必须|convention|always|must)/i.test(r)?[{...c(t),trigger:`When working in this project`,action:`Follow the project convention: ${r}`,confidence:.4,domain:`project`,source:`session-observation`,scope:`project`,evidence:[r],evidenceOutcome:J(e,n),observationIds:[t.id]}]:[]})}function J(e,t){for(let n=t-1;n>=0;n--){let t=e[n];if(t.event===`tool_complete`)return Y(t.outcome)}}function Y(e){if(e===`success`||e===`failure`||e===`unknown`)return e}function X(e){let t=/(?:不要|别|不应(?:该)?|不要再)\s*(?<avoid>[^,,。.;;]+)[,,\s]*(?:用|使用|改用|应该用|要用)\s*(?<prefer>[^,,。.;;]+)/i,n=/(?:do not|don't|avoid)\s+(?<avoid>[^,.;]+)[,;\s]+(?:use|prefer)\s+(?<prefer>[^,.;]+)/i,r=/(?:你应该|应该先|must|should)\s*(?<prefer>[^,,。.;;]+)/i,i=e.match(t)??e.match(n);if(i?.groups){let e=i.groups.avoid.trim(),t=i.groups.prefer.trim();return{trigger:`When choosing between ${e} and ${t}`,action:`Prefer ${t}; avoid ${e}.`}}let a=e.match(r);return a?.groups?{trigger:`When this user gives a corrective instruction`,action:`Prefer this corrected action: ${a.groups.prefer.trim()}.`}:null}function Z(e){let t=e.toLowerCase();return/test|mock|testing-library|vitest|jest|bun test/.test(t)?`testing`:/git|commit|branch/.test(t)?`git`:/security|secret|token|password/.test(t)?`security`:/style|format|lint|naming/.test(t)?`code-style`:`project`}var Q,$,ne=e((()=>{a(),v(),B(),Q=2,$={name:`heuristic`,analyze(e,t){return V(e)}},u($),u(z)}));export{B as a,b as c,v as d,u as f,ne as i,p as l,d as m,V as n,z as o,h as p,$ as r,y as s,H as t,f as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fr as e,Hr as t,di as n}from"./loadAgentsDir-Br5fGLLI.js";e();export{t as linkSessionToPR,n as recordTranscript};
|
|
@@ -0,0 +1,14 @@
|
|
|
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{l as o,p as s}from"./debug-otxXY3j-.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{s as u,u as d}from"./types-D5R26wwH.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{Uo as m,ko as h,lk as g,nt as _,tt as v}from"./loadAgentsDir-Br5fGLLI.js";import{X as y}from"./rcDebugLog-BoroyfjB.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
|
+
`);return n.length>S?n.slice(-S):n}async function x(e,t){let n=e.trim();if(!n)return null;try{let e=h((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 s(`generateSessionTitle failed: ${e}`,{level:`error`}),l(`tengu_session_title_generated`,{success:!1}),null}}var S,C,w,T=e((()=>{r(),a(),c(),v(),o(),u(),p(),m(),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
|
+
|
|
4
|
+
Return JSON with a single "title" field.
|
|
5
|
+
|
|
6
|
+
Good examples:
|
|
7
|
+
{"title": "Fix login button on mobile"}
|
|
8
|
+
{"title": "Add OAuth authentication"}
|
|
9
|
+
{"title": "Debug failing CI tests"}
|
|
10
|
+
{"title": "Refactor API client error handling"}
|
|
11
|
+
|
|
12
|
+
Bad (too vague): {"title": "Code changes"}
|
|
13
|
+
Bad (too long): {"title": "Investigate and fix the issue where the login button does not respond on mobile devices"}
|
|
14
|
+
Bad (wrong case): {"title": "Fix Login Button On Mobile"}`,w=f(()=>n({title:t()}))}));export{x as n,T as r,b as t};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 te,on as ne,st as re}from"./paths-DfGsIjPm.js";import{D as ie,E as _,O as v,U as ae,l as oe,p as se}from"./debug-otxXY3j-.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.7.0`);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 te.terminal&&(n[`terminal.type`]=te.terminal),n}var xe,C=e((()=>{l(),ne(),d(),re(),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,se(`[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;se(`[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(),ae(),ce(),_(),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
|
+
|
|
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=ie(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
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
`),{content:r,truncated:i}=z(n);e.setAttributes({new_context:r,new_context_message_count:o.length,...i&&{new_context_truncated:!0,new_context_original_length:n.length}})}if(i.length>0){let t=i.join(`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
`),{content:n,truncated:r}=z(t);e.setAttributes({system_reminders:n,system_reminders_count:i.length,...r&&{system_reminders_truncated:!0,system_reminders_original_length:t.length}})}let a=n[n.length-1];a&&U.set(r,Ge(a))}}}}function Ye(e,t){if(!(!R()||!t)){if(t.modelOutput!==void 0){let{content:n,truncated:r}=z(t.modelOutput);e[`response.model_output`]=n,r&&(e[`response.model_output_truncated`]=!0,e[`response.model_output_original_length`]=t.modelOutput.length)}if(process.env.USER_TYPE===`ant`&&t.thinkingOutput!==void 0){let{content:n,truncated:r}=z(t.thinkingOutput);e[`response.thinking_output`]=n,r&&(e[`response.thinking_output_truncated`]=!0,e[`response.thinking_output_original_length`]=t.thinkingOutput.length)}}}function Xe(e,t,n){if(!R())return;let{content:r,truncated:i}=z(`[TOOL INPUT: ${t}]\n${n}`);e.setAttributes({tool_input:r,...i&&{tool_input_truncated:!0,tool_input_original_length:n.length}})}function Ze(e,t,n){if(!R())return;let{content:r,truncated:i}=z(`[TOOL RESULT: ${t}]\n${n}`);e.new_context=r,i&&(e.new_context_truncated=!0,e.new_context_original_length=n.length)}var H,U,Qe,$e,et=e((()=>{l(),m(),p(),t(),_(),Te(),H=new Set,U=new Map,Qe=60*1024,$e=/^<system-reminder>\n?([\s\S]*?)\n?<\/system-reminder>$/}));function W(e){return e.spanContext().spanId||``}function tt(){if($)return;$=!0;let e=setInterval(()=>{let e=Date.now()-_t;for(let[t,n]of X){let r=n.deref();r===void 0?(X.delete(t),Z.delete(t)):r.startTime<e&&(r.ended||r.span.end(),X.delete(t),Z.delete(t))}},6e4);typeof e.unref==`function`&&e.unref()}function nt(){return!1}function G(){return nt()||R()}function K(){return i.getTracer(`com.anthropic.claude_code.tracing`,`1.0.0`)}function q(e,t={}){return{...S(),"span.type":e,...t}}function rt(e){tt();let t=k()?Re(e):void 0;if(!G()){if(t){let e=i.getActiveSpan()||K().startSpan(`dummy`),n=W(e),r={span:e,startTime:Date.now(),attributes:{},perfettoSpanId:t};return X.set(n,new WeakRef(r)),J.enterWith(r),e}return i.getActiveSpan()||K().startSpan(`dummy`)}let r=K(),a=n(process.env.OTEL_LOG_USER_PROMPTS)?e:`<REDACTED>`;Q++;let o=q(`interaction`,{user_prompt:a,user_prompt_length:e.length,"interaction.sequence":Q}),s=r.startSpan(`claude_code.interaction`,{attributes:o});qe(s,e);let c=W(s),l={span:s,startTime:Date.now(),attributes:o,perfettoSpanId:t};return X.set(c,new WeakRef(l)),J.enterWith(l),s}function it(){let e=J.getStore();if(!e||e.ended)return;if(e.perfettoSpanId&&ze(e.perfettoSpanId),!G()){e.ended=!0,X.delete(W(e.span)),J.enterWith(void 0);return}let t=Date.now()-e.startTime;e.span.setAttributes({"interaction.duration_ms":t}),e.span.end(),e.ended=!0,X.delete(W(e.span)),J.enterWith(void 0)}function at(e,t,n,r){let o=k()?Me({model:e,querySource:t?.querySource,messageId:void 0}):void 0;if(!G()){if(o){let t=i.getActiveSpan()||K().startSpan(`dummy`),n=W(t),r={span:t,startTime:Date.now(),attributes:{model:e},perfettoSpanId:o};return X.set(n,new WeakRef(r)),Z.set(n,r),t}return i.getActiveSpan()||K().startSpan(`dummy`)}let s=K(),c=J.getStore(),l=q(`llm_request`,{model:e,"llm_request.context":c?`interaction`:`standalone`,speed:r?`fast`:`normal`}),u=c?i.setSpan(a.active(),c.span):a.active(),d=s.startSpan(`claude_code.llm_request`,{attributes:l},u);t?.querySource&&d.setAttribute(`query_source`,t.querySource),Je(d,t,n);let f=W(d),p={span:d,startTime:Date.now(),attributes:l,perfettoSpanId:o};return X.set(f,new WeakRef(p)),Z.set(f,p),d}function ot(e,t){let n;if(e){let t=W(e);n=X.get(t)?.deref()}else n=Array.from(X.values()).findLast(e=>{let t=e.deref();return t?.attributes[`span.type`]===`llm_request`||t?.attributes.model})?.deref();if(!n)return;let r=Date.now()-n.startTime;if(n.perfettoSpanId&&Ne(n.perfettoSpanId,{ttftMs:t?.ttftMs,ttltMs:r,promptTokens:t?.inputTokens,outputTokens:t?.outputTokens,cacheReadTokens:t?.cacheReadTokens,cacheCreationTokens:t?.cacheCreationTokens,success:t?.success,error:t?.error,requestSetupMs:t?.requestSetupMs,attemptStartTimes:t?.attemptStartTimes}),!G()){let e=W(n.span);X.delete(e),Z.delete(e);return}let i={duration_ms:r};t&&(t.inputTokens!==void 0&&(i.input_tokens=t.inputTokens),t.outputTokens!==void 0&&(i.output_tokens=t.outputTokens),t.cacheReadTokens!==void 0&&(i.cache_read_tokens=t.cacheReadTokens),t.cacheCreationTokens!==void 0&&(i.cache_creation_tokens=t.cacheCreationTokens),t.success!==void 0&&(i.success=t.success),t.statusCode!==void 0&&(i.status_code=t.statusCode),t.error!==void 0&&(i.error=t.error),t.attempt!==void 0&&(i.attempt=t.attempt),t.hasToolCall!==void 0&&(i[`response.has_tool_call`]=t.hasToolCall),t.ttftMs!==void 0&&(i.ttft_ms=t.ttftMs),Ye(i,t)),n.span.setAttributes(i),n.span.end();let a=W(n.span);X.delete(a),Z.delete(a)}function st(e,t,n){let r=k()?Pe(e,t):void 0;if(!G()){if(r){let t=i.getActiveSpan()||K().startSpan(`dummy`),n=W(t),a={span:t,startTime:Date.now(),attributes:{"span.type":`tool`,tool_name:e},perfettoSpanId:r};return X.set(n,new WeakRef(a)),Y.enterWith(a),t}return i.getActiveSpan()||K().startSpan(`dummy`)}let o=K(),s=J.getStore(),c=q(`tool`,{tool_name:e,...t}),l=s?i.setSpan(a.active(),s.span):a.active(),u=o.startSpan(`claude_code.tool`,{attributes:c},l);n&&Xe(u,e,n);let d=W(u),f={span:u,startTime:Date.now(),attributes:c,perfettoSpanId:r};return X.set(d,new WeakRef(f)),Y.enterWith(f),u}function ct(){let e=k()?Ie(`tool_permission`):void 0;if(!G()){if(e){let t=i.getActiveSpan()||K().startSpan(`dummy`),n=W(t),r={span:t,startTime:Date.now(),attributes:{"span.type":`tool.blocked_on_user`},perfettoSpanId:e};return X.set(n,new WeakRef(r)),Z.set(n,r),t}return i.getActiveSpan()||K().startSpan(`dummy`)}let t=K(),n=Y.getStore(),r=q(`tool.blocked_on_user`),o=n?i.setSpan(a.active(),n.span):a.active(),s=t.startSpan(`claude_code.tool.blocked_on_user`,{attributes:r},o),c=W(s),l={span:s,startTime:Date.now(),attributes:r,perfettoSpanId:e};return X.set(c,new WeakRef(l)),Z.set(c,l),s}function lt(e,t){let n=Array.from(X.values()).findLast(e=>e.deref()?.attributes[`span.type`]===`tool.blocked_on_user`)?.deref();if(!n)return;if(n.perfettoSpanId&&Le(n.perfettoSpanId,{decision:e,source:t}),!G()){let e=W(n.span);X.delete(e),Z.delete(e);return}let r={duration_ms:Date.now()-n.startTime};e&&(r.decision=e),t&&(r.source=t),n.span.setAttributes(r),n.span.end();let i=W(n.span);X.delete(i),Z.delete(i)}function ut(){if(!G())return i.getActiveSpan()||K().startSpan(`dummy`);let e=K(),t=Y.getStore(),n=q(`tool.execution`),r=t?i.setSpan(a.active(),t.span):a.active(),o=e.startSpan(`claude_code.tool.execution`,{attributes:n},r),s=W(o),c={span:o,startTime:Date.now(),attributes:n};return X.set(s,new WeakRef(c)),Z.set(s,c),o}function dt(e){if(!G())return;let t=Array.from(X.values()).findLast(e=>e.deref()?.attributes[`span.type`]===`tool.execution`)?.deref();if(!t)return;let n={duration_ms:Date.now()-t.startTime};e&&(e.success!==void 0&&(n.success=e.success),e.error!==void 0&&(n.error=e.error)),t.span.setAttributes(n),t.span.end();let r=W(t.span);X.delete(r),Z.delete(r)}function ft(e,t){let n=Y.getStore();if(!n)return;if(n.perfettoSpanId&&Fe(n.perfettoSpanId,{success:!0,resultTokens:t}),!G()){let e=W(n.span);X.delete(e),Y.enterWith(void 0);return}let r={duration_ms:Date.now()-n.startTime};e&&Ze(r,n.attributes.tool_name||`unknown`,e),t!==void 0&&(r.result_tokens=t),n.span.setAttributes(r),n.span.end();let i=W(n.span);X.delete(i),Y.enterWith(void 0)}function pt(){return n(process.env.OTEL_LOG_TOOL_CONTENT)}function mt(e,t){if(!G()||!pt())return;let n=Y.getStore();if(!n)return;let r={};for(let[e,n]of Object.entries(t))if(typeof n==`string`){let{content:t,truncated:i}=z(n);r[e]=t,i&&(r[`${e}_truncated`]=!0,r[`${e}_original_length`]=n.length)}else r[e]=n;n.span.addEvent(e,r)}function ht(e,t,n,r){if(!R())return i.getActiveSpan()||K().startSpan(`dummy`);let o=K(),s=Y.getStore()??J.getStore(),c=q(`hook`,{hook_event:e,hook_name:t,num_hooks:n,hook_definitions:r}),l=s?i.setSpan(a.active(),s.span):a.active(),u=o.startSpan(`claude_code.hook`,{attributes:c},l),d=W(u),f={span:u,startTime:Date.now(),attributes:c};return X.set(d,new WeakRef(f)),Z.set(d,f),u}function gt(e,t){if(!R())return;let n=W(e),r=X.get(n)?.deref();if(!r)return;let i={duration_ms:Date.now()-r.startTime};t&&(t.numSuccess!==void 0&&(i.num_success=t.numSuccess),t.numBlocking!==void 0&&(i.num_blocking=t.numBlocking),t.numNonBlockingError!==void 0&&(i.num_non_blocking_error=t.numNonBlockingError),t.numCancelled!==void 0&&(i.num_cancelled=t.numCancelled)),r.span.setAttributes(i),r.span.end(),X.delete(n),Z.delete(n)}var J,Y,X,Z,Q,$,_t,vt=e((()=>{r(),m(),t(),C(),et(),He(),J=new he,Y=new he,X=new Map,Z=new Map,Q=0,$=!1,_t=1800*1e3}));export{je as C,S as D,Ce as E,C as O,Ae as S,w as T,et as _,lt as a,Oe as b,vt as c,rt as d,at as f,Ue as g,st as h,ot as i,nt as l,ut as m,gt as n,dt as o,ct as p,it as r,ft as s,mt as t,ht as u,R as v,Te as w,k as x,He as y};
|
|
@@ -0,0 +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-DfGsIjPm.js";import{U as f}from"./debug-otxXY3j-.js";import{P as p,v as m}from"./git-DayFjsvj.js";import{u as h}from"./oauth-CdZEzMww.js";import{n as g,t as _}from"./lazySchema-2sOku3cX.js";import{$a as v,$k as y}from"./loadAgentsDir-Br5fGLLI.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{is as e,ls as t}from"./paths-DfGsIjPm.js";import{n,t as r}from"./bundledMode-kSQejuY4.js";import{o as i,r as a,t as o}from"./common-BD4Q7osK.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-CtkQH6jy.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};
|
|
@@ -0,0 +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 re,it as m,on as h,rt as g,st as _}from"./paths-DfGsIjPm.js";import{U as v,z as y}from"./debug-otxXY3j-.js";import{n as b,r as x}from"./analytics-DqMQntaB.js";import{n as S,t as C}from"./cwd--iizewsn.js";import{F as w,P as T,f as ie,n as E,r as D,v as O}from"./git-DayFjsvj.js";import{a as k,n as A}from"./env-BH-OBzcA.js";import{o as j,s as M}from"./log-DS97_rIr.js";import{a as N,n as P}from"./startupProfiler-CnDpob1v.js";import{$k as F,Cn as I,Di as L,Fr as R,It as z,JE as B,Jk as V,Ot as H,Sn as U,St as W,Zi as G,_C as K,by as q,dy as J,gC as Y,gx as ae,hC as oe,mh as X,na as se,ph as ce,qE as le,ux as ue,uy as de,vy as fe,wt as Z,xt as pe}from"./loadAgentsDir-Br5fGLLI.js";import{l as me,u as he}from"./terminalSetup-CmAEgt-5.js";import{c as ge,n as _e}from"./releaseNotes-CXY-xAja.js";import{s as ve,u as ye}from"./logoV2Utils-BN_HrHSc.js";import{i as be,r as xe}from"./runtimeObserver-DetZ5Tek.js";import{n as Q,r as Se}from"./sessionMemory-0Jqo1_MV.js";import{t as Ce}from"./sinks--frMI4-5.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(),b(),S(),v(),T(),k(),O(),h(),_(),g(),F(),B(),Y(),he(),de(),ce(),se(),R(),I(),ge(),be(),Se(),u(),j();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 M(Error(`Failed to restore iTerm2 settings with: ${e}`)),$(),{status:`failed`,backupPath:t}}}u(),j(),ye(),ue(),q(),P(),H();async function je(t,i,o,u,d,h,g,_,v){w(`info`,`setup_started`);let b=process.version.match(/^v(\d+)\./)?.[1];if((!b||parseInt(b,10)<18)&&(console.error(r.bold.red(`Error: Claude Code requires Node.js version 18 or higher.`)),process.exit(1)),g&&c(le(g)),e(),!e()&&m()){let{captureTeammateModeSnapshot:e}=await import(`./teammateModeSnapshot-8EWjlA-s.js`);e()}if(!a()){if(m()){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){M(e)}}X(t);let S=Date.now();if(oe(),w(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-S}),J(t),u){let e=U(),n=await ie();!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=_?`pr-${_}`:d??fe(),a;if(n){let e=E(C());e||(process.stderr.write(r.red(`Error: Could not determine the main git repository root.
|
|
2
|
+
`)),process.exit(1)),e!==(D(C())??C())&&(w(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),X(e)),a=h?Z(e,z(i)):void 0}else a=h?Z(C(),z(i)):void 0;let o;try{o=await W(ee(),i,a,_?{prNumber:_}:void 0)}catch(e){process.stderr.write(r.red(`Error creating worktree: ${y(e)}\n`)),process.exit(1)}if(x(`tengu_worktree_created`,{tmux_enabled:h}),h&&a){let e=await pe(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),X(o.worktreePath),l(C()),s(C()),L(o),V(),K()}w(`info`,`setup_background_jobs_starting`),e()||(Q(),xe()),ae(),w(`info`,`setup_background_jobs_launched`),N(`setup_before_prefetch`),w(`info`,`setup_prefetch_starting`);let T=a()&&n(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||e();if(T||G(te()),import(`./loadPluginHooks-C4soqr6g.js`).then(e=>{T||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),e()||(process.env.USER_TYPE===`ant`&&import(`./commitAttribution-AEb-sE-t.js`).then(async e=>{if(await e.isInternalModelRepo()){let{clearSystemPromptSections:e}=await import(`./systemPromptSections-DB93ZNWP.js`);e()}}),setImmediate(()=>{import(`./attributionHooks-DZJjA8p9.js`).then(({registerAttributionHooks:e})=>{e()})}),import(`./sessionFileAccessHooks-COne5L2E.js`).then(e=>e.registerSessionFileAccessHooks())),Ce(),x(`tengu_started`,{}),ne(a()),N(`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(),A.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 O=re();O.lastCost!==void 0&&O.lastDuration!==void 0&&x(`tengu_exit`,{last_session_cost:O.lastCost,last_session_api_duration:O.lastAPIDuration,last_session_tool_duration:O.lastToolDuration,last_session_duration:O.lastDuration,last_session_lines_added:O.lastLinesAdded,last_session_lines_removed:O.lastLinesRemoved,last_session_total_input_tokens:O.lastTotalInputTokens,last_session_total_output_tokens:O.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:O.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:O.lastTotalCacheReadInputTokens,last_session_fps_average:O.lastFpsAverage,last_session_fps_low_1_pct:O.lastFpsLow1Pct,last_session_id:O.lastSessionId,...O.lastSessionMetrics})}export{je as setup};
|
|
@@ -0,0 +1,9 @@
|
|
|
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-DfGsIjPm.js";import{E as p,K as m,O as re,U as h,l as g,p as _}from"./debug-otxXY3j-.js";import{n as v,t as ie}from"./bundledMode-kSQejuY4.js";import{i as y,o as ae}from"./platform-DYZVoA9J.js";import{n as oe,r as se}from"./execFileNoThrow-B_aZH_GP.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-BBRP_KzA.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(m(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((()=>{h(),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=>_(`[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=>_(`[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=re({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),_(`[Claude in Chrome] Installed native host manifest at: ${t}`),r=!0}catch(e){_(`[Claude in Chrome] Failed to install manifest at ${t}: ${e}`)}}y()===`windows`&&le(j(t[0],Q)),r&&Y().then(e=>{e?(_(`[Claude in Chrome] First-time install detected, opening reconnect page in browser`),w(X)):_(`[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?_(`[Claude in Chrome] Registered native host for ${n} in Windows registry: ${t}`):_(`[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
|
+
REM Chrome native host wrapper script
|
|
3
|
+
REM Generated by Claude Code - do not edit manually
|
|
4
|
+
${e}
|
|
5
|
+
`:`#!/bin/sh
|
|
6
|
+
# Chrome native host wrapper script
|
|
7
|
+
# Generated by Claude Code - do not edit manually
|
|
8
|
+
exec ${e}
|
|
9
|
+
`;return await P(i,`utf-8`).catch(()=>null)===a?i:(await N(r,{recursive:!0}),await I(i,a),t!==`windows`&&await M(i,493),_(`[Claude in Chrome] Created Chrome native host wrapper script: ${i}`),i)}function ue(){return Y().then(e=>{e&&d().cachedChromeExtensionInstalled!==e&&l(t=>({...t,cachedChromeExtensionInstalled:e}))}),d().cachedChromeExtensionInstalled??!1}async function Y(){let e=T();return e.length===0?(_(`[Claude in Chrome] Unsupported platform for extension detection: ${y()}`),!1):z(e,_)}var X,Z,Q,$,de=e((()=>{o(),te(),u(),ie(),b(),c(),g(),r(),se(),ae(),p(),C(),O(),U(),X=`https://clau.de/chrome/reconnect`,Z=`com.anthropic.claude_code_browser_extension`,Q=`${Z}.json`}));export{W as a,G as i,Y as n,K as r,de as t};
|
|
@@ -0,0 +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-Br5fGLLI.js";import{qn as o}from"./prompt-B8M-HLIS.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./chunk-DR8-3Aex.js";import{E as r,O as i}from"./debug-otxXY3j-.js";import{o as a,s as o}from"./log-DS97_rIr.js";var s=n(((e,t)=>{t.exports=function(e){return e.map(function(e){return e===``?`''`:e&&typeof e==`object`?e.op.replace(/(.)/g,`\\$1`):/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,`$1\\$2`)}).join(` `)}})),c=n(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r.push(i),t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function g(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function _(e,t,d){d||(d={});var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||(t={});var _=!1;return m.map(function(n){var i=n[0];if(!i||_)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return g(t,``,n)}for(m=0;m<i.length;m++){var v=i.charAt(m);if(p=p||!a&&(v===`*`||v===`?`),o)d+=v,o=!1;else if(a)v===a?a=!1:a==c?d+=v:v===f?(m+=1,v=i.charAt(m),v===l||v===f||v===u?d+=v:d+=f+v):v===u?d+=h():d+=v;else if(v===l||v===c)a=v;else if(r.test(v))return{op:i};else if(s.test(v)){_=!0;var y={comment:e.slice(n.index+m+1)};return d.length?[d,y]:[y]}else v===f?o=!0:v===u?d+=h():d+=v}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0?e:e.concat(t)},[])}t.exports=function(e,t,n){var r=_(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e.concat(t);var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?e.concat(n[0]):e.concat(n.filter(Boolean).map(function(e){return m.test(e)?JSON.parse(e.split(d)[1]):e}))},[]):r}})),l=n((e=>{e.quote=s(),e.parse=c()}));function u(e,t){try{return{success:!0,tokens:(0,h.parse)(e,t)}}catch(e){return e instanceof Error&&o(e),{success:!1,error:e instanceof Error?e.message:`Unknown parse error`}}}function d(e){try{return{success:!0,quoted:(0,h.quote)(e.map((e,t)=>{if(e==null)return String(e);let n=typeof e;if(n===`string`)return e;if(n===`number`||n===`boolean`)return String(e);throw Error(n===`object`?`Cannot quote argument at index ${t}: object values are not supported`:n===`symbol`?`Cannot quote argument at index ${t}: symbol values are not supported`:n===`function`?`Cannot quote argument at index ${t}: function values are not supported`:`Cannot quote argument at index ${t}: unsupported type ${n}`)}))}}catch(e){return e instanceof Error&&o(e),{success:!1,error:e instanceof Error?e.message:`Unknown quote error`}}}function f(e,t){let n=!1,r=!1,i=0,a=0;for(let t=0;t<e.length;t++){let o=e[t];if(o===`\\`&&!n){t++;continue}o===`"`&&!n?(i++,r=!r):o===`'`&&!r&&(a++,n=!n)}if(i%2!=0||a%2!=0)return!0;for(let e of t)if(typeof e==`string`&&((e.match(/{/g)||[]).length!==(e.match(/}/g)||[]).length||(e.match(/\(/g)||[]).length!==(e.match(/\)/g)||[]).length||(e.match(/\[/g)||[]).length!==(e.match(/\]/g)||[]).length||(e.match(/(?<!\\)"/g)||[]).length%2!=0||(e.match(/(?<!\\)'/g)||[]).length%2!=0))return!0;return!1}function p(e){let t=!1,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&!t){r++;continue}if(i===`"`&&!t){n=!n;continue}if(i===`'`&&!n&&(t=!t,!t)){let t=0,n=r-1;for(;n>=0&&e[n]===`\\`;)t++,n--;if(t>0&&t%2==1||t>0&&t%2==0&&e.indexOf(`'`,r+1)!==-1)return!0}}return!1}function m(e){let t=d([...e]);if(t.success)return t.quoted;try{return(0,h.quote)(e.map(e=>{if(e==null)return String(e);let t=typeof e;return t===`string`||t===`number`||t===`boolean`?String(e):i(e)}))}catch(e){throw e instanceof Error&&o(e),Error(`Failed to quote shell arguments safely`)}}var h,g=e((()=>{h=t(l(),1),a(),r()}));export{u as a,m as i,p as n,l as o,g as r,f as t};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Bl as t,Eo as n,Rl as r,Uo as i,ko as a}from"./loadAgentsDir-Br5fGLLI.js";import{B as o,P as s}from"./rcDebugLog-BoroyfjB.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:r}){let i=await t({promptMessages:[n({content:`<system-reminder>This is a side question from the user. You must answer this question directly in a single response.
|
|
2
|
+
|
|
3
|
+
IMPORTANT CONTEXT:
|
|
4
|
+
- You are a separate, lightweight agent spawned to answer this one question
|
|
5
|
+
- The main agent is NOT interrupted - it continues working independently in the background
|
|
6
|
+
- You share the conversation context but are a completely separate instance
|
|
7
|
+
- Do NOT reference being interrupted or what you were "previously doing" - that framing is incorrect
|
|
8
|
+
|
|
9
|
+
CRITICAL CONSTRAINTS:
|
|
10
|
+
- You have NO tools available - you cannot read files, run commands, search, or take any actions
|
|
11
|
+
- This is a one-off response - there will be no follow-up turns
|
|
12
|
+
- You can ONLY provide information based on what you already know from the conversation context
|
|
13
|
+
- NEVER say things like "Let me try...", "I'll now...", "Let me check...", or promise to take any action
|
|
14
|
+
- If you don't know the answer, say so - do not offer to look it up or investigate
|
|
15
|
+
|
|
16
|
+
Simply answer the question with the information you have.</system-reminder>
|
|
17
|
+
|
|
18
|
+
${e}`})],cacheSafeParams:r,canUseTool:async()=>({behavior:`deny`,message:`Side questions cannot use tools`,decisionReason:{type:`other`,reason:`side_question`}}),querySource:`side_question`,forkLabel:`side_question`,maxTurns:1,skipCacheWrite:!0});return{response:u(i.messages),usage:i.totalUsage}}function u(e){let t=e.flatMap(e=>e.type===`assistant`?e.message.content:[]);if(t.length>0){let e=a(t,`
|
|
19
|
+
|
|
20
|
+
`).trim();if(e)return e;let n=t.find(e=>e.type===`tool_use`);if(n)return`(The model tried to call ${`name`in n?n.name:`a tool`} instead of answering directly. Try rephrasing or ask in the main conversation.)`}let n=e.find(e=>e.type===`system`&&`subtype`in e&&e.subtype===`api_error`);return n?`(API error: ${o(n.error)})`:null}var d,f=e((()=>{s(),r(),i(),d=/^\/btw\b/gi}));export{f as n,l as r,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./sink-Dkat5kH9.js";t();export{e as initializeAnalyticsSink};
|
|
@@ -0,0 +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-DfGsIjPm.js";import{a as c,n as l,t as u}from"./analytics-DqMQntaB.js";import{i as d,t as f}from"./datadog-DPkKCR8M.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,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,O as a,Q as o,X as s,Y as c,Z as l,_ as u,h as d,l as f,p}from"./debug-otxXY3j-.js";import{o as m,r as h,t as g,v as _,y as v}from"./log-DS97_rIr.js";import{i as y,t as b}from"./sentry-C3sL9nhF.js";import{r as x,t as S}from"./sink-Dkat5kH9.js";import{dirname as C,join as w}from"path";t(),r(),s(),v(),l(),f(),u(),m(),i(),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=c(e);return{write(e){t.write(a(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{d().appendFileSync(e,t)}catch{d().mkdirSync(n),d().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:d().cwd(),userType:process.env.USER_TYPE,sessionId:n(),version:`2.7.0`};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(`,`)}] `}p(`${t.name}: ${r}${n}`,{level:`error`}),j(E(),{error:`${r}${n}`}),b(t)}function P(e,t){p(`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:d().cwd()};A(r).write(i)}function F(e,t){p(`MCP server "${e}": ${t}`);let r=D(e),i={debug:t,timestamp:new Date().toISOString(),sessionId:n(),cwd:d().cwd()};A(r).write(i)}function I(){g({logError:N,logMCPError:P,logMCPDebug:F,getErrorsPath:E,getMCPLogsPath:D}),p(`Error log sink initialized`)}S();function L(){I(),x()}export{L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./sinks--frMI4-5.js";export{e as initSinks};
|
|
@@ -0,0 +1,5 @@
|
|
|
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-BdOHsgc4.js";import{d as o,g as s,h as c,l,m as u,p as d,x as f}from"./runtimeObserver-DetZ5Tek.js";import{o as p,r as m}from"./observationStore-BaPq7CKI.js";import{c as h,o as g}from"./projectContext-CwJlxP2Y.js";import{t as _}from"./sessionObserver-CQxIKV8D.js";import{i as v,r as y}from"./skillGapStore-KzRf6Ezr.js";import{t as b}from"./skillLearning-CdcVIG14.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
|
+
`)}}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
|
+
`)}`:`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
|
+
`)}}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(`
|
|
5
|
+
`)}}default:return{type:`text`,value:`Usage: /skill-learning [status|ingest|evolve|export|import|prune|promote|projects]`}}}}))();export{w as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-DR8-3Aex.js";import{i as t,r as n}from"./chokidar-SzksMqYp.js";import{Ct as r,Fr as i,Pr as a,cn as o,et as s,g as c,jr as ee,lr as l,nr as u,tr as te}from"./state-sIHsFpDu.js";import{Br as ne,Pr as re}from"./paths-DfGsIjPm.js";import{Q as ie,Z as ae,_ as oe,h as se,l as d,p as f}from"./debug-otxXY3j-.js";import{n as p,r as ce}from"./analytics-DqMQntaB.js";import{n as le,t as m}from"./cwd--iizewsn.js";import{$k as h,$n as g,Am as ue,Cn as de,Co as fe,Di as _,Ed as pe,FE as me,Fc as he,Fr as ge,Gi as _e,IE as ve,Ic as ye,JE as be,Jk as v,Jm as y,Km as b,Ny as x,Ot as S,Pt as C,Rt as w,Tt as T,Uo as E,Wi as D,Xm as O,Ym as k,_i as A,ad as j,ai as M,bn as N,by as xe,gi as Se,i as P,jy as Ce,km as we,mh as F,na as Te,o as Ee,od as De,ph as Oe,qE as ke,r as Ae,wi as I,xd as je,yy as L}from"./loadAgentsDir-Br5fGLLI.js";import{Xt as Me}from"./prompt-B8M-HLIS.js";import{f as Ne,l as Pe,t as Fe}from"./commitAttribution-HP_CWP0X.js";import{F as Ie,P as Le}from"./teamHelpers-COQazluD.js";import{n as R,r as Re}from"./systemPromptSections-BcN_XBTx.js";import{r as ze}from"./asciicast-Dr_Div_R.js";import*as z from"path";import{dirname as Be}from"path";o(),Re(),we(),Ee(),Me(),be(),h(),Pe(),je(),le(),d(),x(),E(),re(),xe(),Oe(),ge(),Le(),ve(),S();function Ve(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=me().safeParse(i.todos);return a.success?a.data:[]}return[]}function He(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&Ce(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),e.attributionSnapshots&&e.attributionSnapshots.length>0&&Fe(e.attributionSnapshots,e=>{t(t=>({...t,attribution:e}))}),!Ie()&&e.messages&&e.messages.length>0){let n=Ve(e.messages);if(n.length>0){let e=r();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function Ue(e){if(e.attributionSnapshots&&e.attributionSnapshots.length>0)return Ne(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 u(void 0),{agentDefinition:void 0,agentType:void 0};let r=n.activeAgents.find(t=>t.agentType===e);return r?(u(r.agentType),!s()&&r.model&&r.model!==`inherit`&&te(ne(r.model)),{agentDefinition:r,agentType:r.agentType}):(f(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),u(void 0),{agentDefinition:void 0,agentType:void 0})}async function We(e,t,n,r){if(!e)return r;P.cache.clear?.();let i=await P(t),a=[...i.allAgents,...n];return{...i,allAgents:a,activeAgents:Ae(a)}}function H(e){let t=T();if(t){_(t);return}if(e){try{process.chdir(e.worktreePath)}catch{_(null);return}F(e.worktreePath),l(m()),C(e),v(),R(),L.cache.clear?.()}}function Ge(){let e=T();if(e){C(null),v(),R(),L.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}F(e.originalCwd),l(m())}}async function Ke(t,n,i){let a;if(a=i.modeApi?.matchSessionMode(t.mode),a&&t.messages.push(fe(a,`warning`)),n.forkSession)t.contentReplacements?.length&&await M(t.contentReplacements);else{let e=n.sessionIdOverride??t.sessionId;e&&(ee(ke(e),n.transcriptPath?Be(n.transcriptPath):null),await ze(),await Se(),ue(e))}if(A(n.forkSession?{...t,worktreeSession:void 0}:t),t.goal){let{hydrateGoalFromTranscript:i}=(De(),e(j)),a=new Map,o=n.sessionIdOverride??t.sessionId??r();a.set(o,t.goal),i(a,o)}n.forkSession||(H(t.worktreeSession),g());let{agentDefinition:o,agentType:s}=V(t.agentSetting,i.mainThreadAgentDefinition,i.agentDefinitions);I(i.modeApi?.isCoordinatorMode()?`coordinator`:`normal`);let c=n.includeAttribution?Ue(t):void 0,l=B(t.agentName,t.agentColor);pe(t.agentName);let u=await We(!!a,i.currentCwd,i.cliAgents,i.agentDefinitions);return{messages:t.messages,fileHistorySnapshots:t.fileHistorySnapshots,contentReplacements:t.contentReplacements,agentName:t.agentName,agentColor:t.agentColor===`default`?void 0:t.agentColor,restoredAgentDef:o,initialState:{...i.initialState,...s&&{agent:s},...c&&{attribution:c},...l&&{standaloneAgentContext:l},agentDefinitions:u}}}t(),o(),Te(),p(),k(),he(),ae(),d(),oe(),de(),i();var qe=1e3,Je=500,Ye=300,Xe=2e3,Ze=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=a(),Z=null;async function Qe(){if(K||q)return;K=!0,J||(J=!0,O(()=>{D(),X.emit()}));let e=await et();e.length!==0&&(f(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=n.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??qe,pollInterval:Z?.pollInterval??Je},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Ze,interval:Z?.chokidarInterval??Xe,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 $e=X.subscribe;async function et(){let e=se(),t=[],n=y(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=y(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=y(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=y(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of c()){let r=z.join(n,`.claude`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){f(`Detected skill change: ${e}`),ce(`tengu_skill_file_changed`,{source:`chokidar`}),tt(e)}function tt(e){G.add(e),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let e=[...G];if(G.clear(),N(await w(`skills`,e[0]))){f(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}b(),_e(),ye(),X.emit()},Z?.reloadDebounce??Ye)}async function nt(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var rt={initialize:Qe,dispose:Q,subscribe:$e,resetForTesting:nt};export{V as a,Ke as i,B as n,He as o,Ge as r,H as s,rt as t};
|
|
@@ -0,0 +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-KzRf6Ezr.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};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,r as n}from"./instinctParser-Bxhe2LOF.js";import{i as r,o as i,s as a}from"./skillGenerator-BdOHsgc4.js";import{a as o,c as s,n as c}from"./projectContext-CwJlxP2Y.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
|
+
## Promotion Rule
|
|
3
|
+
|
|
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--qEK1j9j.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};
|
|
@@ -0,0 +1,8 @@
|
|
|
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-CELyiWF6.js";import{l as a,u as o}from"./instinctParser-Bxhe2LOF.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
|
+
`)}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
|
+
`),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--qEK1j9j.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
|
+
`),``,`## Action`,``,i.map(e=>`- ${e.action}`).join(`
|
|
6
|
+
`),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,Z).join(`
|
|
7
|
+
`),``].join(`
|
|
8
|
+
`)}function oe(e){return e.split(`-`).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(` `)}var Y,X,Z,Q,$=e((()=>{n(),r(),S(),B(),Y=.8,X=20,Z=20,Q=5e4}));export{g as C,v as S,z as _,G as a,S as b,E as c,ne as d,T as f,D as g,w as h,V as i,O as l,B as m,U as n,$ as o,k as p,H as r,W as s,Y as t,C as u,A as v,y as x,_ as y};
|
|
@@ -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-BdOHsgc4.js";import{S as a,T as o,f as s,i as c,k as l,u}from"./runtimeObserver-DetZ5Tek.js";import{i as d}from"./observationStore-BaPq7CKI.js";import{a as f}from"./projectContext-CwJlxP2Y.js";import{a as p,c as m,d as h,i as g}from"./sessionObserver-CQxIKV8D.js";import{n as _}from"./toolEventObserver-i6it3p2_.js";import{n as v}from"./skillGapStore-KzRf6Ezr.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./featureCheck-Cm0YNDXO.js";import"./instinctParser-Bxhe2LOF.js";import"./skillGenerator-BdOHsgc4.js";import{p as e}from"./runtimeObserver-DetZ5Tek.js";import{o as t}from"./observationStore-BaPq7CKI.js";import{c as n}from"./projectContext-CwJlxP2Y.js";import"./sessionObserver-CQxIKV8D.js";import"./toolEventObserver-i6it3p2_.js";import"./skillGapStore-KzRf6Ezr.js";import{t as r}from"./skillLearning-CdcVIG14.js";r();export{e as loadInstincts,t as readObservations,n as resolveProjectContext};
|
|
@@ -0,0 +1,28 @@
|
|
|
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{sS as l,uS as u}from"./loadAgentsDir-Br5fGLLI.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-DXWMxSA2.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-BfVC8KK9.js`);t(),e.push(`Runtime observer: initialized`)}catch{e.push(`Runtime observer: init skipped (not available)`)}return e.join(`
|
|
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}){u(`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-2LV0yuwF.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(),l(),f(),y=c(),b=28,x=`# Skill Learning (自动学习)
|
|
5
|
+
|
|
6
|
+
Skill Learning 是一个闭环学习系统,通过观察用户的操作模式自动提取直觉(instinct),
|
|
7
|
+
并在达到阈值后生成可复用的 skill 文件、agent 和 command。
|
|
8
|
+
|
|
9
|
+
## 工作流程
|
|
10
|
+
1. **Observe** — 记录每轮对话中的工具调用、用户纠正、错误解决模式
|
|
11
|
+
2. **Analyze** — 使用启发式或 LLM 后端分析观察数据,提取 instinct candidate
|
|
12
|
+
3. **Evolve** — 将高置信度 instinct 聚类,生成 skill/agent/command 候选
|
|
13
|
+
4. **Lifecycle** — 对生成的 skill 进行去重、版本比较、归档或替换
|
|
14
|
+
|
|
15
|
+
## 子命令
|
|
16
|
+
- /skill-learning status — 查看当前项目的观察和直觉数量
|
|
17
|
+
- /skill-learning ingest — 从 transcript 导入观察数据
|
|
18
|
+
- /skill-learning evolve — 生成 skill 候选 (--generate 写入磁盘)
|
|
19
|
+
- /skill-learning export — 导出 instinct 为 JSON
|
|
20
|
+
- /skill-learning import — 导入 instinct JSON
|
|
21
|
+
- /skill-learning prune — 清理过期的 pending instinct
|
|
22
|
+
- /skill-learning promote — 将 instinct/gap 提升为全局范围
|
|
23
|
+
- /skill-learning projects — 列出所有已知的项目范围
|
|
24
|
+
|
|
25
|
+
## 启用方式
|
|
26
|
+
- SKILL_LEARNING_ENABLED=1 或 FEATURE_SKILL_LEARNING=1
|
|
27
|
+
- 状态: ${d()?`已启用`:`未启用`}
|
|
28
|
+
`}))();export{_ as call};
|
|
@@ -0,0 +1,21 @@
|
|
|
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{Xh as l,Zh as u,sS as d,uS as f}from"./loadAgentsDir-Br5fGLLI.js";function p(){return[`Skill Search (自动技能匹配)`,`Status: ${u()?`enabled`:`disabled`}`,``,`When enabled, relevant skills are automatically matched and`,`injected into conversation context each turn.`].join(`
|
|
2
|
+
`)}async function m(){if(u()&&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-DhZMcy5t.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
|
+
`)}async function h(){return u()?(process.env.SKILL_SEARCH_ENABLED=`0`,`Skill Search: disabled (SKILL_SEARCH_ENABLED=0)`):`Skill Search: already disabled`}function g({onDone:e}){f(`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(),d(),l(),y=c(),b=28,x=`# Skill Search (自动技能匹配)
|
|
4
|
+
|
|
5
|
+
Skill Search 控制对话中的自动技能匹配功能。
|
|
6
|
+
|
|
7
|
+
启用后,Claude Code 会在每轮对话中自动搜索并加载与当前任务最相关的 skill 文件,
|
|
8
|
+
无需手动指定。搜索基于 TF-IDF 向量余弦相似度,支持英文词干化和 CJK bi-gram 分词。
|
|
9
|
+
|
|
10
|
+
## 工作原理
|
|
11
|
+
1. 对话开始时,自动索引 .claude/skills/ 和 ~/.claude/skills/ 下的 Markdown 文件
|
|
12
|
+
2. 每轮对话根据上下文自动匹配最相关的 skill
|
|
13
|
+
3. 匹配到的 skill 内容会作为上下文注入,指导 Claude Code 的行为
|
|
14
|
+
|
|
15
|
+
## 控制方式
|
|
16
|
+
- /skill-search start — 启用自动匹配
|
|
17
|
+
- /skill-search stop — 禁用自动匹配
|
|
18
|
+
- /skill-search status — 查看当前状态
|
|
19
|
+
|
|
20
|
+
当前状态: ${u()?`已启用`:`未启用`}
|
|
21
|
+
`}))();export{_ as call};
|
|
@@ -0,0 +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-DfGsIjPm.js";import{b as p,x as m}from"./startupProfiler-CnDpob1v.js";import{DC as h,EC as g,Ym as _,ha as v,na as y,qm as b}from"./loadAgentsDir-Br5fGLLI.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:v(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)=>v(e).localeCompare(v(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)(g,{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}},h=(e,t)=>{let n=`~${p(b(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:v(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(`/${v(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)=>h(e,t)})}var T,E,D,O=e((()=>{n(),T=t(n(),1),y(),a(),_(),m(),f(),d(),h(),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};
|
|
@@ -0,0 +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-BlhNrZiL.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};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./defineProperty-80gRi2ZW.js";import{Cn as o,t as s}from"./src-Di342QoJ.js";import{Ct as ee,cn as c}from"./state-sIHsFpDu.js";import{A as te,E as ne,_ as l,h as re,l as ie,p as u}from"./debug-otxXY3j-.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{a as p,n as m,r as h,s as g}from"./intl-Pse97ORk.js";import{dirname as ae,join as _}from"path";function v(e,t){if(o(e)<=t)return e;if(t<=0)return`…`;if(t<5)return y(e,t);let n=e.lastIndexOf(`/`),r=n>=0?e.slice(n):e,i=n>=0?e.slice(0,n):``,a=o(r);if(a>=t-1)return b(e,t);let s=t-1-a;return s<=0?b(r,t):x(i,s)+`…`+r}function y(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=0,r=``;for(let{segment:i}of m().segment(e)){let e=o(i);if(n+e>t-1)break;r+=i,n+=e}return r+`…`}function b(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=[...m().segment(e)],r=0,i=n.length;for(let e=n.length-1;e>=0;e--){let a=o(n[e].segment);if(r+a>t-1)break;r+=a,i=e}return`…`+n.slice(i).map(e=>e.segment).join(``)}function x(e,t){if(o(e)<=t)return e;if(t<=0)return``;let n=0,r=``;for(let{segment:i}of m().segment(e)){let e=o(i);if(n+e>t)break;r+=i,n+=e}return r}function S(e,t,n=!1){if(e==null)return``;let r=e;if(n){let n=e.indexOf(`
|
|
2
|
+
`);if(n!==-1)return r=e.substring(0,n),o(r)+1>t?y(r,t):`${r}…`}return o(r)<=t?r:y(r,t)}var C=e((()=>{s(),g()}));function w(e){let t=e/1024;if(t<1)return`${e} bytes`;if(t<1024)return`${t.toFixed(1).replace(/\.0$/,``)}KB`;let n=t/1024;return n<1024?`${n.toFixed(1).replace(/\.0$/,``)}MB`:`${(n/1024).toFixed(1).replace(/\.0$/,``)}GB`}function T(e){return`${(e/1e3).toFixed(1)}s`}function E(e,t){if(e<6e4)return e===0?`0s`:e<1?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/1e3).toString()}s`;let n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4),a=Math.round(e%6e4/1e3);a===60&&(a=0,i++),i===60&&(i=0,r++),r===24&&(r=0,n++);let o=t?.hideTrailingZeros;return t?.mostSignificantOnly?n>0?`${n}d`:r>0?`${r}h`:i>0?`${i}m`:`${a}s`:n>0?o&&r===0&&i===0?`${n}d`:o&&i===0?`${n}d ${r}h`:`${n}d ${r}h ${i}m`:r>0?o&&i===0&&a===0?`${r}h`:o&&a===0?`${r}h ${i}m`:`${r}h ${i}m ${a}s`:i>0?o&&a===0?`${i}m`:`${i}m ${a}s`:`${a}s`}function D(e){return P(e>=1e3).format(e).toLowerCase()}function O(e){return D(e).replace(`.0`,``)}function k(e,t={}){let{style:n=`narrow`,numeric:r=`always`,now:i=new Date}=t,a=e.getTime()-i.getTime(),o=Math.trunc(a/1e3);for(let{unit:e,seconds:t,shortUnit:i}of[{unit:`year`,seconds:31536e3,shortUnit:`y`},{unit:`month`,seconds:2592e3,shortUnit:`mo`},{unit:`week`,seconds:604800,shortUnit:`w`},{unit:`day`,seconds:86400,shortUnit:`d`},{unit:`hour`,seconds:3600,shortUnit:`h`},{unit:`minute`,seconds:60,shortUnit:`m`},{unit:`second`,seconds:1,shortUnit:`s`}])if(Math.abs(o)>=t){let a=Math.trunc(o/t);return n===`narrow`?o<0?`${Math.abs(a)}${i} ago`:`in ${a}${i}`:h(`long`,r).format(a,e)}return n===`narrow`?o<=0?`0s ago`:`in 0s`:h(n,r).format(0,`second`)}function A(e,t={}){let{now:n=new Date,...r}=t;return e>n?k(e,{...r,now:n}):k(e,{...r,numeric:`always`,now:n})}function oe(e){let t=e.fileSize===void 0?`${e.messageCount} messages`:w(e.fileSize),n=[A(e.modified,{style:`short`}),...e.gitBranch?[e.gitBranch]:[],t];return e.tag&&n.push(`#${e.tag}`),e.agentSetting&&n.push(`@${e.agentSetting}`),e.prNumber&&n.push(e.prRepository?`${e.prRepository}#${e.prNumber}`:`#${e.prNumber}`),n.join(` · `)}function j(e,t=!1,n=!0){if(!e)return;let r=new Date(e*1e3),i=new Date,a=r.getMinutes();if((r.getTime()-i.getTime())/(1e3*60*60)>24){let e={month:`short`,day:`numeric`,hour:n?`numeric`:void 0,minute:!n||a===0?void 0:`2-digit`,hour12:n?!0:void 0};return r.getFullYear()!==i.getFullYear()&&(e.year=`numeric`),r.toLocaleString(`en-US`,e).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${p()})`:``)}return r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:a===0?void 0:`2-digit`,hour12:!0}).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${p()})`:``)}function se(e,t=!1,n=!0){let r=new Date(e);return`${j(Math.floor(r.getTime()/1e3),t,n)}`}var M,N,P,F=e((()=>{g(),C(),M=null,N=null,P=e=>e?(M||(M=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:1})),M):(N||(N=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:0})),N)}));function I(){return B}function L(e){return e.toFixed(3)}function R(e,t,n,r,i,a,o=``){let s=r?` | RSS: ${w(r.rss)}, Heap: ${w(r.heapUsed)}`:``;return`[+${L(e).padStart(i)}ms] (+${L(t).padStart(a)}ms) ${n}${o}${s}`}var z,B,V=e((()=>{F(),i(),z=class{constructor(){a(this,`marks`,new Map),a(this,`_origin`,void 0),this._origin=Number(process.hrtime.bigint()/1000n)/1e3}mark(e){this.marks.set(e,this.now())}getEntriesByType(e){if(e!==`mark`)return[];let t=[];for(let[e,n]of this.marks)t.push({name:e,startTime:n,entryType:`mark`});return t}clearMarks(e){e===void 0?this.marks.clear():this.marks.delete(e)}now(){return Number(process.hrtime.bigint()/1000n)/1e3-this._origin}},B=new z}));function H(e){X&&(I().mark(e),J&&Z.push(process.memoryUsage()))}function U(){if(!J)return`Startup profiling not enabled`;let e=I().getEntriesByType(`mark`);if(e.length===0)return`No profiling checkpoints recorded`;let t=[];t.push(`=`.repeat(80)),t.push(`STARTUP PROFILING REPORT`),t.push(`=`.repeat(80)),t.push(``);let n=0;for(let[r,i]of e.entries())t.push(R(i.startTime,i.startTime-n,i.name,Z[r],8,7)),n=i.startTime;let r=e[e.length-1];return t.push(``),t.push(`Total startup time: ${L(r?.startTime??0)}ms`),t.push(`=`.repeat(80)),t.join(`
|
|
3
|
+
`)}function W(){if(!$){if($=!0,q(),J){let e=K(),t=ae(e);re().mkdirSync(t),te(e,U(),{encoding:`utf8`,flush:!0}),u(`Startup profiling report:`),u(U())}I().clearMarks(),Z.length=0}}function G(){return J}function K(){return _(t(),`startup-perf`,`${ee()}.txt`)}function q(){if(!Y)return;let e=I().getEntriesByType(`mark`);if(e.length===0)return;let t=new Map;for(let n of e)t.set(n.name,n.startTime);let n={};for(let[e,[r,i]]of Object.entries(Q)){let a=t.get(r),o=t.get(i);a!==void 0&&o!==void 0&&(n[`${e}_ms`]=Math.round(o-a))}n.checkpoint_count=e.length,f(`tengu_startup_perf`,n)}var J,Y,X,Z,Q,$,ce=e((()=>{c(),d(),ie(),n(),l(),V(),ne(),J=r(process.env.CLAUDE_CODE_PROFILE_STARTUP),Y=process.env.USER_TYPE===`ant`||Math.random()<.005,X=J||Y,Z=[],Q={import_time:[`cli_entry`,`main_tsx_imports_loaded`],init_time:[`init_function_start`,`init_function_end`],settings_time:[`eagerLoadSettings_start`,`eagerLoadSettings_end`],total_time:[`cli_entry`,`main_after_run`]},X&&H(`profiler_initialized`),$=!1}));export{S as C,x as D,y as E,C as S,b as T,se as _,H as a,O as b,R as c,E as d,w as f,A as g,k as h,q as i,I as l,D as m,ce as n,W as o,oe as p,G as r,L as s,K as t,V as u,j as v,v as w,F as x,T as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t}from"./startupProfiler-CnDpob1v.js";t();export{e as profileCheckpoint};
|
|
@@ -0,0 +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-DfGsIjPm.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};
|
|
@@ -0,0 +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-DiXc-_IG.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Xc as t,Yc as n}from"./loadAgentsDir-Br5fGLLI.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,n)=>e+t(`${n.agentType}: ${n.whenToUse}`),0):0}var i,a=e((()=>{n(),i=15e3}));export{r as n,a as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./browser-DwnUS505.js";async function r(){let e=`https://www.stickermule.com/claudecode`;return await t(e)?{type:`text`,value:`Opening sticker page in browser…`}:{type:`text`,value:`Failed to open browser. Visit: ${e}`}}e((()=>{n()}))();export{r as call};
|
|
@@ -0,0 +1,11 @@
|
|
|
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-DS97_rIr.js";import{Ar as _,Fr as v,Ti as y,aS as b,oS as x,yr as S}from"./loadAgentsDir-Br5fGLLI.js";import{r as C,t as w}from"./sanitization-DD414_3t.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)(b,{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=S(e);r===s?(p(`tengu_tag_command_remove_prompt`,{}),i(!0)):(p(`tengu_tag_command_add`,{is_replacing:!!r}),(async()=>{await y(e,s,_()),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 y(a,``,_()),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
|
+
|
|
3
|
+
Toggle a searchable tag on the current session.
|
|
4
|
+
Run the same command again to remove the tag.
|
|
5
|
+
Tags are displayed after the branch name in /resume and can be searched with /.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
/tag bugfix # Add tag
|
|
9
|
+
/tag bugfix # Remove tag (toggle)
|
|
10
|
+
/tag feature-auth
|
|
11
|
+
/tag wip`,{display:`system`})},[e]),null}async function O(e,t,n){return n=n?.trim()||``,g.includes(n)||m.includes(n)||!n?(0,A.jsx)(D,{onDone:e}):(0,A.jsx)(E,{tagName:n,onDone:e})}var k,A;e((()=>{r(),k=t(i(),1),d(),x(),s(),h(),f(),w(),v(),A=l()}))();export{O as call};
|
|
@@ -0,0 +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-RtEwbumC.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,n,s as r,u as i}from"./envUtils-BWeoiL4Y.js";import{In as a,Ln as o,Mn as s,Tt as c,Xn as l,vt as ee,wn as te}from"./schemas-BGAvj1T4.js";import{t as u}from"./v4-f1i_CNUT.js";import{Ct as ne,Fr as re,Pr as ie,U as ae,cn as oe,xt as d}from"./state-sIHsFpDu.js";import{B as f,D as p,E as m,O as h,U as g,l as se,p as _,z as v}from"./debug-otxXY3j-.js";import{_ as ce,v as le}from"./git-DayFjsvj.js";import{o as ue,s as y}from"./log-DS97_rIr.js";import{n as de,r as fe}from"./execFileNoThrow-B_aZH_GP.js";import{E as b,T as pe,_ as me,a as x,f as he,g as ge,l as S,n as _e}from"./teammate-DMYOtLTK.js";import{n as C,t as w}from"./lazySchema-2sOku3cX.js";import{c as ve}from"./constants-41VpZw2G.js";import{join as T}from"path";import{mkdirSync as ye,readFileSync as be,writeFileSync as xe}from"fs";import{mkdir as Se,readFile as E,readdir as D,rm as O,unlink as k,writeFile as A}from"fs/promises";function Ce(e){G!==e&&(G=e,j())}function we(){G!==void 0&&(G=void 0,j())}function j(){try{W.emit()}catch{}}function M(e){return T(F(e),Be)}async function N(e){let t=M(e);try{let e=(await E(t,`utf-8`)).trim(),n=parseInt(e,10);return isNaN(n)?0:n}catch{return 0}}async function Te(e,t){await A(M(e),String(t))}function Ee(){return i(process.env.CLAUDE_CODE_ENABLE_TASKS)?!0:!ae()}async function De(e){let t=F(e),n=await U(e),r;try{r=await b(n,q);let i=await R(e);i>0&&i>await N(e)&&await Te(e,i);let a;try{a=await D(t)}catch{a=[]}for(let e of a)if(e.endsWith(`.json`)&&!e.startsWith(`.`)){let n=T(t,e);try{await k(n)}catch{}}j()}finally{r&&await r()}}function Oe(){if(process.env.CLAUDE_CODE_TASK_LIST_ID)return process.env.CLAUDE_CODE_TASK_LIST_ID;let e=ge();return e?e.teamName:x()||G||ne()}function P(e){return e.replace(/[^a-zA-Z0-9_-]/g,`-`)}function F(e){return T(n(),`tasks`,P(e))}function I(e,t){return T(F(e),`${P(t)}.json`)}async function L(e){let t=F(e);try{await Se(t,{recursive:!0})}catch{}}async function R(e){let t=F(e),n;try{n=await D(t)}catch{return 0}let r=0;for(let e of n){if(!e.endsWith(`.json`))continue;let t=parseInt(e.replace(`.json`,``),10);!isNaN(t)&&t>r&&(r=t)}return r}async function ke(e){let[t,n]=await Promise.all([R(e),N(e)]);return Math.max(t,n)}async function Ae(e,t){let n=await U(e),r;try{r=await b(n,q);let i=await ke(e),a=String(i+1),o={id:a,...t};return await A(I(e,a),h(o,null,2)),j(),a}finally{r&&await r()}}async function z(e,t){let n=I(e,t);try{let e=p(await E(n,`utf-8`));process.env.USER_TYPE===`ant`&&(e.status===`open`?e.status=`pending`:e.status===`resolved`?e.status=`completed`:e.status&&[`planning`,`implementing`,`reviewing`,`verifying`].includes(e.status)&&(e.status=`in_progress`));let r=ze().safeParse(e);return r.success?r.data:(_(`[Tasks] Task ${t} failed schema validation: ${r.error.message}`),null)}catch(e){return f(e)===`ENOENT`?null:(_(`[Tasks] Failed to read task ${t}: ${v(e)}`),y(e),null)}}async function B(e,t,n){let r=await z(e,t);if(!r)return null;let i={...r,...n,id:t};return await A(I(e,t),h(i,null,2)),j(),i}async function V(e,t,n){let r=I(e,t);if(!await z(e,t))return null;let i;try{return i=await b(r,q),await B(e,t,n)}finally{await i?.()}}async function je(e,t){let n=I(e,t);try{let r=parseInt(t,10);isNaN(r)||r>await N(e)&&await Te(e,r);try{await k(n)}catch(e){if(f(e)===`ENOENT`)return!1;throw e}let i=await H(e);for(let n of i){let r=n.blocks.filter(e=>e!==t),i=n.blockedBy.filter(e=>e!==t);(r.length!==n.blocks.length||i.length!==n.blockedBy.length)&&await V(e,n.id,{blocks:r,blockedBy:i})}return j(),!0}catch{return!1}}async function H(e){let t=F(e),n;try{n=await D(t)}catch{return[]}let r=n.filter(e=>e.endsWith(`.json`)).map(e=>e.replace(`.json`,``));return(await Promise.all(r.map(t=>z(e,t)))).filter(e=>e!==null)}async function Me(e,t,n){let[r,i]=await Promise.all([z(e,t),z(e,n)]);return!r||!i?!1:(r.blocks.includes(n)||await V(e,t,{blocks:[...r.blocks,n]}),i.blockedBy.includes(t)||await V(e,n,{blockedBy:[...i.blockedBy,t]}),!0)}function Ne(e){return T(F(e),`.lock`)}async function U(e){await L(e);let t=Ne(e);try{await A(t,``,{flag:`wx`})}catch{}return t}async function Pe(e,t,n,r={}){let i=I(e,t);if(!await z(e,t))return{success:!1,reason:`task_not_found`};if(r.checkAgentBusy)return Fe(e,t,n);let a;try{a=await b(i,q);let r=await z(e,t);if(!r)return{success:!1,reason:`task_not_found`};if(r.owner&&r.owner!==n)return{success:!1,reason:`already_claimed`,task:r};if(r.status===`completed`)return{success:!1,reason:`already_resolved`,task:r};let o=await H(e),s=new Set(o.filter(e=>e.status!==`completed`).map(e=>e.id)),c=r.blockedBy.filter(e=>s.has(e));return c.length>0?{success:!1,reason:`blocked`,task:r,blockedByTasks:c}:{success:!0,task:await B(e,t,{owner:n})}}catch(e){return _(`[Tasks] Failed to claim task ${t}: ${v(e)}`),y(e),{success:!1,reason:`task_not_found`}}finally{a&&await a()}}async function Fe(e,t,n){let r=await U(e),i;try{i=await b(r,q);let a=await H(e),o=a.find(e=>e.id===t);if(!o)return{success:!1,reason:`task_not_found`};if(o.owner&&o.owner!==n)return{success:!1,reason:`already_claimed`,task:o};if(o.status===`completed`)return{success:!1,reason:`already_resolved`,task:o};let s=new Set(a.filter(e=>e.status!==`completed`).map(e=>e.id)),c=o.blockedBy.filter(e=>s.has(e));if(c.length>0)return{success:!1,reason:`blocked`,task:o,blockedByTasks:c};let l=a.filter(e=>e.status!==`completed`&&e.owner===n&&e.id!==t);return l.length>0?{success:!1,reason:`agent_busy`,task:o,busyWithTasks:l.map(e=>e.id)}:{success:!0,task:await V(e,t,{owner:n})}}catch(e){return _(`[Tasks] Failed to claim task ${t} with busy check: ${v(e)}`),y(e),{success:!1,reason:`task_not_found`}}finally{i&&await i()}}async function Ie(e,t,n,r){let i=(await H(e)).filter(e=>e.status!==`completed`&&(e.owner===t||e.owner===n));for(let t of i)await V(e,t.id,{owner:void 0,status:`pending`});i.length>0&&_(`[Tasks] Unassigned ${i.length} task(s) from ${n}`);let a=`${n} ${r===`terminated`?`was terminated`:`has shut down`}.`;if(i.length>0){let e=i.map(e=>`#${e.id} "${e.subject}"`).join(`, `);a+=` ${i.length} task(s) were unassigned: ${e}. Use TaskList to check availability and TaskUpdate with owner to reassign them to idle teammates.`}return{unassignedTasks:i.map(e=>({id:e.id,subject:e.subject})),notificationMessage:a}}var W,G,Le,Re,K,ze,Be,q,Ve,He=e((()=>{u(),oe(),se(),r(),g(),w(),pe(),ue(),re(),m(),S(),me(),W=ie(),Le=W.subscribe,Re=[`pending`,`in_progress`,`completed`],K=C(()=>ee([`pending`,`in_progress`,`completed`])),ze=C(()=>te({id:o(),subject:o(),description:o(),activeForm:o().optional(),owner:o().optional(),status:K(),blocks:c(o()),blockedBy:c(o()),metadata:s(o(),l()).optional()})),Be=`.highwatermark`,q={retries:{retries:30,minTimeout:5,maxTimeout:100}},Ve=`tasklist`}));function J(e){return e===`tmux`||e===`iterm2`||e===`windows-terminal`}var Ue=e((()=>{}));function Y(e){return e.replace(/[^a-zA-Z0-9]/g,`-`).toLowerCase()}function We(e){return e.replace(/@/g,`-`)}function X(e){return T(t(),Y(e))}function Z(e){return T(X(e),`config.json`)}function Q(e){try{return p(be(Z(e),`utf-8`))}catch(t){return f(t)===`ENOENT`||_(`[TeammateTool] Failed to read team file for ${e}: ${v(t)}`),null}}async function Ge(e){try{return p(await E(Z(e),`utf-8`))}catch(t){return f(t)===`ENOENT`||_(`[TeammateTool] Failed to read team file for ${e}: ${v(t)}`),null}}function $(e,t){ye(X(e),{recursive:!0}),xe(Z(e),h(t,null,2))}async function Ke(e,t){await Se(X(e),{recursive:!0}),await A(Z(e),h(t,null,2))}function qe(e,t){let n=t.agentId||t.name;if(!n)return _(`[TeammateTool] removeTeammateFromTeamFile called with no identifier`),!1;let r=Q(e);if(!r)return _(`[TeammateTool] Cannot remove teammate ${n}: failed to read team file for "${e}"`),!1;let i=r.members.length;return r.members=r.members.filter(e=>!(t.agentId&&e.agentId===t.agentId||t.name&&e.name===t.name)),r.members.length===i?(_(`[TeammateTool] Teammate ${n} not found in team file for "${e}"`),!1):($(e,r),_(`[TeammateTool] Removed teammate from team file: ${n}`),!0)}function Je(e,t){let n=Q(e);if(!n)return!1;let r=n.members.findIndex(e=>e.tmuxPaneId===t);if(r===-1)return!1;if(n.members.splice(r,1),n.hiddenPaneIds){let e=n.hiddenPaneIds.indexOf(t);e!==-1&&n.hiddenPaneIds.splice(e,1)}return $(e,n),_(`[TeammateTool] Removed member with pane ${t} from team ${e}`),!0}function Ye(e,t){let n=Q(e);if(!n)return!1;let r=n.members.findIndex(e=>e.agentId===t);return r===-1?!1:(n.members.splice(r,1),$(e,n),_(`[TeammateTool] Removed member ${t} from team ${e}`),!0)}function Xe(e,t,n){let r=Q(e);if(!r)return!1;let i=r.members.find(e=>e.name===t);if(!i)return _(`[TeammateTool] Cannot set member mode: member ${t} not found in team ${e}`),!1;if(i.mode===n)return!0;let a=r.members.map(e=>e.name===t?{...e,mode:n}:e);return $(e,{...r,members:a}),_(`[TeammateTool] Set member ${t} in team ${e} to mode: ${n}`),!0}function Ze(e,t){if(!he())return;let n=t??x(),r=_e();n&&r&&Xe(n,r,e)}function Qe(e,t){let n=Q(e);if(!n)return!1;let r=new Map(t.map(e=>[e.memberName,e.mode])),i=!1,a=n.members.map(e=>{let t=r.get(e.name);return t!==void 0&&e.mode!==t?(i=!0,{...e,mode:t}):e});return i&&($(e,{...n,members:a}),_(`[TeammateTool] Set ${t.length} member modes in team ${e}`)),!0}async function $e(e,t,n){let r=await Ge(e);if(!r){_(`[TeammateTool] Cannot set member active: team ${e} not found`);return}let i=r.members.find(e=>e.name===t);if(!i){_(`[TeammateTool] Cannot set member active: member ${t} not found in team ${e}`);return}i.isActive!==n&&(i.isActive=n,await Ke(e,r),_(`[TeammateTool] Set member ${t} in team ${e} to ${n?`active`:`idle`}`))}async function et(e){let t=T(e,`.git`),n=null;try{let e=(await E(t,`utf-8`)).trim().match(/^gitdir:\s*(.+)$/);if(e&&e[1]){let t=e[1];n=T(T(t,`..`,`..`),`..`)}}catch{}if(n){let t=await de(ce(),[`worktree`,`remove`,`--force`,e],{cwd:n});if(t.code===0){_(`[TeammateTool] Removed worktree via git: ${e}`);return}if(t.stderr?.includes(`not a working tree`)){_(`[TeammateTool] Worktree already removed: ${e}`);return}_(`[TeammateTool] git worktree remove failed, falling back to rm: ${t.stderr}`)}try{await O(e,{recursive:!0,force:!0}),_(`[TeammateTool] Removed worktree directory manually: ${e}`)}catch(t){_(`[TeammateTool] Failed to remove worktree ${e}: ${v(t)}`)}}function tt(e){d().add(e)}function nt(e){d().delete(e)}async function rt(){let e=d();if(e.size===0)return;let t=Array.from(e);_(`cleanupSessionTeams: removing ${t.length} orphan team dir(s): ${t.join(`, `)}`),await Promise.allSettled(t.map(e=>it(e))),await Promise.allSettled(t.map(e=>at(e))),e.clear()}async function it(e){let t=Q(e);if(!t)return;let n=t.members.filter(e=>e.name!==`team-lead`&&e.tmuxPaneId&&e.backendType&&J(e.backendType));if(n.length===0)return;let[{ensureBackendsRegistered:r,getBackendByType:i},{isInsideTmux:a}]=await Promise.all([import(`./registry-q6v98JYd.js`),import(`./detection-DrdKrqbQ.js`)]);await r();let o=!await a();await Promise.allSettled(n.map(async e=>{if(!e.tmuxPaneId||!e.backendType||!J(e.backendType))return;let t=await i(e.backendType).killPane(e.tmuxPaneId,o);_(`cleanupSessionTeams: killPane ${e.name} (${e.backendType} ${e.tmuxPaneId}) → ${t}`)}))}async function at(e){let t=Y(e),n=Q(e),r=[];if(n)for(let e of n.members)e.worktreePath&&r.push(e.worktreePath);for(let e of r)await et(e);let i=X(e);try{await O(i,{recursive:!0,force:!0}),_(`[TeammateTool] Cleaned up team directory: ${i}`)}catch(e){_(`[TeammateTool] Failed to clean up team directory ${i}: ${v(e)}`)}let a=F(t);try{await O(a,{recursive:!0,force:!0}),_(`[TeammateTool] Cleaned up tasks directory: ${a}`),j()}catch(e){_(`[TeammateTool] Failed to clean up tasks directory ${a}: ${v(e)}`)}}var ot=e((()=>{u(),oe(),se(),r(),g(),fe(),le(),w(),m(),He(),S(),Ue(),ve(),C(()=>a({operation:ee([`spawnTeam`,`cleanup`]).describe(`Operation: spawnTeam to create a team, cleanup to remove team and task directories.`),agent_type:o().optional().describe(`Type/role of the team lead (e.g., "researcher", "test-runner"). Used for team file and inter-agent coordination.`),team_name:o().optional().describe(`Name for the new team to create (required for spawnTeam).`),description:o().optional().describe(`Team description/purpose (only used with spawnTeam).`)}))}));export{L as A,Ce as B,Re as C,we as D,Pe as E,Ee as F,V as H,H as I,Le as L,Oe as M,F as N,Ae as O,He as P,De as R,Ve as S,Me as T,Ie as V,Ze as _,ot as a,Ue as b,tt as c,qe as d,We as f,Qe as g,Xe as h,Z as i,z as j,je as k,Ye as l,$e as m,at as n,Q as o,Y as p,X as r,Ge as s,rt as t,Je as u,nt as v,K as w,J as x,Ke as y,P as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./teamHelpers-COQazluD.js";e();export{t as cleanupSessionTeams};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./teammateModeSnapshot-BV-P8s5r.js";e();export{t as captureTeammateModeSnapshot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{Ac as n,Sc as r}from"./paths-DfGsIjPm.js";import{l as i,p as a}from"./debug-otxXY3j-.js";import{o,s}from"./log-DS97_rIr.js";var c=t({captureTeammateModeSnapshot:()=>f,clearCliTeammateModeOverride:()=>d,getCliTeammateModeOverride:()=>u,getTeammateModeFromSnapshot:()=>p,setCliTeammateModeOverride:()=>l});function l(e){h=e}function u(){return h}function d(e){h=null,m=e,a(`[TeammateModeSnapshot] CLI override cleared, new mode: ${e}`)}function f(){h?(m=h,a(`[TeammateModeSnapshot] Captured from CLI override: ${m}`)):(m=r().teammateMode??`auto`,a(`[TeammateModeSnapshot] Captured from config: ${m}`))}function p(){return m===null&&(s(Error(`getTeammateModeFromSnapshot called before capture - this indicates an initialization bug`)),f()),m??`auto`}var m,h,g=e((()=>{n(),i(),o(),m=null,h=null}));export{g as a,p as i,d as n,l as o,u as r,c as s,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fv as e,Hv as t,Lv as n,Pv as r,zv as i}from"./loadAgentsDir-Br5fGLLI.js";e();export{r as checkOutTeleportedSessionBranch,n as processMessagesForTeleportResume,i as teleportResumeCodeSession,t as validateGitState};
|