lcclaude 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +21 -0
- package/README.en.md +333 -0
- package/README.md +333 -0
- package/bin/lcclaude.js +30 -0
- package/dist/preload.js +15 -0
- package/dist/runtime/bun-bundle-shim.js +10 -0
- package/dist/runtime/bun-wrap-shim.js +63 -0
- package/dist/src/QueryEngine.js +804 -0
- package/dist/src/Task.js +40 -0
- package/dist/src/Tool.js +33 -0
- package/dist/src/assistant/sessionHistory.js +39 -0
- package/dist/src/bootstrap/state.js +985 -0
- package/dist/src/bridge/bridgeApi.js +254 -0
- package/dist/src/bridge/bridgeConfig.js +14 -0
- package/dist/src/bridge/bridgeDebug.js +64 -0
- package/dist/src/bridge/bridgeEnabled.js +55 -0
- package/dist/src/bridge/bridgeMain.js +1547 -0
- package/dist/src/bridge/bridgeMessaging.js +249 -0
- package/dist/src/bridge/bridgePermissionCallbacks.js +7 -0
- package/dist/src/bridge/bridgePointer.js +105 -0
- package/dist/src/bridge/bridgeStatusUtil.js +81 -0
- package/dist/src/bridge/bridgeUI.js +375 -0
- package/dist/src/bridge/capacityWake.js +26 -0
- package/dist/src/bridge/codeSessionApi.js +78 -0
- package/dist/src/bridge/createSession.js +227 -0
- package/dist/src/bridge/debugUtils.js +80 -0
- package/dist/src/bridge/envLessBridgeConfig.js +61 -0
- package/dist/src/bridge/flushGate.js +32 -0
- package/dist/src/bridge/inboundAttachments.js +106 -0
- package/dist/src/bridge/inboundMessages.js +38 -0
- package/dist/src/bridge/initReplBridge.js +276 -0
- package/dist/src/bridge/jwtUtils.js +131 -0
- package/dist/src/bridge/pollConfig.js +28 -0
- package/dist/src/bridge/pollConfigDefaults.js +15 -0
- package/dist/src/bridge/remoteBridgeCore.js +511 -0
- package/dist/src/bridge/replBridge.js +1098 -0
- package/dist/src/bridge/replBridgeHandle.js +14 -0
- package/dist/src/bridge/replBridgeTransport.js +147 -0
- package/dist/src/bridge/sessionIdCompat.js +16 -0
- package/dist/src/bridge/sessionRunner.js +349 -0
- package/dist/src/bridge/trustedDevice.js +113 -0
- package/dist/src/bridge/types.js +6 -0
- package/dist/src/bridge/workSecret.js +51 -0
- package/dist/src/buddy/CompanionSprite.js +435 -0
- package/dist/src/buddy/companion.js +104 -0
- package/dist/src/buddy/prompt.js +31 -0
- package/dist/src/buddy/sprites.js +500 -0
- package/dist/src/buddy/types.js +85 -0
- package/dist/src/buddy/useBuddyNotification.js +93 -0
- package/dist/src/cli/exit.js +13 -0
- package/dist/src/cli/handlers/agents.js +55 -0
- package/dist/src/cli/handlers/auth.js +255 -0
- package/dist/src/cli/handlers/autoMode.js +117 -0
- package/dist/src/cli/handlers/mcp.js +304 -0
- package/dist/src/cli/handlers/plugins.js +538 -0
- package/dist/src/cli/handlers/util.js +119 -0
- package/dist/src/cli/ndjsonSafeStringify.js +8 -0
- package/dist/src/cli/print.js +3112 -0
- package/dist/src/cli/remoteIO.js +161 -0
- package/dist/src/cli/structuredIO.js +489 -0
- package/dist/src/cli/transports/HybridTransport.js +145 -0
- package/dist/src/cli/transports/SSETransport.js +403 -0
- package/dist/src/cli/transports/SerialBatchEventUploader.js +154 -0
- package/dist/src/cli/transports/WebSocketTransport.js +497 -0
- package/dist/src/cli/transports/WorkerStateUploader.js +69 -0
- package/dist/src/cli/transports/ccrClient.js +522 -0
- package/dist/src/cli/transports/transportUtils.js +25 -0
- package/dist/src/cli/update.js +361 -0
- package/dist/src/commands/add-dir/add-dir.js +140 -0
- package/dist/src/commands/add-dir/index.js +8 -0
- package/dist/src/commands/add-dir/validation.js +67 -0
- package/dist/src/commands/advisor.js +96 -0
- package/dist/src/commands/agents/agents.js +12 -0
- package/dist/src/commands/agents/index.js +7 -0
- package/dist/src/commands/ant-trace/index.js +1 -0
- package/dist/src/commands/autofix-pr/index.js +1 -0
- package/dist/src/commands/backfill-sessions/index.js +1 -0
- package/dist/src/commands/branch/branch.js +168 -0
- package/dist/src/commands/branch/index.js +9 -0
- package/dist/src/commands/break-cache/index.js +1 -0
- package/dist/src/commands/bridge/bridge.js +519 -0
- package/dist/src/commands/bridge/index.js +21 -0
- package/dist/src/commands/bridge-kick.js +145 -0
- package/dist/src/commands/brief.js +66 -0
- package/dist/src/commands/btw/btw.js +281 -0
- package/dist/src/commands/btw/index.js +9 -0
- package/dist/src/commands/bughunter/index.js +1 -0
- package/dist/src/commands/chrome/chrome.js +394 -0
- package/dist/src/commands/chrome/index.js +10 -0
- package/dist/src/commands/clear/caches.js +69 -0
- package/dist/src/commands/clear/clear.js +5 -0
- package/dist/src/commands/clear/conversation.js +156 -0
- package/dist/src/commands/clear/index.js +9 -0
- package/dist/src/commands/color/color.js +57 -0
- package/dist/src/commands/color/index.js +9 -0
- package/dist/src/commands/commit-push-pr.js +145 -0
- package/dist/src/commands/commit.js +83 -0
- package/dist/src/commands/compact/compact.js +161 -0
- package/dist/src/commands/compact/index.js +11 -0
- package/dist/src/commands/config/config.js +9 -0
- package/dist/src/commands/config/index.js +8 -0
- package/dist/src/commands/context/context-noninteractive.js +256 -0
- package/dist/src/commands/context/context.js +33 -0
- package/dist/src/commands/context/index.js +21 -0
- package/dist/src/commands/copy/copy.js +397 -0
- package/dist/src/commands/copy/index.js +7 -0
- package/dist/src/commands/cost/cost.js +21 -0
- package/dist/src/commands/cost/index.js +15 -0
- package/dist/src/commands/createMovedToPluginCommand.js +40 -0
- package/dist/src/commands/ctx_viz/index.js +1 -0
- package/dist/src/commands/debug-tool-call/index.js +1 -0
- package/dist/src/commands/desktop/desktop.js +7 -0
- package/dist/src/commands/desktop/index.js +22 -0
- package/dist/src/commands/diff/diff.js +10 -0
- package/dist/src/commands/diff/index.js +6 -0
- package/dist/src/commands/doctor/doctor.js +7 -0
- package/dist/src/commands/doctor/index.js +9 -0
- package/dist/src/commands/effort/effort.js +181 -0
- package/dist/src/commands/effort/index.js +11 -0
- package/dist/src/commands/env/index.js +1 -0
- package/dist/src/commands/exit/exit.js +25 -0
- package/dist/src/commands/exit/index.js +9 -0
- package/dist/src/commands/export/export.js +79 -0
- package/dist/src/commands/export/index.js +8 -0
- package/dist/src/commands/extra-usage/extra-usage-core.js +85 -0
- package/dist/src/commands/extra-usage/extra-usage-noninteractive.js +11 -0
- package/dist/src/commands/extra-usage/extra-usage.js +17 -0
- package/dist/src/commands/extra-usage/index.js +27 -0
- package/dist/src/commands/fast/fast.js +345 -0
- package/dist/src/commands/fast/index.js +23 -0
- package/dist/src/commands/feedback/feedback.js +15 -0
- package/dist/src/commands/feedback/index.js +13 -0
- package/dist/src/commands/files/files.js +13 -0
- package/dist/src/commands/files/index.js +9 -0
- package/dist/src/commands/good-claude/index.js +1 -0
- package/dist/src/commands/heapdump/heapdump.js +15 -0
- package/dist/src/commands/heapdump/index.js +9 -0
- package/dist/src/commands/help/help.js +12 -0
- package/dist/src/commands/help/index.js +7 -0
- package/dist/src/commands/hooks/hooks.js +14 -0
- package/dist/src/commands/hooks/index.js +8 -0
- package/dist/src/commands/ide/ide.js +702 -0
- package/dist/src/commands/ide/index.js +8 -0
- package/dist/src/commands/init-verifiers.js +258 -0
- package/dist/src/commands/init.js +240 -0
- package/dist/src/commands/insights.js +2212 -0
- package/dist/src/commands/install-github-app/ApiKeyStep.js +290 -0
- package/dist/src/commands/install-github-app/CheckExistingSecretStep.js +265 -0
- package/dist/src/commands/install-github-app/CheckGitHubStep.js +16 -0
- package/dist/src/commands/install-github-app/ChooseRepoStep.js +282 -0
- package/dist/src/commands/install-github-app/CreatingStep.js +87 -0
- package/dist/src/commands/install-github-app/ErrorStep.js +157 -0
- package/dist/src/commands/install-github-app/ExistingWorkflowStep.js +164 -0
- package/dist/src/commands/install-github-app/InstallAppStep.js +166 -0
- package/dist/src/commands/install-github-app/OAuthFlowStep.js +335 -0
- package/dist/src/commands/install-github-app/SuccessStep.js +173 -0
- package/dist/src/commands/install-github-app/WarningsStep.js +140 -0
- package/dist/src/commands/install-github-app/index.js +10 -0
- package/dist/src/commands/install-github-app/install-github-app.js +612 -0
- package/dist/src/commands/install-github-app/setupGitHubActions.js +223 -0
- package/dist/src/commands/install-slack-app/index.js +9 -0
- package/dist/src/commands/install-slack-app/install-slack-app.js +23 -0
- package/dist/src/commands/install.js +348 -0
- package/dist/src/commands/issue/index.js +1 -0
- package/dist/src/commands/keybindings/index.js +10 -0
- package/dist/src/commands/keybindings/keybindings.js +43 -0
- package/dist/src/commands/login/index.js +9 -0
- package/dist/src/commands/login/login.js +105 -0
- package/dist/src/commands/logout/index.js +8 -0
- package/dist/src/commands/logout/logout.js +68 -0
- package/dist/src/commands/mcp/addCommand.js +157 -0
- package/dist/src/commands/mcp/index.js +9 -0
- package/dist/src/commands/mcp/mcp.js +85 -0
- package/dist/src/commands/mcp/xaaIdpCommand.js +135 -0
- package/dist/src/commands/memory/index.js +7 -0
- package/dist/src/commands/memory/memory.js +95 -0
- package/dist/src/commands/mobile/index.js +8 -0
- package/dist/src/commands/mobile/mobile.js +324 -0
- package/dist/src/commands/mock-limits/index.js +1 -0
- package/dist/src/commands/model/index.js +14 -0
- package/dist/src/commands/model/model.js +289 -0
- package/dist/src/commands/oauth-refresh/index.js +1 -0
- package/dist/src/commands/onboarding/index.js +1 -0
- package/dist/src/commands/output-style/index.js +8 -0
- package/dist/src/commands/output-style/output-style.js +5 -0
- package/dist/src/commands/passes/index.js +20 -0
- package/dist/src/commands/passes/passes.js +23 -0
- package/dist/src/commands/perf-issue/index.js +1 -0
- package/dist/src/commands/permissions/index.js +8 -0
- package/dist/src/commands/permissions/permissions.js +11 -0
- package/dist/src/commands/plan/index.js +8 -0
- package/dist/src/commands/plan/plan.js +151 -0
- package/dist/src/commands/plugin/AddMarketplace.js +202 -0
- package/dist/src/commands/plugin/BrowseMarketplace.js +918 -0
- package/dist/src/commands/plugin/DiscoverPlugins.js +935 -0
- package/dist/src/commands/plugin/ManageMarketplaces.js +1018 -0
- package/dist/src/commands/plugin/ManagePlugins.js +2230 -0
- package/dist/src/commands/plugin/PluginErrors.js +118 -0
- package/dist/src/commands/plugin/PluginOptionsDialog.js +396 -0
- package/dist/src/commands/plugin/PluginOptionsFlow.js +80 -0
- package/dist/src/commands/plugin/PluginSettings.js +1313 -0
- package/dist/src/commands/plugin/PluginTrustWarning.js +50 -0
- package/dist/src/commands/plugin/UnifiedInstalledCell.js +749 -0
- package/dist/src/commands/plugin/ValidatePlugin.js +113 -0
- package/dist/src/commands/plugin/index.js +9 -0
- package/dist/src/commands/plugin/parseArgs.js +61 -0
- package/dist/src/commands/plugin/plugin.js +8 -0
- package/dist/src/commands/plugin/pluginDetailsHelpers.js +114 -0
- package/dist/src/commands/plugin/usePagination.js +75 -0
- package/dist/src/commands/pr_comments/index.js +49 -0
- package/dist/src/commands/privacy-settings/index.js +11 -0
- package/dist/src/commands/privacy-settings/privacy-settings.js +58 -0
- package/dist/src/commands/rate-limit-options/index.js +15 -0
- package/dist/src/commands/rate-limit-options/rate-limit-options.js +211 -0
- package/dist/src/commands/release-notes/index.js +8 -0
- package/dist/src/commands/release-notes/release-notes.js +38 -0
- package/dist/src/commands/reload-plugins/index.js +8 -0
- package/dist/src/commands/reload-plugins/reload-plugins.js +27 -0
- package/dist/src/commands/remote-env/index.js +12 -0
- package/dist/src/commands/remote-env/remote-env.js +7 -0
- package/dist/src/commands/remote-setup/api.js +121 -0
- package/dist/src/commands/remote-setup/index.js +14 -0
- package/dist/src/commands/remote-setup/remote-setup.js +173 -0
- package/dist/src/commands/rename/generateSessionName.js +51 -0
- package/dist/src/commands/rename/index.js +9 -0
- package/dist/src/commands/rename/rename.js +52 -0
- package/dist/src/commands/reset-limits/index.js +4 -0
- package/dist/src/commands/resume/index.js +9 -0
- package/dist/src/commands/resume/resume.js +281 -0
- package/dist/src/commands/review/UltrareviewOverageDialog.js +112 -0
- package/dist/src/commands/review/reviewRemote.js +193 -0
- package/dist/src/commands/review/ultrareviewCommand.js +50 -0
- package/dist/src/commands/review/ultrareviewEnabled.js +5 -0
- package/dist/src/commands/review.js +45 -0
- package/dist/src/commands/rewind/index.js +10 -0
- package/dist/src/commands/rewind/rewind.js +6 -0
- package/dist/src/commands/sandbox-toggle/index.js +35 -0
- package/dist/src/commands/sandbox-toggle/sandbox-toggle.js +61 -0
- package/dist/src/commands/security-review.js +228 -0
- package/dist/src/commands/session/index.js +13 -0
- package/dist/src/commands/session/session.js +185 -0
- package/dist/src/commands/share/index.js +1 -0
- package/dist/src/commands/skills/index.js +7 -0
- package/dist/src/commands/skills/skills.js +8 -0
- package/dist/src/commands/stats/index.js +7 -0
- package/dist/src/commands/stats/stats.js +7 -0
- package/dist/src/commands/status/index.js +8 -0
- package/dist/src/commands/status/status.js +9 -0
- package/dist/src/commands/statusline.js +20 -0
- package/dist/src/commands/stickers/index.js +8 -0
- package/dist/src/commands/stickers/stickers.js +13 -0
- package/dist/src/commands/summary/index.js +1 -0
- package/dist/src/commands/tag/index.js +9 -0
- package/dist/src/commands/tag/tag.js +250 -0
- package/dist/src/commands/tasks/index.js +8 -0
- package/dist/src/commands/tasks/tasks.js +8 -0
- package/dist/src/commands/teleport/index.js +1 -0
- package/dist/src/commands/terminalSetup/index.js +15 -0
- package/dist/src/commands/terminalSetup/terminalSetup.js +425 -0
- package/dist/src/commands/theme/index.js +7 -0
- package/dist/src/commands/theme/theme.js +58 -0
- package/dist/src/commands/thinkback/index.js +9 -0
- package/dist/src/commands/thinkback/thinkback.js +569 -0
- package/dist/src/commands/thinkback-play/index.js +11 -0
- package/dist/src/commands/thinkback-play/thinkback-play.js +31 -0
- package/dist/src/commands/ultraplan.js +361 -0
- package/dist/src/commands/upgrade/index.js +11 -0
- package/dist/src/commands/upgrade/upgrade.js +37 -0
- package/dist/src/commands/usage/index.js +7 -0
- package/dist/src/commands/usage/usage.js +9 -0
- package/dist/src/commands/version.js +15 -0
- package/dist/src/commands/vim/index.js +8 -0
- package/dist/src/commands/vim/vim.js +24 -0
- package/dist/src/commands/voice/index.js +17 -0
- package/dist/src/commands/voice/voice.js +117 -0
- package/dist/src/commands.js +476 -0
- package/dist/src/components/AgentProgressLine.js +202 -0
- package/dist/src/components/App.js +53 -0
- package/dist/src/components/ApproveApiKey.js +156 -0
- package/dist/src/components/AutoModeOptInDialog.js +154 -0
- package/dist/src/components/AutoUpdater.js +178 -0
- package/dist/src/components/AutoUpdaterWrapper.js +91 -0
- package/dist/src/components/AwsAuthStatusBox.js +119 -0
- package/dist/src/components/BaseTextInput.js +158 -0
- package/dist/src/components/BashModeProgress.js +65 -0
- package/dist/src/components/BridgeDialog.js +460 -0
- package/dist/src/components/BypassPermissionsModeDialog.js +111 -0
- package/dist/src/components/ChannelDowngradeDialog.js +114 -0
- package/dist/src/components/ClaudeCodeHint/PluginHintMenu.js +120 -0
- package/dist/src/components/ClaudeInChromeOnboarding.js +176 -0
- package/dist/src/components/ClaudeMdExternalIncludesDialog.js +172 -0
- package/dist/src/components/ClickableImageRef.js +74 -0
- package/dist/src/components/CompactSummary.js +220 -0
- package/dist/src/components/ConfigurableShortcutHint.js +33 -0
- package/dist/src/components/ConsoleOAuthFlow.js +841 -0
- package/dist/src/components/ContextSuggestions.js +85 -0
- package/dist/src/components/ContextVisualization.js +878 -0
- package/dist/src/components/CoordinatorAgentStatus.js +304 -0
- package/dist/src/components/CostThresholdDialog.js +66 -0
- package/dist/src/components/CtrlOToExpand.js +56 -0
- package/dist/src/components/CustomSelect/SelectMulti.js +246 -0
- package/dist/src/components/CustomSelect/index.js +2 -0
- package/dist/src/components/CustomSelect/option-map.js +32 -0
- package/dist/src/components/CustomSelect/select-input-option.js +558 -0
- package/dist/src/components/CustomSelect/select-option.js +39 -0
- package/dist/src/components/CustomSelect/select.js +803 -0
- package/dist/src/components/CustomSelect/use-multi-select-state.js +175 -0
- package/dist/src/components/CustomSelect/use-select-input.js +163 -0
- package/dist/src/components/CustomSelect/use-select-navigation.js +334 -0
- package/dist/src/components/CustomSelect/use-select-state.js +30 -0
- package/dist/src/components/DesktopHandoff.js +214 -0
- package/dist/src/components/DesktopUpsell/DesktopUpsellStartup.js +185 -0
- package/dist/src/components/DevBar.js +53 -0
- package/dist/src/components/DevChannelsDialog.js +128 -0
- package/dist/src/components/DiagnosticsDisplay.js +149 -0
- package/dist/src/components/EffortCallout.js +302 -0
- package/dist/src/components/EffortIndicator.js +30 -0
- package/dist/src/components/ExitFlow.js +45 -0
- package/dist/src/components/ExportDialog.js +160 -0
- package/dist/src/components/FallbackToolUseErrorMessage.js +149 -0
- package/dist/src/components/FallbackToolUseRejectedMessage.js +18 -0
- package/dist/src/components/FastIcon.js +49 -0
- package/dist/src/components/Feedback.js +589 -0
- package/dist/src/components/FeedbackSurvey/FeedbackSurvey.js +219 -0
- package/dist/src/components/FeedbackSurvey/FeedbackSurveyView.js +168 -0
- package/dist/src/components/FeedbackSurvey/TranscriptSharePrompt.js +147 -0
- package/dist/src/components/FeedbackSurvey/submitTranscriptShare.js +70 -0
- package/dist/src/components/FeedbackSurvey/useDebouncedDigitInput.js +45 -0
- package/dist/src/components/FeedbackSurvey/useFeedbackSurvey.js +242 -0
- package/dist/src/components/FeedbackSurvey/useMemorySurvey.js +188 -0
- package/dist/src/components/FeedbackSurvey/usePostCompactSurvey.js +200 -0
- package/dist/src/components/FeedbackSurvey/useSurveyState.js +81 -0
- package/dist/src/components/FileEditToolDiff.js +193 -0
- package/dist/src/components/FileEditToolUpdatedMessage.js +162 -0
- package/dist/src/components/FileEditToolUseRejectedMessage.js +215 -0
- package/dist/src/components/FilePathLink.js +33 -0
- package/dist/src/components/FullscreenLayout.js +592 -0
- package/dist/src/components/GlobalSearchDialog.js +371 -0
- package/dist/src/components/HelpV2/Commands.js +99 -0
- package/dist/src/components/HelpV2/General.js +48 -0
- package/dist/src/components/HelpV2/HelpV2.js +231 -0
- package/dist/src/components/HighlightedCode/Fallback.js +200 -0
- package/dist/src/components/HighlightedCode.js +219 -0
- package/dist/src/components/HistorySearchDialog.js +144 -0
- package/dist/src/components/IdeAutoConnectDialog.js +172 -0
- package/dist/src/components/IdeOnboardingDialog.js +249 -0
- package/dist/src/components/IdeStatusIndicator.js +68 -0
- package/dist/src/components/IdleReturnDialog.js +126 -0
- package/dist/src/components/InterruptedByUser.js +25 -0
- package/dist/src/components/InvalidConfigDialog.js +173 -0
- package/dist/src/components/InvalidSettingsDialog.js +94 -0
- package/dist/src/components/KeybindingWarnings.js +144 -0
- package/dist/src/components/LanguagePicker.js +112 -0
- package/dist/src/components/LogSelector.js +1775 -0
- package/dist/src/components/LogoV2/AnimatedAsterisk.js +49 -0
- package/dist/src/components/LogoV2/AnimatedClawd.js +105 -0
- package/dist/src/components/LogoV2/ChannelsNotice.js +334 -0
- package/dist/src/components/LogoV2/Clawd.js +285 -0
- package/dist/src/components/LogoV2/CondensedLogo.js +218 -0
- package/dist/src/components/LogoV2/EmergencyTip.js +47 -0
- package/dist/src/components/LogoV2/Feed.js +140 -0
- package/dist/src/components/LogoV2/FeedColumn.js +67 -0
- package/dist/src/components/LogoV2/GuestPassesUpsell.js +90 -0
- package/dist/src/components/LogoV2/LogoV2.js +774 -0
- package/dist/src/components/LogoV2/Opus1mMergeNotice.js +68 -0
- package/dist/src/components/LogoV2/OverageCreditUpsell.js +154 -0
- package/dist/src/components/LogoV2/VoiceModeNotice.js +75 -0
- package/dist/src/components/LogoV2/WelcomeV2.js +976 -0
- package/dist/src/components/LogoV2/feedConfigs.js +89 -0
- package/dist/src/components/LspRecommendation/LspRecommendationMenu.js +128 -0
- package/dist/src/components/MCPServerApprovalDialog.js +121 -0
- package/dist/src/components/MCPServerDesktopImportDialog.js +249 -0
- package/dist/src/components/MCPServerDialogCopy.js +24 -0
- package/dist/src/components/MCPServerMultiselectDialog.js +173 -0
- package/dist/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.js +199 -0
- package/dist/src/components/ManagedSettingsSecurityDialog/utils.js +75 -0
- package/dist/src/components/Markdown.js +200 -0
- package/dist/src/components/MarkdownTable.js +215 -0
- package/dist/src/components/MemoryUsageIndicator.js +33 -0
- package/dist/src/components/Message.js +638 -0
- package/dist/src/components/MessageModel.js +43 -0
- package/dist/src/components/MessageResponse.js +99 -0
- package/dist/src/components/MessageRow.js +350 -0
- package/dist/src/components/MessageSelector.js +1021 -0
- package/dist/src/components/MessageTimestamp.js +63 -0
- package/dist/src/components/Messages.js +576 -0
- package/dist/src/components/ModelPicker.js +582 -0
- package/dist/src/components/NativeAutoUpdater.js +169 -0
- package/dist/src/components/NotebookEditToolUseRejectedMessage.js +123 -0
- package/dist/src/components/OffscreenFreeze.js +21 -0
- package/dist/src/components/Onboarding.js +307 -0
- package/dist/src/components/OutputStylePicker.js +128 -0
- package/dist/src/components/PackageManagerAutoUpdater.js +116 -0
- package/dist/src/components/Passes/Passes.js +242 -0
- package/dist/src/components/PrBadge.js +119 -0
- package/dist/src/components/PressEnterToContinue.js +24 -0
- package/dist/src/components/PromptInput/HistorySearchInput.js +64 -0
- package/dist/src/components/PromptInput/IssueFlagBanner.js +6 -0
- package/dist/src/components/PromptInput/Notifications.js +343 -0
- package/dist/src/components/PromptInput/PromptInput.js +1837 -0
- package/dist/src/components/PromptInput/PromptInputFooter.js +192 -0
- package/dist/src/components/PromptInput/PromptInputFooterLeftSide.js +504 -0
- package/dist/src/components/PromptInput/PromptInputFooterSuggestions.js +296 -0
- package/dist/src/components/PromptInput/PromptInputHelpMenu.js +508 -0
- package/dist/src/components/PromptInput/PromptInputModeIndicator.js +92 -0
- package/dist/src/components/PromptInput/PromptInputQueuedCommands.js +90 -0
- package/dist/src/components/PromptInput/PromptInputStashNotice.js +30 -0
- package/dist/src/components/PromptInput/SandboxPromptFooterHint.js +80 -0
- package/dist/src/components/PromptInput/ShimmeredInput.js +157 -0
- package/dist/src/components/PromptInput/VoiceIndicator.js +138 -0
- package/dist/src/components/PromptInput/inputModes.js +24 -0
- package/dist/src/components/PromptInput/inputPaste.js +46 -0
- package/dist/src/components/PromptInput/useMaybeTruncateInput.js +36 -0
- package/dist/src/components/PromptInput/usePromptInputPlaceholder.js +39 -0
- package/dist/src/components/PromptInput/useShowFastIconHint.js +19 -0
- package/dist/src/components/PromptInput/useSwarmBanner.js +99 -0
- package/dist/src/components/PromptInput/utils.js +25 -0
- package/dist/src/components/QuickOpenDialog.js +272 -0
- package/dist/src/components/RemoteCallout.js +81 -0
- package/dist/src/components/RemoteEnvironmentDialog.js +451 -0
- package/dist/src/components/ResumeTask.js +361 -0
- package/dist/src/components/SandboxViolationExpandedView.js +134 -0
- package/dist/src/components/ScrollKeybindingHandler.js +589 -0
- package/dist/src/components/SearchBox.js +111 -0
- package/dist/src/components/SentryErrorBoundary.js +17 -0
- package/dist/src/components/SessionBackgroundHint.js +103 -0
- package/dist/src/components/SessionPreview.js +263 -0
- package/dist/src/components/Settings/Config.js +1776 -0
- package/dist/src/components/Settings/Settings.js +159 -0
- package/dist/src/components/Settings/Status.js +315 -0
- package/dist/src/components/Settings/Usage.js +503 -0
- package/dist/src/components/ShowInIDEPrompt.js +212 -0
- package/dist/src/components/SkillImprovementSurvey.js +204 -0
- package/dist/src/components/Spinner/FlashingChar.js +60 -0
- package/dist/src/components/Spinner/GlimmerMessage.js +391 -0
- package/dist/src/components/Spinner/ShimmerChar.js +30 -0
- package/dist/src/components/Spinner/SpinnerAnimationRow.js +248 -0
- package/dist/src/components/Spinner/SpinnerGlyph.js +105 -0
- package/dist/src/components/Spinner/TeammateSpinnerLine.js +243 -0
- package/dist/src/components/Spinner/TeammateSpinnerTree.js +360 -0
- package/dist/src/components/Spinner/index.js +7 -0
- package/dist/src/components/Spinner/teammateSelectHint.js +1 -0
- package/dist/src/components/Spinner/useShimmerAnimation.js +17 -0
- package/dist/src/components/Spinner/useStalledAnimation.js +47 -0
- package/dist/src/components/Spinner/utils.js +65 -0
- package/dist/src/components/Spinner.js +596 -0
- package/dist/src/components/Stats.js +1415 -0
- package/dist/src/components/StatusLine.js +264 -0
- package/dist/src/components/StatusNotices.js +50 -0
- package/dist/src/components/StructuredDiff/Fallback.js +379 -0
- package/dist/src/components/StructuredDiff/colorDiff.js +21 -0
- package/dist/src/components/StructuredDiff.js +170 -0
- package/dist/src/components/StructuredDiffList.js +30 -0
- package/dist/src/components/TagTabs.js +124 -0
- package/dist/src/components/TaskListV2.js +430 -0
- package/dist/src/components/TeammateViewHeader.js +112 -0
- package/dist/src/components/TeleportError.js +200 -0
- package/dist/src/components/TeleportProgress.js +175 -0
- package/dist/src/components/TeleportRepoMismatchDialog.js +160 -0
- package/dist/src/components/TeleportResumeWrapper.js +207 -0
- package/dist/src/components/TeleportStash.js +159 -0
- package/dist/src/components/TextInput.js +94 -0
- package/dist/src/components/ThemePicker.js +428 -0
- package/dist/src/components/ThinkingToggle.js +233 -0
- package/dist/src/components/TokenWarning.js +165 -0
- package/dist/src/components/ToolUseLoader.js +44 -0
- package/dist/src/components/TrustDialog/TrustDialog.js +337 -0
- package/dist/src/components/TrustDialog/utils.js +149 -0
- package/dist/src/components/ValidationErrorsList.js +169 -0
- package/dist/src/components/VimTextInput.js +142 -0
- package/dist/src/components/VirtualMessageList.js +745 -0
- package/dist/src/components/WorkflowMultiselectDialog.js +173 -0
- package/dist/src/components/WorktreeExitDialog.js +228 -0
- package/dist/src/components/agents/AgentDetail.js +371 -0
- package/dist/src/components/agents/AgentEditor.js +191 -0
- package/dist/src/components/agents/AgentNavigationFooter.js +28 -0
- package/dist/src/components/agents/AgentsList.js +623 -0
- package/dist/src/components/agents/AgentsMenu.js +897 -0
- package/dist/src/components/agents/ColorPicker.js +170 -0
- package/dist/src/components/agents/ModelSelector.js +79 -0
- package/dist/src/components/agents/ToolSelector.js +581 -0
- package/dist/src/components/agents/agentFileUtils.js +142 -0
- package/dist/src/components/agents/generateAgent.js +160 -0
- package/dist/src/components/agents/new-agent-creation/CreateAgentWizard.js +101 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ColorStep.js +108 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStep.js +551 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStepWrapper.js +73 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.js +176 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/GenerateStep.js +176 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/LocationStep.js +104 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/MemoryStep.js +136 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +105 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ModelStep.js +75 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/PromptStep.js +185 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ToolsStep.js +81 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/TypeStep.js +146 -0
- package/dist/src/components/agents/types.js +4 -0
- package/dist/src/components/agents/utils.js +14 -0
- package/dist/src/components/agents/validateAgent.js +66 -0
- package/dist/src/components/design-system/Byline.js +53 -0
- package/dist/src/components/design-system/Dialog.js +171 -0
- package/dist/src/components/design-system/Divider.js +107 -0
- package/dist/src/components/design-system/FuzzyPicker.js +316 -0
- package/dist/src/components/design-system/KeyboardShortcutHint.js +63 -0
- package/dist/src/components/design-system/ListItem.js +186 -0
- package/dist/src/components/design-system/LoadingState.js +72 -0
- package/dist/src/components/design-system/Pane.js +67 -0
- package/dist/src/components/design-system/ProgressBar.js +67 -0
- package/dist/src/components/design-system/Ratchet.js +83 -0
- package/dist/src/components/design-system/StatusIcon.js +60 -0
- package/dist/src/components/design-system/Tabs.js +332 -0
- package/dist/src/components/design-system/ThemeProvider.js +117 -0
- package/dist/src/components/design-system/ThemedBox.js +123 -0
- package/dist/src/components/design-system/ThemedText.js +68 -0
- package/dist/src/components/design-system/color.js +13 -0
- package/dist/src/components/diff/DiffDetailView.js +388 -0
- package/dist/src/components/diff/DiffDialog.js +489 -0
- package/dist/src/components/diff/DiffFileList.js +359 -0
- package/dist/src/components/grove/Grove.js +710 -0
- package/dist/src/components/hooks/HooksConfigMenu.js +626 -0
- package/dist/src/components/hooks/PromptDialog.js +96 -0
- package/dist/src/components/hooks/SelectEventMode.js +169 -0
- package/dist/src/components/hooks/SelectHookMode.js +127 -0
- package/dist/src/components/hooks/SelectMatcherMode.js +156 -0
- package/dist/src/components/hooks/ViewHookMode.js +275 -0
- package/dist/src/components/mcp/CapabilitiesSection.js +68 -0
- package/dist/src/components/mcp/ElicitationDialog.js +1330 -0
- package/dist/src/components/mcp/MCPAgentServerMenu.js +275 -0
- package/dist/src/components/mcp/MCPListPanel.js +671 -0
- package/dist/src/components/mcp/MCPReconnect.js +210 -0
- package/dist/src/components/mcp/MCPRemoteServerMenu.js +906 -0
- package/dist/src/components/mcp/MCPSettings.js +415 -0
- package/dist/src/components/mcp/MCPStdioServerMenu.js +276 -0
- package/dist/src/components/mcp/MCPToolDetailView.js +316 -0
- package/dist/src/components/mcp/MCPToolListView.js +169 -0
- package/dist/src/components/mcp/McpParsingWarnings.js +319 -0
- package/dist/src/components/mcp/index.js +8 -0
- package/dist/src/components/mcp/utils/reconnectHelpers.js +28 -0
- package/dist/src/components/memory/MemoryFileSelector.js +459 -0
- package/dist/src/components/memory/MemoryUpdateNotification.js +51 -0
- package/dist/src/components/messageActions.js +464 -0
- package/dist/src/components/messages/AdvisorMessage.js +202 -0
- package/dist/src/components/messages/AssistantRedactedThinkingMessage.js +34 -0
- package/dist/src/components/messages/AssistantTextMessage.js +373 -0
- package/dist/src/components/messages/AssistantThinkingMessage.js +105 -0
- package/dist/src/components/messages/AssistantToolUseMessage.js +414 -0
- package/dist/src/components/messages/AttachmentMessage.js +764 -0
- package/dist/src/components/messages/CollapsedReadSearchContent.js +651 -0
- package/dist/src/components/messages/CompactBoundaryMessage.js +27 -0
- package/dist/src/components/messages/GroupedToolUseContent.js +42 -0
- package/dist/src/components/messages/HighlightedThinkingText.js +215 -0
- package/dist/src/components/messages/HookProgressMessage.js +150 -0
- package/dist/src/components/messages/PlanApprovalMessage.js +294 -0
- package/dist/src/components/messages/RateLimitMessage.js +164 -0
- package/dist/src/components/messages/ShutdownMessage.js +180 -0
- package/dist/src/components/messages/SystemAPIErrorMessage.js +162 -0
- package/dist/src/components/messages/SystemTextMessage.js +1145 -0
- package/dist/src/components/messages/TaskAssignmentMessage.js +100 -0
- package/dist/src/components/messages/UserAgentNotificationMessage.js +89 -0
- package/dist/src/components/messages/UserBashInputMessage.js +67 -0
- package/dist/src/components/messages/UserBashOutputMessage.js +56 -0
- package/dist/src/components/messages/UserChannelMessage.js +145 -0
- package/dist/src/components/messages/UserCommandMessage.js +146 -0
- package/dist/src/components/messages/UserImageMessage.js +59 -0
- package/dist/src/components/messages/UserLocalCommandOutputMessage.js +226 -0
- package/dist/src/components/messages/UserMemoryInputMessage.js +101 -0
- package/dist/src/components/messages/UserPlanMessage.js +56 -0
- package/dist/src/components/messages/UserPromptMessage.js +54 -0
- package/dist/src/components/messages/UserResourceUpdateMessage.js +131 -0
- package/dist/src/components/messages/UserTeammateMessage.js +215 -0
- package/dist/src/components/messages/UserTextMessage.js +207 -0
- package/dist/src/components/messages/UserToolResultMessage/RejectedPlanMessage.js +46 -0
- package/dist/src/components/messages/UserToolResultMessage/RejectedToolUseMessage.js +21 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolCanceledMessage.js +18 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolErrorMessage.js +90 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolRejectMessage.js +80 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolResultMessage.js +116 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +73 -0
- package/dist/src/components/messages/UserToolResultMessage/utils.js +41 -0
- package/dist/src/components/messages/nullRenderingAttachments.js +40 -0
- package/dist/src/components/messages/teamMemCollapsed.js +160 -0
- package/dist/src/components/messages/teamMemSaved.js +9 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/AskUserQuestionPermissionRequest.js +696 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.js +263 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js +384 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.js +228 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/QuestionView.js +611 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/SubmitQuestionsView.js +218 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/use-multiple-choice-state.js +98 -0
- package/dist/src/components/permissions/BashPermissionRequest/BashPermissionRequest.js +458 -0
- package/dist/src/components/permissions/BashPermissionRequest/bashToolUseOptions.js +90 -0
- package/dist/src/components/permissions/ComputerUseApproval/ComputerUseApproval.js +567 -0
- package/dist/src/components/permissions/EnterPlanModePermissionRequest/EnterPlanModePermissionRequest.js +175 -0
- package/dist/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.js +728 -0
- package/dist/src/components/permissions/FallbackPermissionRequest.js +385 -0
- package/dist/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +205 -0
- package/dist/src/components/permissions/FilePermissionDialog/FilePermissionDialog.js +188 -0
- package/dist/src/components/permissions/FilePermissionDialog/ideDiffConfig.js +13 -0
- package/dist/src/components/permissions/FilePermissionDialog/permissionOptions.js +159 -0
- package/dist/src/components/permissions/FilePermissionDialog/useFilePermissionDialog.js +129 -0
- package/dist/src/components/permissions/FilePermissionDialog/usePermissionHandler.js +100 -0
- package/dist/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +186 -0
- package/dist/src/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +110 -0
- package/dist/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +143 -0
- package/dist/src/components/permissions/NotebookEditPermissionRequest/NotebookEditPermissionRequest.js +194 -0
- package/dist/src/components/permissions/NotebookEditPermissionRequest/NotebookEditToolDiff.js +278 -0
- package/dist/src/components/permissions/PermissionDecisionDebugInfo.js +709 -0
- package/dist/src/components/permissions/PermissionDialog.js +90 -0
- package/dist/src/components/permissions/PermissionExplanation.js +298 -0
- package/dist/src/components/permissions/PermissionPrompt.js +327 -0
- package/dist/src/components/permissions/PermissionRequest.js +164 -0
- package/dist/src/components/permissions/PermissionRequestTitle.js +85 -0
- package/dist/src/components/permissions/PermissionRuleExplanation.js +112 -0
- package/dist/src/components/permissions/PowerShellPermissionRequest/PowerShellPermissionRequest.js +263 -0
- package/dist/src/components/permissions/PowerShellPermissionRequest/powershellToolUseOptions.js +70 -0
- package/dist/src/components/permissions/SandboxPermissionRequest.js +205 -0
- package/dist/src/components/permissions/SedEditPermissionRequest/SedEditPermissionRequest.js +259 -0
- package/dist/src/components/permissions/SkillPermissionRequest/SkillPermissionRequest.js +424 -0
- package/dist/src/components/permissions/WebFetchPermissionRequest/WebFetchPermissionRequest.js +299 -0
- package/dist/src/components/permissions/WorkerBadge.js +56 -0
- package/dist/src/components/permissions/WorkerPendingPermission.js +158 -0
- package/dist/src/components/permissions/hooks.js +128 -0
- package/dist/src/components/permissions/rules/AddPermissionRules.js +203 -0
- package/dist/src/components/permissions/rules/AddWorkspaceDirectory.js +437 -0
- package/dist/src/components/permissions/rules/PermissionRuleDescription.js +101 -0
- package/dist/src/components/permissions/rules/PermissionRuleInput.js +208 -0
- package/dist/src/components/permissions/rules/PermissionRuleList.js +1382 -0
- package/dist/src/components/permissions/rules/RecentDenialsTab.js +229 -0
- package/dist/src/components/permissions/rules/RemoveWorkspaceDirectory.js +123 -0
- package/dist/src/components/permissions/rules/WorkspaceTab.js +161 -0
- package/dist/src/components/permissions/shellPermissionHelpers.js +219 -0
- package/dist/src/components/permissions/useShellPermissionFeedback.js +98 -0
- package/dist/src/components/permissions/utils.js +18 -0
- package/dist/src/components/sandbox/SandboxConfigTab.js +195 -0
- package/dist/src/components/sandbox/SandboxDependenciesTab.js +265 -0
- package/dist/src/components/sandbox/SandboxDoctorSection.js +80 -0
- package/dist/src/components/sandbox/SandboxOverridesTab.js +272 -0
- package/dist/src/components/sandbox/SandboxSettings.js +374 -0
- package/dist/src/components/shell/ExpandShellOutputContext.js +25 -0
- package/dist/src/components/shell/OutputLine.js +107 -0
- package/dist/src/components/shell/ShellProgressMessage.js +189 -0
- package/dist/src/components/shell/ShellTimeDisplay.js +78 -0
- package/dist/src/components/skills/SkillsMenu.js +310 -0
- package/dist/src/components/tasks/AsyncAgentDetailDialog.js +353 -0
- package/dist/src/components/tasks/BackgroundTask.js +428 -0
- package/dist/src/components/tasks/BackgroundTaskStatus.js +522 -0
- package/dist/src/components/tasks/BackgroundTasksDialog.js +784 -0
- package/dist/src/components/tasks/DreamDetailDialog.js +353 -0
- package/dist/src/components/tasks/InProcessTeammateDetailDialog.js +393 -0
- package/dist/src/components/tasks/RemoteSessionDetailDialog.js +1188 -0
- package/dist/src/components/tasks/RemoteSessionProgress.js +310 -0
- package/dist/src/components/tasks/ShellDetailDialog.js +511 -0
- package/dist/src/components/tasks/ShellProgress.js +93 -0
- package/dist/src/components/tasks/renderToolActivity.js +34 -0
- package/dist/src/components/tasks/taskStatusUtils.js +77 -0
- package/dist/src/components/teams/TeamStatus.js +95 -0
- package/dist/src/components/teams/TeamsDialog.js +734 -0
- package/dist/src/components/ui/OrderedList.js +74 -0
- package/dist/src/components/ui/OrderedListItem.js +53 -0
- package/dist/src/components/ui/TreeSelect.js +307 -0
- package/dist/src/components/wizard/WizardDialogLayout.js +71 -0
- package/dist/src/components/wizard/WizardNavigationFooter.js +36 -0
- package/dist/src/components/wizard/WizardProvider.js +211 -0
- package/dist/src/components/wizard/index.js +4 -0
- package/dist/src/components/wizard/useWizard.js +9 -0
- package/dist/src/constants/apiLimits.js +11 -0
- package/dist/src/constants/betas.js +28 -0
- package/dist/src/constants/common.js +16 -0
- package/dist/src/constants/cyberRiskInstruction.js +1 -0
- package/dist/src/constants/errorIds.js +1 -0
- package/dist/src/constants/figures.js +31 -0
- package/dist/src/constants/files.js +115 -0
- package/dist/src/constants/github-app.js +139 -0
- package/dist/src/constants/keys.js +4 -0
- package/dist/src/constants/messages.js +1 -0
- package/dist/src/constants/oauth.js +141 -0
- package/dist/src/constants/outputStyles.js +155 -0
- package/dist/src/constants/product.js +25 -0
- package/dist/src/constants/prompts.js +544 -0
- package/dist/src/constants/spinnerVerbs.js +201 -0
- package/dist/src/constants/system.js +46 -0
- package/dist/src/constants/systemPromptSections.js +27 -0
- package/dist/src/constants/toolLimits.js +6 -0
- package/dist/src/constants/tools.js +75 -0
- package/dist/src/constants/turnCompletionVerbs.js +10 -0
- package/dist/src/constants/xml.js +54 -0
- package/dist/src/context/QueuedMessageContext.js +57 -0
- package/dist/src/context/fpsMetrics.js +26 -0
- package/dist/src/context/mailbox.js +37 -0
- package/dist/src/context/modalContext.js +26 -0
- package/dist/src/context/notifications.js +176 -0
- package/dist/src/context/overlayContext.js +92 -0
- package/dist/src/context/promptOverlayContext.js +99 -0
- package/dist/src/context/stats.js +203 -0
- package/dist/src/context/voice.js +62 -0
- package/dist/src/context.js +119 -0
- package/dist/src/coordinator/coordinatorMode.js +323 -0
- package/dist/src/cost-tracker.js +234 -0
- package/dist/src/costHook.js +19 -0
- package/dist/src/dialogLaunchers.js +92 -0
- package/dist/src/entrypoints/agentSdkTypes.js +51 -0
- package/dist/src/entrypoints/cli.js +92 -0
- package/dist/src/entrypoints/init.js +199 -0
- package/dist/src/entrypoints/mcp.js +132 -0
- package/dist/src/entrypoints/npm-bin.js +6 -0
- package/dist/src/entrypoints/sandboxTypes.js +34 -0
- package/dist/src/entrypoints/sdk/controlSchemas.js +347 -0
- package/dist/src/entrypoints/sdk/coreSchemas.js +1019 -0
- package/dist/src/entrypoints/sdk/coreTypes.generated.js +1 -0
- package/dist/src/entrypoints/sdk/coreTypes.js +38 -0
- package/dist/src/entrypoints/sdk/runtimeTypes.js +1 -0
- package/dist/src/entrypoints/sdk/settingsTypes.generated.js +1 -0
- package/dist/src/entrypoints/sdk/toolTypes.js +1 -0
- package/dist/src/history.js +297 -0
- package/dist/src/hooks/fileSuggestions.js +460 -0
- package/dist/src/hooks/notifs/useAutoModeUnavailableNotification.js +39 -0
- package/dist/src/hooks/notifs/useCanSwitchToExistingSubscription.js +64 -0
- package/dist/src/hooks/notifs/useDeprecationWarningNotification.js +43 -0
- package/dist/src/hooks/notifs/useFastModeNotification.js +161 -0
- package/dist/src/hooks/notifs/useIDEStatusIndicator.js +187 -0
- package/dist/src/hooks/notifs/useInstallMessages.js +25 -0
- package/dist/src/hooks/notifs/useLspInitializationNotification.js +147 -0
- package/dist/src/hooks/notifs/useMcpConnectivityStatus.js +154 -0
- package/dist/src/hooks/notifs/useModelMigrationNotifications.js +45 -0
- package/dist/src/hooks/notifs/useNpmDeprecationNotification.js +24 -0
- package/dist/src/hooks/notifs/usePluginAutoupdateNotification.js +93 -0
- package/dist/src/hooks/notifs/usePluginInstallationStatus.js +143 -0
- package/dist/src/hooks/notifs/useRateLimitWarningNotification.js +118 -0
- package/dist/src/hooks/notifs/useSettingsErrors.js +67 -0
- package/dist/src/hooks/notifs/useStartupNotification.js +24 -0
- package/dist/src/hooks/notifs/useTeammateShutdownNotification.js +61 -0
- package/dist/src/hooks/renderPlaceholder.js +27 -0
- package/dist/src/hooks/toolPermission/PermissionContext.js +186 -0
- package/dist/src/hooks/toolPermission/handlers/coordinatorHandler.js +22 -0
- package/dist/src/hooks/toolPermission/handlers/interactiveHandler.js +194 -0
- package/dist/src/hooks/toolPermission/handlers/swarmWorkerHandler.js +79 -0
- package/dist/src/hooks/toolPermission/permissionLogging.js +114 -0
- package/dist/src/hooks/unifiedSuggestions.js +115 -0
- package/dist/src/hooks/useAfterFirstRender.js +12 -0
- package/dist/src/hooks/useApiKeyVerification.js +58 -0
- package/dist/src/hooks/useArrowKeyHistory.js +176 -0
- package/dist/src/hooks/useAssistantHistory.js +150 -0
- package/dist/src/hooks/useAwaySummary.js +95 -0
- package/dist/src/hooks/useBackgroundTaskNavigation.js +163 -0
- package/dist/src/hooks/useBlink.js +10 -0
- package/dist/src/hooks/useCanUseTool.js +144 -0
- package/dist/src/hooks/useCancelRequest.js +165 -0
- package/dist/src/hooks/useChromeExtensionNotification.js +55 -0
- package/dist/src/hooks/useClaudeCodeHintRecommendation.js +113 -0
- package/dist/src/hooks/useClipboardImageHint.js +45 -0
- package/dist/src/hooks/useCommandKeybindings.js +81 -0
- package/dist/src/hooks/useCommandQueue.js +8 -0
- package/dist/src/hooks/useCopyOnSelect.js +44 -0
- package/dist/src/hooks/useDeferredHookMessages.js +35 -0
- package/dist/src/hooks/useDiffData.js +62 -0
- package/dist/src/hooks/useDiffInIDE.js +197 -0
- package/dist/src/hooks/useDirectConnect.js +154 -0
- package/dist/src/hooks/useDoublePress.js +36 -0
- package/dist/src/hooks/useDynamicConfig.js +10 -0
- package/dist/src/hooks/useElapsedTime.js +12 -0
- package/dist/src/hooks/useExitOnCtrlCD.js +27 -0
- package/dist/src/hooks/useExitOnCtrlCDWithKeybindings.js +5 -0
- package/dist/src/hooks/useFileHistorySnapshotInit.js +17 -0
- package/dist/src/hooks/useGlobalKeybindings.js +132 -0
- package/dist/src/hooks/useHistorySearch.js +219 -0
- package/dist/src/hooks/useIDEIntegration.js +60 -0
- package/dist/src/hooks/useIdeAtMentioned.js +42 -0
- package/dist/src/hooks/useIdeConnectionStatus.js +18 -0
- package/dist/src/hooks/useIdeLogging.js +26 -0
- package/dist/src/hooks/useIdeSelection.js +78 -0
- package/dist/src/hooks/useInboxPoller.js +626 -0
- package/dist/src/hooks/useInputBuffer.js +69 -0
- package/dist/src/hooks/useIssueFlagBanner.js +101 -0
- package/dist/src/hooks/useLogMessages.js +47 -0
- package/dist/src/hooks/useLspPluginRecommendation.js +163 -0
- package/dist/src/hooks/useMailboxBridge.js +15 -0
- package/dist/src/hooks/useMainLoopModel.js +15 -0
- package/dist/src/hooks/useManagePlugins.js +195 -0
- package/dist/src/hooks/useMemoryUsage.js +17 -0
- package/dist/src/hooks/useMergedClients.js +11 -0
- package/dist/src/hooks/useMergedCommands.js +10 -0
- package/dist/src/hooks/useMergedTools.js +18 -0
- package/dist/src/hooks/useMinDisplayTime.js +19 -0
- package/dist/src/hooks/useNotifyAfterTimeout.js +34 -0
- package/dist/src/hooks/useOfficialMarketplaceNotification.js +50 -0
- package/dist/src/hooks/usePasteHandler.js +129 -0
- package/dist/src/hooks/usePluginRecommendationBase.js +98 -0
- package/dist/src/hooks/usePrStatus.js +77 -0
- package/dist/src/hooks/usePromptSuggestion.js +124 -0
- package/dist/src/hooks/usePromptsFromClaudeInChrome.js +60 -0
- package/dist/src/hooks/useQueueProcessor.js +29 -0
- package/dist/src/hooks/useRemoteSession.js +313 -0
- package/dist/src/hooks/useReplBridge.js +59 -0
- package/dist/src/hooks/useSSHSession.js +161 -0
- package/dist/src/hooks/useScheduledTasks.js +68 -0
- package/dist/src/hooks/useSearchInput.js +285 -0
- package/dist/src/hooks/useSessionBackgrounding.js +120 -0
- package/dist/src/hooks/useSettings.js +4 -0
- package/dist/src/hooks/useSettingsChange.js +10 -0
- package/dist/src/hooks/useSkillImprovementSurvey.js +61 -0
- package/dist/src/hooks/useSkillsChange.js +39 -0
- package/dist/src/hooks/useSwarmInitialization.js +39 -0
- package/dist/src/hooks/useSwarmPermissionPoller.js +141 -0
- package/dist/src/hooks/useTaskListWatcher.js +124 -0
- package/dist/src/hooks/useTasksV2.js +161 -0
- package/dist/src/hooks/useTeammateViewAutoExit.js +35 -0
- package/dist/src/hooks/useTeleportResume.js +75 -0
- package/dist/src/hooks/useTerminalSize.js +11 -0
- package/dist/src/hooks/useTextInput.js +353 -0
- package/dist/src/hooks/useTimeout.js +10 -0
- package/dist/src/hooks/useTurnDiffs.js +131 -0
- package/dist/src/hooks/useTypeahead.js +993 -0
- package/dist/src/hooks/useUpdateNotification.js +21 -0
- package/dist/src/hooks/useVimInput.js +210 -0
- package/dist/src/hooks/useVirtualScroll.js +282 -0
- package/dist/src/hooks/useVoice.js +675 -0
- package/dist/src/hooks/useVoiceEnabled.js +12 -0
- package/dist/src/hooks/useVoiceIntegration.js +391 -0
- package/dist/src/ink/Ansi.js +290 -0
- package/dist/src/ink/bidi.js +72 -0
- package/dist/src/ink/clearTerminal.js +42 -0
- package/dist/src/ink/colorize.js +119 -0
- package/dist/src/ink/components/AlternateScreen.js +60 -0
- package/dist/src/ink/components/App.js +375 -0
- package/dist/src/ink/components/AppContext.js +6 -0
- package/dist/src/ink/components/Box.js +181 -0
- package/dist/src/ink/components/Button.js +167 -0
- package/dist/src/ink/components/ClockContext.js +100 -0
- package/dist/src/ink/components/CursorDeclarationContext.js +3 -0
- package/dist/src/ink/components/ErrorOverview.js +152 -0
- package/dist/src/ink/components/Link.js +42 -0
- package/dist/src/ink/components/Newline.js +29 -0
- package/dist/src/ink/components/NoSelect.js +40 -0
- package/dist/src/ink/components/RawAnsi.js +36 -0
- package/dist/src/ink/components/ScrollBox.js +139 -0
- package/dist/src/ink/components/Spacer.js +16 -0
- package/dist/src/ink/components/StdinContext.js +12 -0
- package/dist/src/ink/components/TerminalFocusContext.js +43 -0
- package/dist/src/ink/components/TerminalSizeContext.js +2 -0
- package/dist/src/ink/components/Text.js +196 -0
- package/dist/src/ink/constants.js +1 -0
- package/dist/src/ink/dom.js +230 -0
- package/dist/src/ink/events/click-event.js +15 -0
- package/dist/src/ink/events/dispatcher.js +126 -0
- package/dist/src/ink/events/emitter.js +26 -0
- package/dist/src/ink/events/event-handlers.js +22 -0
- package/dist/src/ink/events/event.js +9 -0
- package/dist/src/ink/events/focus-event.js +9 -0
- package/dist/src/ink/events/input-event.js +83 -0
- package/dist/src/ink/events/keyboard-event.js +31 -0
- package/dist/src/ink/events/terminal-event.js +60 -0
- package/dist/src/ink/events/terminal-focus-event.js +9 -0
- package/dist/src/ink/focus.js +127 -0
- package/dist/src/ink/frame.js +22 -0
- package/dist/src/ink/get-max-width.js +5 -0
- package/dist/src/ink/hit-test.js +76 -0
- package/dist/src/ink/hooks/use-animation-frame.js +23 -0
- package/dist/src/ink/hooks/use-app.js +4 -0
- package/dist/src/ink/hooks/use-declared-cursor.js +27 -0
- package/dist/src/ink/hooks/use-input.js +31 -0
- package/dist/src/ink/hooks/use-interval.js +38 -0
- package/dist/src/ink/hooks/use-search-highlight.js +21 -0
- package/dist/src/ink/hooks/use-selection.js +47 -0
- package/dist/src/ink/hooks/use-stdin.js +4 -0
- package/dist/src/ink/hooks/use-tab-status.js +48 -0
- package/dist/src/ink/hooks/use-terminal-focus.js +6 -0
- package/dist/src/ink/hooks/use-terminal-title.js +17 -0
- package/dist/src/ink/hooks/use-terminal-viewport.js +40 -0
- package/dist/src/ink/ink.js +978 -0
- package/dist/src/ink/instances.js +2 -0
- package/dist/src/ink/layout/engine.js +4 -0
- package/dist/src/ink/layout/geometry.js +55 -0
- package/dist/src/ink/layout/node.js +60 -0
- package/dist/src/ink/layout/yoga.js +232 -0
- package/dist/src/ink/line-width-cache.js +14 -0
- package/dist/src/ink/log-update.js +408 -0
- package/dist/src/ink/measure-element.js +5 -0
- package/dist/src/ink/measure-text.js +30 -0
- package/dist/src/ink/node-cache.js +19 -0
- package/dist/src/ink/optimizer.js +52 -0
- package/dist/src/ink/output.js +399 -0
- package/dist/src/ink/parse-keypress.js +525 -0
- package/dist/src/ink/reconciler.js +359 -0
- package/dist/src/ink/render-border.js +110 -0
- package/dist/src/ink/render-node-to-output.js +710 -0
- package/dist/src/ink/render-to-screen.js +124 -0
- package/dist/src/ink/renderer.js +73 -0
- package/dist/src/ink/root.js +73 -0
- package/dist/src/ink/screen.js +823 -0
- package/dist/src/ink/searchHighlight.js +48 -0
- package/dist/src/ink/selection.js +507 -0
- package/dist/src/ink/squash-text-nodes.js +40 -0
- package/dist/src/ink/stringWidth.js +134 -0
- package/dist/src/ink/styles.js +279 -0
- package/dist/src/ink/supports-hyperlinks.js +29 -0
- package/dist/src/ink/tabstops.js +35 -0
- package/dist/src/ink/terminal-focus-state.js +33 -0
- package/dist/src/ink/terminal-querier.js +89 -0
- package/dist/src/ink/terminal.js +128 -0
- package/dist/src/ink/termio/ansi.js +53 -0
- package/dist/src/ink/termio/csi.js +158 -0
- package/dist/src/ink/termio/dec.js +31 -0
- package/dist/src/ink/termio/esc.js +36 -0
- package/dist/src/ink/termio/osc.js +275 -0
- package/dist/src/ink/termio/parser.js +293 -0
- package/dist/src/ink/termio/sgr.js +264 -0
- package/dist/src/ink/termio/tokenize.js +176 -0
- package/dist/src/ink/termio/types.js +33 -0
- package/dist/src/ink/termio.js +2 -0
- package/dist/src/ink/useTerminalNotification.js +61 -0
- package/dist/src/ink/warn.js +10 -0
- package/dist/src/ink/widest-line.js +15 -0
- package/dist/src/ink/wrap-text.js +50 -0
- package/dist/src/ink/wrapAnsi.js +5 -0
- package/dist/src/ink.js +55 -0
- package/dist/src/interactiveHelpers.js +231 -0
- package/dist/src/keybindings/KeybindingContext.js +170 -0
- package/dist/src/keybindings/KeybindingProviderSetup.js +225 -0
- package/dist/src/keybindings/defaultBindings.js +228 -0
- package/dist/src/keybindings/loadUserBindings.js +276 -0
- package/dist/src/keybindings/match.js +73 -0
- package/dist/src/keybindings/parser.js +152 -0
- package/dist/src/keybindings/reservedShortcuts.js +82 -0
- package/dist/src/keybindings/resolver.js +116 -0
- package/dist/src/keybindings/schema.js +143 -0
- package/dist/src/keybindings/shortcutFormat.js +24 -0
- package/dist/src/keybindings/template.js +28 -0
- package/dist/src/keybindings/useKeybinding.js +100 -0
- package/dist/src/keybindings/useShortcutDisplay.js +24 -0
- package/dist/src/keybindings/validate.js +313 -0
- package/dist/src/localRecoveryCli.js +256 -0
- package/dist/src/main.js +2489 -0
- package/dist/src/memdir/findRelevantMemories.js +76 -0
- package/dist/src/memdir/memdir.js +264 -0
- package/dist/src/memdir/memoryAge.js +24 -0
- package/dist/src/memdir/memoryScan.js +36 -0
- package/dist/src/memdir/memoryTypes.js +190 -0
- package/dist/src/memdir/paths.js +106 -0
- package/dist/src/memdir/teamMemPaths.js +133 -0
- package/dist/src/memdir/teamMemPrompts.js +87 -0
- package/dist/src/migrations/migrateAutoUpdatesToSettings.js +41 -0
- package/dist/src/migrations/migrateBypassPermissionsAcceptedToSettings.js +29 -0
- package/dist/src/migrations/migrateEnableAllProjectMcpServersToSettings.js +70 -0
- package/dist/src/migrations/migrateFennecToOpus.js +27 -0
- package/dist/src/migrations/migrateLegacyOpusToCurrent.js +30 -0
- package/dist/src/migrations/migrateOpusToOpus1m.js +23 -0
- package/dist/src/migrations/migrateReplBridgeEnabledToRemoteControlAtStartup.js +13 -0
- package/dist/src/migrations/migrateSonnet1mToSonnet45.js +29 -0
- package/dist/src/migrations/migrateSonnet45ToSonnet46.js +41 -0
- package/dist/src/migrations/resetAutoModeOptInForDefaultOffer.js +11 -0
- package/dist/src/migrations/resetProToOpusDefault.js +42 -0
- package/dist/src/moreright/useMoreRight.js +7 -0
- package/dist/src/native-ts/color-diff/index.js +729 -0
- package/dist/src/native-ts/file-index/index.js +246 -0
- package/dist/src/native-ts/yoga-layout/enums.js +96 -0
- package/dist/src/native-ts/yoga-layout/index.js +1638 -0
- package/dist/src/outputStyles/loadOutputStylesDir.js +47 -0
- package/dist/src/plugins/builtinPlugins.js +86 -0
- package/dist/src/plugins/bundled/index.js +1 -0
- package/dist/src/projectOnboardingState.js +56 -0
- package/dist/src/query/config.js +14 -0
- package/dist/src/query/deps.js +12 -0
- package/dist/src/query/stopHooks.js +251 -0
- package/dist/src/query/tokenBudget.js +47 -0
- package/dist/src/query.js +813 -0
- package/dist/src/remote/RemoteSessionManager.js +144 -0
- package/dist/src/remote/SessionsWebSocket.js +231 -0
- package/dist/src/remote/remotePermissionBridge.js +57 -0
- package/dist/src/remote/sdkMessageAdapter.js +161 -0
- package/dist/src/replLauncher.js +15 -0
- package/dist/src/schemas/hooks.js +71 -0
- package/dist/src/screens/Doctor.js +988 -0
- package/dist/src/screens/REPL.js +3588 -0
- package/dist/src/screens/ResumeConversation.js +396 -0
- package/dist/src/server/createDirectConnectSession.js +55 -0
- package/dist/src/server/directConnectManager.js +131 -0
- package/dist/src/server/types.js +7 -0
- package/dist/src/services/AgentSummary/agentSummary.js +114 -0
- package/dist/src/services/MagicDocs/magicDocs.js +151 -0
- package/dist/src/services/MagicDocs/prompts.js +85 -0
- package/dist/src/services/PromptSuggestion/promptSuggestion.js +350 -0
- package/dist/src/services/PromptSuggestion/speculation.js +590 -0
- package/dist/src/services/SessionMemory/prompts.js +220 -0
- package/dist/src/services/SessionMemory/sessionMemory.js +277 -0
- package/dist/src/services/SessionMemory/sessionMemoryUtils.js +94 -0
- package/dist/src/services/analytics/config.js +8 -0
- package/dist/src/services/analytics/datadog.js +217 -0
- package/dist/src/services/analytics/firstPartyEventLogger.js +223 -0
- package/dist/src/services/analytics/firstPartyEventLoggingExporter.js +500 -0
- package/dist/src/services/analytics/growthbook.js +597 -0
- package/dist/src/services/analytics/index.js +56 -0
- package/dist/src/services/analytics/metadata.js +507 -0
- package/dist/src/services/analytics/sink.js +44 -0
- package/dist/src/services/analytics/sinkKillswitch.js +6 -0
- package/dist/src/services/api/adminRequests.js +40 -0
- package/dist/src/services/api/bootstrap.js +104 -0
- package/dist/src/services/api/claude.js +1851 -0
- package/dist/src/services/api/client.js +209 -0
- package/dist/src/services/api/dumpPrompts.js +145 -0
- package/dist/src/services/api/emptyUsage.js +15 -0
- package/dist/src/services/api/errorUtils.js +137 -0
- package/dist/src/services/api/errors.js +641 -0
- package/dist/src/services/api/filesApi.js +409 -0
- package/dist/src/services/api/firstTokenDate.js +42 -0
- package/dist/src/services/api/grove.js +222 -0
- package/dist/src/services/api/logging.js +478 -0
- package/dist/src/services/api/metricsOptOut.js +87 -0
- package/dist/src/services/api/overageCreditGrant.js +83 -0
- package/dist/src/services/api/promptCacheBreakDetection.js +411 -0
- package/dist/src/services/api/referral.js +178 -0
- package/dist/src/services/api/sessionIngress.js +264 -0
- package/dist/src/services/api/ultrareviewQuota.js +23 -0
- package/dist/src/services/api/usage.js +34 -0
- package/dist/src/services/api/withRetry.js +454 -0
- package/dist/src/services/autoDream/autoDream.js +197 -0
- package/dist/src/services/autoDream/config.js +9 -0
- package/dist/src/services/autoDream/consolidationLock.js +76 -0
- package/dist/src/services/autoDream/consolidationPrompt.js +61 -0
- package/dist/src/services/awaySummary.js +58 -0
- package/dist/src/services/claudeAiLimits.js +269 -0
- package/dist/src/services/claudeAiLimitsHook.js +18 -0
- package/dist/src/services/compact/apiMicrocompact.js +82 -0
- package/dist/src/services/compact/autoCompact.js +151 -0
- package/dist/src/services/compact/compact.js +957 -0
- package/dist/src/services/compact/compactWarningHook.js +5 -0
- package/dist/src/services/compact/compactWarningState.js +8 -0
- package/dist/src/services/compact/grouping.js +20 -0
- package/dist/src/services/compact/microCompact.js +265 -0
- package/dist/src/services/compact/postCompactCleanup.js +23 -0
- package/dist/src/services/compact/prompt.js +303 -0
- package/dist/src/services/compact/sessionMemoryCompact.js +316 -0
- package/dist/src/services/compact/timeBasedMCConfig.js +9 -0
- package/dist/src/services/diagnosticTracking.js +195 -0
- package/dist/src/services/extractMemories/extractMemories.js +309 -0
- package/dist/src/services/extractMemories/prompts.js +113 -0
- package/dist/src/services/internalLogging.js +53 -0
- package/dist/src/services/lsp/LSPClient.js +252 -0
- package/dist/src/services/lsp/LSPDiagnosticRegistry.js +179 -0
- package/dist/src/services/lsp/LSPServerInstance.js +245 -0
- package/dist/src/services/lsp/LSPServerManager.js +217 -0
- package/dist/src/services/lsp/config.js +38 -0
- package/dist/src/services/lsp/manager.js +132 -0
- package/dist/src/services/lsp/passiveFeedback.js +150 -0
- package/dist/src/services/mcp/InProcessTransport.js +37 -0
- package/dist/src/services/mcp/MCPConnectionManager.js +56 -0
- package/dist/src/services/mcp/SdkControlTransport.js +54 -0
- package/dist/src/services/mcp/auth.js +1419 -0
- package/dist/src/services/mcp/channelAllowlist.js +24 -0
- package/dist/src/services/mcp/channelNotification.js +118 -0
- package/dist/src/services/mcp/channelPermissions.js +89 -0
- package/dist/src/services/mcp/claudeai.js +95 -0
- package/dist/src/services/mcp/client.js +1896 -0
- package/dist/src/services/mcp/config.js +942 -0
- package/dist/src/services/mcp/elicitationHandler.js +171 -0
- package/dist/src/services/mcp/envExpansion.js +19 -0
- package/dist/src/services/mcp/headersHelper.js +64 -0
- package/dist/src/services/mcp/mcpStringUtils.js +33 -0
- package/dist/src/services/mcp/normalization.js +8 -0
- package/dist/src/services/mcp/oauthPort.js +47 -0
- package/dist/src/services/mcp/officialRegistry.js +42 -0
- package/dist/src/services/mcp/types.js +82 -0
- package/dist/src/services/mcp/useManageMCPConnections.js +536 -0
- package/dist/src/services/mcp/utils.js +284 -0
- package/dist/src/services/mcp/vscodeSdkMcp.js +55 -0
- package/dist/src/services/mcp/xaa.js +237 -0
- package/dist/src/services/mcp/xaaIdpLogin.js +286 -0
- package/dist/src/services/mcpServerApproval.js +39 -0
- package/dist/src/services/mockRateLimits.js +548 -0
- package/dist/src/services/notifier.js +112 -0
- package/dist/src/services/oauth/auth-code-listener.js +129 -0
- package/dist/src/services/oauth/client.js +341 -0
- package/dist/src/services/oauth/crypto.js +15 -0
- package/dist/src/services/oauth/getOauthProfile.js +44 -0
- package/dist/src/services/oauth/index.js +98 -0
- package/dist/src/services/plugins/PluginInstallationManager.js +111 -0
- package/dist/src/services/plugins/pluginCliCommands.js +173 -0
- package/dist/src/services/plugins/pluginOperations.js +597 -0
- package/dist/src/services/policyLimits/index.js +418 -0
- package/dist/src/services/policyLimits/types.js +5 -0
- package/dist/src/services/preventSleep.js +95 -0
- package/dist/src/services/rateLimitMessages.js +194 -0
- package/dist/src/services/rateLimitMocking.js +58 -0
- package/dist/src/services/remoteManagedSettings/index.js +368 -0
- package/dist/src/services/remoteManagedSettings/securityCheck.js +52 -0
- package/dist/src/services/remoteManagedSettings/syncCache.js +50 -0
- package/dist/src/services/remoteManagedSettings/syncCacheState.js +48 -0
- package/dist/src/services/remoteManagedSettings/types.js +7 -0
- package/dist/src/services/settingsSync/index.js +368 -0
- package/dist/src/services/settingsSync/types.js +18 -0
- package/dist/src/services/teamMemorySync/index.js +731 -0
- package/dist/src/services/teamMemorySync/secretScanner.js +210 -0
- package/dist/src/services/teamMemorySync/teamMemSecretGuard.js +4 -0
- package/dist/src/services/teamMemorySync/types.js +23 -0
- package/dist/src/services/teamMemorySync/watcher.js +197 -0
- package/dist/src/services/tips/tipHistory.js +17 -0
- package/dist/src/services/tips/tipRegistry.js +578 -0
- package/dist/src/services/tips/tipScheduler.js +37 -0
- package/dist/src/services/tokenEstimation.js +283 -0
- package/dist/src/services/toolUseSummary/toolUseSummaryGenerator.js +75 -0
- package/dist/src/services/tools/StreamingToolExecutor.js +311 -0
- package/dist/src/services/tools/toolExecution.js +1009 -0
- package/dist/src/services/tools/toolHooks.js +384 -0
- package/dist/src/services/tools/toolOrchestration.js +96 -0
- package/dist/src/services/vcr.js +233 -0
- package/dist/src/services/voice.js +315 -0
- package/dist/src/services/voiceKeyterms.js +57 -0
- package/dist/src/services/voiceStreamSTT.js +265 -0
- package/dist/src/setup.js +235 -0
- package/dist/src/skills/bundled/batch.js +114 -0
- package/dist/src/skills/bundled/claudeApi.js +149 -0
- package/dist/src/skills/bundled/claudeApiContent.js +63 -0
- package/dist/src/skills/bundled/claudeInChrome.js +31 -0
- package/dist/src/skills/bundled/debug.js +89 -0
- package/dist/src/skills/bundled/index.js +22 -0
- package/dist/src/skills/bundled/keybindings.js +303 -0
- package/dist/src/skills/bundled/loop.js +86 -0
- package/dist/src/skills/bundled/loremIpsum.js +257 -0
- package/dist/src/skills/bundled/remember.js +78 -0
- package/dist/src/skills/bundled/scheduleRemoteAgents.js +360 -0
- package/dist/src/skills/bundled/simplify.js +70 -0
- package/dist/src/skills/bundled/skillify.js +179 -0
- package/dist/src/skills/bundled/stuck.js +76 -0
- package/dist/src/skills/bundled/updateConfig.js +471 -0
- package/dist/src/skills/bundled/verify/SKILL.md.js +1 -0
- package/dist/src/skills/bundled/verify/examples/cli.md.js +1 -0
- package/dist/src/skills/bundled/verify/examples/server.md.js +1 -0
- package/dist/src/skills/bundled/verify.js +27 -0
- package/dist/src/skills/bundled/verifyContent.js +8 -0
- package/dist/src/skills/bundledSkills.js +114 -0
- package/dist/src/skills/loadSkillsDir.js +583 -0
- package/dist/src/skills/mcpSkillBuilders.js +10 -0
- package/dist/src/state/AppState.js +153 -0
- package/dist/src/state/AppStateStore.js +115 -0
- package/dist/src/state/onChangeAppState.js +94 -0
- package/dist/src/state/selectors.js +29 -0
- package/dist/src/state/store.js +21 -0
- package/dist/src/state/teammateViewHelpers.js +89 -0
- package/dist/src/tasks/DreamTask/DreamTask.js +79 -0
- package/dist/src/tasks/InProcessTeammateTask/InProcessTeammateTask.js +70 -0
- package/dist/src/tasks/InProcessTeammateTask/types.js +15 -0
- package/dist/src/tasks/LocalAgentTask/LocalAgentTask.js +444 -0
- package/dist/src/tasks/LocalMainSessionTask.js +262 -0
- package/dist/src/tasks/LocalShellTask/LocalShellTask.js +419 -0
- package/dist/src/tasks/LocalShellTask/guards.js +3 -0
- package/dist/src/tasks/LocalShellTask/killShellTasks.js +44 -0
- package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +550 -0
- package/dist/src/tasks/pillLabel.js +53 -0
- package/dist/src/tasks/stopTask.js +53 -0
- package/dist/src/tasks/types.js +9 -0
- package/dist/src/tasks.js +22 -0
- package/dist/src/tools/AgentTool/AgentTool.js +919 -0
- package/dist/src/tools/AgentTool/UI.js +912 -0
- package/dist/src/tools/AgentTool/agentColorManager.js +42 -0
- package/dist/src/tools/AgentTool/agentDisplay.js +45 -0
- package/dist/src/tools/AgentTool/agentMemory.js +85 -0
- package/dist/src/tools/AgentTool/agentMemorySnapshot.js +109 -0
- package/dist/src/tools/AgentTool/agentToolUtils.js +387 -0
- package/dist/src/tools/AgentTool/built-in/claudeCodeGuideAgent.js +159 -0
- package/dist/src/tools/AgentTool/built-in/exploreAgent.js +66 -0
- package/dist/src/tools/AgentTool/built-in/generalPurposeAgent.js +26 -0
- package/dist/src/tools/AgentTool/built-in/planAgent.js +81 -0
- package/dist/src/tools/AgentTool/built-in/statuslineSetup.js +140 -0
- package/dist/src/tools/AgentTool/built-in/verificationAgent.js +146 -0
- package/dist/src/tools/AgentTool/builtInAgents.js +32 -0
- package/dist/src/tools/AgentTool/constants.js +7 -0
- package/dist/src/tools/AgentTool/forkSubagent.js +108 -0
- package/dist/src/tools/AgentTool/loadAgentsDir.js +409 -0
- package/dist/src/tools/AgentTool/prompt.js +194 -0
- package/dist/src/tools/AgentTool/resumeAgent.js +169 -0
- package/dist/src/tools/AgentTool/runAgent.js +457 -0
- package/dist/src/tools/AskUserQuestionTool/AskUserQuestionTool.js +282 -0
- package/dist/src/tools/AskUserQuestionTool/prompt.js +38 -0
- package/dist/src/tools/BashTool/BashTool.js +867 -0
- package/dist/src/tools/BashTool/BashToolResultMessage.js +208 -0
- package/dist/src/tools/BashTool/UI.js +189 -0
- package/dist/src/tools/BashTool/bashCommandHelpers.js +145 -0
- package/dist/src/tools/BashTool/bashPermissions.js +1193 -0
- package/dist/src/tools/BashTool/bashSecurity.js +1464 -0
- package/dist/src/tools/BashTool/commandSemantics.js +70 -0
- package/dist/src/tools/BashTool/commentLabel.js +8 -0
- package/dist/src/tools/BashTool/destructiveCommandWarning.js +74 -0
- package/dist/src/tools/BashTool/modeValidation.js +65 -0
- package/dist/src/tools/BashTool/pathValidation.js +771 -0
- package/dist/src/tools/BashTool/prompt.js +307 -0
- package/dist/src/tools/BashTool/readOnlyValidation.js +1312 -0
- package/dist/src/tools/BashTool/sedEditParser.js +179 -0
- package/dist/src/tools/BashTool/sedValidation.js +379 -0
- package/dist/src/tools/BashTool/shouldUseSandbox.js +102 -0
- package/dist/src/tools/BashTool/toolName.js +1 -0
- package/dist/src/tools/BashTool/utils.js +145 -0
- package/dist/src/tools/BriefTool/BriefTool.js +106 -0
- package/dist/src/tools/BriefTool/UI.js +158 -0
- package/dist/src/tools/BriefTool/attachments.js +54 -0
- package/dist/src/tools/BriefTool/prompt.js +19 -0
- package/dist/src/tools/BriefTool/upload.js +37 -0
- package/dist/src/tools/ConfigTool/ConfigTool.js +304 -0
- package/dist/src/tools/ConfigTool/UI.js +76 -0
- package/dist/src/tools/ConfigTool/constants.js +1 -0
- package/dist/src/tools/ConfigTool/prompt.js +76 -0
- package/dist/src/tools/ConfigTool/supportedSettings.js +141 -0
- package/dist/src/tools/EnterPlanModeTool/EnterPlanModeTool.js +91 -0
- package/dist/src/tools/EnterPlanModeTool/UI.js +49 -0
- package/dist/src/tools/EnterPlanModeTool/constants.js +1 -0
- package/dist/src/tools/EnterPlanModeTool/prompt.js +154 -0
- package/dist/src/tools/EnterWorktreeTool/EnterWorktreeTool.js +97 -0
- package/dist/src/tools/EnterWorktreeTool/UI.js +25 -0
- package/dist/src/tools/EnterWorktreeTool/constants.js +1 -0
- package/dist/src/tools/EnterWorktreeTool/prompt.js +30 -0
- package/dist/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.js +287 -0
- package/dist/src/tools/ExitPlanModeTool/UI.js +128 -0
- package/dist/src/tools/ExitPlanModeTool/constants.js +2 -0
- package/dist/src/tools/ExitPlanModeTool/prompt.js +25 -0
- package/dist/src/tools/ExitWorktreeTool/ExitWorktreeTool.js +217 -0
- package/dist/src/tools/ExitWorktreeTool/UI.js +36 -0
- package/dist/src/tools/ExitWorktreeTool/constants.js +1 -0
- package/dist/src/tools/ExitWorktreeTool/prompt.js +32 -0
- package/dist/src/tools/FileEditTool/FileEditTool.js +447 -0
- package/dist/src/tools/FileEditTool/UI.js +289 -0
- package/dist/src/tools/FileEditTool/constants.js +4 -0
- package/dist/src/tools/FileEditTool/prompt.js +22 -0
- package/dist/src/tools/FileEditTool/types.js +37 -0
- package/dist/src/tools/FileEditTool/utils.js +411 -0
- package/dist/src/tools/FileReadTool/FileReadTool.js +759 -0
- package/dist/src/tools/FileReadTool/UI.js +232 -0
- package/dist/src/tools/FileReadTool/imageProcessor.js +34 -0
- package/dist/src/tools/FileReadTool/limits.js +28 -0
- package/dist/src/tools/FileReadTool/prompt.js +25 -0
- package/dist/src/tools/FileWriteTool/FileWriteTool.js +300 -0
- package/dist/src/tools/FileWriteTool/UI.js +460 -0
- package/dist/src/tools/FileWriteTool/prompt.js +16 -0
- package/dist/src/tools/GlobTool/GlobTool.js +155 -0
- package/dist/src/tools/GlobTool/UI.js +58 -0
- package/dist/src/tools/GlobTool/prompt.js +6 -0
- package/dist/src/tools/GrepTool/GrepTool.js +390 -0
- package/dist/src/tools/GrepTool/UI.js +254 -0
- package/dist/src/tools/GrepTool/prompt.js +16 -0
- package/dist/src/tools/LSPTool/LSPTool.js +541 -0
- package/dist/src/tools/LSPTool/UI.js +275 -0
- package/dist/src/tools/LSPTool/formatters.js +353 -0
- package/dist/src/tools/LSPTool/prompt.js +20 -0
- package/dist/src/tools/LSPTool/schemas.js +82 -0
- package/dist/src/tools/LSPTool/symbolContext.js +43 -0
- package/dist/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.js +91 -0
- package/dist/src/tools/ListMcpResourcesTool/UI.js +26 -0
- package/dist/src/tools/ListMcpResourcesTool/prompt.js +18 -0
- package/dist/src/tools/MCPTool/MCPTool.js +57 -0
- package/dist/src/tools/MCPTool/UI.js +433 -0
- package/dist/src/tools/MCPTool/classifyForCollapse.js +509 -0
- package/dist/src/tools/MCPTool/prompt.js +2 -0
- package/dist/src/tools/McpAuthTool/McpAuthTool.js +139 -0
- package/dist/src/tools/NotebookEditTool/NotebookEditTool.js +364 -0
- package/dist/src/tools/NotebookEditTool/UI.js +115 -0
- package/dist/src/tools/NotebookEditTool/constants.js +1 -0
- package/dist/src/tools/NotebookEditTool/prompt.js +2 -0
- package/dist/src/tools/PowerShellTool/PowerShellTool.js +700 -0
- package/dist/src/tools/PowerShellTool/UI.js +154 -0
- package/dist/src/tools/PowerShellTool/clmTypes.js +147 -0
- package/dist/src/tools/PowerShellTool/commandSemantics.js +37 -0
- package/dist/src/tools/PowerShellTool/commonParameters.js +17 -0
- package/dist/src/tools/PowerShellTool/destructiveCommandWarning.js +70 -0
- package/dist/src/tools/PowerShellTool/gitSafety.js +102 -0
- package/dist/src/tools/PowerShellTool/modeValidation.js +203 -0
- package/dist/src/tools/PowerShellTool/pathValidation.js +1259 -0
- package/dist/src/tools/PowerShellTool/powershellPermissions.js +791 -0
- package/dist/src/tools/PowerShellTool/powershellSecurity.js +612 -0
- package/dist/src/tools/PowerShellTool/prompt.js +130 -0
- package/dist/src/tools/PowerShellTool/readOnlyValidation.js +1000 -0
- package/dist/src/tools/PowerShellTool/toolName.js +1 -0
- package/dist/src/tools/REPLTool/constants.js +27 -0
- package/dist/src/tools/REPLTool/primitiveTools.js +21 -0
- package/dist/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.js +115 -0
- package/dist/src/tools/ReadMcpResourceTool/UI.js +37 -0
- package/dist/src/tools/ReadMcpResourceTool/prompt.js +15 -0
- package/dist/src/tools/RemoteTriggerTool/RemoteTriggerTool.js +138 -0
- package/dist/src/tools/RemoteTriggerTool/UI.js +28 -0
- package/dist/src/tools/RemoteTriggerTool/prompt.js +12 -0
- package/dist/src/tools/ScheduleCronTool/CronCreateTool.js +117 -0
- package/dist/src/tools/ScheduleCronTool/CronDeleteTool.js +83 -0
- package/dist/src/tools/ScheduleCronTool/CronListTool.js +77 -0
- package/dist/src/tools/ScheduleCronTool/UI.js +73 -0
- package/dist/src/tools/ScheduleCronTool/prompt.js +67 -0
- package/dist/src/tools/SendMessageTool/SendMessageTool.js +561 -0
- package/dist/src/tools/SendMessageTool/UI.js +30 -0
- package/dist/src/tools/SendMessageTool/constants.js +1 -0
- package/dist/src/tools/SendMessageTool/prompt.js +32 -0
- package/dist/src/tools/SkillTool/SkillTool.js +614 -0
- package/dist/src/tools/SkillTool/UI.js +141 -0
- package/dist/src/tools/SkillTool/constants.js +1 -0
- package/dist/src/tools/SkillTool/prompt.js +161 -0
- package/dist/src/tools/SleepTool/prompt.js +14 -0
- package/dist/src/tools/SyntheticOutputTool/SyntheticOutputTool.js +120 -0
- package/dist/src/tools/TaskCreateTool/TaskCreateTool.js +106 -0
- package/dist/src/tools/TaskCreateTool/constants.js +1 -0
- package/dist/src/tools/TaskCreateTool/prompt.js +48 -0
- package/dist/src/tools/TaskGetTool/TaskGetTool.js +110 -0
- package/dist/src/tools/TaskGetTool/constants.js +1 -0
- package/dist/src/tools/TaskGetTool/prompt.js +23 -0
- package/dist/src/tools/TaskListTool/TaskListTool.js +92 -0
- package/dist/src/tools/TaskListTool/constants.js +1 -0
- package/dist/src/tools/TaskListTool/prompt.js +38 -0
- package/dist/src/tools/TaskOutputTool/TaskOutputTool.js +688 -0
- package/dist/src/tools/TaskOutputTool/constants.js +1 -0
- package/dist/src/tools/TaskStopTool/TaskStopTool.js +97 -0
- package/dist/src/tools/TaskStopTool/UI.js +39 -0
- package/dist/src/tools/TaskStopTool/prompt.js +7 -0
- package/dist/src/tools/TaskUpdateTool/TaskUpdateTool.js +279 -0
- package/dist/src/tools/TaskUpdateTool/constants.js +1 -0
- package/dist/src/tools/TaskUpdateTool/prompt.js +76 -0
- package/dist/src/tools/TeamCreateTool/TeamCreateTool.js +161 -0
- package/dist/src/tools/TeamCreateTool/UI.js +4 -0
- package/dist/src/tools/TeamCreateTool/constants.js +1 -0
- package/dist/src/tools/TeamCreateTool/prompt.js +113 -0
- package/dist/src/tools/TeamDeleteTool/TeamDeleteTool.js +96 -0
- package/dist/src/tools/TeamDeleteTool/UI.js +14 -0
- package/dist/src/tools/TeamDeleteTool/constants.js +1 -0
- package/dist/src/tools/TeamDeleteTool/prompt.js +16 -0
- package/dist/src/tools/TodoWriteTool/TodoWriteTool.js +86 -0
- package/dist/src/tools/TodoWriteTool/constants.js +1 -0
- package/dist/src/tools/TodoWriteTool/prompt.js +181 -0
- package/dist/src/tools/ToolSearchTool/ToolSearchTool.js +266 -0
- package/dist/src/tools/ToolSearchTool/constants.js +1 -0
- package/dist/src/tools/ToolSearchTool/prompt.js +40 -0
- package/dist/src/tools/TungstenTool/TungstenLiveMonitor.js +4 -0
- package/dist/src/tools/TungstenTool/TungstenTool.js +39 -0
- package/dist/src/tools/WebFetchTool/UI.js +91 -0
- package/dist/src/tools/WebFetchTool/WebFetchTool.js +234 -0
- package/dist/src/tools/WebFetchTool/preapproved.js +122 -0
- package/dist/src/tools/WebFetchTool/prompt.js +37 -0
- package/dist/src/tools/WebFetchTool/utils.js +303 -0
- package/dist/src/tools/WebSearchTool/UI.js +109 -0
- package/dist/src/tools/WebSearchTool/WebSearchTool.js +313 -0
- package/dist/src/tools/WebSearchTool/prompt.js +32 -0
- package/dist/src/tools/WorkflowTool/constants.js +1 -0
- package/dist/src/tools/shared/gitOperationTracking.js +158 -0
- package/dist/src/tools/shared/spawnMultiAgent.js +630 -0
- package/dist/src/tools/testing/TestingPermissionTool.js +66 -0
- package/dist/src/tools/utils.js +15 -0
- package/dist/src/tools.js +184 -0
- package/dist/src/types/command.js +6 -0
- package/dist/src/types/connectorText.js +3 -0
- package/dist/src/types/generated/events_mono/claude_code/v1/claude_code_internal_event.js +525 -0
- package/dist/src/types/generated/events_mono/common/v1/auth.js +38 -0
- package/dist/src/types/generated/events_mono/growthbook/v1/growthbook_experiment_event.js +112 -0
- package/dist/src/types/generated/google/protobuf/timestamp.js +33 -0
- package/dist/src/types/hooks.js +121 -0
- package/dist/src/types/ids.js +10 -0
- package/dist/src/types/logs.js +9 -0
- package/dist/src/types/permissions.js +12 -0
- package/dist/src/types/plugin.js +64 -0
- package/dist/src/types/textInputTypes.js +10 -0
- package/dist/src/upstreamproxy/relay.js +274 -0
- package/dist/src/upstreamproxy/upstreamproxy.js +161 -0
- package/dist/src/utils/CircularBuffer.js +51 -0
- package/dist/src/utils/Cursor.js +1006 -0
- package/dist/src/utils/QueryGuard.js +57 -0
- package/dist/src/utils/Shell.js +260 -0
- package/dist/src/utils/ShellCommand.js +277 -0
- package/dist/src/utils/abortController.js +31 -0
- package/dist/src/utils/activityManager.js +91 -0
- package/dist/src/utils/advisor.js +63 -0
- package/dist/src/utils/agentContext.js +36 -0
- package/dist/src/utils/agentId.js +36 -0
- package/dist/src/utils/agentSwarmsEnabled.js +17 -0
- package/dist/src/utils/agenticSessionSearch.js +194 -0
- package/dist/src/utils/analyzeContext.js +692 -0
- package/dist/src/utils/ansiToPng.js +211 -0
- package/dist/src/utils/ansiToSvg.js +171 -0
- package/dist/src/utils/api.js +435 -0
- package/dist/src/utils/apiPreconnect.js +19 -0
- package/dist/src/utils/appleTerminalBackup.js +91 -0
- package/dist/src/utils/argumentSubstitution.js +58 -0
- package/dist/src/utils/array.js +12 -0
- package/dist/src/utils/asciicast.js +149 -0
- package/dist/src/utils/attachments.js +1854 -0
- package/dist/src/utils/attribution.js +215 -0
- package/dist/src/utils/auth.js +1197 -0
- package/dist/src/utils/authFileDescriptor.js +106 -0
- package/dist/src/utils/authPortable.js +14 -0
- package/dist/src/utils/autoModeDenials.js +10 -0
- package/dist/src/utils/autoRunIssue.js +126 -0
- package/dist/src/utils/autoUpdater.js +339 -0
- package/dist/src/utils/aws.js +30 -0
- package/dist/src/utils/awsAuthStatusManager.js +55 -0
- package/dist/src/utils/background/remote/preconditions.js +134 -0
- package/dist/src/utils/background/remote/remoteSession.js +42 -0
- package/dist/src/utils/backgroundHousekeeping.js +47 -0
- package/dist/src/utils/bash/ParsedCommand.js +194 -0
- package/dist/src/utils/bash/ShellSnapshot.js +333 -0
- package/dist/src/utils/bash/ast.js +1422 -0
- package/dist/src/utils/bash/bashParser.js +3625 -0
- package/dist/src/utils/bash/bashPipeCommand.js +138 -0
- package/dist/src/utils/bash/commands.js +668 -0
- package/dist/src/utils/bash/heredoc.js +288 -0
- package/dist/src/utils/bash/parser.js +110 -0
- package/dist/src/utils/bash/prefix.js +119 -0
- package/dist/src/utils/bash/registry.js +20 -0
- package/dist/src/utils/bash/shellCompletion.js +127 -0
- package/dist/src/utils/bash/shellPrefix.js +11 -0
- package/dist/src/utils/bash/shellQuote.js +159 -0
- package/dist/src/utils/bash/shellQuoting.js +43 -0
- package/dist/src/utils/bash/specs/alias.js +11 -0
- package/dist/src/utils/bash/specs/index.js +16 -0
- package/dist/src/utils/bash/specs/nohup.js +10 -0
- package/dist/src/utils/bash/specs/pyright.js +88 -0
- package/dist/src/utils/bash/specs/sleep.js +10 -0
- package/dist/src/utils/bash/specs/srun.js +28 -0
- package/dist/src/utils/bash/specs/time.js +10 -0
- package/dist/src/utils/bash/specs/timeout.js +17 -0
- package/dist/src/utils/bash/treeSitterAnalysis.js +259 -0
- package/dist/src/utils/betas.js +199 -0
- package/dist/src/utils/billing.js +47 -0
- package/dist/src/utils/binaryCheck.js +25 -0
- package/dist/src/utils/browser.js +47 -0
- package/dist/src/utils/bufferedWriter.js +73 -0
- package/dist/src/utils/bundledMode.js +6 -0
- package/dist/src/utils/caCerts.js +47 -0
- package/dist/src/utils/caCertsConfig.js +32 -0
- package/dist/src/utils/cachePaths.js +22 -0
- package/dist/src/utils/classifierApprovals.js +61 -0
- package/dist/src/utils/classifierApprovalsHook.js +8 -0
- package/dist/src/utils/claudeCodeHints.js +83 -0
- package/dist/src/utils/claudeDesktop.js +87 -0
- package/dist/src/utils/claudeInChrome/chromeNativeHost.js +353 -0
- package/dist/src/utils/claudeInChrome/common.js +416 -0
- package/dist/src/utils/claudeInChrome/mcpServer.js +190 -0
- package/dist/src/utils/claudeInChrome/prompt.js +60 -0
- package/dist/src/utils/claudeInChrome/setup.js +239 -0
- package/dist/src/utils/claudeInChrome/setupPortable.js +133 -0
- package/dist/src/utils/claudeInChrome/toolRendering.js +224 -0
- package/dist/src/utils/claudemd.js +727 -0
- package/dist/src/utils/cleanup.js +423 -0
- package/dist/src/utils/cleanupRegistry.js +8 -0
- package/dist/src/utils/cliArgs.js +21 -0
- package/dist/src/utils/cliHighlight.js +27 -0
- package/dist/src/utils/codeIndexing.js +92 -0
- package/dist/src/utils/collapseBackgroundBashNotifications.js +58 -0
- package/dist/src/utils/collapseHookSummaries.js +38 -0
- package/dist/src/utils/collapseReadSearch.js +569 -0
- package/dist/src/utils/collapseTeammateShutdowns.js +34 -0
- package/dist/src/utils/combinedAbortSignal.js +28 -0
- package/dist/src/utils/commandLifecycle.js +7 -0
- package/dist/src/utils/commitAttribution.js +510 -0
- package/dist/src/utils/completionCache.js +126 -0
- package/dist/src/utils/computerUse/appNames.js +104 -0
- package/dist/src/utils/computerUse/cleanup.js +37 -0
- package/dist/src/utils/computerUse/common.js +25 -0
- package/dist/src/utils/computerUse/computerUseLock.js +117 -0
- package/dist/src/utils/computerUse/drainRunLoop.js +44 -0
- package/dist/src/utils/computerUse/escHotkey.js +33 -0
- package/dist/src/utils/computerUse/executor.js +303 -0
- package/dist/src/utils/computerUse/gates.js +40 -0
- package/dist/src/utils/computerUse/hostAdapter.js +48 -0
- package/dist/src/utils/computerUse/inputLoader.js +10 -0
- package/dist/src/utils/computerUse/mcpServer.js +61 -0
- package/dist/src/utils/computerUse/setup.js +25 -0
- package/dist/src/utils/computerUse/swiftLoader.js +7 -0
- package/dist/src/utils/computerUse/toolRendering.js +96 -0
- package/dist/src/utils/computerUse/wrapper.js +242 -0
- package/dist/src/utils/concurrentSessions.js +108 -0
- package/dist/src/utils/config.js +801 -0
- package/dist/src/utils/configConstants.js +11 -0
- package/dist/src/utils/contentArray.js +19 -0
- package/dist/src/utils/context.js +135 -0
- package/dist/src/utils/contextAnalysis.js +152 -0
- package/dist/src/utils/contextSuggestions.js +141 -0
- package/dist/src/utils/controlMessageCompat.js +17 -0
- package/dist/src/utils/conversationRecovery.js +278 -0
- package/dist/src/utils/cron.js +182 -0
- package/dist/src/utils/cronJitterConfig.js +22 -0
- package/dist/src/utils/cronScheduler.js +295 -0
- package/dist/src/utils/cronTasks.js +183 -0
- package/dist/src/utils/cronTasksLock.js +116 -0
- package/dist/src/utils/crossProjectResume.js +36 -0
- package/dist/src/utils/crypto.js +3 -0
- package/dist/src/utils/cwd.js +16 -0
- package/dist/src/utils/debug.js +170 -0
- package/dist/src/utils/debugFilter.js +69 -0
- package/dist/src/utils/deepLink/banner.js +52 -0
- package/dist/src/utils/deepLink/parseDeepLink.js +68 -0
- package/dist/src/utils/deepLink/protocolHandler.js +66 -0
- package/dist/src/utils/deepLink/registerProtocol.js +206 -0
- package/dist/src/utils/deepLink/terminalLauncher.js +321 -0
- package/dist/src/utils/deepLink/terminalPreference.js +26 -0
- package/dist/src/utils/desktopDeepLink.js +154 -0
- package/dist/src/utils/detectRepository.js +98 -0
- package/dist/src/utils/diagLogs.js +47 -0
- package/dist/src/utils/diff.js +92 -0
- package/dist/src/utils/directMemberMessage.js +27 -0
- package/dist/src/utils/displayTags.js +12 -0
- package/dist/src/utils/doctorContextWarnings.js +151 -0
- package/dist/src/utils/doctorDiagnostic.js +388 -0
- package/dist/src/utils/dxt/helpers.js +36 -0
- package/dist/src/utils/dxt/zip.js +112 -0
- package/dist/src/utils/earlyInput.js +98 -0
- package/dist/src/utils/editor.js +105 -0
- package/dist/src/utils/effort.js +188 -0
- package/dist/src/utils/embeddedTools.js +10 -0
- package/dist/src/utils/env.js +284 -0
- package/dist/src/utils/envDynamic.js +91 -0
- package/dist/src/utils/envUtils.js +88 -0
- package/dist/src/utils/envValidation.js +26 -0
- package/dist/src/utils/errorLogSink.js +142 -0
- package/dist/src/utils/errors.js +123 -0
- package/dist/src/utils/exampleCommands.js +133 -0
- package/dist/src/utils/execFileNoThrow.js +82 -0
- package/dist/src/utils/execFileNoThrowPortable.js +52 -0
- package/dist/src/utils/execSyncWrapper.js +16 -0
- package/dist/src/utils/exportRenderer.js +78 -0
- package/dist/src/utils/extraUsage.js +16 -0
- package/dist/src/utils/fastMode.js +331 -0
- package/dist/src/utils/file.js +318 -0
- package/dist/src/utils/fileHistory.js +662 -0
- package/dist/src/utils/fileOperationAnalytics.js +23 -0
- package/dist/src/utils/filePersistence/filePersistence.js +165 -0
- package/dist/src/utils/filePersistence/outputsScanner.js +72 -0
- package/dist/src/utils/filePersistence/types.js +3 -0
- package/dist/src/utils/fileRead.js +53 -0
- package/dist/src/utils/fileReadCache.js +54 -0
- package/dist/src/utils/fileStateCache.js +79 -0
- package/dist/src/utils/findExecutable.js +5 -0
- package/dist/src/utils/fingerprint.js +30 -0
- package/dist/src/utils/forkedAgent.js +253 -0
- package/dist/src/utils/format.js +200 -0
- package/dist/src/utils/formatBriefTimestamp.js +49 -0
- package/dist/src/utils/fpsTracker.js +32 -0
- package/dist/src/utils/frontmatterParser.js +159 -0
- package/dist/src/utils/fsOperations.js +548 -0
- package/dist/src/utils/fullscreen.js +83 -0
- package/dist/src/utils/generatedFiles.js +96 -0
- package/dist/src/utils/generators.js +60 -0
- package/dist/src/utils/genericProcessUtils.js +96 -0
- package/dist/src/utils/getWorktreePaths.js +30 -0
- package/dist/src/utils/getWorktreePathsPortable.js +14 -0
- package/dist/src/utils/ghPrStatus.js +51 -0
- package/dist/src/utils/git/gitConfigParser.js +166 -0
- package/dist/src/utils/git/gitFilesystem.js +413 -0
- package/dist/src/utils/git/gitignore.js +52 -0
- package/dist/src/utils/git.js +520 -0
- package/dist/src/utils/gitDiff.js +291 -0
- package/dist/src/utils/gitSettings.js +10 -0
- package/dist/src/utils/github/ghAuthStatus.js +15 -0
- package/dist/src/utils/githubRepoPathMapping.js +92 -0
- package/dist/src/utils/glob.js +65 -0
- package/dist/src/utils/gracefulShutdown.js +274 -0
- package/dist/src/utils/groupToolUses.js +107 -0
- package/dist/src/utils/handlePromptSubmit.js +323 -0
- package/dist/src/utils/hash.js +21 -0
- package/dist/src/utils/headlessProfiler.js +95 -0
- package/dist/src/utils/heapDumpService.js +157 -0
- package/dist/src/utils/heatmap.js +118 -0
- package/dist/src/utils/highlightMatch.js +28 -0
- package/dist/src/utils/hooks/AsyncHookRegistry.js +190 -0
- package/dist/src/utils/hooks/apiQueryHookHelper.js +67 -0
- package/dist/src/utils/hooks/execAgentHook.js +216 -0
- package/dist/src/utils/hooks/execHttpHook.js +106 -0
- package/dist/src/utils/hooks/execPromptHook.js +153 -0
- package/dist/src/utils/hooks/fileChangedWatcher.js +154 -0
- package/dist/src/utils/hooks/hookEvents.js +92 -0
- package/dist/src/utils/hooks/hookHelpers.js +43 -0
- package/dist/src/utils/hooks/hooksConfigManager.js +386 -0
- package/dist/src/utils/hooks/hooksConfigSnapshot.js +52 -0
- package/dist/src/utils/hooks/hooksSettings.js +175 -0
- package/dist/src/utils/hooks/postSamplingHooks.js +26 -0
- package/dist/src/utils/hooks/registerFrontmatterHooks.js +34 -0
- package/dist/src/utils/hooks/registerSkillHooks.js +24 -0
- package/dist/src/utils/hooks/sessionHooks.js +176 -0
- package/dist/src/utils/hooks/skillImprovement.js +200 -0
- package/dist/src/utils/hooks/ssrfGuard.js +157 -0
- package/dist/src/utils/hooks.js +2879 -0
- package/dist/src/utils/horizontalScroll.js +72 -0
- package/dist/src/utils/http.js +80 -0
- package/dist/src/utils/hyperlink.js +13 -0
- package/dist/src/utils/iTermBackup.js +46 -0
- package/dist/src/utils/ide.js +938 -0
- package/dist/src/utils/idePathConversion.js +47 -0
- package/dist/src/utils/idleTimeout.js +33 -0
- package/dist/src/utils/imagePaste.js +190 -0
- package/dist/src/utils/imageResizer.js +459 -0
- package/dist/src/utils/imageStore.js +109 -0
- package/dist/src/utils/imageValidation.js +61 -0
- package/dist/src/utils/immediateCommand.js +4 -0
- package/dist/src/utils/inProcessTeammateHelpers.js +28 -0
- package/dist/src/utils/ink.js +14 -0
- package/dist/src/utils/intl.js +61 -0
- package/dist/src/utils/jetbrains.js +130 -0
- package/dist/src/utils/json.js +182 -0
- package/dist/src/utils/jsonRead.js +4 -0
- package/dist/src/utils/keyboardShortcuts.js +8 -0
- package/dist/src/utils/lazySchema.js +4 -0
- package/dist/src/utils/listSessionsImpl.js +219 -0
- package/dist/src/utils/localInstaller.js +86 -0
- package/dist/src/utils/lockfile.js +19 -0
- package/dist/src/utils/log.js +164 -0
- package/dist/src/utils/logoV2Utils.js +192 -0
- package/dist/src/utils/mailbox.js +51 -0
- package/dist/src/utils/managedEnv.js +90 -0
- package/dist/src/utils/managedEnvConstants.js +136 -0
- package/dist/src/utils/markdown.js +216 -0
- package/dist/src/utils/markdownConfigLoader.js +293 -0
- package/dist/src/utils/mcp/dateTimeParser.js +73 -0
- package/dist/src/utils/mcp/elicitationValidation.js +208 -0
- package/dist/src/utils/mcpInstructionsDelta.js +71 -0
- package/dist/src/utils/mcpOutputStorage.js +124 -0
- package/dist/src/utils/mcpValidation.js +138 -0
- package/dist/src/utils/mcpWebSocketTransport.js +152 -0
- package/dist/src/utils/memoize.js +125 -0
- package/dist/src/utils/memory/types.js +8 -0
- package/dist/src/utils/memory/versions.js +4 -0
- package/dist/src/utils/memoryFileDetection.js +151 -0
- package/dist/src/utils/messagePredicates.js +3 -0
- package/dist/src/utils/messageQueueManager.js +267 -0
- package/dist/src/utils/messages/mappers.js +198 -0
- package/dist/src/utils/messages/systemInit.js +47 -0
- package/dist/src/utils/messages.js +3450 -0
- package/dist/src/utils/model/agent.js +91 -0
- package/dist/src/utils/model/aliases.js +16 -0
- package/dist/src/utils/model/antModels.js +23 -0
- package/dist/src/utils/model/bedrock.js +158 -0
- package/dist/src/utils/model/check1mAccess.js +49 -0
- package/dist/src/utils/model/configs.js +81 -0
- package/dist/src/utils/model/contextWindowUpgradeCheck.js +32 -0
- package/dist/src/utils/model/deprecation.js +56 -0
- package/dist/src/utils/model/model.js +377 -0
- package/dist/src/utils/model/modelAllowlist.js +91 -0
- package/dist/src/utils/model/modelCapabilities.js +97 -0
- package/dist/src/utils/model/modelOptions.js +403 -0
- package/dist/src/utils/model/modelStrings.js +112 -0
- package/dist/src/utils/model/modelSupportOverrides.js +32 -0
- package/dist/src/utils/model/providers.js +23 -0
- package/dist/src/utils/model/validateModel.js +108 -0
- package/dist/src/utils/modelCost.js +135 -0
- package/dist/src/utils/modifiers.js +22 -0
- package/dist/src/utils/mtls.js +101 -0
- package/dist/src/utils/nativeInstaller/download.js +309 -0
- package/dist/src/utils/nativeInstaller/index.js +9 -0
- package/dist/src/utils/nativeInstaller/installer.js +1104 -0
- package/dist/src/utils/nativeInstaller/packageManagers.js +174 -0
- package/dist/src/utils/nativeInstaller/pidLock.js +230 -0
- package/dist/src/utils/notebook.js +170 -0
- package/dist/src/utils/objectGroupBy.js +12 -0
- package/dist/src/utils/pasteStore.js +61 -0
- package/dist/src/utils/path.js +65 -0
- package/dist/src/utils/pdf.js +199 -0
- package/dist/src/utils/pdfUtils.js +36 -0
- package/dist/src/utils/peerAddress.js +9 -0
- package/dist/src/utils/permissions/PermissionMode.js +82 -0
- package/dist/src/utils/permissions/PermissionPromptToolResultSchema.js +62 -0
- package/dist/src/utils/permissions/PermissionResult.js +10 -0
- package/dist/src/utils/permissions/PermissionRule.js +7 -0
- package/dist/src/utils/permissions/PermissionUpdate.js +219 -0
- package/dist/src/utils/permissions/PermissionUpdateSchema.js +49 -0
- package/dist/src/utils/permissions/autoModeState.js +26 -0
- package/dist/src/utils/permissions/bashClassifier.js +29 -0
- package/dist/src/utils/permissions/bypassPermissionsKillswitch.js +69 -0
- package/dist/src/utils/permissions/classifierDecision.js +56 -0
- package/dist/src/utils/permissions/classifierShared.js +14 -0
- package/dist/src/utils/permissions/dangerousPatterns.js +44 -0
- package/dist/src/utils/permissions/denialTracking.js +28 -0
- package/dist/src/utils/permissions/filesystem.js +889 -0
- package/dist/src/utils/permissions/getNextPermissionMode.js +51 -0
- package/dist/src/utils/permissions/pathValidation.js +230 -0
- package/dist/src/utils/permissions/permissionExplainer.js +162 -0
- package/dist/src/utils/permissions/permissionRuleParser.js +90 -0
- package/dist/src/utils/permissions/permissionSetup.js +770 -0
- package/dist/src/utils/permissions/permissions.js +585 -0
- package/dist/src/utils/permissions/permissionsLoader.js +160 -0
- package/dist/src/utils/permissions/shadowedRuleDetection.js +81 -0
- package/dist/src/utils/permissions/shellRuleMatching.js +108 -0
- package/dist/src/utils/permissions/yoloClassifier.js +868 -0
- package/dist/src/utils/planModeV2.js +45 -0
- package/dist/src/utils/plans.js +232 -0
- package/dist/src/utils/platform.js +102 -0
- package/dist/src/utils/plugins/addDirPluginSettings.js +30 -0
- package/dist/src/utils/plugins/cacheUtils.js +144 -0
- package/dist/src/utils/plugins/dependencyResolver.js +118 -0
- package/dist/src/utils/plugins/fetchTelemetry.js +65 -0
- package/dist/src/utils/plugins/gitAvailability.js +18 -0
- package/dist/src/utils/plugins/headlessPluginInstall.js +92 -0
- package/dist/src/utils/plugins/hintRecommendation.js +95 -0
- package/dist/src/utils/plugins/installCounts.js +144 -0
- package/dist/src/utils/plugins/installedPluginsManager.js +645 -0
- package/dist/src/utils/plugins/loadPluginAgents.js +197 -0
- package/dist/src/utils/plugins/loadPluginCommands.js +488 -0
- package/dist/src/utils/plugins/loadPluginHooks.js +170 -0
- package/dist/src/utils/plugins/loadPluginOutputStyles.js +98 -0
- package/dist/src/utils/plugins/lspPluginIntegration.js +216 -0
- package/dist/src/utils/plugins/lspRecommendation.js +193 -0
- package/dist/src/utils/plugins/managedPlugins.js +18 -0
- package/dist/src/utils/plugins/marketplaceHelpers.js +309 -0
- package/dist/src/utils/plugins/marketplaceManager.js +1225 -0
- package/dist/src/utils/plugins/mcpPluginIntegration.js +336 -0
- package/dist/src/utils/plugins/mcpbHandler.js +487 -0
- package/dist/src/utils/plugins/officialMarketplace.js +5 -0
- package/dist/src/utils/plugins/officialMarketplaceGcs.js +118 -0
- package/dist/src/utils/plugins/officialMarketplaceStartupCheck.js +267 -0
- package/dist/src/utils/plugins/orphanedPluginFilter.js +47 -0
- package/dist/src/utils/plugins/parseMarketplaceInput.js +75 -0
- package/dist/src/utils/plugins/performStartupChecks.js +34 -0
- package/dist/src/utils/plugins/pluginAutoupdate.js +130 -0
- package/dist/src/utils/plugins/pluginBlocklist.js +66 -0
- package/dist/src/utils/plugins/pluginDirectories.js +78 -0
- package/dist/src/utils/plugins/pluginFlagging.js +122 -0
- package/dist/src/utils/plugins/pluginIdentifier.js +37 -0
- package/dist/src/utils/plugins/pluginInstallationHelpers.js +281 -0
- package/dist/src/utils/plugins/pluginLoader.js +1596 -0
- package/dist/src/utils/plugins/pluginOptionsStorage.js +162 -0
- package/dist/src/utils/plugins/pluginPolicy.js +5 -0
- package/dist/src/utils/plugins/pluginStartupCheck.js +176 -0
- package/dist/src/utils/plugins/pluginVersioning.js +53 -0
- package/dist/src/utils/plugins/reconciler.js +133 -0
- package/dist/src/utils/plugins/refresh.js +96 -0
- package/dist/src/utils/plugins/schemas.js +411 -0
- package/dist/src/utils/plugins/validatePlugin.js +573 -0
- package/dist/src/utils/plugins/walkPluginMarkdown.js +30 -0
- package/dist/src/utils/plugins/zipCache.js +211 -0
- package/dist/src/utils/plugins/zipCacheAdapters.js +93 -0
- package/dist/src/utils/powershell/dangerousCmdlets.js +97 -0
- package/dist/src/utils/powershell/parser.js +929 -0
- package/dist/src/utils/powershell/staticPrefix.js +142 -0
- package/dist/src/utils/preflightChecks.js +196 -0
- package/dist/src/utils/privacyLevel.js +21 -0
- package/dist/src/utils/process.js +42 -0
- package/dist/src/utils/processUserInput/processBashCommand.js +109 -0
- package/dist/src/utils/processUserInput/processSlashCommand.js +600 -0
- package/dist/src/utils/processUserInput/processTextPrompt.js +54 -0
- package/dist/src/utils/processUserInput/processUserInput.js +272 -0
- package/dist/src/utils/profilerBase.js +15 -0
- package/dist/src/utils/promptCategory.js +21 -0
- package/dist/src/utils/promptEditor.js +115 -0
- package/dist/src/utils/promptShellExecution.js +76 -0
- package/dist/src/utils/proxy.js +228 -0
- package/dist/src/utils/queryContext.js +83 -0
- package/dist/src/utils/queryHelpers.js +329 -0
- package/dist/src/utils/queryProfiler.js +177 -0
- package/dist/src/utils/queueProcessor.js +41 -0
- package/dist/src/utils/readEditContext.js +131 -0
- package/dist/src/utils/readFileInRange.js +212 -0
- package/dist/src/utils/releaseNotes.js +186 -0
- package/dist/src/utils/renderOptions.js +45 -0
- package/dist/src/utils/ripgrep.js +383 -0
- package/dist/src/utils/sandbox/sandbox-adapter.js +505 -0
- package/dist/src/utils/sandbox/sandbox-ui-utils.js +3 -0
- package/dist/src/utils/sanitization.js +33 -0
- package/dist/src/utils/screenshotClipboard.js +73 -0
- package/dist/src/utils/sdkEventQueue.js +36 -0
- package/dist/src/utils/secureStorage/fallbackStorage.js +45 -0
- package/dist/src/utils/secureStorage/index.js +9 -0
- package/dist/src/utils/secureStorage/keychainPrefetch.js +43 -0
- package/dist/src/utils/secureStorage/macOsKeychainHelpers.js +42 -0
- package/dist/src/utils/secureStorage/macOsKeychainStorage.js +147 -0
- package/dist/src/utils/secureStorage/plainTextStorage.js +77 -0
- package/dist/src/utils/semanticBoolean.js +4 -0
- package/dist/src/utils/semanticNumber.js +11 -0
- package/dist/src/utils/semver.js +43 -0
- package/dist/src/utils/sequential.js +30 -0
- package/dist/src/utils/sessionActivity.js +95 -0
- package/dist/src/utils/sessionEnvVars.js +13 -0
- package/dist/src/utils/sessionEnvironment.js +113 -0
- package/dist/src/utils/sessionFileAccessHooks.js +150 -0
- package/dist/src/utils/sessionIngressAuth.js +79 -0
- package/dist/src/utils/sessionRestore.js +205 -0
- package/dist/src/utils/sessionStart.js +119 -0
- package/dist/src/utils/sessionState.js +48 -0
- package/dist/src/utils/sessionStorage.js +2891 -0
- package/dist/src/utils/sessionStoragePortable.js +486 -0
- package/dist/src/utils/sessionTitle.js +89 -0
- package/dist/src/utils/sessionUrl.js +33 -0
- package/dist/src/utils/set.js +38 -0
- package/dist/src/utils/settings/allErrors.js +11 -0
- package/dist/src/utils/settings/applySettingsChange.js +40 -0
- package/dist/src/utils/settings/changeDetector.js +279 -0
- package/dist/src/utils/settings/constants.js +119 -0
- package/dist/src/utils/settings/internalWrites.js +15 -0
- package/dist/src/utils/settings/managedPath.js +19 -0
- package/dist/src/utils/settings/mdm/constants.js +33 -0
- package/dist/src/utils/settings/mdm/rawRead.js +72 -0
- package/dist/src/utils/settings/mdm/settings.js +160 -0
- package/dist/src/utils/settings/permissionValidation.js +169 -0
- package/dist/src/utils/settings/pluginOnlyPolicy.js +19 -0
- package/dist/src/utils/settings/schemaOutput.js +7 -0
- package/dist/src/utils/settings/settings.js +530 -0
- package/dist/src/utils/settings/settingsCache.js +36 -0
- package/dist/src/utils/settings/toolValidationConfig.js +58 -0
- package/dist/src/utils/settings/types.js +224 -0
- package/dist/src/utils/settings/validateEditTool.js +26 -0
- package/dist/src/utils/settings/validation.js +160 -0
- package/dist/src/utils/settings/validationTips.js +94 -0
- package/dist/src/utils/shell/bashProvider.js +123 -0
- package/dist/src/utils/shell/outputLimits.js +7 -0
- package/dist/src/utils/shell/powershellDetection.js +50 -0
- package/dist/src/utils/shell/powershellProvider.js +50 -0
- package/dist/src/utils/shell/prefix.js +183 -0
- package/dist/src/utils/shell/readOnlyCommandValidation.js +1347 -0
- package/dist/src/utils/shell/resolveDefaultShell.js +4 -0
- package/dist/src/utils/shell/shellProvider.js +2 -0
- package/dist/src/utils/shell/shellToolUtils.js +10 -0
- package/dist/src/utils/shell/specPrefix.js +152 -0
- package/dist/src/utils/shellConfig.js +88 -0
- package/dist/src/utils/sideQuery.js +108 -0
- package/dist/src/utils/sideQuestion.js +78 -0
- package/dist/src/utils/signal.js +18 -0
- package/dist/src/utils/sinks.js +6 -0
- package/dist/src/utils/skills/skillChangeDetector.js +184 -0
- package/dist/src/utils/slashCommandParsing.js +25 -0
- package/dist/src/utils/sleep.js +43 -0
- package/dist/src/utils/sliceAnsi.js +48 -0
- package/dist/src/utils/slowOperations.js +165 -0
- package/dist/src/utils/standaloneAgent.js +7 -0
- package/dist/src/utils/startupProfiler.js +106 -0
- package/dist/src/utils/staticRender.js +78 -0
- package/dist/src/utils/stats.js +598 -0
- package/dist/src/utils/statsCache.js +223 -0
- package/dist/src/utils/status.js +361 -0
- package/dist/src/utils/statusNoticeDefinitions.js +280 -0
- package/dist/src/utils/statusNoticeHelpers.js +10 -0
- package/dist/src/utils/stream.js +72 -0
- package/dist/src/utils/streamJsonStdoutGuard.js +73 -0
- package/dist/src/utils/streamlinedTransform.js +130 -0
- package/dist/src/utils/stringUtils.js +108 -0
- package/dist/src/utils/subprocessEnv.js +42 -0
- package/dist/src/utils/suggestions/commandSuggestions.js +301 -0
- package/dist/src/utils/suggestions/directoryCompletion.js +134 -0
- package/dist/src/utils/suggestions/shellHistoryCompletion.js +65 -0
- package/dist/src/utils/suggestions/skillUsageTracking.js +33 -0
- package/dist/src/utils/suggestions/slackChannelSuggestions.js +141 -0
- package/dist/src/utils/swarm/It2SetupPrompt.js +537 -0
- package/dist/src/utils/swarm/backends/ITermBackend.js +153 -0
- package/dist/src/utils/swarm/backends/InProcessBackend.js +160 -0
- package/dist/src/utils/swarm/backends/PaneBackendExecutor.js +171 -0
- package/dist/src/utils/swarm/backends/TmuxBackend.js +458 -0
- package/dist/src/utils/swarm/backends/detection.js +43 -0
- package/dist/src/utils/swarm/backends/it2Setup.js +134 -0
- package/dist/src/utils/swarm/backends/registry.js +220 -0
- package/dist/src/utils/swarm/backends/teammateModeSnapshot.js +33 -0
- package/dist/src/utils/swarm/backends/types.js +3 -0
- package/dist/src/utils/swarm/constants.js +11 -0
- package/dist/src/utils/swarm/inProcessRunner.js +818 -0
- package/dist/src/utils/swarm/leaderPermissionBridge.js +20 -0
- package/dist/src/utils/swarm/permissionSync.js +474 -0
- package/dist/src/utils/swarm/reconnection.js +55 -0
- package/dist/src/utils/swarm/spawnInProcess.js +164 -0
- package/dist/src/utils/swarm/spawnUtils.js +76 -0
- package/dist/src/utils/swarm/teamHelpers.js +320 -0
- package/dist/src/utils/swarm/teammateInit.js +65 -0
- package/dist/src/utils/swarm/teammateLayoutManager.js +40 -0
- package/dist/src/utils/swarm/teammateModel.js +5 -0
- package/dist/src/utils/swarm/teammatePromptAddendum.js +11 -0
- package/dist/src/utils/systemDirectories.js +42 -0
- package/dist/src/utils/systemPrompt.js +41 -0
- package/dist/src/utils/systemPromptType.js +3 -0
- package/dist/src/utils/systemTheme.js +61 -0
- package/dist/src/utils/taggedId.js +27 -0
- package/dist/src/utils/task/TaskOutput.js +244 -0
- package/dist/src/utils/task/diskOutput.js +267 -0
- package/dist/src/utils/task/framework.js +178 -0
- package/dist/src/utils/task/outputFormatting.js +21 -0
- package/dist/src/utils/task/sdkProgress.js +18 -0
- package/dist/src/utils/tasks.js +481 -0
- package/dist/src/utils/teamDiscovery.js +33 -0
- package/dist/src/utils/teamMemoryOps.js +40 -0
- package/dist/src/utils/teammate.js +132 -0
- package/dist/src/utils/teammateContext.js +17 -0
- package/dist/src/utils/teammateMailbox.js +541 -0
- package/dist/src/utils/telemetry/betaSessionTracing.js +255 -0
- package/dist/src/utils/telemetry/bigqueryExporter.js +162 -0
- package/dist/src/utils/telemetry/events.js +46 -0
- package/dist/src/utils/telemetry/instrumentation.js +534 -0
- package/dist/src/utils/telemetry/logger.js +26 -0
- package/dist/src/utils/telemetry/perfettoTracing.js +636 -0
- package/dist/src/utils/telemetry/pluginTelemetry.js +99 -0
- package/dist/src/utils/telemetry/sessionTracing.js +564 -0
- package/dist/src/utils/telemetry/skillLoadedEvent.js +22 -0
- package/dist/src/utils/telemetryAttributes.js +50 -0
- package/dist/src/utils/teleport/api.js +236 -0
- package/dist/src/utils/teleport/environmentSelection.js +42 -0
- package/dist/src/utils/teleport/environments.js +74 -0
- package/dist/src/utils/teleport/gitBundle.js +153 -0
- package/dist/src/utils/teleport.js +856 -0
- package/dist/src/utils/tempfile.js +7 -0
- package/dist/src/utils/terminal.js +65 -0
- package/dist/src/utils/terminalPanel.js +133 -0
- package/dist/src/utils/textHighlighting.js +109 -0
- package/dist/src/utils/theme.js +465 -0
- package/dist/src/utils/thinking.js +92 -0
- package/dist/src/utils/timeouts.js +22 -0
- package/dist/src/utils/tmuxSocket.js +216 -0
- package/dist/src/utils/todo/types.js +9 -0
- package/dist/src/utils/tokenBudget.js +54 -0
- package/dist/src/utils/tokens.js +123 -0
- package/dist/src/utils/toolErrors.js +87 -0
- package/dist/src/utils/toolPool.js +22 -0
- package/dist/src/utils/toolResultStorage.js +444 -0
- package/dist/src/utils/toolSchemaCache.js +7 -0
- package/dist/src/utils/toolSearch.js +314 -0
- package/dist/src/utils/transcriptSearch.js +143 -0
- package/dist/src/utils/treeify.js +89 -0
- package/dist/src/utils/truncate.js +113 -0
- package/dist/src/utils/ultraplan/ccrSession.js +187 -0
- package/dist/src/utils/ultraplan/keyword.js +81 -0
- package/dist/src/utils/ultraplan/prompt.txt.js +1 -0
- package/dist/src/utils/unaryLogging.js +15 -0
- package/dist/src/utils/undercover.js +57 -0
- package/dist/src/utils/user.js +111 -0
- package/dist/src/utils/userAgent.js +3 -0
- package/dist/src/utils/userPromptKeywords.js +13 -0
- package/dist/src/utils/uuid.js +11 -0
- package/dist/src/utils/warningHandler.js +74 -0
- package/dist/src/utils/which.js +50 -0
- package/dist/src/utils/windowsPaths.js +104 -0
- package/dist/src/utils/withResolvers.js +9 -0
- package/dist/src/utils/words.js +763 -0
- package/dist/src/utils/workloadContext.js +9 -0
- package/dist/src/utils/worktree.js +841 -0
- package/dist/src/utils/worktreeModeEnabled.js +3 -0
- package/dist/src/utils/xdg.js +24 -0
- package/dist/src/utils/xml.js +6 -0
- package/dist/src/utils/yaml.js +6 -0
- package/dist/src/utils/zodToJsonSchema.js +10 -0
- package/dist/src/vim/motions.js +54 -0
- package/dist/src/vim/operators.js +329 -0
- package/dist/src/vim/textObjects.js +137 -0
- package/dist/src/vim/transitions.js +324 -0
- package/dist/src/vim/types.js +60 -0
- package/dist/src/voice/voiceModeEnabled.js +18 -0
- package/dist/stubs/ant-claude-for-chrome-mcp.js +6 -0
- package/dist/stubs/color-diff-napi.js +30 -0
- package/litellm.yaml +25 -0
- package/package.json +93 -0
|
@@ -0,0 +1,2230 @@
|
|
|
1
|
+
import figures from "figures";
|
|
2
|
+
import * as fs from "fs/promises";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
import { ConfigurableShortcutHint } from "../../components/ConfigurableShortcutHint.js";
|
|
7
|
+
import { Byline } from "../../components/design-system/Byline.js";
|
|
8
|
+
import { MCPRemoteServerMenu } from "../../components/mcp/MCPRemoteServerMenu.js";
|
|
9
|
+
import { MCPStdioServerMenu } from "../../components/mcp/MCPStdioServerMenu.js";
|
|
10
|
+
import { MCPToolDetailView } from "../../components/mcp/MCPToolDetailView.js";
|
|
11
|
+
import { MCPToolListView } from "../../components/mcp/MCPToolListView.js";
|
|
12
|
+
import { SearchBox } from "../../components/SearchBox.js";
|
|
13
|
+
import { useSearchInput } from "../../hooks/useSearchInput.js";
|
|
14
|
+
import { useTerminalSize } from "../../hooks/useTerminalSize.js";
|
|
15
|
+
import { Box, Text, useInput, useTerminalFocus } from "../../ink.js";
|
|
16
|
+
import { useKeybinding, useKeybindings } from "../../keybindings/useKeybinding.js";
|
|
17
|
+
import { getBuiltinPluginDefinition } from "../../plugins/builtinPlugins.js";
|
|
18
|
+
import { useMcpToggleEnabled } from "../../services/mcp/MCPConnectionManager.js";
|
|
19
|
+
import { filterToolsByServer } from "../../services/mcp/utils.js";
|
|
20
|
+
import { disablePluginOp, enablePluginOp, getPluginInstallationFromV2, isInstallableScope, isPluginEnabledAtProjectScope, uninstallPluginOp, updatePluginOp } from "../../services/plugins/pluginOperations.js";
|
|
21
|
+
import { useAppState } from "../../state/AppState.js";
|
|
22
|
+
import { count } from "../../utils/array.js";
|
|
23
|
+
import { openBrowser } from "../../utils/browser.js";
|
|
24
|
+
import { logForDebugging } from "../../utils/debug.js";
|
|
25
|
+
import { errorMessage, toError } from "../../utils/errors.js";
|
|
26
|
+
import { logError } from "../../utils/log.js";
|
|
27
|
+
import { clearAllCaches } from "../../utils/plugins/cacheUtils.js";
|
|
28
|
+
import { loadInstalledPluginsV2 } from "../../utils/plugins/installedPluginsManager.js";
|
|
29
|
+
import { getMarketplace } from "../../utils/plugins/marketplaceManager.js";
|
|
30
|
+
import { isMcpbSource, loadMcpbFile } from "../../utils/plugins/mcpbHandler.js";
|
|
31
|
+
import { getPluginDataDirSize, pluginDataDirPath } from "../../utils/plugins/pluginDirectories.js";
|
|
32
|
+
import { getFlaggedPlugins, markFlaggedPluginsSeen, removeFlaggedPlugin } from "../../utils/plugins/pluginFlagging.js";
|
|
33
|
+
import { parsePluginIdentifier } from "../../utils/plugins/pluginIdentifier.js";
|
|
34
|
+
import { loadAllPlugins } from "../../utils/plugins/pluginLoader.js";
|
|
35
|
+
import { loadPluginOptions, savePluginOptions } from "../../utils/plugins/pluginOptionsStorage.js";
|
|
36
|
+
import { isPluginBlockedByPolicy } from "../../utils/plugins/pluginPolicy.js";
|
|
37
|
+
import { getPluginEditableScopes } from "../../utils/plugins/pluginStartupCheck.js";
|
|
38
|
+
import { getSettings_DEPRECATED, getSettingsForSource, updateSettingsForSource } from "../../utils/settings/settings.js";
|
|
39
|
+
import { jsonParse } from "../../utils/slowOperations.js";
|
|
40
|
+
import { plural } from "../../utils/stringUtils.js";
|
|
41
|
+
import { formatErrorMessage, getErrorGuidance } from "./PluginErrors.js";
|
|
42
|
+
import { PluginOptionsDialog } from "./PluginOptionsDialog.js";
|
|
43
|
+
import { PluginOptionsFlow } from "./PluginOptionsFlow.js";
|
|
44
|
+
import { UnifiedInstalledCell } from "./UnifiedInstalledCell.js";
|
|
45
|
+
import { usePagination } from "./usePagination.js";
|
|
46
|
+
async function getBaseFileNames(dirPath) {
|
|
47
|
+
try {
|
|
48
|
+
const entries = await fs.readdir(dirPath, {
|
|
49
|
+
withFileTypes: true
|
|
50
|
+
});
|
|
51
|
+
return entries.filter((entry) => entry.isFile() && entry.name.endsWith(".md")).map((entry) => {
|
|
52
|
+
const baseName = path.basename(entry.name, ".md");
|
|
53
|
+
return baseName;
|
|
54
|
+
});
|
|
55
|
+
} catch (error) {
|
|
56
|
+
const errorMsg = errorMessage(error);
|
|
57
|
+
logForDebugging(`Failed to read plugin components from ${dirPath}: ${errorMsg}`, {
|
|
58
|
+
level: "error"
|
|
59
|
+
});
|
|
60
|
+
logError(toError(error));
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function getSkillDirNames(dirPath) {
|
|
65
|
+
try {
|
|
66
|
+
const entries = await fs.readdir(dirPath, {
|
|
67
|
+
withFileTypes: true
|
|
68
|
+
});
|
|
69
|
+
const skillNames = [];
|
|
70
|
+
for (const entry of entries) {
|
|
71
|
+
if (entry.isDirectory() || entry.isSymbolicLink()) {
|
|
72
|
+
const skillFilePath = path.join(dirPath, entry.name, "SKILL.md");
|
|
73
|
+
try {
|
|
74
|
+
const st = await fs.stat(skillFilePath);
|
|
75
|
+
if (st.isFile()) {
|
|
76
|
+
skillNames.push(entry.name);
|
|
77
|
+
}
|
|
78
|
+
} catch {}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return skillNames;
|
|
82
|
+
} catch (error) {
|
|
83
|
+
const errorMsg = errorMessage(error);
|
|
84
|
+
logForDebugging(`Failed to read skill directories from ${dirPath}: ${errorMsg}`, {
|
|
85
|
+
level: "error"
|
|
86
|
+
});
|
|
87
|
+
logError(toError(error));
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function PluginComponentsDisplay({
|
|
92
|
+
plugin,
|
|
93
|
+
marketplace
|
|
94
|
+
}) {
|
|
95
|
+
const [components, setComponents] = useState(null);
|
|
96
|
+
const [loading, setLoading] = useState(true);
|
|
97
|
+
const [error, setError] = useState(null);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
async function loadComponents() {
|
|
100
|
+
try {
|
|
101
|
+
if (marketplace === "builtin") {
|
|
102
|
+
const builtinDef = getBuiltinPluginDefinition(plugin.name);
|
|
103
|
+
if (builtinDef) {
|
|
104
|
+
const skillNames = builtinDef.skills?.map((s) => s.name) ?? [];
|
|
105
|
+
const hookEvents = builtinDef.hooks ? Object.keys(builtinDef.hooks) : [];
|
|
106
|
+
const mcpServerNames = builtinDef.mcpServers ? Object.keys(builtinDef.mcpServers) : [];
|
|
107
|
+
setComponents({
|
|
108
|
+
commands: null,
|
|
109
|
+
agents: null,
|
|
110
|
+
skills: skillNames.length > 0 ? skillNames : null,
|
|
111
|
+
hooks: hookEvents.length > 0 ? hookEvents : null,
|
|
112
|
+
mcpServers: mcpServerNames.length > 0 ? mcpServerNames : null
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
setError(`Built-in plugin ${plugin.name} not found`);
|
|
116
|
+
}
|
|
117
|
+
setLoading(false);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const marketplaceData = await getMarketplace(marketplace);
|
|
121
|
+
const pluginEntry = marketplaceData.plugins.find((p) => p.name === plugin.name);
|
|
122
|
+
if (pluginEntry) {
|
|
123
|
+
const commandPathList = [];
|
|
124
|
+
if (plugin.commandsPath) {
|
|
125
|
+
commandPathList.push(plugin.commandsPath);
|
|
126
|
+
}
|
|
127
|
+
if (plugin.commandsPaths) {
|
|
128
|
+
commandPathList.push(...plugin.commandsPaths);
|
|
129
|
+
}
|
|
130
|
+
const commandList = [];
|
|
131
|
+
for (const commandPath of commandPathList) {
|
|
132
|
+
if (typeof commandPath === "string") {
|
|
133
|
+
const baseNames = await getBaseFileNames(commandPath);
|
|
134
|
+
commandList.push(...baseNames);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const agentPathList = [];
|
|
138
|
+
if (plugin.agentsPath) {
|
|
139
|
+
agentPathList.push(plugin.agentsPath);
|
|
140
|
+
}
|
|
141
|
+
if (plugin.agentsPaths) {
|
|
142
|
+
agentPathList.push(...plugin.agentsPaths);
|
|
143
|
+
}
|
|
144
|
+
const agentList = [];
|
|
145
|
+
for (const agentPath of agentPathList) {
|
|
146
|
+
if (typeof agentPath === "string") {
|
|
147
|
+
const baseNames_0 = await getBaseFileNames(agentPath);
|
|
148
|
+
agentList.push(...baseNames_0);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const skillPathList = [];
|
|
152
|
+
if (plugin.skillsPath) {
|
|
153
|
+
skillPathList.push(plugin.skillsPath);
|
|
154
|
+
}
|
|
155
|
+
if (plugin.skillsPaths) {
|
|
156
|
+
skillPathList.push(...plugin.skillsPaths);
|
|
157
|
+
}
|
|
158
|
+
const skillList = [];
|
|
159
|
+
for (const skillPath of skillPathList) {
|
|
160
|
+
if (typeof skillPath === "string") {
|
|
161
|
+
const skillDirNames = await getSkillDirNames(skillPath);
|
|
162
|
+
skillList.push(...skillDirNames);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const hooksList = [];
|
|
166
|
+
if (plugin.hooksConfig) {
|
|
167
|
+
hooksList.push(Object.keys(plugin.hooksConfig));
|
|
168
|
+
}
|
|
169
|
+
if (pluginEntry.hooks) {
|
|
170
|
+
hooksList.push(pluginEntry.hooks);
|
|
171
|
+
}
|
|
172
|
+
const mcpServersList = [];
|
|
173
|
+
if (plugin.mcpServers) {
|
|
174
|
+
mcpServersList.push(Object.keys(plugin.mcpServers));
|
|
175
|
+
}
|
|
176
|
+
if (pluginEntry.mcpServers) {
|
|
177
|
+
mcpServersList.push(pluginEntry.mcpServers);
|
|
178
|
+
}
|
|
179
|
+
setComponents({
|
|
180
|
+
commands: commandList.length > 0 ? commandList : null,
|
|
181
|
+
agents: agentList.length > 0 ? agentList : null,
|
|
182
|
+
skills: skillList.length > 0 ? skillList : null,
|
|
183
|
+
hooks: hooksList.length > 0 ? hooksList : null,
|
|
184
|
+
mcpServers: mcpServersList.length > 0 ? mcpServersList : null
|
|
185
|
+
});
|
|
186
|
+
} else {
|
|
187
|
+
setError(`Plugin ${plugin.name} not found in marketplace`);
|
|
188
|
+
}
|
|
189
|
+
} catch (err) {
|
|
190
|
+
setError(err instanceof Error ? err.message : "Failed to load components");
|
|
191
|
+
} finally {
|
|
192
|
+
setLoading(false);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
loadComponents();
|
|
196
|
+
}, [plugin.name, plugin.commandsPath, plugin.commandsPaths, plugin.agentsPath, plugin.agentsPaths, plugin.skillsPath, plugin.skillsPaths, plugin.hooksConfig, plugin.mcpServers, marketplace]);
|
|
197
|
+
if (loading) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
if (error) {
|
|
201
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
202
|
+
flexDirection: "column",
|
|
203
|
+
marginBottom: 1,
|
|
204
|
+
children: [
|
|
205
|
+
jsxDEV_7x81h0kn(Text, {
|
|
206
|
+
bold: true,
|
|
207
|
+
children: "Components:"
|
|
208
|
+
}, undefined, false, undefined, this),
|
|
209
|
+
jsxDEV_7x81h0kn(Text, {
|
|
210
|
+
dimColor: true,
|
|
211
|
+
children: [
|
|
212
|
+
"Error: ",
|
|
213
|
+
error
|
|
214
|
+
]
|
|
215
|
+
}, undefined, true, undefined, this)
|
|
216
|
+
]
|
|
217
|
+
}, undefined, true, undefined, this);
|
|
218
|
+
}
|
|
219
|
+
if (!components) {
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
const hasComponents = components.commands || components.agents || components.skills || components.hooks || components.mcpServers;
|
|
223
|
+
if (!hasComponents) {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
227
|
+
flexDirection: "column",
|
|
228
|
+
marginBottom: 1,
|
|
229
|
+
children: [
|
|
230
|
+
jsxDEV_7x81h0kn(Text, {
|
|
231
|
+
bold: true,
|
|
232
|
+
children: "Installed components:"
|
|
233
|
+
}, undefined, false, undefined, this),
|
|
234
|
+
components.commands ? jsxDEV_7x81h0kn(Text, {
|
|
235
|
+
dimColor: true,
|
|
236
|
+
children: [
|
|
237
|
+
"• Commands:",
|
|
238
|
+
" ",
|
|
239
|
+
typeof components.commands === "string" ? components.commands : Array.isArray(components.commands) ? components.commands.join(", ") : Object.keys(components.commands).join(", ")
|
|
240
|
+
]
|
|
241
|
+
}, undefined, true, undefined, this) : null,
|
|
242
|
+
components.agents ? jsxDEV_7x81h0kn(Text, {
|
|
243
|
+
dimColor: true,
|
|
244
|
+
children: [
|
|
245
|
+
"• Agents:",
|
|
246
|
+
" ",
|
|
247
|
+
typeof components.agents === "string" ? components.agents : Array.isArray(components.agents) ? components.agents.join(", ") : Object.keys(components.agents).join(", ")
|
|
248
|
+
]
|
|
249
|
+
}, undefined, true, undefined, this) : null,
|
|
250
|
+
components.skills ? jsxDEV_7x81h0kn(Text, {
|
|
251
|
+
dimColor: true,
|
|
252
|
+
children: [
|
|
253
|
+
"• Skills:",
|
|
254
|
+
" ",
|
|
255
|
+
typeof components.skills === "string" ? components.skills : Array.isArray(components.skills) ? components.skills.join(", ") : Object.keys(components.skills).join(", ")
|
|
256
|
+
]
|
|
257
|
+
}, undefined, true, undefined, this) : null,
|
|
258
|
+
components.hooks ? jsxDEV_7x81h0kn(Text, {
|
|
259
|
+
dimColor: true,
|
|
260
|
+
children: [
|
|
261
|
+
"• Hooks:",
|
|
262
|
+
" ",
|
|
263
|
+
typeof components.hooks === "string" ? components.hooks : Array.isArray(components.hooks) ? components.hooks.map(String).join(", ") : typeof components.hooks === "object" && components.hooks !== null ? Object.keys(components.hooks).join(", ") : String(components.hooks)
|
|
264
|
+
]
|
|
265
|
+
}, undefined, true, undefined, this) : null,
|
|
266
|
+
components.mcpServers ? jsxDEV_7x81h0kn(Text, {
|
|
267
|
+
dimColor: true,
|
|
268
|
+
children: [
|
|
269
|
+
"• MCP Servers:",
|
|
270
|
+
" ",
|
|
271
|
+
typeof components.mcpServers === "string" ? components.mcpServers : Array.isArray(components.mcpServers) ? components.mcpServers.map(String).join(", ") : typeof components.mcpServers === "object" && components.mcpServers !== null ? Object.keys(components.mcpServers).join(", ") : String(components.mcpServers)
|
|
272
|
+
]
|
|
273
|
+
}, undefined, true, undefined, this) : null
|
|
274
|
+
]
|
|
275
|
+
}, undefined, true, undefined, this);
|
|
276
|
+
}
|
|
277
|
+
async function checkIfLocalPlugin(pluginName, marketplaceName) {
|
|
278
|
+
const marketplace = await getMarketplace(marketplaceName);
|
|
279
|
+
const entry = marketplace?.plugins.find((p) => p.name === pluginName);
|
|
280
|
+
if (entry && typeof entry.source === "string") {
|
|
281
|
+
return `Local plugins cannot be updated remotely. To update, modify the source at: ${entry.source}`;
|
|
282
|
+
}
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
export function filterManagedDisabledPlugins(plugins) {
|
|
286
|
+
return plugins.filter((plugin) => {
|
|
287
|
+
const marketplace = plugin.source.split("@")[1] || "local";
|
|
288
|
+
return !isPluginBlockedByPolicy(`${plugin.name}@${marketplace}`);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
export function ManagePlugins({
|
|
292
|
+
setViewState: setParentViewState,
|
|
293
|
+
setResult,
|
|
294
|
+
onManageComplete,
|
|
295
|
+
onSearchModeChange,
|
|
296
|
+
targetPlugin,
|
|
297
|
+
targetMarketplace,
|
|
298
|
+
action
|
|
299
|
+
}) {
|
|
300
|
+
const mcpClients = useAppState((s) => s.mcp.clients);
|
|
301
|
+
const mcpTools = useAppState((s_0) => s_0.mcp.tools);
|
|
302
|
+
const pluginErrors = useAppState((s_1) => s_1.plugins.errors);
|
|
303
|
+
const flaggedPlugins = getFlaggedPlugins();
|
|
304
|
+
const [isSearchMode, setIsSearchModeRaw] = useState(false);
|
|
305
|
+
const setIsSearchMode = useCallback((active) => {
|
|
306
|
+
setIsSearchModeRaw(active);
|
|
307
|
+
onSearchModeChange?.(active);
|
|
308
|
+
}, [onSearchModeChange]);
|
|
309
|
+
const isTerminalFocused = useTerminalFocus();
|
|
310
|
+
const {
|
|
311
|
+
columns: terminalWidth
|
|
312
|
+
} = useTerminalSize();
|
|
313
|
+
const [viewState, setViewState] = useState("plugin-list");
|
|
314
|
+
const {
|
|
315
|
+
query: searchQuery,
|
|
316
|
+
setQuery: setSearchQuery,
|
|
317
|
+
cursorOffset: searchCursorOffset
|
|
318
|
+
} = useSearchInput({
|
|
319
|
+
isActive: viewState === "plugin-list" && isSearchMode,
|
|
320
|
+
onExit: () => {
|
|
321
|
+
setIsSearchMode(false);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
const [selectedPlugin, setSelectedPlugin] = useState(null);
|
|
325
|
+
const [marketplaces, setMarketplaces] = useState([]);
|
|
326
|
+
const [pluginStates, setPluginStates] = useState([]);
|
|
327
|
+
const [loading, setLoading] = useState(true);
|
|
328
|
+
const [pendingToggles, setPendingToggles] = useState(new Map);
|
|
329
|
+
const hasAutoNavigated = useRef(false);
|
|
330
|
+
const pendingAutoActionRef = useRef(undefined);
|
|
331
|
+
const toggleMcpServer = useMcpToggleEnabled();
|
|
332
|
+
const handleBack = React.useCallback(() => {
|
|
333
|
+
if (viewState === "plugin-details") {
|
|
334
|
+
setViewState("plugin-list");
|
|
335
|
+
setSelectedPlugin(null);
|
|
336
|
+
setProcessError(null);
|
|
337
|
+
} else if (typeof viewState === "object" && viewState.type === "failed-plugin-details") {
|
|
338
|
+
setViewState("plugin-list");
|
|
339
|
+
setProcessError(null);
|
|
340
|
+
} else if (viewState === "configuring") {
|
|
341
|
+
setViewState("plugin-details");
|
|
342
|
+
setConfigNeeded(null);
|
|
343
|
+
} else if (typeof viewState === "object" && (viewState.type === "plugin-options" || viewState.type === "configuring-options")) {
|
|
344
|
+
setViewState("plugin-list");
|
|
345
|
+
setSelectedPlugin(null);
|
|
346
|
+
setResult("Plugin enabled. Configuration skipped — run /reload-plugins to apply.");
|
|
347
|
+
if (onManageComplete) {
|
|
348
|
+
onManageComplete();
|
|
349
|
+
}
|
|
350
|
+
} else if (typeof viewState === "object" && viewState.type === "flagged-detail") {
|
|
351
|
+
setViewState("plugin-list");
|
|
352
|
+
setProcessError(null);
|
|
353
|
+
} else if (typeof viewState === "object" && viewState.type === "mcp-detail") {
|
|
354
|
+
setViewState("plugin-list");
|
|
355
|
+
setProcessError(null);
|
|
356
|
+
} else if (typeof viewState === "object" && viewState.type === "mcp-tools") {
|
|
357
|
+
setViewState({
|
|
358
|
+
type: "mcp-detail",
|
|
359
|
+
client: viewState.client
|
|
360
|
+
});
|
|
361
|
+
} else if (typeof viewState === "object" && viewState.type === "mcp-tool-detail") {
|
|
362
|
+
setViewState({
|
|
363
|
+
type: "mcp-tools",
|
|
364
|
+
client: viewState.client
|
|
365
|
+
});
|
|
366
|
+
} else {
|
|
367
|
+
if (pendingToggles.size > 0) {
|
|
368
|
+
setResult("Run /reload-plugins to apply plugin changes.");
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
setParentViewState({
|
|
372
|
+
type: "menu"
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}, [viewState, setParentViewState, pendingToggles, setResult]);
|
|
376
|
+
useKeybinding("confirm:no", handleBack, {
|
|
377
|
+
context: "Confirmation",
|
|
378
|
+
isActive: (viewState !== "plugin-list" || !isSearchMode) && viewState !== "confirm-project-uninstall" && !(typeof viewState === "object" && viewState.type === "confirm-data-cleanup")
|
|
379
|
+
});
|
|
380
|
+
const getMcpStatus = (client) => {
|
|
381
|
+
if (client.type === "connected")
|
|
382
|
+
return "connected";
|
|
383
|
+
if (client.type === "disabled")
|
|
384
|
+
return "disabled";
|
|
385
|
+
if (client.type === "pending")
|
|
386
|
+
return "pending";
|
|
387
|
+
if (client.type === "needs-auth")
|
|
388
|
+
return "needs-auth";
|
|
389
|
+
return "failed";
|
|
390
|
+
};
|
|
391
|
+
const unifiedItems = useMemo(() => {
|
|
392
|
+
const mergedSettings = getSettings_DEPRECATED();
|
|
393
|
+
const pluginMcpMap = new Map;
|
|
394
|
+
for (const client_0 of mcpClients) {
|
|
395
|
+
if (client_0.name.startsWith("plugin:")) {
|
|
396
|
+
const parts = client_0.name.split(":");
|
|
397
|
+
if (parts.length >= 3) {
|
|
398
|
+
const pluginName = parts[1];
|
|
399
|
+
const serverName = parts.slice(2).join(":");
|
|
400
|
+
const existing = pluginMcpMap.get(pluginName) || [];
|
|
401
|
+
existing.push({
|
|
402
|
+
displayName: serverName,
|
|
403
|
+
client: client_0
|
|
404
|
+
});
|
|
405
|
+
pluginMcpMap.set(pluginName, existing);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
const pluginsWithChildren = [];
|
|
410
|
+
for (const state of pluginStates) {
|
|
411
|
+
const pluginId = `${state.plugin.name}@${state.marketplace}`;
|
|
412
|
+
const isEnabled = mergedSettings?.enabledPlugins?.[pluginId] !== false;
|
|
413
|
+
const errors = pluginErrors.filter((e) => ("plugin" in e) && e.plugin === state.plugin.name || e.source === pluginId || e.source.startsWith(`${state.plugin.name}@`));
|
|
414
|
+
const originalScope = state.plugin.isBuiltin ? "builtin" : state.scope || "user";
|
|
415
|
+
pluginsWithChildren.push({
|
|
416
|
+
item: {
|
|
417
|
+
type: "plugin",
|
|
418
|
+
id: pluginId,
|
|
419
|
+
name: state.plugin.name,
|
|
420
|
+
description: state.plugin.manifest.description,
|
|
421
|
+
marketplace: state.marketplace,
|
|
422
|
+
scope: originalScope,
|
|
423
|
+
isEnabled,
|
|
424
|
+
errorCount: errors.length,
|
|
425
|
+
errors,
|
|
426
|
+
plugin: state.plugin,
|
|
427
|
+
pendingEnable: state.pendingEnable,
|
|
428
|
+
pendingUpdate: state.pendingUpdate,
|
|
429
|
+
pendingToggle: pendingToggles.get(pluginId)
|
|
430
|
+
},
|
|
431
|
+
originalScope,
|
|
432
|
+
childMcps: pluginMcpMap.get(state.plugin.name) || []
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
const matchedPluginIds = new Set(pluginsWithChildren.map(({
|
|
436
|
+
item
|
|
437
|
+
}) => item.id));
|
|
438
|
+
const matchedPluginNames = new Set(pluginsWithChildren.map(({
|
|
439
|
+
item: item_0
|
|
440
|
+
}) => item_0.name));
|
|
441
|
+
const orphanErrorsBySource = new Map;
|
|
442
|
+
for (const error of pluginErrors) {
|
|
443
|
+
if (matchedPluginIds.has(error.source) || "plugin" in error && typeof error.plugin === "string" && matchedPluginNames.has(error.plugin)) {
|
|
444
|
+
continue;
|
|
445
|
+
}
|
|
446
|
+
const existing_0 = orphanErrorsBySource.get(error.source) || [];
|
|
447
|
+
existing_0.push(error);
|
|
448
|
+
orphanErrorsBySource.set(error.source, existing_0);
|
|
449
|
+
}
|
|
450
|
+
const pluginScopes = getPluginEditableScopes();
|
|
451
|
+
const failedPluginItems = [];
|
|
452
|
+
for (const [pluginId_0, errors_0] of orphanErrorsBySource) {
|
|
453
|
+
if (pluginId_0 in flaggedPlugins)
|
|
454
|
+
continue;
|
|
455
|
+
const parsed = parsePluginIdentifier(pluginId_0);
|
|
456
|
+
const pluginName_0 = parsed.name || pluginId_0;
|
|
457
|
+
const marketplace = parsed.marketplace || "unknown";
|
|
458
|
+
const rawScope = pluginScopes.get(pluginId_0);
|
|
459
|
+
const scope = rawScope === "flag" || rawScope === undefined ? "user" : rawScope;
|
|
460
|
+
failedPluginItems.push({
|
|
461
|
+
type: "failed-plugin",
|
|
462
|
+
id: pluginId_0,
|
|
463
|
+
name: pluginName_0,
|
|
464
|
+
marketplace,
|
|
465
|
+
scope,
|
|
466
|
+
errorCount: errors_0.length,
|
|
467
|
+
errors: errors_0
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
const standaloneMcps = [];
|
|
471
|
+
for (const client_1 of mcpClients) {
|
|
472
|
+
if (client_1.name === "ide")
|
|
473
|
+
continue;
|
|
474
|
+
if (client_1.name.startsWith("plugin:"))
|
|
475
|
+
continue;
|
|
476
|
+
standaloneMcps.push({
|
|
477
|
+
type: "mcp",
|
|
478
|
+
id: `mcp:${client_1.name}`,
|
|
479
|
+
name: client_1.name,
|
|
480
|
+
description: undefined,
|
|
481
|
+
scope: client_1.config.scope,
|
|
482
|
+
status: getMcpStatus(client_1),
|
|
483
|
+
client: client_1
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
const scopeOrder = {
|
|
487
|
+
flagged: -1,
|
|
488
|
+
project: 0,
|
|
489
|
+
local: 1,
|
|
490
|
+
user: 2,
|
|
491
|
+
enterprise: 3,
|
|
492
|
+
managed: 4,
|
|
493
|
+
dynamic: 5,
|
|
494
|
+
builtin: 6
|
|
495
|
+
};
|
|
496
|
+
const unified = [];
|
|
497
|
+
const itemsByScope = new Map;
|
|
498
|
+
for (const {
|
|
499
|
+
item: item_1,
|
|
500
|
+
originalScope: originalScope_0,
|
|
501
|
+
childMcps
|
|
502
|
+
} of pluginsWithChildren) {
|
|
503
|
+
const scope_0 = item_1.scope;
|
|
504
|
+
if (!itemsByScope.has(scope_0)) {
|
|
505
|
+
itemsByScope.set(scope_0, []);
|
|
506
|
+
}
|
|
507
|
+
itemsByScope.get(scope_0).push(item_1);
|
|
508
|
+
for (const {
|
|
509
|
+
displayName,
|
|
510
|
+
client: client_2
|
|
511
|
+
} of childMcps) {
|
|
512
|
+
const displayScope = originalScope_0 === "builtin" ? "user" : originalScope_0;
|
|
513
|
+
if (!itemsByScope.has(displayScope)) {
|
|
514
|
+
itemsByScope.set(displayScope, []);
|
|
515
|
+
}
|
|
516
|
+
itemsByScope.get(displayScope).push({
|
|
517
|
+
type: "mcp",
|
|
518
|
+
id: `mcp:${client_2.name}`,
|
|
519
|
+
name: displayName,
|
|
520
|
+
description: undefined,
|
|
521
|
+
scope: displayScope,
|
|
522
|
+
status: getMcpStatus(client_2),
|
|
523
|
+
client: client_2,
|
|
524
|
+
indented: true
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
for (const mcp of standaloneMcps) {
|
|
529
|
+
const scope_1 = mcp.scope;
|
|
530
|
+
if (!itemsByScope.has(scope_1)) {
|
|
531
|
+
itemsByScope.set(scope_1, []);
|
|
532
|
+
}
|
|
533
|
+
itemsByScope.get(scope_1).push(mcp);
|
|
534
|
+
}
|
|
535
|
+
for (const failedPlugin of failedPluginItems) {
|
|
536
|
+
const scope_2 = failedPlugin.scope;
|
|
537
|
+
if (!itemsByScope.has(scope_2)) {
|
|
538
|
+
itemsByScope.set(scope_2, []);
|
|
539
|
+
}
|
|
540
|
+
itemsByScope.get(scope_2).push(failedPlugin);
|
|
541
|
+
}
|
|
542
|
+
for (const [pluginId_1, entry] of Object.entries(flaggedPlugins)) {
|
|
543
|
+
const parsed_0 = parsePluginIdentifier(pluginId_1);
|
|
544
|
+
const pluginName_1 = parsed_0.name || pluginId_1;
|
|
545
|
+
const marketplace_0 = parsed_0.marketplace || "unknown";
|
|
546
|
+
if (!itemsByScope.has("flagged")) {
|
|
547
|
+
itemsByScope.set("flagged", []);
|
|
548
|
+
}
|
|
549
|
+
itemsByScope.get("flagged").push({
|
|
550
|
+
type: "flagged-plugin",
|
|
551
|
+
id: pluginId_1,
|
|
552
|
+
name: pluginName_1,
|
|
553
|
+
marketplace: marketplace_0,
|
|
554
|
+
scope: "flagged",
|
|
555
|
+
reason: "delisted",
|
|
556
|
+
text: "Removed from marketplace",
|
|
557
|
+
flaggedAt: entry.flaggedAt
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
const sortedScopes = [...itemsByScope.keys()].sort((a, b) => (scopeOrder[a] ?? 99) - (scopeOrder[b] ?? 99));
|
|
561
|
+
for (const scope_3 of sortedScopes) {
|
|
562
|
+
const items = itemsByScope.get(scope_3);
|
|
563
|
+
const pluginGroups = [];
|
|
564
|
+
const standaloneMcpsInScope = [];
|
|
565
|
+
let i = 0;
|
|
566
|
+
while (i < items.length) {
|
|
567
|
+
const item_2 = items[i];
|
|
568
|
+
if (item_2.type === "plugin" || item_2.type === "failed-plugin" || item_2.type === "flagged-plugin") {
|
|
569
|
+
const group = [item_2];
|
|
570
|
+
i++;
|
|
571
|
+
let nextItem = items[i];
|
|
572
|
+
while (nextItem?.type === "mcp" && nextItem.indented) {
|
|
573
|
+
group.push(nextItem);
|
|
574
|
+
i++;
|
|
575
|
+
nextItem = items[i];
|
|
576
|
+
}
|
|
577
|
+
pluginGroups.push(group);
|
|
578
|
+
} else if (item_2.type === "mcp" && !item_2.indented) {
|
|
579
|
+
standaloneMcpsInScope.push(item_2);
|
|
580
|
+
i++;
|
|
581
|
+
} else {
|
|
582
|
+
i++;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
pluginGroups.sort((a_0, b_0) => a_0[0].name.localeCompare(b_0[0].name));
|
|
586
|
+
standaloneMcpsInScope.sort((a_1, b_1) => a_1.name.localeCompare(b_1.name));
|
|
587
|
+
for (const group_0 of pluginGroups) {
|
|
588
|
+
unified.push(...group_0);
|
|
589
|
+
}
|
|
590
|
+
unified.push(...standaloneMcpsInScope);
|
|
591
|
+
}
|
|
592
|
+
return unified;
|
|
593
|
+
}, [pluginStates, mcpClients, pluginErrors, pendingToggles, flaggedPlugins]);
|
|
594
|
+
const flaggedIds = useMemo(() => unifiedItems.filter((item_3) => item_3.type === "flagged-plugin").map((item_4) => item_4.id), [unifiedItems]);
|
|
595
|
+
useEffect(() => {
|
|
596
|
+
if (flaggedIds.length > 0) {
|
|
597
|
+
markFlaggedPluginsSeen(flaggedIds);
|
|
598
|
+
}
|
|
599
|
+
}, [flaggedIds]);
|
|
600
|
+
const filteredItems = useMemo(() => {
|
|
601
|
+
if (!searchQuery)
|
|
602
|
+
return unifiedItems;
|
|
603
|
+
const lowerQuery = searchQuery.toLowerCase();
|
|
604
|
+
return unifiedItems.filter((item_5) => item_5.name.toLowerCase().includes(lowerQuery) || ("description" in item_5) && item_5.description?.toLowerCase().includes(lowerQuery));
|
|
605
|
+
}, [unifiedItems, searchQuery]);
|
|
606
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
607
|
+
const pagination = usePagination({
|
|
608
|
+
totalItems: filteredItems.length,
|
|
609
|
+
selectedIndex,
|
|
610
|
+
maxVisible: 8
|
|
611
|
+
});
|
|
612
|
+
const [detailsMenuIndex, setDetailsMenuIndex] = useState(0);
|
|
613
|
+
const [isProcessing, setIsProcessing] = useState(false);
|
|
614
|
+
const [processError, setProcessError] = useState(null);
|
|
615
|
+
const [configNeeded, setConfigNeeded] = useState(null);
|
|
616
|
+
const [_isLoadingConfig, setIsLoadingConfig] = useState(false);
|
|
617
|
+
const [selectedPluginHasMcpb, setSelectedPluginHasMcpb] = useState(false);
|
|
618
|
+
useEffect(() => {
|
|
619
|
+
if (!selectedPlugin) {
|
|
620
|
+
setSelectedPluginHasMcpb(false);
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
async function detectMcpb() {
|
|
624
|
+
const mcpServersSpec = selectedPlugin.plugin.manifest.mcpServers;
|
|
625
|
+
let hasMcpb = false;
|
|
626
|
+
if (mcpServersSpec) {
|
|
627
|
+
hasMcpb = typeof mcpServersSpec === "string" && isMcpbSource(mcpServersSpec) || Array.isArray(mcpServersSpec) && mcpServersSpec.some((s_2) => typeof s_2 === "string" && isMcpbSource(s_2));
|
|
628
|
+
}
|
|
629
|
+
if (!hasMcpb) {
|
|
630
|
+
try {
|
|
631
|
+
const marketplaceDir = path.join(selectedPlugin.plugin.path, "..");
|
|
632
|
+
const marketplaceJsonPath = path.join(marketplaceDir, ".claude-plugin", "marketplace.json");
|
|
633
|
+
const content = await fs.readFile(marketplaceJsonPath, "utf-8");
|
|
634
|
+
const marketplace_1 = jsonParse(content);
|
|
635
|
+
const entry_0 = marketplace_1.plugins?.find((p) => p.name === selectedPlugin.plugin.name);
|
|
636
|
+
if (entry_0?.mcpServers) {
|
|
637
|
+
const spec = entry_0.mcpServers;
|
|
638
|
+
hasMcpb = typeof spec === "string" && isMcpbSource(spec) || Array.isArray(spec) && spec.some((s_3) => typeof s_3 === "string" && isMcpbSource(s_3));
|
|
639
|
+
}
|
|
640
|
+
} catch (err) {
|
|
641
|
+
logForDebugging(`Failed to read raw marketplace.json: ${err}`);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
setSelectedPluginHasMcpb(hasMcpb);
|
|
645
|
+
}
|
|
646
|
+
detectMcpb();
|
|
647
|
+
}, [selectedPlugin]);
|
|
648
|
+
useEffect(() => {
|
|
649
|
+
async function loadInstalledPlugins() {
|
|
650
|
+
setLoading(true);
|
|
651
|
+
try {
|
|
652
|
+
const {
|
|
653
|
+
enabled,
|
|
654
|
+
disabled
|
|
655
|
+
} = await loadAllPlugins();
|
|
656
|
+
const mergedSettings = getSettings_DEPRECATED();
|
|
657
|
+
const allPlugins = filterManagedDisabledPlugins([...enabled, ...disabled]);
|
|
658
|
+
const pluginsByMarketplace = {};
|
|
659
|
+
for (const plugin of allPlugins) {
|
|
660
|
+
const marketplace = plugin.source.split("@")[1] || "local";
|
|
661
|
+
if (!pluginsByMarketplace[marketplace]) {
|
|
662
|
+
pluginsByMarketplace[marketplace] = [];
|
|
663
|
+
}
|
|
664
|
+
pluginsByMarketplace[marketplace].push(plugin);
|
|
665
|
+
}
|
|
666
|
+
const marketplaceInfos = [];
|
|
667
|
+
for (const [name, plugins] of Object.entries(pluginsByMarketplace)) {
|
|
668
|
+
const enabledCount = count(plugins, (p) => {
|
|
669
|
+
const pluginId = `${p.name}@${name}`;
|
|
670
|
+
return mergedSettings?.enabledPlugins?.[pluginId] !== false;
|
|
671
|
+
});
|
|
672
|
+
const disabledCount = plugins.length - enabledCount;
|
|
673
|
+
marketplaceInfos.push({
|
|
674
|
+
name,
|
|
675
|
+
installedPlugins: plugins,
|
|
676
|
+
enabledCount,
|
|
677
|
+
disabledCount
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
marketplaceInfos.sort((a, b) => {
|
|
681
|
+
if (a.name === "claude-plugin-directory")
|
|
682
|
+
return -1;
|
|
683
|
+
if (b.name === "claude-plugin-directory")
|
|
684
|
+
return 1;
|
|
685
|
+
return a.name.localeCompare(b.name);
|
|
686
|
+
});
|
|
687
|
+
setMarketplaces(marketplaceInfos);
|
|
688
|
+
const allStates = [];
|
|
689
|
+
for (const marketplace of marketplaceInfos) {
|
|
690
|
+
for (const plugin of marketplace.installedPlugins) {
|
|
691
|
+
const pluginId = `${plugin.name}@${marketplace.name}`;
|
|
692
|
+
const scope = plugin.isBuiltin ? "builtin" : getPluginInstallationFromV2(pluginId).scope;
|
|
693
|
+
allStates.push({
|
|
694
|
+
plugin,
|
|
695
|
+
marketplace: marketplace.name,
|
|
696
|
+
scope,
|
|
697
|
+
pendingEnable: undefined,
|
|
698
|
+
pendingUpdate: false
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
setPluginStates(allStates);
|
|
703
|
+
setSelectedIndex(0);
|
|
704
|
+
} finally {
|
|
705
|
+
setLoading(false);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
loadInstalledPlugins();
|
|
709
|
+
}, []);
|
|
710
|
+
useEffect(() => {
|
|
711
|
+
if (hasAutoNavigated.current)
|
|
712
|
+
return;
|
|
713
|
+
if (targetPlugin && marketplaces.length > 0 && !loading) {
|
|
714
|
+
const {
|
|
715
|
+
name: targetName,
|
|
716
|
+
marketplace: targetMktFromId
|
|
717
|
+
} = parsePluginIdentifier(targetPlugin);
|
|
718
|
+
const effectiveTargetMarketplace = targetMarketplace ?? targetMktFromId;
|
|
719
|
+
const marketplacesToSearch = effectiveTargetMarketplace ? marketplaces.filter((m) => m.name === effectiveTargetMarketplace) : marketplaces;
|
|
720
|
+
for (const marketplace_2 of marketplacesToSearch) {
|
|
721
|
+
const plugin = marketplace_2.installedPlugins.find((p_0) => p_0.name === targetName);
|
|
722
|
+
if (plugin) {
|
|
723
|
+
const pluginId_2 = `${plugin.name}@${marketplace_2.name}`;
|
|
724
|
+
const {
|
|
725
|
+
scope: scope_4
|
|
726
|
+
} = getPluginInstallationFromV2(pluginId_2);
|
|
727
|
+
const pluginState = {
|
|
728
|
+
plugin,
|
|
729
|
+
marketplace: marketplace_2.name,
|
|
730
|
+
scope: scope_4,
|
|
731
|
+
pendingEnable: undefined,
|
|
732
|
+
pendingUpdate: false
|
|
733
|
+
};
|
|
734
|
+
setSelectedPlugin(pluginState);
|
|
735
|
+
setViewState("plugin-details");
|
|
736
|
+
pendingAutoActionRef.current = action;
|
|
737
|
+
hasAutoNavigated.current = true;
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
const failedItem = unifiedItems.find((item_6) => item_6.type === "failed-plugin" && item_6.name === targetName);
|
|
742
|
+
if (failedItem && failedItem.type === "failed-plugin") {
|
|
743
|
+
setViewState({
|
|
744
|
+
type: "failed-plugin-details",
|
|
745
|
+
plugin: {
|
|
746
|
+
id: failedItem.id,
|
|
747
|
+
name: failedItem.name,
|
|
748
|
+
marketplace: failedItem.marketplace,
|
|
749
|
+
errors: failedItem.errors,
|
|
750
|
+
scope: failedItem.scope
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
hasAutoNavigated.current = true;
|
|
754
|
+
}
|
|
755
|
+
if (!hasAutoNavigated.current && action) {
|
|
756
|
+
hasAutoNavigated.current = true;
|
|
757
|
+
setResult(`Plugin "${targetPlugin}" is not installed in this project`);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}, [targetPlugin, targetMarketplace, marketplaces, loading, unifiedItems, action, setResult]);
|
|
761
|
+
const handleSingleOperation = async (operation) => {
|
|
762
|
+
if (!selectedPlugin)
|
|
763
|
+
return;
|
|
764
|
+
const pluginScope = selectedPlugin.scope || "user";
|
|
765
|
+
const isBuiltin = pluginScope === "builtin";
|
|
766
|
+
if (isBuiltin && (operation === "update" || operation === "uninstall")) {
|
|
767
|
+
setProcessError("Built-in plugins cannot be updated or uninstalled.");
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
if (!isBuiltin && !isInstallableScope(pluginScope) && operation !== "update") {
|
|
771
|
+
setProcessError("This plugin is managed by your organization. Contact your admin to disable it.");
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
setIsProcessing(true);
|
|
775
|
+
setProcessError(null);
|
|
776
|
+
try {
|
|
777
|
+
const pluginId_3 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
778
|
+
let reverseDependents;
|
|
779
|
+
switch (operation) {
|
|
780
|
+
case "enable": {
|
|
781
|
+
const enableResult = await enablePluginOp(pluginId_3);
|
|
782
|
+
if (!enableResult.success) {
|
|
783
|
+
throw new Error(enableResult.message);
|
|
784
|
+
}
|
|
785
|
+
break;
|
|
786
|
+
}
|
|
787
|
+
case "disable": {
|
|
788
|
+
const disableResult = await disablePluginOp(pluginId_3);
|
|
789
|
+
if (!disableResult.success) {
|
|
790
|
+
throw new Error(disableResult.message);
|
|
791
|
+
}
|
|
792
|
+
reverseDependents = disableResult.reverseDependents;
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
case "uninstall": {
|
|
796
|
+
if (isBuiltin)
|
|
797
|
+
break;
|
|
798
|
+
if (!isInstallableScope(pluginScope))
|
|
799
|
+
break;
|
|
800
|
+
if (isPluginEnabledAtProjectScope(pluginId_3)) {
|
|
801
|
+
setIsProcessing(false);
|
|
802
|
+
setViewState("confirm-project-uninstall");
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
const installs = loadInstalledPluginsV2().plugins[pluginId_3];
|
|
806
|
+
const isLastScope = !installs || installs.length <= 1;
|
|
807
|
+
const dataSize = isLastScope ? await getPluginDataDirSize(pluginId_3) : null;
|
|
808
|
+
if (dataSize) {
|
|
809
|
+
setIsProcessing(false);
|
|
810
|
+
setViewState({
|
|
811
|
+
type: "confirm-data-cleanup",
|
|
812
|
+
size: dataSize
|
|
813
|
+
});
|
|
814
|
+
return;
|
|
815
|
+
}
|
|
816
|
+
const result_0 = await uninstallPluginOp(pluginId_3, pluginScope);
|
|
817
|
+
if (!result_0.success) {
|
|
818
|
+
throw new Error(result_0.message);
|
|
819
|
+
}
|
|
820
|
+
reverseDependents = result_0.reverseDependents;
|
|
821
|
+
break;
|
|
822
|
+
}
|
|
823
|
+
case "update": {
|
|
824
|
+
if (isBuiltin)
|
|
825
|
+
break;
|
|
826
|
+
const result = await updatePluginOp(pluginId_3, pluginScope);
|
|
827
|
+
if (!result.success) {
|
|
828
|
+
throw new Error(result.message);
|
|
829
|
+
}
|
|
830
|
+
if (result.alreadyUpToDate) {
|
|
831
|
+
setResult(`${selectedPlugin.plugin.name} is already at the latest version (${result.newVersion}).`);
|
|
832
|
+
if (onManageComplete) {
|
|
833
|
+
await onManageComplete();
|
|
834
|
+
}
|
|
835
|
+
setParentViewState({
|
|
836
|
+
type: "menu"
|
|
837
|
+
});
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
break;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
clearAllCaches();
|
|
844
|
+
const pluginIdNow = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
845
|
+
const settingsAfter = getSettings_DEPRECATED();
|
|
846
|
+
const enabledAfter = settingsAfter?.enabledPlugins?.[pluginIdNow] !== false;
|
|
847
|
+
if (enabledAfter) {
|
|
848
|
+
setIsProcessing(false);
|
|
849
|
+
setViewState({
|
|
850
|
+
type: "plugin-options"
|
|
851
|
+
});
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
const operationName = operation === "enable" ? "Enabled" : operation === "disable" ? "Disabled" : operation === "update" ? "Updated" : "Uninstalled";
|
|
855
|
+
const depWarn = reverseDependents && reverseDependents.length > 0 ? ` · required by ${reverseDependents.join(", ")}` : "";
|
|
856
|
+
const message = `✓ ${operationName} ${selectedPlugin.plugin.name}${depWarn}. Run /reload-plugins to apply.`;
|
|
857
|
+
setResult(message);
|
|
858
|
+
if (onManageComplete) {
|
|
859
|
+
await onManageComplete();
|
|
860
|
+
}
|
|
861
|
+
setParentViewState({
|
|
862
|
+
type: "menu"
|
|
863
|
+
});
|
|
864
|
+
} catch (error_0) {
|
|
865
|
+
setIsProcessing(false);
|
|
866
|
+
const errorMessage = error_0 instanceof Error ? error_0.message : String(error_0);
|
|
867
|
+
setProcessError(`Failed to ${operation}: ${errorMessage}`);
|
|
868
|
+
logError(toError(error_0));
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
const handleSingleOperationRef = useRef(handleSingleOperation);
|
|
872
|
+
handleSingleOperationRef.current = handleSingleOperation;
|
|
873
|
+
useEffect(() => {
|
|
874
|
+
if (viewState === "plugin-details" && selectedPlugin && pendingAutoActionRef.current) {
|
|
875
|
+
const pending = pendingAutoActionRef.current;
|
|
876
|
+
pendingAutoActionRef.current = undefined;
|
|
877
|
+
handleSingleOperationRef.current(pending);
|
|
878
|
+
}
|
|
879
|
+
}, [viewState, selectedPlugin]);
|
|
880
|
+
const handleToggle = React.useCallback(() => {
|
|
881
|
+
if (selectedIndex >= filteredItems.length)
|
|
882
|
+
return;
|
|
883
|
+
const item_7 = filteredItems[selectedIndex];
|
|
884
|
+
if (item_7?.type === "flagged-plugin")
|
|
885
|
+
return;
|
|
886
|
+
if (item_7?.type === "plugin") {
|
|
887
|
+
const pluginId_4 = `${item_7.plugin.name}@${item_7.marketplace}`;
|
|
888
|
+
const mergedSettings_0 = getSettings_DEPRECATED();
|
|
889
|
+
const currentPending = pendingToggles.get(pluginId_4);
|
|
890
|
+
const isEnabled_0 = mergedSettings_0?.enabledPlugins?.[pluginId_4] !== false;
|
|
891
|
+
const pluginScope_0 = item_7.scope;
|
|
892
|
+
const isBuiltin_0 = pluginScope_0 === "builtin";
|
|
893
|
+
if (isBuiltin_0 || isInstallableScope(pluginScope_0)) {
|
|
894
|
+
const newPending = new Map(pendingToggles);
|
|
895
|
+
if (currentPending) {
|
|
896
|
+
newPending.delete(pluginId_4);
|
|
897
|
+
(async () => {
|
|
898
|
+
try {
|
|
899
|
+
if (currentPending === "will-disable") {
|
|
900
|
+
await enablePluginOp(pluginId_4);
|
|
901
|
+
} else {
|
|
902
|
+
await disablePluginOp(pluginId_4);
|
|
903
|
+
}
|
|
904
|
+
clearAllCaches();
|
|
905
|
+
} catch (err_0) {
|
|
906
|
+
logError(err_0);
|
|
907
|
+
}
|
|
908
|
+
})();
|
|
909
|
+
} else {
|
|
910
|
+
newPending.set(pluginId_4, isEnabled_0 ? "will-disable" : "will-enable");
|
|
911
|
+
(async () => {
|
|
912
|
+
try {
|
|
913
|
+
if (isEnabled_0) {
|
|
914
|
+
await disablePluginOp(pluginId_4);
|
|
915
|
+
} else {
|
|
916
|
+
await enablePluginOp(pluginId_4);
|
|
917
|
+
}
|
|
918
|
+
clearAllCaches();
|
|
919
|
+
} catch (err_1) {
|
|
920
|
+
logError(err_1);
|
|
921
|
+
}
|
|
922
|
+
})();
|
|
923
|
+
}
|
|
924
|
+
setPendingToggles(newPending);
|
|
925
|
+
}
|
|
926
|
+
} else if (item_7?.type === "mcp") {
|
|
927
|
+
toggleMcpServer(item_7.client.name);
|
|
928
|
+
}
|
|
929
|
+
}, [selectedIndex, filteredItems, pendingToggles, pluginStates, toggleMcpServer]);
|
|
930
|
+
const handleAccept = React.useCallback(() => {
|
|
931
|
+
if (selectedIndex >= filteredItems.length)
|
|
932
|
+
return;
|
|
933
|
+
const item_8 = filteredItems[selectedIndex];
|
|
934
|
+
if (item_8?.type === "plugin") {
|
|
935
|
+
const state_0 = pluginStates.find((s_4) => s_4.plugin.name === item_8.plugin.name && s_4.marketplace === item_8.marketplace);
|
|
936
|
+
if (state_0) {
|
|
937
|
+
setSelectedPlugin(state_0);
|
|
938
|
+
setViewState("plugin-details");
|
|
939
|
+
setDetailsMenuIndex(0);
|
|
940
|
+
setProcessError(null);
|
|
941
|
+
}
|
|
942
|
+
} else if (item_8?.type === "flagged-plugin") {
|
|
943
|
+
setViewState({
|
|
944
|
+
type: "flagged-detail",
|
|
945
|
+
plugin: {
|
|
946
|
+
id: item_8.id,
|
|
947
|
+
name: item_8.name,
|
|
948
|
+
marketplace: item_8.marketplace,
|
|
949
|
+
reason: item_8.reason,
|
|
950
|
+
text: item_8.text,
|
|
951
|
+
flaggedAt: item_8.flaggedAt
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
setProcessError(null);
|
|
955
|
+
} else if (item_8?.type === "failed-plugin") {
|
|
956
|
+
setViewState({
|
|
957
|
+
type: "failed-plugin-details",
|
|
958
|
+
plugin: {
|
|
959
|
+
id: item_8.id,
|
|
960
|
+
name: item_8.name,
|
|
961
|
+
marketplace: item_8.marketplace,
|
|
962
|
+
errors: item_8.errors,
|
|
963
|
+
scope: item_8.scope
|
|
964
|
+
}
|
|
965
|
+
});
|
|
966
|
+
setDetailsMenuIndex(0);
|
|
967
|
+
setProcessError(null);
|
|
968
|
+
} else if (item_8?.type === "mcp") {
|
|
969
|
+
setViewState({
|
|
970
|
+
type: "mcp-detail",
|
|
971
|
+
client: item_8.client
|
|
972
|
+
});
|
|
973
|
+
setProcessError(null);
|
|
974
|
+
}
|
|
975
|
+
}, [selectedIndex, filteredItems, pluginStates]);
|
|
976
|
+
useKeybindings({
|
|
977
|
+
"select:previous": () => {
|
|
978
|
+
if (selectedIndex === 0) {
|
|
979
|
+
setIsSearchMode(true);
|
|
980
|
+
} else {
|
|
981
|
+
pagination.handleSelectionChange(selectedIndex - 1, setSelectedIndex);
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"select:next": () => {
|
|
985
|
+
if (selectedIndex < filteredItems.length - 1) {
|
|
986
|
+
pagination.handleSelectionChange(selectedIndex + 1, setSelectedIndex);
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
"select:accept": handleAccept
|
|
990
|
+
}, {
|
|
991
|
+
context: "Select",
|
|
992
|
+
isActive: viewState === "plugin-list" && !isSearchMode
|
|
993
|
+
});
|
|
994
|
+
useKeybindings({
|
|
995
|
+
"plugin:toggle": handleToggle
|
|
996
|
+
}, {
|
|
997
|
+
context: "Plugin",
|
|
998
|
+
isActive: viewState === "plugin-list" && !isSearchMode
|
|
999
|
+
});
|
|
1000
|
+
const handleFlaggedDismiss = React.useCallback(() => {
|
|
1001
|
+
if (typeof viewState !== "object" || viewState.type !== "flagged-detail")
|
|
1002
|
+
return;
|
|
1003
|
+
removeFlaggedPlugin(viewState.plugin.id);
|
|
1004
|
+
setViewState("plugin-list");
|
|
1005
|
+
}, [viewState]);
|
|
1006
|
+
useKeybindings({
|
|
1007
|
+
"select:accept": handleFlaggedDismiss
|
|
1008
|
+
}, {
|
|
1009
|
+
context: "Select",
|
|
1010
|
+
isActive: typeof viewState === "object" && viewState.type === "flagged-detail"
|
|
1011
|
+
});
|
|
1012
|
+
const detailsMenuItems = React.useMemo(() => {
|
|
1013
|
+
if (viewState !== "plugin-details" || !selectedPlugin)
|
|
1014
|
+
return [];
|
|
1015
|
+
const mergedSettings_1 = getSettings_DEPRECATED();
|
|
1016
|
+
const pluginId_5 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1017
|
+
const isEnabled_1 = mergedSettings_1?.enabledPlugins?.[pluginId_5] !== false;
|
|
1018
|
+
const isBuiltin_1 = selectedPlugin.marketplace === "builtin";
|
|
1019
|
+
const menuItems = [];
|
|
1020
|
+
menuItems.push({
|
|
1021
|
+
label: isEnabled_1 ? "Disable plugin" : "Enable plugin",
|
|
1022
|
+
action: () => void handleSingleOperation(isEnabled_1 ? "disable" : "enable")
|
|
1023
|
+
});
|
|
1024
|
+
if (!isBuiltin_1) {
|
|
1025
|
+
menuItems.push({
|
|
1026
|
+
label: selectedPlugin.pendingUpdate ? "Unmark for update" : "Mark for update",
|
|
1027
|
+
action: async () => {
|
|
1028
|
+
try {
|
|
1029
|
+
const localError = await checkIfLocalPlugin(selectedPlugin.plugin.name, selectedPlugin.marketplace);
|
|
1030
|
+
if (localError) {
|
|
1031
|
+
setProcessError(localError);
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
const newStates = [...pluginStates];
|
|
1035
|
+
const index = newStates.findIndex((s_5) => s_5.plugin.name === selectedPlugin.plugin.name && s_5.marketplace === selectedPlugin.marketplace);
|
|
1036
|
+
if (index !== -1) {
|
|
1037
|
+
newStates[index].pendingUpdate = !selectedPlugin.pendingUpdate;
|
|
1038
|
+
setPluginStates(newStates);
|
|
1039
|
+
setSelectedPlugin({
|
|
1040
|
+
...selectedPlugin,
|
|
1041
|
+
pendingUpdate: !selectedPlugin.pendingUpdate
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
} catch (error_1) {
|
|
1045
|
+
setProcessError(error_1 instanceof Error ? error_1.message : "Failed to check plugin update availability");
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
1049
|
+
if (selectedPluginHasMcpb) {
|
|
1050
|
+
menuItems.push({
|
|
1051
|
+
label: "Configure",
|
|
1052
|
+
action: async () => {
|
|
1053
|
+
setIsLoadingConfig(true);
|
|
1054
|
+
try {
|
|
1055
|
+
const mcpServersSpec_0 = selectedPlugin.plugin.manifest.mcpServers;
|
|
1056
|
+
let mcpbPath = null;
|
|
1057
|
+
if (typeof mcpServersSpec_0 === "string" && isMcpbSource(mcpServersSpec_0)) {
|
|
1058
|
+
mcpbPath = mcpServersSpec_0;
|
|
1059
|
+
} else if (Array.isArray(mcpServersSpec_0)) {
|
|
1060
|
+
for (const spec_0 of mcpServersSpec_0) {
|
|
1061
|
+
if (typeof spec_0 === "string" && isMcpbSource(spec_0)) {
|
|
1062
|
+
mcpbPath = spec_0;
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
if (!mcpbPath) {
|
|
1068
|
+
setProcessError("No MCPB file found in plugin");
|
|
1069
|
+
setIsLoadingConfig(false);
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
const pluginId_6 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1073
|
+
const result_1 = await loadMcpbFile(mcpbPath, selectedPlugin.plugin.path, pluginId_6, undefined, undefined, true);
|
|
1074
|
+
if ("status" in result_1 && result_1.status === "needs-config") {
|
|
1075
|
+
setConfigNeeded(result_1);
|
|
1076
|
+
setViewState("configuring");
|
|
1077
|
+
} else {
|
|
1078
|
+
setProcessError("Failed to load MCPB for configuration");
|
|
1079
|
+
}
|
|
1080
|
+
} catch (err_2) {
|
|
1081
|
+
const errorMsg = errorMessage(err_2);
|
|
1082
|
+
setProcessError(`Failed to load configuration: ${errorMsg}`);
|
|
1083
|
+
} finally {
|
|
1084
|
+
setIsLoadingConfig(false);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
if (selectedPlugin.plugin.manifest.userConfig && Object.keys(selectedPlugin.plugin.manifest.userConfig).length > 0) {
|
|
1090
|
+
menuItems.push({
|
|
1091
|
+
label: "Configure options",
|
|
1092
|
+
action: () => {
|
|
1093
|
+
setViewState({
|
|
1094
|
+
type: "configuring-options",
|
|
1095
|
+
schema: selectedPlugin.plugin.manifest.userConfig
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
menuItems.push({
|
|
1101
|
+
label: "Update now",
|
|
1102
|
+
action: () => void handleSingleOperation("update")
|
|
1103
|
+
});
|
|
1104
|
+
menuItems.push({
|
|
1105
|
+
label: "Uninstall",
|
|
1106
|
+
action: () => void handleSingleOperation("uninstall")
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
if (selectedPlugin.plugin.manifest.homepage) {
|
|
1110
|
+
menuItems.push({
|
|
1111
|
+
label: "Open homepage",
|
|
1112
|
+
action: () => void openBrowser(selectedPlugin.plugin.manifest.homepage)
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
if (selectedPlugin.plugin.manifest.repository) {
|
|
1116
|
+
menuItems.push({
|
|
1117
|
+
label: "View repository",
|
|
1118
|
+
action: () => void openBrowser(selectedPlugin.plugin.manifest.repository)
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
menuItems.push({
|
|
1122
|
+
label: "Back to plugin list",
|
|
1123
|
+
action: () => {
|
|
1124
|
+
setViewState("plugin-list");
|
|
1125
|
+
setSelectedPlugin(null);
|
|
1126
|
+
setProcessError(null);
|
|
1127
|
+
}
|
|
1128
|
+
});
|
|
1129
|
+
return menuItems;
|
|
1130
|
+
}, [viewState, selectedPlugin, selectedPluginHasMcpb, pluginStates]);
|
|
1131
|
+
useKeybindings({
|
|
1132
|
+
"select:previous": () => {
|
|
1133
|
+
if (detailsMenuIndex > 0) {
|
|
1134
|
+
setDetailsMenuIndex(detailsMenuIndex - 1);
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
"select:next": () => {
|
|
1138
|
+
if (detailsMenuIndex < detailsMenuItems.length - 1) {
|
|
1139
|
+
setDetailsMenuIndex(detailsMenuIndex + 1);
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"select:accept": () => {
|
|
1143
|
+
if (detailsMenuItems[detailsMenuIndex]) {
|
|
1144
|
+
detailsMenuItems[detailsMenuIndex].action();
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}, {
|
|
1148
|
+
context: "Select",
|
|
1149
|
+
isActive: viewState === "plugin-details" && !!selectedPlugin
|
|
1150
|
+
});
|
|
1151
|
+
useKeybindings({
|
|
1152
|
+
"select:accept": () => {
|
|
1153
|
+
if (typeof viewState === "object" && viewState.type === "failed-plugin-details") {
|
|
1154
|
+
(async () => {
|
|
1155
|
+
setIsProcessing(true);
|
|
1156
|
+
setProcessError(null);
|
|
1157
|
+
const pluginId_7 = viewState.plugin.id;
|
|
1158
|
+
const pluginScope_1 = viewState.plugin.scope;
|
|
1159
|
+
const result_2 = isInstallableScope(pluginScope_1) ? await uninstallPluginOp(pluginId_7, pluginScope_1, false) : await uninstallPluginOp(pluginId_7, "user", false);
|
|
1160
|
+
let success = result_2.success;
|
|
1161
|
+
if (!success) {
|
|
1162
|
+
const editableSources = ["userSettings", "projectSettings", "localSettings"];
|
|
1163
|
+
for (const source of editableSources) {
|
|
1164
|
+
const settings = getSettingsForSource(source);
|
|
1165
|
+
if (settings?.enabledPlugins?.[pluginId_7] !== undefined) {
|
|
1166
|
+
updateSettingsForSource(source, {
|
|
1167
|
+
enabledPlugins: {
|
|
1168
|
+
...settings.enabledPlugins,
|
|
1169
|
+
[pluginId_7]: undefined
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
success = true;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
clearAllCaches();
|
|
1176
|
+
}
|
|
1177
|
+
if (success) {
|
|
1178
|
+
if (onManageComplete) {
|
|
1179
|
+
await onManageComplete();
|
|
1180
|
+
}
|
|
1181
|
+
setIsProcessing(false);
|
|
1182
|
+
setViewState("plugin-list");
|
|
1183
|
+
} else {
|
|
1184
|
+
setIsProcessing(false);
|
|
1185
|
+
setProcessError(result_2.message);
|
|
1186
|
+
}
|
|
1187
|
+
})();
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}, {
|
|
1191
|
+
context: "Select",
|
|
1192
|
+
isActive: typeof viewState === "object" && viewState.type === "failed-plugin-details" && viewState.plugin.scope !== "managed"
|
|
1193
|
+
});
|
|
1194
|
+
useKeybindings({
|
|
1195
|
+
"confirm:yes": () => {
|
|
1196
|
+
if (!selectedPlugin)
|
|
1197
|
+
return;
|
|
1198
|
+
setIsProcessing(true);
|
|
1199
|
+
setProcessError(null);
|
|
1200
|
+
const pluginId_8 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1201
|
+
const {
|
|
1202
|
+
error: error_2
|
|
1203
|
+
} = updateSettingsForSource("localSettings", {
|
|
1204
|
+
enabledPlugins: {
|
|
1205
|
+
...getSettingsForSource("localSettings")?.enabledPlugins,
|
|
1206
|
+
[pluginId_8]: false
|
|
1207
|
+
}
|
|
1208
|
+
});
|
|
1209
|
+
if (error_2) {
|
|
1210
|
+
setIsProcessing(false);
|
|
1211
|
+
setProcessError(`Failed to write settings: ${error_2.message}`);
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
clearAllCaches();
|
|
1215
|
+
setResult(`✓ Disabled ${selectedPlugin.plugin.name} in .claude/settings.local.json. Run /reload-plugins to apply.`);
|
|
1216
|
+
if (onManageComplete)
|
|
1217
|
+
onManageComplete();
|
|
1218
|
+
setParentViewState({
|
|
1219
|
+
type: "menu"
|
|
1220
|
+
});
|
|
1221
|
+
},
|
|
1222
|
+
"confirm:no": () => {
|
|
1223
|
+
setViewState("plugin-details");
|
|
1224
|
+
setProcessError(null);
|
|
1225
|
+
}
|
|
1226
|
+
}, {
|
|
1227
|
+
context: "Confirmation",
|
|
1228
|
+
isActive: viewState === "confirm-project-uninstall" && !!selectedPlugin && !isProcessing
|
|
1229
|
+
});
|
|
1230
|
+
useInput((input, key) => {
|
|
1231
|
+
if (!selectedPlugin)
|
|
1232
|
+
return;
|
|
1233
|
+
const pluginId_9 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1234
|
+
const pluginScope_2 = selectedPlugin.scope;
|
|
1235
|
+
if (!pluginScope_2 || pluginScope_2 === "builtin" || !isInstallableScope(pluginScope_2))
|
|
1236
|
+
return;
|
|
1237
|
+
const doUninstall = async (deleteDataDir) => {
|
|
1238
|
+
setIsProcessing(true);
|
|
1239
|
+
setProcessError(null);
|
|
1240
|
+
try {
|
|
1241
|
+
const result_3 = await uninstallPluginOp(pluginId_9, pluginScope_2, deleteDataDir);
|
|
1242
|
+
if (!result_3.success)
|
|
1243
|
+
throw new Error(result_3.message);
|
|
1244
|
+
clearAllCaches();
|
|
1245
|
+
const suffix = deleteDataDir ? "" : " · data preserved";
|
|
1246
|
+
setResult(`${figures.tick} ${result_3.message}${suffix}`);
|
|
1247
|
+
if (onManageComplete)
|
|
1248
|
+
onManageComplete();
|
|
1249
|
+
setParentViewState({
|
|
1250
|
+
type: "menu"
|
|
1251
|
+
});
|
|
1252
|
+
} catch (e_0) {
|
|
1253
|
+
setIsProcessing(false);
|
|
1254
|
+
setProcessError(e_0 instanceof Error ? e_0.message : String(e_0));
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
if (input === "y" || input === "Y") {
|
|
1258
|
+
doUninstall(true);
|
|
1259
|
+
} else if (input === "n" || input === "N") {
|
|
1260
|
+
doUninstall(false);
|
|
1261
|
+
} else if (key.escape) {
|
|
1262
|
+
setViewState("plugin-details");
|
|
1263
|
+
setProcessError(null);
|
|
1264
|
+
}
|
|
1265
|
+
}, {
|
|
1266
|
+
isActive: typeof viewState === "object" && viewState.type === "confirm-data-cleanup" && !!selectedPlugin && !isProcessing
|
|
1267
|
+
});
|
|
1268
|
+
React.useEffect(() => {
|
|
1269
|
+
setSelectedIndex(0);
|
|
1270
|
+
}, [searchQuery]);
|
|
1271
|
+
useInput((input_0, key_0) => {
|
|
1272
|
+
const keyIsNotCtrlOrMeta = !key_0.ctrl && !key_0.meta;
|
|
1273
|
+
if (isSearchMode) {
|
|
1274
|
+
return;
|
|
1275
|
+
}
|
|
1276
|
+
if (input_0 === "/" && keyIsNotCtrlOrMeta) {
|
|
1277
|
+
setIsSearchMode(true);
|
|
1278
|
+
setSearchQuery("");
|
|
1279
|
+
setSelectedIndex(0);
|
|
1280
|
+
} else if (keyIsNotCtrlOrMeta && input_0.length > 0 && !/^\s+$/.test(input_0) && input_0 !== "j" && input_0 !== "k" && input_0 !== " ") {
|
|
1281
|
+
setIsSearchMode(true);
|
|
1282
|
+
setSearchQuery(input_0);
|
|
1283
|
+
setSelectedIndex(0);
|
|
1284
|
+
}
|
|
1285
|
+
}, {
|
|
1286
|
+
isActive: viewState === "plugin-list"
|
|
1287
|
+
});
|
|
1288
|
+
if (loading) {
|
|
1289
|
+
return jsxDEV_7x81h0kn(Text, {
|
|
1290
|
+
children: "Loading installed plugins…"
|
|
1291
|
+
}, undefined, false, undefined, this);
|
|
1292
|
+
}
|
|
1293
|
+
if (unifiedItems.length === 0) {
|
|
1294
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1295
|
+
flexDirection: "column",
|
|
1296
|
+
children: [
|
|
1297
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1298
|
+
marginBottom: 1,
|
|
1299
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1300
|
+
bold: true,
|
|
1301
|
+
children: "Manage plugins"
|
|
1302
|
+
}, undefined, false, undefined, this)
|
|
1303
|
+
}, undefined, false, undefined, this),
|
|
1304
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1305
|
+
children: "No plugins or MCP servers installed."
|
|
1306
|
+
}, undefined, false, undefined, this),
|
|
1307
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1308
|
+
marginTop: 1,
|
|
1309
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1310
|
+
dimColor: true,
|
|
1311
|
+
children: "Esc to go back"
|
|
1312
|
+
}, undefined, false, undefined, this)
|
|
1313
|
+
}, undefined, false, undefined, this)
|
|
1314
|
+
]
|
|
1315
|
+
}, undefined, true, undefined, this);
|
|
1316
|
+
}
|
|
1317
|
+
if (typeof viewState === "object" && viewState.type === "plugin-options" && selectedPlugin) {
|
|
1318
|
+
let finish = function(msg) {
|
|
1319
|
+
setResult(msg);
|
|
1320
|
+
if (onManageComplete) {
|
|
1321
|
+
onManageComplete();
|
|
1322
|
+
}
|
|
1323
|
+
setParentViewState({
|
|
1324
|
+
type: "menu"
|
|
1325
|
+
});
|
|
1326
|
+
};
|
|
1327
|
+
const pluginId_10 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1328
|
+
return jsxDEV_7x81h0kn(PluginOptionsFlow, {
|
|
1329
|
+
plugin: selectedPlugin.plugin,
|
|
1330
|
+
pluginId: pluginId_10,
|
|
1331
|
+
onDone: (outcome, detail) => {
|
|
1332
|
+
switch (outcome) {
|
|
1333
|
+
case "configured":
|
|
1334
|
+
finish(`✓ Enabled and configured ${selectedPlugin.plugin.name}. Run /reload-plugins to apply.`);
|
|
1335
|
+
break;
|
|
1336
|
+
case "skipped":
|
|
1337
|
+
finish(`✓ Enabled ${selectedPlugin.plugin.name}. Run /reload-plugins to apply.`);
|
|
1338
|
+
break;
|
|
1339
|
+
case "error":
|
|
1340
|
+
finish(`Failed to save configuration: ${detail}`);
|
|
1341
|
+
break;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
}, undefined, false, undefined, this);
|
|
1345
|
+
}
|
|
1346
|
+
if (typeof viewState === "object" && viewState.type === "configuring-options" && selectedPlugin) {
|
|
1347
|
+
const pluginId_11 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1348
|
+
return jsxDEV_7x81h0kn(PluginOptionsDialog, {
|
|
1349
|
+
title: `Configure ${selectedPlugin.plugin.name}`,
|
|
1350
|
+
subtitle: "Plugin options",
|
|
1351
|
+
configSchema: viewState.schema,
|
|
1352
|
+
initialValues: loadPluginOptions(pluginId_11),
|
|
1353
|
+
onSave: (values) => {
|
|
1354
|
+
try {
|
|
1355
|
+
savePluginOptions(pluginId_11, values, viewState.schema);
|
|
1356
|
+
clearAllCaches();
|
|
1357
|
+
setResult("Configuration saved. Run /reload-plugins for changes to take effect.");
|
|
1358
|
+
} catch (err_3) {
|
|
1359
|
+
setProcessError(`Failed to save configuration: ${errorMessage(err_3)}`);
|
|
1360
|
+
}
|
|
1361
|
+
setViewState("plugin-details");
|
|
1362
|
+
},
|
|
1363
|
+
onCancel: () => setViewState("plugin-details")
|
|
1364
|
+
}, undefined, false, undefined, this);
|
|
1365
|
+
}
|
|
1366
|
+
if (viewState === "configuring" && configNeeded && selectedPlugin) {
|
|
1367
|
+
let handleCancel = function() {
|
|
1368
|
+
setConfigNeeded(null);
|
|
1369
|
+
setViewState("plugin-details");
|
|
1370
|
+
};
|
|
1371
|
+
const pluginId_12 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1372
|
+
async function handleSave(config) {
|
|
1373
|
+
if (!configNeeded || !selectedPlugin)
|
|
1374
|
+
return;
|
|
1375
|
+
try {
|
|
1376
|
+
const mcpServersSpec_1 = selectedPlugin.plugin.manifest.mcpServers;
|
|
1377
|
+
let mcpbPath_0 = null;
|
|
1378
|
+
if (typeof mcpServersSpec_1 === "string" && isMcpbSource(mcpServersSpec_1)) {
|
|
1379
|
+
mcpbPath_0 = mcpServersSpec_1;
|
|
1380
|
+
} else if (Array.isArray(mcpServersSpec_1)) {
|
|
1381
|
+
for (const spec_1 of mcpServersSpec_1) {
|
|
1382
|
+
if (typeof spec_1 === "string" && isMcpbSource(spec_1)) {
|
|
1383
|
+
mcpbPath_0 = spec_1;
|
|
1384
|
+
break;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
if (!mcpbPath_0) {
|
|
1389
|
+
setProcessError("No MCPB file found");
|
|
1390
|
+
setViewState("plugin-details");
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
await loadMcpbFile(mcpbPath_0, selectedPlugin.plugin.path, pluginId_12, undefined, config);
|
|
1394
|
+
setProcessError(null);
|
|
1395
|
+
setConfigNeeded(null);
|
|
1396
|
+
setViewState("plugin-details");
|
|
1397
|
+
setResult("Configuration saved. Run /reload-plugins for changes to take effect.");
|
|
1398
|
+
} catch (err_4) {
|
|
1399
|
+
const errorMsg_0 = errorMessage(err_4);
|
|
1400
|
+
setProcessError(`Failed to save configuration: ${errorMsg_0}`);
|
|
1401
|
+
setViewState("plugin-details");
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
return jsxDEV_7x81h0kn(PluginOptionsDialog, {
|
|
1405
|
+
title: `Configure ${configNeeded.manifest.name}`,
|
|
1406
|
+
subtitle: `Plugin: ${selectedPlugin.plugin.name}`,
|
|
1407
|
+
configSchema: configNeeded.configSchema,
|
|
1408
|
+
initialValues: configNeeded.existingConfig,
|
|
1409
|
+
onSave: handleSave,
|
|
1410
|
+
onCancel: handleCancel
|
|
1411
|
+
}, undefined, false, undefined, this);
|
|
1412
|
+
}
|
|
1413
|
+
if (typeof viewState === "object" && viewState.type === "flagged-detail") {
|
|
1414
|
+
const fp = viewState.plugin;
|
|
1415
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1416
|
+
flexDirection: "column",
|
|
1417
|
+
children: [
|
|
1418
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1419
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1420
|
+
bold: true,
|
|
1421
|
+
children: [
|
|
1422
|
+
fp.name,
|
|
1423
|
+
" @ ",
|
|
1424
|
+
fp.marketplace
|
|
1425
|
+
]
|
|
1426
|
+
}, undefined, true, undefined, this)
|
|
1427
|
+
}, undefined, false, undefined, this),
|
|
1428
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1429
|
+
marginBottom: 1,
|
|
1430
|
+
children: [
|
|
1431
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1432
|
+
dimColor: true,
|
|
1433
|
+
children: "Status: "
|
|
1434
|
+
}, undefined, false, undefined, this),
|
|
1435
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1436
|
+
color: "error",
|
|
1437
|
+
children: "Removed"
|
|
1438
|
+
}, undefined, false, undefined, this)
|
|
1439
|
+
]
|
|
1440
|
+
}, undefined, true, undefined, this),
|
|
1441
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1442
|
+
marginBottom: 1,
|
|
1443
|
+
flexDirection: "column",
|
|
1444
|
+
children: [
|
|
1445
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1446
|
+
color: "error",
|
|
1447
|
+
children: [
|
|
1448
|
+
"Removed from marketplace · reason: ",
|
|
1449
|
+
fp.reason
|
|
1450
|
+
]
|
|
1451
|
+
}, undefined, true, undefined, this),
|
|
1452
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1453
|
+
children: fp.text
|
|
1454
|
+
}, undefined, false, undefined, this),
|
|
1455
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1456
|
+
dimColor: true,
|
|
1457
|
+
children: [
|
|
1458
|
+
"Flagged on ",
|
|
1459
|
+
new Date(fp.flaggedAt).toLocaleDateString()
|
|
1460
|
+
]
|
|
1461
|
+
}, undefined, true, undefined, this)
|
|
1462
|
+
]
|
|
1463
|
+
}, undefined, true, undefined, this),
|
|
1464
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1465
|
+
marginTop: 1,
|
|
1466
|
+
flexDirection: "column",
|
|
1467
|
+
children: jsxDEV_7x81h0kn(Box, {
|
|
1468
|
+
children: [
|
|
1469
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1470
|
+
children: [
|
|
1471
|
+
figures.pointer,
|
|
1472
|
+
" "
|
|
1473
|
+
]
|
|
1474
|
+
}, undefined, true, undefined, this),
|
|
1475
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1476
|
+
color: "suggestion",
|
|
1477
|
+
children: "Dismiss"
|
|
1478
|
+
}, undefined, false, undefined, this)
|
|
1479
|
+
]
|
|
1480
|
+
}, undefined, true, undefined, this)
|
|
1481
|
+
}, undefined, false, undefined, this),
|
|
1482
|
+
jsxDEV_7x81h0kn(Byline, {
|
|
1483
|
+
children: [
|
|
1484
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1485
|
+
action: "select:accept",
|
|
1486
|
+
context: "Select",
|
|
1487
|
+
fallback: "Enter",
|
|
1488
|
+
description: "dismiss"
|
|
1489
|
+
}, undefined, false, undefined, this),
|
|
1490
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1491
|
+
action: "confirm:no",
|
|
1492
|
+
context: "Confirmation",
|
|
1493
|
+
fallback: "Esc",
|
|
1494
|
+
description: "back"
|
|
1495
|
+
}, undefined, false, undefined, this)
|
|
1496
|
+
]
|
|
1497
|
+
}, undefined, true, undefined, this)
|
|
1498
|
+
]
|
|
1499
|
+
}, undefined, true, undefined, this);
|
|
1500
|
+
}
|
|
1501
|
+
if (viewState === "confirm-project-uninstall" && selectedPlugin) {
|
|
1502
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1503
|
+
flexDirection: "column",
|
|
1504
|
+
children: [
|
|
1505
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1506
|
+
bold: true,
|
|
1507
|
+
color: "warning",
|
|
1508
|
+
children: [
|
|
1509
|
+
selectedPlugin.plugin.name,
|
|
1510
|
+
" is enabled in .claude/settings.json (shared with your team)"
|
|
1511
|
+
]
|
|
1512
|
+
}, undefined, true, undefined, this),
|
|
1513
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1514
|
+
marginTop: 1,
|
|
1515
|
+
flexDirection: "column",
|
|
1516
|
+
children: [
|
|
1517
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1518
|
+
children: "Disable it just for you in .claude/settings.local.json?"
|
|
1519
|
+
}, undefined, false, undefined, this),
|
|
1520
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1521
|
+
dimColor: true,
|
|
1522
|
+
children: "This has the same effect as uninstalling, without affecting other contributors."
|
|
1523
|
+
}, undefined, false, undefined, this)
|
|
1524
|
+
]
|
|
1525
|
+
}, undefined, true, undefined, this),
|
|
1526
|
+
processError && jsxDEV_7x81h0kn(Box, {
|
|
1527
|
+
marginTop: 1,
|
|
1528
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1529
|
+
color: "error",
|
|
1530
|
+
children: processError
|
|
1531
|
+
}, undefined, false, undefined, this)
|
|
1532
|
+
}, undefined, false, undefined, this),
|
|
1533
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1534
|
+
marginTop: 1,
|
|
1535
|
+
children: isProcessing ? jsxDEV_7x81h0kn(Text, {
|
|
1536
|
+
dimColor: true,
|
|
1537
|
+
children: "Disabling…"
|
|
1538
|
+
}, undefined, false, undefined, this) : jsxDEV_7x81h0kn(Byline, {
|
|
1539
|
+
children: [
|
|
1540
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1541
|
+
action: "confirm:yes",
|
|
1542
|
+
context: "Confirmation",
|
|
1543
|
+
fallback: "y",
|
|
1544
|
+
description: "disable"
|
|
1545
|
+
}, undefined, false, undefined, this),
|
|
1546
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1547
|
+
action: "confirm:no",
|
|
1548
|
+
context: "Confirmation",
|
|
1549
|
+
fallback: "Esc",
|
|
1550
|
+
description: "cancel"
|
|
1551
|
+
}, undefined, false, undefined, this)
|
|
1552
|
+
]
|
|
1553
|
+
}, undefined, true, undefined, this)
|
|
1554
|
+
}, undefined, false, undefined, this)
|
|
1555
|
+
]
|
|
1556
|
+
}, undefined, true, undefined, this);
|
|
1557
|
+
}
|
|
1558
|
+
if (typeof viewState === "object" && viewState.type === "confirm-data-cleanup" && selectedPlugin) {
|
|
1559
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1560
|
+
flexDirection: "column",
|
|
1561
|
+
children: [
|
|
1562
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1563
|
+
bold: true,
|
|
1564
|
+
children: [
|
|
1565
|
+
selectedPlugin.plugin.name,
|
|
1566
|
+
" has ",
|
|
1567
|
+
viewState.size.human,
|
|
1568
|
+
" of persistent data"
|
|
1569
|
+
]
|
|
1570
|
+
}, undefined, true, undefined, this),
|
|
1571
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1572
|
+
marginTop: 1,
|
|
1573
|
+
flexDirection: "column",
|
|
1574
|
+
children: [
|
|
1575
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1576
|
+
children: "Delete it along with the plugin?"
|
|
1577
|
+
}, undefined, false, undefined, this),
|
|
1578
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1579
|
+
dimColor: true,
|
|
1580
|
+
children: pluginDataDirPath(`${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`)
|
|
1581
|
+
}, undefined, false, undefined, this)
|
|
1582
|
+
]
|
|
1583
|
+
}, undefined, true, undefined, this),
|
|
1584
|
+
processError && jsxDEV_7x81h0kn(Box, {
|
|
1585
|
+
marginTop: 1,
|
|
1586
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1587
|
+
color: "error",
|
|
1588
|
+
children: processError
|
|
1589
|
+
}, undefined, false, undefined, this)
|
|
1590
|
+
}, undefined, false, undefined, this),
|
|
1591
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1592
|
+
marginTop: 1,
|
|
1593
|
+
children: isProcessing ? jsxDEV_7x81h0kn(Text, {
|
|
1594
|
+
dimColor: true,
|
|
1595
|
+
children: "Uninstalling…"
|
|
1596
|
+
}, undefined, false, undefined, this) : jsxDEV_7x81h0kn(Text, {
|
|
1597
|
+
children: [
|
|
1598
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1599
|
+
bold: true,
|
|
1600
|
+
children: "y"
|
|
1601
|
+
}, undefined, false, undefined, this),
|
|
1602
|
+
" to delete · ",
|
|
1603
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1604
|
+
bold: true,
|
|
1605
|
+
children: "n"
|
|
1606
|
+
}, undefined, false, undefined, this),
|
|
1607
|
+
" to keep ·",
|
|
1608
|
+
" ",
|
|
1609
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1610
|
+
bold: true,
|
|
1611
|
+
children: "esc"
|
|
1612
|
+
}, undefined, false, undefined, this),
|
|
1613
|
+
" to cancel"
|
|
1614
|
+
]
|
|
1615
|
+
}, undefined, true, undefined, this)
|
|
1616
|
+
}, undefined, false, undefined, this)
|
|
1617
|
+
]
|
|
1618
|
+
}, undefined, true, undefined, this);
|
|
1619
|
+
}
|
|
1620
|
+
if (viewState === "plugin-details" && selectedPlugin) {
|
|
1621
|
+
const mergedSettings_2 = getSettings_DEPRECATED();
|
|
1622
|
+
const pluginId_13 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1623
|
+
const isEnabled_2 = mergedSettings_2?.enabledPlugins?.[pluginId_13] !== false;
|
|
1624
|
+
const filteredPluginErrors = pluginErrors.filter((e_1) => ("plugin" in e_1) && e_1.plugin === selectedPlugin.plugin.name || e_1.source === pluginId_13 || e_1.source.startsWith(`${selectedPlugin.plugin.name}@`));
|
|
1625
|
+
const pluginErrorsSection = filteredPluginErrors.length === 0 ? null : jsxDEV_7x81h0kn(Box, {
|
|
1626
|
+
flexDirection: "column",
|
|
1627
|
+
marginBottom: 1,
|
|
1628
|
+
children: [
|
|
1629
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1630
|
+
bold: true,
|
|
1631
|
+
color: "error",
|
|
1632
|
+
children: [
|
|
1633
|
+
filteredPluginErrors.length,
|
|
1634
|
+
" ",
|
|
1635
|
+
plural(filteredPluginErrors.length, "error"),
|
|
1636
|
+
":"
|
|
1637
|
+
]
|
|
1638
|
+
}, undefined, true, undefined, this),
|
|
1639
|
+
filteredPluginErrors.map((error_3, i_0) => {
|
|
1640
|
+
const guidance = getErrorGuidance(error_3);
|
|
1641
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1642
|
+
flexDirection: "column",
|
|
1643
|
+
marginLeft: 2,
|
|
1644
|
+
children: [
|
|
1645
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1646
|
+
color: "error",
|
|
1647
|
+
children: formatErrorMessage(error_3)
|
|
1648
|
+
}, undefined, false, undefined, this),
|
|
1649
|
+
guidance && jsxDEV_7x81h0kn(Text, {
|
|
1650
|
+
dimColor: true,
|
|
1651
|
+
italic: true,
|
|
1652
|
+
children: [
|
|
1653
|
+
figures.arrowRight,
|
|
1654
|
+
" ",
|
|
1655
|
+
guidance
|
|
1656
|
+
]
|
|
1657
|
+
}, undefined, true, undefined, this)
|
|
1658
|
+
]
|
|
1659
|
+
}, i_0, true, undefined, this);
|
|
1660
|
+
})
|
|
1661
|
+
]
|
|
1662
|
+
}, undefined, true, undefined, this);
|
|
1663
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1664
|
+
flexDirection: "column",
|
|
1665
|
+
children: [
|
|
1666
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1667
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1668
|
+
bold: true,
|
|
1669
|
+
children: [
|
|
1670
|
+
selectedPlugin.plugin.name,
|
|
1671
|
+
" @ ",
|
|
1672
|
+
selectedPlugin.marketplace
|
|
1673
|
+
]
|
|
1674
|
+
}, undefined, true, undefined, this)
|
|
1675
|
+
}, undefined, false, undefined, this),
|
|
1676
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1677
|
+
children: [
|
|
1678
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1679
|
+
dimColor: true,
|
|
1680
|
+
children: "Scope: "
|
|
1681
|
+
}, undefined, false, undefined, this),
|
|
1682
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1683
|
+
children: selectedPlugin.scope || "user"
|
|
1684
|
+
}, undefined, false, undefined, this)
|
|
1685
|
+
]
|
|
1686
|
+
}, undefined, true, undefined, this),
|
|
1687
|
+
selectedPlugin.plugin.manifest.version && jsxDEV_7x81h0kn(Box, {
|
|
1688
|
+
children: [
|
|
1689
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1690
|
+
dimColor: true,
|
|
1691
|
+
children: "Version: "
|
|
1692
|
+
}, undefined, false, undefined, this),
|
|
1693
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1694
|
+
children: selectedPlugin.plugin.manifest.version
|
|
1695
|
+
}, undefined, false, undefined, this)
|
|
1696
|
+
]
|
|
1697
|
+
}, undefined, true, undefined, this),
|
|
1698
|
+
selectedPlugin.plugin.manifest.description && jsxDEV_7x81h0kn(Box, {
|
|
1699
|
+
marginBottom: 1,
|
|
1700
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1701
|
+
children: selectedPlugin.plugin.manifest.description
|
|
1702
|
+
}, undefined, false, undefined, this)
|
|
1703
|
+
}, undefined, false, undefined, this),
|
|
1704
|
+
selectedPlugin.plugin.manifest.author && jsxDEV_7x81h0kn(Box, {
|
|
1705
|
+
children: [
|
|
1706
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1707
|
+
dimColor: true,
|
|
1708
|
+
children: "Author: "
|
|
1709
|
+
}, undefined, false, undefined, this),
|
|
1710
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1711
|
+
children: selectedPlugin.plugin.manifest.author.name
|
|
1712
|
+
}, undefined, false, undefined, this)
|
|
1713
|
+
]
|
|
1714
|
+
}, undefined, true, undefined, this),
|
|
1715
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1716
|
+
marginBottom: 1,
|
|
1717
|
+
children: [
|
|
1718
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1719
|
+
dimColor: true,
|
|
1720
|
+
children: "Status: "
|
|
1721
|
+
}, undefined, false, undefined, this),
|
|
1722
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1723
|
+
color: isEnabled_2 ? "success" : "warning",
|
|
1724
|
+
children: isEnabled_2 ? "Enabled" : "Disabled"
|
|
1725
|
+
}, undefined, false, undefined, this),
|
|
1726
|
+
selectedPlugin.pendingUpdate && jsxDEV_7x81h0kn(Text, {
|
|
1727
|
+
color: "suggestion",
|
|
1728
|
+
children: " · Marked for update"
|
|
1729
|
+
}, undefined, false, undefined, this)
|
|
1730
|
+
]
|
|
1731
|
+
}, undefined, true, undefined, this),
|
|
1732
|
+
jsxDEV_7x81h0kn(PluginComponentsDisplay, {
|
|
1733
|
+
plugin: selectedPlugin.plugin,
|
|
1734
|
+
marketplace: selectedPlugin.marketplace
|
|
1735
|
+
}, undefined, false, undefined, this),
|
|
1736
|
+
pluginErrorsSection,
|
|
1737
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1738
|
+
marginTop: 1,
|
|
1739
|
+
flexDirection: "column",
|
|
1740
|
+
children: detailsMenuItems.map((item_9, index_0) => {
|
|
1741
|
+
const isSelected = index_0 === detailsMenuIndex;
|
|
1742
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1743
|
+
children: [
|
|
1744
|
+
isSelected && jsxDEV_7x81h0kn(Text, {
|
|
1745
|
+
children: [
|
|
1746
|
+
figures.pointer,
|
|
1747
|
+
" "
|
|
1748
|
+
]
|
|
1749
|
+
}, undefined, true, undefined, this),
|
|
1750
|
+
!isSelected && jsxDEV_7x81h0kn(Text, {
|
|
1751
|
+
children: " "
|
|
1752
|
+
}, undefined, false, undefined, this),
|
|
1753
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1754
|
+
bold: isSelected,
|
|
1755
|
+
color: item_9.label.includes("Uninstall") ? "error" : item_9.label.includes("Update") ? "suggestion" : undefined,
|
|
1756
|
+
children: item_9.label
|
|
1757
|
+
}, undefined, false, undefined, this)
|
|
1758
|
+
]
|
|
1759
|
+
}, index_0, true, undefined, this);
|
|
1760
|
+
})
|
|
1761
|
+
}, undefined, false, undefined, this),
|
|
1762
|
+
isProcessing && jsxDEV_7x81h0kn(Box, {
|
|
1763
|
+
marginTop: 1,
|
|
1764
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1765
|
+
children: "Processing…"
|
|
1766
|
+
}, undefined, false, undefined, this)
|
|
1767
|
+
}, undefined, false, undefined, this),
|
|
1768
|
+
processError && jsxDEV_7x81h0kn(Box, {
|
|
1769
|
+
marginTop: 1,
|
|
1770
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1771
|
+
color: "error",
|
|
1772
|
+
children: processError
|
|
1773
|
+
}, undefined, false, undefined, this)
|
|
1774
|
+
}, undefined, false, undefined, this),
|
|
1775
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1776
|
+
marginTop: 1,
|
|
1777
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1778
|
+
dimColor: true,
|
|
1779
|
+
italic: true,
|
|
1780
|
+
children: jsxDEV_7x81h0kn(Byline, {
|
|
1781
|
+
children: [
|
|
1782
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1783
|
+
action: "select:previous",
|
|
1784
|
+
context: "Select",
|
|
1785
|
+
fallback: "↑",
|
|
1786
|
+
description: "navigate"
|
|
1787
|
+
}, undefined, false, undefined, this),
|
|
1788
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1789
|
+
action: "select:accept",
|
|
1790
|
+
context: "Select",
|
|
1791
|
+
fallback: "Enter",
|
|
1792
|
+
description: "select"
|
|
1793
|
+
}, undefined, false, undefined, this),
|
|
1794
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1795
|
+
action: "confirm:no",
|
|
1796
|
+
context: "Confirmation",
|
|
1797
|
+
fallback: "Esc",
|
|
1798
|
+
description: "back"
|
|
1799
|
+
}, undefined, false, undefined, this)
|
|
1800
|
+
]
|
|
1801
|
+
}, undefined, true, undefined, this)
|
|
1802
|
+
}, undefined, false, undefined, this)
|
|
1803
|
+
}, undefined, false, undefined, this)
|
|
1804
|
+
]
|
|
1805
|
+
}, undefined, true, undefined, this);
|
|
1806
|
+
}
|
|
1807
|
+
if (typeof viewState === "object" && viewState.type === "failed-plugin-details") {
|
|
1808
|
+
const failedPlugin_0 = viewState.plugin;
|
|
1809
|
+
const firstError = failedPlugin_0.errors[0];
|
|
1810
|
+
const errorMessage_0 = firstError ? formatErrorMessage(firstError) : "Failed to load";
|
|
1811
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
1812
|
+
flexDirection: "column",
|
|
1813
|
+
children: [
|
|
1814
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1815
|
+
children: [
|
|
1816
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1817
|
+
bold: true,
|
|
1818
|
+
children: failedPlugin_0.name
|
|
1819
|
+
}, undefined, false, undefined, this),
|
|
1820
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1821
|
+
dimColor: true,
|
|
1822
|
+
children: [
|
|
1823
|
+
" @ ",
|
|
1824
|
+
failedPlugin_0.marketplace
|
|
1825
|
+
]
|
|
1826
|
+
}, undefined, true, undefined, this),
|
|
1827
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1828
|
+
dimColor: true,
|
|
1829
|
+
children: [
|
|
1830
|
+
" (",
|
|
1831
|
+
failedPlugin_0.scope,
|
|
1832
|
+
")"
|
|
1833
|
+
]
|
|
1834
|
+
}, undefined, true, undefined, this)
|
|
1835
|
+
]
|
|
1836
|
+
}, undefined, true, undefined, this),
|
|
1837
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1838
|
+
color: "error",
|
|
1839
|
+
children: errorMessage_0
|
|
1840
|
+
}, undefined, false, undefined, this),
|
|
1841
|
+
failedPlugin_0.scope === "managed" ? jsxDEV_7x81h0kn(Box, {
|
|
1842
|
+
marginTop: 1,
|
|
1843
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1844
|
+
dimColor: true,
|
|
1845
|
+
children: "Managed by your organization — contact your admin"
|
|
1846
|
+
}, undefined, false, undefined, this)
|
|
1847
|
+
}, undefined, false, undefined, this) : jsxDEV_7x81h0kn(Box, {
|
|
1848
|
+
marginTop: 1,
|
|
1849
|
+
children: [
|
|
1850
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1851
|
+
color: "suggestion",
|
|
1852
|
+
children: [
|
|
1853
|
+
figures.pointer,
|
|
1854
|
+
" "
|
|
1855
|
+
]
|
|
1856
|
+
}, undefined, true, undefined, this),
|
|
1857
|
+
jsxDEV_7x81h0kn(Text, {
|
|
1858
|
+
bold: true,
|
|
1859
|
+
children: "Remove"
|
|
1860
|
+
}, undefined, false, undefined, this)
|
|
1861
|
+
]
|
|
1862
|
+
}, undefined, true, undefined, this),
|
|
1863
|
+
isProcessing && jsxDEV_7x81h0kn(Text, {
|
|
1864
|
+
children: "Processing…"
|
|
1865
|
+
}, undefined, false, undefined, this),
|
|
1866
|
+
processError && jsxDEV_7x81h0kn(Text, {
|
|
1867
|
+
color: "error",
|
|
1868
|
+
children: processError
|
|
1869
|
+
}, undefined, false, undefined, this),
|
|
1870
|
+
jsxDEV_7x81h0kn(Box, {
|
|
1871
|
+
marginTop: 1,
|
|
1872
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
1873
|
+
dimColor: true,
|
|
1874
|
+
italic: true,
|
|
1875
|
+
children: jsxDEV_7x81h0kn(Byline, {
|
|
1876
|
+
children: [
|
|
1877
|
+
failedPlugin_0.scope !== "managed" && jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1878
|
+
action: "select:accept",
|
|
1879
|
+
context: "Select",
|
|
1880
|
+
fallback: "Enter",
|
|
1881
|
+
description: "remove"
|
|
1882
|
+
}, undefined, false, undefined, this),
|
|
1883
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
1884
|
+
action: "confirm:no",
|
|
1885
|
+
context: "Confirmation",
|
|
1886
|
+
fallback: "Esc",
|
|
1887
|
+
description: "back"
|
|
1888
|
+
}, undefined, false, undefined, this)
|
|
1889
|
+
]
|
|
1890
|
+
}, undefined, true, undefined, this)
|
|
1891
|
+
}, undefined, false, undefined, this)
|
|
1892
|
+
}, undefined, false, undefined, this)
|
|
1893
|
+
]
|
|
1894
|
+
}, undefined, true, undefined, this);
|
|
1895
|
+
}
|
|
1896
|
+
if (typeof viewState === "object" && viewState.type === "mcp-detail") {
|
|
1897
|
+
const client_3 = viewState.client;
|
|
1898
|
+
const serverToolsCount = filterToolsByServer(mcpTools, client_3.name).length;
|
|
1899
|
+
const handleMcpViewTools = () => {
|
|
1900
|
+
setViewState({
|
|
1901
|
+
type: "mcp-tools",
|
|
1902
|
+
client: client_3
|
|
1903
|
+
});
|
|
1904
|
+
};
|
|
1905
|
+
const handleMcpCancel = () => {
|
|
1906
|
+
setViewState("plugin-list");
|
|
1907
|
+
};
|
|
1908
|
+
const handleMcpComplete = (result_4) => {
|
|
1909
|
+
if (result_4) {
|
|
1910
|
+
setResult(result_4);
|
|
1911
|
+
}
|
|
1912
|
+
setViewState("plugin-list");
|
|
1913
|
+
};
|
|
1914
|
+
const scope_5 = client_3.config.scope;
|
|
1915
|
+
const configType = client_3.config.type;
|
|
1916
|
+
if (configType === "stdio") {
|
|
1917
|
+
const server = {
|
|
1918
|
+
name: client_3.name,
|
|
1919
|
+
client: client_3,
|
|
1920
|
+
scope: scope_5,
|
|
1921
|
+
transport: "stdio",
|
|
1922
|
+
config: client_3.config
|
|
1923
|
+
};
|
|
1924
|
+
return jsxDEV_7x81h0kn(MCPStdioServerMenu, {
|
|
1925
|
+
server,
|
|
1926
|
+
serverToolsCount,
|
|
1927
|
+
onViewTools: handleMcpViewTools,
|
|
1928
|
+
onCancel: handleMcpCancel,
|
|
1929
|
+
onComplete: handleMcpComplete,
|
|
1930
|
+
borderless: true
|
|
1931
|
+
}, undefined, false, undefined, this);
|
|
1932
|
+
} else if (configType === "sse") {
|
|
1933
|
+
const server_0 = {
|
|
1934
|
+
name: client_3.name,
|
|
1935
|
+
client: client_3,
|
|
1936
|
+
scope: scope_5,
|
|
1937
|
+
transport: "sse",
|
|
1938
|
+
isAuthenticated: undefined,
|
|
1939
|
+
config: client_3.config
|
|
1940
|
+
};
|
|
1941
|
+
return jsxDEV_7x81h0kn(MCPRemoteServerMenu, {
|
|
1942
|
+
server: server_0,
|
|
1943
|
+
serverToolsCount,
|
|
1944
|
+
onViewTools: handleMcpViewTools,
|
|
1945
|
+
onCancel: handleMcpCancel,
|
|
1946
|
+
onComplete: handleMcpComplete,
|
|
1947
|
+
borderless: true
|
|
1948
|
+
}, undefined, false, undefined, this);
|
|
1949
|
+
} else if (configType === "http") {
|
|
1950
|
+
const server_1 = {
|
|
1951
|
+
name: client_3.name,
|
|
1952
|
+
client: client_3,
|
|
1953
|
+
scope: scope_5,
|
|
1954
|
+
transport: "http",
|
|
1955
|
+
isAuthenticated: undefined,
|
|
1956
|
+
config: client_3.config
|
|
1957
|
+
};
|
|
1958
|
+
return jsxDEV_7x81h0kn(MCPRemoteServerMenu, {
|
|
1959
|
+
server: server_1,
|
|
1960
|
+
serverToolsCount,
|
|
1961
|
+
onViewTools: handleMcpViewTools,
|
|
1962
|
+
onCancel: handleMcpCancel,
|
|
1963
|
+
onComplete: handleMcpComplete,
|
|
1964
|
+
borderless: true
|
|
1965
|
+
}, undefined, false, undefined, this);
|
|
1966
|
+
} else if (configType === "claudeai-proxy") {
|
|
1967
|
+
const server_2 = {
|
|
1968
|
+
name: client_3.name,
|
|
1969
|
+
client: client_3,
|
|
1970
|
+
scope: scope_5,
|
|
1971
|
+
transport: "claudeai-proxy",
|
|
1972
|
+
isAuthenticated: undefined,
|
|
1973
|
+
config: client_3.config
|
|
1974
|
+
};
|
|
1975
|
+
return jsxDEV_7x81h0kn(MCPRemoteServerMenu, {
|
|
1976
|
+
server: server_2,
|
|
1977
|
+
serverToolsCount,
|
|
1978
|
+
onViewTools: handleMcpViewTools,
|
|
1979
|
+
onCancel: handleMcpCancel,
|
|
1980
|
+
onComplete: handleMcpComplete,
|
|
1981
|
+
borderless: true
|
|
1982
|
+
}, undefined, false, undefined, this);
|
|
1983
|
+
}
|
|
1984
|
+
setViewState("plugin-list");
|
|
1985
|
+
return null;
|
|
1986
|
+
}
|
|
1987
|
+
if (typeof viewState === "object" && viewState.type === "mcp-tools") {
|
|
1988
|
+
const client_4 = viewState.client;
|
|
1989
|
+
const scope_6 = client_4.config.scope;
|
|
1990
|
+
const configType_0 = client_4.config.type;
|
|
1991
|
+
let server_3;
|
|
1992
|
+
if (configType_0 === "stdio") {
|
|
1993
|
+
server_3 = {
|
|
1994
|
+
name: client_4.name,
|
|
1995
|
+
client: client_4,
|
|
1996
|
+
scope: scope_6,
|
|
1997
|
+
transport: "stdio",
|
|
1998
|
+
config: client_4.config
|
|
1999
|
+
};
|
|
2000
|
+
} else if (configType_0 === "sse") {
|
|
2001
|
+
server_3 = {
|
|
2002
|
+
name: client_4.name,
|
|
2003
|
+
client: client_4,
|
|
2004
|
+
scope: scope_6,
|
|
2005
|
+
transport: "sse",
|
|
2006
|
+
isAuthenticated: undefined,
|
|
2007
|
+
config: client_4.config
|
|
2008
|
+
};
|
|
2009
|
+
} else if (configType_0 === "http") {
|
|
2010
|
+
server_3 = {
|
|
2011
|
+
name: client_4.name,
|
|
2012
|
+
client: client_4,
|
|
2013
|
+
scope: scope_6,
|
|
2014
|
+
transport: "http",
|
|
2015
|
+
isAuthenticated: undefined,
|
|
2016
|
+
config: client_4.config
|
|
2017
|
+
};
|
|
2018
|
+
} else {
|
|
2019
|
+
server_3 = {
|
|
2020
|
+
name: client_4.name,
|
|
2021
|
+
client: client_4,
|
|
2022
|
+
scope: scope_6,
|
|
2023
|
+
transport: "claudeai-proxy",
|
|
2024
|
+
isAuthenticated: undefined,
|
|
2025
|
+
config: client_4.config
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
return jsxDEV_7x81h0kn(MCPToolListView, {
|
|
2029
|
+
server: server_3,
|
|
2030
|
+
onSelectTool: (tool) => {
|
|
2031
|
+
setViewState({
|
|
2032
|
+
type: "mcp-tool-detail",
|
|
2033
|
+
client: client_4,
|
|
2034
|
+
tool
|
|
2035
|
+
});
|
|
2036
|
+
},
|
|
2037
|
+
onBack: () => setViewState({
|
|
2038
|
+
type: "mcp-detail",
|
|
2039
|
+
client: client_4
|
|
2040
|
+
})
|
|
2041
|
+
}, undefined, false, undefined, this);
|
|
2042
|
+
}
|
|
2043
|
+
if (typeof viewState === "object" && viewState.type === "mcp-tool-detail") {
|
|
2044
|
+
const {
|
|
2045
|
+
client: client_5,
|
|
2046
|
+
tool: tool_0
|
|
2047
|
+
} = viewState;
|
|
2048
|
+
const scope_7 = client_5.config.scope;
|
|
2049
|
+
const configType_1 = client_5.config.type;
|
|
2050
|
+
let server_4;
|
|
2051
|
+
if (configType_1 === "stdio") {
|
|
2052
|
+
server_4 = {
|
|
2053
|
+
name: client_5.name,
|
|
2054
|
+
client: client_5,
|
|
2055
|
+
scope: scope_7,
|
|
2056
|
+
transport: "stdio",
|
|
2057
|
+
config: client_5.config
|
|
2058
|
+
};
|
|
2059
|
+
} else if (configType_1 === "sse") {
|
|
2060
|
+
server_4 = {
|
|
2061
|
+
name: client_5.name,
|
|
2062
|
+
client: client_5,
|
|
2063
|
+
scope: scope_7,
|
|
2064
|
+
transport: "sse",
|
|
2065
|
+
isAuthenticated: undefined,
|
|
2066
|
+
config: client_5.config
|
|
2067
|
+
};
|
|
2068
|
+
} else if (configType_1 === "http") {
|
|
2069
|
+
server_4 = {
|
|
2070
|
+
name: client_5.name,
|
|
2071
|
+
client: client_5,
|
|
2072
|
+
scope: scope_7,
|
|
2073
|
+
transport: "http",
|
|
2074
|
+
isAuthenticated: undefined,
|
|
2075
|
+
config: client_5.config
|
|
2076
|
+
};
|
|
2077
|
+
} else {
|
|
2078
|
+
server_4 = {
|
|
2079
|
+
name: client_5.name,
|
|
2080
|
+
client: client_5,
|
|
2081
|
+
scope: scope_7,
|
|
2082
|
+
transport: "claudeai-proxy",
|
|
2083
|
+
isAuthenticated: undefined,
|
|
2084
|
+
config: client_5.config
|
|
2085
|
+
};
|
|
2086
|
+
}
|
|
2087
|
+
return jsxDEV_7x81h0kn(MCPToolDetailView, {
|
|
2088
|
+
tool: tool_0,
|
|
2089
|
+
server: server_4,
|
|
2090
|
+
onBack: () => setViewState({
|
|
2091
|
+
type: "mcp-tools",
|
|
2092
|
+
client: client_5
|
|
2093
|
+
})
|
|
2094
|
+
}, undefined, false, undefined, this);
|
|
2095
|
+
}
|
|
2096
|
+
const visibleItems = pagination.getVisibleItems(filteredItems);
|
|
2097
|
+
return jsxDEV_7x81h0kn(Box, {
|
|
2098
|
+
flexDirection: "column",
|
|
2099
|
+
children: [
|
|
2100
|
+
jsxDEV_7x81h0kn(Box, {
|
|
2101
|
+
marginBottom: 1,
|
|
2102
|
+
children: jsxDEV_7x81h0kn(SearchBox, {
|
|
2103
|
+
query: searchQuery,
|
|
2104
|
+
isFocused: isSearchMode,
|
|
2105
|
+
isTerminalFocused,
|
|
2106
|
+
width: terminalWidth - 4,
|
|
2107
|
+
cursorOffset: searchCursorOffset
|
|
2108
|
+
}, undefined, false, undefined, this)
|
|
2109
|
+
}, undefined, false, undefined, this),
|
|
2110
|
+
filteredItems.length === 0 && searchQuery && jsxDEV_7x81h0kn(Box, {
|
|
2111
|
+
marginBottom: 1,
|
|
2112
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
2113
|
+
dimColor: true,
|
|
2114
|
+
children: [
|
|
2115
|
+
'No items match "',
|
|
2116
|
+
searchQuery,
|
|
2117
|
+
'"'
|
|
2118
|
+
]
|
|
2119
|
+
}, undefined, true, undefined, this)
|
|
2120
|
+
}, undefined, false, undefined, this),
|
|
2121
|
+
pagination.scrollPosition.canScrollUp && jsxDEV_7x81h0kn(Box, {
|
|
2122
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
2123
|
+
dimColor: true,
|
|
2124
|
+
children: [
|
|
2125
|
+
" ",
|
|
2126
|
+
figures.arrowUp,
|
|
2127
|
+
" more above"
|
|
2128
|
+
]
|
|
2129
|
+
}, undefined, true, undefined, this)
|
|
2130
|
+
}, undefined, false, undefined, this),
|
|
2131
|
+
visibleItems.map((item_10, visibleIndex) => {
|
|
2132
|
+
const actualIndex = pagination.toActualIndex(visibleIndex);
|
|
2133
|
+
const isSelected_0 = actualIndex === selectedIndex && !isSearchMode;
|
|
2134
|
+
const prevItem = visibleIndex > 0 ? visibleItems[visibleIndex - 1] : null;
|
|
2135
|
+
const showScopeHeader = !prevItem || prevItem.scope !== item_10.scope;
|
|
2136
|
+
const getScopeLabel = (scope_8) => {
|
|
2137
|
+
switch (scope_8) {
|
|
2138
|
+
case "flagged":
|
|
2139
|
+
return "Flagged";
|
|
2140
|
+
case "project":
|
|
2141
|
+
return "Project";
|
|
2142
|
+
case "local":
|
|
2143
|
+
return "Local";
|
|
2144
|
+
case "user":
|
|
2145
|
+
return "User";
|
|
2146
|
+
case "enterprise":
|
|
2147
|
+
return "Enterprise";
|
|
2148
|
+
case "managed":
|
|
2149
|
+
return "Managed";
|
|
2150
|
+
case "builtin":
|
|
2151
|
+
return "Built-in";
|
|
2152
|
+
case "dynamic":
|
|
2153
|
+
return "Built-in";
|
|
2154
|
+
default:
|
|
2155
|
+
return scope_8;
|
|
2156
|
+
}
|
|
2157
|
+
};
|
|
2158
|
+
return jsxDEV_7x81h0kn(React.Fragment, {
|
|
2159
|
+
children: [
|
|
2160
|
+
showScopeHeader && jsxDEV_7x81h0kn(Box, {
|
|
2161
|
+
marginTop: visibleIndex > 0 ? 1 : 0,
|
|
2162
|
+
paddingLeft: 2,
|
|
2163
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
2164
|
+
dimColor: item_10.scope !== "flagged",
|
|
2165
|
+
color: item_10.scope === "flagged" ? "warning" : undefined,
|
|
2166
|
+
bold: item_10.scope === "flagged",
|
|
2167
|
+
children: getScopeLabel(item_10.scope)
|
|
2168
|
+
}, undefined, false, undefined, this)
|
|
2169
|
+
}, undefined, false, undefined, this),
|
|
2170
|
+
jsxDEV_7x81h0kn(UnifiedInstalledCell, {
|
|
2171
|
+
item: item_10,
|
|
2172
|
+
isSelected: isSelected_0
|
|
2173
|
+
}, undefined, false, undefined, this)
|
|
2174
|
+
]
|
|
2175
|
+
}, item_10.id, true, undefined, this);
|
|
2176
|
+
}),
|
|
2177
|
+
pagination.scrollPosition.canScrollDown && jsxDEV_7x81h0kn(Box, {
|
|
2178
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
2179
|
+
dimColor: true,
|
|
2180
|
+
children: [
|
|
2181
|
+
" ",
|
|
2182
|
+
figures.arrowDown,
|
|
2183
|
+
" more below"
|
|
2184
|
+
]
|
|
2185
|
+
}, undefined, true, undefined, this)
|
|
2186
|
+
}, undefined, false, undefined, this),
|
|
2187
|
+
jsxDEV_7x81h0kn(Box, {
|
|
2188
|
+
marginTop: 1,
|
|
2189
|
+
marginLeft: 1,
|
|
2190
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
2191
|
+
dimColor: true,
|
|
2192
|
+
italic: true,
|
|
2193
|
+
children: jsxDEV_7x81h0kn(Byline, {
|
|
2194
|
+
children: [
|
|
2195
|
+
jsxDEV_7x81h0kn(Text, {
|
|
2196
|
+
children: "type to search"
|
|
2197
|
+
}, undefined, false, undefined, this),
|
|
2198
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
2199
|
+
action: "plugin:toggle",
|
|
2200
|
+
context: "Plugin",
|
|
2201
|
+
fallback: "Space",
|
|
2202
|
+
description: "toggle"
|
|
2203
|
+
}, undefined, false, undefined, this),
|
|
2204
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
2205
|
+
action: "select:accept",
|
|
2206
|
+
context: "Select",
|
|
2207
|
+
fallback: "Enter",
|
|
2208
|
+
description: "details"
|
|
2209
|
+
}, undefined, false, undefined, this),
|
|
2210
|
+
jsxDEV_7x81h0kn(ConfigurableShortcutHint, {
|
|
2211
|
+
action: "confirm:no",
|
|
2212
|
+
context: "Confirmation",
|
|
2213
|
+
fallback: "Esc",
|
|
2214
|
+
description: "back"
|
|
2215
|
+
}, undefined, false, undefined, this)
|
|
2216
|
+
]
|
|
2217
|
+
}, undefined, true, undefined, this)
|
|
2218
|
+
}, undefined, false, undefined, this)
|
|
2219
|
+
}, undefined, false, undefined, this),
|
|
2220
|
+
pendingToggles.size > 0 && jsxDEV_7x81h0kn(Box, {
|
|
2221
|
+
marginLeft: 1,
|
|
2222
|
+
children: jsxDEV_7x81h0kn(Text, {
|
|
2223
|
+
dimColor: true,
|
|
2224
|
+
italic: true,
|
|
2225
|
+
children: "Run /reload-plugins to apply changes"
|
|
2226
|
+
}, undefined, false, undefined, this)
|
|
2227
|
+
}, undefined, false, undefined, this)
|
|
2228
|
+
]
|
|
2229
|
+
}, undefined, true, undefined, this);
|
|
2230
|
+
}
|