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{a as e,t}from"./types-RJTEOuIt.js";e();export{t as BRIDGE_LOGIN_ERROR};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,Mn as r,Tt as i,Yn as a,kt as o,un as s,vt as c,wn as l}from"./schemas-BGAvj1T4.js";import{t as u}from"./v4-f1i_CNUT.js";import{E as d,S as f,w as p,x as m}from"./debug-UI3T040K.js";import{o as h,s as g}from"./log-CzsijfHZ.js";import{n as _,t as v}from"./memoize-DxwLawI2.js";import{n as y,t as b}from"./lazySchema-2sOku3cX.js";import{open as x,readFile as S,stat as C}from"fs/promises";function ee(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&E(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&E(e.charCodeAt(r)))for(r++;r<e.length&&E(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&E(e.charCodeAt(r))){for(r++;r<e.length&&E(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
2
|
+
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(T(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(w(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(w(t));return o=15}if(T(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
3
|
+
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!T(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,T(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!E(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(w(e)||T(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function w(e){return e===32||e===9}function T(e){return e===10||e===13}function E(e){return e>=48&&e<=57}var D,O=e((()=>{(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(D||(D={}))})),k,A,j,te,ne=e((()=>{k=Array(20).fill(0).map((e,t)=>` `.repeat(t)),A=200,j={" ":{"\n":Array(A).fill(0).map((e,t)=>`
|
|
4
|
+
`+` `.repeat(t)),"\r":Array(A).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(A).fill(0).map((e,t)=>`\r
|
|
5
|
+
`+` `.repeat(t))}," ":{"\n":Array(A).fill(0).map((e,t)=>`
|
|
6
|
+
`+` `.repeat(t)),"\r":Array(A).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(A).fill(0).map((e,t)=>`\r
|
|
7
|
+
`+` `.repeat(t))}},te=[`
|
|
8
|
+
`,`\r`,`\r
|
|
9
|
+
`]}));function re(e,t,n){let r,i,a,o,s;if(t){for(o=t.offset,s=o+t.length,a=o;a>0&&!N(e,a-1);)a--;let c=s;for(;c<e.length&&!N(e,c);)c++;i=e.substring(a,c),r=ie(i,n)}else i=e,r=0,a=0,o=0,s=e.length;let c=ae(n,e),l=te.includes(c),u=0,d=0,f;f=n.insertSpaces?k[n.tabSize||4]??M(k[1],n.tabSize||4):` `;let p=f===` `?` `:` `,m=ee(i,!1),h=!1;function g(){if(u>1)return M(c,u)+M(f,r+d);let e=f.length*(r+d);return!l||e>j[p][c].length?c+M(f,r+d):e<=0?c:j[p][c][e]}function _(){let e=m.scan();for(u=0;e===15||e===14;)e===14&&n.keepLines?u+=1:e===14&&(u=1),e=m.scan();return h=e===16||m.getTokenError()!==0,e}let v=[];function y(n,r,i){!h&&(!t||r<s&&i>o)&&e.substring(r,i)!==n&&v.push({offset:r,length:i-r,content:n})}let b=_();if(n.keepLines&&u>0&&y(M(c,u),0,0),b!==17){let e=m.getTokenOffset()+a;y(f.length*r<20&&n.insertSpaces?k[f.length*r]:M(f,r),a,e)}for(;b!==17;){let e=m.getTokenOffset()+m.getTokenLength()+a,t=_(),r=``,i=!1;for(;u===0&&(t===12||t===13);){let n=m.getTokenOffset()+a;y(k[1],e,n),e=m.getTokenOffset()+m.getTokenLength()+a,i=t===12,r=i?g():``,t=_()}if(t===2)b!==1&&d--,n.keepLines&&u>0||!n.keepLines&&b!==1?r=g():n.keepLines&&(r=k[1]);else if(t===4)b!==3&&d--,n.keepLines&&u>0||!n.keepLines&&b!==3?r=g():n.keepLines&&(r=k[1]);else{switch(b){case 3:case 1:d++,r=n.keepLines&&u>0||!n.keepLines?g():k[1];break;case 5:r=n.keepLines&&u>0||!n.keepLines?g():k[1];break;case 12:r=g();break;case 13:u>0?r=g():i||(r=k[1]);break;case 6:n.keepLines&&u>0?r=g():i||(r=k[1]);break;case 10:n.keepLines&&u>0?r=g():t===6&&!i&&(r=``);break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&u>0?r=g():(t===12||t===13)&&!i?r=k[1]:t!==5&&t!==17&&(h=!0);break;case 16:h=!0;break}u>0&&(t===12||t===13)&&(r=g())}t===17&&(r=n.keepLines&&u>0?g():n.insertFinalNewline?c:``);let o=m.getTokenOffset()+a;y(r,e,o),b=t}return v}function M(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}function ie(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===k[1])r++;else if(t===` `)r+=i;else break;n++}return Math.floor(r/i)}function ae(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e);if(n===`\r`)return e+1<t.length&&t.charAt(e+1)===`
|
|
10
|
+
`?`\r
|
|
11
|
+
`:`\r`;if(n===`
|
|
12
|
+
`)return`
|
|
13
|
+
`}return e&&e.eol||`
|
|
14
|
+
`}function N(e,t){return`\r
|
|
15
|
+
`.indexOf(e.charAt(t))!==-1}var P=e((()=>{O(),ne()}));function oe(e,t=[],n=L.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return I(e,{onObjectBegin:()=>{let e={};o(e),a.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=a.pop()},onArrayBegin:()=>{let e=[];o(e),a.push(i),i=e,r=null},onArrayEnd:()=>{i=a.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function se(e,t=[],n=L.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}function a(e){return r.children.push(e),e}I(e,{onObjectBegin:e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:(e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:(e,t,n)=>{a({type:fe(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:(e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n);let o=r.children[0];return o&&delete o.parent,o}function F(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function ce(e){if(!e.parent||!e.parent.children)return[];let t=ce(e.parent);if(e.parent.type===`property`){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type===`array`){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function le(e){switch(e.type){case`array`:return e.children.map(le);case`object`:let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=le(e))}return t;case`null`:case`string`:case`number`:case`boolean`:return e.value;default:return}}function ue(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function de(e,t,n=!1){if(ue(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=de(r[e],t,n);if(i)return i}return e}}function I(e,t,n=L.DEFAULT){let r=ee(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),_=s(t.onSeparator),v=o(t.onComment),y=s(t.onError),b=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:b||C(11);break;case 2:C(12);break;case 6:C(16);break}switch(e){case 12:case 13:b?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){S();break}else if(n.indexOf(e)!==-1)break;e=S()}}}function w(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function T(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}function E(){return r.getToken()===10?(w(!1),r.getToken()===6?(_(`:`),S(),k()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function D(){d(),S();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||C(4,[],[]),_(`,`),S(),r.getToken()===2&&x)break}else e&&C(6,[],[]);E()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function O(){m(),S();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||C(4,[],[]),_(`,`),S(),r.getToken()===4&&x)break}else t&&C(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,k()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function k(){switch(r.getToken()){case 3:return O();case 1:return D();case 10:return w(!0);default:return T()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):k()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}function fe(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}var L,R=e((()=>{O(),(function(e){e.DEFAULT={allowTrailingComma:!1}})(L||(L={}))}));function pe(e,t,n,r){let i=t.slice(),a=se(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=F(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return z(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}else if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=F(o,[s]);if(t!==void 0)if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return z(e,{offset:i,length:a-i,content:``},r)}else return z(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return z(e,a,r)}}else if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return z(e,i,r)}else if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return z(e,i,r)}else if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return z(e,t,r)}else throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}else throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}function z(e,t,n){if(!n.formattingOptions)return[t];let r=B(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!N(r,i-1);)i--;for(;a<r.length&&!N(r,a);)a++}let o=re(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=B(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}function B(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var me=e((()=>{P(),R()}));function he(e,t,n,r){return pe(e,t,n,r)}function ge(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=B(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}var V,H,U,W,_e=e((()=>{P(),me(),O(),R(),(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(V||(V={})),(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(H||(H={})),U=oe,(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(W||(W={}))}));function G(e){return e.startsWith(ve)?e.slice(1):e}var ve,K=e((()=>{ve=``}));function ye(e,t){try{return{ok:!0,value:JSON.parse(G(e))}}catch(e){return t&&g(e),{ok:!1}}}function be(e){if(!e)return null;try{return U(G(e))}catch(e){return g(e),null}}function xe(e){let t=Y,n=e.length,r=t(e);if(!r.error||r.done||r.read>=n)return r.values;let i=r.values,a=r.read;for(;a<n;){let r=typeof e==`string`?e.indexOf(`
|
|
16
|
+
`,a):e.indexOf(10,a);if(r===-1)break;a=r+1;let o=t(e,a);if(o.values.length>0&&(i=i.concat(o.values)),!o.error||o.done||o.read>=n)break;a=o.read}return i}function Se(e){let t=e.length,n=0;e[0]===239&&e[1]===187&&e[2]===191&&(n=3);let r=[];for(;n<t;){let i=e.indexOf(10,n);i===-1&&(i=t);let a=e.toString(`utf8`,n,i).trim();if(n=i+1,a)try{r.push(JSON.parse(a))}catch{}}return r}function Ce(e){let t=G(e),n=t.length,r=0,i=[];for(;r<n;){let e=t.indexOf(`
|
|
17
|
+
`,r);e===-1&&(e=n);let a=t.substring(r,e).trim();if(r=e+1,a)try{i.push(JSON.parse(a))}catch{}}return i}function q(e){return Y?xe(e):typeof e==`string`?Ce(e):Se(e)}async function we(e){try{var t=m();let{size:n}=await C(e);if(n<=X)return q(await S(e));let r=t.a(await x(e,`r`)),i=Buffer.allocUnsafe(X),a=0,o=n-X;for(;a<X;){let{bytesRead:e}=await r.read(i,a,X-a,o+a);if(e===0)break;a+=e}let s=i.indexOf(10);return s!==-1&&s<a-1?q(i.subarray(s+1,a)):q(i.subarray(0,a))}catch(e){t.e=e}finally{await t.d()}}function Te(e,t){try{if(!e||e.trim()===``)return d([t],null,4);let n=G(e),r=U(n);if(Array.isArray(r)){let e=r.length,i=he(n,e===0?[0]:[e],t,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});return!i||i.length===0?d([...r,t],null,4):ge(n,i)}else return d([t],null,4)}catch(e){return g(e),d([t],null,4)}}var Ee,J,De,Y,X,Oe=e((()=>{_e(),K(),h(),v(),p(),f(),Ee=8*1024,J=_(ye,e=>e,50),De=Object.assign(function(e,t=!0){if(!e)return null;let n=e.length>Ee?ye(e,t):J(e,t);return n.ok?n.value:null},{cache:J.cache}),Y=(()=>{if(typeof Bun>`u`)return!1;let e=Bun.JSONL;return e?.parseChunk?e.parseChunk:!1})(),X=100*1024*1024})),ke,Z,Ae,Q,je,Me,Ne,Pe,Fe,Ie,Le,$,Re,ze=e((()=>{u(),b(),ke=y(()=>c([`local`,`user`,`project`,`dynamic`,`enterprise`,`claudeai`,`managed`])),y(()=>c([`stdio`,`sse`,`sse-ide`,`http`,`ws`,`sdk`,`claudeai-proxy`])),Z=y(()=>l({type:s(`stdio`).optional(),command:n().min(1,`Command cannot be empty`),args:i(n()).default([]),env:r(n(),n()).optional()})),Ae=y(()=>o()),Q=y(()=>l({clientId:n().optional(),callbackPort:t().int().positive().optional(),authServerMetadataUrl:n().url().startsWith(`https://`,{message:`authServerMetadataUrl must use https://`}).optional(),xaa:Ae().optional()})),je=y(()=>l({type:s(`sse`),url:n(),headers:r(n(),n()).optional(),headersHelper:n().optional(),oauth:Q().optional()})),Me=y(()=>l({type:s(`sse-ide`),url:n(),ideName:n(),ideRunningInWindows:o().optional()})),Ne=y(()=>l({type:s(`ws-ide`),url:n(),ideName:n(),authToken:n().optional(),ideRunningInWindows:o().optional()})),Pe=y(()=>l({type:s(`http`),url:n(),headers:r(n(),n()).optional(),headersHelper:n().optional(),oauth:Q().optional()})),Fe=y(()=>l({type:s(`ws`),url:n(),headers:r(n(),n()).optional(),headersHelper:n().optional()})),Ie=y(()=>l({type:s(`sdk`),name:n()})),Le=y(()=>l({type:s(`claudeai-proxy`),url:n(),id:n()})),$=y(()=>a([Z(),je(),Me(),Ne(),Pe(),Fe(),Ie(),Le()])),Re=y(()=>l({mcpServers:r(n(),$())}))}));export{ze as a,q as c,be as d,K as f,Z as i,we as l,Re as n,Te as o,G as p,$ as r,Oe as s,ke as t,De as u};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";var t,n,r,i,a=e((()=>{t=1440*60*1e3,n="Remote Control is only available with claude.ai subscriptions. Please use `/login` to sign in with your claude.ai account.",r=`Error: You must be logged in to use Remote Control.
|
|
2
|
+
|
|
3
|
+
`+n,i=`Remote Control disconnected.`}));export{a,i,n,t as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{L as r,T as i,V as a,W as o,d as s,s as c,w as l}from"./debug-UI3T040K.js";import{o as u}from"./log-CzsijfHZ.js";import{a as d,i as f}from"./genericProcessUtils-BGvcwuPt.js";import"os";import{join as p}from"path";import"crypto";import{readFile as m,readdir as h}from"fs/promises";import"net";import"node:string_decoder";var g=e((()=>{a(),l()})),_=e((()=>{c(),a(),n(),g(),u(),l()}));function v(){return p(t(),`sessions`)}async function y(){let e=v(),t;try{t=await h(e)}catch(e){return o(e)||s(`[udsClient] readdir failed: ${r(e)}`),[]}let n=[];for(let r of t){if(!/^\d+\.json$/.test(r))continue;let t=parseInt(r.slice(0,-5),10);if(d(t))try{let a=i(await m(p(e,r),`utf8`));n.push({pid:t,sessionId:a.sessionId,cwd:a.cwd,startedAt:a.startedAt,kind:a.kind,name:a.name,messagingSocketPath:a.messagingSocketPath,entrypoint:a.entrypoint,bridgeSessionId:a.bridgeSessionId,alive:!0})}catch{}}return n}e((()=>{n(),c(),a(),f(),l(),_(),g()}))();export{y as listAllLiveSessions};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{Rn as i,b as a,f as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{S as u,_ as d,dn as f,mn as p,on as m,xn as h}from"./paths-BBvuDQl9.js";import{d as g,s as _}from"./debug-UI3T040K.js";import{n as v,r as y}from"./analytics-DqMQntaB.js";import{_ as b,a as x,v as S}from"./git-CN3qtTb_.js";import{l as ee,u as te}from"./oauth-CdZEzMww.js";import{r as ne,t as C}from"./execFileNoThrow-CuQN1sz8.js";import{$_ as w,Dx as T,Ox as E,Q_ as D,X_ as O,Y_ as k,Z_ as A,cv as j,rv as M}from"./loadAgentsDir-DI1a76pd.js";import{a as N,r as P}from"./detectRepository-CBk3S2zv.js";import{a as F,l as I,o as L}from"./api-CGOR_Xfl.js";import{n as R,t as z}from"./usage-BRYRRgNt.js";async function B(){if(!f())return null;try{let{accessToken:e,orgUUID:t}=await I();return(await n.get(`${ee().BASE_API_URL}/v1/ultrareview/quota`,{headers:{...F(e),"x-organization-uuid":t},timeout:5e3})).data}catch(e){return g(`fetchUltrareviewQuota failed: ${e}`),null}}var V=e((()=>{r(),te(),m(),_(),L()}));function H(){G=!0}async function U(){if(h()||p())return{kind:`proceed`,billingNote:``};let[e,t]=await Promise.all([B(),z().catch(()=>null)]);if(!e)return{kind:`proceed`,billingNote:``};if(e.reviews_remaining>0)return{kind:`proceed`,billingNote:` This is free ultrareview ${e.reviews_used+1} of ${e.reviews_limit}.`};if(!t)return{kind:`proceed`,billingNote:``};let n=t.extra_usage;if(!n?.is_enabled)return y(`tengu_review_overage_not_enabled`,{}),{kind:`not-enabled`};let r=n.monthly_limit,i=n.used_credits??0,a=r==null?1/0:r-i;return a<10?(y(`tengu_review_overage_low_balance`,{available:a}),{kind:`low-balance`,available:a}):G?{kind:`proceed`,billingNote:` This review bills as Extra Usage.`}:(y(`tengu_review_overage_dialog_shown`,{}),{kind:`needs-confirm`})}async function W(e,t,n){let r=await k();if(!r.eligible){let e=r.errors.filter(e=>e.type!==`no_remote_environment`);if(e.length>0)return y(`tengu_review_remote_precondition_failed`,{precondition_errors:e.map(e=>e.type).join(`,`)}),[{type:`text`,text:`Ultrareview cannot launch:\n${e.map(O).join(`
|
|
2
|
+
`)}`}]}let i=n??``,a=e.trim(),o=/^\d+$/.test(a),s=`env_011111111111111111111113`,c=d(`tengu_review_bughunter_config`,null),l=(e,t,n)=>{if(typeof e!=`number`||!Number.isFinite(e))return t;let r=Math.floor(e);return r<=0||n!==void 0&&r>n?t:r},u={BUGHUNTER_DRY_RUN:`1`,BUGHUNTER_FLEET_SIZE:String(l(c?.fleet_size,5,20)),BUGHUNTER_MAX_DURATION:String(l(c?.max_duration_minutes,10,25)),BUGHUNTER_AGENT_TIMEOUT:String(l(c?.agent_timeout_seconds,600,1800)),BUGHUNTER_TOTAL_WALLCLOCK:String(l(c?.total_wallclock_minutes,22,27)),...process.env.BUGHUNTER_DEV_BUNDLE_B64&&{BUGHUNTER_DEV_BUNDLE_B64:process.env.BUGHUNTER_DEV_BUNDLE_B64}},f,p,m;if(o){let e=await P();if(!e||e.host!==`github.com`)return y(`tengu_review_remote_precondition_failed`,{}),null;f=await j({initialMessage:null,description:`ultrareview: ${e.owner}/${e.name}#${a}`,signal:t.abortController.signal,branchName:`refs/pull/${a}/head`,environmentId:s,environmentVariables:{BUGHUNTER_PR_NUMBER:a,BUGHUNTER_REPOSITORY:`${e.owner}/${e.name}`,...u}}),p=`/ultrareview ${a}`,m=`${e.owner}/${e.name}#${a}`}else{let e=await x()||`main`,{stdout:n,code:r}=await C(b(),[`merge-base`,e,`HEAD`],{preserveOutputOnError:!1}),i=n.trim();if(r!==0||!i)return y(`tengu_review_remote_precondition_failed`,{}),[{type:`text`,text:`Could not find merge-base with ${e}. Make sure you're in a git repo with a ${e} branch.`}];let{stdout:a,code:o}=await C(b(),[`diff`,`--shortstat`,i],{preserveOutputOnError:!1});if(o===0&&!a.trim())return y(`tengu_review_remote_precondition_failed`,{}),[{type:`text`,text:`No changes against the ${e} fork point. Make some commits or stage files first.`}];if(f=await j({initialMessage:null,description:`ultrareview: ${e}`,signal:t.abortController.signal,useBundle:!0,environmentId:s,environmentVariables:{BUGHUNTER_BASE_BRANCH:i,...u}}),!f)return y(`tengu_review_remote_teleport_failed`,{}),[{type:`text`,text:"Repo is too large. Push a PR and use `/ultrareview <PR#>` instead."}];p=`/ultrareview`,m=e}if(!f)return y(`tengu_review_remote_teleport_failed`,{}),null;w({remoteTaskType:`ultrareview`,session:f,command:p,context:t,isRemoteReview:!0}),y(`tengu_review_remote_launched`,{});let h=A(f.id);return[{type:`text`,text:`Ultrareview launched for ${m} (~10–20 min, runs in the cloud). Track: ${h}${i} Findings arrive via task-notification. Briefly acknowledge the launch to the user without repeating the target or URL — both are already visible in the tool output above.`}]}var G,K=e((()=>{u(),v(),V(),R(),D(),m(),N(),ne(),S(),M(),G=!1}));function q({onProceed:e,onCancel:t}){let[n,r]=(0,J.useState)(!1),i=(0,J.useRef)(new AbortController),s=(0,J.useCallback)(n=>{n===`proceed`?(r(!0),e(i.current.signal).catch(()=>r(!1))):t()},[e,t]),l=(0,J.useCallback)(()=>{i.current.abort(),t()},[t]);return(0,Y.jsx)(o,{title:`Ultrareview billing`,onCancel:l,color:`background`,children:(0,Y.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,Y.jsx)(a,{children:`Your free ultrareviews for this organization are used. Further reviews bill as Extra Usage (pay-per-use).`}),n?(0,Y.jsx)(a,{color:`background`,children:`Launching…`}):(0,Y.jsx)(T,{options:[{label:`Proceed with Extra Usage billing`,value:`proceed`},{label:`Cancel`,value:`cancel`}],onChange:s,onCancel:l})]})})}var J,Y,X=e((()=>{J=t(i(),1),E(),s(),Y=l()}));function re(e){return e.map(e=>e.type===`text`?e.text:``).filter(Boolean).join(`
|
|
3
|
+
`)}async function Z(e,t,n,r,i){let a=await W(e,t,r);i?.aborted||(a?n(re(a),{shouldQuery:!0}):n(`Ultrareview failed to launch the remote session. Check that this is a GitHub repo and try again.`,{display:`system`}))}var Q,$;e((()=>{K(),X(),Q=l(),$=async(e,t,n)=>{let r=await U();return r.kind===`not-enabled`?(e(`Free ultrareviews used. Enable Extra Usage at https://claude.ai/settings/billing to continue.`,{display:`system`}),null):r.kind===`low-balance`?(e(`Balance too low to launch ultrareview ($${r.available.toFixed(2)} available, $10 minimum). Top up at https://claude.ai/settings/billing`,{display:`system`}),null):r.kind===`needs-confirm`?(0,Q.jsx)(q,{onProceed:async r=>{await Z(n,t,e,` This review bills as Extra Usage.`,r),r.aborted||H()},onCancel:()=>e(`Ultrareview cancelled.`,{display:`system`})}):(await Z(n,t,e,r.billingNote),null)}}))();export{$ as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t}from"./undercover-DvvnEmsX.js";t();export{e as shouldShowUndercoverAutoNotice};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{Ac as r,Sc as i}from"./paths-BBvuDQl9.js";import{l as a,s as o}from"./commitAttribution-C22a3OCi.js";function s(){return process.env.USER_TYPE===`ant`?n(process.env.CLAUDE_CODE_UNDERCOVER)?!0:o()!==`internal`:!1}function c(){return process.env.USER_TYPE===`ant`?`## UNDERCOVER MODE — CRITICAL
|
|
2
|
+
|
|
3
|
+
You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Your commit
|
|
4
|
+
messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal
|
|
5
|
+
information. Do not blow your cover.
|
|
6
|
+
|
|
7
|
+
NEVER include in commit messages or PR descriptions:
|
|
8
|
+
- Internal model codenames (animal names like Capybara, Tengu, etc.)
|
|
9
|
+
- Unreleased model version numbers (e.g., sonnet-4-8)
|
|
10
|
+
- Internal repo or project names (e.g., claude-cli-internal, anthropics/…)
|
|
11
|
+
- Internal tooling, Slack channels, or short links (e.g., go/cc, #claude-code-…)
|
|
12
|
+
- The phrase "Claude Code" or any mention that you are an AI
|
|
13
|
+
- Any hint of what model or version you are
|
|
14
|
+
- Co-Authored-By lines or any other attribution
|
|
15
|
+
|
|
16
|
+
Write commit messages as a human developer would — describe only what the code
|
|
17
|
+
change does.
|
|
18
|
+
|
|
19
|
+
GOOD:
|
|
20
|
+
- "Fix race condition in file watcher initialization"
|
|
21
|
+
- "Add support for custom key bindings"
|
|
22
|
+
- "Refactor parser for better error messages"
|
|
23
|
+
|
|
24
|
+
BAD (never write these):
|
|
25
|
+
- "Fix bug found while testing with Claude Capybara"
|
|
26
|
+
- "1-shotted by claude-opus-4-6"
|
|
27
|
+
- "1-shotted by claude-opus-4-7"
|
|
28
|
+
- "Generated with Claude Code"
|
|
29
|
+
- "Co-Authored-By: Claude Opus 4.6 <…>"
|
|
30
|
+
- "Co-Authored-By: Claude Opus 4.7 <…>"
|
|
31
|
+
`:``}function l(){return process.env.USER_TYPE===`ant`?!(n(process.env.CLAUDE_CODE_UNDERCOVER)||!s()||i().hasSeenUndercoverAutoNotice):!1}var u=e((()=>{a(),r(),t()}));export{l as i,u as n,s as r,c as t};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{r as e,v as t}from"./git-CN3qtTb_.js";import{join as n}from"path";import{readFileSync as r}from"fs";import{spawnSync as i}from"child_process";t();async function a(){let t=process.cwd(),a=e(t),s=a?[a,t]:[t],c=null;for(let e of s){let t=n(e,`CLAUDE.md`);try{if(c=o(r(t,`utf-8`)),c){console.log(`Found "# claude up" in ${t}`);break}}catch{}}if(!c){console.log(`No "# claude up" section found in CLAUDE.md.
|
|
2
|
+
Add a section like:
|
|
3
|
+
|
|
4
|
+
# claude up
|
|
5
|
+
\`\`\`bash
|
|
6
|
+
npm install
|
|
7
|
+
npm run build
|
|
8
|
+
\`\`\``);return}console.log(`Running:
|
|
9
|
+
`),console.log(c),console.log();let l=i(`bash`,[`-c`,c],{cwd:t,stdio:`inherit`});l.status===0?console.log(`
|
|
10
|
+
claude up completed successfully.`):(console.error(`\nclaude up failed with exit code ${l.status}`),process.exitCode=l.status??1)}function o(e){let t=e.split(`
|
|
11
|
+
`),n=!1,r=[];for(let e of t){if(/^#\s+claude\s+up\b/i.test(e)){n=!0;continue}if(n&&/^#\s/.test(e))break;n&&r.push(e)}if(r.length===0)return null;let i=r.join(`
|
|
12
|
+
`).trim();return i=i.replace(/^```\w*\n?/,``).replace(/\n?```\s*$/,``),i.trim()||null}export{a as up};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{In as e,Ln as t}from"./src-Di342QoJ.js";import{d as n,s as r}from"./debug-UI3T040K.js";import{n as i,o as a}from"./process-DMKLUQIO.js";import{n as o,r as s}from"./execFileNoThrow-CuQN1sz8.js";import{GT as c,qT as l}from"./loadAgentsDir-DI1a76pd.js";import{n as u,t as d}from"./distRoot-CcxmnzqQ.js";import{join as f}from"node:path";import{execSync as p}from"node:child_process";import{existsSync as m,readFileSync as h}from"node:fs";import{homedir as g}from"node:os";t(),r(),u(),s(),l(),i();var _=`claude-code-best`;function v(){try{let e=f(d,`..`,`package.json`);if(m(e)){let t=JSON.parse(h(e,`utf-8`));if(t.version)return t.version}}catch{}return`2.6.5`}function y(e){try{return p(`which ${e} 2>/dev/null`,{stdio:`pipe`}),!0}catch{return!1}}function b(){return!!(process.execPath.includes(`bun`)||m(f(f(g(),`.bun`,`install`,`global`),`node_modules`,_)))}async function x(){let e=await o(`npm`,[`view`,`${_}@latest`,`version`,`--prefer-online`],{abortSignal:AbortSignal.timeout(1e4),cwd:g()});return e.code===0?e.stdout.trim():(n(`npm view failed: ${e.stderr}`),null)}function S(e,t){let n=e=>e.replace(/^\D/,``).split(`.`).map(Number),r=n(e),i=n(t);for(let e=0;e<3;e++){if((r[e]??0)>(i[e]??0))return!0;if((r[e]??0)<(i[e]??0))return!1}return!0}async function C(){let t=v();a(`Current version: ${t}\n`);let n=y(`bun`),r=b()&&n?`bun`:`npm`;a(`Package manager: ${r}\n`),a(`Checking for updates...
|
|
2
|
+
`);let i=await x();if(!i){process.stderr.write(e.red(`Failed to check for updates`)+`
|
|
3
|
+
`),process.stderr.write(`Unable to fetch latest version from npm registry.
|
|
4
|
+
`),await c(1);return}if(i===t||S(t,i)){a(e.green(`ccb is up to date (${t})`)+`
|
|
5
|
+
`),await c(0);return}a(`New version available: ${i} (current: ${t})\n`),a(`Installing update via ${r}...\n`);try{p(r===`bun`?`bun install -g ${_}@latest`:`npm install -g ${_}@latest`,{stdio:`inherit`,cwd:g(),timeout:12e4}),a(e.green(`Successfully updated from ${t} to ${i}`)+`
|
|
6
|
+
`)}catch(t){process.stderr.write(e.red(`Update failed`)+`
|
|
7
|
+
`),process.stderr.write(`${t}\n`),process.stderr.write(`
|
|
8
|
+
`),process.stderr.write(`Try manually updating with:
|
|
9
|
+
`),r===`bun`?process.stderr.write(e.bold(` bun install -g ${_}@latest`)+`
|
|
10
|
+
`):process.stderr.write(e.bold(` npm install -g ${_}@latest`)+`
|
|
11
|
+
`),await c(1)}await c(0)}export{C as updateCCB};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./upgrade-DTBZSxwv.js";e();export{t as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{Jt as r,dn as i,on as a,va as o,ya as s}from"./paths-BBvuDQl9.js";import{o as c,s as l}from"./log-CzsijfHZ.js";import{n as u,t as d}from"./browser-fLRXxIsQ.js";import{r as f,t as p}from"./login-nwTOoyxv.js";async function m(e,t){try{if(i()){let t=r(),n=!1;if(t?.subscriptionType&&t?.rateLimitTier)n=t.subscriptionType===`max`&&t.rateLimitTier===`default_claude_max_20x`;else if(t?.accessToken){let e=await o(t.accessToken);n=e?.organization?.organization_type===`claude_max`&&e?.organization?.rate_limit_tier===`default_claude_max_20x`}if(n)return setTimeout(e,0,`You are already on the highest Max subscription plan. For additional usage, run /login to switch to an API usage-billed account.`),null}return await u(`https://claude.ai/upgrade/max`),(0,h.jsx)(p,{startingMessage:`Starting new login following /upgrade. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}catch(t){l(t),setTimeout(e,0,`Failed to open browser. Please visit https://claude.ai/upgrade/max to upgrade.`)}return null}var h,g=e((()=>{t(),s(),a(),d(),c(),f(),h=n()}));export{g as n,m 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{Ln as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{E as o,d as s,s as c,w as l}from"./debug-UI3T040K.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{a as m,r as h,t as g}from"./bridgeConfig-lRZfQqmA.js";import{basename as _,extname as v}from"path";import{randomUUID as y}from"crypto";import{readFile as b}from"fs/promises";function x(e){return D[v(e).toLowerCase()]??`application/octet-stream`}function S(e){s(`[brief:upload] ${e}`)}function C(){return h()??process.env.ANTHROPIC_BASE_URL??u().BASE_API_URL}async function w(e,n,r){{if(!r.replBridgeEnabled)return;if(n>T){S(`skip ${e}: ${n} bytes exceeds ${T} limit`);return}let i=g();if(!i){S(`skip: no oauth token`);return}let a;try{a=await b(e)}catch(t){S(`read failed for ${e}: ${t}`);return}let s=`${C()}/api/oauth/file_upload`,c=_(e),l=x(c),u=`----FormBoundary${y()}`,d=Buffer.concat([Buffer.from(`--${u}\r\nContent-Disposition: form-data; name="file"; filename="${c}"\r\nContent-Type: ${l}\r\n\r\n`),a,Buffer.from(`\r\n--${u}--\r\n`)]);try{let a=await t.post(s,d,{headers:{Authorization:`Bearer ${i}`,"Content-Type":`multipart/form-data; boundary=${u}`,"Content-Length":d.length.toString()},timeout:E,signal:r.signal,validateStatus:()=>!0});if(a.status!==201){S(`upload failed for ${e}: status=${a.status} body=${o(a.data).slice(0,200)}`);return}let c=O().safeParse(a.data);if(!c.success){S(`unexpected response shape for ${e}: ${c.error.message}`);return}return S(`uploaded ${e} → ${c.data.file_uuid} (${n} bytes)`),c.data.file_uuid}catch(t){S(`upload threw for ${e}: ${t}`);return}}}var T,E,D,O;e((()=>{n(),a(),m(),d(),c(),p(),l(),T=30*1024*1024,E=3e4,D={".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".webp":`image/webp`},O=f(()=>i({file_uuid:r()}))}))();export{w as uploadBriefAttachment};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{i as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{U as r,V as i,X as a,Y as o,d as s,s as c}from"./debug-UI3T040K.js";import{c as l,g as u,h as d,l as f,u as p}from"./proxy-CfZp-wce.js";import{homedir as m}from"os";import{join as h}from"path";import{mkdir as g,readFile as _,unlink as v,writeFile as y}from"fs/promises";import{createServer as b}from"node:net";t(),o(),i(),c(),u(),p();var x,S=512*1024,C=3e4;function w(e){let t=e.length,n=[],r=t;for(;r>127;)n.push(r&127|128),r>>>=7;n.push(r);let i=new Uint8Array(1+n.length+t);return i[0]=10,i.set(n,1),i.set(e,1+n.length),i}function T(e){if(e.length===0)return new Uint8Array;if(e[0]!==10)return null;let t=0,n=0,r=1;for(;r<e.length;){let i=e[r];if(t|=(i&127)<<n,r++,!(i&128))break;if(n+=7,n>28)return null}return r+t>e.length?null:e.subarray(r,r+t)}function E(){return{connectBuf:Buffer.alloc(0),pending:[],wsOpen:!1,established:!1,closed:!1}}async function D(e){let t=`Basic `+Buffer.from(`${e.sessionId}:${e.token}`).toString(`base64`),n=`Bearer ${e.token}`,r=typeof Bun<`u`?O(e.wsUrl,t,n):await k(e.wsUrl,t,n);return s(`[upstreamproxy] relay listening on 127.0.0.1:${r.port}`),r}function O(e,t,n){let r=Bun.listen({hostname:`127.0.0.1`,port:0,socket:{open(e){e.data={...E(),writeBuf:[]}},data(r,i){let a=r.data;A({write:e=>{let t=typeof e==`string`?Buffer.from(e,`utf8`):e;if(a.writeBuf.length>0){a.writeBuf.push(t);return}let n=r.write(t);n<t.length&&a.writeBuf.push(t.subarray(n))},end:()=>r.end()},a,i,e,t,n)},drain(e){let t=e.data;for(;t.writeBuf.length>0;){let n=t.writeBuf[0],r=e.write(n);if(r<n.length){t.writeBuf[0]=n.subarray(r);return}t.writeBuf.shift()}},close(e){P(e.data)},error(e,t){s(`[upstreamproxy] client socket error: ${t.message}`),P(e.data)}}});return{port:r.port,stop:()=>r.stop(!0)}}async function k(e,t,n){x=(await import(`./wrapper-BSK0MCQH.js`)).default;let r=new WeakMap,i=b(i=>{let a=E();r.set(i,a);let o={write:e=>{i.write(typeof e==`string`?e:Buffer.from(e))},end:()=>i.end()};i.on(`data`,r=>A(o,a,r,e,t,n)),i.on(`close`,()=>P(r.get(i))),i.on(`error`,e=>{s(`[upstreamproxy] client socket error: ${e.message}`),P(r.get(i))})});return new Promise((e,t)=>{i.once(`error`,t),i.listen(0,`127.0.0.1`,()=>{let n=i.address();if(n===null||typeof n==`string`){t(Error(`upstreamproxy: server has no TCP address`));return}e({port:n.port,stop:()=>i.close()})})})}function A(e,t,n,r,i,a){if(!t.ws){t.connectBuf=Buffer.concat([t.connectBuf,n]);let o=t.connectBuf.indexOf(`\r
|
|
2
|
+
\r
|
|
3
|
+
`);if(o===-1){t.connectBuf.length>8192&&(e.write(`HTTP/1.1 400 Bad Request\r
|
|
4
|
+
\r
|
|
5
|
+
`),e.end());return}let s=t.connectBuf.subarray(0,o).toString(`utf8`).split(`\r
|
|
6
|
+
`)[0]??``;if(!s.match(/^CONNECT\s+(\S+)\s+HTTP\/1\.[01]$/i)){e.write(`HTTP/1.1 405 Method Not Allowed\r
|
|
7
|
+
\r
|
|
8
|
+
`),e.end();return}let c=t.connectBuf.subarray(o+4);c.length>0&&t.pending.push(Buffer.from(c)),t.connectBuf=Buffer.alloc(0),j(e,t,s,r,i,a);return}if(!t.wsOpen){t.pending.push(Buffer.from(n));return}N(t.ws,n)}function j(e,t,n,r,i,a){let o={"Content-Type":`application/proto`,Authorization:a},c;c=x?new x(r,{headers:o,agent:l(r),...d()}):new globalThis.WebSocket(r,{headers:o,proxy:f(r),tls:d()||void 0}),c.binaryType=`arraybuffer`,t.ws=c,c.onopen=()=>{let e=`${n}\r\nProxy-Authorization: ${i}\r\n\r\n`;c.send(w(new Uint8Array(Buffer.from(e,`utf8`)))),t.wsOpen=!0;for(let e of t.pending)N(c,e);t.pending=[],t.pinger=setInterval(M,C,c)},c.onmessage=n=>{let r=T(n.data instanceof ArrayBuffer?new Uint8Array(n.data):new Uint8Array(Buffer.from(n.data)));r&&r.length>0&&(t.established=!0,e.write(r))},c.onerror=n=>{s(`[upstreamproxy] ws error: ${`message`in n?String(n.message):`websocket error`}`),!t.closed&&(t.closed=!0,t.established||e.write(`HTTP/1.1 502 Bad Gateway\r
|
|
9
|
+
\r
|
|
10
|
+
`),e.end(),P(t))},c.onclose=()=>{t.closed||(t.closed=!0,e.end(),P(t))}}function M(e){e.readyState===WebSocket.OPEN&&e.send(w(new Uint8Array))}function N(e,t){if(e.readyState===WebSocket.OPEN)for(let n=0;n<t.length;n+=S){let r=new Uint8Array(t.subarray(n,n+S));e.send(w(r))}}function P(e){if(e){if(e.pinger&&clearInterval(e.pinger),e.ws&&e.ws.readyState<=WebSocket.OPEN)try{e.ws.close()}catch{}e.ws=void 0}}c();var F=`/etc/ssl/certs/ca-certificates.crt`,I=[`localhost`,`127.0.0.1`,`::1`,`169.254.0.0/16`,`10.0.0.0/8`,`172.16.0.0/12`,`192.168.0.0/16`,`anthropic.com`,`.anthropic.com`,`*.anthropic.com`,`github.com`,`api.github.com`,`*.github.com`,`*.githubusercontent.com`,`registry.npmjs.org`,`pypi.org`,`files.pythonhosted.org`,`index.crates.io`,`proxy.golang.org`].join(`,`),L={enabled:!1};async function R(e){if(!n(process.env.CLAUDE_CODE_REMOTE)||!n(process.env.CCR_UPSTREAM_PROXY_ENABLED))return L;let t=process.env.CLAUDE_CODE_REMOTE_SESSION_ID;if(!t)return s(`[upstreamproxy] CLAUDE_CODE_REMOTE_SESSION_ID unset; proxy disabled`,{level:`warn`}),L;let r=e?.tokenPath??`/run/ccr/session_token`,i=await B(r);if(!i)return s(`[upstreamproxy] no session token file; proxy disabled`),L;V();let o=e?.ccrBaseUrl??process.env.ANTHROPIC_BASE_URL??`https://api.anthropic.com`,c=e?.caBundlePath??h(m(),`.ccr`,`ca-bundle.crt`);if(!await H(o,e?.systemCaPath??F,c))return L;try{let e=await D({wsUrl:o.replace(/^http/,`ws`)+`/v1/code/upstreamproxy/ws`,sessionId:t,token:i});a(async()=>e.stop()),L={enabled:!0,port:e.port,caBundlePath:c},s(`[upstreamproxy] enabled on 127.0.0.1:${e.port}`),await v(r).catch(()=>{s(`[upstreamproxy] token file unlink failed`,{level:`warn`})})}catch(e){s(`[upstreamproxy] relay start failed: ${e instanceof Error?e.message:String(e)}; proxy disabled`,{level:`warn`})}return L}function z(){if(!L.enabled||!L.port||!L.caBundlePath){if(process.env.HTTPS_PROXY&&process.env.SSL_CERT_FILE){let e={};for(let t of[`HTTPS_PROXY`,`https_proxy`,`NO_PROXY`,`no_proxy`,`SSL_CERT_FILE`,`NODE_EXTRA_CA_CERTS`,`REQUESTS_CA_BUNDLE`,`CURL_CA_BUNDLE`])process.env[t]&&(e[t]=process.env[t]);return e}return{}}let e=`http://127.0.0.1:${L.port}`;return{HTTPS_PROXY:e,https_proxy:e,NO_PROXY:I,no_proxy:I,SSL_CERT_FILE:L.caBundlePath,NODE_EXTRA_CA_CERTS:L.caBundlePath,REQUESTS_CA_BUNDLE:L.caBundlePath,CURL_CA_BUNDLE:L.caBundlePath}}async function B(e){try{return(await _(e,`utf8`)).trim()||null}catch(e){return r(e)||s(`[upstreamproxy] token read failed: ${e instanceof Error?e.message:String(e)}`,{level:`warn`}),null}}function V(){if(!(process.platform!==`linux`||typeof Bun>`u`))try{e(`bun:ffi`).dlopen(`libc.so.6`,{prctl:{args:[`int`,`u64`,`u64`,`u64`,`u64`],returns:`int`}}).symbols.prctl(4,0n,0n,0n,0n)!==0&&s(`[upstreamproxy] prctl(PR_SET_DUMPABLE,0) returned nonzero`,{level:`warn`})}catch(e){s(`[upstreamproxy] prctl unavailable: ${e instanceof Error?e.message:String(e)}`,{level:`warn`})}}async function H(e,t,n){try{let r=await fetch(`${e}/v1/code/upstreamproxy/ca-cert`,{signal:AbortSignal.timeout(5e3)});if(!r.ok)return s(`[upstreamproxy] ca-cert fetch ${r.status}; proxy disabled`,{level:`warn`}),!1;let i=await r.text(),a=await _(t,`utf8`).catch(()=>``);return await g(h(n,`..`),{recursive:!0}),await y(n,a+`
|
|
11
|
+
`+i,`utf8`),!0}catch(e){return s(`[upstreamproxy] ca-cert download failed: ${e instanceof Error?e.message:String(e)}; proxy disabled`,{level:`warn`}),!1}}export{z as getUpstreamProxyEnv,R as initUpstreamProxy};
|
|
@@ -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{At as r,Jt as i,an as a,bt as o,da as s,dn as c,jt as l,on as u,ua as d,wt as f}from"./paths-BBvuDQl9.js";import{l as p,u as m}from"./oauth-CdZEzMww.js";async function h(){if(!c()||!a())return{};let e=i();if(e&&s(e.expiresAt))return null;let n=o();if(n.error)throw Error(`Auth error: ${n.error}`);let l={"Content-Type":`application/json`,"User-Agent":r(),...n.headers},u=`${p().BASE_API_URL}/api/oauth/usage`;return(await t.get(u,{headers:l,timeout:5e3})).data}var g=e((()=>{n(),m(),u(),f(),l(),d()}));export{g as n,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./jsx-runtime-D-D469L8.js";import{n,t as r}from"./Settings-vfFvcweR.js";var i,a;e((()=>{n(),i=t(),a=async(e,t)=>(0,i.jsx)(r,{onClose:e,context:t,defaultTab:`Usage`})}))();export{a as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./src-Di342QoJ.js";var n=e((()=>{t()}));export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{Br as r,Pr as i,S as a,w as o,wr as s}from"./paths-BBvuDQl9.js";import{MS as c,jS as l}from"./loadAgentsDir-DI1a76pd.js";function u(){let e=c(e=>e.mainLoopModel),t=c(e=>e.mainLoopModelForSession),[,n]=(0,d.useReducer)(e=>e+1,0);return(0,d.useEffect)(()=>o(n),[]),r(t??e??s())}var d,f=e((()=>{d=t(n(),1),a(),l(),i()}));export{u as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{K as n,V as r,d as i,s as a}from"./debug-UI3T040K.js";import{n as o,r as s}from"./analytics-DqMQntaB.js";import{F as c,P as l}from"./git-CN3qtTb_.js";import{o as u,s as d}from"./log-CzsijfHZ.js";import{b as f,x as p}from"./teammate-DMYOtLTK.js";import{Cc as m,Cw as h,MS as g,OS as _,Ov as v,PS as y,Sc as b,Tc as x,_h as S,bh as C,fs as w,hh as T,jS as E,kS as D,kv as O,ps as k,wc as A,ww as j,yh as M}from"./loadAgentsDir-DI1a76pd.js";import{n as N,r as P}from"./pluginFlagging-Dggxke70.js";import{t as F}from"./pluginBlocklist-DJrMdzT0.js";var I=e(t(),1);_(),o(),T(),E(),p(),a(),l(),r(),u(),A(),m(),v(),M(),h(),P(),w();function L({enabled:e=!0}={}){let t=y(),r=g(e=>e.plugins.needsRefresh),{addNotification:a}=D(),o=(0,I.useCallback)(async()=>{try{let{enabled:e,disabled:n,errors:r}=await k();await F();let o=N();Object.keys(o).length>0&&a({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let s=[],c=[];try{s=await b()}catch(e){let t=e instanceof Error?e.message:String(e);r.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{c=await x()}catch(e){let t=e instanceof Error?e.message:String(e);r.push({type:`generic-error`,source:`plugin-agents`,error:`Failed to load plugin agents: ${t}`})}try{await O()}catch(e){let t=e instanceof Error?e.message:String(e);r.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let l=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await j(e,r);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),u=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await C(e,r);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);S(),t(t=>{let i=t.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),a=new Set(r.map(e=>e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`)),o=[...i.filter(e=>{let t=e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`;return!a.has(t)}),...r];return{...t,plugins:{...t.plugins,enabled:e,disabled:n,commands:s,errors:o}}}),i(`Loaded plugins - Enabled: ${e.length}, Disabled: ${n.length}, Commands: ${s.length}, Agents: ${c.length}, Errors: ${r.length}`);let d=e.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return{enabled_count:e.length,disabled_count:n.length,inline_count:f(e,e=>e.source.endsWith(`@inline`)),marketplace_count:f(e,e=>!e.source.endsWith(`@inline`)),error_count:r.length,skill_count:s.length,agent_count:c.length,hook_count:d,mcp_count:l,lsp_count:u,ant_enabled_names:process.env.USER_TYPE===`ant`&&e.length>0?e.map(e=>e.name).sort().join(`,`):void 0}}catch(e){let r=n(e);return d(r),i(`Error loading plugins: ${e}`),t(e=>{let t=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),n={type:`generic-error`,source:`plugin-system`,error:r.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...t,n]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[t,a]);(0,I.useEffect)(()=>{e&&o().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};s(`tengu_plugins_loaded`,{...r,...t!==void 0&&{enabled_names:t}}),c(`info`,`tengu_plugins_loaded`,r)})},[o,e]),(0,I.useEffect)(()=>{!e||!r||a({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,r,a])}export{L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{Uu as r,qu as i}from"./loadAgentsDir-DI1a76pd.js";import{i as a,n as o}from"./toolPool-Dq-Vtvrj.js";function s(e,t,n){return(0,c.useMemo)(()=>a(e,r(n,t),n.mode),[e,t,n,!1,!1])}var c,l=e((()=>{c=t(n(),1),i(),o()}));export{s as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,t as i,xt as a,zt as o}from"./src-Di342QoJ.js";import{Lw as s,Qx as c,Xx as l,Zx as u,aS as d,iS as f,nS as p,oS as m,rS as h,sS as g}from"./loadAgentsDir-DI1a76pd.js";function _(e){return!!(e.ctrl&&(e.key===`k`||e.key===`u`||e.key===`w`)||e.meta&&e.key===`backspace`)}function v(e){return(e.ctrl||e.meta)&&e.key===`y`}function y({isActive:e,onExit:t,onCancel:r,onExitUp:i,columns:s,passthroughCtrlKeys:c=[],initialQuery:y=``,backspaceExitsOnEmpty:S=!0}){let{columns:C}=n(),w=s??C,[T,E]=(0,b.useState)(y),[D,O]=(0,b.useState)(y.length),k=(0,b.useCallback)(e=>{E(e),O(e.length)},[]),A=n=>{if(!e)return;let a=l.fromText(T,w,D);if(!(n.ctrl&&c.includes(n.key.toLowerCase()))){if(_(n)||f(),v(n)||d(),n.key===`return`||n.key===`down`){n.preventDefault(),t();return}if(n.key===`up`){n.preventDefault(),i&&i();return}if(n.key===`escape`){n.preventDefault(),r?r():T.length>0?(E(``),O(0)):t();return}if(n.key===`backspace`){if(n.preventDefault(),n.meta){let{cursor:e,killed:t}=a.deleteWordBefore();p(t,`prepend`),E(e.text),O(e.offset);return}if(T.length===0){S&&(r??t)();return}let e=a.backspace();E(e.text),O(e.offset);return}if(n.key===`delete`){n.preventDefault();let e=a.del();E(e.text),O(e.offset);return}if(n.key===`left`&&(n.ctrl||n.meta||n.fn)){n.preventDefault(),O(a.prevWord().offset);return}if(n.key===`right`&&(n.ctrl||n.meta||n.fn)){n.preventDefault(),O(a.nextWord().offset);return}if(n.key===`left`){n.preventDefault(),O(a.left().offset);return}if(n.key===`right`){n.preventDefault(),O(a.right().offset);return}if(n.key===`home`){n.preventDefault(),O(0);return}if(n.key===`end`){n.preventDefault(),O(T.length);return}if(n.ctrl){switch(n.preventDefault(),n.key.toLowerCase()){case`a`:O(0);return;case`e`:O(T.length);return;case`b`:O(a.left().offset);return;case`f`:O(a.right().offset);return;case`d`:{if(T.length===0){(r??t)();return}let e=a.del();E(e.text),O(e.offset);return}case`h`:{if(T.length===0){S&&(r??t)();return}let e=a.backspace();E(e.text),O(e.offset);return}case`k`:{let{cursor:e,killed:t}=a.deleteToLineEnd();p(t,`append`),E(e.text),O(e.offset);return}case`u`:{let{cursor:e,killed:t}=a.deleteToLineStart();p(t,`prepend`),E(e.text),O(e.offset);return}case`w`:{let{cursor:e,killed:t}=a.deleteWordBefore();p(t,`prepend`),E(e.text),O(e.offset);return}case`y`:{let e=u();if(e.length>0){let t=a.offset,n=a.insert(e);h(t,e.length),E(n.text),O(n.offset)}return}case`g`:case`c`:if(r){r();return}}return}if(n.meta){switch(n.preventDefault(),n.key.toLowerCase()){case`b`:O(a.prevWord().offset);return;case`f`:O(a.nextWord().offset);return;case`d`:{let e=a.deleteWordAfter();E(e.text),O(e.offset);return}case`y`:{let e=g();if(e){let{text:t,start:n,length:r}=e,i=T.slice(0,n),a=T.slice(n+r),o=i+t+a,s=n+t.length;m(t.length),E(o),O(s)}return}}return}if(n.key!==`tab`&&n.key.length>=1&&!x.has(n.key)){n.preventDefault();let e=a.insert(n.key);E(e.text),O(e.offset)}}};return a((e,t,n)=>{A(new o(n.keypress))},{isActive:e}),{query:T,setQuery:k,cursorOffset:D,handleKeyDown:A}}var b,x,S=e((()=>{b=t(r(),1),i(),c(),s(),x=new Set([`pageup`,`pagedown`,`insert`,`wheelup`,`wheeldown`,`mouse`,`f1`,`f2`,`f3`,`f4`,`f5`,`f6`,`f7`,`f8`,`f9`,`f10`,`f11`,`f12`])}));export{y as n,S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";import{W as r,cn as i}from"./state-sIHsFpDu.js";import{Ab as a,BS as o,OS as s,VS as c,jb as l,kS as u}from"./loadAgentsDir-DI1a76pd.js";function d(){let{addNotification:e,removeNotification:t}=u(),[n,i]=(0,f.useState)(()=>{let{errors:e}=a();return e});return c((0,f.useCallback)(()=>{let{errors:e}=a();i(e)},[])),(0,f.useEffect)(()=>{r()||(n.length>0?e({key:p,text:`Found ${n.length} settings ${n.length===1?`issue`:`issues`} · /doctor for details`,color:`warning`,priority:`high`,timeoutMs:6e4}):t(p))},[n,e,t]),n}var f,p,m=e((()=>{f=t(n()),s(),i(),l(),o(),p=`settings-errors`}));export{d as n,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{Rn as a,Ut as o,t as s}from"./src-Di342QoJ.js";import{cn as c,ut as l}from"./state-sIHsFpDu.js";import{Ka as u,oo as d}from"./paths-BBvuDQl9.js";import{K as f,V as p,d as m,s as h}from"./debug-UI3T040K.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{i as v,v as y}from"./git-CN3qtTb_.js";import{o as b,s as x}from"./log-CzsijfHZ.js";import{i as ee,s as S}from"./intl-Pse97ORk.js";import{n as te,t as C}from"./sleep-8Eb9j_Ly.js";import{KS as ne,WS as w}from"./loadAgentsDir-DI1a76pd.js";import{i as re,n as T,r as E}from"./voiceStreamSTT-_w1VjIOs.js";import{basename as D}from"path";import{homedir as O}from"node:os";function k(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).split(/[-_./\s]+/).map(e=>e.trim()).filter(e=>e.length>2&&e.length<=20)}function A(e){return k(D(e).replace(/\.[^.]+$/,``))}async function j(e){let t=new Set(M);try{let e=l();if(e){let n=D(e);n.length>2&&n.length<=50&&t.add(n)}}catch{}try{let e=await v();if(e)for(let n of k(e))t.add(n)}catch{}if(e)for(let n of e){if(t.size>=N)break;for(let e of A(n))t.add(e)}return[...t].slice(0,N)}var M,N,P=e((()=>{c(),y(),M=[`MCP`,`symlink`,`grep`,`regex`,`localhost`,`codebase`,`TypeScript`,`JSON`,`OAuth`,`webhook`,`gRPC`,`dotfiles`,`subagent`,`worktree`],N=50}));function ie(){return L===null?!0:L}async function ae(e,t){let n;try{n=await import(`doubaoime-asr`)}catch(t){return x(Error(`[doubao-asr] Failed to import doubaoime-asr package: ${String(t)}`)),e.onError(`doubaoime-asr package import failed: ${String(t)}`,{fatal:!0}),null}let{transcribeRealtime:r,ASRConfig:i,ResponseType:a}=n,o=new I,s=!1,c={resolve:null},l={send(e){s||o.push(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},finalize(){return s?Promise.resolve(`ws_already_closed`):(s=!0,o.push(null),m(`[doubao-asr] Finalize — resolving immediately`),Promise.resolve(`post_closestream_endpoint`))},close(){s=!0,o.abort();let t=c.resolve;c.resolve=null,t&&t(`ws_close`),e.onClose()},isConnected(){return!0}},u=new i({credentialPath:`${O()}/.claude/tts/doubao/credentials.json`});try{await u.ensureCredentials()}catch(t){return x(Error(`[doubao-asr] Credential initialization failed: ${String(t)}`)),e.onError(`Doubao ASR 凭证初始化失败: ${String(t)}`,{fatal:!0}),null}return m(`[doubao-asr] Firing onReady immediately`),e.onReady(l),(async()=>{try{let t=r(o,{config:u});for await(let n of t)if(!(s&&n.type!==a.FINAL_RESULT&&n.type!==a.SESSION_FINISHED))switch(n.type){case a.SESSION_STARTED:m(`[doubao-asr] Session started`);break;case a.VAD_START:m(`[doubao-asr] VAD detected speech start`);break;case a.INTERIM_RESULT:n.text&&e.onTranscript(n.text,!1);break;case a.FINAL_RESULT:n.text&&e.onTranscript(n.text,!0);break;case a.ERROR:x(Error(`[doubao-asr] Error: ${n.errorMsg}`)),s||e.onError(n.errorMsg||`Doubao ASR 识别错误`);break;case a.SESSION_FINISHED:m(`[doubao-asr] Session finished`);break;default:break}let n=c.resolve;c.resolve=null,n&&n(`post_closestream_endpoint`)}catch(t){x(Error(`[doubao-asr] Stream error: ${String(t)}`)),s||e.onError(`Doubao ASR 连接错误: ${String(t)}`);let n=c.resolve;c.resolve=null,n&&n(`ws_close`)}})(),l}var F,I,L,R=e((()=>{h(),b(),r(),F=Symbol.asyncIterator,I=class{constructor(){i(this,`chunks`,[]),i(this,`waiting`,null),i(this,`done`,!1)}push(e){if(!this.done){if(e===null){if(this.done=!0,this.waiting){let e=this.waiting;this.waiting=null,e({value:void 0,done:!0})}return}if(this.waiting){let t=this.waiting;this.waiting=null,t({value:e,done:!1})}else this.chunks.push(e)}}abort(){if(this.done=!0,this.chunks.length=0,this.waiting){let e=this.waiting;this.waiting=null,e({value:void 0,done:!0})}}[F](){return{next:async()=>this.chunks.length>0?{value:this.chunks.shift(),done:!1}:this.done?{value:void 0,done:!0}:new Promise(e=>{this.waiting=e})}}},L=null})),z=n({FIRST_PRESS_FALLBACK_MS:()=>Z,computeLevel:()=>H,normalizeLanguageForSTT:()=>V,useVoice:()=>U});function B(){return u().voiceProvider===`doubao`}function V(e){if(!e)return{code:G};let t=e.toLowerCase().trim();if(!t)return{code:G};if(q.has(t))return{code:t};let n=K[t];if(n)return{code:n};let r=t.split(`-`)[0];return r&&q.has(r)?{code:r}:{code:G,fellBackFrom:e}}function H(e){let t=e.length>>1;if(t===0)return 0;let n=0;for(let t=0;t<e.length-1;t+=2){let r=(e[t]|e[t+1]<<8)<<16>>16;n+=r*r}let r=Math.sqrt(n/t),i=Math.min(r/2e3,1);return Math.sqrt(i)}function U({onTranscript:e,onError:t,enabled:n,focusMode:r}){let[i,a]=(0,W.useState)(`idle`),s=(0,W.useRef)(`idle`),c=(0,W.useRef)(null),l=(0,W.useRef)(``),d=(0,W.useRef)(e),p=(0,W.useRef)(t),h=(0,W.useRef)(null),g=(0,W.useRef)(null),v=(0,W.useRef)(!1),y=(0,W.useRef)(null),b=(0,W.useRef)(!1),S=(0,W.useRef)(null),C=(0,W.useRef)(!1),w=(0,W.useRef)(0),E=(0,W.useRef)(0),D=(0,W.useRef)(!1),O=(0,W.useRef)([]),k=(0,W.useRef)(!1),A=(0,W.useRef)(0),M=(0,W.useRef)(0),N=(0,W.useRef)(!1),P=(0,W.useRef)(!1),F=(0,W.useRef)([]),I=o(),L=ne();d.current=e,p.current=t;function R(e){s.current=e,a(e),L(t=>t.voiceState===e?t:{...t,voiceState:e})}let z=(0,W.useCallback)(()=>{E.current++,h.current&&(clearTimeout(h.current),h.current=null),g.current&&(clearTimeout(g.current),g.current=null),y.current&&(clearTimeout(y.current),y.current=null),S.current&&(clearTimeout(S.current),S.current=null),C.current=!1,J?.stopRecording(),c.current&&(c.current.close(),c.current=null),l.current=``,F.current=[],O.current=[],L(e=>e.voiceInterimTranscript===``&&!e.voiceAudioLevels.length?e:{...e,voiceInterimTranscript:``,voiceAudioLevels:[]})},[L]);function U(){m(`[voice] finishRecording: stopping recording, transitioning to processing`),A.current++;let e=b.current;b.current=!1,R(`processing`),J?.stopRecording();let t=Date.now()-w.current,n=N.current,r=D.current,i=M.current,a=P.current,o=E.current,s=()=>E.current!==o;m(`[voice] Recording stopped`),(c.current?c.current.finalize():Promise.resolve(void 0)).then(async o=>{if(s())return;if(o===`no_data_timeout`&&n&&a&&!e&&i===0&&l.current.trim()===``&&!k.current&&O.current.length>0){k.current=!0,m(`[voice] Silent-drop detected (no_data_timeout, ${String(O.current.length)} chunks); replaying on fresh connection`),_(`tengu_voice_silent_drop_replay`,{recordingDurationMs:t,chunkCount:O.current.length}),c.current&&(c.current.close(),c.current=null);let e=O.current;if(await te(250),s())return;let n=V(u().language),r=await j();if(s()||(await new Promise(t=>{T({onTranscript:(e,t)=>{s()||t&&e.trim()&&(l.current&&(l.current+=` `),l.current+=e.trim())},onError:()=>t(),onClose:()=>{},onReady:n=>{if(s()){n.close(),t();return}c.current=n;let r=[],i=0;for(let t of e)i>0&&i+t.length>32e3&&(n.send(Buffer.concat(r)),r=[],i=0),r.push(t),i+=t.length;r.length&&n.send(Buffer.concat(r)),n.finalize().then(()=>{n.close(),t()})}},{language:n.code,keyterms:r}).then(e=>{e||t()},()=>t())}),s()))return}O.current=[];let f=l.current.trim();m(`[voice] Final transcript assembled (${String(f.length)} chars): "${f.slice(0,200)}"`),_(`tengu_voice_recording_completed`,{transcriptChars:f.length+i,recordingDurationMs:t,hadAudioSignal:n,retried:r,silentDropRetried:k.current,wsConnected:a,focusTriggered:e}),c.current&&(c.current.close(),c.current=null),f?(m(`[voice] Injecting transcript (${String(f.length)} chars)`),d.current(f)):i===0&&t>2e3&&(a?n?p.current?.(`No speech detected.`):p.current?.(`No audio detected from microphone. Check that the correct input device is selected and that Claude Code has microphone access.`):p.current?.(`Voice connection failed. Check your network and try again.`)),l.current=``,L(e=>e.voiceInterimTranscript===``?e:{...e,voiceInterimTranscript:``}),R(`idle`)}).catch(e=>{x(f(e)),s()||R(`idle`)})}(0,W.useEffect)(()=>{n&&!J&&import(`./voice-DXiiy8HX.js`).then(e=>{J=e})},[n]);function G(){S.current&&clearTimeout(S.current),S.current=setTimeout((e,t,n,r,i)=>{e.current=null,t.current===`recording`&&n.current&&(m(`[voice] Focus silence timeout — tearing down session`),r.current=!0,i())},Q,S,s,b,C,U)}(0,W.useEffect)(()=>{if(!n||!r||B()){b.current&&s.current===`recording`&&(m(`[voice] Focus mode disabled during recording, finishing`),U());return}let e=!1;if(I&&s.current===`idle`&&!C.current){let t=()=>{e||s.current!==`idle`||C.current||(m(`[voice] Focus gained, starting recording session`),b.current=!0,K(),G())};J?t():import(`./voice-DXiiy8HX.js`).then(e=>{J=e,t()})}else I||(C.current=!1,s.current===`recording`&&(m(`[voice] Focus lost, finishing recording`),U()));return()=>{e=!0}},[n,r,I]);async function K(){if(!J){p.current?.(`Voice module not loaded yet. Try again in a moment.`);return}R(`recording`),w.current=Date.now(),l.current=``,v.current=!1,N.current=!1,D.current=!1,k.current=!1,O.current=[],M.current=0,P.current=!1;let e=++E.current,t=await J.checkRecordingAvailability();if(!t.available){m(`[voice] Recording not available: ${t.reason??`unknown`}`),p.current?.(t.reason??`Audio recording is not available.`),z(),R(`idle`);return}m(`[voice] Starting recording session, connecting voice stream`),L(e=>e.voiceError?{...e,voiceError:null}:e);let n=[];if(m(`[voice] startRecording: buffering audio while WebSocket connects`),F.current=[],!await J.startRecording(e=>{let t=Buffer.from(e);b.current||O.current.push(t),c.current?c.current.send(t):n.push(t);let r=H(e);!N.current&&r>.01&&(N.current=!0);let i=F.current;i.length>=$&&i.shift(),i.push(r);let a=[...i];F.current=a,L(e=>({...e,voiceAudioLevels:a}))},()=>{s.current===`recording`&&U()},{silenceDetection:!1})){x(Error(`[voice] Recording failed — no audio tool found`)),p.current?.(`Failed to start audio capture. Check that your microphone is accessible.`),z(),R(`idle`),L(e=>({...e,voiceError:`Recording failed — no audio tool found`}));return}let r=u().language,i=V(r);_(`tengu_voice_recording_started`,{focusTriggered:b.current,sttLanguage:i.code,sttLanguageIsDefault:!r?.trim(),sttLanguageFellBack:i.fellBackFrom!==void 0,systemLocaleLanguage:ee()});let a=!1,o=()=>E.current!==e,f=e=>{let t=A.current;(B()?(e,t)=>ae(e,t):(e,t)=>T(e,t))({onTranscript:(e,t)=>{if(!o()){if(a=!0,m(`[voice] onTranscript: isFinal=${String(t)} text="${e}"`),t&&e.trim())b.current?(m(`[voice] Focus mode: flushing final transcript immediately: "${e.trim()}"`),d.current(e.trim()),M.current+=e.trim().length,L(e=>e.voiceInterimTranscript===``?e:{...e,voiceInterimTranscript:``}),l.current=``,G()):(l.current&&(l.current+=` `),l.current+=e.trim(),m(`[voice] Accumulated final transcript: "${l.current}"`),L(e=>{let t=l.current;return e.voiceInterimTranscript===t?e:{...e,voiceInterimTranscript:t}}));else if(!t){b.current&&G();let t=e.trim(),n=l.current?l.current+(t?` `+t:``):t;L(e=>e.voiceInterimTranscript===n?e:{...e,voiceInterimTranscript:n})}}},onError:(r,i)=>{if(o()){m(`[voice] ignoring onError from stale session: ${r}`);return}if(A.current!==t){m(`[voice] ignoring stale onError from superseded attempt: ${r}`);return}if(!i?.fatal&&!a&&s.current===`recording`&&!D.current){D.current=!0,m(`[voice] early voice_stream error (pre-transcript), retrying once: ${r}`),_(`tengu_voice_stream_early_retry`,{}),c.current=null,A.current++,setTimeout((e,t,n)=>{e.current===`recording`&&t(n)},250,s,f,e);return}A.current++,x(Error(`[voice] voice_stream error: ${r}`)),p.current?.(`Voice stream error: ${r}`),n.length=0,b.current=!1,z(),R(`idle`)},onClose:()=>{},onReady:e=>{if(o()||s.current!==`recording`){e.close();return}if(c.current=e,P.current=!0,n.length>0){let t=0;for(let e of n)t+=e.length;let r=[[]],i=0;for(let e of n)i>0&&i+e.length>32e3&&(r.push([]),i=0),r[r.length-1].push(e),i+=e.length;m(`[voice] onReady: flushing ${String(n.length)} buffered chunks (${String(t)} bytes) as ${String(r.length)} coalesced frame(s)`);for(let t of r)e.send(Buffer.concat(t))}n.length=0,g.current&&clearTimeout(g.current),v.current&&(g.current=setTimeout((e,t,n)=>{e.current=null,t.current===`recording`&&n()},Y,g,s,U))}},{language:i.code,keyterms:e}).then(e=>{if(o()){e?.close();return}if(!e){m(`[voice] Failed to connect to voice_stream (no OAuth token?)`),p.current?.(`Voice mode requires a Claude.ai account. Please run /login to sign in.`),n.length=0,z(),R(`idle`);return}if(s.current!==`recording`){n.length=0,e.close();return}})};B()?f([]):j().then(f)}let q=(0,W.useCallback)((e=X)=>{let t=B()?ie():re();if(!n||!t||b.current)return;if(r&&C.current){m(`[voice] Re-arming focus recording after silence timeout`),C.current=!1,b.current=!0,K(),G();return}let i=s.current;i!==`processing`&&(i===`idle`?(m(`[voice] handleKeyEvent: idle, starting recording session immediately`),K(),y.current=setTimeout((e,t,n,r,i)=>{e.current=null,t.current===`recording`&&!n.current&&(m(`[voice] No auto-repeat seen, arming release timer via fallback`),n.current=!0,r.current=setTimeout((e,t,n)=>{e.current=null,t.current===`recording`&&n()},Y,r,t,i))},e,y,s,v,g,U)):i===`recording`&&(v.current=!0,y.current&&(clearTimeout(y.current),y.current=null)),g.current&&clearTimeout(g.current),s.current===`recording`&&v.current&&(g.current=setTimeout((e,t,n)=>{e.current=null,t.current===`recording`&&n()},Y,g,s,U)))},[n,r,z]);return(0,W.useEffect)(()=>(!n&&s.current!==`idle`&&(z(),R(`idle`)),()=>{z()}),[n,z]),{state:i,handleKeyEvent:q}}var W,G,K,q,J,Y,X,Z,Q,$,oe=e((()=>{W=t(a(),1),w(),s(),g(),P(),E(),R(),h(),p(),S(),b(),d(),C(),G=`en`,K={english:`en`,spanish:`es`,español:`es`,espanol:`es`,french:`fr`,français:`fr`,francais:`fr`,japanese:`ja`,日本語:`ja`,german:`de`,deutsch:`de`,portuguese:`pt`,português:`pt`,portugues:`pt`,italian:`it`,italiano:`it`,korean:`ko`,한국어:`ko`,hindi:`hi`,हिन्दी:`hi`,हिंदी:`hi`,indonesian:`id`,"bahasa indonesia":`id`,bahasa:`id`,russian:`ru`,русский:`ru`,polish:`pl`,polski:`pl`,turkish:`tr`,türkçe:`tr`,turkce:`tr`,dutch:`nl`,nederlands:`nl`,ukrainian:`uk`,українська:`uk`,greek:`el`,ελληνικά:`el`,czech:`cs`,čeština:`cs`,cestina:`cs`,danish:`da`,dansk:`da`,swedish:`sv`,svenska:`sv`,norwegian:`no`,norsk:`no`},q=new Set([`en`,`es`,`fr`,`ja`,`de`,`pt`,`it`,`ko`,`hi`,`id`,`ru`,`pl`,`tr`,`nl`,`uk`,`el`,`cs`,`da`,`sv`,`no`]),J=null,Y=200,X=600,Z=2e3,Q=5e3,$=16}));export{V as n,z as r,oe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{cn as o,on as s}from"./paths-BBvuDQl9.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{AS as u,ay as d,iy as f,jS as p}from"./loadAgentsDir-DI1a76pd.js";import{t as m}from"./WelcomeV2-DCXcYd2x.js";import{t as h}from"./useManagePlugins-GmnI9K53.js";import{n as g,t as _}from"./MCPConnectionManager-DYGoS1Ht.js";import{n as v}from"./onChangeAppState-Dxbl8fvk.js";import{cwd as y}from"process";var b=e(t(),1);r(),d(),c(),g(),p(),s();var x=a();async function S(e){l(`tengu_setup_token_command`,{});let t=!o(),{ConsoleOAuthFlow:r}=await import(`./ConsoleOAuthFlow-BvaB9b0y.js`);await new Promise(a=>{e.render((0,x.jsx)(u,{onChangeAppState:v,children:(0,x.jsx)(f,{children:(0,x.jsxs)(i,{flexDirection:`column`,gap:1,children:[(0,x.jsx)(m,{}),t&&(0,x.jsxs)(i,{flexDirection:`column`,children:[(0,x.jsx)(n,{color:`warning`,children:`Warning: You already have authentication configured via environment variable or API key helper.`}),(0,x.jsx)(n,{color:`warning`,children:`The setup-token command will create a new OAuth token which you can use instead.`})]}),(0,x.jsx)(r,{onDone:()=>{a()},mode:`setup-token`,startingMessage:`This will guide you through long-lived (1-year) auth token setup for your Claude account. Claude subscription required.`})]})})}))}),e.unmount(),process.exit(0)}var C=b.lazy(()=>import(`./Doctor-C5DYPEGl.js`).then(e=>({default:e.Doctor})));function w({onDone:e}){return h(),(0,x.jsx)(b.Suspense,{fallback:null,children:(0,x.jsx)(C,{onDone:e})})}async function T(e){l(`tengu_doctor_command`,{}),await new Promise(t=>{e.render((0,x.jsx)(u,{children:(0,x.jsx)(f,{children:(0,x.jsx)(_,{dynamicMcpConfig:void 0,isStrictMcpConfig:!1,children:(0,x.jsx)(w,{onDone:()=>{t()}})})})}))}),e.unmount(),process.exit(0)}async function E(e,t){let{setup:n}=await import(`./setup-DWkSjA49.js`);await n(y(),`default`,!1,!1,void 0,!1);let{install:r}=await import(`./install-CFX_ph9z.js`);await new Promise(n=>{let i=[];e&&i.push(e),t.force&&i.push(`--force`),r.call(e=>{n(),process.exit(+!!e.includes(`failed`))},{},i)})}export{T as doctorHandler,E as installHandler,S as setupTokenHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Sp as e,yp as t}from"./loadAgentsDir-DI1a76pd.js";e();export{t as clearWebFetchCache};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{$ as n,$n as r,$r as i,$t as a,A as o,Ai as s,An as ee,Ar as c,At as te,B as l,Bn as ne,Br as re,Bt as ie,C as ae,Ci as oe,Cn as se,Cr as ce,Ct as le,D as ue,Di as de,Dn as fe,Dr as pe,Dt as me,E as he,En as ge,Er as u,Et as _e,F as ve,Fi as d,Fn as ye,Fr as be,Ft as xe,G as Se,Gn as Ce,Gr as f,Gt as p,H as m,Hn as h,Hr as g,Ht as _,I as v,In as y,Ir as b,It as x,J as S,Jn as C,Jr as w,Jt as T,K as E,Kn as D,Kr as O,Kt as k,L as A,Ln as we,Lr as Te,Lt as Ee,M as De,Mi as Oe,Mn as ke,Mr as Ae,Mt as je,N as Me,Ni as Ne,Nn as Pe,Nr as Fe,Nt as Ie,O as Le,Oi as Re,On as ze,Or as j,Ot as Be,P as Ve,Pi as He,Pn as Ue,Pr as We,Pt as Ge,Q as M,Qn as Ke,Qr as qe,Qt as N,R as Je,Rn as Ye,Rr as Xe,Rt as Ze,S as Qe,Si as $e,Sn as et,Sr as tt,St as nt,T as rt,Ti as it,Tn as at,Tr as P,Tt as ot,U as st,Un as ct,Ur as lt,Ut as ut,V as dt,Vn as ft,Vr as pt,Vt as mt,W as ht,Wn as gt,Wr as _t,Wt as vt,X as yt,Xn as bt,Xr as xt,Xt as St,Y as Ct,Yn as wt,Yr as Tt,Yt as Et,Z as Dt,Zn as Ot,Zr as kt,Zt as At,_ as jt,_i as Mt,_n as Nt,_r as Pt,_t as Ft,a as F,ai as It,an as Lt,ar as Rt,at as zt,b as Bt,bi as Vt,bn as Ht,br as Ut,bt as Wt,c as Gt,ci as Kt,cn as qt,cr as Jt,ct as Yt,d as Xt,di as Zt,dn as Qt,dr as $t,dt as en,ei as tn,en as nn,er as rn,et as an,f as on,fi as sn,fn as cn,fr as I,ft as ln,g as L,gi as un,gn as dn,gr as fn,gt as pn,h as mn,hn,hr as gn,ht as _n,i as vn,ii as yn,in as bn,ir as xn,it as Sn,j as Cn,ji as wn,jn as Tn,jr as En,jt as Dn,k as On,ki as kn,kn as An,kr as jn,kt as Mn,l as Nn,li as Pn,ln as Fn,lr as In,lt as Ln,m as Rn,mn as zn,mr as Bn,mt as Vn,n as Hn,ni as Un,nn as Wn,nr as Gn,nt as Kn,o as qn,oi as Jn,on as Yn,or as Xn,ot as Zn,p as Qn,pi as $n,pn as er,pr as tr,pt as nr,q as rr,qn as ir,qr as ar,qt as or,r as sr,ri as cr,rn as lr,rr as ur,rt as dr,s as R,si as fr,sn as pr,sr as mr,st as hr,t as gr,ti as _r,tn as vr,tr as yr,tt as br,u as xr,ui as Sr,un as Cr,ur as wr,ut as Tr,v as Er,vi as z,vn as Dr,vr as Or,vt as kr,w as Ar,wi as jr,wn as Mr,wt as Nr,x as Pr,xi as Fr,xn as Ir,xr as Lr,xt as Rr,y as zr,yi as Br,yn as Vr,yr as Hr,yt as B,z as Ur,zn as Wr,zr as Gr,zt as Kr}from"./schemas-BGAvj1T4.js";function qr(e){d({customError:e})}function Jr(){return d().customError}var V,H,Yr=e((()=>{c(),V={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},(function(e){})(H||(H={}))}));function Xr(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Zr(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function U(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return G.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return G.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=W(Zr(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return G.null();if(n.length===0)return G.never();if(n.length===1)return G.literal(n[0]);if(n.every(e=>typeof e==`string`))return G.enum(n);let r=n.map(e=>G.literal(e));return r.length<2?r[0]:G.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return G.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>U({...e,type:n},t));return r.length===0?G.never():r.length===1?r[0]:G.union(r)}if(!n)return G.any();let r;switch(n){case`string`:{let t=G.string();if(e.format){let n=e.format;n===`email`?t=t.check(G.email()):n===`uri`||n===`uri-reference`?t=t.check(G.url()):n===`uuid`||n===`guid`?t=t.check(G.uuid()):n===`date-time`?t=t.check(G.iso.datetime()):n===`date`?t=t.check(G.iso.date()):n===`time`?t=t.check(G.iso.time()):n===`duration`?t=t.check(G.iso.duration()):n===`ipv4`?t=t.check(G.ipv4()):n===`ipv6`?t=t.check(G.ipv6()):n===`mac`?t=t.check(G.mac()):n===`cidr`?t=t.check(G.cidrv4()):n===`cidr-v6`?t=t.check(G.cidrv6()):n===`base64`?t=t.check(G.base64()):n===`base64url`?t=t.check(G.base64url()):n===`e164`?t=t.check(G.e164()):n===`jwt`?t=t.check(G.jwt()):n===`emoji`?t=t.check(G.emoji()):n===`nanoid`?t=t.check(G.nanoid()):n===`cuid`?t=t.check(G.cuid()):n===`cuid2`?t=t.check(G.cuid2()):n===`ulid`?t=t.check(G.ulid()):n===`xid`?t=t.check(G.xid()):n===`ksuid`&&(t=t.check(G.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?G.number().int():G.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=G.boolean();break;case`null`:r=G.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=W(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=W(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?W(e.additionalProperties,t):G.any();if(Object.keys(n).length===0){r=G.record(i,a);break}let o=G.object(n).passthrough(),s=G.looseRecord(i,a);r=G.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=W(i[e],t),r=G.string().regex(new RegExp(e));o.push(G.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(G.object(n).passthrough()),s.push(...o),s.length===0)r=G.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=G.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=G.intersection(e,s[t]);r=e}break}let o=G.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(W(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>W(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?W(i,t):void 0;r=o?G.tuple(a).rest(o):G.tuple(a),typeof e.minItems==`number`&&(r=r.check(G.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(G.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>W(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?W(e.additionalItems,t):void 0;r=a?G.tuple(n).rest(a):G.tuple(n),typeof e.minItems==`number`&&(r=r.check(G.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(G.maxLength(e.maxItems)))}else if(i!==void 0){let n=W(i,t),a=G.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=G.array(G.any());break}default:throw Error(`Unsupported type: ${n}`)}return e.description&&(r=r.describe(e.description)),e.default!==void 0&&(r=r.default(e.default)),r}function W(e,t){if(typeof e==`boolean`)return e?G.any():G.never();let n=U(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>W(e,t)),a=G.union(i);n=r?G.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>W(e,t)),a=G.xor(i);n=r?G.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:G.any();else{let i=r?n:W(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=G.intersection(i,W(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=G.nullable(n)),e.readOnly===!0&&(n=G.readonly(n));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))K.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),n}function Qr(e,t){return typeof e==`boolean`?e?G.any():G.never():W(e,{version:Xr(e,t?.defaultTarget),defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??z})}var G,K,$r=e((()=>{Br(),j(),P(),N(),G={...Ue,...pe,iso:u},K=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`))})),ei=t({bigint:()=>ti,boolean:()=>Y,date:()=>ni,number:()=>J,string:()=>q});function q(e){return Xe(M,e)}function J(e){return Te(m,e)}function Y(e){return be(R,e)}function ti(e){return We(F,e)}function ni(e){return b(L,e)}var ri=e((()=>{c(),N()})),ii=t({$brand:()=>Ne,$input:()=>un,$output:()=>Mt,NEVER:()=>He,TimePrecision:()=>Fe,ZodAny:()=>gr,ZodArray:()=>Hn,ZodBase64:()=>sr,ZodBase64URL:()=>vn,ZodBigInt:()=>F,ZodBigIntFormat:()=>qn,ZodBoolean:()=>R,ZodCIDRv4:()=>Gt,ZodCIDRv6:()=>Nn,ZodCUID:()=>xr,ZodCUID2:()=>Xt,ZodCatch:()=>on,ZodCodec:()=>Qn,ZodCustom:()=>Rn,ZodCustomStringFormat:()=>mn,ZodDate:()=>L,ZodDefault:()=>jt,ZodDiscriminatedUnion:()=>Er,ZodE164:()=>zr,ZodEmail:()=>Bt,ZodEmoji:()=>Pr,ZodEnum:()=>Qe,ZodError:()=>Pt,ZodExactOptional:()=>ae,ZodFile:()=>Ar,ZodFirstPartyTypeKind:()=>H,ZodFunction:()=>rt,ZodGUID:()=>he,ZodIPv4:()=>ue,ZodIPv6:()=>Le,ZodISODate:()=>Ut,ZodISODateTime:()=>Lr,ZodISODuration:()=>tt,ZodISOTime:()=>ce,ZodIntersection:()=>On,ZodIssueCode:()=>V,ZodJWT:()=>o,ZodKSUID:()=>Cn,ZodLazy:()=>De,ZodLiteral:()=>Me,ZodMAC:()=>Ve,ZodMap:()=>ve,ZodNaN:()=>v,ZodNanoID:()=>A,ZodNever:()=>Je,ZodNonOptional:()=>Ur,ZodNull:()=>l,ZodNullable:()=>dt,ZodNumber:()=>m,ZodNumberFormat:()=>st,ZodObject:()=>ht,ZodOptional:()=>Se,ZodPipe:()=>E,ZodPrefault:()=>rr,ZodPromise:()=>S,ZodReadonly:()=>Ct,ZodRealError:()=>Or,ZodRecord:()=>yt,ZodSet:()=>Dt,ZodString:()=>M,ZodStringFormat:()=>n,ZodSuccess:()=>an,ZodSymbol:()=>br,ZodTemplateLiteral:()=>Kn,ZodTransform:()=>dr,ZodTuple:()=>Sn,ZodType:()=>zt,ZodULID:()=>Zn,ZodURL:()=>hr,ZodUUID:()=>Yt,ZodUndefined:()=>Ln,ZodUnion:()=>Tr,ZodUnknown:()=>en,ZodVoid:()=>ln,ZodXID:()=>nr,ZodXor:()=>Vn,_ZodString:()=>_n,_default:()=>Ft,_function:()=>B,any:()=>Nr,array:()=>ot,base64:()=>_e,base64url:()=>me,bigint:()=>Be,boolean:()=>Mn,catch:()=>pn,check:()=>te,cidrv4:()=>Dn,cidrv6:()=>je,clone:()=>wn,codec:()=>Ie,coerce:()=>ei,config:()=>d,core:()=>jn,cuid:()=>Ge,cuid2:()=>xe,custom:()=>x,date:()=>Ee,decode:()=>xn,decodeAsync:()=>Rt,describe:()=>Ze,discriminatedUnion:()=>Kr,e164:()=>ie,email:()=>mt,emoji:()=>_,encode:()=>Xn,encodeAsync:()=>mr,endsWith:()=>Gr,enum:()=>kr,exactOptional:()=>ut,file:()=>vt,flattenError:()=>de,float32:()=>p,float64:()=>k,formatError:()=>Re,fromJSONSchema:()=>Qr,function:()=>B,getErrorMap:()=>Jr,globalRegistry:()=>z,gt:()=>re,gte:()=>pt,guid:()=>or,hash:()=>T,hex:()=>Et,hostname:()=>St,httpUrl:()=>At,includes:()=>g,instanceof:()=>Wt,int:()=>a,int32:()=>nn,int64:()=>vr,intersection:()=>Wn,ipv4:()=>lr,ipv6:()=>bn,iso:()=>u,json:()=>Lt,jwt:()=>Yn,keyof:()=>pr,ksuid:()=>qt,lazy:()=>Fn,length:()=>lt,literal:()=>Cr,locales:()=>$e,looseObject:()=>Qt,looseRecord:()=>cn,lowercase:()=>_t,lt:()=>f,lte:()=>O,mac:()=>er,map:()=>zn,maxLength:()=>ar,maxSize:()=>w,meta:()=>hn,mime:()=>Tt,minLength:()=>xt,minSize:()=>kt,multipleOf:()=>qe,nan:()=>dn,nanoid:()=>Nt,nativeEnum:()=>Dr,negative:()=>i,never:()=>Vr,nonnegative:()=>tn,nonoptional:()=>Ht,nonpositive:()=>_r,normalize:()=>Un,null:()=>Rr,nullable:()=>Ir,nullish:()=>et,number:()=>se,object:()=>Mr,optional:()=>at,overwrite:()=>cr,parse:()=>In,parseAsync:()=>wr,partialRecord:()=>ge,pipe:()=>fe,positive:()=>yn,prefault:()=>ze,preprocess:()=>An,prettifyError:()=>kn,promise:()=>ee,property:()=>It,readonly:()=>Tn,record:()=>ke,refine:()=>Pe,regex:()=>Jn,regexes:()=>it,registry:()=>Vt,safeDecode:()=>$t,safeDecodeAsync:()=>I,safeEncode:()=>tr,safeEncodeAsync:()=>Bn,safeParse:()=>gn,safeParseAsync:()=>fn,set:()=>ye,setErrorMap:()=>qr,size:()=>fr,slugify:()=>Kt,startsWith:()=>Pn,strictObject:()=>y,string:()=>we,stringFormat:()=>Ye,stringbool:()=>Wr,success:()=>ne,superRefine:()=>ft,symbol:()=>h,templateLiteral:()=>ct,toJSONSchema:()=>Ae,toLowerCase:()=>Sr,toUpperCase:()=>Zt,transform:()=>gt,treeifyError:()=>s,trim:()=>sn,tuple:()=>Ce,uint32:()=>D,uint64:()=>ir,ulid:()=>C,undefined:()=>nt,union:()=>wt,unknown:()=>bt,uppercase:()=>$n,url:()=>Ot,util:()=>Oe,uuid:()=>Ke,uuidv4:()=>r,uuidv6:()=>rn,uuidv7:()=>yr,void:()=>le,xid:()=>Gn,xor:()=>ur}),X=e((()=>{c(),N(),j(),Hr(),Jt(),Yr(),jr(),En(),$r(),Fr(),P(),ri(),d(oe())})),Z,Q=e((()=>{X(),X(),Z=ii})),$,ai=e((()=>{Q(),Q(),$=Z}));export{q as a,J as i,$ as n,V as o,Y as r,ai 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{Tt as r}from"./schemas-BGAvj1T4.js";import{t as i}from"./v4-f1i_CNUT.js";import{bs as a,gs as o,vs as s,xs as c,ys as l}from"./paths-BBvuDQl9.js";import{E as u,L as d,R as f,T as p,U as m,V as h,d as g,h as _,p as v,s as ee,w as y}from"./debug-UI3T040K.js";import{o as b,s as x}from"./log-CzsijfHZ.js";import{$k as te,BA as S,CA as C,LA as w,Qk as T,RA as E,SA as D,VA as ne,wA as O}from"./loadAgentsDir-DI1a76pd.js";import{homedir as re}from"os";import*as k from"path";import{join as ie,resolve as ae}from"path";import{randomBytes as oe}from"crypto";import{readFile as A,readdir as j,rename as M,stat as N,unlink as P,writeFile as F}from"fs/promises";function I(){return ie(T(),U)}async function L(){let e=I();try{let t=p(await A(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return g(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==H)return g(`Install counts cache version mismatch (got ${n.version}, expected ${H})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return g(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(g(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>G?(g(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(g(`Install counts cache has malformed entries`),null)}catch(e){return f(e)!==`ENOENT`&&g(`Failed to load install counts cache: ${d(e)}`),null}}async function R(e){let t=I(),n=`${t}.${oe(8).toString(`hex`)}.tmp`;try{let r=T();await v().mkdir(r),await F(n,u(e,null,2),{encoding:`utf-8`,mode:384}),await M(n,t),g(`Install counts cache saved successfully`)}catch(e){x(e);try{await P(n)}catch{}}}async function z(){g(`Fetching install counts from ${W}`);let e=performance.now();try{let n=await t.get(W,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return O(`install_counts`,W,`success`,performance.now()-e),n.data.plugins}catch(t){throw O(`install_counts`,W,`failure`,performance.now()-e,D(t)),t}}async function B(){let e=await L();if(e){g(`Using cached install counts`),O(`install_counts`,W,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await z();await R({version:H,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return x(e),g(`Failed to fetch install counts: ${d(e)}`),null}}function V(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var H,U,W,G,K=e((()=>{n(),ee(),h(),_(),b(),y(),C(),te(),H=1,U=`install-counts-cache.json`,W=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,G=1440*60*1e3}));async function se(e){let t=e.trim(),n=v(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=ae(t.startsWith(`~`)?t.replace(/^~/,re()):t),r;try{r=await n.stat(e)}catch(t){let n=f(t);return{error:n===`ENOENT`?`Path does not exist: ${e}`:`Cannot access path: ${e} (${n??t})`}}return r.isFile()?e.endsWith(`.json`)?{source:`file`,path:e}:{error:`File path must point to a .json file (marketplace.json), but got: ${e}`}:r.isDirectory()?{source:`directory`,path:e}:{error:`Path is neither a file nor a directory: ${e}`}}if(t.includes(`/`)&&!t.startsWith(`@`)){if(t.includes(`:`))return null;let e=t.match(/^([^#@]+)(?:[#@](.+))?$/),n=e?.[1]||t,r=e?.[2];return r?{source:`github`,repo:n,ref:r}:{source:`github`,repo:n}}return null}var ce=e((()=>{h(),_()}));function le(e){let t=k.basename(e),n=k.basename(k.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=k.resolve(e),i;try{i=await A(r,{encoding:`utf-8`})}catch(e){let t=f(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${d(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=p(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${d(e)}`}],warnings:[],filePath:r,fileType:`plugin`}}if(a&&typeof a==`object`){let e=a;e.commands&&(Array.isArray(e.commands)?e.commands:[e.commands]).forEach((e,n)=>{typeof e==`string`&&J(e,`commands[${n}]`,t)}),e.agents&&(Array.isArray(e.agents)?e.agents:[e.agents]).forEach((e,n)=>{typeof e==`string`&&J(e,`agents[${n}]`,t)}),e.skills&&(Array.isArray(e.skills)?e.skills:[e.skills]).forEach((e,n)=>{typeof e==`string`&&J(e,`skills[${n}]`,t)})}let o=a;if(typeof a==`object`&&a){let e=a,t=Object.keys(e).filter(e=>$.has(e));if(t.length>0){let r={...e};for(let e of t)delete r[e],n.push({path:e,message:`Field '${e}' belongs in the marketplace entry (marketplace.json), not plugin.json. It's harmless here but unused — Claude Code ignores it at load time.`});o=r}}let c=s().strict().safeParse(o);if(c.success||t.push(...q(c.error)),c.success){let e=c.data;/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e.name)||n.push({path:`name`,message:`Plugin name "${e.name}" is not kebab-case. Claude Code accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`}),e.version||n.push({path:`version`,message:`No version specified. Consider adding a version following semver (e.g., "1.0.0")`}),e.description||n.push({path:`description`,message:`No description provided. Adding a description helps users understand what your plugin does`}),e.author||n.push({path:`author`,message:`No author information provided. Consider adding author details for plugin attribution`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`plugin`}}async function X(e){let t=[],n=[],i=k.resolve(e),o;try{o=await A(i,{encoding:`utf-8`})}catch(e){let t=f(e),n;return n=t===`ENOENT`?`File not found: ${i}`:t===`EISDIR`?`Path is not a file: ${i}`:`Failed to read file: ${d(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:i,fileType:`marketplace`}}let s;try{s=p(o)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${d(e)}`}],warnings:[],filePath:i,fileType:`marketplace`}}if(s&&typeof s==`object`){let e=s;Array.isArray(e.plugins)&&e.plugins.forEach((e,n)=>{if(e&&typeof e==`object`&&`source`in e){let r=e.source;typeof r==`string`&&J(r,`plugins[${n}].source`,t,ue(r)),r&&typeof r==`object`&&`path`in r&&typeof r.path==`string`&&J(r.path,`plugins[${n}].source.path`,t)}})}let c=a().extend({plugins:r(l().strict())}).strict().safeParse(s);if(c.success||t.push(...q(c.error)),c.success){let e=c.data;if((!e.plugins||e.plugins.length===0)&&n.push({path:`plugins`,message:`Marketplace has no plugins defined`}),e.plugins){e.plugins.forEach((n,r)=>{e.plugins.filter(e=>e.name===n.name).length>1&&t.push({path:`plugins[${r}].name`,message:`Duplicate plugin name "${n.name}" found in marketplace`})});let r=k.dirname(i),a=k.basename(r)===`.claude-plugin`?k.dirname(r):r;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=k.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=p(await A(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:i,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],a=t.match(w);if(!a)return i.push({path:`frontmatter`,message:`No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata.`}),{success:!0,errors:r,warnings:i,filePath:e,fileType:n};let o=a[1]||``,s;try{s=ne(o)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${d(t)}. At runtime this ${n} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n}}if(typeof s!=`object`||!s||Array.isArray(s))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(s)?`an array`:s===null?`null`:typeof s}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let c=s;if(c.description!==void 0){let e=c.description;typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`&&e!==null&&r.push({path:`description`,message:`description must be a string, got ${Array.isArray(e)?`array`:typeof e}. At runtime this value is dropped.`})}else i.push({path:`description`,message:`No description in frontmatter. A description helps users and Claude understand when to use this ${n}.`});c.name!==void 0&&c.name!==null&&typeof c.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof c.name}.`});let l=c[`allowed-tools`];l!=null&&(typeof l!=`string`&&!Array.isArray(l)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof l}.`}):Array.isArray(l)&&l.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let u=c.shell;if(u!=null)if(typeof u!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof u}.`});else{let e=u.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${u}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await A(e,{encoding:`utf-8`})}catch(t){return f(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${d(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=p(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${d(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=o().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await j(e,{withFileTypes:!0})}catch(e){let t=f(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>k.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=k.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,k.join(e,`skills`)],[`agent`,k.join(e,`agents`)],[`command`,k.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await A(r,{encoding:`utf-8`})}catch(n){if(m(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${d(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(k.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=k.resolve(e),n=null;try{n=await N(t)}catch(e){if(!m(e))throw e}if(n?.isDirectory()){let e=await X(k.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(k.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=p(await A(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(f(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{i(),h(),E(),y(),S(),c(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{se as a,K as c,ce as i,pe as n,V as o,fe as r,B as s,me as t};
|