claude-code-best 2.5.0 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-BYyM_V0q.js +1 -0
- package/dist/chunks/App-BboadKdn.js +1 -0
- package/dist/chunks/ApproveApiKey-BLp4742y.js +1 -0
- package/dist/chunks/ApproveApiKey-DiEe4eui.js +1 -0
- package/dist/chunks/AssistantSessionChooser-B88DM0Oq.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-ByraVuXh.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-BDvmz12S.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-B6XNhFqq.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BNhlq7_K.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +1 -0
- package/dist/chunks/DesktopHandoff-S-w4bs5T.js +1 -0
- package/dist/chunks/DevChannelsDialog-BljR0X9X.js +1 -0
- package/dist/chunks/Dialog-DYFGqyDs.js +1 -0
- package/dist/chunks/DiffDialog-BhQ2QaLW.js +3 -0
- package/dist/chunks/Doctor-BXb0qv6n.js +3 -0
- package/dist/chunks/Doctor-C5DYPEGl.js +1 -0
- package/dist/chunks/ExitFlow-CSBDxw9H.js +2 -0
- package/dist/chunks/Feedback-DwHzc4UT.js +2 -0
- package/dist/chunks/Grove-DSXRnXKv.js +11 -0
- package/dist/chunks/Grove-DnTo982-.js +1 -0
- package/dist/chunks/HybridTransport-CuT3KI5e.js +4 -0
- package/dist/chunks/ITermBackend-mokGZVH_.js +1 -0
- package/dist/chunks/InProcessTransport-DB52dh4f.js +1 -0
- package/dist/chunks/InvalidConfigDialog-Bi4RKYlk.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-0zKo4-so.js +1 -0
- package/dist/chunks/ListItem-OFARanN7.js +1 -0
- package/dist/chunks/MCPConnectionManager-DYGoS1Ht.js +1 -0
- package/dist/chunks/McpParsingWarnings-EzgsOoHw.js +1 -0
- package/dist/chunks/MessageSelector-DTmUuEKJ.js +3 -0
- package/dist/chunks/Messages-DWiKTx5o.js +11 -0
- package/dist/chunks/Onboarding-odmthwzz.js +1 -0
- package/dist/chunks/OverageCreditUpsell-Cpk_5Lv0.js +1 -0
- package/dist/chunks/PermissionDialog-5MlJf7ew.js +1 -0
- package/dist/chunks/PluginSettings-eYcWehI8.js +17 -0
- package/dist/chunks/PressEnterToContinue-BdA9zDGs.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-DrrkNOuS.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-DMsF4D6d.js +1 -0
- package/dist/chunks/QueryEngine-C_KZts4y.js +1 -0
- package/dist/chunks/REPL-C6YR0VKU.js +1 -0
- package/dist/chunks/REPL-DzHz-LOY.js +97 -0
- package/dist/chunks/RemoteCallout-CnpCWRPk.js +1 -0
- package/dist/chunks/RemoteSessionManager-OWg_Yccq.js +2 -0
- package/dist/chunks/ResumeConversation-BktSnsCm.js +1 -0
- package/dist/chunks/SSETransport-BpnapvlK.js +4 -0
- package/dist/chunks/SearchBox-DfOmUoaI.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +1 -0
- package/dist/chunks/SentryErrorBoundary-C-NlfQZw.js +2 -0
- package/dist/chunks/Settings-vfFvcweR.js +2 -0
- package/dist/chunks/TeleportProgress-CYXay2ZL.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-_zbZTvcJ.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-DiHQeZIM.js +1 -0
- package/dist/chunks/ThemePicker-BRh027fA.js +1 -0
- package/dist/chunks/TmuxBackend-BaX2U7iZ.js +9 -0
- package/dist/chunks/TrustDialog-CVbzrv6g.js +1 -0
- package/dist/chunks/TungstenTool-C5IqKVr0.js +1 -0
- package/dist/chunks/TungstenTool-V-Bwqlx3.js +1 -0
- package/dist/chunks/ValidationErrorsList-CdCUgfIl.js +2 -0
- package/dist/chunks/WelcomeV2-DCXcYd2x.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BE9NX5IH.js +2 -0
- package/dist/chunks/add-dir-ldGd3Ppz.js +1 -0
- package/dist/chunks/agentDisplay-CVnAeURF.js +1 -0
- package/dist/chunks/agents-C08NzRZx.js +2 -0
- package/dist/chunks/agents-DH5fmbVw.js +103 -0
- package/dist/chunks/ajv-B_OpU_Uh.js +8 -0
- package/dist/chunks/analytics-DqMQntaB.js +1 -0
- package/dist/chunks/ant-DJren1Aa.js +1 -0
- package/dist/chunks/api-6tcwJlf_.js +1 -0
- package/dist/chunks/api-CGOR_Xfl.js +1 -0
- package/dist/chunks/asciicast-aoKFhc7C.js +1 -0
- package/dist/chunks/asciicast-o5Zg4dJt.js +4 -0
- package/dist/chunks/assistant-BlzrMSkM.js +1 -0
- package/dist/chunks/assistant-CwbhlCM-.js +1 -0
- package/dist/chunks/assistant-aWkDcurV.js +1 -0
- package/dist/chunks/attributionHooks-PygdohOh.js +1 -0
- package/dist/chunks/attributionTrailer-BpvhXgRP.js +1 -0
- package/dist/chunks/auth-CSB2RDKF.js +1 -0
- package/dist/chunks/auth-GxZhOvQ1.js +1 -0
- package/dist/chunks/autoMode-CWvZs1jO.js +45 -0
- package/dist/chunks/autoModeDenials-Cp6VFdsm.js +1 -0
- package/dist/chunks/autonomy-BkVcSMCZ.js +19 -0
- package/dist/chunks/autonomy-DK42aJYt.js +1 -0
- package/dist/chunks/autonomyPanel-Cn4IhXgE.js +1 -0
- package/dist/chunks/axios-DLnc2dVy.js +1 -0
- package/dist/chunks/axios-DhfaybwJ.js +12 -0
- package/dist/chunks/backgroundHousekeeping-BIZTAYho.js +17 -0
- package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +1 -0
- package/dist/chunks/banner-CVXH2xts.js +2 -0
- package/dist/chunks/base64-js-DIVSFswY.js +1 -0
- package/dist/chunks/bedrockClient-qi1-JCOK.js +15 -0
- package/dist/chunks/bg-DK0E4ZtW.js +9 -0
- package/dist/chunks/bg-Dbh5z3Y8.js +1 -0
- package/dist/chunks/branch-juox_fko.js +3 -0
- package/dist/chunks/break-cache-ByJ7U2Ts.js +8 -0
- package/dist/chunks/bridge-DudsCZkh.js +2 -0
- package/dist/chunks/bridgeConfig-D4tpc568.js +1 -0
- package/dist/chunks/bridgeConfig-lRZfQqmA.js +1 -0
- package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +1 -0
- package/dist/chunks/bridgeEnabled-D2IykaHE.js +1 -0
- package/dist/chunks/bridgeMain-C5RDihlX.js +68 -0
- package/dist/chunks/bridgeMain-D7_lg2iJ.js +1 -0
- package/dist/chunks/bridgeMessaging-CqNURC4-.js +1 -0
- package/dist/chunks/bridgePointer-FvAMj3re.js +1 -0
- package/dist/chunks/browser-fLRXxIsQ.js +1 -0
- package/dist/chunks/btw-DKlE3Dea.js +1 -0
- package/dist/chunks/buddy-DQYgHR63.js +3 -0
- package/dist/chunks/bundledMode-kSQejuY4.js +1 -0
- package/dist/chunks/bypassPermissionsKillswitch-Bof-UtM-.js +1 -0
- package/dist/chunks/caches-B5QZDncQ.js +3 -0
- package/dist/chunks/caches-dGk7xsDu.js +1 -0
- package/dist/chunks/capacityWake-BXlUpptF.js +1 -0
- package/dist/chunks/ccrClient-BaWg4E9-.js +1 -0
- package/dist/chunks/ccshareResume-DWLjTF22.js +1 -0
- package/dist/chunks/changeDetector-DoLfg8a6.js +1 -0
- package/dist/chunks/channelNotification-B7A-9DIl.js +1 -0
- package/dist/chunks/channelNotification-DDErroWn.js +1 -0
- package/dist/chunks/chokidar-BcI3rIKm.js +1 -0
- package/dist/chunks/chokidar-SzksMqYp.js +1 -0
- package/dist/chunks/chrome-jMAks7-w.js +1 -0
- package/dist/chunks/chromeNativeHost-4U39yLtd.js +1 -0
- package/dist/chunks/chunk-DR8-3Aex.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-EAQNhHs8.js +1 -0
- package/dist/chunks/claudeDesktop-D0S1eq1F.js +1 -0
- package/dist/chunks/cleanup-Bg_gFgcj.js +1 -0
- package/dist/chunks/clear-OudnCGa7.js +1 -0
- package/dist/chunks/cliLaunch-BQa48gsr.js +1 -0
- package/dist/chunks/client-CPn1wQyc.js +7 -0
- package/dist/chunks/client-DxDmXXTh.js +1 -0
- package/dist/chunks/client-_sjL0I7A.js +35 -0
- package/dist/chunks/color-DG_R5-hl.js +1 -0
- package/dist/chunks/color-convert-ULbeSgNC.js +1 -0
- package/dist/chunks/commands-BWIOEBPs.js +1 -0
- package/dist/chunks/commitAttribution-BA4fcbHf.js +1 -0
- package/dist/chunks/commitAttribution-C22a3OCi.js +2 -0
- package/dist/chunks/common-B379wT22.js +1 -0
- package/dist/chunks/common-B_BC3eMY.js +1 -0
- package/dist/chunks/common-CMCv4N_v.js +1 -0
- package/dist/chunks/compact-BWvnb4or.js +3 -0
- package/dist/chunks/companion-Bkn2lSLj.js +1 -0
- package/dist/chunks/completionCache-DHfUBBMH.js +1 -0
- package/dist/chunks/completionCache-DORrtxkS.js +4 -0
- package/dist/chunks/computerUseLock-BjoDJH2h.js +1 -0
- package/dist/chunks/config-BvpTbJ5p.js +1 -0
- package/dist/chunks/config-D-dzD6n-.js +1 -0
- package/dist/chunks/connectHeadless-CwsFt-Mh.js +1 -0
- package/dist/chunks/constants-41VpZw2G.js +1 -0
- package/dist/chunks/context-DzNahdyP.js +1 -0
- package/dist/chunks/context-noninteractive-CM1-lUSe.js +1 -0
- package/dist/chunks/context-noninteractive-yiyJriiw.js +54 -0
- package/dist/chunks/controlMessageCompat-BJhFiS7u.js +1 -0
- package/dist/chunks/conversation-DKlz47xf.js +1 -0
- package/dist/chunks/conversation-cUxdb8MN.js +1 -0
- package/dist/chunks/copy-9k9JPRqW.js +7 -0
- package/dist/chunks/createSSHSession-BZf-Loo5.js +6 -0
- package/dist/chunks/createSession-BuJcoBAj.js +1 -0
- package/dist/chunks/createSession-kiTHYXSL.js +1 -0
- package/dist/chunks/cron-DiW7eIPP.js +1 -0
- package/dist/chunks/cronJitterConfig-CYP7yrQu.js +6 -0
- package/dist/chunks/crossProjectResume-BJisir9Z.js +40 -0
- package/dist/chunks/cwd--iizewsn.js +1 -0
- package/dist/chunks/cwd-BgpSJxd7.js +1 -0
- package/dist/chunks/daemon-VYRit6Aq.js +2 -0
- package/dist/chunks/dangerousBackend-BU_PHGR2.js +1 -0
- package/dist/chunks/datadog-Bg-zL-i7.js +1 -0
- package/dist/chunks/datadog-CVeFkaQu.js +1 -0
- package/dist/chunks/debug-DM5ezCBS.js +1 -0
- package/dist/chunks/debug-UI3T040K.js +5 -0
- package/dist/chunks/debugUtils-BBMFODKH.js +1 -0
- package/dist/chunks/defineProperty-80gRi2ZW.js +1 -0
- package/dist/chunks/desktop-DpaStjc-.js +1 -0
- package/dist/chunks/detached-D300jlhj.js +5 -0
- package/dist/chunks/detect-libc-DNuQfUvI.js +1 -0
- package/dist/chunks/detectRepository-CBk3S2zv.js +1 -0
- package/dist/chunks/detectRepository-DCTvg4p0.js +1 -0
- package/dist/chunks/detection-CQsNad64.js +1 -0
- package/dist/chunks/detection-DJ-vTbBf.js +1 -0
- package/dist/chunks/diff-N_VSBo3Z.js +1 -0
- package/dist/chunks/directoryCompletion-DP_4B1GL.js +1 -0
- package/dist/chunks/dist-CanSxOZ1.js +5 -0
- package/dist/chunks/dist-Cg1a1Exw.js +29 -0
- package/dist/chunks/dist-Q7YNoZ0H.js +20 -0
- package/dist/chunks/dist-es-4z5T3Jzm.js +1 -0
- package/dist/chunks/dist-es-B2jg52tM2.js +1 -0
- package/dist/chunks/dist-es-B6OXHQ1S.js +1 -0
- package/dist/chunks/dist-es-B8NEy5hc.js +1 -0
- package/dist/chunks/dist-es-BVGppqE4.js +1 -0
- package/dist/chunks/dist-es-Bcw5GZko.js +1 -0
- package/dist/chunks/dist-es-BoIJpncb.js +9 -0
- package/dist/chunks/dist-es-Bu_Fshi1.js +1 -0
- package/dist/chunks/dist-es-C-1vn4OP2.js +1 -0
- package/dist/chunks/dist-es-C41b_0B5.js +1 -0
- package/dist/chunks/dist-es-CCZYybbG2.js +1 -0
- package/dist/chunks/dist-es-CLK1mey-.js +1 -0
- package/dist/chunks/dist-es-CQz2aNf72.js +1 -0
- package/dist/chunks/dist-es-CSfI8B8l.js +1 -0
- package/dist/chunks/dist-es-CUZBYppo.js +1 -0
- package/dist/chunks/dist-es-CZkzHpjF.js +1 -0
- package/dist/chunks/dist-es-Cbf0_D8d.js +5 -0
- package/dist/chunks/dist-es-ChHe-SVL.js +1 -0
- package/dist/chunks/dist-es-ClYOf0My.js +1 -0
- package/dist/chunks/dist-es-D-kJbj4A2.js +1 -0
- package/dist/chunks/dist-es-D1LN6CJd.js +1 -0
- package/dist/chunks/dist-es-DC1sC3ph.js +1 -0
- package/dist/chunks/dist-es-DGn8uOwQ2.js +1 -0
- package/dist/chunks/dist-es-DK5fTeKM2.js +1 -0
- package/dist/chunks/dist-es-DN7otr6F.js +1 -0
- package/dist/chunks/dist-es-DPM0mPK5.js +1 -0
- package/dist/chunks/dist-es-DqZAh3nG.js +1 -0
- package/dist/chunks/dist-es-DuAZyxJ02.js +5 -0
- package/dist/chunks/dist-es-HVQrM0oE.js +1 -0
- package/dist/chunks/dist-es-OVleIB54.js +1 -0
- package/dist/chunks/dist-es-UAs0rdXg.js +1 -0
- package/dist/chunks/dist-es-WvMMuHmx2.js +1 -0
- package/dist/chunks/dist-es-fjXft-jH.js +1 -0
- package/dist/chunks/dist-es-hdN_ShpZ.js +3 -0
- package/dist/chunks/dist-es-neiUvMJb.js +1 -0
- package/dist/chunks/dist-es-yMYpDtui2.js +1 -0
- package/dist/chunks/dist-es-zjcbuB72.js +1 -0
- package/dist/chunks/distRoot-CcxmnzqQ.js +1 -0
- package/dist/chunks/doctor-CUWjbh1X.js +1 -0
- package/dist/chunks/earlyInput-JGJo1zcC.js +1 -0
- package/dist/chunks/earlyInput-tRkbxFv2.js +2 -0
- package/dist/chunks/effort-loH1TUvE.js +9 -0
- package/dist/chunks/entry-D58E-E6Y.js +14 -0
- package/dist/chunks/env-chR0gV31.js +1 -0
- package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +1 -0
- package/dist/chunks/envLessBridgeConfig-SPEr9oqO.js +1 -0
- package/dist/chunks/envUtils-BWeoiL4Y.js +1 -0
- package/dist/chunks/escHotkey-Cyz0yyh1.js +259 -0
- package/dist/chunks/esm--xjzB1hI.js +1 -0
- package/dist/chunks/esm-B2HIF0XY.js +1 -0
- package/dist/chunks/esm-BGQPWnJy.js +1 -0
- package/dist/chunks/esm-C-1qL9Mn.js +1 -0
- package/dist/chunks/esm-C3jcs1DH.js +1 -0
- package/dist/chunks/esm-C97WL9nC.js +1 -0
- package/dist/chunks/esm-CIL-SKM8.js +1 -0
- package/dist/chunks/esm-CJlBxjtx.js +1 -0
- package/dist/chunks/esm-CsGLyWmS.js +56 -0
- package/dist/chunks/esm-DQHmDm-H.js +1 -0
- package/dist/chunks/esm-DcdOXSzi.js +1 -0
- package/dist/chunks/esm-DhNYgGTV.js +1 -0
- package/dist/chunks/esm-DxPW7qPs.js +1 -0
- package/dist/chunks/esm-FBUWr3vI.js +1 -0
- package/dist/chunks/esm-QgL6y---.js +10 -0
- package/dist/chunks/esm-v0kPjgVS.js +1 -0
- package/dist/chunks/esm-vIn-YV_h.js +1 -0
- package/dist/chunks/event-streams-BV7ngMXu.js +1 -0
- package/dist/chunks/eventLoopStallDetector-Dnh1fc31.js +1 -0
- package/dist/chunks/execAsync-BkA6ogic.js +1 -0
- package/dist/chunks/execFileNoThrow-CuQN1sz8.js +1 -0
- package/dist/chunks/execSyncWrapper-C2XQnFVo.js +1 -0
- package/dist/chunks/execa-CGue6Z3n.js +34 -0
- package/dist/chunks/executor-4EeD8GNm.js +1561 -0
- package/dist/chunks/executor-BHEuNh5F.js +1 -0
- package/dist/chunks/exit-D-tuPpbx.js +1 -0
- package/dist/chunks/exit-_obETqBv.js +2 -0
- package/dist/chunks/export-BIZ_SPXJ.js +2 -0
- package/dist/chunks/exportRenderer-CWPSMaqM.js +1 -0
- package/dist/chunks/extra-usage-CCMwIa85.js +1 -0
- package/dist/chunks/extra-usage-core-BNW4VT7o.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-B_WjXO1E.js +1 -0
- package/dist/chunks/extra-usage-rdJ7ecEb.js +1 -0
- package/dist/chunks/extraUsage-CNMMTNJi.js +1 -0
- package/dist/chunks/extractMemories-BrvZVsmM.js +1 -0
- package/dist/chunks/fast-CG1v3fRr.js +1 -0
- package/dist/chunks/fast-CLKKsx2H.js +1 -0
- package/dist/chunks/featureCheck-Cm0YNDXO.js +1 -0
- package/dist/chunks/featureCheck-p7OeCYzj.js +1 -0
- package/dist/chunks/feedback-CG4mS_-B.js +1 -0
- package/dist/chunks/figures-gfT9mM8P.js +1 -0
- package/dist/chunks/fileStateCache-C7-TxF8G.js +1 -0
- package/dist/chunks/files-DYvAZGxp.js +2 -0
- package/dist/chunks/firstPartyEventLogger-Y_jAnHoR.js +1 -0
- package/dist/chunks/flushGate-COPcye5f.js +1 -0
- package/dist/chunks/foundry-sdk-BFN5VDFQ.js +1 -0
- package/dist/chunks/fpsMetrics-DeezdcwV.js +1 -0
- package/dist/chunks/fuse-Ch_OAlm3.js +1 -0
- package/dist/chunks/gates-CSHuXnUx.js +1 -0
- package/dist/chunks/gates-CSKxLmMJ.js +1 -0
- package/dist/chunks/gemini-B3uSLiNp.js +1 -0
- package/dist/chunks/generateRecap-D7rG3jIm.js +1 -0
- package/dist/chunks/generateSessionName-zbqanivg.js +1 -0
- package/dist/chunks/genericProcessUtils-BGvcwuPt.js +23 -0
- package/dist/chunks/getMachineId-bsd-BMtYGBUL.js +1 -0
- package/dist/chunks/getMachineId-darwin-CiLdFH7z.js +2 -0
- package/dist/chunks/getMachineId-linux-Cr27rIeY.js +1 -0
- package/dist/chunks/getMachineId-unsupported-ceiBLwAN.js +1 -0
- package/dist/chunks/getMachineId-win-DFTmsQHq.js +1 -0
- package/dist/chunks/git-CN3qtTb_.js +6 -0
- package/dist/chunks/git-D23Mzu_K.js +1 -0
- package/dist/chunks/githubRepoPathMapping-B04nEUDG.js +1 -0
- package/dist/chunks/graceful-fs-Cgc0rjGF.js +2 -0
- package/dist/chunks/grok-CDOpos8E.js +1 -0
- package/dist/chunks/growthbook-C_EY78Sn.js +1 -0
- package/dist/chunks/hash-BRmOQc3c.js +1 -0
- package/dist/chunks/heapdump-CpmhJ55b.js +5 -0
- package/dist/chunks/help-EHn2neTv.js +1 -0
- package/dist/chunks/hooks-BFdX17Za.js +1 -0
- package/dist/chunks/hooks-BV6HqbU4.js +79 -0
- package/dist/chunks/hostAdapter-_SmFAVNf.js +1 -0
- package/dist/chunks/hostGuard-zim_4F9V.js +1 -0
- package/dist/chunks/httpAuthSchemes-Wq4XWeLL.js +13 -0
- package/dist/chunks/ide-DkN0KdTR.js +2 -0
- package/dist/chunks/inboundAttachments-BVUunfAX.js +1 -0
- package/dist/chunks/inboundAttachments-DnGQw7Pf.js +1 -0
- package/dist/chunks/index.min-BJnb9GQI.js +1 -0
- package/dist/chunks/initReplBridge-tPRGPBq7.js +1 -0
- package/dist/chunks/insights-Bs9kJDG6.js +822 -0
- package/dist/chunks/install-CFX_ph9z.js +1 -0
- package/dist/chunks/install-github-app-CvRjY1Wi.js +147 -0
- package/dist/chunks/install-slack-app-DjhnVSe0.js +1 -0
- package/dist/chunks/instinctParser-DHMa8xa0.js +1 -0
- package/dist/chunks/instrumentation-c5zlOWom.js +12 -0
- package/dist/chunks/intl-Pse97ORk.js +1 -0
- package/dist/chunks/isObject-DaxDnPKm.js +1 -0
- package/dist/chunks/isSymbol-Dp3irZaY.js +1 -0
- package/dist/chunks/job-3QwLq609.js +2 -0
- package/dist/chunks/json-bigint-OxRwRvup.js +8 -0
- package/dist/chunks/jsx-runtime-D-D469L8.js +1 -0
- package/dist/chunks/jws-2vqRyZtR.js +3 -0
- package/dist/chunks/jwtUtils-CpXwh_du.js +1 -0
- package/dist/chunks/keybindings-7mDm3UKD.js +2 -0
- package/dist/chunks/lang-DyyjY20G.js +1 -0
- package/dist/chunks/language-CPRGmY8Q.js +1 -0
- package/dist/chunks/language-Cf6bMI4N.js +1 -0
- package/dist/chunks/launchAgentsPlatform-CpsMsTqQ.js +1 -0
- package/dist/chunks/launchAutofixPr-D9h6YAZY.js +2 -0
- package/dist/chunks/launchCommand-Du91jxMC.js +1 -0
- package/dist/chunks/launchLocalMemory-DlYQcEQJ.js +3 -0
- package/dist/chunks/launchLocalVault-CP0AyPjj.js +3 -0
- package/dist/chunks/launchMemoryStores-BHoDFkJ5.js +1 -0
- package/dist/chunks/launchOnboarding-CFTNXcnc.js +8 -0
- package/dist/chunks/launchSchedule-5KQr6x_A.js +1 -0
- package/dist/chunks/launchSkillStore-D0yGuE68.js +1 -0
- package/dist/chunks/launchTeleport-DRKnXOwY.js +3 -0
- package/dist/chunks/launchVault-XA-zAswX.js +1 -0
- package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
- package/dist/chunks/lib-B4Q0Nrpb.js +14 -0
- package/dist/chunks/lib-Ca3QWJjN.js +2 -0
- package/dist/chunks/lib-inCisXen.js +8 -0
- package/dist/chunks/loadAgentsDir-DCyiY0MN.js +1 -0
- package/dist/chunks/loadAgentsDir-DI1a76pd.js +4601 -0
- package/dist/chunks/loadPluginHooks-C0Ei-0E2.js +1 -0
- package/dist/chunks/loadSso-sDs471GC.js +1 -0
- package/dist/chunks/localSearch-CDOJNc_E.js +1 -0
- package/dist/chunks/localSearch-MBx7KzC2.js +1 -0
- package/dist/chunks/lockfile-DBwdlC3K.js +1 -0
- package/dist/chunks/log-CzsijfHZ.js +1 -0
- package/dist/chunks/login-D8UKKaud.js +1 -0
- package/dist/chunks/login-nwTOoyxv.js +1 -0
- package/dist/chunks/logoV2Utils-DDUoPClc.js +1 -0
- package/dist/chunks/logout-B0BjqlGi.js +1 -0
- package/dist/chunks/magicDocs-CmUlOWjI.js +57 -0
- package/dist/chunks/main-C6be1KFk.js +31 -0
- package/dist/chunks/main-CeG_nUsC.js +1108 -0
- package/dist/chunks/mappers-CJ8IO1o1.js +1 -0
- package/dist/chunks/mcp-CanCqnch.js +2 -0
- package/dist/chunks/mcp-Dq0kxZFx.js +6 -0
- package/dist/chunks/mcp-zbxZM9BP.js +1 -0
- package/dist/chunks/mcpServer-DPHQVYdC.js +1 -0
- package/dist/chunks/mcpServer-lIneUZ5p.js +1 -0
- package/dist/chunks/memoize-DNnuA2aU.js +1 -0
- package/dist/chunks/memoize-DxwLawI2.js +1 -0
- package/dist/chunks/memory-BcWBkKV8.js +1 -0
- package/dist/chunks/mobile-umu5P0cM.js +2 -0
- package/dist/chunks/modalContext-CmSKRyea.js +1 -0
- package/dist/chunks/model-DJLzVvcF.js +1 -0
- package/dist/chunks/model-H3rtl6eR.js +1 -0
- package/dist/chunks/normalization-Cox8C0dP.js +1 -0
- package/dist/chunks/oauth-CdZEzMww.js +1 -0
- package/dist/chunks/oauth-CmensepG.js +1 -0
- package/dist/chunks/observationStore-tvkldXUo.js +4 -0
- package/dist/chunks/onChangeAppState-Dxbl8fvk.js +1 -0
- package/dist/chunks/open-CDditBQ-.js +1 -0
- package/dist/chunks/openai-DkYK4THc.js +10 -0
- package/dist/chunks/openaiShared-D5lOejS1.js +16 -0
- package/dist/chunks/output-style-XDb9-2Kk.js +1 -0
- package/dist/chunks/overageCreditGrant-DLKadMYU.js +1 -0
- package/dist/chunks/p-map-9Ud1LOrJ.js +1 -0
- package/dist/chunks/p-map-D7WEmnBE.js +1 -0
- package/dist/chunks/package-BhL7chzt.js +1 -0
- package/dist/chunks/panel-ByW1omJn.js +1 -0
- package/dist/chunks/panel-Bz_8td5D.js +1 -0
- package/dist/chunks/parseConnectUrl-BS6i9JPo.js +1 -0
- package/dist/chunks/parser-CmngCwjB.js +1 -0
- package/dist/chunks/parser-SWIZo39J.js +1 -0
- package/dist/chunks/passes-BIfuerjL.js +1 -0
- package/dist/chunks/path-C4kbwvSH.js +1 -0
- package/dist/chunks/paths-BBvuDQl9.js +39 -0
- package/dist/chunks/permissions-DXLfdE7b.js +1 -0
- package/dist/chunks/permissions-Ps_D01ZB.js +1 -0
- package/dist/chunks/permissions-S2EvIRKj.js +3 -0
- package/dist/chunks/pipeTransport-DVoIA1uN.js +1 -0
- package/dist/chunks/plan--lnWxB3Q.js +1 -0
- package/dist/chunks/platform-CuyedWpe.js +2 -0
- package/dist/chunks/plist-BO4ZqMZc.js +6 -0
- package/dist/chunks/plugin-DWLyrLw4.js +1 -0
- package/dist/chunks/pluginAutoupdate-CGXIWBrb.js +1 -0
- package/dist/chunks/pluginBlocklist-DJrMdzT0.js +1 -0
- package/dist/chunks/pluginCliCommands-C08q9dHk.js +1 -0
- package/dist/chunks/pluginFlagging-Dggxke70.js +1 -0
- package/dist/chunks/pluginOperations-CNCImIe8.js +2 -0
- package/dist/chunks/pluginStartupCheck-BW2fjg2P.js +1 -0
- package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +1 -0
- package/dist/chunks/plugins-DQ3CRWWO.js +4 -0
- package/dist/chunks/policyLimits-BotYrS-v.js +1 -0
- package/dist/chunks/pollConfig-DAQ-ives.js +1 -0
- package/dist/chunks/poller-Ds0Y6Cir.js +1 -0
- package/dist/chunks/poor-DqfrQT61.js +1 -0
- package/dist/chunks/poorMode-DEAe3hiK.js +1 -0
- package/dist/chunks/poorMode-DzYT47KW.js +1 -0
- package/dist/chunks/postCommitAttribution-Ehmwzzuq.js +1 -0
- package/dist/chunks/print-GGVp62vj.js +39 -0
- package/dist/chunks/privacy-settings-agwqjYJo.js +1 -0
- package/dist/chunks/process-CWupreF6.js +1 -0
- package/dist/chunks/process-DMKLUQIO.js +1 -0
- package/dist/chunks/processBashCommand-DHHN8Ca4.js +1 -0
- package/dist/chunks/processSlashCommand-COtIO6Jy.js +6 -0
- package/dist/chunks/projectContext-0fpRKUeH.js +1 -0
- package/dist/chunks/projectContext-eXMSfgdZ.js +1 -0
- package/dist/chunks/prompt-4tea6NJQ.js +54 -0
- package/dist/chunks/prompt-CO160cIr.js +1 -0
- package/dist/chunks/prompt-CjFAtm3w.js +222 -0
- package/dist/chunks/prompt-GY9hlRvI.js +1 -0
- package/dist/chunks/promptEditor-EgosPsy-.js +4 -0
- package/dist/chunks/protocolHandler-mtPUT9U0.js +13 -0
- package/dist/chunks/protocols-CAyQOlkr.js +7 -0
- package/dist/chunks/proxy-CfZp-wce.js +99 -0
- package/dist/chunks/rate-limit-options-C6SFOHue.js +1 -0
- package/dist/chunks/rcDebugLog-CPKZCtR8.js +11 -0
- package/dist/chunks/referral-DeDr9zAE.js +1 -0
- package/dist/chunks/refresh-D7pdoY_X.js +1 -0
- package/dist/chunks/registerProtocol-BZBH8Zgl.js +36 -0
- package/dist/chunks/registry-Dz6AbiYP.js +1 -0
- package/dist/chunks/release-notes-DiUNOrg9.js +4 -0
- package/dist/chunks/releaseNotes-CnhQit0y.js +2 -0
- package/dist/chunks/reload-plugins-Dx52GcaG.js +1 -0
- package/dist/chunks/remote-env-B67Oo3sI.js +1 -0
- package/dist/chunks/remoteBridgeCore-BzSUgPbt.js +1 -0
- package/dist/chunks/remoteControlServer-L8smP7Zu.js +3 -0
- package/dist/chunks/rename-C4PauyTZ.js +1 -0
- package/dist/chunks/renderOptions-BiyC2rj1.js +1 -0
- package/dist/chunks/resume-CrSn26xq.js +2 -0
- package/dist/chunks/rewind-CXplHgh_.js +1 -0
- package/dist/chunks/rollback-DbSpxmJE.js +11 -0
- package/dist/chunks/runtimeObserver-YNy3mIb7.js +1 -0
- package/dist/chunks/runtimeObserver-nAhH4Wca.js +10 -0
- package/dist/chunks/sandbox-adapter-CzwHes1i.js +1 -0
- package/dist/chunks/sandbox-toggle-BYqbcI5d.js +1 -0
- package/dist/chunks/sanitization-CYp-9DbE.js +1 -0
- package/dist/chunks/satisfies-BaHgd_ie.js +1 -0
- package/dist/chunks/schemas-BGAvj1T4.js +40 -0
- package/dist/chunks/sdk-DEtgRZvI.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor--fevrC5z.js +1 -0
- package/dist/chunks/searchExtraTools-CcpdCO6l.js +1 -0
- package/dist/chunks/semver-Cq33BYay.js +1 -0
- package/dist/chunks/semver-Tw0AFar5.js +1 -0
- package/dist/chunks/sentry-BNVxoVLS.js +13 -0
- package/dist/chunks/server-C5XZSlto.js +1 -0
- package/dist/chunks/server-DzOdtq8A.js +1 -0
- package/dist/chunks/serverBanner-WlSYP-f8.js +1 -0
- package/dist/chunks/serverLog-DtsUvDiY.js +1 -0
- package/dist/chunks/session-BuEmHrqM.js +2 -0
- package/dist/chunks/sessionDataUploader-Ctjo1bgR.js +1 -0
- package/dist/chunks/sessionDiscovery-Mcsfa0g-.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +1 -0
- package/dist/chunks/sessionManager-Dw72ZUTg.js +1 -0
- package/dist/chunks/sessionMemory-CMahwDdW.js +1 -0
- package/dist/chunks/sessionMemory-pFSn4HSN.js +1 -0
- package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +1 -0
- package/dist/chunks/sessionObserver-DG2zQgfi.js +20 -0
- package/dist/chunks/sessionObserver-Je868MC9.js +1 -0
- package/dist/chunks/sessionStorage-D3FhAADV.js +1 -0
- package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +3 -0
- package/dist/chunks/sessionTitle-zUVSAHO7.js +14 -0
- package/dist/chunks/sessionTracing-DoRJ4nSa.js +11 -0
- package/dist/chunks/settingsSync-B9bz77E1.js +1 -0
- package/dist/chunks/setup-B1JbPepL.js +9 -0
- package/dist/chunks/setup-CCOLlRtP.js +1 -0
- package/dist/chunks/setup-DWkSjA49.js +2 -0
- package/dist/chunks/shadowedRuleDetection-BBR3uEgx.js +1 -0
- package/dist/chunks/shellQuote-DgjT8KBA.js +1 -0
- package/dist/chunks/sideQuestion-DHW5rgKz.js +20 -0
- package/dist/chunks/signin-QEeYpJZw.js +1 -0
- package/dist/chunks/sink-DxDOsLa2.js +1 -0
- package/dist/chunks/sink-cQOgsnw3.js +1 -0
- package/dist/chunks/sinks-BrrTUxkC.js +2 -0
- package/dist/chunks/sinks-Djiz_5-Z.js +1 -0
- package/dist/chunks/skill-learning-C0nOKZfg.js +5 -0
- package/dist/chunks/skillChangeDetector-D8C-uQSQ.js +1 -0
- package/dist/chunks/skillGapStore-Czi5jKjJ.js +1 -0
- package/dist/chunks/skillGapStore-_YuJP5KI.js +5 -0
- package/dist/chunks/skillGenerator-kbaRbpqJ.js +8 -0
- package/dist/chunks/skillLearning-3KWrBczS.js +1 -0
- package/dist/chunks/skillLearning-DBbdGbk-.js +1 -0
- package/dist/chunks/skillPanel-BxDvlPzd.js +28 -0
- package/dist/chunks/skillSearchPanel-D-MX6Qgt.js +21 -0
- package/dist/chunks/skills-NpEgFkFZ.js +1 -0
- package/dist/chunks/slashCommandParsing-Cari0pNg.js +1 -0
- package/dist/chunks/sleep-8Eb9j_Ly.js +1 -0
- package/dist/chunks/sprites-DD4eIkN7.js +1 -0
- package/dist/chunks/src-BIPP3_mo.js +26 -0
- package/dist/chunks/src-BJz1KAd_.js +6 -0
- package/dist/chunks/src-BRAdBA8A.js +1 -0
- package/dist/chunks/src-BRC_BuUP.js +1 -0
- package/dist/chunks/src-BaB-bpCj.js +5 -0
- package/dist/chunks/src-BlLavFUS.js +7 -0
- package/dist/chunks/src-C5yhFG0C.js +19 -0
- package/dist/chunks/src-CI_jaaBj.js +2 -0
- package/dist/chunks/src-CRsA-Z4y.js +1 -0
- package/dist/chunks/src-CYLfL70h.js +1 -0
- package/dist/chunks/src-DJXCzwyJ.js +1 -0
- package/dist/chunks/src-DJXKJavk.js +1 -0
- package/dist/chunks/src-Di342QoJ.js +53 -0
- package/dist/chunks/src-DsMd9Q9e.js +2 -0
- package/dist/chunks/src-DzH9IdOo.js +1 -0
- package/dist/chunks/src-hdbPEvzO.js +9 -0
- package/dist/chunks/src-poaoYkuc.js +1 -0
- package/dist/chunks/src-x7u_sB6m.js +1 -0
- package/dist/chunks/sso-oidc-BX1MlBX0.js +1 -0
- package/dist/chunks/startupProfiler-DnXZaX4A.js +3 -0
- package/dist/chunks/startupProfiler-SOE--nM9.js +1 -0
- package/dist/chunks/state-B2GIOsTB.js +1 -0
- package/dist/chunks/state-Ce1HlR-H.js +1 -0
- package/dist/chunks/state-sIHsFpDu.js +1 -0
- package/dist/chunks/staticRender-Br64h1E1.js +1 -0
- package/dist/chunks/stats-xL3NHwhp.js +1 -0
- package/dist/chunks/status-B5E70xRv.js +1 -0
- package/dist/chunks/statusNoticeHelpers-DcssRhLw.js +1 -0
- package/dist/chunks/stdio-BEEzuxaZ.js +1 -0
- package/dist/chunks/stdio-D4cT86R0.js +3 -0
- package/dist/chunks/stickers-2K05wjSp.js +1 -0
- package/dist/chunks/store-DhI7Lcan.js +1 -0
- package/dist/chunks/sts-BDFJ-6QE.js +1 -0
- package/dist/chunks/subprocessEnv-CggQWZCx.js +1 -0
- package/dist/chunks/subprocessEnv-DV6q6o6w.js +1 -0
- package/dist/chunks/supports-color-lkzOMQ6u.js +1 -0
- package/dist/chunks/systemPromptSections-BcN_XBTx.js +1 -0
- package/dist/chunks/systemPromptSections-DB93ZNWP.js +1 -0
- package/dist/chunks/systemTheme-dDbitcxB.js +1 -0
- package/dist/chunks/tag-BELr-qIa.js +11 -0
- package/dist/chunks/tasks-CrdWcSt-.js +1 -0
- package/dist/chunks/teamHelpers--3ZyNDlv.js +1 -0
- package/dist/chunks/teamHelpers-CUAiXng3.js +1 -0
- package/dist/chunks/teammate-DMYOtLTK.js +1 -0
- package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DOQMTKbQ.js +1 -0
- package/dist/chunks/teleport-LXFOan9C.js +1 -0
- package/dist/chunks/templateJobs-8IY2Cgig.js +12 -0
- package/dist/chunks/terminalSetup-C4psrmpb.js +1 -0
- package/dist/chunks/terminalSetup-Lyg4NbGA.js +33 -0
- package/dist/chunks/theme-B8GNnJ_q.js +1 -0
- package/dist/chunks/thinkback-DPXwEK3B.js +1 -0
- package/dist/chunks/thinkback-DZW3Mcx_.js +1 -0
- package/dist/chunks/thinkback-play-BMOE-ceh.js +1 -0
- package/dist/chunks/tmux-CvbhsfwG.js +1 -0
- package/dist/chunks/toolEventObserver-D0TSHm01.js +1 -0
- package/dist/chunks/toolEventObserver-DzLd0MSn.js +1 -0
- package/dist/chunks/toolPool-DVOfpjDz.js +1 -0
- package/dist/chunks/toolPool-Dq-Vtvrj.js +1 -0
- package/dist/chunks/trustedDevice-1iTu4LEm.js +1 -0
- package/dist/chunks/trustedDevice-BvYYXfd8.js +1 -0
- package/dist/chunks/tui-BVc2q4Xv.js +6 -0
- package/dist/chunks/turndown.es-Bv06VjMb.js +69 -0
- package/dist/chunks/types-CQ1wrnQ0.js +1 -0
- package/dist/chunks/types-Csi32ZXh.js +17 -0
- package/dist/chunks/types-RJTEOuIt.js +3 -0
- package/dist/chunks/udsClient-BvG_Jip0.js +1 -0
- package/dist/chunks/ultrareviewCommand-BTXAN2wP.js +3 -0
- package/dist/chunks/undercover-C_44e3oN.js +1 -0
- package/dist/chunks/undercover-DvvnEmsX.js +31 -0
- package/dist/chunks/up-D-U4wUCe.js +12 -0
- package/dist/chunks/updateCCB-C-qfLi0j.js +11 -0
- package/dist/chunks/upgrade-CGXa5Dwy.js +1 -0
- package/dist/chunks/upgrade-DTBZSxwv.js +1 -0
- package/dist/chunks/upload-BF8tf_Eo.js +1 -0
- package/dist/chunks/upstreamproxy-DcLeL2XX.js +11 -0
- package/dist/chunks/usage-BRYRRgNt.js +1 -0
- package/dist/chunks/usage-DvSTXEYY.js +1 -0
- package/dist/chunks/useKeybinding-FsOnjW6T.js +1 -0
- package/dist/chunks/useMainLoopModel-CwvuTRXn.js +1 -0
- package/dist/chunks/useManagePlugins-GmnI9K53.js +1 -0
- package/dist/chunks/useMergedTools-Dah5KDMi.js +1 -0
- package/dist/chunks/useSearchInput-BV_azHiA.js +1 -0
- package/dist/chunks/useSettingsErrors-C-j_Zt7g.js +1 -0
- package/dist/chunks/useVoice-DR69NLxp.js +1 -0
- package/dist/chunks/util-BpyJ4Bom.js +1 -0
- package/dist/chunks/utils-CrZcpypC.js +1 -0
- package/dist/chunks/v4-f1i_CNUT.js +1 -0
- package/dist/chunks/validatePlugin-vptAYuYu.js +1 -0
- package/dist/chunks/vertex-sdk-CSGw3fvU.js +9 -0
- package/dist/chunks/vim-DvOw8dfR.js +1 -0
- package/dist/chunks/voice-B3BZs53f.js +2 -0
- package/dist/chunks/voice-DXiiy8HX.js +8 -0
- package/dist/chunks/voiceModeEnabled-DA76xN1Q.js +1 -0
- package/dist/chunks/voiceModeEnabled-DIveLYGb.js +1 -0
- package/dist/chunks/voiceStreamSTT-_w1VjIOs.js +1 -0
- package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +1 -0
- package/dist/chunks/which-DqSAIvp2.js +1 -0
- package/dist/chunks/windowsPaths-C9CigqoF.js +1 -0
- package/dist/chunks/windowsPaths-swxCp7bX.js +2 -0
- package/dist/chunks/workSecret-mS2OrpxF.js +1 -0
- package/dist/chunks/workerRegistry-2_MZVih1.js +1 -0
- package/dist/chunks/worktree-CCuDwRmS.js +1 -0
- package/dist/chunks/worktreeModeEnabled-Db6b_Iy_.js +1 -0
- package/dist/chunks/worktreeModeEnabled-THQb19xR.js +1 -0
- package/dist/chunks/wrapper-BSK0MCQH.js +1 -0
- package/dist/chunks/wrapper-D5qL1aQL.js +6 -0
- package/dist/chunks/xdg-CBxMmQux.js +1 -0
- package/dist/chunks/xml-Dx--sNE1.js +1 -0
- package/dist/chunks/zod-DT6hytkp.js +1 -0
- package/dist/cli.js +1 -10978
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./executor-4EeD8GNm.js";e();export{t as unhideComputerUseApps};
|
|
@@ -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{Cl as r,wl as i}from"./paths-BBvuDQl9.js";import{GT as a,cd as o,ld as s,qT as c,wt as l,xt as u}from"./loadAgentsDir-DI1a76pd.js";import{n as d,t as f}from"./ExitFlow-CSBDxw9H.js";import{spawnSync as p}from"child_process";function m(){return i(_)??`Goodbye!`}async function h(e){if(s())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=u()!==null;return t?(0,g.jsx)(f,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(m()),await a(0,`prompt_input_exit`),null)}var g,_;e((()=>{r(),t(),d(),o(),c(),l(),g=n(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,f as a,g as o,h as s,t as c,tn as l,tt as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{O as p,w as m}from"./debug-UI3T040K.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{Dx as _,JS as v,Lw as y,Nx as b,Ox as x,Px as S,YS as C}from"./loadAgentsDir-DI1a76pd.js";import{t as w}from"./useKeybinding-FsOnjW6T.js";import{n as T,t as E}from"./exportRenderer-CWPSMaqM.js";import{join as D}from"path";function O({content:e,defaultFilename:t,onDone:r}){let[,c]=(0,k.useState)(null),[f,m]=(0,k.useState)(t),[h,y]=(0,k.useState)(t.length),[x,S]=(0,k.useState)(!1),{columns:C}=n(),w=(0,k.useCallback)(()=>{S(!1),c(null)},[]),T=async t=>{if(t===`clipboard`){let t=await l(e);t&&process.stdout.write(t),r({success:!0,message:`Conversation copied to clipboard`})}else t===`file`&&(c(`file`),S(!0))},E=()=>{let t=f.endsWith(`.txt`)?f:f.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{p(n,e,{encoding:`utf-8`,flush:!0}),r({success:!0,message:`Conversation exported to: ${n}`})}catch(e){r({success:!1,message:`Failed to export conversation: ${e instanceof Error?e.message:`Unknown error`}`})}},O=(0,k.useCallback)(()=>{x?w():r({success:!1,message:`Export cancelled`})},[x,w,r]),j=[{label:`Copy to clipboard`,value:`clipboard`,description:`Copy the conversation to your system clipboard`},{label:`Save to file`,value:`file`,description:`Save the conversation to a file in the current directory`}];function M(e){return x?(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{shortcut:`Enter`,action:`save`}),(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}):e.pending?(0,A.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})}return u(`confirm:no`,O,{context:`Settings`,isActive:x}),(0,A.jsx)(a,{title:`Export Conversation`,subtitle:`Select export method:`,color:`permission`,onCancel:O,inputGuide:M,isCancelActive:!x,children:x?(0,A.jsxs)(d,{flexDirection:`column`,children:[(0,A.jsx)(i,{children:`Enter filename:`}),(0,A.jsxs)(d,{flexDirection:`row`,gap:1,marginTop:1,children:[(0,A.jsx)(i,{children:`>`}),(0,A.jsx)(b,{value:f,onChange:m,onSubmit:E,focus:!0,showCursor:!0,columns:C,cursorOffset:h,onChangeCursorOffset:y})]})]}):(0,A.jsx)(_,{options:j,onChange:T,onCancel:O})})}var k,A,j=e((()=>{k=t(r(),1),y(),c(),w(),h(),m(),C(),x(),S(),A=f()}));function M(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}-${String(e.getHours()).padStart(2,`0`)}${String(e.getMinutes()).padStart(2,`0`)}${String(e.getSeconds()).padStart(2,`0`)}`}function N(e){let t=e.find(e=>e.type===`user`);if(!t||t.type!==`user`)return``;let n=t.message?.content,r=``;if(typeof n==`string`)r=n.trim();else if(Array.isArray(n)){let e=n.find(e=>e.type===`text`);e&&`text`in e&&(r=e.text.trim())}return r=r.split(`
|
|
2
|
+
`)[0]||``,r.length>50&&(r=r.substring(0,49)+`…`),r}function P(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)}async function F(e){let t=e.options.tools||[];return T(e.messages,t)}async function I(e,t,n){let r=await F(t),i=n.trim();if(i){let t=i.endsWith(`.txt`)?i:i.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{return p(n,r,{encoding:`utf-8`,flush:!0}),e(`Conversation exported to: ${n}`),null}catch(t){return e(`Failed to export conversation: ${t instanceof Error?t.message:`Unknown error`}`),null}}let a=N(t.messages),o=M(new Date),s;if(a){let e=P(a);s=e?`${o}-${e}.txt`:`conversation-${o}.txt`}else s=`conversation-${o}.txt`;return(0,L.jsx)(O,{content:r,defaultFilename:s,onDone:t=>{e(t.message)}})}var L;e((()=>{r(),j(),h(),E(),m(),L=f()}))();export{I as call,N as extractFirstPrompt,P as sanitizeFilename};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,Tn as r,rt as i,wn as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{AS as s,Qw as c,iT as l,jS as u,oT as d}from"./loadAgentsDir-DI1a76pd.js";import{n as f,t as p}from"./staticRender-Br64h1E1.js";import{n as m,t as h}from"./Messages-DWiKTx5o.js";function g({children:e}){let{bindings:t}=d(),n=(0,b.useRef)(null),r=(0,b.useRef)(new Map),a=(0,b.useRef)(new Set).current;return(0,x.jsx)(i,{bindings:t,pendingChordRef:n,pendingChord:null,setPendingChord:()=>{},activeContexts:a,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:r,children:e})}function _(e){if(!(`message`in e))return 1;let t=e.message.content;return Array.isArray(t)?t.length:1}async function v(e,t,n,{columns:i,verbose:a=!1,chunkSize:o=40,onProgress:c}={}){let l=n=>f((0,x.jsx)(s,{children:(0,x.jsx)(g,{children:(0,x.jsx)(h,{messages:e,tools:t,commands:[],verbose:a,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:`export`,screen:`prompt`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:n})})}),i),u=o;for(let t of e)u+=_(t);for(let e=0;e<u;e+=o){let t=await l([e,e+o]);if(r(t).trim()===``)break;await n(t),c?.(e+o)}}async function y(e,t=[],n){let i=[];return await v(e,t,e=>void i.push(r(e)),{columns:n}),i.join(``)}var b,x,S=e((()=>{b=t(n(),1),a(),m(),c(),l(),u(),p(),x=o()}));export{y as n,S 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"./extra-usage-core-BNW4VT7o.js";import{r as a,t as o}from"./login-nwTOoyxv.js";async function s(e,t){let n=await r();return n.type===`message`?(e(n.value),null):(0,c.jsx)(o,{startingMessage:`Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}var c,l=e((()=>{t(),a(),i(),c=n()}));export{l as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Ac as r,Da as i,Pc as a,Sc as o,ka as s,on as c,tn as l}from"./paths-BBvuDQl9.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{o as f,s as p}from"./log-CzsijfHZ.js";import{a as m,l as h,o as g}from"./api-CGOR_Xfl.js";import{n as _,t as v}from"./browser-fLRXxIsQ.js";import{n as y,t as b}from"./usage-BRYRRgNt.js";import{i as x,r as S}from"./overageCreditGrant-DLKadMYU.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${u().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),d(),g()}));async function D(){o().hasVisitedExtraUsage||a(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=l(),t=e===`team`||e===`enterprise`;if(!i()&&t){let e;try{e=(await b())?.extra_usage}catch(e){p(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){p(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){p(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){p(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return p(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),c(),s(),v(),r(),f()}));export{D as n,O as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./extra-usage-core-BNW4VT7o.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./extra-usage-CCMwIa85.js";e();export{t 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,g as i,h as a,nt as o,p as ee,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Bl as u,Br as d,Cr as f,Gs as p,Pr as m,Qa as te,Rr as h,bi as ne,dn as g,dr as _,li as v,lo as re,on as y,oo as b,ur as x,vi as S,xi as C,yi as ie,zl as ae}from"./paths-BBvuDQl9.js";import{n as w,r as oe}from"./analytics-DqMQntaB.js";import{$A as T,Dx as se,GA as E,JS as ce,MS as D,Of as le,PS as ue,UA as O,WA as k,YS as A,ZA as j,aj as de,cy as M,ej as fe,ij as pe,jS as N,kf as P,tj as me}from"./loadAgentsDir-DI1a76pd.js";import{t as F}from"./useKeybinding-FsOnjW6T.js";import{l as I,u as he}from"./referral-DeDr9zAE.js";function L(e,t){if(!T(t))return;let n=E(t,e);return`${R(n)} ${n} · /effort`}function R(e){switch(e){case`low`:return`○`;case`medium`:return`◐`;case`high`:return`●`;case`xhigh`:return`⦿`;case`max`:return`◉`;default:return`●`}}var z=e((()=>{p(),j()}));function B({initial:e,sessionModel:t,onSelect:n,onCancel:s,isStandaloneCommand:l,showFastModeNotice:u,headerText:d,skipSettingsWrite:f}){let p=ue(),m=he(),g=e===null?K:e,[_,y]=(0,W.useState)(g),b=D(e=>C()?e.fastMode:!1),[S,w]=(0,W.useState)(()=>new Set(x(g)?[g.replace(/\[1m\]/i,``)]:[])),E=(0,W.useCallback)(()=>{if(!_||_===K)return;let e=_.replace(/\[1m\]/i,``);w(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[_]),[k,A]=(0,W.useState)(!1),j=D(e=>e.effortValue),[M,N]=(0,W.useState)(j===void 0?void 0:O(j)),P=(0,W.useMemo)(()=>le(b??!1),[b]),F=(0,W.useMemo)(()=>e!==null&&!P.some(t=>t.value===e)?[...P,{value:e,label:h(e),description:`Current model`}]:P,[P,e]),I=(0,W.useMemo)(()=>F.map(e=>({...e,value:e.value===null?K:e.value})),[F]),L=(0,W.useMemo)(()=>I.some(e=>e.value===g)?g:I[0]?.value??void 0,[I,g]),R=Math.min(10,I.length),z=Math.max(0,I.length-R),B=I.find(e=>e.value===_)?.label,q=V(_),J=_!==void 0&&_!==K&&S.has(_.replace(/\[1m\]/i,``)),Y=q?T(q):!1,X=q?me(q):!1,Z=q?fe(q):!1,Q=U(_),$=M===`max`&&!Z?X?`xhigh`:`high`:M===`xhigh`&&!X?`high`:M,_e=(0,W.useCallback)(e=>{y(e),!k&&j===void 0&&N(U(e))},[k,j]),ve=(0,W.useCallback)(e=>{Y&&(N(t=>ge(t??Q,e,X,Z)),A(!0))},[Y,X,Z,Q]);o({"modelPicker:decreaseEffort":()=>ve(`left`),"modelPicker:increaseEffort":()=>ve(`right`),"modelPicker:toggle1M":()=>E()},{context:`ModelPicker`});function ye(e){if(oe(`tengu_model_command_menu_effort`,{effort:M}),!f){let t=pe(M,U(e),te(`userSettings`)?.effortLevel,k),n=de(t);n!==void 0&&re(`userSettings`,{effortLevel:n}),p(e=>({...e,effortValue:t}))}let t=V(e),r=k&&t&&T(t)?M:void 0;if(e===K){n(null,r);return}let i=e.replace(/\[1m\]/i,``);n(S.has(i)?`${i}[1m]`:i,r)}let be=(0,G.jsxs)(c,{flexDirection:`column`,children:[(0,G.jsxs)(c,{flexDirection:`column`,children:[(0,G.jsxs)(c,{marginBottom:1,flexDirection:`column`,children:[(0,G.jsx)(r,{color:`remember`,bold:!0,children:`Select model`}),(0,G.jsx)(r,{dimColor:!0,children:d??`Choose a model for this and future sessions. Use ← → to adjust effort, Space to toggle 1M context.`}),t&&(0,G.jsxs)(r,{dimColor:!0,children:[`Currently using `,h(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,G.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(c,{flexDirection:`column`,children:(0,G.jsx)(se,{defaultValue:g,defaultFocusValue:L,options:I,onChange:ye,onFocus:_e,onCancel:s??(()=>{}),visibleOptionCount:R})}),z>0&&(0,G.jsx)(c,{paddingLeft:3,children:(0,G.jsxs)(r,{dimColor:!0,children:[`and `,z,` more…`]})})]}),(0,G.jsxs)(c,{marginBottom:1,flexDirection:`column`,children:[Y?(0,G.jsxs)(r,{dimColor:!0,children:[(0,G.jsx)(H,{effort:$}),` `,ae($),` effort`,$===Q?` (default)`:``,` `,(0,G.jsx)(r,{color:`subtle`,children:`← → to adjust`})]}):(0,G.jsxs)(r,{color:`subtle`,children:[(0,G.jsx)(H,{effort:void 0}),` Effort not supported`,B?` for ${B}`:``]}),J?(0,G.jsxs)(r,{dimColor:!0,children:[(0,G.jsx)(H,{effort:`high`}),` 1M context on`,(0,G.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]}):(0,G.jsxs)(r,{color:`subtle`,children:[(0,G.jsx)(H,{effort:void 0}),` 1M context off`,B?` for ${B}`:``,(0,G.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]})]}),C()?u?(0,G.jsx)(c,{marginBottom:1,children:(0,G.jsxs)(r,{dimColor:!0,children:[`Fast mode is `,(0,G.jsx)(r,{bold:!0,children:`ON`}),` and available with `,v,` only (/fast). Switching to other models turn off fast mode.`]})}):ie()&&!ne()?(0,G.jsx)(c,{marginBottom:1,children:(0,G.jsxs)(r,{dimColor:!0,children:[`Use `,(0,G.jsx)(r,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,v,` only).`]})}):null:null]}),l&&(0,G.jsx)(r,{dimColor:!0,italic:!0,children:m.pending?(0,G.jsxs)(G.Fragment,{children:[`Press `,m.keyName,` again to exit`]}):(0,G.jsxs)(a,{children:[(0,G.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,G.jsx)(ce,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return l?(0,G.jsx)(ee,{color:`permission`,children:be}):be}function V(e){if(e)return e===K?f():d(e)}function H({effort:e}){return(0,G.jsx)(r,{color:e?`claude`:`subtle`,children:R(e??`low`)})}function ge(e,t,n,r){let i=[`low`,`medium`,`high`,...n?[`xhigh`]:[],...r?[`max`]:[]],a=i.indexOf(e),o=a===-1?i.indexOf(`high`):a;return t===`right`?i[(o+1)%i.length]:i[(o-1+i.length)%i.length]}function U(e){let t=k(V(e)??f());return t===void 0?`high`:O(t)}var W,G,K,q=e((()=>{u(),n(),W=t(n(),1),_(),I(),w(),S(),s(),F(),N(),j(),m(),P(),b(),A(),M(),z(),G=l(),K=`__NO_PREFERENCE__`}));function J(e,t,n){if(!g())return!1;if(t)return!0;if(e===null||!x(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var Y=e((()=>{y(),_()}));export{R as a,q as i,J as n,L as o,B as r,z as s,Y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ql as e,Xl as t,Yl as n,Zl as r}from"./loadAgentsDir-DI1a76pd.js";e();export{n as drainPendingExtraction,t as executeExtractMemories,r as initExtractMemories};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Q as i,Rn as a,b as o,f as s,nt as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Ac as p,Di as m,Gs as h,Sc as g,Si as _,ci as v,di as y,fi as b,li as x,lo as S,mi as C,oi as w,oo as T,si as E,ui as D,vi as O,xi as k}from"./paths-BBvuDQl9.js";import{n as A,r as j}from"./analytics-DqMQntaB.js";import{d as M,x as N}from"./startupProfiler-DnXZaX4A.js";import{MS as P,PS as F,jS as I}from"./loadAgentsDir-DI1a76pd.js";import{t as L}from"./useKeybinding-FsOnjW6T.js";import{n as R,t as z}from"./systemTheme-dDbitcxB.js";function B({cooldown:e}){return e?(0,H.jsx)(o,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(o,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let r=R(g().theme);return t?n.dim(u(`promptBorder`,r)(`↯`)):u(`fastMode`,r)(`↯`)}var H,U=e((()=>{r(),a(),h(),l(),p(),z(),H=f()}));function W(e,t){D(),S(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!_(e.mainLoopModel);return{...e,...t?{mainLoopModel:y(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let n=P(e=>e.mainLoopModel),r=P(e=>e.fastMode),a=F(),[l,u]=(0,J.useState)(r??!1),f=b(),p=f.status===`cooldown`,m=t!==null,h=w(E(!0));function g(){m||(W(l,a),j(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${_(n)?``:` · model set to ${x}`} · ${h}`):(a(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function v(){if(m){r&&W(!1,a),e(`Fast mode OFF`,{display:`system`});return}e(r?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function y(){m||u(e=>!e)}return c({"confirm:yes":g,"confirm:nextField":y,"confirm:next":y,"confirm:previous":y,"confirm:cycleMode":y,"confirm:toggle":y},{context:`Confirmation`}),(0,Y.jsxs)(s,{title:(0,Y.jsxs)(o,{children:[(0,Y.jsx)(B,{cooldown:p}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${x}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:v,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):m?(0,Y.jsx)(o,{children:`Esc to cancel`}):(0,Y.jsx)(o,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsx)(o,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(d,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(d,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(o,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(o,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(o,{dimColor:!0,children:h})]})}),p&&f.status===`cooldown`&&(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsxs)(o,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,M(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(o,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=C();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),j(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${_(i)?``:` · model set to ${x}`} · ${w(E(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!k())return null;await m();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=C();return j(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{a(),J=t(a(),1),l(),U(),L(),A(),I(),O(),N(),v(),T(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./fast-CG1v3fRr.js";t();export{n as FastModePicker,e as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";function t(){return!1}function n(){return process.env.SKILL_LEARNING_ENABLED===`1`||process.env.FEATURE_SKILL_LEARNING===`1`}var r=e((()=>{}));export{t as n,n as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./featureCheck-Cm0YNDXO.js";n();export{e as isSkillLearningCompiledIn,t as isSkillLearningEnabled};
|
|
@@ -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"./Feedback-DwHzc4UT.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{a as r,c as i,i as a,l as o,n as s,o as c,r as l,s as u,t as d,u as f}from"./classPrivateFieldSet2-EAQNhHs8.js";import p from"node:process";var m,h=e((()=>{m=[],m.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&m.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&m.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`)}));function g(e){return v(l(O,this))?(l(O,this).exitCode=e||0,l(D,this).emit(`exit`,l(O,this).exitCode,null),l(A,this).call(l(O,this),l(O,this).exitCode)):0}function _(e,...t){let n=l(k,this);if(e===`exit`&&v(l(O,this))){typeof t[0]==`number`&&(l(O,this).exitCode=t[0]);let r=n.call(l(O,this),e,...t);return l(D,this).emit(`exit`,l(O,this).exitCode,null),r}else return n.call(l(O,this),e,...t)}var v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z=e((()=>{h(),t(),f(),i(),s(),a(),c(),v=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,y=Symbol.for(`signal-exit emitter`),b=globalThis,x=Object.defineProperty.bind(Object),S=class{constructor(){if(n(this,`emitted`,{afterExit:!1,exit:!1}),n(this,`listeners`,{afterExit:[],exit:[]}),n(this,`count`,0),n(this,`id`,Math.random()),b[y])return b[y];x(b,y,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},C=class{},w=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),T=class extends C{onExit(){return()=>{}}load(){}unload(){}},E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakSet,P=class extends C{constructor(e){super(),o(this,N),u(this,E,F.platform===`win32`?`SIGINT`:`SIGHUP`),u(this,D,new S),u(this,O,void 0),u(this,k,void 0),u(this,A,void 0),u(this,j,{}),u(this,M,!1),d(O,this,e),d(j,this,{});for(let t of m)l(j,this)[t]=()=>{let n=l(O,this).listeners(t),{count:r}=l(D,this),i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=l(D,this).emit(`exit`,null,t),r=t===`SIGHUP`?l(E,this):t;n||e.kill(e.pid,r)}};d(A,this,e.reallyExit),d(k,this,e.emit)}onExit(e,t){if(!v(l(O,this)))return()=>{};l(M,this)===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return l(D,this).on(n,e),()=>{l(D,this).removeListener(n,e),l(D,this).listeners.exit.length===0&&l(D,this).listeners.afterExit.length===0&&this.unload()}}load(){if(!l(M,this)){d(M,this,!0),l(D,this).count+=1;for(let e of m)try{let t=l(j,this)[e];t&&l(O,this).on(e,t)}catch{}l(O,this).emit=(e,...t)=>r(N,this,_).call(this,e,...t),l(O,this).reallyExit=e=>r(N,this,g).call(this,e)}}unload(){l(M,this)&&(d(M,this,!1),m.forEach(e=>{let t=l(j,this)[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{l(O,this).removeListener(e,t)}catch{}}),l(O,this).emit=l(k,this),l(O,this).reallyExit=l(A,this),--l(D,this).count)}},F=globalThis.process,{onExit:I,load:L,unload:R}=w(v(F)?new P(F):new T)}));function B(){let{env:e}=p,{TERM:t,TERM_PROGRAM:n}=e;return p.platform===`win32`?!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask===`{cmd::Cmder}`||n===`Terminus-Sublime`||n===`vscode`||t===`xterm-256color`||t===`alacritty`||t===`rxvt-unicode`||t===`rxvt-unicode-256color`||e.TERMINAL_EMULATOR===`JetBrains-JediTerm`:t!==`linux`}var V=e((()=>{})),H,U,W,G,K,q,J,Y=e((()=>{V(),H={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},U={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},W={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},G={...H,...U},K={...H,...W},q=B(),J=q?G:K,Object.entries(U)}));export{I as i,Y as n,z as r,J as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{n as r,t as i}from"./index.min-BJnb9GQI.js";import{normalize as a}from"path";function o(e,t=d){return new f(e,t)}function s(e){return Object.fromEntries(e.entries())}function c(e){return Array.from(e.keys())}function l(e){let t=o(e.max,e.maxSize);return t.load(e.dump()),t}function u(e,t){let n=l(e);for(let[e,r]of t.entries()){let t=n.get(e);(!t||r.timestamp>t.timestamp)&&n.set(e,r)}return n}var d,f,p=e((()=>{r(),t(),d=25*1024*1024,f=class{constructor(e,t){n(this,`cache`,void 0),this.cache=new i({max:e,maxSize:t,sizeCalculation:e=>{let t=e.content,n=typeof t==`string`?t:t==null?``:typeof t==`object`?JSON.stringify(t):String(t);return Math.max(1,Buffer.byteLength(n,`utf8`))}})}get(e){return this.cache.get(a(e))}set(e,t){return this.cache.set(a(e),t),this}has(e){return this.cache.has(a(e))}delete(e){return this.cache.delete(a(e))}clear(){this.cache.clear()}get size(){return this.cache.size}get max(){return this.cache.max}get maxSize(){return this.cache.maxSize}get calculatedSize(){return this.cache.calculatedSize}keys(){return this.cache.keys()}entries(){return this.cache.entries()}dump(){return this.cache.dump()}load(e){this.cache.load(e)}}}));export{o as a,l as i,c as n,p as o,s as r,u as s,f as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./cwd--iizewsn.js";import{n as r,o as i}from"./fileStateCache-C7-TxF8G.js";import{relative as a}from"path";async function o(e,t){let i=t.readFileState?r(t.readFileState):[];return i.length===0?{type:`text`,value:`No files in context`}:{type:`text`,value:`Files in context:\n${i.map(e=>a(n(),e)).join(`
|
|
2
|
+
`)}`}}e((()=>{t(),i()}))();export{o as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as e,I as t,L as n,M as r,N as i,P as a,R as o,j as s,z as c}from"./paths-BBvuDQl9.js";r();export{s as getEventSamplingConfig,i as initialize1PEventLogging,a as is1PEventLoggingEnabled,e as logEventTo1P,t as logGrowthBookExperimentTo1P,n as reinitialize1PEventLoggingIfConfigChanged,o as shouldSampleEvent,c as shutdown1PEventLogging};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{L as n,V as r,d as i,s as a}from"./debug-UI3T040K.js";import{O as o,k as s}from"./rcDebugLog-CPKZCtR8.js";import{i as c}from"./workSecret-mS2OrpxF.js";import{t as l}from"./ccrClient-BaWg4E9-.js";import{n as u,t as d}from"./SSETransport-BpnapvlK.js";u(),a(),r(),o();function f(e){return{write:t=>e.write(t),writeBatch:t=>e.writeBatch(t),close:()=>e.close(),isConnectedStatus:()=>e.isConnectedStatus(),getStateLabel:()=>e.getStateLabel(),setOnData:t=>e.setOnData(t),setOnClose:t=>e.setOnClose(t),setOnConnect:t=>e.setOnConnect(t),connect:()=>void e.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return e.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function p(e){let{sessionUrl:t,ingressToken:r,sessionId:a,initialSequenceNum:o,getAuthToken:u}=e,f;u?f=()=>{let e=u();return e?{Authorization:`Bearer ${e}`}:{}}:s(r);let p=e.epoch??await c(t,r);i(`[bridge:repl] CCR v2: worker sessionId=${a} epoch=${p}${e.epoch===void 0?` (via registerWorker)`:` (from /bridge)`}`);let m=new URL(t);m.pathname=m.pathname.replace(/\/$/,``)+`/worker/events/stream`;let h=new d(m,{},a,void 0,o,f),g,_=new l(h,new URL(t),{getAuthHeaders:f,heartbeatIntervalMs:e.heartbeatIntervalMs,heartbeatJitterFraction:e.heartbeatJitterFraction,onEpochMismatch:()=>{i(`[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery`);try{_.close(),h.close(),g?.(4090)}catch(e){i(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${n(e)}`,{level:`error`})}throw Error(`epoch superseded`)}});h.setOnEvent(e=>{_.reportDelivery(e.event_id,`received`),_.reportDelivery(e.event_id,`processed`)});let v,y=!1,b=!1;return{write(e){return _.writeEvent(e)},async writeBatch(e){for(let t of e){if(b)break;await _.writeEvent(t)}},close(){b=!0,_.close(),h.close()},isConnectedStatus(){return y},getStateLabel(){return h.isClosedStatus()?`closed`:h.isConnectedStatus()?y?`connected`:`init`:`connecting`},setOnData(e){h.setOnData(e)},setOnClose(e){g=e,h.setOnClose(t=>{_.close(),e(t??4092)})},setOnConnect(e){v=e},getLastSequenceNum(){return h.getLastSequenceNum()},droppedBatchCount:0,reportState(e){_.reportState(e)},reportMetadata(e){_.reportMetadata(e)},reportDelivery(e,t){_.reportDelivery(e,t)},flush(){return _.flush()},connect(){e.outboundOnly||h.connect(),_.initialize(p).then(()=>{y=!0,i(`[bridge:repl] v2 transport ready for writes (epoch=${p}, sse=${h.isConnectedStatus()?`open`:`opening`})`),v?.()},e=>{i(`[bridge:repl] CCR v2 initialize failed: ${n(e)}`,{level:`error`}),_.close(),h.close(),g?.(4091)})}}}e();var m=class{constructor(){t(this,`_active`,!1),t(this,`_pending`,[])}get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...e){return this._active?(this._pending.push(...e),!0):!1}drop(){this._active=!1;let e=this._pending.length;return this._pending.length=0,e}deactivate(){this._active=!1}};export{f as n,p as r,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{_ as t,a as n,b as r,i,r as a,s as o,t as s}from"./client-_sjL0I7A.js";var c=e((()=>{r()})),l,u,d=e((()=>{c(),l=e=>(l=Array.isArray,l(e)),u=l}));function*f(e){if(!e)return;if(p in e){let{values:t,nulls:n}=e;yield*t.entries();for(let e of n)yield[e,null];return}let t=!1,n;e instanceof Headers?n=e.entries():u(e)?n=e:(t=!0,n=Object.entries(e??{}));for(let e of n){let n=e[0];if(typeof n!=`string`)throw TypeError(`expected header name to be a string`);let r=u(e[1])?e[1]:[e[1]],i=!1;for(let e of r)e!==void 0&&(t&&!i&&(i=!0,yield[n,null]),yield[n,e])}}var p,m,h=e((()=>{d(),p=Symbol.for(`brand.privateNullableHeaders`),m=e=>{let t=new Headers,n=new Set;for(let r of e){let e=new Set;for(let[i,a]of f(r)){let r=i.toLowerCase();e.has(r)||(t.delete(i),e.add(r)),a===null?(t.delete(i),n.add(r)):(t.append(i,a),n.delete(r))}}return{[p]:!0,values:t,nulls:n}}})),g=e((()=>{c()})),_,v=e((()=>{_=e=>{if(globalThis.process!==void 0)return globalThis.process.env?.[e]?.trim()??void 0;if(globalThis.Deno!==void 0)return globalThis.Deno.env?.get?.(e)?.trim()}})),y=e((()=>{d()})),b=e((()=>{})),x=e((()=>{})),S=e((()=>{d(),g(),v(),y(),b(),x()}));function C(e){let t=new n(e);return delete t.batches,t}function w(e){let t=new o(e);return delete t.messages.batches,t}var T,E=e((()=>{h(),c(),S(),a(),i(),T=class extends s{constructor({baseURL:e=_(`ANTHROPIC_FOUNDRY_BASE_URL`),apiKey:n=_(`ANTHROPIC_FOUNDRY_API_KEY`),resource:r=_(`ANTHROPIC_FOUNDRY_RESOURCE`),azureADTokenProvider:i,dangerouslyAllowBrowser:a,...o}={}){if(typeof i==`function`&&(a=!0),!i&&!n)throw new t("Missing credentials. Please pass one of `apiKey` and `azureTokenProvider`, or set the `ANTHROPIC_FOUNDRY_API_KEY` environment variable.");if(i&&n)throw new t("The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.");if(!e){if(!r)throw new t("Must provide one of the `baseURL` or `resource` arguments, or the `ANTHROPIC_FOUNDRY_RESOURCE` environment variable");e=`https://${r}.services.ai.azure.com/anthropic/`}else if(r)throw new t(`baseURL and resource are mutually exclusive`);super({apiKey:i??n,baseURL:e,...o,...a===void 0?{}:{dangerouslyAllowBrowser:a}}),this.resource=null,this.messages=C(this),this.beta=w(this),this.models=void 0}async authHeaders(){if(typeof this._options.apiKey==`function`){let e;try{e=await this._options.apiKey()}catch(e){throw e instanceof t?e:new t(`Failed to get token from azureADTokenProvider: ${e.message}`,{cause:e})}if(typeof e!=`string`||!e)throw new t(`Expected azureADTokenProvider function argument to return a string but it returned ${e}`);return m([{Authorization:`Bearer ${e}`}])}if(typeof this._options.apiKey==`string`)return m([{"x-api-key":this.apiKey}])}validateHeaders(){}}}));e((()=>{E(),E()}))();export{T as AnthropicFoundry};
|
|
@@ -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";var r=e(t(),1),i=n(),a=(0,r.createContext)(void 0);function o({getFpsMetrics:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s(){return(0,r.useContext)(a)}export{s as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";function t(e){return Array.isArray?Array.isArray(e):d(e)===`[object Array]`}function n(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function r(e){return e==null?``:n(e)}function i(e){return typeof e==`string`}function a(e){return typeof e==`number`}function o(e){return e===!0||e===!1||c(e)&&d(e)==`[object Boolean]`}function s(e){return typeof e==`object`}function c(e){return s(e)&&e!==null}function l(e){return e!=null}function u(e){return!e.trim().length}function d(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}function f(e){let n=null,r=null,a=null,o=1,s=null;if(i(e)||t(e))a=e,n=p(e),r=m(e);else{if(!O.call(e,`name`))throw Error(pe(`name`));let t=e.name;if(a=t,O.call(e,`weight`)&&(o=e.weight,o<=0))throw Error(me(t));n=p(t),r=m(t),s=e.getFn}return{path:n,id:r,weight:o,src:a,getFn:s}}function p(e){return t(e)?e:e.split(`.`)}function m(e){return t(e)?e.join(`.`):e}function h(e,n){let s=[],c=!1,u=(e,n,d,f)=>{if(l(e))if(!n[d])s.push(f===void 0?e:{v:e,i:f});else{let p=e[n[d]];if(!l(p))return;if(d===n.length-1&&(i(p)||a(p)||o(p)||typeof p==`bigint`))s.push(f===void 0?r(p):{v:r(p),i:f});else if(t(p)){c=!0;for(let e=0,t=p.length;e<t;e+=1)u(p[e],n,d+1,e)}else n.length&&u(p,n,d+1,f)}};return u(e,i(n)?n.split(`.`):n,0),c?s:s[0]}function g(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(j).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}function _(e,t,{getFn:n=A.getFn,fieldNormWeight:r=A.fieldNormWeight}={}){let i=new M({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(f)),i.setSources(t),i.create(),i}function v(e,{getFn:t=A.getFn,fieldNormWeight:n=A.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new M({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function ee(e=[],t=A.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function y(e,t,n,{location:r=A.location,distance:i=A.distance,threshold:a=A.threshold,findAllMatches:o=A.findAllMatches,minMatchCharLength:s=A.minMatchCharLength,includeMatches:c=A.includeMatches,ignoreLocation:l=A.ignoreLocation}={}){if(t.length>N)throw Error(fe(N));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=ee(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function b(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function x(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}function S(e,t){let n=e.match(t);return n?n[1]:null}function C(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function te(e,t={}){return e.replace(/\\\|/g,xe).split(Se).map(e=>{let n=C(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<K;){let e=G[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<K;){let e=G[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}function w(...e){q.push(...e)}function T(e,t){for(let n=0,r=q.length;n<r;n+=1){let r=q[n];if(r.condition(e,t))return new r(e,t)}return new L(e,t)}function ne(e,n,{auto:r=!0}={}){let a=e=>{if(i(e)){let t={keyId:null,pattern:e};return r&&(t.searcher=T(e,n)),t}let o=Object.keys(e),s=Te(e);if(!s&&o.length>1&&!X(e))return a(Q(e));if(Z(e)){let t=s?e[Y.PATH]:o[0],a=s?e[Y.PATTERN]:e[t];if(!i(a))throw Error(de(t));let c={keyId:m(t),pattern:a};return r&&(c.searcher=T(a,n)),c}let c={children:[],operator:o[0]};return o.forEach(n=>{let r=e[n];t(r)&&r.forEach(e=>{c.children.push(a(e))})}),c};return X(e)||(e=Q(e)),a(e)}function E(e,{ignoreFieldNorm:t=A.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function re(e,{ignoreFieldNorm:t=A.ignoreFieldNorm}){e.forEach(e=>{e.score=E(e.matches,{ignoreFieldNorm:t})})}function ie(e,t){let n=e.matches;t.matches=[],l(n)&&n.forEach(e=>{if(!l(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ae(e,t){t.score=e.score}function oe(e,t,{includeMatches:n=A.includeMatches,includeScore:r=A.includeScore}={}){let i=[];return n&&i.push(ie),r&&i.push(ae),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}function D({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=I(n)),n.match(De)||[]}}}function se(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function ce(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function le(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var ue,de,fe,pe,me,O,he,ge,_e,ve,k,A,j,M,N,P,F,I,L,R,z,B,V,H,ye,be,U,W,G,K,xe,Se,Ce,we,q,J,Y,X,Te,Z,Q,Ee,De,$,Oe,ke=e((()=>{ue=`Incorrect 'index' type`,de=e=>`Invalid value for key ${e}`,fe=e=>`Pattern length exceeds max of ${e}.`,pe=e=>`Missing ${e} property in key`,me=e=>`Property 'weight' in key '${e}' must be a positive integer`,O=Object.prototype.hasOwnProperty,he=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=f(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}},ge={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_e={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ve={location:0,threshold:.6,distance:100},k={useExtendedSearch:!1,useTokenSearch:!1,getFn:h,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},A=Object.freeze({..._e,...ge,...ve,...k}),j=/[^ ]+/g,M=class{constructor({getFn:e=A.getFn,fieldNormWeight:t=A.fieldNormWeight}={}){this.norm=g(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();i(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!l(e)||u(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,n){let a={i:n,$:{}};this.keys.forEach((n,o)=>{let s=n.getFn?n.getFn(e):this.getFn(e,n.path);if(l(s)){if(t(s)){let e=[];for(let t=0,n=s.length;t<n;t+=1){let n=s[t];if(l(n)){if(i(n)){if(!u(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(l(n.v)){let t=i(n.v)?n.v:r(n.v);if(!u(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}a.$[o]=e}else if(i(s)&&!u(s)){let e={v:s,n:this.norm.get(s)};a.$[o]=e}}}),this.records.push(a)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}},N=32,P={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},F=RegExp(`[`+Object.keys(P).join(``)+`]`,`g`),I=String.prototype.normalize?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(F,e=>P[e]):e=>e,L=class{constructor(e,{location:t=A.location,threshold:n=A.threshold,distance:r=A.distance,includeMatches:i=A.includeMatches,findAllMatches:a=A.findAllMatches,minMatchCharLength:o=A.minMatchCharLength,isCaseSensitive:s=A.isCaseSensitive,ignoreDiacritics:c=A.ignoreDiacritics,ignoreLocation:l=A.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?I(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:b(e),startIndex:t})},d=this.pattern.length;if(d>N){let e=0,t=d%N,n=d-t;for(;e<n;)u(this.pattern.substr(e,N),e),e+=N;if(t){let e=d-N;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?I(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=y(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=x(u)),p}},R=class{constructor(e){this.pattern=e}static isMultiMatch(e){return S(e,this.multiRegex)}static isSingleMatch(e){return S(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}},z=class extends R{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},B=class extends R{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},V=class extends R{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},H=class extends R{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},ye=class extends R{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},be=class extends R{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},U=class extends R{constructor(e,{location:t=A.location,threshold:n=A.threshold,distance:r=A.distance,includeMatches:i=A.includeMatches,findAllMatches:a=A.findAllMatches,minMatchCharLength:o=A.minMatchCharLength,isCaseSensitive:s=A.isCaseSensitive,ignoreDiacritics:c=A.ignoreDiacritics,ignoreLocation:l=A.ignoreLocation}={}){super(e),this._bitapSearch=new L(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},W=class extends R{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},G=[z,W,V,H,be,ye,B,U],K=G.length,xe=`\0`,Se=`|`,Ce=new Set([U.type,W.type]),we=class{constructor(e,{isCaseSensitive:t=A.isCaseSensitive,ignoreDiacritics:n=A.ignoreDiacritics,includeMatches:r=A.includeMatches,minMatchCharLength:i=A.minMatchCharLength,ignoreLocation:a=A.ignoreLocation,findAllMatches:o=A.findAllMatches,location:s=A.location,threshold:c=A.threshold,distance:l=A.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?I(e):e,this.pattern=e,this.query=te(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?I(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l){a+=1,s+=d;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(Ce.has(e)?o.push(...u):o.push(u))}else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=x(o)),e}}return{isMatch:!1,score:1}}},q=[],J={AND:`$and`,OR:`$or`},Y={PATH:`$path`,PATTERN:`$val`},X=e=>!!(e[J.AND]||e[J.OR]),Te=e=>!!e[Y.PATH],Z=e=>!t(e)&&s(e)&&!X(e),Q=e=>({[J.AND]:Object.keys(e).map(t=>({[t]:e[t]}))}),Ee=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}},De=/\b\w+\b/g,$=class{constructor(e,t,n){this.options={...A,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new he(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=T(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof M))throw Error(ue);if(this._myIndex=t||_(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=D({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=se(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(l(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=D({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});ce(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){if(this._invertedIndex)for(let e of n)le(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&le(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:o,shouldSort:s,sortFn:c,ignoreFieldNorm:l}=this.options;if(i(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return a(n)&&n>-1&&(e=e.slice(0,n)),e}let u=a(n)&&n>0&&i(e),d;if(u){let t=new Ee(n);i(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:l}),d=t.extractSorted(c)}else d=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),re(d,{ignoreFieldNorm:l}),s&&d.sort(c),a(n)&&n>-1&&(d=d.slice(0,n));return oe(d,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!l(e))return;let{isMatch:s,score:c,indices:u}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:u}]};t?(r.score=E(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=ne(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===J.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(l(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!l(e))return;let s=[],c=!1,u=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(u=!0)):c=!0}),!(u&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=E(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:n,searcher:r}){if(!l(n))return[];let i=[];if(t(n))n.forEach(({v:t,i:n,n:a})=>{if(!l(t))return;let{isMatch:o,score:s,indices:c,hasInverse:u}=r.searchIn(t);o&&i.push({score:s,key:e,value:t,idx:n,norm:a,indices:c,hasInverse:u})});else{let{v:t,n:a}=n,{isMatch:o,score:s,indices:c,hasInverse:l}=r.searchIn(t);o&&i.push({score:s,key:e,value:t,norm:a,indices:c,hasInverse:l})}return i}},Oe=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=D({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new L(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=x(t)),o}},$.version=`7.3.0`,$.createIndex=_,$.parseIndex=v,$.config=A,$.match=function(e,t,n){return T(e,{...A,...n}).searchIn(t)},$.parseQuery=ne,w(we),w(Oe),$.use=function(...e){e.forEach(e=>w(e))}}));export{ke as n,$ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t}from"./gates-CSKxLmMJ.js";e();export{t as getChicagoEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{S as r,g as i}from"./paths-BBvuDQl9.js";function a(){return{...u,...i(`tengu_malort_pedway`,u)}}function o(){return!0}function s(){return process.env.USER_TYPE===`ant`&&process.env.MONOREPO_ROOT_DIR&&!n(process.env.ALLOW_ANT_COMPUTER_USE_MCP)?!1:o()&&a().enabled}function c(){let{enabled:e,coordinateMode:t,...n}=a();return n}function l(){return d??(d=a().coordinateMode),d}var u,d,f=e((()=>{r(),t(),u={enabled:!0,pixelValidation:!1,clipboardPasteMultiline:!0,mouseAnimation:!0,hideBeforeAction:!0,autoTargetDisplay:!0,clipboardGuard:!0,coordinateMode:`pixels`}}));export{f as i,s as n,c as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{L as t,V as n,d as r,s as i}from"./debug-UI3T040K.js";import{o as a,u as o}from"./proxy-CfZp-wce.js";import{Ko as s,Lo as c,NE as l,PE as u,Wo as d,__ as f,co as p,g_ as m,h_ as h,st as g,ut as _,v_ as v}from"./loadAgentsDir-DI1a76pd.js";import{G as y,H as b,K as x,P as S,U as C,W as w,q as T}from"./rcDebugLog-CPKZCtR8.js";import{n as E,r as D}from"./SSETransport-BpnapvlK.js";import{randomUUID as O}from"crypto";function k(){return(process.env.GEMINI_BASE_URL||M).replace(/\/+$/,``)}function A(e){let t=e.replace(/^\/+/,``);return t.startsWith(`models/`)?t:`models/${t}`}async function*j(e){let n=await(e.fetchOverride??fetch)(`${k()}/${A(e.model)}:streamGenerateContent?alt=sse`,{method:`POST`,headers:{"Content-Type":`application/json`,"x-goog-api-key":process.env.GEMINI_API_KEY||``},body:JSON.stringify(e.body),signal:e.signal,...a({forAnthropicAPI:!1})});if(!n.ok){let e=await n.text();throw Error(`Gemini API request failed (${n.status} ${n.statusText}): ${e||`empty response body`}`)}if(!n.body)throw Error(`Gemini API returned no response body`);let r=n.body.getReader(),i=new TextDecoder,o=``;try{for(;;){let{done:e,value:n}=await r.read();if(e)break;o+=i.decode(n,N);let{frames:a,remaining:s}=D(o);o=s;for(let e of a)if(!(!e.data||e.data===`[DONE]`))try{yield JSON.parse(e.data)}catch(e){throw Error(`Failed to parse Gemini SSE payload: ${t(e)}`)}}o+=i.decode();let{frames:e}=D(o);for(let n of e)if(!(!n.data||n.data===`[DONE]`))try{yield JSON.parse(n.data)}catch(e){throw Error(`Failed to parse trailing Gemini SSE payload: ${t(e)}`)}}finally{r.releaseLock()}}var M,N,P=e((()=>{E(),n(),o(),M=`https://generativelanguage.googleapis.com/v1beta`,N={stream:!0}}));async function*F(e,t,n,i,a,o){try{let c=T(a.model),l=s(e,n),p=await Promise.all(n.map(e=>_(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model}))),g=p.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),{contents:v,systemInstruction:S}=y(l,t),E=w(g),D=C(a.toolChoice),k=j({model:c,signal:i,fetchOverride:a.fetchOverride,body:{contents:v,...S&&{systemInstruction:S},...E.length>0&&{tools:E},...D&&{toolConfig:{functionCallingConfig:D}},generationConfig:{...a.temperatureOverride!==void 0&&{temperature:a.temperatureOverride},...o.type!==`disabled`&&{thinkingConfig:{includeThoughts:!0,...o.type===`enabled`&&{thinkingBudget:o.budgetTokens}}}}}});r(`[Gemini] Calling model=${c}, messages=${v.length}, tools=${E.length}`);let A=b(k,c),M={},N=[],P,F=0,I=Date.now();for await(let e of A){switch(e.type){case`message_start`:P=e.message,F=Date.now()-I;break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.type===`thinking`?r.signature=n.signature:r[x]=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let r={message:{...P,content:d([t],n,a.agentId)},requestId:void 0,type:`assistant`,uuid:O(),timestamp:new Date().toISOString()};N.push(r),yield r;break}case`message_delta`:case`message_stop`:break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:F}:void 0}}u(a.langfuseTrace??null,{model:c,provider:`gemini`,input:h(l,t),output:m(N),usage:{input_tokens:0,output_tokens:0},startTime:new Date(I),endTime:new Date,completionStartTime:F>0?new Date(I+F):void 0,tools:f(p),thinking:o.type===`disabled`?void 0:{type:o.type,...o.type===`enabled`&&{budgetTokens:o.budgetTokens}}})}catch(e){let t=e instanceof Error?e.message:String(e);r(`[Gemini] Error: ${t}`,{level:`error`}),yield p({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{g(),i(),c(),l(),v(),P(),S()}))();export{F as queryModelGemini};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{g as t}from"./client-_sjL0I7A.js";import{d as n,s as r}from"./debug-UI3T040K.js";import{t as i}from"./sdk-DEtgRZvI.js";import{Lo as a,Ml as o,Pl as s,To as c,bo as l,jl as u}from"./loadAgentsDir-DI1a76pd.js";async function d(){try{let{getResolvedLanguage:e}=await import(`./language-Cf6bMI4N.js`);return e()===`zh`?m:p}catch{return p}}async function f(e){let r=u();if(!r)return n(`[recap] no CacheSafeParams saved, skipping`),{kind:`no-turn`};let i=new AbortController;e.addEventListener(`abort`,()=>i.abort(),{once:!0});try{let{messages:t}=await s({promptMessages:[l({content:await d()})],cacheSafeParams:r,canUseTool:async()=>({behavior:`deny`,message:`Recap cannot use tools`,decisionReason:{type:`other`,reason:`away_summary`}}),overrides:{abortController:i},querySource:`away_summary`,forkLabel:`away_summary`,maxTurns:1,skipCacheWrite:!0,skipTranscript:!0});if(e.aborted)return{kind:`aborted`};let n=t.find(e=>e.type===`assistant`&&e.isApiErrorMessage);if(n)return{kind:`api-error`,text:c(n)??``};let a=t.filter(e=>e.type===`assistant`&&!e.isApiErrorMessage).pop();if(!a)return{kind:`failed`};let o=c(a);return!o||o.trim().length===0?{kind:`failed`}:{kind:`ok`,text:o.trim()}}catch(r){return r instanceof t||e.aborted||i.signal.aborted?{kind:`aborted`}:(n(`[recap] generation failed: ${r}`),{kind:`failed`})}}var p,m;e((()=>{i(),r(),o(),a(),p=`The user stepped away and is coming back. Recap in under 40 words, 1-2 plain sentences, no markdown. Lead with the overall goal and current task, then the one next action. Skip root-cause narrative, fix internals, secondary to-dos, and em-dash tangents.`,m=`用户离开后回来了。用中文写 1-2 句话,不超过 60 字,无 markdown。先说明高层目标和当前任务,再说明下一步操作。跳过根因分析和次要待办。`}))();export{f as generateRecap};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{L as t,V as n,d as r,s as i}from"./debug-UI3T040K.js";import{s as a,u as o}from"./types-Csi32ZXh.js";import{Co as s,Lo as c,jO as l,nt as u,tt as d}from"./loadAgentsDir-DI1a76pd.js";import{X as f}from"./rcDebugLog-CPKZCtR8.js";import{r as p,t as m}from"./sessionTitle-zUVSAHO7.js";async function h(e,n){let i=m(e);if(!i)return null;try{let e=await u({systemPrompt:f([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:i,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:n,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),t=o(Array.isArray(e.message.content)?s(e.message.content):e.message.content);return t&&typeof t==`object`&&`name`in t&&typeof t.name==`string`?t.name:null}catch(e){return r(`generateSessionName failed: ${t(e)}`,{level:`error`}),null}}var g=e((()=>{d(),i(),n(),a(),c(),p(),l()}));export{g as n,h as t};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,n,r}from"./execFileNoThrow-CuQN1sz8.js";function i(e){if(e<=1)return!1;try{return process.kill(e,0),!0}catch{return!1}}async function a(e,t=10){if(process.platform===`win32`){let r=await n(`powershell.exe`,[`-NoProfile`,`-Command`,`
|
|
2
|
+
$pid = ${String(e)}
|
|
3
|
+
$ancestors = @()
|
|
4
|
+
for ($i = 0; $i -lt ${t}; $i++) {
|
|
5
|
+
$proc = Get-CimInstance Win32_Process -Filter "ProcessId=$pid" -ErrorAction SilentlyContinue
|
|
6
|
+
if (-not $proc -or -not $proc.ParentProcessId -or $proc.ParentProcessId -eq 0) { break }
|
|
7
|
+
$pid = $proc.ParentProcessId
|
|
8
|
+
$ancestors += $pid
|
|
9
|
+
}
|
|
10
|
+
$ancestors -join ','
|
|
11
|
+
`.trim()],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.trim().split(`,`).filter(Boolean).map(e=>parseInt(e,10)).filter(e=>!isNaN(e))}let r=await n(`sh`,[`-c`,`pid=${String(e)}; for i in $(seq 1 ${t}); do ppid=$(ps -o ppid= -p $pid 2>/dev/null | tr -d ' '); if [ -z "$ppid" ] || [ "$ppid" = "0" ] || [ "$ppid" = "1" ]; then break; fi; echo $ppid; pid=$ppid; done`],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.trim().split(`
|
|
12
|
+
`).filter(Boolean).map(e=>parseInt(e,10)).filter(e=>!isNaN(e))}function o(e){try{let n=String(e),r=t(process.platform===`win32`?`powershell.exe -NoProfile -Command "(Get-CimInstance Win32_Process -Filter \\"ProcessId=${n}\\").CommandLine"`:`ps -o command= -p ${n}`,{timeout:1e3});return r?r.trim():null}catch{return null}}async function s(e,t=10){if(process.platform===`win32`){let r=await n(`powershell.exe`,[`-NoProfile`,`-Command`,`
|
|
13
|
+
$currentPid = ${String(e)}
|
|
14
|
+
$commands = @()
|
|
15
|
+
for ($i = 0; $i -lt ${t}; $i++) {
|
|
16
|
+
$proc = Get-CimInstance Win32_Process -Filter "ProcessId=$currentPid" -ErrorAction SilentlyContinue
|
|
17
|
+
if (-not $proc) { break }
|
|
18
|
+
if ($proc.CommandLine) { $commands += $proc.CommandLine }
|
|
19
|
+
if (-not $proc.ParentProcessId -or $proc.ParentProcessId -eq 0) { break }
|
|
20
|
+
$currentPid = $proc.ParentProcessId
|
|
21
|
+
}
|
|
22
|
+
$commands -join [char]0
|
|
23
|
+
`.trim()],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.split(`\0`).filter(Boolean)}let r=await n(`sh`,[`-c`,`currentpid=${String(e)}; for i in $(seq 1 ${t}); do cmd=$(ps -o command= -p $currentpid 2>/dev/null); if [ -n "$cmd" ]; then printf '%s\\0' "$cmd"; fi; ppid=$(ps -o ppid= -p $currentpid 2>/dev/null | tr -d ' '); if [ -z "$ppid" ] || [ "$ppid" = "0" ] || [ "$ppid" = "1" ]; then break; fi; currentpid=$ppid; done`],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.split(`\0`).filter(Boolean)}var c=e((()=>{r()}));export{i as a,c as i,a as n,o as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,o as n}from"./esm-CJlBxjtx.js";import{n as r,t as i}from"./execAsync-BkA6ogic.js";import{promises as a}from"fs";async function o(){try{return(await a.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){n.debug(`error reading machine id: ${e}`)}try{return(await i(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){n.debug(`error reading machine id: ${e}`)}}e((()=>{r(),t()}))();export{o as getMachineId};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,o as n}from"./esm-CJlBxjtx.js";import{n as r,t as i}from"./execAsync-BkA6ogic.js";async function a(){try{let e=(await i(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
|
+
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){n.debug(`error reading machine id: ${e}`)}}e((()=>{r(),t()}))();export{a as getMachineId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,o as n}from"./esm-CJlBxjtx.js";import{promises as r}from"fs";async function i(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await r.readFile(e,{encoding:`utf8`})).trim()}catch(e){n.debug(`error reading machine id: ${e}`)}}e((()=>{t()}))();export{i as getMachineId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,o as n}from"./esm-CJlBxjtx.js";async function r(){n.debug(`could not read machine-id: unsupported platform`)}e((()=>{t()}))();export{r as getMachineId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,o as n}from"./esm-CJlBxjtx.js";import{n as r,t as i}from"./execAsync-BkA6ogic.js";import*as a from"process";async function o(){let e=`%windir%\\System32\\REG.exe`;a.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in a.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await i(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){n.debug(`error reading machine id: ${e}`)}}e((()=>{r(),t()}))();export{o as getMachineId};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{Nr as a,cn as o}from"./state-sIHsFpDu.js";import{E as s,X as ee,Y as te,d as c,h as l,p as u,s as ne,w as re}from"./debug-UI3T040K.js";import{n as ie,t as d}from"./cwd--iizewsn.js";import{r as ae,t as oe}from"./which-DqSAIvp2.js";import{o as se}from"./log-CzsijfHZ.js";import{n as f,t as ce}from"./memoize-DxwLawI2.js";import{r as le,t as p}from"./execFileNoThrow-CuQN1sz8.js";import{basename as ue,dirname as m,join as h,resolve as g,sep as _}from"path";import{readFileSync as v,realpathSync as y,statSync as de,unwatchFile as fe,watchFile as pe}from"fs";import{createHash as me}from"crypto";import{readFile as b,readdir as he,stat as ge}from"fs/promises";function x(e,t,n){let r=_e();if(!r)return;let i={timestamp:new Date().toISOString(),level:e,event:t,data:n??{}},a=u(),o=s(i)+`
|
|
2
|
+
`;try{a.appendFileSync(r,o)}catch{try{a.mkdirSync(m(r)),a.appendFileSync(r,o)}catch{}}}function _e(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function ve(e,t,n){let r=Date.now();x(`info`,`${e}_started`);try{let i=await t(),a=n?n(i):{};return x(`info`,`${e}_completed`,{duration_ms:Date.now()-r,...a}),i}catch(t){throw x(`error`,`${e}_failed`,{duration_ms:Date.now()-r}),t}}var S=e((()=>{l(),re()}));function ye(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return C.has(t)}var C,be=e((()=>{C=new Set(`.png,.jpg,.jpeg,.gif,.bmp,.ico,.webp,.tiff,.tif,.mp4,.mov,.avi,.mkv,.webm,.wmv,.flv,.m4v,.mpeg,.mpg,.mp3,.wav,.ogg,.flac,.aac,.m4a,.wma,.aiff,.opus,.zip,.tar,.gz,.bz2,.7z,.rar,.xz,.z,.tgz,.iso,.exe,.dll,.so,.dylib,.bin,.o,.a,.obj,.lib,.app,.msi,.deb,.rpm,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,.ttf,.otf,.woff,.woff2,.eot,.pyc,.pyo,.class,.jar,.war,.ear,.node,.wasm,.rlib,.sqlite,.sqlite3,.db,.mdb,.idx,.psd,.ai,.eps,.sketch,.fig,.xd,.blend,.3ds,.max,.swf,.fla,.lockb,.dat,.data`.split(`,`))}));async function w(e,t,n,r){try{return xe(await b(h(e,`config`),`utf-8`),t,n,r)}catch{return null}}function xe(e,t,n,r){let i=e.split(`
|
|
3
|
+
`),a=t.toLowerCase(),o=r.toLowerCase(),s=!1;for(let e of i){let t=e.trim();if(t.length===0||t[0]===`#`||t[0]===`;`)continue;if(t[0]===`[`){s=Te(t,a,n);continue}if(!s)continue;let r=Se(t);if(r&&r.key.toLowerCase()===o)return r.value}return null}function Se(e){let t=0;for(;t<e.length&&Ee(e[t]);)t++;if(t===0)return null;let n=e.slice(0,t);for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;if(t>=e.length||e[t]!==`=`)return null;for(t++;t<e.length&&(e[t]===` `||e[t]===` `);)t++;return{key:n,value:Ce(e,t)}}function Ce(e,t){let n=``,r=!1,i=t;for(;i<e.length;){let t=e[i];if(!r&&(t===`#`||t===`;`))break;if(t===`"`){r=!r,i++;continue}if(t===`\\`&&i+1<e.length){let t=e[i+1];if(r){switch(t){case`n`:n+=`
|
|
4
|
+
`;break;case`t`:n+=` `;break;case`b`:n+=`\b`;break;case`"`:n+=`"`;break;case`\\`:n+=`\\`;break;default:n+=t;break}i+=2;continue}if(t===`\\`){n+=`\\`,i+=2;continue}}n+=t,i++}return r||(n=we(n)),n}function we(e){let t=e.length;for(;t>0&&(e[t-1]===` `||e[t-1]===` `);)t--;return e.slice(0,t)}function Te(e,t,n){let r=1;for(;r<e.length&&e[r]!==`]`&&e[r]!==` `&&e[r]!==` `&&e[r]!==`"`;)r++;if(e.slice(1,r).toLowerCase()!==t)return!1;if(n===null)return r<e.length&&e[r]===`]`;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r>=e.length||e[r]!==`"`)return!1;r++;let i=``;for(;r<e.length&&e[r]!==`"`;){if(e[r]===`\\`&&r+1<e.length){let t=e[r+1];if(t===`\\`||t===`"`){i+=t,r+=2;continue}i+=t,r+=2;continue}i+=e[r],r++}return r>=e.length||e[r]!==`"`||(r++,r>=e.length||e[r]!==`]`)?!1:i===n}function Ee(e){return e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`-`}var T=e((()=>{}));function De(){N.clear()}async function E(e){let t=g(e??d()),n=N.get(t);if(n!==void 0)return n;let r=V(t);if(!r)return N.set(t,null),null;let i=h(r,`.git`);try{if((await ge(i)).isFile()){let e=(await b(i,`utf-8`)).trim();if(e.startsWith(`gitdir:`)){let n=g(r,e.slice(7).trim());return N.set(t,n),n}}return N.set(t,i),i}catch{return N.set(t,null),null}}function D(e){return!(!e||e.startsWith(`-`)||e.startsWith(`/`)||e.includes(`..`)||e.split(`/`).some(e=>e===`.`||e===``)||!/^[a-zA-Z0-9/._+@-]+$/.test(e))}function O(e){return/^[0-9a-f]{40}$/.test(e)||/^[0-9a-f]{64}$/.test(e)}async function k(e){try{let t=(await b(h(e,`HEAD`),`utf-8`)).trim();if(t.startsWith(`ref:`)){let n=t.slice(4).trim();if(n.startsWith(`refs/heads/`)){let e=n.slice(11);return D(e)?{type:`branch`,name:e}:null}if(!D(n))return null;let r=await A(e,n);return r?{type:`detached`,sha:r}:{type:`detached`,sha:``}}return O(t)?{type:`detached`,sha:t}:null}catch{return null}}async function A(e,t){let n=await j(e,t);if(n)return n;let r=await M(e);return r&&r!==e?j(r,t):null}async function j(e,t){try{let n=(await b(h(e,t),`utf-8`)).trim();if(n.startsWith(`ref:`)){let t=n.slice(4).trim();return D(t)?A(e,t):null}return O(n)?n:null}catch{}try{let n=await b(h(e,`packed-refs`),`utf-8`);for(let e of n.split(`
|
|
5
|
+
`)){if(e.startsWith(`#`)||e.startsWith(`^`))continue;let n=e.indexOf(` `);if(n!==-1&&e.slice(n+1)===t){let t=e.slice(0,n);return O(t)?t:null}}}catch{}return null}async function M(e){try{return g(e,(await b(h(e,`commondir`),`utf-8`)).trim())}catch{return null}}async function Oe(e,t,n){try{let r=(await b(h(e,t),`utf-8`)).trim();if(r.startsWith(`ref:`)){let e=r.slice(4).trim();if(e.startsWith(n)){let t=e.slice(n.length);return D(t)?t:null}}}catch{}return null}async function ke(){let e=await E();if(!e)return`HEAD`;let t=await k(e);return t&&t.type===`branch`?t.name:`HEAD`}async function Ae(){let e=await E();if(!e)return``;let t=await k(e);return t?t.type===`branch`?await A(e,`refs/heads/${t.name}`)??``:t.sha:``}async function je(){let e=await E();if(!e)return null;let t=await w(e,`remote`,`origin`,`url`);if(t)return t;let n=await M(e);return n&&n!==e?w(n,`remote`,`origin`,`url`):null}async function Me(){let e=await E();if(!e)return`main`;let t=await M(e)??e,n=await Oe(t,`refs/remotes/origin/HEAD`,`refs/remotes/origin/`);if(n)return n;for(let e of[`main`,`master`])if(await A(t,`refs/remotes/origin/${e}`))return e;return`main`}function Ne(){return I.get(`branch`,ke)}function Pe(){return I.get(`head`,Ae)}function Fe(){return I.get(`remoteUrl`,je)}function Ie(){return I.get(`defaultBranch`,Me)}async function Le(e){let t=await E(e);if(!t)return null;let n=await k(t);return n?n.type===`branch`?A(t,`refs/heads/${n.name}`):n.sha:null}async function Re(e){let t;try{let n=(await b(h(e,`.git`),`utf-8`)).trim();if(!n.startsWith(`gitdir:`))return null;t=g(e,n.slice(7).trim())}catch{return null}let n=await k(t);return n?n.type===`branch`?A(t,`refs/heads/${n.name}`):n.sha:null}async function ze(e){let t=await E(e);if(!t)return null;let n=await w(t,`remote`,`origin`,`url`);if(n)return n;let r=await M(t);return r&&r!==t?w(r,`remote`,`origin`,`url`):null}async function Be(){try{let e=await E();return e?(await he(h(await M(e)??e,`worktrees`))).length+1:0}catch{return 1}}var N,P,F,I,L=e((()=>{o(),te(),ie(),$(),T(),r(),N=new Map,P=1e3,F=class{constructor(){i(this,`gitDir`,null),i(this,`commonDir`,null),i(this,`initialized`,!1),i(this,`initPromise`,null),i(this,`watchedPaths`,[]),i(this,`branchRefPath`,null),i(this,`cache`,new Map)}async ensureStarted(){if(!this.initialized)return this.initPromise||(this.initPromise=this.start()),this.initPromise}async start(){this.gitDir=await E(),this.initialized=!0,this.gitDir&&(this.commonDir=await M(this.gitDir),this.watchPath(h(this.gitDir,`HEAD`),()=>{this.onHeadChanged()}),this.watchPath(h(this.commonDir??this.gitDir,`config`),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),ee(async()=>{this.stopWatching()}))}watchPath(e,t){this.watchedPaths.push(e),pe(e,{interval:P},t)}async watchCurrentBranchRef(){if(!this.gitDir)return;let e=await k(this.gitDir),t=this.commonDir??this.gitDir,n=e?.type===`branch`?h(t,`refs`,`heads`,e.name):null;n!==this.branchRefPath&&(this.branchRefPath&&(fe(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter(e=>e!==this.branchRefPath)),this.branchRefPath=n,n&&this.watchPath(n,()=>{this.invalidate()}))}async onHeadChanged(){this.invalidate(),await a(),await this.watchCurrentBranchRef()}invalidate(){for(let e of this.cache.values())e.dirty=!0}stopWatching(){for(let e of this.watchedPaths)fe(e);this.watchedPaths=[],this.branchRefPath=null}async get(e,t){await this.ensureStarted();let n=this.cache.get(e);if(n&&!n.dirty)return n.value;n&&(n.dirty=!1);let r=await t(),i=this.cache.get(e);return i&&!i.dirty&&(i.value=r),i||this.cache.set(e,{value:r,dirty:!1,compute:t}),r}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}},I=new F}));function Ve(){function e(e){let t=B(e);return t===z?null:t}return e.cache=B.cache,e}function He(){function e(e){let t=V(e);return t?H(t):null}return e.cache=H.cache,e}function Ue(e){return E(e)}function R(e){let t=e.trim();if(!t)return null;let n=t.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(n&&n[1]&&n[2])return`${n[1]}/${n[2]}`.toLowerCase();let r=t.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(r&&r[1]&&r[2]){let e=r[1],t=r[2];if(qe(e)&&t.startsWith(`git/`)){let e=t.slice(4),n=e.split(`/`);return n.length>=3&&n[0].includes(`.`)?e.toLowerCase():`github.com/${e}`.toLowerCase()}return`${e}/${t}`.toLowerCase()}return null}async function We(){let e=await J();if(!e)return null;let t=R(e);return t?me(`sha256`).update(t).digest(`hex`).substring(0,16):null}async function Ge(){try{let[e,t,n,r,i,a]=await Promise.all([G(),K(),J(),Y(),X(),Q()]);return{commitHash:e,branchName:t,remoteUrl:n,isHeadOnRemote:r,isClean:i,worktreeCount:a}}catch{return null}}async function Ke(){let{parseGitRemote:e}=await import(`./detectRepository-DCTvg4p0.js`),t=await J();if(!t)return c(`Local GitHub repo: unknown`),null;let n=e(t);if(n&&n.host===`github.com`){let e=`${n.owner}/${n.name}`;return c(`Local GitHub repo: ${e}`),e}return c(`Local GitHub repo: unknown`),null}function qe(e){let t=e.split(`:`)[0]??``;return t===`localhost`||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(t)}function Je(){let e=u(),t=d(),n=h(t,`.git`);try{let t=e.statSync(n);if(t.isFile())return!1;if(t.isDirectory()){let t=h(n,`HEAD`);try{if(e.statSync(t).isFile())return!1}catch{}}}catch{}try{if(e.statSync(h(t,`HEAD`)).isFile())return!0}catch{}try{if(e.statSync(h(t,`objects`)).isDirectory())return!0}catch{}try{if(e.statSync(h(t,`refs`)).isDirectory())return!0}catch{}return!1}var z,B,V,H,U,W,Ye,Xe,G,K,q,J,Y,X,Z,Q,Ze,$=e((()=>{n(),ie(),ne(),S(),le(),l(),L(),se(),ce(),oe(),z=Symbol(`git-root-not-found`),B=f(e=>{let t=Date.now();x(`info`,`find_git_root_started`);let n=g(e),r=n.substring(0,n.indexOf(_)+1)||_,i=0;for(;n!==r;){try{let e=h(n,`.git`);i++;let r=de(e);if(r.isDirectory()||r.isFile())return x(`info`,`find_git_root_completed`,{duration_ms:Date.now()-t,stat_count:i,found:!0}),n.normalize(`NFC`)}catch{}let e=m(n);if(e===n)break;n=e}try{let e=h(r,`.git`);i++;let n=de(e);if(n.isDirectory()||n.isFile())return x(`info`,`find_git_root_completed`,{duration_ms:Date.now()-t,stat_count:i,found:!0}),r.normalize(`NFC`)}catch{}return x(`info`,`find_git_root_completed`,{duration_ms:Date.now()-t,stat_count:i,found:!1}),z},e=>e,50),V=Ve(),H=f(e=>{try{let t=v(h(e,`.git`),`utf-8`).trim();if(!t.startsWith(`gitdir:`))return e;let n=g(e,t.slice(7).trim()),r=g(n,v(h(n,`commondir`),`utf-8`).trim());return g(m(n))!==h(r,`worktrees`)||y(v(h(n,`gitdir`),`utf-8`).trim())!==h(y(e),`.git`)?e:ue(r)===`.git`?m(r).normalize(`NFC`):r.normalize(`NFC`)}catch{return e}},e=>e,50),U=He(),W=t(()=>ae(`git`)||`git`),Ye=t(async()=>{let e=Date.now();x(`info`,`is_git_check_started`);let t=V(d())!==null;return x(`info`,`is_git_check_completed`,{duration_ms:Date.now()-e,is_git:t}),t}),Xe=async e=>V(e)!==null,G=async()=>Pe(),K=async()=>Ne(),q=async()=>Ie(),J=async()=>Fe(),Y=async()=>{let{code:e}=await p(W(),[`rev-parse`,`@{u}`],{preserveOutputOnError:!1});return e===0},X=async e=>{let t=[`--no-optional-locks`,`status`,`--porcelain`];e?.ignoreUntracked&&t.push(`-uno`);let{stdout:n}=await p(W(),t,{preserveOutputOnError:!1});return n.trim().length===0},Z=async()=>{let{stdout:e}=await p(W(),[`--no-optional-locks`,`status`,`--porcelain`],{preserveOutputOnError:!1}),t=[],n=[];return e.trim().split(`
|
|
6
|
+
`).filter(e=>e.length>0).forEach(e=>{let r=e.substring(0,2),i=e.substring(2).trim();r===`??`?n.push(i):i&&t.push(i)}),{tracked:t,untracked:n}},Q=async()=>Be(),Ze=async e=>{try{let t=e||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:n}=await Z();if(n.length>0){let{code:e}=await p(W(),[`add`,...n],{preserveOutputOnError:!1});if(e!==0)return!1}let{code:r}=await p(W(),[`stash`,`push`,`--message`,t],{preserveOutputOnError:!1});return r===0}catch{return!1}}}));export{T as A,M as C,Re as D,L as E,x as F,ve as I,ye as M,be as N,E as O,S as P,De as S,ze as T,W as _,q as a,R as b,Ge as c,X as d,Ye as f,Q as g,We as h,K as i,w as j,A as k,Ke as l,J as m,U as n,Z as o,Y as p,V as r,Ue as s,Xe as t,G as u,$ as v,Le as w,Ze as x,Je as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,m as n,r,v as i}from"./git-CN3qtTb_.js";i();export{r as findGitRoot,t as getBranch,e as getDefaultBranch,n as getRemoteUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e,ot as t}from"./state-sIHsFpDu.js";import{Ac as n,Pc as r,Sc as i,al as a,el as o}from"./paths-BBvuDQl9.js";import{d as s,s as c}from"./debug-UI3T040K.js";import{E as l,T as u,r as d,v as f}from"./git-CN3qtTb_.js";import{a as p,n as m,o as h}from"./detectRepository-CBk3S2zv.js";import{realpath as g}from"fs/promises";e(),n(),c(),p(),o(),l(),f();async function _(){try{let e=await m();if(!e){s(`Not in a GitHub repository, skipping path mapping update`);return}let n=t(),a=d(n)??n,o;try{o=(await g(a)).normalize(`NFC`)}catch{o=a}let c=e.toLowerCase(),l=i().githubRepoPaths?.[c]??[];if(l[0]===o){s(`Path ${o} already tracked for repo ${c}`);return}let u=l.filter(e=>e!==o),f=[o,...u];r(e=>({...e,githubRepoPaths:{...e.githubRepoPaths,[c]:f}})),s(`Added ${o} to tracked paths for repo ${c}`)}catch(e){s(`Error updating repo path mapping: ${e}`)}}function v(e){let t=i(),n=e.toLowerCase();return t.githubRepoPaths?.[n]??[]}async function y(e){let t=await Promise.all(e.map(a));return e.filter((e,n)=>t[n])}async function b(e,t){try{let n=await u(e);if(!n)return!1;let r=h(n);return r?r.toLowerCase()===t.toLowerCase():!1}catch{return!1}}function x(e,t){let n=i(),a=e.toLowerCase(),o=n.githubRepoPaths?.[a]??[],c=o.filter(e=>e!==t);if(c.length===o.length)return;let l={...n.githubRepoPaths};c.length===0?delete l[a]:l[a]=c,r(e=>({...e,githubRepoPaths:l})),s(`Removed ${t} from tracked paths for repo ${a}`)}export{b as a,_ as i,v as n,x as r,y as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,t}from"./chunk-DR8-3Aex.js";var n=t(((t,n)=>{var r=e(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||(a=i.call(process)),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){if(t){i&&i(t);return}e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){if(t){a&&a(t);return}e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),r=t(((t,n)=>{var r=e(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i=i||{};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),i=t(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),a=t(((t,a)=>{var o=e(`fs`),s=n(),c=r(),l=i(),u=e(`util`),d,f;typeof Symbol==`function`&&typeof Symbol.for==`function`?(d=Symbol.for(`graceful-fs.queue`),f=Symbol.for(`graceful-fs.previous`)):(d=`___graceful-fs.queue`,f=`___graceful-fs.previous`);function p(){}function m(e,t){Object.defineProperty(e,d,{get:function(){return t}})}var h=p;u.debuglog?h=u.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(h=function(){var e=u.format.apply(u,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
2
|
+
GFS4: `),console.error(e)}),o[d]||(m(o,global[d]||[]),o.close=(function(e){function t(t,n){return e.call(o,t,function(e){e||y(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,f,{value:e}),t})(o.close),o.closeSync=(function(e){function t(t){e.apply(o,arguments),y()}return Object.defineProperty(t,f,{value:e}),t})(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){h(o[d]),e(`assert`).equal(o[d].length,0)})),global[d]||m(global,o[d]),a.exports=g(l(o)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched&&(a.exports=g(o),o.__patched=!0);function g(e){s(e),e.gracefulify=g,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?_([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=i;function i(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?_([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var a=e.appendFile;a&&(e.appendFile=o);function o(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,o){return a(e,t,n,function(a){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?_([i,[e,t,n,r],a,o||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?_([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=p;var f=/^v[0-5]\./;function p(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?_([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var m=c(e);x=m.ReadStream,C=m.WriteStream}var h=e.ReadStream;h&&(x.prototype=Object.create(h.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(h.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?_([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function _(e){h(`ENQUEUE`,e[0].name,e[1]),o[d].push(e),b()}var v;function y(){for(var e=Date.now(),t=0;t<o[d].length;++t)o[d][t].length>2&&(o[d][t][3]=e,o[d][t][4]=e);b()}function b(){if(clearTimeout(v),v=void 0,o[d].length!==0){var e=o[d].shift(),t=e[0],n=e[1],r=e[2],i=e[3],a=e[4];if(i===void 0)h(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-i>=6e4){h(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,r)}else{var c=Date.now()-a,l=Math.max(a-i,1);c>=Math.min(l*1.2,100)?(h(`RETRY`,t.name,n),t.apply(null,n.concat([i]))):o[d].push(e)}v===void 0&&(v=setTimeout(b,0))}}}));export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{ai as t,ci as n}from"./paths-BBvuDQl9.js";import{d as r,s as i}from"./debug-UI3T040K.js";import{o as a,u as o}from"./proxy-CfZp-wce.js";import{Ko as s,Lo as c,NE as l,PE as u,Wo as d,__ as f,_m as p,co as m,g_ as h,h_ as g,pm as _,st as v,ut as y,v_ as b}from"./loadAgentsDir-DI1a76pd.js";import{F as x,I as S,J as C,L as w,P as T,R as E}from"./rcDebugLog-CPKZCtR8.js";import{i as D,n as O,r as k,t as A}from"./openaiShared-D5lOejS1.js";import{randomUUID as j}from"crypto";function M(e){if(P)return P;let t=new D({apiKey:process.env.GROK_API_KEY||process.env.XAI_API_KEY||``,baseURL:process.env.GROK_BASE_URL||N,maxRetries:e?.maxRetries??0,timeout:parseInt(process.env.API_TIMEOUT_MS||`600000`,10),dangerouslyAllowBrowser:!0,fetchOptions:a({forAnthropicAPI:!1}),...e?.fetchOverride&&{fetch:e.fetchOverride}});return e?.fetchOverride||(P=t),t}var N,P,F=e((()=>{k(),o(),N=`https://api.x.ai/v1`,P=null}));async function*I(e,n,i,a,o){try{let c=C(o.model),l=s(e,i),p=await Promise.all(i.map(e=>y(e,{getToolPermissionContext:o.getToolPermissionContext,tools:i,agents:o.agents,allowedAgentTypes:o.allowedAgentTypes,model:o.model}))),m=p.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),v=E(l,n),b=w(m),T=S(o.toolChoice),D=M({maxRetries:0,fetchOverride:o.fetchOverride,source:o.querySource});r(`[Grok] Calling model=${c}, messages=${v.length}, tools=${b.length}`);let k=x(await D.chat.completions.create({model:c,messages:v,...b.length>0&&{tools:b,...T&&{tool_choice:T}},stream:!0,stream_options:{include_usage:!0},...o.temperatureOverride!==void 0&&{temperature:o.temperatureOverride}},{signal:a}),c),A={},N=[],P,F={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},I=0,L=Date.now();for await(let e of k){switch(e.type){case`message_start`:P=e.message,I=Date.now()-L,e.message?.usage&&(F=O(F,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?A[t]={...n,input:``}:n.type===`text`?A[t]={...n,text:``}:n.type===`thinking`?A[t]={...n,thinking:``,signature:``}:A[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=A[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=A[e.index];if(!t||!P)break;let n={message:{...P,content:d([t],i,o.agentId)},requestId:void 0,type:`assistant`,uuid:j(),timestamp:new Date().toISOString()};N.push(n),yield n;break}case`message_delta`:{let t=e.usage;t&&(F=O(F,t));break}case`message_stop`:break}e.type===`message_stop`&&F.input_tokens+F.output_tokens>0&&_(t(c,F),F,o.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:I}:void 0}}u(o.langfuseTrace??null,{model:c,provider:`grok`,input:g(l,n),output:h(N),usage:{input_tokens:F.input_tokens,output_tokens:F.output_tokens,cache_creation_input_tokens:F.cache_creation_input_tokens,cache_read_input_tokens:F.cache_read_input_tokens},startTime:new Date(L),endTime:new Date,completionStartTime:I>0?new Date(L+I):void 0,tools:f(p)})}catch(e){let t=e instanceof Error?e.message:String(e);r(`[Grok] Error: ${t}`,{level:`error`}),yield m({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{F(),A(),T(),c(),v(),i(),p(),n(),l(),b()}))();export{I as queryModelGrok};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as t,D as n,E as r,O as i,S as a,T as o,_ as s,b as c,d as l,f as u,g as d,h as f,k as p,l as m,m as h,p as g,u as _,v,w as y,x as b,y as x}from"./paths-BBvuDQl9.js";a();export{m as checkGate_CACHED_OR_BLOCKING,_ as checkSecurityRestrictionGate,l as checkStatsigFeatureGate_CACHED_MAY_BE_STALE,u as clearGrowthBookConfigOverrides,g as getAllGrowthBookFeatures,h as getApiBaseUrlHost,f as getDynamicConfig_BLOCKS_ON_INIT,d as getDynamicConfig_CACHED_MAY_BE_STALE,s as getFeatureValue_CACHED_MAY_BE_STALE,v as getFeatureValue_CACHED_WITH_REFRESH,x as getFeatureValue_DEPRECATED,c as getGrowthBookConfigOverrides,b as hasGrowthBookEnvOverride,t as initializeGrowthBook,y as onGrowthBookRefresh,o as refreshGrowthBookAfterAuthChange,r as refreshGrowthBookFeatures,n as resetGrowthBook,i as setGrowthBookConfigOverride,p as setupPeriodicGrowthBookRefresh,e as stopPeriodicGrowthBookRefresh};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t}from"./chunk-DR8-3Aex.js";function n(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function r(t){return typeof Bun<`u`?Bun.hash(t).toString():e(`crypto`).createHash(`sha256`).update(t).digest(`hex`)}function i(t,n){return typeof Bun<`u`?Bun.hash(n,Bun.hash(t)).toString():e(`crypto`).createHash(`sha256`).update(t).update(`\0`).update(n).digest(`hex`)}var a=t((()=>{}));export{a as i,r as n,i as r,n as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{Xc as r,el as i}from"./paths-BBvuDQl9.js";import{E as a,K as o,V as s,d as c,h as l,p as u,s as d,w as f}from"./debug-UI3T040K.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{o as h,s as g}from"./log-CzsijfHZ.js";import{join as _}from"path";import{createWriteStream as v,writeFileSync as y}from"fs";import{readFile as b,readdir as x,writeFile as S}from"fs/promises";import{pipeline as C}from"stream/promises";import{getHeapSnapshot as w,getHeapSpaceStatistics as T,getHeapStatistics as E}from"v8";async function D(e,n=0){let r=process.memoryUsage(),i=E(),a=process.resourceUsage(),o=process.uptime(),s;try{s=T()}catch{}let c=process._getActiveHandles().length,l=process._getActiveRequests().length,u;try{u=(await x(`/proc/self/fd`)).length}catch{}let d;try{d=await b(`/proc/self/smaps_rollup`,`utf8`)}catch{}let f=r.rss-r.heapUsed,p=o>0?r.rss/o:0,m=p*3600/(1024*1024),h=[];return i.number_of_detached_contexts>0&&h.push(`${i.number_of_detached_contexts} detached context(s) - possible iframe/context leak`),c>100&&h.push(`${c} active handles - possible timer/socket leak`),f>r.heapUsed&&h.push(`Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)`),m>100&&h.push(`High memory growth rate: ${m.toFixed(1)} MB/hour`),u&&u>500&&h.push(`${u} open file descriptors - possible file/socket leak`),{timestamp:new Date().toISOString(),sessionId:t(),trigger:e,dumpNumber:n,uptimeSeconds:o,memoryUsage:{heapUsed:r.heapUsed,heapTotal:r.heapTotal,external:r.external,arrayBuffers:r.arrayBuffers,rss:r.rss},memoryGrowthRate:{bytesPerSecond:p,mbPerHour:m},v8HeapStats:{heapSizeLimit:i.heap_size_limit,mallocedMemory:i.malloced_memory,peakMallocedMemory:i.peak_malloced_memory,detachedContexts:i.number_of_detached_contexts,nativeContexts:i.number_of_native_contexts},v8HeapSpaces:s?.map(e=>({name:e.space_name,size:e.space_size,used:e.space_used_size,available:e.space_available_size})),resourceUsage:{maxRSS:a.maxRSS*1024,userCPUTime:a.userCPUTime,systemCPUTime:a.systemCPUTime},activeHandles:c,activeRequests:l,openFileDescriptors:u,analysis:{potentialLeaks:h,recommendation:h.length>0?`WARNING: ${h.length} potential leak indicator(s) found. See potentialLeaks array.`:`No obvious leak indicators. Check heap snapshot for retained objects.`},smapsRollup:d,platform:process.platform,nodeVersion:process.version,ccVersion:`2.6.5`}}async function O(e=`manual`,n=0){try{let i=t(),o=await D(e,n),s=e=>(e/1024/1024/1024).toFixed(3);c(`[HeapDump] Memory state:
|
|
2
|
+
heapUsed: ${s(o.memoryUsage.heapUsed)} GB (in snapshot)
|
|
3
|
+
external: ${s(o.memoryUsage.external)} GB (NOT in snapshot)
|
|
4
|
+
rss: ${s(o.memoryUsage.rss)} GB (total process)
|
|
5
|
+
${o.analysis.recommendation}`);let l=r();await u().mkdir(l);let d=n>0?`-dump${n}`:``,f=`${i}${d}.heapsnapshot`,p=`${i}${d}-diagnostics.json`,h=_(l,f),g=_(l,p);return await S(g,a(o,null,2),{mode:384}),c(`[HeapDump] Diagnostics written to ${g}`),await k(h),c(`[HeapDump] Heap dump written to ${h}`),m(`tengu_heap_dump`,{triggerManual:e===`manual`,triggerAuto15GB:e===`auto-1.5GB`,dumpNumber:n,success:!0}),{success:!0,heapPath:h,diagPath:g}}catch(t){let r=o(t);return g(r),m(`tengu_heap_dump`,{triggerManual:e===`manual`,triggerAuto15GB:e===`auto-1.5GB`,dumpNumber:n,success:!1}),{success:!1,error:r.message}}}async function k(e){if(typeof Bun<`u`){y(e,Bun.generateHeapSnapshot(`v8`,`arraybuffer`),{mode:384}),Bun.gc(!0);return}let t=v(e,{mode:384});await C(w(),t)}var A=e((()=>{n(),p(),d(),s(),i(),l(),h(),f()}));async function j(){let e=await O();return e.success?{type:`text`,value:`${e.heapPath}\n${e.diagPath}`}:{type:`text`,value:`Failed to create heap dump: ${e.error}`}}e((()=>{A()}))();export{j as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Q as r,Rn as i,b as a,i as o,n as s,p as c,r as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{C as m,S as h}from"./startupProfiler-DnXZaX4A.js";import{Dx as g,Fi as _,Hi as v,Li as y,Lw as b,Ox as x,Xi as S,Xw as C,Zw as w}from"./loadAgentsDir-DI1a76pd.js";import{t as T}from"./useKeybinding-FsOnjW6T.js";import{l as E,u as D}from"./referral-DeDr9zAE.js";import{n as O,r as k}from"./modalContext-CmSKRyea.js";import{n as A,t as j}from"./PromptInputHelpMenu-DMsF4D6d.js";function M({commands:e,maxHeight:t,columns:n,title:r,onCancel:i,emptyMessage:s}){let{headerFocused:c,focusHeader:l}=o(),u=Math.max(1,n-10),d=Math.max(1,Math.floor((t-10)/2)),p=(0,N.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:m(v(e),u,!0)}))},[e,u]);return(0,P.jsx)(f,{flexDirection:`column`,paddingY:1,children:e.length===0&&s?(0,P.jsx)(a,{dimColor:!0,children:s}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a,{children:r}),(0,P.jsx)(f,{marginTop:1,children:(0,P.jsx)(g,{options:p,visibleOptionCount:d,onCancel:i,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:l,isDisabled:c})})]})})}var N,P,F=e((()=>{i(),N=t(i(),1),S(),h(),u(),x(),P=p()}));function I(){return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,L.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,L.jsx)(a,{bold:!0,children:`Getting started`}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`1. `}),(0,L.jsx)(a,{children:`Ask a question or describe a task — Claude will explore your code and respond.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`2. `}),(0,L.jsx)(a,{children:`When Claude wants to edit files or run commands, you review and approve each action.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`3. `}),(0,L.jsx)(a,{children:`Type `}),(0,L.jsx)(a,{bold:!0,children:`/commit`}),(0,L.jsx)(a,{children:` to commit changes, `}),(0,L.jsx)(a,{bold:!0,children:`/help`}),(0,L.jsx)(a,{children:` for commands, or `}),(0,L.jsx)(a,{bold:!0,children:`?`}),(0,L.jsx)(a,{children:` for shortcuts.`})]})]})]}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsx)(f,{children:(0,L.jsx)(a,{bold:!0,children:`Shortcuts`})}),(0,L.jsx)(j,{gap:2,fixedWidth:!0})]})]})}var L,R=e((()=>{i(),u(),A(),L=p()}));function z({onClose:e,commands:t}){let{rows:i,columns:o}=n(),u=Math.floor(i/2),p=k(),m=()=>e(`Help dialog dismissed`,{display:`system`});d(`help:dismiss`,m,{context:`Help`});let h=D(m),g=w(`help:dismiss`,`Help`,`esc`),v=y(),b=t.filter(e=>v.has(e.name)&&!e.isHidden),x=[];if(process.env.USER_TYPE===`ant`){let e=new Set(_.map(e=>e.name));b=b.filter(t=>!e.has(t.name)),x=t.filter(t=>e.has(t.name)&&!t.isHidden)}let S=t.filter(e=>!v.has(e.name)&&!e.isHidden),C=[(0,B.jsx)(s,{title:`general`,children:(0,B.jsx)(I,{})},`general`)];return C.push((0,B.jsx)(s,{title:`commands`,children:(0,B.jsx)(M,{commands:b,maxHeight:u,columns:o,title:`Browse default commands:`,onCancel:m})},`commands`)),C.push((0,B.jsx)(s,{title:`custom-commands`,children:(0,B.jsx)(M,{commands:S,maxHeight:u,columns:o,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),process.env.USER_TYPE===`ant`&&x.length>0&&C.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:x,maxHeight:u,columns:o,title:`Browse ant-only commands:`,onCancel:m})},`ant-only`)),(0,B.jsx)(f,{flexDirection:`column`,height:p?void 0:u,children:(0,B.jsxs)(c,{color:`professionalBlue`,children:[(0,B.jsx)(l,{title:process.env.USER_TYPE===`ant`?`/help`:`Claude Code v2.6.5`,color:`professionalBlue`,defaultTab:`general`,children:C}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsxs)(a,{children:[`For more help: `,(0,B.jsx)(r,{url:`https://code.claude.com/docs/en/overview`})]})}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsx)(a,{dimColor:!0,children:h.pending?(0,B.jsxs)(B.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,B.jsxs)(a,{italic:!0,children:[g,` to cancel`]})})})]})})}var B,V=e((()=>{i(),E(),C(),S(),O(),b(),u(),T(),F(),R(),B=p()})),H,U;e((()=>{V(),H=p(),U=async(e,{options:{commands:t}})=>(0,H.jsx)(z,{commands:t,onClose:e})}))();export{U as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Yt as e,un as t,vn as n,yn as r}from"./loadAgentsDir-DI1a76pd.js";r();export{e as executeSessionEndHooks,t as getSessionEndHookTimeoutMs,n as hasWorktreeCreateHook};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./memoize-DNnuA2aU.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{Q as o,Rn as s,b as c,f as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,ht as h}from"./state-sIHsFpDu.js";import{Po as g,Qa as _,jo as v,no as y,oo as b}from"./paths-BBvuDQl9.js";import{n as x,r as S}from"./analytics-DqMQntaB.js";import{A_ as C,BS as w,D_ as T,Dx as E,Ku as D,MS as O,M_ as k,NS as A,N_ as j,O_ as M,Ox as N,VS as P,jS as ee,j_ as te,k_ as ne,qu as re}from"./loadAgentsDir-DI1a76pd.js";import{t as ie}from"./useKeybinding-FsOnjW6T.js";function ae(e,t){let n={PreToolUse:{},PostToolUse:{},PostToolUseFailure:{},PermissionDenied:{},Notification:{},UserPromptSubmit:{},SessionStart:{},SessionEnd:{},Stop:{},StopFailure:{},SubagentStart:{},SubagentStop:{},PreCompact:{},PostCompact:{},PermissionRequest:{},Setup:{},TeammateIdle:{},TaskCreated:{},TaskCompleted:{},Elicitation:{},ElicitationResult:{},ConfigChange:{},WorktreeCreate:{},WorktreeRemove:{},InstructionsLoaded:{},CwdChanged:{},FileChanged:{}},r=L(t);T(e).forEach(e=>{let t=n[e.event];if(t){let n=r[e.event].matcherMetadata===void 0?``:e.matcher||``;t[n]||(t[n]=[]),t[n].push(e)}});let i=h();if(i)for(let[e,t]of Object.entries(i)){let r=e,i=n[r];if(i)for(let e of t??[]){let t=e.matcher||``;if(`pluginRoot`in e){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:n,matcher:e.matcher,source:`pluginHook`,pluginName:e.pluginId})}else if(process.env.USER_TYPE===`ant`){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:{type:`command`,command:`[ANT-ONLY] Built-in Hook`},matcher:e.matcher,source:`builtinHook`})}}}return n}function oe(e,t){return j(Object.keys(e[t]||{}),e,t)}function F(e,t,n){let r=n??``;return e[t]?.[r]??[]}function I(e,t){return L(t)[e].matcherMetadata}var L,R=e((()=>{r(),m(),k(),L=n(function(e){return{PreToolUse:{summary:`Before tool execution`,description:`Input to command is JSON of tool call arguments.
|
|
2
|
+
Exit code 0 - stdout/stderr not shown
|
|
3
|
+
Exit code 2 - show stderr to model and block tool call
|
|
4
|
+
Other exit codes - show stderr to user only but continue with tool call`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PostToolUse:{summary:`After tool execution`,description:`Input to command is JSON with fields "inputs" (tool call arguments) and "response" (tool call response).
|
|
5
|
+
Exit code 0 - stdout shown in transcript mode (ctrl+o)
|
|
6
|
+
Exit code 2 - show stderr to model immediately
|
|
7
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PostToolUseFailure:{summary:`After tool execution fails`,description:`Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.
|
|
8
|
+
Exit code 0 - stdout shown in transcript mode (ctrl+o)
|
|
9
|
+
Exit code 2 - show stderr to model immediately
|
|
10
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PermissionDenied:{summary:`After auto mode classifier denies a tool call`,description:`Input to command is JSON with tool_name, tool_input, tool_use_id, and reason.
|
|
11
|
+
Return {"hookSpecificOutput":{"hookEventName":"PermissionDenied","retry":true}} to tell the model it may retry.
|
|
12
|
+
Exit code 0 - stdout shown in transcript mode (ctrl+o)
|
|
13
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},Notification:{summary:`When notifications are sent`,description:`Input to command is JSON with notification message and type.
|
|
14
|
+
Exit code 0 - stdout/stderr not shown
|
|
15
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`notification_type`,values:[`permission_prompt`,`idle_prompt`,`auth_success`,`elicitation_dialog`,`elicitation_complete`,`elicitation_response`]}},UserPromptSubmit:{summary:`When the user submits a prompt`,description:`Input to command is JSON with original user prompt text.
|
|
16
|
+
Exit code 0 - stdout shown to Claude
|
|
17
|
+
Exit code 2 - block processing, erase original prompt, and show stderr to user only
|
|
18
|
+
Other exit codes - show stderr to user only`},SessionStart:{summary:`When a new session is started`,description:`Input to command is JSON with session start source.
|
|
19
|
+
Exit code 0 - stdout shown to Claude
|
|
20
|
+
Blocking errors are ignored
|
|
21
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`source`,values:[`startup`,`resume`,`clear`,`compact`]}},Stop:{summary:`Right before Claude concludes its response`,description:`Exit code 0 - stdout/stderr not shown
|
|
22
|
+
Exit code 2 - show stderr to model and continue conversation
|
|
23
|
+
Other exit codes - show stderr to user only`},StopFailure:{summary:`When the turn ends due to an API error`,description:`Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn. Fire-and-forget — hook output and exit codes are ignored.`,matcherMetadata:{fieldToMatch:`error`,values:[`rate_limit`,`authentication_failed`,`billing_error`,`invalid_request`,`server_error`,`max_output_tokens`,`unknown`]}},SubagentStart:{summary:`When a subagent (Agent tool call) is started`,description:`Input to command is JSON with agent_id and agent_type.
|
|
24
|
+
Exit code 0 - stdout shown to subagent
|
|
25
|
+
Blocking errors are ignored
|
|
26
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`agent_type`,values:[]}},SubagentStop:{summary:`Right before a subagent (Agent tool call) concludes its response`,description:`Input to command is JSON with agent_id, agent_type, and agent_transcript_path.
|
|
27
|
+
Exit code 0 - stdout/stderr not shown
|
|
28
|
+
Exit code 2 - show stderr to subagent and continue having it run
|
|
29
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`agent_type`,values:[]}},PreCompact:{summary:`Before conversation compaction`,description:`Input to command is JSON with compaction details.
|
|
30
|
+
Exit code 0 - stdout appended as custom compact instructions
|
|
31
|
+
Exit code 2 - block compaction
|
|
32
|
+
Other exit codes - show stderr to user only but continue with compaction`,matcherMetadata:{fieldToMatch:`trigger`,values:[`manual`,`auto`]}},PostCompact:{summary:`After conversation compaction`,description:`Input to command is JSON with compaction details and the summary.
|
|
33
|
+
Exit code 0 - stdout shown to user
|
|
34
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`trigger`,values:[`manual`,`auto`]}},SessionEnd:{summary:`When a session is ending`,description:`Input to command is JSON with session end reason.
|
|
35
|
+
Exit code 0 - command completes successfully
|
|
36
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`reason`,values:[`clear`,`logout`,`prompt_input_exit`,`other`]}},PermissionRequest:{summary:`When a permission dialog is displayed`,description:`Input to command is JSON with tool_name, tool_input, and tool_use_id.
|
|
37
|
+
Output JSON with hookSpecificOutput containing decision to allow or deny.
|
|
38
|
+
Exit code 0 - use hook decision if provided
|
|
39
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},Setup:{summary:`Repo setup hooks for init and maintenance`,description:`Input to command is JSON with trigger (init or maintenance).
|
|
40
|
+
Exit code 0 - stdout shown to Claude
|
|
41
|
+
Blocking errors are ignored
|
|
42
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`trigger`,values:[`init`,`maintenance`]}},TeammateIdle:{summary:`When a teammate is about to go idle`,description:`Input to command is JSON with teammate_name and team_name.
|
|
43
|
+
Exit code 0 - stdout/stderr not shown
|
|
44
|
+
Exit code 2 - show stderr to teammate and prevent idle (teammate continues working)
|
|
45
|
+
Other exit codes - show stderr to user only`},TaskCreated:{summary:`When a task is being created`,description:`Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
|
|
46
|
+
Exit code 0 - stdout/stderr not shown
|
|
47
|
+
Exit code 2 - show stderr to model and prevent task creation
|
|
48
|
+
Other exit codes - show stderr to user only`},TaskCompleted:{summary:`When a task is being marked as completed`,description:`Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
|
|
49
|
+
Exit code 0 - stdout/stderr not shown
|
|
50
|
+
Exit code 2 - show stderr to model and prevent task completion
|
|
51
|
+
Other exit codes - show stderr to user only`},Elicitation:{summary:`When an MCP server requests user input (elicitation)`,description:`Input to command is JSON with mcp_server_name, message, and requested_schema.
|
|
52
|
+
Output JSON with hookSpecificOutput containing action (accept/decline/cancel) and optional content.
|
|
53
|
+
Exit code 0 - use hook response if provided
|
|
54
|
+
Exit code 2 - deny the elicitation
|
|
55
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`mcp_server_name`,values:[]}},ElicitationResult:{summary:`After a user responds to an MCP elicitation`,description:`Input to command is JSON with mcp_server_name, action, content, mode, and elicitation_id.
|
|
56
|
+
Output JSON with hookSpecificOutput containing optional action and content to override the response.
|
|
57
|
+
Exit code 0 - use hook response if provided
|
|
58
|
+
Exit code 2 - block the response (action becomes decline)
|
|
59
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`mcp_server_name`,values:[]}},ConfigChange:{summary:`When configuration files change during a session`,description:`Input to command is JSON with source (user_settings, project_settings, local_settings, policy_settings, skills) and file_path.
|
|
60
|
+
Exit code 0 - allow the change
|
|
61
|
+
Exit code 2 - block the change from being applied to the session
|
|
62
|
+
Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`source`,values:[`user_settings`,`project_settings`,`local_settings`,`policy_settings`,`skills`]}},InstructionsLoaded:{summary:`When an instruction file (CLAUDE.md or rule) is loaded`,description:`Input to command is JSON with file_path, memory_type (User, Project, Local, Managed), load_reason (session_start, nested_traversal, path_glob_match, include, compact), globs (optional — the paths: frontmatter patterns that matched), trigger_file_path (optional — the file Claude touched that caused the load), and parent_file_path (optional — the file that @-included this one).
|
|
63
|
+
Exit code 0 - command completes successfully
|
|
64
|
+
Other exit codes - show stderr to user only
|
|
65
|
+
This hook is observability-only and does not support blocking.`,matcherMetadata:{fieldToMatch:`load_reason`,values:[`session_start`,`nested_traversal`,`path_glob_match`,`include`,`compact`]}},WorktreeCreate:{summary:`Create an isolated worktree for VCS-agnostic isolation`,description:`Input to command is JSON with name (suggested worktree slug).
|
|
66
|
+
Stdout should contain the absolute path to the created worktree directory.
|
|
67
|
+
Exit code 0 - worktree created successfully
|
|
68
|
+
Other exit codes - worktree creation failed`},WorktreeRemove:{summary:`Remove a previously created worktree`,description:`Input to command is JSON with worktree_path (absolute path to worktree).
|
|
69
|
+
Exit code 0 - worktree removed successfully
|
|
70
|
+
Other exit codes - show stderr to user only`},CwdChanged:{summary:`After the working directory changes`,description:`Input to command is JSON with old_cwd and new_cwd.
|
|
71
|
+
CLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent BashTool commands.
|
|
72
|
+
Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to register with the FileChanged watcher.
|
|
73
|
+
Exit code 0 - command completes successfully
|
|
74
|
+
Other exit codes - show stderr to user only`},FileChanged:{summary:`When a watched file changes`,description:`Input to command is JSON with file_path and event (change, add, unlink).
|
|
75
|
+
CLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent BashTool commands.
|
|
76
|
+
The matcher field specifies filenames to watch in the current directory (e.g. ".envrc|.env").
|
|
77
|
+
Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.
|
|
78
|
+
Exit code 0 - command completes successfully
|
|
79
|
+
Other exit codes - show stderr to user only`}}},e=>e.slice().sort().join(`,`))}));function z({hookEventMetadata:e,hooksByEvent:t,totalHooksCount:n,restrictedByPolicy:r,onSelectEvent:i,onCancel:s}){return(0,B.jsx)(l,{title:`Hooks`,subtitle:`${n} ${g(n,`hook`)} configured`,onCancel:s,children:(0,B.jsxs)(f,{flexDirection:`column`,gap:1,children:[r&&(0,B.jsxs)(f,{flexDirection:`column`,children:[(0,B.jsxs)(c,{color:`suggestion`,children:[a.info,` Hooks Restricted by Policy`]}),(0,B.jsx)(c,{dimColor:!0,children:`Only hooks from managed settings can run. User-defined hooks from ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json are blocked.`})]}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsxs)(c,{dimColor:!0,children:[a.info,` This menu is read-only. To add or modify hooks, edit settings.json directly or ask Claude.`,` `,(0,B.jsx)(o,{url:`https://code.claude.com/docs/en/hooks`,children:`Learn more`})]})}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsx)(E,{onChange:e=>{i(e)},onCancel:s,options:Object.entries(e).map(([e,n])=>{let r=t[e]||0;return{label:r>0?(0,B.jsxs)(c,{children:[e,` `,(0,B.jsxs)(c,{color:`suggestion`,children:[`(`,r,`)`]})]}):e,value:e,description:n.summary}})})})]})})}var B,V=e((()=>{i(),s(),u(),v(),N(),B=p()}));function H({selectedEvent:e,selectedMatcher:t,hooksForSelectedMatcher:n,hookEventMetadata:r,onSelect:i,onCancel:a}){let o=r.matcherMetadata===void 0?e:`${e} - Matcher: ${t||`(all)`}`;return n.length===0?(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,inputGuide:()=>(0,U.jsx)(c,{children:`Esc to go back`}),children:(0,U.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,U.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,U.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,children:(0,U.jsx)(f,{flexDirection:`column`,children:(0,U.jsx)(E,{options:n.map((e,t)=>({label:`[${e.config.type}] ${M(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${C(e.source)} (${e.pluginName})`:C(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{s(),u(),k(),N(),U=p()}));function G({selectedEvent:e,matchersForSelectedEvent:t,hooksByEventAndMatcher:n,eventDescription:r,onSelect:i,onCancel:a}){let o=K.useMemo(()=>t.map(t=>{let r=n[e]?.[t]||[];return{matcher:t,sources:Array.from(new Set(r.map(e=>e.source))),hookCount:r.length}}),[t,n,e]);return t.length===0?(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,inputGuide:()=>(0,q.jsx)(c,{children:`Esc to go back`}),children:(0,q.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,q.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,children:(0,q.jsx)(f,{flexDirection:`column`,children:(0,q.jsx)(E,{options:o.map(e=>({label:`[${e.sources.map(te).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${g(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,se=e((()=>{K=t(s(),1),u(),k(),v(),N(),q=p()}));function ce({selectedHook:e,eventSupportsMatcher:t,onCancel:n}){return(0,J.jsx)(l,{title:`Hook details`,onCancel:n,inputGuide:()=>(0,J.jsx)(c,{children:`Esc to go back`}),children:(0,J.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{children:[`Event: `,(0,J.jsx)(c,{bold:!0,children:e.event})]}),t&&(0,J.jsxs)(c,{children:[`Matcher: `,(0,J.jsx)(c,{bold:!0,children:e.matcher||`(all)`})]}),(0,J.jsxs)(c,{children:[`Type: `,(0,J.jsx)(c,{bold:!0,children:e.config.type})]}),(0,J.jsxs)(c,{children:[`Source: `,(0,J.jsx)(c,{dimColor:!0,children:ne(e.source)})]}),e.pluginName&&(0,J.jsxs)(c,{children:[`Plugin: `,(0,J.jsx)(c,{dimColor:!0,children:e.pluginName})]})]}),(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{dimColor:!0,children:[le(e.config),`:`]}),(0,J.jsx)(f,{borderStyle:`round`,borderDimColor:!0,paddingLeft:1,paddingRight:1,children:(0,J.jsx)(c,{children:ue(e.config)})})]}),`statusMessage`in e.config&&e.config.statusMessage&&(0,J.jsxs)(c,{children:[`Status message: `,(0,J.jsx)(c,{dimColor:!0,children:e.config.statusMessage})]}),(0,J.jsx)(c,{dimColor:!0,children:`To modify or remove this hook, edit settings.json directly or ask Claude to help.`})]})})}function le(e){switch(e.type){case`command`:return`Command`;case`prompt`:return`Prompt`;case`agent`:return`Prompt`;case`http`:return`URL`}}function ue(e){switch(e.type){case`command`:return e.command;case`prompt`:return e.prompt;case`agent`:return e.prompt;case`http`:return e.url}}var J,Y=e((()=>{s(),u(),k(),J=p()}));function de({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),[o,s]=(0,X.useState)(()=>_(`policySettings`)?.allowManagedHooksOnly===!0);P(e=>{e===`policySettings`&&(a(y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),s(_(`policySettings`)?.allowManagedHooksOnly===!0))});let u=n.mode,p=`event`in n?n.event:`PreToolUse`,m=`matcher`in n?n.matcher:null,h=O(e=>e.mcp),v=A(),b=(0,X.useMemo)(()=>[...e,...h.tools.map(e=>e.name)],[e,h.tools]),x=(0,X.useMemo)(()=>ae(v.getState(),b),[b,v]),S=(0,X.useMemo)(()=>oe(x,p),[x,p]),C=(0,X.useMemo)(()=>F(x,p,m),[x,p,m]),w=(0,X.useCallback)(()=>{t(`Hooks dialog dismissed`,{display:`system`})},[t]);d(`confirm:no`,w,{context:`Confirmation`,isActive:u===`select-event`}),d(`confirm:no`,()=>{r({mode:`select-event`})},{context:`Confirmation`,isActive:u===`select-matcher`}),d(`confirm:no`,()=>{`event`in n&&(I(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event}))},{context:`Confirmation`,isActive:u===`select-hook`}),d(`confirm:no`,()=>{if(n.mode===`view-hook`){let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}},{context:`Confirmation`,isActive:u===`view-hook`});let T=L(b),E=y()?.disableAllHooks===!0,{hooksByEvent:D,totalHooksCount:k}=(0,X.useMemo)(()=>{let e={},t=0;for(let[n,r]of Object.entries(x)){let i=Object.values(r).reduce((e,t)=>e+t.length,0);e[n]=i,t+=i}return{hooksByEvent:e,totalHooksCount:t}},[x]);if(E)return(0,Z.jsx)(l,{title:`Hook Configuration - Disabled`,onCancel:w,inputGuide:()=>(0,Z.jsx)(c,{children:`Esc to close`}),children:(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsxs)(f,{flexDirection:`column`,children:[(0,Z.jsxs)(c,{children:[`All hooks are currently `,(0,Z.jsx)(c,{bold:!0,children:`disabled`}),i&&` by a managed settings file`,`. You have `,(0,Z.jsx)(c,{bold:!0,children:k}),` `,`configured `,g(k,`hook`),` that `,g(k,`is`,`are`),` not running.`]}),(0,Z.jsx)(f,{marginTop:1,children:(0,Z.jsx)(c,{dimColor:!0,children:`When hooks are disabled:`})}),(0,Z.jsx)(c,{dimColor:!0,children:`· No hook commands will execute`}),(0,Z.jsx)(c,{dimColor:!0,children:`· StatusLine will not be displayed`}),(0,Z.jsx)(c,{dimColor:!0,children:`· Tool operations will proceed without hook validation`})]}),!i&&(0,Z.jsx)(c,{dimColor:!0,children:`To re-enable hooks, remove "disableAllHooks" from settings.json or ask Claude.`})]})});switch(n.mode){case`select-event`:return(0,Z.jsx)(z,{hookEventMetadata:T,hooksByEvent:D,totalHooksCount:k,restrictedByPolicy:o,onSelectEvent:e=>{I(e,b)===void 0?r({mode:`select-hook`,event:e,matcher:``}):r({mode:`select-matcher`,event:e})},onCancel:w});case`select-matcher`:return(0,Z.jsx)(G,{selectedEvent:n.event,matchersForSelectedEvent:S,hooksByEventAndMatcher:x,eventDescription:T[n.event].description,onSelect:e=>{r({mode:`select-hook`,event:n.event,matcher:e})},onCancel:()=>{r({mode:`select-event`})}});case`select-hook`:return(0,Z.jsx)(H,{selectedEvent:n.event,selectedMatcher:n.matcher,hooksForSelectedMatcher:C,hookEventMetadata:T[n.event],onSelect:e=>{r({mode:`view-hook`,event:n.event,hook:e})},onCancel:()=>{I(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event})}});case`view-hook`:return(0,Z.jsx)(ce,{selectedHook:n.hook,eventSupportsMatcher:I(n.event,b)!==void 0,onCancel:()=>{let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}})}}var X,Z,fe=e((()=>{s(),X=t(s(),1),ee(),w(),u(),ie(),R(),b(),v(),V(),W(),se(),Y(),Z=p()})),Q,$;e((()=>{fe(),x(),re(),Q=p(),$=async(e,t)=>{S(`tengu_hooks_command`,{});let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(de,{toolNames:D(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{d as t,s as n}from"./debug-UI3T040K.js";import{o as r,r as i}from"./common-B379wT22.js";import{c as a,s as o}from"./escHotkey-Cyz0yyh1.js";import{i as s,n as c,r as l}from"./gates-CSKxLmMJ.js";import{n as u,t as d}from"./executor-4EeD8GNm.js";import{format as f}from"util";function p(){try{return Bun.spawnSync({cmd:[`osascript`,`-e`,`tell application "System Events" to get name of every process whose background only is false`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function m(){try{return Bun.spawnSync({cmd:[`screencapture`,`-x`,`-R`,`0,0,1,1`,`/dev/null`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function h(){return _||(_={serverName:i,logger:new g,executor:d({getMouseAnimationEnabled:()=>l().mouseAnimation,getHideBeforeActionEnabled:()=>l().hideBeforeAction}),ensureOsPermissions:async()=>{if(process.platform!==`darwin`)return{granted:!0};let e=a().tcc;if(e){let t=e.checkAccessibility(),n=e.checkScreenRecording();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}}let t=p(),n=m();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}},isDisabled:()=>!c(),getSubGates:l,getAutoUnhideEnabled:()=>!0,cropRawPatch:()=>null},_)}var g,_,v=e((()=>{n(),r(),u(),s(),o(),g=class{silly(e,n){t(f(e,n??``),{level:`debug`})}debug(e,n){t(f(e,n??``),{level:`debug`})}info(e,n){t(f(e,n??``),{level:`info`})}warn(e,n){t(f(e,n??``),{level:`warn`})}error(e,n){t(f(e,n??``),{level:`error`})}}}));export{v as n,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{o as t}from"./log-CzsijfHZ.js";function n(e){let t;try{t=new URL(e).hostname}catch{throw Error(`assertWorkspaceHost: invalid URL "${e}". Workspace API key requests must target ${i}.`)}if(t!==i)throw Error(`assertWorkspaceHost: refusing to send workspace API key to non-Anthropic host "${t}". Workspace API key requests must target ${i}. If you are using a custom base URL, workspace endpoints are only available on the Anthropic API.`)}function r(e){let t;try{t=new URL(e).hostname}catch{throw Error(`assertSubscriptionBaseUrl: invalid URL "${e}". Subscription OAuth requests must target ${i}.`)}if(t!==i)throw Error(`assertSubscriptionBaseUrl: refusing subscription OAuth request to non-Anthropic host "${t}". Subscription OAuth requests must target ${i}.`)}var i,a=e((()=>{t(),i=`api.anthropic.com`}));export{n,a as r,r as t};
|