@iaforged/context-code 1.0.72 → 1.0.74
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/context-bootstrap.js +7 -8
- package/dist/src/QueryEngine.js +928 -0
- package/dist/src/Task.js +49 -0
- package/dist/src/Tool.js +56 -0
- package/dist/src/assistant/AssistantSessionChooser.js +16 -0
- package/dist/src/assistant/index.js +16 -0
- package/dist/src/assistant/sessionDiscovery.js +16 -0
- package/dist/src/assistant/sessionHistory.js +47 -0
- package/dist/src/bootstrap/state.js +1165 -0
- package/dist/src/bridge/bridgeApi.js +304 -0
- package/dist/src/bridge/bridgeConfig.js +39 -0
- package/dist/src/bridge/bridgeDebug.js +73 -0
- package/dist/src/bridge/bridgeEnabled.js +187 -0
- package/dist/src/bridge/bridgeMain.js +2289 -0
- package/dist/src/bridge/bridgeMessaging.js +353 -0
- package/dist/src/bridge/bridgePermissionCallbacks.js +10 -0
- package/dist/src/bridge/bridgePointer.js +175 -0
- package/dist/src/bridge/bridgeStatusUtil.js +105 -0
- package/dist/src/bridge/bridgeUI.js +412 -0
- package/dist/src/bridge/capacityWake.js +35 -0
- package/dist/src/bridge/codeSessionApi.js +111 -0
- package/dist/src/bridge/createSession.js +273 -0
- package/dist/src/bridge/debugUtils.js +115 -0
- package/dist/src/bridge/envLessBridgeConfig.js +121 -0
- package/dist/src/bridge/flushGate.js +65 -0
- package/dist/src/bridge/inboundAttachments.js +152 -0
- package/dist/src/bridge/inboundMessages.js +63 -0
- package/dist/src/bridge/initReplBridge.js +428 -0
- package/dist/src/bridge/jwtUtils.js +185 -0
- package/dist/src/bridge/pollConfig.js +85 -0
- package/dist/src/bridge/pollConfigDefaults.js +62 -0
- package/dist/src/bridge/remoteBridgeCore.js +712 -0
- package/dist/src/bridge/replBridge.js +1720 -0
- package/dist/src/bridge/replBridgeHandle.js +30 -0
- package/dist/src/bridge/replBridgeTransport.js +236 -0
- package/dist/src/bridge/sessionIdCompat.js +56 -0
- package/dist/src/bridge/sessionRunner.js +421 -0
- package/dist/src/bridge/trustedDevice.js +172 -0
- package/dist/src/bridge/types.js +9 -0
- package/dist/src/bridge/workSecret.js +99 -0
- package/dist/src/buddy/CompanionSprite.js +349 -0
- package/dist/src/buddy/companion.js +107 -0
- package/dist/src/buddy/prompt.js +33 -0
- package/dist/src/buddy/sprites.js +488 -0
- package/dist/src/buddy/types.js +90 -0
- package/dist/src/buddy/useBuddyNotification.js +90 -0
- package/dist/src/cli/bg.js +16 -0
- package/dist/src/cli/exit.js +30 -0
- package/dist/src/cli/handlers/agents.js +55 -0
- package/dist/src/cli/handlers/ant.js +16 -0
- package/dist/src/cli/handlers/auth.js +315 -0
- package/dist/src/cli/handlers/autoMode.js +128 -0
- package/dist/src/cli/handlers/mcp.js +334 -0
- package/dist/src/cli/handlers/plugins.js +634 -0
- package/dist/src/cli/handlers/projects_bridge.js +40 -0
- package/dist/src/cli/handlers/provider.js +42 -0
- package/dist/src/cli/handlers/templateJobs.js +16 -0
- package/dist/src/cli/handlers/util.js +76 -0
- package/dist/src/cli/ndjsonSafeStringify.js +27 -0
- package/dist/src/cli/print.js +4225 -0
- package/dist/src/cli/remoteIO.js +208 -0
- package/dist/src/cli/rollback.js +16 -0
- package/dist/src/cli/structuredIO.js +644 -0
- package/dist/src/cli/transports/HybridTransport.js +233 -0
- package/dist/src/cli/transports/SSETransport.js +538 -0
- package/dist/src/cli/transports/SerialBatchEventUploader.js +224 -0
- package/dist/src/cli/transports/Transport.js +1 -0
- package/dist/src/cli/transports/WebSocketTransport.js +613 -0
- package/dist/src/cli/transports/WorkerStateUploader.js +88 -0
- package/dist/src/cli/transports/ccrClient.js +711 -0
- package/dist/src/cli/transports/transportUtils.js +39 -0
- package/dist/src/cli/up.js +16 -0
- package/dist/src/cli/update.js +315 -0
- package/dist/src/commands/add-dir/add-dir.js +121 -0
- package/dist/src/commands/add-dir/index.js +8 -0
- package/dist/src/commands/add-dir/validation.js +76 -0
- package/dist/src/commands/advisor.js +88 -0
- package/dist/src/commands/agent/agent.js +283 -0
- package/dist/src/commands/agent/agentStore.js +120 -0
- package/dist/src/commands/agent/index.js +9 -0
- package/dist/src/commands/agents/agents.js +9 -0
- package/dist/src/commands/agents/index.js +7 -0
- package/dist/src/commands/ant-trace/index.js +1 -0
- package/dist/src/commands/assistant/assistant.js +16 -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 +205 -0
- package/dist/src/commands/branch/index.js +11 -0
- package/dist/src/commands/break-cache/index.js +1 -0
- package/dist/src/commands/bridge/bridge.js +512 -0
- package/dist/src/commands/bridge/index.js +22 -0
- package/dist/src/commands/bridge-kick.js +179 -0
- package/dist/src/commands/brief.js +94 -0
- package/dist/src/commands/btw/btw.js +234 -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 +291 -0
- package/dist/src/commands/chrome/index.js +11 -0
- package/dist/src/commands/clear/caches.js +116 -0
- package/dist/src/commands/clear/clear.js +5 -0
- package/dist/src/commands/clear/conversation.js +191 -0
- package/dist/src/commands/clear/index.js +9 -0
- package/dist/src/commands/color/color.js +58 -0
- package/dist/src/commands/color/index.js +9 -0
- package/dist/src/commands/commit-push-pr.js +137 -0
- package/dist/src/commands/commit.js +80 -0
- package/dist/src/commands/compact/compact.js +196 -0
- package/dist/src/commands/compact/index.js +11 -0
- package/dist/src/commands/config/config.js +5 -0
- package/dist/src/commands/config/index.js +8 -0
- package/dist/src/commands/context/context-noninteractive.js +221 -0
- package/dist/src/commands/context/context.js +46 -0
- package/dist/src/commands/context/index.js +21 -0
- package/dist/src/commands/copy/copy.js +366 -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 +16 -0
- package/dist/src/commands/createMovedToPluginCommand.js +33 -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 +5 -0
- package/dist/src/commands/desktop/index.js +22 -0
- package/dist/src/commands/diff/diff.js +5 -0
- package/dist/src/commands/diff/index.js +6 -0
- package/dist/src/commands/doctor/doctor.js +5 -0
- package/dist/src/commands/doctor/index.js +9 -0
- package/dist/src/commands/effort/effort.js +166 -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 +31 -0
- package/dist/src/commands/exit/index.js +9 -0
- package/dist/src/commands/export/export.js +86 -0
- package/dist/src/commands/export/index.js +8 -0
- package/dist/src/commands/extra-usage/extra-usage-core.js +99 -0
- package/dist/src/commands/extra-usage/extra-usage-noninteractive.js +13 -0
- package/dist/src/commands/extra-usage/extra-usage.js +14 -0
- package/dist/src/commands/extra-usage/index.js +27 -0
- package/dist/src/commands/fast/fast.js +275 -0
- package/dist/src/commands/fast/index.js +20 -0
- package/dist/src/commands/feedback/feedback.js +10 -0
- package/dist/src/commands/feedback/index.js +21 -0
- package/dist/src/commands/files/files.js +11 -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 +14 -0
- package/dist/src/commands/heapdump/index.js +9 -0
- package/dist/src/commands/help/help.js +5 -0
- package/dist/src/commands/help/index.js +7 -0
- package/dist/src/commands/hooks/hooks.js +11 -0
- package/dist/src/commands/hooks/index.js +8 -0
- package/dist/src/commands/ide/ide.js +615 -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 +249 -0
- package/dist/src/commands/insights.js +2555 -0
- package/dist/src/commands/install-github-app/ApiKeyStep.js +230 -0
- package/dist/src/commands/install-github-app/CheckExistingSecretStep.js +194 -0
- package/dist/src/commands/install-github-app/CheckGitHubStep.js +15 -0
- package/dist/src/commands/install-github-app/ChooseRepoStep.js +211 -0
- package/dist/src/commands/install-github-app/CreatingStep.js +52 -0
- package/dist/src/commands/install-github-app/ErrorStep.js +83 -0
- package/dist/src/commands/install-github-app/ExistingWorkflowStep.js +104 -0
- package/dist/src/commands/install-github-app/InstallAppStep.js +96 -0
- package/dist/src/commands/install-github-app/OAuthFlowStep.js +190 -0
- package/dist/src/commands/install-github-app/SuccessStep.js +93 -0
- package/dist/src/commands/install-github-app/WarningsStep.js +70 -0
- package/dist/src/commands/install-github-app/index.js +10 -0
- package/dist/src/commands/install-github-app/install-github-app.js +593 -0
- package/dist/src/commands/install-github-app/setupGitHubActions.js +227 -0
- package/dist/src/commands/install-slack-app/index.js +9 -0
- package/dist/src/commands/install-slack-app/install-slack-app.js +25 -0
- package/dist/src/commands/install.js +118 -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 +47 -0
- package/dist/src/commands/limites/index.js +8 -0
- package/dist/src/commands/limites/limites.js +214 -0
- package/dist/src/commands/login/index.js +11 -0
- package/dist/src/commands/login/login.js +120 -0
- package/dist/src/commands/login-openai/index.js +7 -0
- package/dist/src/commands/login-openai/login-openai.js +54 -0
- package/dist/src/commands/logout/index.js +8 -0
- package/dist/src/commands/logout/logout.js +72 -0
- package/dist/src/commands/mcp/addCommand.js +183 -0
- package/dist/src/commands/mcp/index.js +9 -0
- package/dist/src/commands/mcp/mcp.js +78 -0
- package/dist/src/commands/mcp/xaaIdpCommand.js +193 -0
- package/dist/src/commands/memory/index.js +7 -0
- package/dist/src/commands/memory/memory.js +71 -0
- package/dist/src/commands/mobile/index.js +9 -0
- package/dist/src/commands/mobile/mobile.js +278 -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 +297 -0
- package/dist/src/commands/oauth-refresh/index.js +1 -0
- package/dist/src/commands/onboarding/index.js +1 -0
- package/dist/src/commands/orchestrate/index.js +8 -0
- package/dist/src/commands/orchestrate/orchestrate.js +542 -0
- package/dist/src/commands/output-style/index.js +8 -0
- package/dist/src/commands/output-style/output-style.js +6 -0
- package/dist/src/commands/passes/index.js +17 -0
- package/dist/src/commands/passes/passes.js +22 -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 +8 -0
- package/dist/src/commands/plan/index.js +8 -0
- package/dist/src/commands/plan/plan.js +115 -0
- package/dist/src/commands/plugin/AddMarketplace.js +95 -0
- package/dist/src/commands/plugin/BrowseMarketplace.js +576 -0
- package/dist/src/commands/plugin/DiscoverPlugins.js +613 -0
- package/dist/src/commands/plugin/ManageMarketplaces.js +582 -0
- package/dist/src/commands/plugin/ManagePlugins.js +1783 -0
- package/dist/src/commands/plugin/PluginErrors.js +124 -0
- package/dist/src/commands/plugin/PluginOptionsDialog.js +367 -0
- package/dist/src/commands/plugin/PluginOptionsFlow.js +97 -0
- package/dist/src/commands/plugin/PluginSettings.js +1042 -0
- package/dist/src/commands/plugin/PluginTrustWarning.js +34 -0
- package/dist/src/commands/plugin/UnifiedInstalledCell.js +615 -0
- package/dist/src/commands/plugin/ValidatePlugin.js +95 -0
- package/dist/src/commands/plugin/index.js +10 -0
- package/dist/src/commands/plugin/parseArgs.js +71 -0
- package/dist/src/commands/plugin/plugin.js +5 -0
- package/dist/src/commands/plugin/pluginDetailsHelpers.js +89 -0
- package/dist/src/commands/plugin/usePagination.js +89 -0
- package/dist/src/commands/policy/index.js +9 -0
- package/dist/src/commands/policy/policy.js +84 -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 +54 -0
- package/dist/src/commands/profile/index.js +9 -0
- package/dist/src/commands/profile/profile.js +482 -0
- package/dist/src/commands/provider/index.js +8 -0
- package/dist/src/commands/provider/provider.js +457 -0
- package/dist/src/commands/rate-limit-options/index.js +15 -0
- package/dist/src/commands/rate-limit-options/rate-limit-options.js +213 -0
- package/dist/src/commands/release-notes/index.js +9 -0
- package/dist/src/commands/release-notes/release-notes.js +38 -0
- package/dist/src/commands/reload-plugins/index.js +11 -0
- package/dist/src/commands/reload-plugins/reload-plugins.js +52 -0
- package/dist/src/commands/remote-env/index.js +12 -0
- package/dist/src/commands/remote-env/remote-env.js +5 -0
- package/dist/src/commands/remote-setup/api.js +155 -0
- package/dist/src/commands/remote-setup/index.js +15 -0
- package/dist/src/commands/remote-setup/remote-setup.js +149 -0
- package/dist/src/commands/rename/generateSessionName.js +58 -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 +239 -0
- package/dist/src/commands/review/UltrareviewOverageDialog.js +97 -0
- package/dist/src/commands/review/reviewRemote.js +259 -0
- package/dist/src/commands/review/ultrareviewCommand.js +57 -0
- package/dist/src/commands/review/ultrareviewEnabled.js +10 -0
- package/dist/src/commands/review.js +50 -0
- package/dist/src/commands/rewind/index.js +10 -0
- package/dist/src/commands/rewind/rewind.js +7 -0
- package/dist/src/commands/run/index.js +9 -0
- package/dist/src/commands/run/run.js +1126 -0
- package/dist/src/commands/sandbox-toggle/index.js +41 -0
- package/dist/src/commands/sandbox-toggle/sandbox-toggle.js +72 -0
- package/dist/src/commands/security-review.js +231 -0
- package/dist/src/commands/session/index.js +13 -0
- package/dist/src/commands/session/session.js +142 -0
- package/dist/src/commands/share/index.js +1 -0
- package/dist/src/commands/skills/index.js +8 -0
- package/dist/src/commands/skills/skills.js +97 -0
- package/dist/src/commands/stats/index.js +7 -0
- package/dist/src/commands/stats/stats.js +5 -0
- package/dist/src/commands/status/index.js +8 -0
- package/dist/src/commands/status/status.js +5 -0
- package/dist/src/commands/statusline.js +22 -0
- package/dist/src/commands/stickers/index.js +9 -0
- package/dist/src/commands/stickers/stickers.js +14 -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 +215 -0
- package/dist/src/commands/tasks/index.js +8 -0
- package/dist/src/commands/tasks/tasks.js +5 -0
- package/dist/src/commands/team/index.js +9 -0
- package/dist/src/commands/team/team.js +582 -0
- package/dist/src/commands/team-auto/index.js +9 -0
- package/dist/src/commands/team-auto/teamAuto.js +340 -0
- package/dist/src/commands/telegram/index.js +9 -0
- package/dist/src/commands/telegram/telegram.js +118 -0
- package/dist/src/commands/teleport/index.js +1 -0
- package/dist/src/commands/terminalSetup/index.js +18 -0
- package/dist/src/commands/terminalSetup/terminalSetup.js +491 -0
- package/dist/src/commands/theme/index.js +7 -0
- package/dist/src/commands/theme/theme.js +50 -0
- package/dist/src/commands/thinkback/index.js +9 -0
- package/dist/src/commands/thinkback/thinkback.js +527 -0
- package/dist/src/commands/thinkback-play/index.js +13 -0
- package/dist/src/commands/thinkback-play/thinkback-play.js +34 -0
- package/dist/src/commands/ultraplan.js +418 -0
- package/dist/src/commands/upgrade/index.js +12 -0
- package/dist/src/commands/upgrade/upgrade.js +37 -0
- package/dist/src/commands/version.js +18 -0
- package/dist/src/commands/vim/index.js +8 -0
- package/dist/src/commands/vim/vim.js +25 -0
- package/dist/src/commands/voice/index.js +14 -0
- package/dist/src/commands/voice/voice.js +130 -0
- package/dist/src/commands/whatsapp/index.js +9 -0
- package/dist/src/commands/whatsapp/whatsapp.js +326 -0
- package/dist/src/commands/workspace/index.js +9 -0
- package/dist/src/commands/workspace/workspace.js +701 -0
- package/dist/src/commands.js +635 -0
- package/dist/src/components/AgentProgressLine.js +111 -0
- package/dist/src/components/App.js +45 -0
- package/dist/src/components/ApproveApiKey.js +124 -0
- package/dist/src/components/AutoModeOptInDialog.js +140 -0
- package/dist/src/components/AutoUpdater.js +157 -0
- package/dist/src/components/AutoUpdaterWrapper.js +78 -0
- package/dist/src/components/AwsAuthStatusBox.js +88 -0
- package/dist/src/components/BaseTextInput.js +105 -0
- package/dist/src/components/BashModeProgress.js +48 -0
- package/dist/src/components/BridgeDialog.js +414 -0
- package/dist/src/components/BypassPermissionsModeDialog.js +87 -0
- package/dist/src/components/ChannelDowngradeDialog.js +100 -0
- package/dist/src/components/ClaudeCodeHint/PluginHintMenu.js +37 -0
- package/dist/src/components/ClaudeInChromeOnboarding.js +126 -0
- package/dist/src/components/ClaudeMdExternalIncludesDialog.js +137 -0
- package/dist/src/components/ClickableImageRef.js +64 -0
- package/dist/src/components/CompactSummary.js +119 -0
- package/dist/src/components/ConfigurableShortcutHint.js +34 -0
- package/dist/src/components/ConsoleOAuthFlow.js +758 -0
- package/dist/src/components/ContextSuggestions.js +43 -0
- package/dist/src/components/ContextVisualization.js +483 -0
- package/dist/src/components/CoordinatorAgentStatus.js +261 -0
- package/dist/src/components/CostThresholdDialog.js +48 -0
- package/dist/src/components/CtrlOToExpand.js +50 -0
- package/dist/src/components/CustomSelect/SelectMulti.js +149 -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 +426 -0
- package/dist/src/components/CustomSelect/select-option.js +23 -0
- package/dist/src/components/CustomSelect/select.js +518 -0
- package/dist/src/components/CustomSelect/use-multi-select-state.js +214 -0
- package/dist/src/components/CustomSelect/use-select-input.js +170 -0
- package/dist/src/components/CustomSelect/use-select-navigation.js +366 -0
- package/dist/src/components/CustomSelect/use-select-state.js +22 -0
- package/dist/src/components/DesktopHandoff.js +195 -0
- package/dist/src/components/DesktopUpsell/DesktopUpsellStartup.js +173 -0
- package/dist/src/components/DevBar.js +50 -0
- package/dist/src/components/DevChannelsDialog.js +103 -0
- package/dist/src/components/DiagnosticsDisplay.js +91 -0
- package/dist/src/components/EffortCallout.js +264 -0
- package/dist/src/components/EffortIndicator.js +29 -0
- package/dist/src/components/ExitFlow.js +40 -0
- package/dist/src/components/ExportDialog.js +101 -0
- package/dist/src/components/FallbackToolUseErrorMessage.js +115 -0
- package/dist/src/components/FallbackToolUseRejectedMessage.js +16 -0
- package/dist/src/components/FastIcon.js +42 -0
- package/dist/src/components/Feedback.js +439 -0
- package/dist/src/components/FeedbackSurvey/FeedbackSurvey.js +150 -0
- package/dist/src/components/FeedbackSurvey/FeedbackSurveyView.js +103 -0
- package/dist/src/components/FeedbackSurvey/TranscriptSharePrompt.js +83 -0
- package/dist/src/components/FeedbackSurvey/submitTranscriptShare.js +81 -0
- package/dist/src/components/FeedbackSurvey/useDebouncedDigitInput.js +51 -0
- package/dist/src/components/FeedbackSurvey/useFeedbackSurvey.js +258 -0
- package/dist/src/components/FeedbackSurvey/useMemorySurvey.js +191 -0
- package/dist/src/components/FeedbackSurvey/usePostCompactSurvey.js +202 -0
- package/dist/src/components/FeedbackSurvey/useSurveyState.js +80 -0
- package/dist/src/components/FileEditToolDiff.js +166 -0
- package/dist/src/components/FileEditToolUpdatedMessage.js +111 -0
- package/dist/src/components/FileEditToolUseRejectedMessage.js +157 -0
- package/dist/src/components/FilePathLink.js +34 -0
- package/dist/src/components/FullscreenLayout.js +578 -0
- package/dist/src/components/GlobalSearchDialog.js +339 -0
- package/dist/src/components/HelpV2/Commands.js +65 -0
- package/dist/src/components/HelpV2/General.js +24 -0
- package/dist/src/components/HelpV2/HelpV2.js +186 -0
- package/dist/src/components/HighlightedCode/Fallback.js +193 -0
- package/dist/src/components/HighlightedCode.js +184 -0
- package/dist/src/components/HistorySearchDialog.js +92 -0
- package/dist/src/components/IdeAutoConnectDialog.js +153 -0
- package/dist/src/components/IdeOnboardingDialog.js +174 -0
- package/dist/src/components/IdeStatusIndicator.js +49 -0
- package/dist/src/components/IdleReturnDialog.js +116 -0
- package/dist/src/components/InterruptedByUser.js +15 -0
- package/dist/src/components/InvalidConfigDialog.js +134 -0
- package/dist/src/components/InvalidSettingsDialog.js +84 -0
- package/dist/src/components/KeybindingWarnings.js +54 -0
- package/dist/src/components/LanguagePicker.js +84 -0
- package/dist/src/components/LogSelector.js +1579 -0
- package/dist/src/components/LogoV2/AnimatedAsterisk.js +42 -0
- package/dist/src/components/LogoV2/AnimatedClawd.js +111 -0
- package/dist/src/components/LogoV2/ChannelsNotice.js +258 -0
- package/dist/src/components/LogoV2/Clawd.js +12 -0
- package/dist/src/components/LogoV2/CondensedLogo.js +144 -0
- package/dist/src/components/LogoV2/EmergencyTip.js +47 -0
- package/dist/src/components/LogoV2/Feed.js +84 -0
- package/dist/src/components/LogoV2/FeedColumn.js +55 -0
- package/dist/src/components/LogoV2/GuestPassesUpsell.js +71 -0
- package/dist/src/components/LogoV2/LogoV2.js +564 -0
- package/dist/src/components/LogoV2/Opus1mMergeNotice.js +56 -0
- package/dist/src/components/LogoV2/OverageCreditUpsell.js +160 -0
- package/dist/src/components/LogoV2/VoiceModeNotice.js +70 -0
- package/dist/src/components/LogoV2/WelcomeV2.js +8 -0
- package/dist/src/components/LogoV2/feedConfigs.js +78 -0
- package/dist/src/components/LspRecommendation/LspRecommendationMenu.js +46 -0
- package/dist/src/components/MCPServerApprovalDialog.js +113 -0
- package/dist/src/components/MCPServerDesktopImportDialog.js +206 -0
- package/dist/src/components/MCPServerDialogCopy.js +15 -0
- package/dist/src/components/MCPServerMultiselectDialog.js +133 -0
- package/dist/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.js +149 -0
- package/dist/src/components/ManagedSettingsSecurityDialog/utils.js +105 -0
- package/dist/src/components/Markdown.js +217 -0
- package/dist/src/components/MarkdownTable.js +279 -0
- package/dist/src/components/MemoryUsageIndicator.js +27 -0
- package/dist/src/components/Message.js +566 -0
- package/dist/src/components/MessageModel.js +36 -0
- package/dist/src/components/MessageResponse.js +73 -0
- package/dist/src/components/MessageRow.js +346 -0
- package/dist/src/components/MessageSelector.js +743 -0
- package/dist/src/components/MessageTimestamp.js +57 -0
- package/dist/src/components/Messages.js +637 -0
- package/dist/src/components/ModelPicker.js +493 -0
- package/dist/src/components/NativeAutoUpdater.js +153 -0
- package/dist/src/components/NotebookEditToolUseRejectedMessage.js +83 -0
- package/dist/src/components/OffscreenFreeze.js +35 -0
- package/dist/src/components/Onboarding.js +174 -0
- package/dist/src/components/OutputStylePicker.js +102 -0
- package/dist/src/components/PackageManagerAutoUpdater.js +100 -0
- package/dist/src/components/Passes/Passes.js +113 -0
- package/dist/src/components/PrBadge.js +90 -0
- package/dist/src/components/PressEnterToContinue.js +15 -0
- package/dist/src/components/PromptInput/HistorySearchInput.js +44 -0
- package/dist/src/components/PromptInput/IssueFlagBanner.js +8 -0
- package/dist/src/components/PromptInput/Notifications.js +221 -0
- package/dist/src/components/PromptInput/PromptInput.js +1998 -0
- package/dist/src/components/PromptInput/PromptInputFooter.js +84 -0
- package/dist/src/components/PromptInput/PromptInputFooterLeftSide.js +409 -0
- package/dist/src/components/PromptInput/PromptInputFooterSuggestions.js +280 -0
- package/dist/src/components/PromptInput/PromptInputHelpMenu.js +379 -0
- package/dist/src/components/PromptInput/PromptInputModeIndicator.js +72 -0
- package/dist/src/components/PromptInput/PromptInputQueuedCommands.js +105 -0
- package/dist/src/components/PromptInput/PromptInputStashNotice.js +20 -0
- package/dist/src/components/PromptInput/SandboxPromptFooterHint.js +65 -0
- package/dist/src/components/PromptInput/ShimmeredInput.js +132 -0
- package/dist/src/components/PromptInput/VoiceIndicator.js +136 -0
- package/dist/src/components/PromptInput/inputModes.js +24 -0
- package/dist/src/components/PromptInput/inputPaste.js +62 -0
- package/dist/src/components/PromptInput/useMaybeTruncateInput.js +33 -0
- package/dist/src/components/PromptInput/usePromptInputPlaceholder.js +55 -0
- package/dist/src/components/PromptInput/useShowFastIconHint.js +23 -0
- package/dist/src/components/PromptInput/useSwarmBanner.js +112 -0
- package/dist/src/components/PromptInput/utils.js +50 -0
- package/dist/src/components/QuickOpenDialog.js +243 -0
- package/dist/src/components/RemoteCallout.js +53 -0
- package/dist/src/components/RemoteEnvironmentDialog.js +345 -0
- package/dist/src/components/ResumeTask.js +173 -0
- package/dist/src/components/SandboxViolationExpandedView.js +102 -0
- package/dist/src/components/ScrollKeybindingHandler.js +982 -0
- package/dist/src/components/SearchBox.js +55 -0
- package/dist/src/components/SentryErrorBoundary.js +16 -0
- package/dist/src/components/SessionBackgroundHint.js +104 -0
- package/dist/src/components/SessionPreview.js +200 -0
- package/dist/src/components/Settings/Config.js +1628 -0
- package/dist/src/components/Settings/Settings.js +129 -0
- package/dist/src/components/Settings/Status.js +239 -0
- package/dist/src/components/Settings/Usage.js +341 -0
- package/dist/src/components/ShowInIDEPrompt.js +151 -0
- package/dist/src/components/SkillImprovementSurvey.js +130 -0
- package/dist/src/components/Spinner/FlashingChar.js +51 -0
- package/dist/src/components/Spinner/GlimmerMessage.js +328 -0
- package/dist/src/components/Spinner/ShimmerChar.js +22 -0
- package/dist/src/components/Spinner/SpinnerAnimationRow.js +169 -0
- package/dist/src/components/Spinner/SpinnerGlyph.js +69 -0
- package/dist/src/components/Spinner/TeammateSpinnerLine.js +170 -0
- package/dist/src/components/Spinner/TeammateSpinnerTree.js +268 -0
- package/dist/src/components/Spinner/index.js +11 -0
- package/dist/src/components/Spinner/teammateSelectHint.js +1 -0
- package/dist/src/components/Spinner/useShimmerAnimation.js +22 -0
- package/dist/src/components/Spinner/useStalledAnimation.js +63 -0
- package/dist/src/components/Spinner/utils.js +77 -0
- package/dist/src/components/Spinner.js +470 -0
- package/dist/src/components/Stats.js +1000 -0
- package/dist/src/components/StatusLine.js +288 -0
- package/dist/src/components/StatusNotices.js +50 -0
- package/dist/src/components/StructuredDiff/Fallback.js +335 -0
- package/dist/src/components/StructuredDiff/colorDiff.js +26 -0
- package/dist/src/components/StructuredDiff.js +152 -0
- package/dist/src/components/StructuredDiffList.js +8 -0
- package/dist/src/components/TagTabs.js +100 -0
- package/dist/src/components/TaskListV2.js +333 -0
- package/dist/src/components/TeammateViewHeader.js +87 -0
- package/dist/src/components/TeleportError.js +191 -0
- package/dist/src/components/TeleportProgress.js +130 -0
- package/dist/src/components/TeleportRepoMismatchDialog.js +98 -0
- package/dist/src/components/TeleportResumeWrapper.js +158 -0
- package/dist/src/components/TeleportStash.js +82 -0
- package/dist/src/components/TextInput.js +108 -0
- package/dist/src/components/ThemePicker.js +330 -0
- package/dist/src/components/ThinkingToggle.js +153 -0
- package/dist/src/components/TokenWarning.js +172 -0
- package/dist/src/components/ToolUseLoader.js +34 -0
- package/dist/src/components/TrustDialog/TrustDialog.js +113 -0
- package/dist/src/components/TrustDialog/utils.js +199 -0
- package/dist/src/components/ValidationErrorsList.js +146 -0
- package/dist/src/components/VimTextInput.js +136 -0
- package/dist/src/components/VirtualMessageList.js +892 -0
- package/dist/src/components/WorkflowMultiselectDialog.js +118 -0
- package/dist/src/components/WorktreeExitDialog.js +222 -0
- package/dist/src/components/agents/AgentDetail.js +226 -0
- package/dist/src/components/agents/AgentEditor.js +146 -0
- package/dist/src/components/agents/AgentNavigationFooter.js +21 -0
- package/dist/src/components/agents/AgentsList.js +436 -0
- package/dist/src/components/agents/AgentsMenu.js +848 -0
- package/dist/src/components/agents/ColorPicker.js +110 -0
- package/dist/src/components/agents/ModelSelector.js +62 -0
- package/dist/src/components/agents/SnapshotUpdateDialog.js +16 -0
- package/dist/src/components/agents/ToolSelector.js +557 -0
- package/dist/src/components/agents/agentFileUtils.js +187 -0
- package/dist/src/components/agents/generateAgent.js +161 -0
- package/dist/src/components/agents/new-agent-creation/CreateAgentWizard.js +88 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ColorStep.js +80 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStep.js +386 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStepWrapper.js +63 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.js +126 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/GenerateStep.js +118 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/LocationStep.js +92 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/MemoryStep.js +120 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +79 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ModelStep.js +48 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/PromptStep.js +131 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/ToolsStep.js +51 -0
- package/dist/src/components/agents/new-agent-creation/wizard-steps/TypeStep.js +100 -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 +79 -0
- package/dist/src/components/design-system/Byline.js +72 -0
- package/dist/src/components/design-system/Dialog.js +116 -0
- package/dist/src/components/design-system/Divider.js +109 -0
- package/dist/src/components/design-system/FuzzyPicker.js +187 -0
- package/dist/src/components/design-system/KeyboardShortcutHint.js +67 -0
- package/dist/src/components/design-system/ListItem.js +183 -0
- package/dist/src/components/design-system/LoadingState.js +68 -0
- package/dist/src/components/design-system/Pane.js +68 -0
- package/dist/src/components/design-system/ProgressBar.js +62 -0
- package/dist/src/components/design-system/Ratchet.js +71 -0
- package/dist/src/components/design-system/StatusIcon.js +69 -0
- package/dist/src/components/design-system/Tabs.js +269 -0
- package/dist/src/components/design-system/ThemeProvider.js +137 -0
- package/dist/src/components/design-system/ThemedBox.js +125 -0
- package/dist/src/components/design-system/ThemedText.js +60 -0
- package/dist/src/components/design-system/color.js +22 -0
- package/dist/src/components/diff/DiffDetailView.js +284 -0
- package/dist/src/components/diff/DiffDialog.js +387 -0
- package/dist/src/components/diff/DiffFileList.js +291 -0
- package/dist/src/components/grove/Grove.js +483 -0
- package/dist/src/components/hooks/HooksConfigMenu.js +570 -0
- package/dist/src/components/hooks/PromptDialog.js +81 -0
- package/dist/src/components/hooks/SelectEventMode.js +117 -0
- package/dist/src/components/hooks/SelectHookMode.js +93 -0
- package/dist/src/components/hooks/SelectMatcherMode.js +124 -0
- package/dist/src/components/hooks/ViewHookMode.js +197 -0
- package/dist/src/components/mcp/CapabilitiesSection.js +55 -0
- package/dist/src/components/mcp/ElicitationDialog.js +945 -0
- package/dist/src/components/mcp/MCPAgentServerMenu.js +95 -0
- package/dist/src/components/mcp/MCPListPanel.js +504 -0
- package/dist/src/components/mcp/MCPReconnect.js +168 -0
- package/dist/src/components/mcp/MCPRemoteServerMenu.js +460 -0
- package/dist/src/components/mcp/MCPSettings.js +414 -0
- package/dist/src/components/mcp/MCPStdioServerMenu.js +95 -0
- package/dist/src/components/mcp/MCPToolDetailView.js +219 -0
- package/dist/src/components/mcp/MCPToolListView.js +136 -0
- package/dist/src/components/mcp/McpParsingWarnings.js +211 -0
- package/dist/src/components/mcp/index.js +8 -0
- package/dist/src/components/mcp/types.js +3 -0
- package/dist/src/components/mcp/utils/reconnectHelpers.js +35 -0
- package/dist/src/components/memory/MemoryFileSelector.js +455 -0
- package/dist/src/components/memory/MemoryUpdateNotification.js +42 -0
- package/dist/src/components/messageActions.js +418 -0
- package/dist/src/components/messages/AdvisorMessage.js +151 -0
- package/dist/src/components/messages/AssistantRedactedThinkingMessage.js +27 -0
- package/dist/src/components/messages/AssistantTextMessage.js +274 -0
- package/dist/src/components/messages/AssistantThinkingMessage.js +69 -0
- package/dist/src/components/messages/AssistantToolUseMessage.js +323 -0
- package/dist/src/components/messages/AttachmentMessage.js +418 -0
- package/dist/src/components/messages/CollapsedReadSearchContent.js +362 -0
- package/dist/src/components/messages/CompactBoundaryMessage.js +18 -0
- package/dist/src/components/messages/GroupedToolUseContent.js +37 -0
- package/dist/src/components/messages/HighlightedThinkingText.js +164 -0
- package/dist/src/components/messages/HookProgressMessage.js +110 -0
- package/dist/src/components/messages/PlanApprovalMessage.js +212 -0
- package/dist/src/components/messages/RateLimitMessage.js +149 -0
- package/dist/src/components/messages/ShutdownMessage.js +123 -0
- package/dist/src/components/messages/SystemAPIErrorMessage.js +135 -0
- package/dist/src/components/messages/SystemTextMessage.js +843 -0
- package/dist/src/components/messages/TaskAssignmentMessage.js +71 -0
- package/dist/src/components/messages/UserAgentNotificationMessage.js +77 -0
- package/dist/src/components/messages/UserBashInputMessage.js +51 -0
- package/dist/src/components/messages/UserBashOutputMessage.js +54 -0
- package/dist/src/components/messages/UserChannelMessage.js +129 -0
- package/dist/src/components/messages/UserCommandMessage.js +106 -0
- package/dist/src/components/messages/UserImageMessage.js +53 -0
- package/dist/src/components/messages/UserLocalCommandOutputMessage.js +169 -0
- package/dist/src/components/messages/UserMemoryInputMessage.js +72 -0
- package/dist/src/components/messages/UserPlanMessage.js +37 -0
- package/dist/src/components/messages/UserPromptMessage.js +63 -0
- package/dist/src/components/messages/UserResourceUpdateMessage.js +101 -0
- package/dist/src/components/messages/UserTeammateMessage.js +156 -0
- package/dist/src/components/messages/UserTextMessage.js +271 -0
- package/dist/src/components/messages/UserToolResultMessage/RejectedPlanMessage.js +27 -0
- package/dist/src/components/messages/UserToolResultMessage/RejectedToolUseMessage.js +16 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolCanceledMessage.js +16 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolErrorMessage.js +91 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolRejectMessage.js +73 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolResultMessage.js +83 -0
- package/dist/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +58 -0
- package/dist/src/components/messages/UserToolResultMessage/utils.js +43 -0
- package/dist/src/components/messages/nullRenderingAttachments.js +58 -0
- package/dist/src/components/messages/teamMemCollapsed.js +142 -0
- package/dist/src/components/messages/teamMemSaved.js +17 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/AskUserQuestionPermissionRequest.js +654 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.js +219 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js +227 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.js +174 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/QuestionView.js +444 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/SubmitQuestionsView.js +136 -0
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/use-multiple-choice-state.js +100 -0
- package/dist/src/components/permissions/BashPermissionRequest/BashPermissionRequest.js +404 -0
- package/dist/src/components/permissions/BashPermissionRequest/bashToolUseOptions.js +110 -0
- package/dist/src/components/permissions/ComputerUseApproval/ComputerUseApproval.js +448 -0
- package/dist/src/components/permissions/EnterPlanModePermissionRequest/EnterPlanModePermissionRequest.js +125 -0
- package/dist/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.js +649 -0
- package/dist/src/components/permissions/FallbackPermissionRequest.js +348 -0
- package/dist/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +184 -0
- package/dist/src/components/permissions/FilePermissionDialog/FilePermissionDialog.js +108 -0
- package/dist/src/components/permissions/FilePermissionDialog/ideDiffConfig.js +13 -0
- package/dist/src/components/permissions/FilePermissionDialog/permissionOptions.js +136 -0
- package/dist/src/components/permissions/FilePermissionDialog/useFilePermissionDialog.js +131 -0
- package/dist/src/components/permissions/FilePermissionDialog/usePermissionHandler.js +86 -0
- package/dist/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +163 -0
- package/dist/src/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +78 -0
- package/dist/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +112 -0
- package/dist/src/components/permissions/NotebookEditPermissionRequest/NotebookEditPermissionRequest.js +163 -0
- package/dist/src/components/permissions/NotebookEditPermissionRequest/NotebookEditToolDiff.js +217 -0
- package/dist/src/components/permissions/PermissionDecisionDebugInfo.js +466 -0
- package/dist/src/components/permissions/PermissionDialog.js +54 -0
- package/dist/src/components/permissions/PermissionExplanation.js +269 -0
- package/dist/src/components/permissions/PermissionPrompt.js +316 -0
- package/dist/src/components/permissions/PermissionRequest.js +160 -0
- package/dist/src/components/permissions/PermissionRequestTitle.js +57 -0
- package/dist/src/components/permissions/PermissionRuleExplanation.js +116 -0
- package/dist/src/components/permissions/PowerShellPermissionRequest/PowerShellPermissionRequest.js +178 -0
- package/dist/src/components/permissions/PowerShellPermissionRequest/powershellToolUseOptions.js +73 -0
- package/dist/src/components/permissions/SandboxPermissionRequest.js +161 -0
- package/dist/src/components/permissions/SedEditPermissionRequest/SedEditPermissionRequest.js +228 -0
- package/dist/src/components/permissions/SkillPermissionRequest/SkillPermissionRequest.js +384 -0
- package/dist/src/components/permissions/WebFetchPermissionRequest/WebFetchPermissionRequest.js +258 -0
- package/dist/src/components/permissions/WorkerBadge.js +43 -0
- package/dist/src/components/permissions/WorkerPendingPermission.js +106 -0
- package/dist/src/components/permissions/hooks.js +163 -0
- package/dist/src/components/permissions/rules/AddPermissionRules.js +172 -0
- package/dist/src/components/permissions/rules/AddWorkspaceDirectory.js +334 -0
- package/dist/src/components/permissions/rules/PermissionRuleDescription.js +77 -0
- package/dist/src/components/permissions/rules/PermissionRuleInput.js +135 -0
- package/dist/src/components/permissions/rules/PermissionRuleList.js +1189 -0
- package/dist/src/components/permissions/rules/RecentDenialsTab.js +204 -0
- package/dist/src/components/permissions/rules/RemoveWorkspaceDirectory.js +102 -0
- package/dist/src/components/permissions/rules/WorkspaceTab.js +132 -0
- package/dist/src/components/permissions/shellPermissionHelpers.js +111 -0
- package/dist/src/components/permissions/useShellPermissionFeedback.js +108 -0
- package/dist/src/components/permissions/utils.js +14 -0
- package/dist/src/components/sandbox/SandboxConfigTab.js +47 -0
- package/dist/src/components/sandbox/SandboxDependenciesTab.js +122 -0
- package/dist/src/components/sandbox/SandboxDoctorSection.js +46 -0
- package/dist/src/components/sandbox/SandboxOverridesTab.js +192 -0
- package/dist/src/components/sandbox/SandboxSettings.js +296 -0
- package/dist/src/components/shell/ExpandShellOutputContext.js +33 -0
- package/dist/src/components/shell/OutputLine.js +110 -0
- package/dist/src/components/shell/ShellProgressMessage.js +143 -0
- package/dist/src/components/shell/ShellTimeDisplay.js +71 -0
- package/dist/src/components/skills/SkillsMenu.js +238 -0
- package/dist/src/components/tasks/AsyncAgentDetailDialog.js +234 -0
- package/dist/src/components/tasks/BackgroundTask.js +363 -0
- package/dist/src/components/tasks/BackgroundTaskStatus.js +419 -0
- package/dist/src/components/tasks/BackgroundTasksDialog.js +496 -0
- package/dist/src/components/tasks/DreamDetailDialog.js +250 -0
- package/dist/src/components/tasks/InProcessTeammateDetailDialog.js +274 -0
- package/dist/src/components/tasks/RemoteSessionDetailDialog.js +868 -0
- package/dist/src/components/tasks/RemoteSessionProgress.js +249 -0
- package/dist/src/components/tasks/ShellDetailDialog.js +403 -0
- package/dist/src/components/tasks/ShellProgress.js +76 -0
- package/dist/src/components/tasks/renderToolActivity.js +28 -0
- package/dist/src/components/tasks/taskStatusUtils.js +94 -0
- package/dist/src/components/teams/TeamStatus.js +76 -0
- package/dist/src/components/teams/TeamsDialog.js +672 -0
- package/dist/src/components/ui/ContextCard.js +5 -0
- package/dist/src/components/ui/OrderedList.js +66 -0
- package/dist/src/components/ui/OrderedListItem.js +41 -0
- package/dist/src/components/ui/TreeSelect.js +300 -0
- package/dist/src/components/wizard/WizardDialogLayout.js +47 -0
- package/dist/src/components/wizard/WizardNavigationFooter.js +10 -0
- package/dist/src/components/wizard/WizardProvider.js +217 -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 +81 -0
- package/dist/src/constants/betas.js +45 -0
- package/dist/src/constants/common.js +29 -0
- package/dist/src/constants/cyberRiskInstruction.js +24 -0
- package/dist/src/constants/errorIds.js +14 -0
- package/dist/src/constants/figures.js +38 -0
- package/dist/src/constants/files.js +150 -0
- package/dist/src/constants/github-app.js +139 -0
- package/dist/src/constants/keys.js +10 -0
- package/dist/src/constants/messages.js +1 -0
- package/dist/src/constants/oauth.js +221 -0
- package/dist/src/constants/outputStyles.js +162 -0
- package/dist/src/constants/product.js +56 -0
- package/dist/src/constants/prompts.js +752 -0
- package/dist/src/constants/spinnerVerbs.js +202 -0
- package/dist/src/constants/system.js +77 -0
- package/dist/src/constants/systemPromptSections.js +39 -0
- package/dist/src/constants/toolLimits.js +50 -0
- package/dist/src/constants/tools.js +103 -0
- package/dist/src/constants/turnCompletionVerbs.js +12 -0
- package/dist/src/constants/xml.js +73 -0
- package/dist/src/context/QueuedMessageContext.js +51 -0
- package/dist/src/context/fpsMetrics.js +22 -0
- package/dist/src/context/mailbox.js +35 -0
- package/dist/src/context/modalContext.js +34 -0
- package/dist/src/context/notifications.js +199 -0
- package/dist/src/context/overlayContext.js +149 -0
- package/dist/src/context/promptOverlayContext.js +118 -0
- package/dist/src/context/stats.js +207 -0
- package/dist/src/context/voice.js +74 -0
- package/dist/src/context.js +146 -0
- package/dist/src/coordinator/coordinatorMode.js +349 -0
- package/dist/src/cost-tracker.js +208 -0
- package/dist/src/costHook.js +17 -0
- package/dist/src/daemon/main.js +16 -0
- package/dist/src/daemon/workerRegistry.js +16 -0
- package/dist/src/dialogLaunchers.js +68 -0
- package/dist/src/entrypoints/agentSdkTypes.js +202 -0
- package/dist/src/entrypoints/cli.js +252 -0
- package/dist/src/entrypoints/init.js +265 -0
- package/dist/src/entrypoints/mcp.js +142 -0
- package/dist/src/entrypoints/sandboxTypes.js +112 -0
- package/dist/src/entrypoints/sdk/controlSchemas.js +452 -0
- package/dist/src/entrypoints/sdk/controlTypes.js +1 -0
- package/dist/src/entrypoints/sdk/coreSchemas.js +1331 -0
- package/dist/src/entrypoints/sdk/coreTypes.generated.js +1 -0
- package/dist/src/entrypoints/sdk/coreTypes.js +49 -0
- package/dist/src/entrypoints/sdk/runtimeTypes.js +1 -0
- package/dist/src/entrypoints/sdk/toolTypes.js +1 -0
- package/dist/src/environment-runner/main.js +16 -0
- package/dist/src/history.js +386 -0
- package/dist/src/hooks/fileSuggestions.js +635 -0
- package/dist/src/hooks/notifs/useAutoModeUnavailableNotification.js +47 -0
- package/dist/src/hooks/notifs/useCanSwitchToExistingSubscription.js +57 -0
- package/dist/src/hooks/notifs/useDeprecationWarningNotification.js +43 -0
- package/dist/src/hooks/notifs/useFastModeNotification.js +164 -0
- package/dist/src/hooks/notifs/useIDEStatusIndicator.js +174 -0
- package/dist/src/hooks/notifs/useInstallMessages.js +27 -0
- package/dist/src/hooks/notifs/useLspInitializationNotification.js +144 -0
- package/dist/src/hooks/notifs/useMcpConnectivityStatus.js +80 -0
- package/dist/src/hooks/notifs/useModelMigrationNotifications.js +53 -0
- package/dist/src/hooks/notifs/useNpmDeprecationNotification.js +24 -0
- package/dist/src/hooks/notifs/usePluginAutoupdateNotification.js +82 -0
- package/dist/src/hooks/notifs/usePluginInstallationStatus.js +127 -0
- package/dist/src/hooks/notifs/useRateLimitWarningNotification.js +118 -0
- package/dist/src/hooks/notifs/useSettingsErrors.js +64 -0
- package/dist/src/hooks/notifs/useStartupNotification.js +33 -0
- package/dist/src/hooks/notifs/useTeammateShutdownNotification.js +64 -0
- package/dist/src/hooks/renderPlaceholder.js +26 -0
- package/dist/src/hooks/toolPermission/PermissionContext.js +211 -0
- package/dist/src/hooks/toolPermission/handlers/coordinatorHandler.js +44 -0
- package/dist/src/hooks/toolPermission/handlers/interactiveHandler.js +397 -0
- package/dist/src/hooks/toolPermission/handlers/swarmWorkerHandler.js +108 -0
- package/dist/src/hooks/toolPermission/permissionLogging.js +145 -0
- package/dist/src/hooks/unifiedSuggestions.js +130 -0
- package/dist/src/hooks/useAfterFirstRender.js +12 -0
- package/dist/src/hooks/useApiKeyVerification.js +63 -0
- package/dist/src/hooks/useArrowKeyHistory.js +203 -0
- package/dist/src/hooks/useAssistantHistory.js +194 -0
- package/dist/src/hooks/useAwaySummary.js +105 -0
- package/dist/src/hooks/useBackgroundTaskNavigation.js +204 -0
- package/dist/src/hooks/useBlink.js +28 -0
- package/dist/src/hooks/useCanUseTool.js +192 -0
- package/dist/src/hooks/useCancelRequest.js +195 -0
- package/dist/src/hooks/useChromeExtensionNotification.js +49 -0
- package/dist/src/hooks/useClaudeCodeHintRecommendation.js +117 -0
- package/dist/src/hooks/useClipboardImageHint.js +59 -0
- package/dist/src/hooks/useCommandKeybindings.js +87 -0
- package/dist/src/hooks/useCommandQueue.js +10 -0
- package/dist/src/hooks/useCopyOnSelect.js +88 -0
- package/dist/src/hooks/useDeferredHookMessages.js +43 -0
- package/dist/src/hooks/useDiffData.js +69 -0
- package/dist/src/hooks/useDiffInIDE.js +252 -0
- package/dist/src/hooks/useDirectConnect.js +150 -0
- package/dist/src/hooks/useDoublePress.js +44 -0
- package/dist/src/hooks/useDynamicConfig.js +17 -0
- package/dist/src/hooks/useElapsedTime.js +25 -0
- package/dist/src/hooks/useExitOnCtrlCD.js +57 -0
- package/dist/src/hooks/useExitOnCtrlCDWithKeybindings.js +17 -0
- package/dist/src/hooks/useFileHistorySnapshotInit.js +14 -0
- package/dist/src/hooks/useGlobalKeybindings.js +215 -0
- package/dist/src/hooks/useHistorySearch.js +241 -0
- package/dist/src/hooks/useIDEIntegration.js +56 -0
- package/dist/src/hooks/useIdeAtMentioned.js +51 -0
- package/dist/src/hooks/useIdeConnectionStatus.js +21 -0
- package/dist/src/hooks/useIdeLogging.js +29 -0
- package/dist/src/hooks/useIdeSelection.js +106 -0
- package/dist/src/hooks/useInboxPoller.js +709 -0
- package/dist/src/hooks/useInputBuffer.js +73 -0
- package/dist/src/hooks/useIssueFlagBanner.js +115 -0
- package/dist/src/hooks/useLogMessages.js +98 -0
- package/dist/src/hooks/useLspPluginRecommendation.js +176 -0
- package/dist/src/hooks/useMailboxBridge.js +15 -0
- package/dist/src/hooks/useMainLoopModel.js +25 -0
- package/dist/src/hooks/useManagePlugins.js +261 -0
- package/dist/src/hooks/useMemoryUsage.js +28 -0
- package/dist/src/hooks/useMergedClients.js +11 -0
- package/dist/src/hooks/useMergedCommands.js +10 -0
- package/dist/src/hooks/useMergedTools.js +32 -0
- package/dist/src/hooks/useMinDisplayTime.js +26 -0
- package/dist/src/hooks/useNotifyAfterTimeout.js +51 -0
- package/dist/src/hooks/useOfficialMarketplaceNotification.js +46 -0
- package/dist/src/hooks/usePasteHandler.js +188 -0
- package/dist/src/hooks/usePluginRecommendationBase.js +101 -0
- package/dist/src/hooks/usePrStatus.js +91 -0
- package/dist/src/hooks/usePromptSuggestion.js +128 -0
- package/dist/src/hooks/usePromptsFromClaudeInChrome.js +66 -0
- package/dist/src/hooks/useQueueProcessor.js +46 -0
- package/dist/src/hooks/useRemoteSession.js +431 -0
- package/dist/src/hooks/useReplBridge.js +717 -0
- package/dist/src/hooks/useSSHSession.js +167 -0
- package/dist/src/hooks/useScheduledTasks.js +104 -0
- package/dist/src/hooks/useSearchInput.js +302 -0
- package/dist/src/hooks/useSessionBackgrounding.js +132 -0
- package/dist/src/hooks/useSettings.js +10 -0
- package/dist/src/hooks/useSettingsChange.js +13 -0
- package/dist/src/hooks/useSkillImprovementSurvey.js +69 -0
- package/dist/src/hooks/useSkillsChange.js +51 -0
- package/dist/src/hooks/useSwarmInitialization.js +67 -0
- package/dist/src/hooks/useSwarmPermissionPoller.js +215 -0
- package/dist/src/hooks/useTaskListWatcher.js +157 -0
- package/dist/src/hooks/useTasksV2.js +220 -0
- package/dist/src/hooks/useTeammateViewAutoExit.js +55 -0
- package/dist/src/hooks/useTelegramMirror.js +47 -0
- package/dist/src/hooks/useTeleportResume.js +81 -0
- package/dist/src/hooks/useTerminalSize.js +9 -0
- package/dist/src/hooks/useTextInput.js +397 -0
- package/dist/src/hooks/useTimeout.js +10 -0
- package/dist/src/hooks/useTurnDiffs.js +160 -0
- package/dist/src/hooks/useTypeahead.js +1617 -0
- package/dist/src/hooks/useUpdateNotification.js +22 -0
- package/dist/src/hooks/useVimInput.js +232 -0
- package/dist/src/hooks/useVirtualScroll.js +627 -0
- package/dist/src/hooks/useVoice.js +954 -0
- package/dist/src/hooks/useVoiceEnabled.js +21 -0
- package/dist/src/hooks/useVoiceIntegration.js +631 -0
- package/dist/src/hooks/useWhatsAppMirror.js +46 -0
- package/dist/src/index.js +18 -0
- package/dist/src/ink/Ansi.js +269 -0
- package/dist/src/ink/bidi.js +117 -0
- package/dist/src/ink/clearTerminal.js +58 -0
- package/dist/src/ink/colorize.js +198 -0
- package/dist/src/ink/components/AlternateScreen.js +74 -0
- package/dist/src/ink/components/App.js +558 -0
- package/dist/src/ink/components/AppContext.js +11 -0
- package/dist/src/ink/components/Box.js +153 -0
- package/dist/src/ink/components/Button.js +166 -0
- package/dist/src/ink/components/ClockContext.js +108 -0
- package/dist/src/ink/components/CursorDeclarationContext.js +3 -0
- package/dist/src/ink/components/ErrorOverview.js +49 -0
- package/dist/src/ink/components/Link.js +33 -0
- package/dist/src/ink/components/Newline.js +29 -0
- package/dist/src/ink/components/NoSelect.js +56 -0
- package/dist/src/ink/components/RawAnsi.js +45 -0
- package/dist/src/ink/components/ScrollBox.js +170 -0
- package/dist/src/ink/components/Spacer.js +19 -0
- package/dist/src/ink/components/StdinContext.js +16 -0
- package/dist/src/ink/components/TerminalFocusContext.js +45 -0
- package/dist/src/ink/components/TerminalSizeContext.js +3 -0
- package/dist/src/ink/components/Text.js +194 -0
- package/dist/src/ink/constants.js +2 -0
- package/dist/src/ink/devtools.js +16 -0
- package/dist/src/ink/dom.js +298 -0
- package/dist/src/ink/events/click-event.js +36 -0
- package/dist/src/ink/events/dispatcher.js +172 -0
- package/dist/src/ink/events/emitter.js +31 -0
- package/dist/src/ink/events/event-handlers.js +30 -0
- package/dist/src/ink/events/event.js +9 -0
- package/dist/src/ink/events/focus-event.js +16 -0
- package/dist/src/ink/events/input-event.js +161 -0
- package/dist/src/ink/events/keyboard-event.js +45 -0
- package/dist/src/ink/events/terminal-event.js +78 -0
- package/dist/src/ink/events/terminal-focus-event.js +15 -0
- package/dist/src/ink/focus.js +158 -0
- package/dist/src/ink/frame.js +30 -0
- package/dist/src/ink/get-max-width.js +23 -0
- package/dist/src/ink/hit-test.js +113 -0
- package/dist/src/ink/hooks/use-animation-frame.js +48 -0
- package/dist/src/ink/hooks/use-app.js +7 -0
- package/dist/src/ink/hooks/use-declared-cursor.js +60 -0
- package/dist/src/ink/hooks/use-input.js +70 -0
- package/dist/src/ink/hooks/use-interval.js +54 -0
- package/dist/src/ink/hooks/use-search-highlight.js +32 -0
- package/dist/src/ink/hooks/use-selection.js +60 -0
- package/dist/src/ink/hooks/use-stdin.js +7 -0
- package/dist/src/ink/hooks/use-tab-status.js +57 -0
- package/dist/src/ink/hooks/use-terminal-focus.js +15 -0
- package/dist/src/ink/hooks/use-terminal-title.js +29 -0
- package/dist/src/ink/hooks/use-terminal-viewport.js +77 -0
- package/dist/src/ink/ink.js +1644 -0
- package/dist/src/ink/instances.js +7 -0
- package/dist/src/ink/layout/engine.js +4 -0
- package/dist/src/ink/layout/geometry.js +61 -0
- package/dist/src/ink/layout/node.js +62 -0
- package/dist/src/ink/layout/yoga.js +237 -0
- package/dist/src/ink/line-width-cache.js +19 -0
- package/dist/src/ink/log-update.js +583 -0
- package/dist/src/ink/measure-element.js +8 -0
- package/dist/src/ink/measure-text.js +35 -0
- package/dist/src/ink/node-cache.js +30 -0
- package/dist/src/ink/optimizer.js +81 -0
- package/dist/src/ink/output.js +556 -0
- package/dist/src/ink/parse-keypress.js +695 -0
- package/dist/src/ink/reconciler.js +384 -0
- package/dist/src/ink/render-border.js +134 -0
- package/dist/src/ink/render-node-to-output.js +1216 -0
- package/dist/src/ink/render-to-screen.js +171 -0
- package/dist/src/ink/renderer.js +129 -0
- package/dist/src/ink/root.js +80 -0
- package/dist/src/ink/screen.js +1132 -0
- package/dist/src/ink/searchHighlight.js +78 -0
- package/dist/src/ink/selection.js +792 -0
- package/dist/src/ink/squash-text-nodes.js +56 -0
- package/dist/src/ink/stringWidth.js +200 -0
- package/dist/src/ink/styles.js +299 -0
- package/dist/src/ink/supports-hyperlinks.js +40 -0
- package/dist/src/ink/tabstops.js +39 -0
- package/dist/src/ink/terminal-focus-state.js +35 -0
- package/dist/src/ink/terminal-querier.js +173 -0
- package/dist/src/ink/terminal.js +208 -0
- package/dist/src/ink/termio/ansi.js +70 -0
- package/dist/src/ink/termio/csi.js +260 -0
- package/dist/src/ink/termio/dec.js +53 -0
- package/dist/src/ink/termio/esc.js +55 -0
- package/dist/src/ink/termio/osc.js +432 -0
- package/dist/src/ink/termio/parser.js +356 -0
- package/dist/src/ink/termio/sgr.js +292 -0
- package/dist/src/ink/termio/tokenize.js +264 -0
- package/dist/src/ink/termio/types.js +55 -0
- package/dist/src/ink/termio.js +24 -0
- package/dist/src/ink/useTerminalNotification.js +57 -0
- package/dist/src/ink/warn.js +10 -0
- package/dist/src/ink/widest-line.js +14 -0
- package/dist/src/ink/wrap-text.js +54 -0
- package/dist/src/ink/wrapAnsi.js +6 -0
- package/dist/src/ink.js +50 -0
- package/dist/src/interactiveHelpers.js +317 -0
- package/dist/src/keybindings/KeybindingContext.js +184 -0
- package/dist/src/keybindings/KeybindingProviderSetup.js +259 -0
- package/dist/src/keybindings/defaultBindings.js +333 -0
- package/dist/src/keybindings/loadUserBindings.js +393 -0
- package/dist/src/keybindings/match.js +111 -0
- package/dist/src/keybindings/parser.js +184 -0
- package/dist/src/keybindings/reservedShortcuts.js +109 -0
- package/dist/src/keybindings/resolver.js +182 -0
- package/dist/src/keybindings/schema.js +205 -0
- package/dist/src/keybindings/shortcutFormat.js +48 -0
- package/dist/src/keybindings/template.js +40 -0
- package/dist/src/keybindings/useKeybinding.js +161 -0
- package/dist/src/keybindings/useShortcutDisplay.js +43 -0
- package/dist/src/keybindings/validate.js +395 -0
- package/dist/src/main.js +4080 -0
- package/dist/src/memdir/findRelevantMemories.js +101 -0
- package/dist/src/memdir/memdir.js +408 -0
- package/dist/src/memdir/memoryAge.js +52 -0
- package/dist/src/memdir/memoryScan.js +65 -0
- package/dist/src/memdir/memoryTypes.js +260 -0
- package/dist/src/memdir/paths.js +236 -0
- package/dist/src/memdir/teamMemPaths.js +261 -0
- package/dist/src/memdir/teamMemPrompts.js +82 -0
- package/dist/src/migrations/migrateAutoUpdatesToSettings.js +47 -0
- package/dist/src/migrations/migrateBypassPermissionsAcceptedToSettings.js +32 -0
- package/dist/src/migrations/migrateEnableAllProjectMcpServersToSettings.js +83 -0
- package/dist/src/migrations/migrateFennecToOpus.js +39 -0
- package/dist/src/migrations/migrateLegacyOpusToCurrent.js +44 -0
- package/dist/src/migrations/migrateOpusToOpus1m.js +31 -0
- package/dist/src/migrations/migrateReplBridgeEnabledToRemoteControlAtStartup.js +23 -0
- package/dist/src/migrations/migrateSonnet1mToSonnet45.js +38 -0
- package/dist/src/migrations/migrateSonnet45ToSonnet46.js +48 -0
- package/dist/src/migrations/resetAutoModeOptInForDefaultOffer.js +47 -0
- package/dist/src/migrations/resetProToOpusDefault.js +46 -0
- package/dist/src/mirrors/shared.js +186 -0
- package/dist/src/moreright/useMoreRight.js +13 -0
- package/dist/src/native-ts/color-diff/index.js +821 -0
- package/dist/src/native-ts/file-index/index.js +328 -0
- package/dist/src/native-ts/yoga-layout/enums.js +101 -0
- package/dist/src/native-ts/yoga-layout/index.js +2113 -0
- package/dist/src/outputStyles/loadOutputStylesDir.js +73 -0
- package/dist/src/plugins/builtinPlugins.js +132 -0
- package/dist/src/plugins/bundled/index.js +22 -0
- package/dist/src/projectOnboardingState.js +61 -0
- package/dist/src/query/config.js +17 -0
- package/dist/src/query/deps.js +12 -0
- package/dist/src/query/stopHooks.js +334 -0
- package/dist/src/query/tokenBudget.js +49 -0
- package/dist/src/query.js +1330 -0
- package/dist/src/recovery/bunBundleShim.js +11 -0
- package/dist/src/remote/RemoteSessionManager.js +195 -0
- package/dist/src/remote/SessionsWebSocket.js +305 -0
- package/dist/src/remote/remotePermissionBridge.js +70 -0
- package/dist/src/remote/sdkMessageAdapter.js +227 -0
- package/dist/src/replLauncher.js +6 -0
- package/dist/src/schemas/hooks.js +174 -0
- package/dist/src/screens/Doctor.js +581 -0
- package/dist/src/screens/REPL.js +4434 -0
- package/dist/src/screens/ResumeConversation.js +341 -0
- package/dist/src/self-hosted-runner/main.js +16 -0
- package/dist/src/server/backends/dangerousBackend.js +16 -0
- package/dist/src/server/connectHeadless.js +16 -0
- package/dist/src/server/createDirectConnectSession.js +62 -0
- package/dist/src/server/directConnectManager.js +153 -0
- package/dist/src/server/lockfile.js +16 -0
- package/dist/src/server/parseConnectUrl.js +16 -0
- package/dist/src/server/server.js +16 -0
- package/dist/src/server/serverBanner.js +16 -0
- package/dist/src/server/serverLog.js +16 -0
- package/dist/src/server/sessionManager.js +16 -0
- package/dist/src/server/types.js +7 -0
- package/dist/src/services/AgentSummary/agentSummary.js +147 -0
- package/dist/src/services/MagicDocs/magicDocs.js +193 -0
- package/dist/src/services/MagicDocs/prompts.js +110 -0
- package/dist/src/services/PromptSuggestion/promptSuggestion.js +402 -0
- package/dist/src/services/PromptSuggestion/speculation.js +643 -0
- package/dist/src/services/SessionMemory/prompts.js +254 -0
- package/dist/src/services/SessionMemory/sessionMemory.js +358 -0
- package/dist/src/services/SessionMemory/sessionMemoryUtils.js +157 -0
- package/dist/src/services/analytics/config.js +33 -0
- package/dist/src/services/analytics/datadog.js +259 -0
- package/dist/src/services/analytics/firstPartyEventLogger.js +342 -0
- package/dist/src/services/analytics/firstPartyEventLoggingExporter.js +594 -0
- package/dist/src/services/analytics/growthbook.js +952 -0
- package/dist/src/services/analytics/index.js +114 -0
- package/dist/src/services/analytics/metadata.js +698 -0
- package/dist/src/services/analytics/sink.js +95 -0
- package/dist/src/services/analytics/sinkKillswitch.js +19 -0
- package/dist/src/services/api/adminRequests.js +57 -0
- package/dist/src/services/api/bootstrap.js +149 -0
- package/dist/src/services/api/claude.js +2461 -0
- package/dist/src/services/api/client.js +325 -0
- package/dist/src/services/api/dumpPrompts.js +174 -0
- package/dist/src/services/api/emptyUsage.js +20 -0
- package/dist/src/services/api/errorUtils.js +203 -0
- package/dist/src/services/api/errors.js +934 -0
- package/dist/src/services/api/filesApi.js +523 -0
- package/dist/src/services/api/firstTokenDate.js +49 -0
- package/dist/src/services/api/grove.js +272 -0
- package/dist/src/services/api/index.js +23 -0
- package/dist/src/services/api/logging.js +484 -0
- package/dist/src/services/api/metricsOptOut.js +129 -0
- package/dist/src/services/api/openai.js +1187 -0
- package/dist/src/services/api/openrouter.js +30 -0
- package/dist/src/services/api/overageCreditGrant.js +123 -0
- package/dist/src/services/api/promptCacheBreakDetection.js +510 -0
- package/dist/src/services/api/referral.js +219 -0
- package/dist/src/services/api/sessionIngress.js +358 -0
- package/dist/src/services/api/ultrareviewQuota.js +29 -0
- package/dist/src/services/api/usage.js +31 -0
- package/dist/src/services/api/withRetry.js +599 -0
- package/dist/src/services/autoDream/autoDream.js +244 -0
- package/dist/src/services/autoDream/config.js +17 -0
- package/dist/src/services/autoDream/consolidationLock.js +122 -0
- package/dist/src/services/autoDream/consolidationPrompt.js +56 -0
- package/dist/src/services/awaySummary.js +61 -0
- package/dist/src/services/claudeAiLimits.js +331 -0
- package/dist/src/services/claudeAiLimitsHook.js +15 -0
- package/dist/src/services/compact/apiMicrocompact.js +97 -0
- package/dist/src/services/compact/autoCompact.js +236 -0
- package/dist/src/services/compact/cachedMicrocompact.js +16 -0
- package/dist/src/services/compact/compact.js +1258 -0
- package/dist/src/services/compact/compactWarningHook.js +12 -0
- package/dist/src/services/compact/compactWarningState.js +15 -0
- package/dist/src/services/compact/grouping.js +58 -0
- package/dist/src/services/compact/microCompact.js +414 -0
- package/dist/src/services/compact/postCompactCleanup.js +72 -0
- package/dist/src/services/compact/prompt.js +327 -0
- package/dist/src/services/compact/sessionMemoryCompact.js +467 -0
- package/dist/src/services/compact/timeBasedMCConfig.js +11 -0
- package/dist/src/services/diagnosticTracking.js +282 -0
- package/dist/src/services/extractMemories/extractMemories.js +444 -0
- package/dist/src/services/extractMemories/prompts.js +129 -0
- package/dist/src/services/internalLogging.js +68 -0
- package/dist/src/services/limits/adapters/claude.js +219 -0
- package/dist/src/services/limits/adapters/minimax.js +177 -0
- package/dist/src/services/limits/adapters/ollama.js +189 -0
- package/dist/src/services/limits/adapters/openai.js +167 -0
- package/dist/src/services/limits/adapters/openrouter.js +166 -0
- package/dist/src/services/limits/adapters/zai.js +154 -0
- package/dist/src/services/limits/index.js +2 -0
- package/dist/src/services/limits/registry.js +179 -0
- package/dist/src/services/limits/sessionCounter.js +168 -0
- package/dist/src/services/limits/types.js +1 -0
- package/dist/src/services/lsp/LSPClient.js +306 -0
- package/dist/src/services/lsp/LSPDiagnosticRegistry.js +277 -0
- package/dist/src/services/lsp/LSPServerInstance.js +390 -0
- package/dist/src/services/lsp/LSPServerManager.js +305 -0
- package/dist/src/services/lsp/config.js +57 -0
- package/dist/src/services/lsp/manager.js +246 -0
- package/dist/src/services/lsp/passiveFeedback.js +226 -0
- package/dist/src/services/mcp/InProcessTransport.js +54 -0
- package/dist/src/services/mcp/MCPConnectionManager.js +50 -0
- package/dist/src/services/mcp/SdkControlTransport.js +115 -0
- package/dist/src/services/mcp/auth.js +1882 -0
- package/dist/src/services/mcp/channelAllowlist.js +57 -0
- package/dist/src/services/mcp/channelNotification.js +236 -0
- package/dist/src/services/mcp/channelPermissions.js +192 -0
- package/dist/src/services/mcp/claudeai.js +123 -0
- package/dist/src/services/mcp/client.js +2480 -0
- package/dist/src/services/mcp/config.js +1277 -0
- package/dist/src/services/mcp/elicitationHandler.js +192 -0
- package/dist/src/services/mcp/envExpansion.js +30 -0
- package/dist/src/services/mcp/headersHelper.js +94 -0
- package/dist/src/services/mcp/mcpStringUtils.js +85 -0
- package/dist/src/services/mcp/normalization.js +21 -0
- package/dist/src/services/mcp/oauthPort.js +69 -0
- package/dist/src/services/mcp/officialRegistry.js +58 -0
- package/dist/src/services/mcp/types.js +94 -0
- package/dist/src/services/mcp/useManageMCPConnections.js +820 -0
- package/dist/src/services/mcp/utils.js +433 -0
- package/dist/src/services/mcp/vscodeSdkMcp.js +69 -0
- package/dist/src/services/mcp/xaa.js +342 -0
- package/dist/src/services/mcp/xaaIdpLogin.js +377 -0
- package/dist/src/services/mcpServerApproval.js +29 -0
- package/dist/src/services/mockRateLimits.js +666 -0
- package/dist/src/services/notifier.js +114 -0
- package/dist/src/services/oauth/auth-code-listener.js +236 -0
- package/dist/src/services/oauth/client.js +545 -0
- package/dist/src/services/oauth/crypto.js +19 -0
- package/dist/src/services/oauth/getOauthProfile.js +48 -0
- package/dist/src/services/oauth/index.js +152 -0
- package/dist/src/services/oauth/types.js +1 -0
- package/dist/src/services/orchestration/execution/AgentTaskExecutor.js +315 -0
- package/dist/src/services/orchestration/execution/OrchestrationExecutionRuntime.js +1147 -0
- package/dist/src/services/orchestration/execution/index.js +2 -0
- package/dist/src/services/orchestration/execution/types.js +1 -0
- package/dist/src/services/orchestration/global/GlobalOrchestratorRuntime.js +140 -0
- package/dist/src/services/orchestration/global/index.js +3 -0
- package/dist/src/services/orchestration/global/reporting.js +541 -0
- package/dist/src/services/orchestration/global/types.js +1 -0
- package/dist/src/services/orchestration/index.js +4 -0
- package/dist/src/services/orchestration/policy/index.js +2 -0
- package/dist/src/services/orchestration/policy/scoring.js +291 -0
- package/dist/src/services/orchestration/policy/types.js +1 -0
- package/dist/src/services/orchestration/squad/SquadOrchestratorRuntime.js +198 -0
- package/dist/src/services/orchestration/squad/index.js +3 -0
- package/dist/src/services/orchestration/squad/reporting.js +525 -0
- package/dist/src/services/orchestration/squad/types.js +1 -0
- package/dist/src/services/plugins/PluginInstallationManager.js +139 -0
- package/dist/src/services/plugins/pluginCliCommands.js +230 -0
- package/dist/src/services/plugins/pluginOperations.js +826 -0
- package/dist/src/services/policyLimits/index.js +547 -0
- package/dist/src/services/policyLimits/types.js +9 -0
- package/dist/src/services/preventSleep.js +143 -0
- package/dist/src/services/rateLimitMessages.js +271 -0
- package/dist/src/services/rateLimitMocking.js +91 -0
- package/dist/src/services/remoteManagedSettings/index.js +534 -0
- package/dist/src/services/remoteManagedSettings/securityCheck.js +59 -0
- package/dist/src/services/remoteManagedSettings/syncCache.js +90 -0
- package/dist/src/services/remoteManagedSettings/syncCacheState.js +89 -0
- package/dist/src/services/remoteManagedSettings/types.js +12 -0
- package/dist/src/services/settingsSync/index.js +478 -0
- package/dist/src/services/settingsSync/types.js +35 -0
- package/dist/src/services/teamMemorySync/index.js +976 -0
- package/dist/src/services/teamMemorySync/secretScanner.js +275 -0
- package/dist/src/services/teamMemorySync/teamMemSecretGuard.js +35 -0
- package/dist/src/services/teamMemorySync/types.js +47 -0
- package/dist/src/services/teamMemorySync/watcher.js +326 -0
- package/dist/src/services/tips/tipHistory.js +17 -0
- package/dist/src/services/tips/tipRegistry.js +589 -0
- package/dist/src/services/tips/tipScheduler.js +40 -0
- package/dist/src/services/tokenEstimation.js +365 -0
- package/dist/src/services/toolUseSummary/toolUseSummaryGenerator.js +87 -0
- package/dist/src/services/tools/StreamingToolExecutor.js +413 -0
- package/dist/src/services/tools/toolExecution.js +1218 -0
- package/dist/src/services/tools/toolHooks.js +454 -0
- package/dist/src/services/tools/toolOrchestration.js +110 -0
- package/dist/src/services/vcr.js +291 -0
- package/dist/src/services/voice.js +394 -0
- package/dist/src/services/voiceKeyterms.js +94 -0
- package/dist/src/services/voiceStreamSTT.js +406 -0
- package/dist/src/setup.js +349 -0
- package/dist/src/skills/bundled/batch.js +114 -0
- package/dist/src/skills/bundled/claudeApi.js +145 -0
- package/dist/src/skills/bundled/claudeApiContent.js +14 -0
- package/dist/src/skills/bundled/claudeInChrome.js +27 -0
- package/dist/src/skills/bundled/debug.js +99 -0
- package/dist/src/skills/bundled/index.js +5 -0
- package/dist/src/skills/bundled/keybindings.js +292 -0
- package/dist/src/skills/bundled/loop.js +81 -0
- package/dist/src/skills/bundled/loremIpsum.js +266 -0
- package/dist/src/skills/bundled/remember.js +75 -0
- package/dist/src/skills/bundled/scheduleRemoteAgents.js +373 -0
- package/dist/src/skills/bundled/simplify.js +66 -0
- package/dist/src/skills/bundled/skillify.js +184 -0
- package/dist/src/skills/bundled/stuck.js +75 -0
- package/dist/src/skills/bundled/updateConfig.js +463 -0
- package/dist/src/skills/bundled/verify.js +25 -0
- package/dist/src/skills/bundled/verifyContent.js +7 -0
- package/dist/src/skills/bundledSkills.js +159 -0
- package/dist/src/skills/loadSkillsDir.js +751 -0
- package/dist/src/skills/mcpSkillBuilders.js +10 -0
- package/dist/src/ssh/createSSHSession.js +16 -0
- package/dist/src/state/AppState.js +184 -0
- package/dist/src/state/AppStateStore.js +120 -0
- package/dist/src/state/onChangeAppState.js +132 -0
- package/dist/src/state/selectors.js +51 -0
- package/dist/src/state/store.js +21 -0
- package/dist/src/state/teammateViewHelpers.js +124 -0
- package/dist/src/tasks/DreamTask/DreamTask.js +99 -0
- package/dist/src/tasks/InProcessTeammateTask/InProcessTeammateTask.js +116 -0
- package/dist/src/tasks/InProcessTeammateTask/types.js +35 -0
- package/dist/src/tasks/LocalAgentTask/LocalAgentTask.js +507 -0
- package/dist/src/tasks/LocalMainSessionTask.js +338 -0
- package/dist/src/tasks/LocalShellTask/LocalShellTask.js +475 -0
- package/dist/src/tasks/LocalShellTask/guards.js +9 -0
- package/dist/src/tasks/LocalShellTask/killShellTasks.js +59 -0
- package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +742 -0
- package/dist/src/tasks/pillLabel.js +69 -0
- package/dist/src/tasks/stopTask.js +67 -0
- package/dist/src/tasks/types.js +18 -0
- package/dist/src/tasks.js +39 -0
- package/dist/src/telegram/bridge.js +329 -0
- package/dist/src/telegram/config.js +89 -0
- package/dist/src/telegram/mirror.js +91 -0
- package/dist/src/tools/AgentTool/AgentTool.js +1222 -0
- package/dist/src/tools/AgentTool/UI.js +592 -0
- package/dist/src/tools/AgentTool/agentColorManager.js +43 -0
- package/dist/src/tools/AgentTool/agentDisplay.js +72 -0
- package/dist/src/tools/AgentTool/agentMemory.js +139 -0
- package/dist/src/tools/AgentTool/agentMemorySnapshot.js +136 -0
- package/dist/src/tools/AgentTool/agentToolUtils.js +456 -0
- package/dist/src/tools/AgentTool/built-in/claudeCodeGuideAgent.js +175 -0
- package/dist/src/tools/AgentTool/built-in/exploreAgent.js +76 -0
- package/dist/src/tools/AgentTool/built-in/generalPurposeAgent.js +28 -0
- package/dist/src/tools/AgentTool/built-in/planAgent.js +87 -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 +59 -0
- package/dist/src/tools/AgentTool/constants.js +11 -0
- package/dist/src/tools/AgentTool/forkSubagent.js +177 -0
- package/dist/src/tools/AgentTool/loadAgentsDir.js +497 -0
- package/dist/src/tools/AgentTool/prompt.js +262 -0
- package/dist/src/tools/AgentTool/resumeAgent.js +182 -0
- package/dist/src/tools/AgentTool/runAgent.js +629 -0
- package/dist/src/tools/AskUserQuestionTool/AskUserQuestionTool.js +237 -0
- package/dist/src/tools/AskUserQuestionTool/prompt.js +38 -0
- package/dist/src/tools/BashTool/BashTool.js +1008 -0
- package/dist/src/tools/BashTool/BashToolResultMessage.js +168 -0
- package/dist/src/tools/BashTool/UI.js +133 -0
- package/dist/src/tools/BashTool/bashCommandHelpers.js +184 -0
- package/dist/src/tools/BashTool/bashPermissions.js +2023 -0
- package/dist/src/tools/BashTool/bashSecurity.js +2267 -0
- package/dist/src/tools/BashTool/commandSemantics.js +105 -0
- package/dist/src/tools/BashTool/commentLabel.js +14 -0
- package/dist/src/tools/BashTool/destructiveCommandWarning.js +88 -0
- package/dist/src/tools/BashTool/modeValidation.js +86 -0
- package/dist/src/tools/BashTool/pathValidation.js +1080 -0
- package/dist/src/tools/BashTool/prompt.js +334 -0
- package/dist/src/tools/BashTool/readOnlyValidation.js +1794 -0
- package/dist/src/tools/BashTool/sedEditParser.js +282 -0
- package/dist/src/tools/BashTool/sedValidation.js +580 -0
- package/dist/src/tools/BashTool/shouldUseSandbox.js +125 -0
- package/dist/src/tools/BashTool/toolName.js +2 -0
- package/dist/src/tools/BashTool/utils.js +180 -0
- package/dist/src/tools/BriefTool/BriefTool.js +172 -0
- package/dist/src/tools/BriefTool/UI.js +66 -0
- package/dist/src/tools/BriefTool/attachments.js +86 -0
- package/dist/src/tools/BriefTool/prompt.js +19 -0
- package/dist/src/tools/BriefTool/upload.js +136 -0
- package/dist/src/tools/ConfigTool/ConfigTool.js +398 -0
- package/dist/src/tools/ConfigTool/UI.js +24 -0
- package/dist/src/tools/ConfigTool/constants.js +1 -0
- package/dist/src/tools/ConfigTool/prompt.js +82 -0
- package/dist/src/tools/ConfigTool/supportedSettings.js +180 -0
- package/dist/src/tools/EnterPlanModeTool/EnterPlanModeTool.js +98 -0
- package/dist/src/tools/EnterPlanModeTool/UI.js +13 -0
- package/dist/src/tools/EnterPlanModeTool/constants.js +1 -0
- package/dist/src/tools/EnterPlanModeTool/prompt.js +164 -0
- package/dist/src/tools/EnterWorktreeTool/EnterWorktreeTool.js +104 -0
- package/dist/src/tools/EnterWorktreeTool/UI.js +8 -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 +385 -0
- package/dist/src/tools/ExitPlanModeTool/UI.js +31 -0
- package/dist/src/tools/ExitPlanModeTool/constants.js +2 -0
- package/dist/src/tools/ExitPlanModeTool/prompt.js +27 -0
- package/dist/src/tools/ExitWorktreeTool/ExitWorktreeTool.js +257 -0
- package/dist/src/tools/ExitWorktreeTool/UI.js +9 -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 +480 -0
- package/dist/src/tools/FileEditTool/UI.js +201 -0
- package/dist/src/tools/FileEditTool/constants.js +7 -0
- package/dist/src/tools/FileEditTool/prompt.js +24 -0
- package/dist/src/tools/FileEditTool/types.js +50 -0
- package/dist/src/tools/FileEditTool/utils.js +579 -0
- package/dist/src/tools/FileReadTool/FileReadTool.js +889 -0
- package/dist/src/tools/FileReadTool/UI.js +125 -0
- package/dist/src/tools/FileReadTool/imageProcessor.js +46 -0
- package/dist/src/tools/FileReadTool/limits.js +70 -0
- package/dist/src/tools/FileReadTool/prompt.js +31 -0
- package/dist/src/tools/FileWriteTool/FileWriteTool.js +341 -0
- package/dist/src/tools/FileWriteTool/UI.js +338 -0
- package/dist/src/tools/FileWriteTool/prompt.js +15 -0
- package/dist/src/tools/GlobTool/GlobTool.js +161 -0
- package/dist/src/tools/GlobTool/UI.js +39 -0
- package/dist/src/tools/GlobTool/prompt.js +6 -0
- package/dist/src/tools/GrepTool/GrepTool.js +439 -0
- package/dist/src/tools/GrepTool/UI.js +154 -0
- package/dist/src/tools/GrepTool/prompt.js +16 -0
- package/dist/src/tools/LSPTool/LSPTool.js +660 -0
- package/dist/src/tools/LSPTool/UI.js +204 -0
- package/dist/src/tools/LSPTool/formatters.js +445 -0
- package/dist/src/tools/LSPTool/prompt.js +20 -0
- package/dist/src/tools/LSPTool/schemas.js +197 -0
- package/dist/src/tools/LSPTool/symbolContext.js +75 -0
- package/dist/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.js +100 -0
- package/dist/src/tools/ListMcpResourcesTool/UI.js +16 -0
- package/dist/src/tools/ListMcpResourcesTool/prompt.js +18 -0
- package/dist/src/tools/MCPTool/MCPTool.js +60 -0
- package/dist/src/tools/MCPTool/UI.js +342 -0
- package/dist/src/tools/MCPTool/classifyForCollapse.js +597 -0
- package/dist/src/tools/MCPTool/prompt.js +3 -0
- package/dist/src/tools/McpAuthTool/McpAuthTool.js +162 -0
- package/dist/src/tools/NotebookEditTool/NotebookEditTool.js +421 -0
- package/dist/src/tools/NotebookEditTool/UI.js +40 -0
- package/dist/src/tools/NotebookEditTool/constants.js +2 -0
- package/dist/src/tools/NotebookEditTool/prompt.js +2 -0
- package/dist/src/tools/PowerShellTool/PowerShellTool.js +899 -0
- package/dist/src/tools/PowerShellTool/UI.js +57 -0
- package/dist/src/tools/PowerShellTool/clmTypes.js +207 -0
- package/dist/src/tools/PowerShellTool/commandSemantics.js +115 -0
- package/dist/src/tools/PowerShellTool/commonParameters.js +27 -0
- package/dist/src/tools/PowerShellTool/destructiveCommandWarning.js +92 -0
- package/dist/src/tools/PowerShellTool/gitSafety.js +185 -0
- package/dist/src/tools/PowerShellTool/modeValidation.js +357 -0
- package/dist/src/tools/PowerShellTool/pathValidation.js +1712 -0
- package/dist/src/tools/PowerShellTool/powershellPermissions.js +1351 -0
- package/dist/src/tools/PowerShellTool/powershellSecurity.js +942 -0
- package/dist/src/tools/PowerShellTool/prompt.js +134 -0
- package/dist/src/tools/PowerShellTool/readOnlyValidation.js +1633 -0
- package/dist/src/tools/PowerShellTool/toolName.js +2 -0
- package/dist/src/tools/REPLTool/constants.js +43 -0
- package/dist/src/tools/REPLTool/primitiveTools.js +36 -0
- package/dist/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.js +112 -0
- package/dist/src/tools/ReadMcpResourceTool/UI.js +23 -0
- package/dist/src/tools/ReadMcpResourceTool/prompt.js +15 -0
- package/dist/src/tools/RemoteTriggerTool/RemoteTriggerTool.js +142 -0
- package/dist/src/tools/RemoteTriggerTool/UI.js +11 -0
- package/dist/src/tools/RemoteTriggerTool/prompt.js +12 -0
- package/dist/src/tools/ScheduleCronTool/CronCreateTool.js +120 -0
- package/dist/src/tools/ScheduleCronTool/CronDeleteTool.js +74 -0
- package/dist/src/tools/ScheduleCronTool/CronListTool.js +77 -0
- package/dist/src/tools/ScheduleCronTool/UI.js +28 -0
- package/dist/src/tools/ScheduleCronTool/prompt.js +115 -0
- package/dist/src/tools/SendMessageTool/SendMessageTool.js +675 -0
- package/dist/src/tools/SendMessageTool/UI.js +23 -0
- package/dist/src/tools/SendMessageTool/constants.js +1 -0
- package/dist/src/tools/SendMessageTool/prompt.js +47 -0
- package/dist/src/tools/SkillTool/SkillTool.js +827 -0
- package/dist/src/tools/SkillTool/UI.js +60 -0
- package/dist/src/tools/SkillTool/constants.js +1 -0
- package/dist/src/tools/SkillTool/prompt.js +184 -0
- package/dist/src/tools/SleepTool/prompt.js +14 -0
- package/dist/src/tools/SyntheticOutputTool/SyntheticOutputTool.js +138 -0
- package/dist/src/tools/TaskCreateTool/TaskCreateTool.js +104 -0
- package/dist/src/tools/TaskCreateTool/constants.js +1 -0
- package/dist/src/tools/TaskCreateTool/prompt.js +52 -0
- package/dist/src/tools/TaskGetTool/TaskGetTool.js +106 -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 +89 -0
- package/dist/src/tools/TaskListTool/constants.js +1 -0
- package/dist/src/tools/TaskListTool/prompt.js +44 -0
- package/dist/src/tools/TaskOutputTool/TaskOutputTool.js +535 -0
- package/dist/src/tools/TaskOutputTool/constants.js +1 -0
- package/dist/src/tools/TaskStopTool/TaskStopTool.js +110 -0
- package/dist/src/tools/TaskStopTool/UI.js +30 -0
- package/dist/src/tools/TaskStopTool/prompt.js +7 -0
- package/dist/src/tools/TaskUpdateTool/TaskUpdateTool.js +301 -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 +177 -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 +102 -0
- package/dist/src/tools/TeamDeleteTool/UI.js +13 -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 +99 -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 +357 -0
- package/dist/src/tools/ToolSearchTool/constants.js +1 -0
- package/dist/src/tools/ToolSearchTool/prompt.js +99 -0
- package/dist/src/tools/TungstenTool/TungstenLiveMonitor.js +7 -0
- package/dist/src/tools/TungstenTool/TungstenTool.js +3 -0
- package/dist/src/tools/WebFetchTool/UI.js +30 -0
- package/dist/src/tools/WebFetchTool/WebFetchTool.js +246 -0
- package/dist/src/tools/WebFetchTool/preapproved.js +155 -0
- package/dist/src/tools/WebFetchTool/prompt.js +39 -0
- package/dist/src/tools/WebFetchTool/utils.js +381 -0
- package/dist/src/tools/WebSearchTool/UI.js +66 -0
- package/dist/src/tools/WebSearchTool/WebSearchTool.js +352 -0
- package/dist/src/tools/WebSearchTool/prompt.js +32 -0
- package/dist/src/tools/WorkflowTool/constants.js +2 -0
- package/dist/src/tools/shared/gitOperationTracking.js +220 -0
- package/dist/src/tools/shared/spawnMultiAgent.js +805 -0
- package/dist/src/tools/testing/TestingPermissionTool.js +72 -0
- package/dist/src/tools/utils.js +24 -0
- package/dist/src/tools.js +332 -0
- package/dist/src/types/command.js +10 -0
- package/dist/src/types/connectorText.js +2 -0
- package/dist/src/types/generated/events_mono/claude_code/v1/claude_code_internal_event.js +673 -0
- package/dist/src/types/generated/events_mono/common/v1/auth.js +49 -0
- package/dist/src/types/generated/events_mono/growthbook/v1/growthbook_experiment_event.js +147 -0
- package/dist/src/types/generated/google/protobuf/timestamp.js +38 -0
- package/dist/src/types/hooks.js +153 -0
- package/dist/src/types/ids.js +27 -0
- package/dist/src/types/logs.js +11 -0
- package/dist/src/types/message.js +1 -0
- package/dist/src/types/permissions.js +25 -0
- package/dist/src/types/plugin.js +72 -0
- package/dist/src/types/textInputTypes.js +20 -0
- package/dist/src/types/utils.js +5 -0
- package/dist/src/upstreamproxy/relay.js +346 -0
- package/dist/src/upstreamproxy/upstreamproxy.js +236 -0
- package/dist/src/utils/CircularBuffer.js +75 -0
- package/dist/src/utils/Cursor.js +1229 -0
- package/dist/src/utils/QueryGuard.js +115 -0
- package/dist/src/utils/Shell.js +374 -0
- package/dist/src/utils/ShellCommand.js +338 -0
- package/dist/src/utils/abortController.js +74 -0
- package/dist/src/utils/activityManager.js +127 -0
- package/dist/src/utils/advisor.js +77 -0
- package/dist/src/utils/agentContext.js +91 -0
- package/dist/src/utils/agentId.js +83 -0
- package/dist/src/utils/agentSwarmsEnabled.js +37 -0
- package/dist/src/utils/agenticSessionSearch.js +255 -0
- package/dist/src/utils/analyzeContext.js +848 -0
- package/dist/src/utils/ansiToPng.js +259 -0
- package/dist/src/utils/ansiToSvg.js +207 -0
- package/dist/src/utils/api.js +555 -0
- package/dist/src/utils/apiPreconnect.js +62 -0
- package/dist/src/utils/appleTerminalBackup.js +95 -0
- package/dist/src/utils/argumentSubstitution.js +114 -0
- package/dist/src/utils/array.js +12 -0
- package/dist/src/utils/asciicast.js +200 -0
- package/dist/src/utils/attachments.js +2514 -0
- package/dist/src/utils/attribution.js +308 -0
- package/dist/src/utils/attributionHooks.js +16 -0
- package/dist/src/utils/attributionTrailer.js +16 -0
- package/dist/src/utils/auth.js +2022 -0
- package/dist/src/utils/authFileDescriptor.js +152 -0
- package/dist/src/utils/authPortable.js +14 -0
- package/dist/src/utils/autoModeDenials.js +15 -0
- package/dist/src/utils/autoRunIssue.js +112 -0
- package/dist/src/utils/autoUpdater.js +461 -0
- package/dist/src/utils/aws.js +44 -0
- package/dist/src/utils/awsAuthStatusManager.js +66 -0
- package/dist/src/utils/background/remote/preconditions.js +175 -0
- package/dist/src/utils/background/remote/remoteSession.js +53 -0
- package/dist/src/utils/backgroundHousekeeping.js +66 -0
- package/dist/src/utils/bash/ParsedCommand.js +241 -0
- package/dist/src/utils/bash/ShellSnapshot.js +489 -0
- package/dist/src/utils/bash/ast.js +2590 -0
- package/dist/src/utils/bash/bashParser.js +4355 -0
- package/dist/src/utils/bash/bashPipeCommand.js +249 -0
- package/dist/src/utils/bash/commands.js +1131 -0
- package/dist/src/utils/bash/heredoc.js +647 -0
- package/dist/src/utils/bash/parser.js +195 -0
- package/dist/src/utils/bash/prefix.js +154 -0
- package/dist/src/utils/bash/registry.js +23 -0
- package/dist/src/utils/bash/shellCompletion.js +196 -0
- package/dist/src/utils/bash/shellPrefix.js +25 -0
- package/dist/src/utils/bash/shellQuote.js +253 -0
- package/dist/src/utils/bash/shellQuoting.js +106 -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 +407 -0
- package/dist/src/utils/betas.js +332 -0
- package/dist/src/utils/billing.js +54 -0
- package/dist/src/utils/binaryCheck.js +40 -0
- package/dist/src/utils/browser.js +58 -0
- package/dist/src/utils/bufferedWriter.js +77 -0
- package/dist/src/utils/bundledMode.js +19 -0
- package/dist/src/utils/caCerts.js +93 -0
- package/dist/src/utils/caCertsConfig.js +77 -0
- package/dist/src/utils/cachePaths.js +28 -0
- package/dist/src/utils/ccshareResume.js +16 -0
- package/dist/src/utils/classifierApprovals.js +66 -0
- package/dist/src/utils/classifierApprovalsHook.js +10 -0
- package/dist/src/utils/claudeCodeHints.js +142 -0
- package/dist/src/utils/claudeDesktop.js +108 -0
- package/dist/src/utils/claudeInChrome/chromeNativeHost.js +416 -0
- package/dist/src/utils/claudeInChrome/common.js +466 -0
- package/dist/src/utils/claudeInChrome/mcpServer.js +237 -0
- package/dist/src/utils/claudeInChrome/prompt.js +79 -0
- package/dist/src/utils/claudeInChrome/setup.js +320 -0
- package/dist/src/utils/claudeInChrome/setupPortable.js +172 -0
- package/dist/src/utils/claudeInChrome/toolRendering.js +234 -0
- package/dist/src/utils/claudemd.js +1054 -0
- package/dist/src/utils/cleanup.js +514 -0
- package/dist/src/utils/cleanupRegistry.js +22 -0
- package/dist/src/utils/cliArgs.js +53 -0
- package/dist/src/utils/cliHighlight.js +45 -0
- package/dist/src/utils/codeIndexing.js +149 -0
- package/dist/src/utils/collapseBackgroundBashNotifications.js +70 -0
- package/dist/src/utils/collapseHookSummaries.js +48 -0
- package/dist/src/utils/collapseReadSearch.js +871 -0
- package/dist/src/utils/collapseTeammateShutdowns.js +44 -0
- package/dist/src/utils/combinedAbortSignal.js +40 -0
- package/dist/src/utils/commandLifecycle.js +7 -0
- package/dist/src/utils/commitAttribution.js +720 -0
- package/dist/src/utils/completionCache.js +138 -0
- package/dist/src/utils/computerUse/appNames.js +170 -0
- package/dist/src/utils/computerUse/cleanup.js +66 -0
- package/dist/src/utils/computerUse/common.js +56 -0
- package/dist/src/utils/computerUse/computerUseLock.js +183 -0
- package/dist/src/utils/computerUse/drainRunLoop.js +71 -0
- package/dist/src/utils/computerUse/escHotkey.js +53 -0
- package/dist/src/utils/computerUse/executor.js +480 -0
- package/dist/src/utils/computerUse/gates.js +55 -0
- package/dist/src/utils/computerUse/hostAdapter.js +62 -0
- package/dist/src/utils/computerUse/inputLoader.js +27 -0
- package/dist/src/utils/computerUse/mcpServer.js +84 -0
- package/dist/src/utils/computerUse/setup.js +42 -0
- package/dist/src/utils/computerUse/swiftLoader.js +20 -0
- package/dist/src/utils/computerUse/toolRendering.js +100 -0
- package/dist/src/utils/computerUse/wrapper.js +318 -0
- package/dist/src/utils/concurrentSessions.js +179 -0
- package/dist/src/utils/config.js +1084 -0
- package/dist/src/utils/configConstants.js +18 -0
- package/dist/src/utils/contentArray.js +45 -0
- package/dist/src/utils/context.js +185 -0
- package/dist/src/utils/contextAnalysis.js +171 -0
- package/dist/src/utils/contextSuggestions.js +158 -0
- package/dist/src/utils/controlMessageCompat.js +31 -0
- package/dist/src/utils/conversationRecovery.js +436 -0
- package/dist/src/utils/cron.js +260 -0
- package/dist/src/utils/cronJitterConfig.js +62 -0
- package/dist/src/utils/cronScheduler.js +388 -0
- package/dist/src/utils/cronTasks.js +332 -0
- package/dist/src/utils/cronTasksLock.js +164 -0
- package/dist/src/utils/crossProjectResume.js +46 -0
- package/dist/src/utils/crypto.js +13 -0
- package/dist/src/utils/cwd.js +29 -0
- package/dist/src/utils/databaseMcp/common.js +48 -0
- package/dist/src/utils/databaseMcp/mcpServer.js +2 -0
- package/dist/src/utils/databaseMcp/server/connection.js +243 -0
- package/dist/src/utils/databaseMcp/server/index.js +1442 -0
- package/dist/src/utils/databaseMcp/server/queries.js +683 -0
- package/dist/src/utils/databaseMcp/server/types.js +7 -0
- package/dist/src/utils/databaseMcp/setup.js +28 -0
- package/dist/src/utils/debug.js +220 -0
- package/dist/src/utils/debugFilter.js +125 -0
- package/dist/src/utils/deepLink/banner.js +103 -0
- package/dist/src/utils/deepLink/parseDeepLink.js +138 -0
- package/dist/src/utils/deepLink/protocolHandler.js +119 -0
- package/dist/src/utils/deepLink/registerProtocol.js +291 -0
- package/dist/src/utils/deepLink/terminalLauncher.js +455 -0
- package/dist/src/utils/deepLink/terminalPreference.js +51 -0
- package/dist/src/utils/desktopDeepLink.js +208 -0
- package/dist/src/utils/detectRepository.js +157 -0
- package/dist/src/utils/diagLogs.js +74 -0
- package/dist/src/utils/diff.js +108 -0
- package/dist/src/utils/directMemberMessage.js +34 -0
- package/dist/src/utils/displayTags.js +46 -0
- package/dist/src/utils/doctorContextWarnings.js +179 -0
- package/dist/src/utils/doctorDiagnostic.js +495 -0
- package/dist/src/utils/dxt/helpers.js +64 -0
- package/dist/src/utils/dxt/zip.js +167 -0
- package/dist/src/utils/earlyInput.js +166 -0
- package/dist/src/utils/editor.js +163 -0
- package/dist/src/utils/effort.js +278 -0
- package/dist/src/utils/embeddedTools.js +26 -0
- package/dist/src/utils/env.js +358 -0
- package/dist/src/utils/envDynamic.js +130 -0
- package/dist/src/utils/envUtils.js +192 -0
- package/dist/src/utils/envValidation.js +26 -0
- package/dist/src/utils/errorLogSink.js +197 -0
- package/dist/src/utils/errors.js +207 -0
- package/dist/src/utils/eventLoopStallDetector.js +16 -0
- package/dist/src/utils/exampleCommands.js +165 -0
- package/dist/src/utils/execFileNoThrow.js +93 -0
- package/dist/src/utils/execFileNoThrowPortable.js +111 -0
- package/dist/src/utils/execSyncWrapper.js +68 -0
- package/dist/src/utils/exportRenderer.js +71 -0
- package/dist/src/utils/extraUsage.js +19 -0
- package/dist/src/utils/fastMode.js +393 -0
- package/dist/src/utils/file.js +467 -0
- package/dist/src/utils/fileHistory.js +851 -0
- package/dist/src/utils/fileOperationAnalytics.js +45 -0
- package/dist/src/utils/filePersistence/filePersistence.js +212 -0
- package/dist/src/utils/filePersistence/outputsScanner.js +104 -0
- package/dist/src/utils/filePersistence/types.js +5 -0
- package/dist/src/utils/fileRead.js +81 -0
- package/dist/src/utils/fileReadCache.js +78 -0
- package/dist/src/utils/fileStateCache.js +99 -0
- package/dist/src/utils/findExecutable.js +13 -0
- package/dist/src/utils/fingerprint.js +59 -0
- package/dist/src/utils/forkedAgent.js +410 -0
- package/dist/src/utils/format.js +238 -0
- package/dist/src/utils/formatBriefTimestamp.js +72 -0
- package/dist/src/utils/fpsTracker.js +34 -0
- package/dist/src/utils/frontmatterParser.js +260 -0
- package/dist/src/utils/fsOperations.js +834 -0
- package/dist/src/utils/fullscreen.js +194 -0
- package/dist/src/utils/generatedFiles.js +122 -0
- package/dist/src/utils/generators.js +67 -0
- package/dist/src/utils/genericProcessUtils.js +155 -0
- package/dist/src/utils/getWorktreePaths.js +56 -0
- package/dist/src/utils/getWorktreePathsPortable.js +23 -0
- package/dist/src/utils/ghPrStatus.js +71 -0
- package/dist/src/utils/git/gitConfigParser.js +226 -0
- package/dist/src/utils/git/gitFilesystem.js +606 -0
- package/dist/src/utils/git/gitignore.js +84 -0
- package/dist/src/utils/git.js +725 -0
- package/dist/src/utils/gitDiff.js +395 -0
- package/dist/src/utils/gitSettings.js +18 -0
- package/dist/src/utils/github/ghAuthStatus.js +23 -0
- package/dist/src/utils/githubRepoPathMapping.js +135 -0
- package/dist/src/utils/glob.js +90 -0
- package/dist/src/utils/gracefulShutdown.js +447 -0
- package/dist/src/utils/groupToolUses.js +126 -0
- package/dist/src/utils/handlePromptSubmit.js +398 -0
- package/dist/src/utils/hash.js +46 -0
- package/dist/src/utils/headlessProfiler.js +147 -0
- package/dist/src/utils/heapDumpService.js +202 -0
- package/dist/src/utils/heatmap.js +151 -0
- package/dist/src/utils/highlightMatch.js +28 -0
- package/dist/src/utils/hooks/AsyncHookRegistry.js +187 -0
- package/dist/src/utils/hooks/apiQueryHookHelper.js +77 -0
- package/dist/src/utils/hooks/execAgentHook.js +257 -0
- package/dist/src/utils/hooks/execHttpHook.js +184 -0
- package/dist/src/utils/hooks/execPromptHook.js +171 -0
- package/dist/src/utils/hooks/fileChangedWatcher.js +161 -0
- package/dist/src/utils/hooks/hookEvents.js +111 -0
- package/dist/src/utils/hooks/hookHelpers.js +60 -0
- package/dist/src/utils/hooks/hooksConfigManager.js +323 -0
- package/dist/src/utils/hooks/hooksConfigSnapshot.js +114 -0
- package/dist/src/utils/hooks/hooksSettings.js +204 -0
- package/dist/src/utils/hooks/postSamplingHooks.js +39 -0
- package/dist/src/utils/hooks/registerFrontmatterHooks.js +47 -0
- package/dist/src/utils/hooks/registerSkillHooks.js +40 -0
- package/dist/src/utils/hooks/sessionHooks.js +252 -0
- package/dist/src/utils/hooks/skillImprovement.js +211 -0
- package/dist/src/utils/hooks/ssrfGuard.js +258 -0
- package/dist/src/utils/hooks.js +3668 -0
- package/dist/src/utils/horizontalScroll.js +108 -0
- package/dist/src/utils/http.js +121 -0
- package/dist/src/utils/hyperlink.js +28 -0
- package/dist/src/utils/iTermBackup.js +48 -0
- package/dist/src/utils/ide.js +1235 -0
- package/dist/src/utils/idePathConversion.js +66 -0
- package/dist/src/utils/idleTimeout.js +44 -0
- package/dist/src/utils/imagePaste.js +329 -0
- package/dist/src/utils/imageResizer.js +664 -0
- package/dist/src/utils/imageStore.js +150 -0
- package/dist/src/utils/imageValidation.js +92 -0
- package/dist/src/utils/immediateCommand.js +12 -0
- package/dist/src/utils/inProcessTeammateHelpers.js +71 -0
- package/dist/src/utils/ink.js +20 -0
- package/dist/src/utils/intl.js +83 -0
- package/dist/src/utils/jetbrains.js +152 -0
- package/dist/src/utils/json.js +295 -0
- package/dist/src/utils/jsonRead.js +14 -0
- package/dist/src/utils/keyboardShortcuts.js +11 -0
- package/dist/src/utils/lazySchema.js +8 -0
- package/dist/src/utils/listSessionsImpl.js +332 -0
- package/dist/src/utils/localInstaller.js +131 -0
- package/dist/src/utils/lockfile.js +22 -0
- package/dist/src/utils/log.js +280 -0
- package/dist/src/utils/logoV2Utils.js +290 -0
- package/dist/src/utils/mailbox.js +50 -0
- package/dist/src/utils/managedEnv.js +160 -0
- package/dist/src/utils/managedEnvConstants.js +200 -0
- package/dist/src/utils/markdown.js +300 -0
- package/dist/src/utils/markdownConfigLoader.js +494 -0
- package/dist/src/utils/mcp/dateTimeParser.js +102 -0
- package/dist/src/utils/mcp/elicitationValidation.js +259 -0
- package/dist/src/utils/mcpInstructionsDelta.js +97 -0
- package/dist/src/utils/mcpOutputStorage.js +159 -0
- package/dist/src/utils/mcpValidation.js +165 -0
- package/dist/src/utils/mcpWebSocketTransport.js +180 -0
- package/dist/src/utils/memoize.js +205 -0
- package/dist/src/utils/memory/types.js +9 -0
- package/dist/src/utils/memory/versions.js +7 -0
- package/dist/src/utils/memoryFileDetection.js +247 -0
- package/dist/src/utils/messagePredicates.js +6 -0
- package/dist/src/utils/messageQueueManager.js +430 -0
- package/dist/src/utils/messages/mappers.js +240 -0
- package/dist/src/utils/messages/systemInit.js +74 -0
- package/dist/src/utils/messages.js +4273 -0
- package/dist/src/utils/model/agent.js +128 -0
- package/dist/src/utils/model/aliases.js +21 -0
- package/dist/src/utils/model/antModels.js +25 -0
- package/dist/src/utils/model/bedrock.js +220 -0
- package/dist/src/utils/model/check1mAccess.js +64 -0
- package/dist/src/utils/model/configs.js +93 -0
- package/dist/src/utils/model/contextWindowUpgradeCheck.js +41 -0
- package/dist/src/utils/model/deprecation.js +72 -0
- package/dist/src/utils/model/model.js +641 -0
- package/dist/src/utils/model/modelAllowlist.js +148 -0
- package/dist/src/utils/model/modelCapabilities.js +107 -0
- package/dist/src/utils/model/modelOptions.js +645 -0
- package/dist/src/utils/model/modelStrings.js +144 -0
- package/dist/src/utils/model/modelSupportOverrides.js +40 -0
- package/dist/src/utils/model/openrouter.js +51 -0
- package/dist/src/utils/model/providerBaseUrls.js +77 -0
- package/dist/src/utils/model/providerCatalog.js +81 -0
- package/dist/src/utils/model/providerModels.js +334 -0
- package/dist/src/utils/model/providerProfiles.js +392 -0
- package/dist/src/utils/model/providerProfilesDb.js +886 -0
- package/dist/src/utils/model/providerSwitch.js +50 -0
- package/dist/src/utils/model/providerWorkspaces.js +36 -0
- package/dist/src/utils/model/providers.js +199 -0
- package/dist/src/utils/model/validateModel.js +257 -0
- package/dist/src/utils/modelCost.js +160 -0
- package/dist/src/utils/modifiers.js +35 -0
- package/dist/src/utils/mtls.js +134 -0
- package/dist/src/utils/nativeInstaller/download.js +370 -0
- package/dist/src/utils/nativeInstaller/index.js +8 -0
- package/dist/src/utils/nativeInstaller/installer.js +1396 -0
- package/dist/src/utils/nativeInstaller/packageManagers.js +258 -0
- package/dist/src/utils/nativeInstaller/pidLock.js +347 -0
- package/dist/src/utils/notebook.js +176 -0
- package/dist/src/utils/objectGroupBy.js +15 -0
- package/dist/src/utils/orchestration/store/index.js +6 -0
- package/dist/src/utils/orchestration/store/orchestrationDb.js +42 -0
- package/dist/src/utils/orchestration/store/providerAgentStore.js +244 -0
- package/dist/src/utils/orchestration/store/providerWorkspaceStore.js +125 -0
- package/dist/src/utils/orchestration/store/runStore.js +486 -0
- package/dist/src/utils/orchestration/store/teamStore.js +285 -0
- package/dist/src/utils/orchestration/store/types.js +1 -0
- package/dist/src/utils/pasteStore.js +93 -0
- package/dist/src/utils/path.js +140 -0
- package/dist/src/utils/pdf.js +236 -0
- package/dist/src/utils/pdfUtils.js +61 -0
- package/dist/src/utils/peerAddress.js +20 -0
- package/dist/src/utils/permissions/PermissionMode.js +95 -0
- package/dist/src/utils/permissions/PermissionPromptToolResultSchema.js +85 -0
- package/dist/src/utils/permissions/PermissionResult.js +11 -0
- package/dist/src/utils/permissions/PermissionRule.js +19 -0
- package/dist/src/utils/permissions/PermissionUpdate.js +330 -0
- package/dist/src/utils/permissions/PermissionUpdateSchema.js +61 -0
- package/dist/src/utils/permissions/autoModeState.js +34 -0
- package/dist/src/utils/permissions/bashClassifier.js +30 -0
- package/dist/src/utils/permissions/bypassPermissionsKillswitch.js +115 -0
- package/dist/src/utils/permissions/classifierDecision.js +88 -0
- package/dist/src/utils/permissions/classifierShared.js +28 -0
- package/dist/src/utils/permissions/dangerousPatterns.js +78 -0
- package/dist/src/utils/permissions/denialTracking.js +34 -0
- package/dist/src/utils/permissions/filesystem.js +1426 -0
- package/dist/src/utils/permissions/getNextPermissionMode.js +74 -0
- package/dist/src/utils/permissions/pathValidation.js +351 -0
- package/dist/src/utils/permissions/permissionExplainer.js +188 -0
- package/dist/src/utils/permissions/permissionRuleParser.js +177 -0
- package/dist/src/utils/permissions/permissionSetup.js +1164 -0
- package/dist/src/utils/permissions/permissions.js +1106 -0
- package/dist/src/utils/permissions/permissionsDb.js +322 -0
- package/dist/src/utils/permissions/permissionsLoader.js +217 -0
- package/dist/src/utils/permissions/shadowedRuleDetection.js +149 -0
- package/dist/src/utils/permissions/shellRuleMatching.js +174 -0
- package/dist/src/utils/permissions/yoloClassifier.js +1195 -0
- package/dist/src/utils/planModeV2.js +75 -0
- package/dist/src/utils/plans.js +334 -0
- package/dist/src/utils/platform.js +122 -0
- package/dist/src/utils/plugins/addDirPluginSettings.js +53 -0
- package/dist/src/utils/plugins/cacheUtils.js +174 -0
- package/dist/src/utils/plugins/dependencyResolver.js +244 -0
- package/dist/src/utils/plugins/fetchTelemetry.js +108 -0
- package/dist/src/utils/plugins/gitAvailability.js +65 -0
- package/dist/src/utils/plugins/headlessPluginInstall.js +136 -0
- package/dist/src/utils/plugins/hintRecommendation.js +136 -0
- package/dist/src/utils/plugins/installCounts.js +218 -0
- package/dist/src/utils/plugins/installedPluginsManager.js +1003 -0
- package/dist/src/utils/plugins/loadPluginAgents.js +219 -0
- package/dist/src/utils/plugins/loadPluginCommands.js +595 -0
- package/dist/src/utils/plugins/loadPluginHooks.js +239 -0
- package/dist/src/utils/plugins/loadPluginOutputStyles.js +112 -0
- package/dist/src/utils/plugins/lspPluginIntegration.js +293 -0
- package/dist/src/utils/plugins/lspRecommendation.js +278 -0
- package/dist/src/utils/plugins/managedPlugins.js +26 -0
- package/dist/src/utils/plugins/marketplaceHelpers.js +470 -0
- package/dist/src/utils/plugins/marketplaceManager.js +1939 -0
- package/dist/src/utils/plugins/mcpPluginIntegration.js +465 -0
- package/dist/src/utils/plugins/mcpbHandler.js +708 -0
- package/dist/src/utils/plugins/officialMarketplace.js +21 -0
- package/dist/src/utils/plugins/officialMarketplaceGcs.js +195 -0
- package/dist/src/utils/plugins/officialMarketplaceStartupCheck.js +338 -0
- package/dist/src/utils/plugins/orphanedPluginFilter.js +96 -0
- package/dist/src/utils/plugins/parseMarketplaceInput.js +143 -0
- package/dist/src/utils/plugins/performStartupChecks.js +66 -0
- package/dist/src/utils/plugins/pluginAutoupdate.js +210 -0
- package/dist/src/utils/plugins/pluginBlocklist.js +93 -0
- package/dist/src/utils/plugins/pluginDirectories.js +172 -0
- package/dist/src/utils/plugins/pluginFlagging.js +173 -0
- package/dist/src/utils/plugins/pluginIdentifier.js +78 -0
- package/dist/src/utils/plugins/pluginInstallationHelpers.js +400 -0
- package/dist/src/utils/plugins/pluginLoader.js +2426 -0
- package/dist/src/utils/plugins/pluginOptionsStorage.js +311 -0
- package/dist/src/utils/plugins/pluginPolicy.js +18 -0
- package/dist/src/utils/plugins/pluginStartupCheck.js +261 -0
- package/dist/src/utils/plugins/pluginVersioning.js +128 -0
- package/dist/src/utils/plugins/reconciler.js +181 -0
- package/dist/src/utils/plugins/refresh.js +162 -0
- package/dist/src/utils/plugins/schemas.js +1283 -0
- package/dist/src/utils/plugins/validatePlugin.js +765 -0
- package/dist/src/utils/plugins/walkPluginMarkdown.js +49 -0
- package/dist/src/utils/plugins/zipCache.js +346 -0
- package/dist/src/utils/plugins/zipCacheAdapters.js +133 -0
- package/dist/src/utils/postCommitAttribution.js +16 -0
- package/dist/src/utils/powershell/dangerousCmdlets.js +174 -0
- package/dist/src/utils/powershell/parser.js +1357 -0
- package/dist/src/utils/powershell/staticPrefix.js +277 -0
- package/dist/src/utils/preflightChecks.js +147 -0
- package/dist/src/utils/privacyLevel.js +49 -0
- package/dist/src/utils/process.js +56 -0
- package/dist/src/utils/processUserInput/processBashCommand.js +119 -0
- package/dist/src/utils/processUserInput/processSlashCommand.js +859 -0
- package/dist/src/utils/processUserInput/processTextPrompt.js +68 -0
- package/dist/src/utils/processUserInput/processUserInput.js +326 -0
- package/dist/src/utils/profilerBase.js +29 -0
- package/dist/src/utils/promptCategory.js +39 -0
- package/dist/src/utils/promptEditor.js +151 -0
- package/dist/src/utils/promptShellExecution.js +119 -0
- package/dist/src/utils/proxy.js +347 -0
- package/dist/src/utils/queryContext.js +110 -0
- package/dist/src/utils/queryHelpers.js +436 -0
- package/dist/src/utils/queryProfiler.js +242 -0
- package/dist/src/utils/queueProcessor.js +70 -0
- package/dist/src/utils/readEditContext.js +176 -0
- package/dist/src/utils/readFileInRange.js +278 -0
- package/dist/src/utils/releaseNotes.js +304 -0
- package/dist/src/utils/renderOptions.js +67 -0
- package/dist/src/utils/ripgrep.js +540 -0
- package/dist/src/utils/sandbox/sandbox-adapter.js +751 -0
- package/dist/src/utils/sandbox/sandbox-ui-utils.js +11 -0
- package/dist/src/utils/sanitization.js +72 -0
- package/dist/src/utils/screenshotClipboard.js +89 -0
- package/dist/src/utils/sdkEventQueue.js +49 -0
- package/dist/src/utils/sdkHeapDumpMonitor.js +16 -0
- package/dist/src/utils/secureStorage/fallbackStorage.js +59 -0
- package/dist/src/utils/secureStorage/index.js +14 -0
- package/dist/src/utils/secureStorage/keychainPrefetch.js +91 -0
- package/dist/src/utils/secureStorage/macOsKeychainHelpers.js +91 -0
- package/dist/src/utils/secureStorage/macOsKeychainStorage.js +192 -0
- package/dist/src/utils/secureStorage/plainTextStorage.js +81 -0
- package/dist/src/utils/secureStorage/secureStoreDefs.js +1 -0
- package/dist/src/utils/secureStorage/sqliteStorage.js +224 -0
- package/dist/src/utils/secureStorage/types.js +1 -0
- package/dist/src/utils/semanticBoolean.js +23 -0
- package/dist/src/utils/semanticNumber.js +34 -0
- package/dist/src/utils/semver.js +53 -0
- package/dist/src/utils/sequential.js +43 -0
- package/dist/src/utils/sessionActivity.js +120 -0
- package/dist/src/utils/sessionDataUploader.js +16 -0
- package/dist/src/utils/sessionEnvVars.js +18 -0
- package/dist/src/utils/sessionEnvironment.js +131 -0
- package/dist/src/utils/sessionFileAccessHooks.js +207 -0
- package/dist/src/utils/sessionIngressAuth.js +113 -0
- package/dist/src/utils/sessionRestore.js +359 -0
- package/dist/src/utils/sessionStart.js +165 -0
- package/dist/src/utils/sessionState.js +76 -0
- package/dist/src/utils/sessionStorage.js +4162 -0
- package/dist/src/utils/sessionStoragePortable.js +665 -0
- package/dist/src/utils/sessionTitle.js +120 -0
- package/dist/src/utils/sessionUrl.js +50 -0
- package/dist/src/utils/set.js +50 -0
- package/dist/src/utils/settings/allErrors.js +29 -0
- package/dist/src/utils/settings/applySettingsChange.js +65 -0
- package/dist/src/utils/settings/changeDetector.js +409 -0
- package/dist/src/utils/settings/constants.js +166 -0
- package/dist/src/utils/settings/internalWrites.js +33 -0
- package/dist/src/utils/settings/managedPath.js +29 -0
- package/dist/src/utils/settings/mdm/constants.js +62 -0
- package/dist/src/utils/settings/mdm/rawRead.js +97 -0
- package/dist/src/utils/settings/mdm/settings.js +254 -0
- package/dist/src/utils/settings/permissionValidation.js +224 -0
- package/dist/src/utils/settings/pluginOnlyPolicy.js +53 -0
- package/dist/src/utils/settings/schemaOutput.js +7 -0
- package/dist/src/utils/settings/settings.js +844 -0
- package/dist/src/utils/settings/settingsCache.js +47 -0
- package/dist/src/utils/settings/toolValidationConfig.js +76 -0
- package/dist/src/utils/settings/types.js +846 -0
- package/dist/src/utils/settings/validateEditTool.js +34 -0
- package/dist/src/utils/settings/validation.js +192 -0
- package/dist/src/utils/settings/validationTips.js +111 -0
- package/dist/src/utils/shell/bashProvider.js +202 -0
- package/dist/src/utils/shell/outputLimits.js +7 -0
- package/dist/src/utils/shell/powershellDetection.js +96 -0
- package/dist/src/utils/shell/powershellProvider.js +104 -0
- package/dist/src/utils/shell/prefix.js +246 -0
- package/dist/src/utils/shell/readOnlyCommandValidation.js +1776 -0
- package/dist/src/utils/shell/resolveDefaultShell.js +13 -0
- package/dist/src/utils/shell/shellProvider.js +2 -0
- package/dist/src/utils/shell/shellToolUtils.js +21 -0
- package/dist/src/utils/shell/specPrefix.js +198 -0
- package/dist/src/utils/shellConfig.js +136 -0
- package/dist/src/utils/sideQuery.js +195 -0
- package/dist/src/utils/sideQuestion.js +121 -0
- package/dist/src/utils/signal.js +34 -0
- package/dist/src/utils/sinks.js +15 -0
- package/dist/src/utils/skills/skillChangeDetector.js +266 -0
- package/dist/src/utils/slashCommandParsing.js +46 -0
- package/dist/src/utils/sleep.js +72 -0
- package/dist/src/utils/sliceAnsi.js +74 -0
- package/dist/src/utils/slowOperations.js +323 -0
- package/dist/src/utils/standaloneAgent.js +20 -0
- package/dist/src/utils/startupProfiler.js +158 -0
- package/dist/src/utils/staticRender.js +103 -0
- package/dist/src/utils/stats.js +802 -0
- package/dist/src/utils/statsCache.js +330 -0
- package/dist/src/utils/status.js +552 -0
- package/dist/src/utils/statusNoticeDefinitions.js +112 -0
- package/dist/src/utils/statusNoticeHelpers.js +15 -0
- package/dist/src/utils/stream.js +73 -0
- package/dist/src/utils/streamJsonStdoutGuard.js +107 -0
- package/dist/src/utils/streamlinedTransform.js +162 -0
- package/dist/src/utils/stringUtils.js +202 -0
- package/dist/src/utils/subprocessEnv.js +87 -0
- package/dist/src/utils/suggestions/commandSuggestions.js +458 -0
- package/dist/src/utils/suggestions/directoryCompletion.js +191 -0
- package/dist/src/utils/suggestions/shellHistoryCompletion.js +95 -0
- package/dist/src/utils/suggestions/skillUsageTracking.js +50 -0
- package/dist/src/utils/suggestions/slackChannelSuggestions.js +169 -0
- package/dist/src/utils/swarm/It2SetupPrompt.js +386 -0
- package/dist/src/utils/swarm/backends/ITermBackend.js +276 -0
- package/dist/src/utils/swarm/backends/InProcessBackend.js +237 -0
- package/dist/src/utils/swarm/backends/PaneBackendExecutor.js +250 -0
- package/dist/src/utils/swarm/backends/TmuxBackend.js +574 -0
- package/dist/src/utils/swarm/backends/detection.js +112 -0
- package/dist/src/utils/swarm/backends/it2Setup.js +185 -0
- package/dist/src/utils/swarm/backends/registry.js +369 -0
- package/dist/src/utils/swarm/backends/teammateModeSnapshot.js +68 -0
- package/dist/src/utils/swarm/backends/types.js +9 -0
- package/dist/src/utils/swarm/constants.js +29 -0
- package/dist/src/utils/swarm/inProcessRunner.js +1021 -0
- package/dist/src/utils/swarm/leaderPermissionBridge.js +31 -0
- package/dist/src/utils/swarm/permissionSync.js +667 -0
- package/dist/src/utils/swarm/reconnection.js +82 -0
- package/dist/src/utils/swarm/spawnInProcess.js +218 -0
- package/dist/src/utils/swarm/spawnUtils.js +123 -0
- package/dist/src/utils/swarm/teamHelpers.js +484 -0
- package/dist/src/utils/swarm/teammateInit.js +87 -0
- package/dist/src/utils/swarm/teammateLayoutManager.js +82 -0
- package/dist/src/utils/swarm/teammateModel.js +9 -0
- package/dist/src/utils/swarm/teammatePromptAddendum.js +17 -0
- package/dist/src/utils/systemDirectories.js +51 -0
- package/dist/src/utils/systemPrompt.js +91 -0
- package/dist/src/utils/systemPromptType.js +9 -0
- package/dist/src/utils/systemTheme.js +108 -0
- package/dist/src/utils/systemThemeWatcher.js +16 -0
- package/dist/src/utils/taggedId.js +49 -0
- package/dist/src/utils/task/TaskOutput.js +320 -0
- package/dist/src/utils/task/diskOutput.js +387 -0
- package/dist/src/utils/task/framework.js +236 -0
- package/dist/src/utils/task/outputFormatting.js +24 -0
- package/dist/src/utils/task/sdkProgress.js +24 -0
- package/dist/src/utils/tasks.js +672 -0
- package/dist/src/utils/teamDiscovery.js +48 -0
- package/dist/src/utils/teamMemoryOps.js +67 -0
- package/dist/src/utils/teammate.js +237 -0
- package/dist/src/utils/teammateContext.js +56 -0
- package/dist/src/utils/teammateMailbox.js +793 -0
- package/dist/src/utils/telemetry/betaSessionTracing.js +371 -0
- package/dist/src/utils/telemetry/bigqueryExporter.js +181 -0
- package/dist/src/utils/telemetry/events.js +57 -0
- package/dist/src/utils/telemetry/instrumentation.js +617 -0
- package/dist/src/utils/telemetry/logger.js +25 -0
- package/dist/src/utils/telemetry/perfettoTracing.js +882 -0
- package/dist/src/utils/telemetry/pluginTelemetry.js +157 -0
- package/dist/src/utils/telemetry/sessionTracing.js +693 -0
- package/dist/src/utils/telemetry/skillLoadedEvent.js +26 -0
- package/dist/src/utils/telemetryAttributes.js +57 -0
- package/dist/src/utils/teleport/api.js +299 -0
- package/dist/src/utils/teleport/environmentSelection.js +55 -0
- package/dist/src/utils/teleport/environments.js +84 -0
- package/dist/src/utils/teleport/gitBundle.js +192 -0
- package/dist/src/utils/teleport.js +1041 -0
- package/dist/src/utils/tempfile.js +26 -0
- package/dist/src/utils/terminal.js +105 -0
- package/dist/src/utils/terminalPanel.js +155 -0
- package/dist/src/utils/textHighlighting.js +113 -0
- package/dist/src/utils/theme.js +525 -0
- package/dist/src/utils/thinking.js +130 -0
- package/dist/src/utils/timeouts.js +35 -0
- package/dist/src/utils/tmuxSocket.js +373 -0
- package/dist/src/utils/todo/types.js +9 -0
- package/dist/src/utils/tokenBudget.js +62 -0
- package/dist/src/utils/tokens.js +223 -0
- package/dist/src/utils/toolErrors.js +101 -0
- package/dist/src/utils/toolPool.js +63 -0
- package/dist/src/utils/toolResultStorage.js +769 -0
- package/dist/src/utils/toolSchemaCache.js +7 -0
- package/dist/src/utils/toolSearch.js +551 -0
- package/dist/src/utils/transcriptSearch.js +200 -0
- package/dist/src/utils/treeify.js +111 -0
- package/dist/src/utils/truncate.js +164 -0
- package/dist/src/utils/udsClient.js +16 -0
- package/dist/src/utils/udsMessaging.js +16 -0
- package/dist/src/utils/ultraplan/ccrSession.js +264 -0
- package/dist/src/utils/ultraplan/keyword.js +122 -0
- package/dist/src/utils/ultraplan/prompt.txt +1 -0
- package/dist/src/utils/unaryLogging.js +16 -0
- package/dist/src/utils/undercover.js +89 -0
- package/dist/src/utils/user.js +138 -0
- package/dist/src/utils/userAgent.js +13 -0
- package/dist/src/utils/userPromptKeywords.js +21 -0
- package/dist/src/utils/uuid.js +22 -0
- package/dist/src/utils/warningHandler.js +97 -0
- package/dist/src/utils/which.js +75 -0
- package/dist/src/utils/windowsPaths.js +150 -0
- package/dist/src/utils/withResolvers.js +13 -0
- package/dist/src/utils/words.js +793 -0
- package/dist/src/utils/workloadContext.js +42 -0
- package/dist/src/utils/worktree.js +1145 -0
- package/dist/src/utils/worktreeModeEnabled.js +11 -0
- package/dist/src/utils/xdg.js +52 -0
- package/dist/src/utils/xml.js +15 -0
- package/dist/src/utils/yaml.js +16 -0
- package/dist/src/utils/zodToJsonSchema.js +19 -0
- package/dist/src/vim/motions.js +73 -0
- package/dist/src/vim/operators.js +401 -0
- package/dist/src/vim/textObjects.js +153 -0
- package/dist/src/vim/transitions.js +340 -0
- package/dist/src/vim/types.js +93 -0
- package/dist/src/voice/voiceModeEnabled.js +48 -0
- package/dist/src/whatsapp/bridge.js +267 -0
- package/dist/src/whatsapp/config.js +153 -0
- package/dist/src/whatsapp/markdown.js +37 -0
- package/dist/src/whatsapp/mirror.js +74 -0
- package/dist/src/whatsapp/session.js +142 -0
- package/package.json +2 -1
|
@@ -0,0 +1,1783 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import figures from 'figures';
|
|
3
|
+
import * as fs from 'fs/promises';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
|
+
import { ConfigurableShortcutHint } from '../../components/ConfigurableShortcutHint.js';
|
|
8
|
+
import { Byline } from '../../components/design-system/Byline.js';
|
|
9
|
+
import { MCPRemoteServerMenu } from '../../components/mcp/MCPRemoteServerMenu.js';
|
|
10
|
+
import { MCPStdioServerMenu } from '../../components/mcp/MCPStdioServerMenu.js';
|
|
11
|
+
import { MCPToolDetailView } from '../../components/mcp/MCPToolDetailView.js';
|
|
12
|
+
import { MCPToolListView } from '../../components/mcp/MCPToolListView.js';
|
|
13
|
+
import { SearchBox } from '../../components/SearchBox.js';
|
|
14
|
+
import { useSearchInput } from '../../hooks/useSearchInput.js';
|
|
15
|
+
import { useTerminalSize } from '../../hooks/useTerminalSize.js';
|
|
16
|
+
// eslint-disable-next-line custom-rules/prefer-use-keybindings -- useInput needed for raw search mode text input
|
|
17
|
+
import { Box, Text, useInput, useTerminalFocus } from '../../ink.js';
|
|
18
|
+
import { useKeybinding, useKeybindings } from '../../keybindings/useKeybinding.js';
|
|
19
|
+
import { getBuiltinPluginDefinition } from '../../plugins/builtinPlugins.js';
|
|
20
|
+
import { useMcpToggleEnabled } from '../../services/mcp/MCPConnectionManager.js';
|
|
21
|
+
import { filterToolsByServer } from '../../services/mcp/utils.js';
|
|
22
|
+
import { disablePluginOp, enablePluginOp, getPluginInstallationFromV2, isInstallableScope, isPluginEnabledAtProjectScope, uninstallPluginOp, updatePluginOp } from '../../services/plugins/pluginOperations.js';
|
|
23
|
+
import { useAppState } from '../../state/AppState.js';
|
|
24
|
+
import { count } from '../../utils/array.js';
|
|
25
|
+
import { openBrowser } from '../../utils/browser.js';
|
|
26
|
+
import { logForDebugging } from '../../utils/debug.js';
|
|
27
|
+
import { errorMessage, toError } from '../../utils/errors.js';
|
|
28
|
+
import { logError } from '../../utils/log.js';
|
|
29
|
+
import { clearAllCaches } from '../../utils/plugins/cacheUtils.js';
|
|
30
|
+
import { loadInstalledPluginsV2 } from '../../utils/plugins/installedPluginsManager.js';
|
|
31
|
+
import { getMarketplace } from '../../utils/plugins/marketplaceManager.js';
|
|
32
|
+
import { isMcpbSource, loadMcpbFile } from '../../utils/plugins/mcpbHandler.js';
|
|
33
|
+
import { getPluginDataDirSize, pluginDataDirPath } from '../../utils/plugins/pluginDirectories.js';
|
|
34
|
+
import { getFlaggedPlugins, markFlaggedPluginsSeen, removeFlaggedPlugin } from '../../utils/plugins/pluginFlagging.js';
|
|
35
|
+
import { parsePluginIdentifier } from '../../utils/plugins/pluginIdentifier.js';
|
|
36
|
+
import { loadAllPlugins } from '../../utils/plugins/pluginLoader.js';
|
|
37
|
+
import { loadPluginOptions, savePluginOptions } from '../../utils/plugins/pluginOptionsStorage.js';
|
|
38
|
+
import { isPluginBlockedByPolicy } from '../../utils/plugins/pluginPolicy.js';
|
|
39
|
+
import { getPluginEditableScopes } from '../../utils/plugins/pluginStartupCheck.js';
|
|
40
|
+
import { getSettings_DEPRECATED, getSettingsForSource, updateSettingsForSource } from '../../utils/settings/settings.js';
|
|
41
|
+
import { jsonParse } from '../../utils/slowOperations.js';
|
|
42
|
+
import { plural } from '../../utils/stringUtils.js';
|
|
43
|
+
import { formatErrorMessage, getErrorGuidance } from './PluginErrors.js';
|
|
44
|
+
import { PluginOptionsDialog } from './PluginOptionsDialog.js';
|
|
45
|
+
import { PluginOptionsFlow } from './PluginOptionsFlow.js';
|
|
46
|
+
import { UnifiedInstalledCell } from './UnifiedInstalledCell.js';
|
|
47
|
+
import { usePagination } from './usePagination.js';
|
|
48
|
+
/**
|
|
49
|
+
* Get list of base file names (without .md extension) from a directory
|
|
50
|
+
* @param dirPath The directory path to list files from
|
|
51
|
+
* @returns Array of base file names without .md extension
|
|
52
|
+
* @example
|
|
53
|
+
* // Given directory contains: agent-sdk-verifier-py.md, agent-sdk-verifier-ts.md, README.txt
|
|
54
|
+
* await getBaseFileNames('/path/to/agents')
|
|
55
|
+
* // Returns: ['agent-sdk-verifier-py', 'agent-sdk-verifier-ts']
|
|
56
|
+
*/
|
|
57
|
+
async function getBaseFileNames(dirPath) {
|
|
58
|
+
try {
|
|
59
|
+
const entries = await fs.readdir(dirPath, {
|
|
60
|
+
withFileTypes: true
|
|
61
|
+
});
|
|
62
|
+
return entries.filter((entry) => entry.isFile() && entry.name.endsWith('.md')).map((entry) => {
|
|
63
|
+
// Remove .md extension specifically
|
|
64
|
+
const baseName = path.basename(entry.name, '.md');
|
|
65
|
+
return baseName;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
const errorMsg = errorMessage(error);
|
|
70
|
+
logForDebugging(`Failed to read plugin components from ${dirPath}: ${errorMsg}`, {
|
|
71
|
+
level: 'error'
|
|
72
|
+
});
|
|
73
|
+
logError(toError(error));
|
|
74
|
+
// Return empty array to allow graceful degradation - plugin details can still be shown
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get list of skill directory names from a skills directory
|
|
80
|
+
* Skills are directories containing a SKILL.md file
|
|
81
|
+
* @param dirPath The skills directory path to scan
|
|
82
|
+
* @returns Array of skill directory names that contain SKILL.md
|
|
83
|
+
* @example
|
|
84
|
+
* // Given directory contains: my-skill/SKILL.md, another-skill/SKILL.md, README.txt
|
|
85
|
+
* await getSkillDirNames('/path/to/skills')
|
|
86
|
+
* // Returns: ['my-skill', 'another-skill']
|
|
87
|
+
*/
|
|
88
|
+
async function getSkillDirNames(dirPath) {
|
|
89
|
+
try {
|
|
90
|
+
const entries = await fs.readdir(dirPath, {
|
|
91
|
+
withFileTypes: true
|
|
92
|
+
});
|
|
93
|
+
const skillNames = [];
|
|
94
|
+
for (const entry of entries) {
|
|
95
|
+
// Check if it's a directory or symlink (symlinks may point to skill directories)
|
|
96
|
+
if (entry.isDirectory() || entry.isSymbolicLink()) {
|
|
97
|
+
// Check if this directory contains a SKILL.md file
|
|
98
|
+
const skillFilePath = path.join(dirPath, entry.name, 'SKILL.md');
|
|
99
|
+
try {
|
|
100
|
+
const st = await fs.stat(skillFilePath);
|
|
101
|
+
if (st.isFile()) {
|
|
102
|
+
skillNames.push(entry.name);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
// No SKILL.md file in this directory, skip it
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return skillNames;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
const errorMsg = errorMessage(error);
|
|
114
|
+
logForDebugging(`Failed to read skill directories from ${dirPath}: ${errorMsg}`, {
|
|
115
|
+
level: 'error'
|
|
116
|
+
});
|
|
117
|
+
logError(toError(error));
|
|
118
|
+
// Return empty array to allow graceful degradation - plugin details can still be shown
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Component to display installed plugin components
|
|
123
|
+
function PluginComponentsDisplay({ plugin, marketplace }) {
|
|
124
|
+
const [components, setComponents] = useState(null);
|
|
125
|
+
const [loading, setLoading] = useState(true);
|
|
126
|
+
const [error, setError] = useState(null);
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
async function loadComponents() {
|
|
129
|
+
try {
|
|
130
|
+
// Built-in plugins don't have a marketplace entry — read from the
|
|
131
|
+
// registered definition directly.
|
|
132
|
+
if (marketplace === 'builtin') {
|
|
133
|
+
const builtinDef = getBuiltinPluginDefinition(plugin.name);
|
|
134
|
+
if (builtinDef) {
|
|
135
|
+
const skillNames = builtinDef.skills?.map(s => s.name) ?? [];
|
|
136
|
+
const hookEvents = builtinDef.hooks ? Object.keys(builtinDef.hooks) : [];
|
|
137
|
+
const mcpServerNames = builtinDef.mcpServers ? Object.keys(builtinDef.mcpServers) : [];
|
|
138
|
+
setComponents({
|
|
139
|
+
commands: null,
|
|
140
|
+
agents: null,
|
|
141
|
+
skills: skillNames.length > 0 ? skillNames : null,
|
|
142
|
+
hooks: hookEvents.length > 0 ? hookEvents : null,
|
|
143
|
+
mcpServers: mcpServerNames.length > 0 ? mcpServerNames : null
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
setError(`Built-in plugin ${plugin.name} not found`);
|
|
148
|
+
}
|
|
149
|
+
setLoading(false);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const marketplaceData = await getMarketplace(marketplace);
|
|
153
|
+
// Find the plugin entry in the array
|
|
154
|
+
const pluginEntry = marketplaceData.plugins.find(p => p.name === plugin.name);
|
|
155
|
+
if (pluginEntry) {
|
|
156
|
+
// Combine commands from both sources
|
|
157
|
+
const commandPathList = [];
|
|
158
|
+
if (plugin.commandsPath) {
|
|
159
|
+
commandPathList.push(plugin.commandsPath);
|
|
160
|
+
}
|
|
161
|
+
if (plugin.commandsPaths) {
|
|
162
|
+
commandPathList.push(...plugin.commandsPaths);
|
|
163
|
+
}
|
|
164
|
+
// Get base file names from all command paths
|
|
165
|
+
const commandList = [];
|
|
166
|
+
for (const commandPath of commandPathList) {
|
|
167
|
+
if (typeof commandPath === 'string') {
|
|
168
|
+
// commandPath is already a full path
|
|
169
|
+
const baseNames = await getBaseFileNames(commandPath);
|
|
170
|
+
commandList.push(...baseNames);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// Combine agents from both sources
|
|
174
|
+
const agentPathList = [];
|
|
175
|
+
if (plugin.agentsPath) {
|
|
176
|
+
agentPathList.push(plugin.agentsPath);
|
|
177
|
+
}
|
|
178
|
+
if (plugin.agentsPaths) {
|
|
179
|
+
agentPathList.push(...plugin.agentsPaths);
|
|
180
|
+
}
|
|
181
|
+
// Get base file names from all agent paths
|
|
182
|
+
const agentList = [];
|
|
183
|
+
for (const agentPath of agentPathList) {
|
|
184
|
+
if (typeof agentPath === 'string') {
|
|
185
|
+
// agentPath is already a full path
|
|
186
|
+
const baseNames_0 = await getBaseFileNames(agentPath);
|
|
187
|
+
agentList.push(...baseNames_0);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// Combine skills from both sources
|
|
191
|
+
const skillPathList = [];
|
|
192
|
+
if (plugin.skillsPath) {
|
|
193
|
+
skillPathList.push(plugin.skillsPath);
|
|
194
|
+
}
|
|
195
|
+
if (plugin.skillsPaths) {
|
|
196
|
+
skillPathList.push(...plugin.skillsPaths);
|
|
197
|
+
}
|
|
198
|
+
// Get skill directory names from all skill paths
|
|
199
|
+
// Skills are directories containing SKILL.md files
|
|
200
|
+
const skillList = [];
|
|
201
|
+
for (const skillPath of skillPathList) {
|
|
202
|
+
if (typeof skillPath === 'string') {
|
|
203
|
+
// skillPath is already a full path to a skills directory
|
|
204
|
+
const skillDirNames = await getSkillDirNames(skillPath);
|
|
205
|
+
skillList.push(...skillDirNames);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Combine hooks from both sources
|
|
209
|
+
const hooksList = [];
|
|
210
|
+
if (plugin.hooksConfig) {
|
|
211
|
+
hooksList.push(Object.keys(plugin.hooksConfig));
|
|
212
|
+
}
|
|
213
|
+
if (pluginEntry.hooks) {
|
|
214
|
+
hooksList.push(pluginEntry.hooks);
|
|
215
|
+
}
|
|
216
|
+
// Combine MCP servers from both sources
|
|
217
|
+
const mcpServersList = [];
|
|
218
|
+
if (plugin.mcpServers) {
|
|
219
|
+
mcpServersList.push(Object.keys(plugin.mcpServers));
|
|
220
|
+
}
|
|
221
|
+
if (pluginEntry.mcpServers) {
|
|
222
|
+
mcpServersList.push(pluginEntry.mcpServers);
|
|
223
|
+
}
|
|
224
|
+
setComponents({
|
|
225
|
+
commands: commandList.length > 0 ? commandList : null,
|
|
226
|
+
agents: agentList.length > 0 ? agentList : null,
|
|
227
|
+
skills: skillList.length > 0 ? skillList : null,
|
|
228
|
+
hooks: hooksList.length > 0 ? hooksList : null,
|
|
229
|
+
mcpServers: mcpServersList.length > 0 ? mcpServersList : null
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
setError(`Plugin ${plugin.name} not found in marketplace`);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
catch (err) {
|
|
237
|
+
setError(err instanceof Error ? err.message : 'Failed to load components');
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
setLoading(false);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
void loadComponents();
|
|
244
|
+
}, [plugin.name, plugin.commandsPath, plugin.commandsPaths, plugin.agentsPath, plugin.agentsPaths, plugin.skillsPath, plugin.skillsPaths, plugin.hooksConfig, plugin.mcpServers, marketplace]);
|
|
245
|
+
if (loading) {
|
|
246
|
+
return null; // Don't show loading state for cleaner UI
|
|
247
|
+
}
|
|
248
|
+
if (error) {
|
|
249
|
+
return _jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Components:" }), _jsxs(Text, { dimColor: true, children: ["Error: ", error] })] });
|
|
250
|
+
}
|
|
251
|
+
if (!components) {
|
|
252
|
+
return null; // No components info available
|
|
253
|
+
}
|
|
254
|
+
const hasComponents = components.commands || components.agents || components.skills || components.hooks || components.mcpServers;
|
|
255
|
+
if (!hasComponents) {
|
|
256
|
+
return null; // No components defined
|
|
257
|
+
}
|
|
258
|
+
return _jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Installed components:" }), components.commands ? _jsxs(Text, { dimColor: true, children: ["\u2022 Commands:", ' ', typeof components.commands === 'string' ? components.commands : Array.isArray(components.commands) ? components.commands.join(', ') : Object.keys(components.commands).join(', ')] }) : null, components.agents ? _jsxs(Text, { dimColor: true, children: ["\u2022 Agents:", ' ', typeof components.agents === 'string' ? components.agents : Array.isArray(components.agents) ? components.agents.join(', ') : Object.keys(components.agents).join(', ')] }) : null, components.skills ? _jsxs(Text, { dimColor: true, children: ["\u2022 Skills:", ' ', typeof components.skills === 'string' ? components.skills : Array.isArray(components.skills) ? components.skills.join(', ') : Object.keys(components.skills).join(', ')] }) : null, components.hooks ? _jsxs(Text, { dimColor: true, children: ["\u2022 Hooks:", ' ', 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)] }) : null, components.mcpServers ? _jsxs(Text, { dimColor: true, children: ["\u2022 MCP Servers:", ' ', 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)] }) : null] });
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Check if a plugin is from a local source and cannot be remotely updated
|
|
262
|
+
* @returns Error message if local, null if remote/updatable
|
|
263
|
+
*/
|
|
264
|
+
async function checkIfLocalPlugin(pluginName, marketplaceName) {
|
|
265
|
+
const marketplace = await getMarketplace(marketplaceName);
|
|
266
|
+
const entry = marketplace?.plugins.find(p => p.name === pluginName);
|
|
267
|
+
if (entry && typeof entry.source === 'string') {
|
|
268
|
+
return `Local plugins cannot be updated remotely. To update, modify the source at: ${entry.source}`;
|
|
269
|
+
}
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Filter out plugins that are force-disabled by org policy (policySettings).
|
|
274
|
+
* These are blocked by the organization and cannot be re-enabled by the user.
|
|
275
|
+
* Checks policySettings directly rather than installation scope, since managed
|
|
276
|
+
* settings don't create installation records with scope 'managed'.
|
|
277
|
+
*/
|
|
278
|
+
export function filterManagedDisabledPlugins(plugins) {
|
|
279
|
+
return plugins.filter(plugin => {
|
|
280
|
+
const marketplace = plugin.source.split('@')[1] || 'local';
|
|
281
|
+
return !isPluginBlockedByPolicy(`${plugin.name}@${marketplace}`);
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
export function ManagePlugins({ setViewState: setParentViewState, setResult, onManageComplete, onSearchModeChange, targetPlugin, targetMarketplace, action }) {
|
|
285
|
+
// App state for MCP access
|
|
286
|
+
const mcpClients = useAppState(s => s.mcp.clients);
|
|
287
|
+
const mcpTools = useAppState(s_0 => s_0.mcp.tools);
|
|
288
|
+
const pluginErrors = useAppState(s_1 => s_1.plugins.errors);
|
|
289
|
+
const flaggedPlugins = getFlaggedPlugins();
|
|
290
|
+
// Search state
|
|
291
|
+
const [isSearchMode, setIsSearchModeRaw] = useState(false);
|
|
292
|
+
const setIsSearchMode = useCallback((active) => {
|
|
293
|
+
setIsSearchModeRaw(active);
|
|
294
|
+
onSearchModeChange?.(active);
|
|
295
|
+
}, [onSearchModeChange]);
|
|
296
|
+
const isTerminalFocused = useTerminalFocus();
|
|
297
|
+
const { columns: terminalWidth } = useTerminalSize();
|
|
298
|
+
// View state
|
|
299
|
+
const [viewState, setViewState] = useState('plugin-list');
|
|
300
|
+
const { query: searchQuery, setQuery: setSearchQuery, cursorOffset: searchCursorOffset } = useSearchInput({
|
|
301
|
+
isActive: viewState === 'plugin-list' && isSearchMode,
|
|
302
|
+
onExit: () => {
|
|
303
|
+
setIsSearchMode(false);
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
const [selectedPlugin, setSelectedPlugin] = useState(null);
|
|
307
|
+
// Data state
|
|
308
|
+
const [marketplaces, setMarketplaces] = useState([]);
|
|
309
|
+
const [pluginStates, setPluginStates] = useState([]);
|
|
310
|
+
const [loading, setLoading] = useState(true);
|
|
311
|
+
const [pendingToggles, setPendingToggles] = useState(new Map());
|
|
312
|
+
// Guard to prevent auto-navigation from re-triggering after the user
|
|
313
|
+
// navigates away (targetPlugin is never cleared by the parent).
|
|
314
|
+
const hasAutoNavigated = useRef(false);
|
|
315
|
+
// Auto-action (enable/disable/uninstall) to fire after auto-navigation lands.
|
|
316
|
+
// Ref, not state: it's consumed by a one-shot effect that already re-runs on
|
|
317
|
+
// viewState/selectedPlugin, so a render-triggering state var would be redundant.
|
|
318
|
+
const pendingAutoActionRef = useRef(undefined);
|
|
319
|
+
// MCP toggle hook
|
|
320
|
+
const toggleMcpServer = useMcpToggleEnabled();
|
|
321
|
+
// Handle escape to go back - viewState-dependent navigation
|
|
322
|
+
const handleBack = React.useCallback(() => {
|
|
323
|
+
if (viewState === 'plugin-details') {
|
|
324
|
+
setViewState('plugin-list');
|
|
325
|
+
setSelectedPlugin(null);
|
|
326
|
+
setProcessError(null);
|
|
327
|
+
}
|
|
328
|
+
else if (typeof viewState === 'object' && viewState.type === 'failed-plugin-details') {
|
|
329
|
+
setViewState('plugin-list');
|
|
330
|
+
setProcessError(null);
|
|
331
|
+
}
|
|
332
|
+
else if (viewState === 'configuring') {
|
|
333
|
+
setViewState('plugin-details');
|
|
334
|
+
setConfigNeeded(null);
|
|
335
|
+
}
|
|
336
|
+
else if (typeof viewState === 'object' && (viewState.type === 'plugin-options' || viewState.type === 'configuring-options')) {
|
|
337
|
+
// Cancel mid-sequence — plugin is already enabled, just bail to list.
|
|
338
|
+
// User can configure later via the Configure options menu if they want.
|
|
339
|
+
setViewState('plugin-list');
|
|
340
|
+
setSelectedPlugin(null);
|
|
341
|
+
setResult('Plugin enabled. Configuration skipped — run /reload-plugins to apply.');
|
|
342
|
+
if (onManageComplete) {
|
|
343
|
+
void onManageComplete();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
else if (typeof viewState === 'object' && viewState.type === 'flagged-detail') {
|
|
347
|
+
setViewState('plugin-list');
|
|
348
|
+
setProcessError(null);
|
|
349
|
+
}
|
|
350
|
+
else if (typeof viewState === 'object' && viewState.type === 'mcp-detail') {
|
|
351
|
+
setViewState('plugin-list');
|
|
352
|
+
setProcessError(null);
|
|
353
|
+
}
|
|
354
|
+
else if (typeof viewState === 'object' && viewState.type === 'mcp-tools') {
|
|
355
|
+
setViewState({
|
|
356
|
+
type: 'mcp-detail',
|
|
357
|
+
client: viewState.client
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
else if (typeof viewState === 'object' && viewState.type === 'mcp-tool-detail') {
|
|
361
|
+
setViewState({
|
|
362
|
+
type: 'mcp-tools',
|
|
363
|
+
client: viewState.client
|
|
364
|
+
});
|
|
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
|
+
// Escape when not in search mode - go back.
|
|
377
|
+
// Excludes confirm-project-uninstall (has its own confirm:no handler in
|
|
378
|
+
// Confirmation context — letting this fire would create competing handlers)
|
|
379
|
+
// and confirm-data-cleanup (uses raw useInput where n and escape are
|
|
380
|
+
// DIFFERENT actions: keep-data vs cancel).
|
|
381
|
+
useKeybinding('confirm:no', handleBack, {
|
|
382
|
+
context: 'Confirmation',
|
|
383
|
+
isActive: (viewState !== 'plugin-list' || !isSearchMode) && viewState !== 'confirm-project-uninstall' && !(typeof viewState === 'object' && viewState.type === 'confirm-data-cleanup')
|
|
384
|
+
});
|
|
385
|
+
// Helper to get MCP status
|
|
386
|
+
const getMcpStatus = (client) => {
|
|
387
|
+
if (client.type === 'connected')
|
|
388
|
+
return 'connected';
|
|
389
|
+
if (client.type === 'disabled')
|
|
390
|
+
return 'disabled';
|
|
391
|
+
if (client.type === 'pending')
|
|
392
|
+
return 'pending';
|
|
393
|
+
if (client.type === 'needs-auth')
|
|
394
|
+
return 'needs-auth';
|
|
395
|
+
return 'failed';
|
|
396
|
+
};
|
|
397
|
+
// Derive unified items from plugins and MCP servers
|
|
398
|
+
const unifiedItems = useMemo(() => {
|
|
399
|
+
const mergedSettings = getSettings_DEPRECATED();
|
|
400
|
+
// Build map of plugin name -> child MCPs
|
|
401
|
+
// Plugin MCPs have names like "plugin:pluginName:serverName"
|
|
402
|
+
const pluginMcpMap = new Map();
|
|
403
|
+
for (const client_0 of mcpClients) {
|
|
404
|
+
if (client_0.name.startsWith('plugin:')) {
|
|
405
|
+
const parts = client_0.name.split(':');
|
|
406
|
+
if (parts.length >= 3) {
|
|
407
|
+
const pluginName = parts[1];
|
|
408
|
+
const serverName = parts.slice(2).join(':');
|
|
409
|
+
const existing = pluginMcpMap.get(pluginName) || [];
|
|
410
|
+
existing.push({
|
|
411
|
+
displayName: serverName,
|
|
412
|
+
client: client_0
|
|
413
|
+
});
|
|
414
|
+
pluginMcpMap.set(pluginName, existing);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
const pluginsWithChildren = [];
|
|
419
|
+
for (const state of pluginStates) {
|
|
420
|
+
const pluginId = `${state.plugin.name}@${state.marketplace}`;
|
|
421
|
+
const isEnabled = mergedSettings?.enabledPlugins?.[pluginId] !== false;
|
|
422
|
+
const errors = pluginErrors.filter(e => 'plugin' in e && e.plugin === state.plugin.name || e.source === pluginId || e.source.startsWith(`${state.plugin.name}@`));
|
|
423
|
+
// Built-in plugins use 'builtin' scope; others look up from V2 data.
|
|
424
|
+
const originalScope = state.plugin.isBuiltin ? 'builtin' : state.scope || 'user';
|
|
425
|
+
pluginsWithChildren.push({
|
|
426
|
+
item: {
|
|
427
|
+
type: 'plugin',
|
|
428
|
+
id: pluginId,
|
|
429
|
+
name: state.plugin.name,
|
|
430
|
+
description: state.plugin.manifest.description,
|
|
431
|
+
marketplace: state.marketplace,
|
|
432
|
+
scope: originalScope,
|
|
433
|
+
isEnabled,
|
|
434
|
+
errorCount: errors.length,
|
|
435
|
+
errors,
|
|
436
|
+
plugin: state.plugin,
|
|
437
|
+
pendingEnable: state.pendingEnable,
|
|
438
|
+
pendingUpdate: state.pendingUpdate,
|
|
439
|
+
pendingToggle: pendingToggles.get(pluginId)
|
|
440
|
+
},
|
|
441
|
+
originalScope,
|
|
442
|
+
childMcps: pluginMcpMap.get(state.plugin.name) || []
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
// Find orphan errors (errors for plugins that failed to load entirely)
|
|
446
|
+
const matchedPluginIds = new Set(pluginsWithChildren.map(({ item }) => item.id));
|
|
447
|
+
const matchedPluginNames = new Set(pluginsWithChildren.map(({ item: item_0 }) => item_0.name));
|
|
448
|
+
const orphanErrorsBySource = new Map();
|
|
449
|
+
for (const error of pluginErrors) {
|
|
450
|
+
if (matchedPluginIds.has(error.source) || 'plugin' in error && typeof error.plugin === 'string' && matchedPluginNames.has(error.plugin)) {
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
const existing_0 = orphanErrorsBySource.get(error.source) || [];
|
|
454
|
+
existing_0.push(error);
|
|
455
|
+
orphanErrorsBySource.set(error.source, existing_0);
|
|
456
|
+
}
|
|
457
|
+
const pluginScopes = getPluginEditableScopes();
|
|
458
|
+
const failedPluginItems = [];
|
|
459
|
+
for (const [pluginId_0, errors_0] of orphanErrorsBySource) {
|
|
460
|
+
// Skip plugins that are already shown in the flagged section
|
|
461
|
+
if (pluginId_0 in flaggedPlugins)
|
|
462
|
+
continue;
|
|
463
|
+
const parsed = parsePluginIdentifier(pluginId_0);
|
|
464
|
+
const pluginName_0 = parsed.name || pluginId_0;
|
|
465
|
+
const marketplace = parsed.marketplace || 'unknown';
|
|
466
|
+
const rawScope = pluginScopes.get(pluginId_0);
|
|
467
|
+
// 'flag' is session-only (from --plugin-dir / flagSettings) and undefined
|
|
468
|
+
// means the plugin isn't in any settings source. Default both to 'user'
|
|
469
|
+
// since UnifiedInstalledItem doesn't have a 'flag' scope variant.
|
|
470
|
+
const scope = rawScope === 'flag' || rawScope === undefined ? 'user' : rawScope;
|
|
471
|
+
failedPluginItems.push({
|
|
472
|
+
type: 'failed-plugin',
|
|
473
|
+
id: pluginId_0,
|
|
474
|
+
name: pluginName_0,
|
|
475
|
+
marketplace,
|
|
476
|
+
scope,
|
|
477
|
+
errorCount: errors_0.length,
|
|
478
|
+
errors: errors_0
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
// Build standalone MCP items
|
|
482
|
+
const standaloneMcps = [];
|
|
483
|
+
for (const client_1 of mcpClients) {
|
|
484
|
+
if (client_1.name === 'ide')
|
|
485
|
+
continue;
|
|
486
|
+
if (client_1.name.startsWith('plugin:'))
|
|
487
|
+
continue;
|
|
488
|
+
standaloneMcps.push({
|
|
489
|
+
type: 'mcp',
|
|
490
|
+
id: `mcp:${client_1.name}`,
|
|
491
|
+
name: client_1.name,
|
|
492
|
+
description: undefined,
|
|
493
|
+
scope: client_1.config.scope,
|
|
494
|
+
status: getMcpStatus(client_1),
|
|
495
|
+
client: client_1
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
// Define scope order for display
|
|
499
|
+
const scopeOrder = {
|
|
500
|
+
flagged: -1,
|
|
501
|
+
project: 0,
|
|
502
|
+
local: 1,
|
|
503
|
+
user: 2,
|
|
504
|
+
enterprise: 3,
|
|
505
|
+
managed: 4,
|
|
506
|
+
dynamic: 5,
|
|
507
|
+
builtin: 6
|
|
508
|
+
};
|
|
509
|
+
// Build final list by merging plugins (with their child MCPs) and standalone MCPs
|
|
510
|
+
// Group by scope to avoid duplicate scope headers
|
|
511
|
+
const unified = [];
|
|
512
|
+
// Create a map of scope -> items for proper merging
|
|
513
|
+
const itemsByScope = new Map();
|
|
514
|
+
// Add plugins with their child MCPs
|
|
515
|
+
for (const { item: item_1, originalScope: originalScope_0, childMcps } of pluginsWithChildren) {
|
|
516
|
+
const scope_0 = item_1.scope;
|
|
517
|
+
if (!itemsByScope.has(scope_0)) {
|
|
518
|
+
itemsByScope.set(scope_0, []);
|
|
519
|
+
}
|
|
520
|
+
itemsByScope.get(scope_0).push(item_1);
|
|
521
|
+
// Add child MCPs right after the plugin, indented (use original scope, not 'flagged').
|
|
522
|
+
// Built-in plugins map to 'user' for display since MCP ConfigScope doesn't include 'builtin'.
|
|
523
|
+
for (const { displayName, client: client_2 } of childMcps) {
|
|
524
|
+
const displayScope = originalScope_0 === 'builtin' ? 'user' : originalScope_0;
|
|
525
|
+
if (!itemsByScope.has(displayScope)) {
|
|
526
|
+
itemsByScope.set(displayScope, []);
|
|
527
|
+
}
|
|
528
|
+
itemsByScope.get(displayScope).push({
|
|
529
|
+
type: 'mcp',
|
|
530
|
+
id: `mcp:${client_2.name}`,
|
|
531
|
+
name: displayName,
|
|
532
|
+
description: undefined,
|
|
533
|
+
scope: displayScope,
|
|
534
|
+
status: getMcpStatus(client_2),
|
|
535
|
+
client: client_2,
|
|
536
|
+
indented: true
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
// Add standalone MCPs to their respective scope groups
|
|
541
|
+
for (const mcp of standaloneMcps) {
|
|
542
|
+
const scope_1 = mcp.scope;
|
|
543
|
+
if (!itemsByScope.has(scope_1)) {
|
|
544
|
+
itemsByScope.set(scope_1, []);
|
|
545
|
+
}
|
|
546
|
+
itemsByScope.get(scope_1).push(mcp);
|
|
547
|
+
}
|
|
548
|
+
// Add failed plugins to their respective scope groups
|
|
549
|
+
for (const failedPlugin of failedPluginItems) {
|
|
550
|
+
const scope_2 = failedPlugin.scope;
|
|
551
|
+
if (!itemsByScope.has(scope_2)) {
|
|
552
|
+
itemsByScope.set(scope_2, []);
|
|
553
|
+
}
|
|
554
|
+
itemsByScope.get(scope_2).push(failedPlugin);
|
|
555
|
+
}
|
|
556
|
+
// Add flagged (delisted) plugins from user settings.
|
|
557
|
+
// Reason/text are looked up from the cached security messages file.
|
|
558
|
+
for (const [pluginId_1, entry] of Object.entries(flaggedPlugins)) {
|
|
559
|
+
const parsed_0 = parsePluginIdentifier(pluginId_1);
|
|
560
|
+
const pluginName_1 = parsed_0.name || pluginId_1;
|
|
561
|
+
const marketplace_0 = parsed_0.marketplace || 'unknown';
|
|
562
|
+
if (!itemsByScope.has('flagged')) {
|
|
563
|
+
itemsByScope.set('flagged', []);
|
|
564
|
+
}
|
|
565
|
+
itemsByScope.get('flagged').push({
|
|
566
|
+
type: 'flagged-plugin',
|
|
567
|
+
id: pluginId_1,
|
|
568
|
+
name: pluginName_1,
|
|
569
|
+
marketplace: marketplace_0,
|
|
570
|
+
scope: 'flagged',
|
|
571
|
+
reason: 'delisted',
|
|
572
|
+
text: 'Removed from marketplace',
|
|
573
|
+
flaggedAt: entry.flaggedAt
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
// Sort scopes and build final list
|
|
577
|
+
const sortedScopes = [...itemsByScope.keys()].sort((a, b) => (scopeOrder[a] ?? 99) - (scopeOrder[b] ?? 99));
|
|
578
|
+
for (const scope_3 of sortedScopes) {
|
|
579
|
+
const items = itemsByScope.get(scope_3);
|
|
580
|
+
// Separate items into plugin groups (with their child MCPs) and standalone MCPs
|
|
581
|
+
// This preserves parent-child relationships that would be broken by naive sorting
|
|
582
|
+
const pluginGroups = [];
|
|
583
|
+
const standaloneMcpsInScope = [];
|
|
584
|
+
let i = 0;
|
|
585
|
+
while (i < items.length) {
|
|
586
|
+
const item_2 = items[i];
|
|
587
|
+
if (item_2.type === 'plugin' || item_2.type === 'failed-plugin' || item_2.type === 'flagged-plugin') {
|
|
588
|
+
// Collect the plugin and its child MCPs as a group
|
|
589
|
+
const group = [item_2];
|
|
590
|
+
i++;
|
|
591
|
+
// Look ahead for indented child MCPs
|
|
592
|
+
let nextItem = items[i];
|
|
593
|
+
while (nextItem?.type === 'mcp' && nextItem.indented) {
|
|
594
|
+
group.push(nextItem);
|
|
595
|
+
i++;
|
|
596
|
+
nextItem = items[i];
|
|
597
|
+
}
|
|
598
|
+
pluginGroups.push(group);
|
|
599
|
+
}
|
|
600
|
+
else if (item_2.type === 'mcp' && !item_2.indented) {
|
|
601
|
+
// Standalone MCP (not a child of a plugin)
|
|
602
|
+
standaloneMcpsInScope.push(item_2);
|
|
603
|
+
i++;
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
// Skip orphaned indented MCPs (shouldn't happen)
|
|
607
|
+
i++;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
// Sort plugin groups by the plugin name (first item in each group)
|
|
611
|
+
pluginGroups.sort((a_0, b_0) => a_0[0].name.localeCompare(b_0[0].name));
|
|
612
|
+
// Sort standalone MCPs by name
|
|
613
|
+
standaloneMcpsInScope.sort((a_1, b_1) => a_1.name.localeCompare(b_1.name));
|
|
614
|
+
// Build final list: plugins (with their children) first, then standalone MCPs
|
|
615
|
+
for (const group_0 of pluginGroups) {
|
|
616
|
+
unified.push(...group_0);
|
|
617
|
+
}
|
|
618
|
+
unified.push(...standaloneMcpsInScope);
|
|
619
|
+
}
|
|
620
|
+
return unified;
|
|
621
|
+
}, [pluginStates, mcpClients, pluginErrors, pendingToggles, flaggedPlugins]);
|
|
622
|
+
// Mark flagged plugins as seen when the Installed view renders them.
|
|
623
|
+
// After 48 hours from seenAt, they auto-clear on next load.
|
|
624
|
+
const flaggedIds = useMemo(() => unifiedItems.filter(item_3 => item_3.type === 'flagged-plugin').map(item_4 => item_4.id), [unifiedItems]);
|
|
625
|
+
useEffect(() => {
|
|
626
|
+
if (flaggedIds.length > 0) {
|
|
627
|
+
void markFlaggedPluginsSeen(flaggedIds);
|
|
628
|
+
}
|
|
629
|
+
}, [flaggedIds]);
|
|
630
|
+
// Filter items based on search query (matches name or description)
|
|
631
|
+
const filteredItems = useMemo(() => {
|
|
632
|
+
if (!searchQuery)
|
|
633
|
+
return unifiedItems;
|
|
634
|
+
const lowerQuery = searchQuery.toLowerCase();
|
|
635
|
+
return unifiedItems.filter(item_5 => item_5.name.toLowerCase().includes(lowerQuery) || 'description' in item_5 && item_5.description?.toLowerCase().includes(lowerQuery));
|
|
636
|
+
}, [unifiedItems, searchQuery]);
|
|
637
|
+
// Selection state
|
|
638
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
639
|
+
// Pagination for unified list (continuous scrolling)
|
|
640
|
+
const pagination = usePagination({
|
|
641
|
+
totalItems: filteredItems.length,
|
|
642
|
+
selectedIndex,
|
|
643
|
+
maxVisible: 8
|
|
644
|
+
});
|
|
645
|
+
// Details view state
|
|
646
|
+
const [detailsMenuIndex, setDetailsMenuIndex] = useState(0);
|
|
647
|
+
const [isProcessing, setIsProcessing] = useState(false);
|
|
648
|
+
const [processError, setProcessError] = useState(null);
|
|
649
|
+
// Configuration state
|
|
650
|
+
const [configNeeded, setConfigNeeded] = useState(null);
|
|
651
|
+
const [_isLoadingConfig, setIsLoadingConfig] = useState(false);
|
|
652
|
+
const [selectedPluginHasMcpb, setSelectedPluginHasMcpb] = useState(false);
|
|
653
|
+
// Detect if selected plugin has MCPB
|
|
654
|
+
// Reads raw marketplace.json to work with old cached marketplaces
|
|
655
|
+
useEffect(() => {
|
|
656
|
+
if (!selectedPlugin) {
|
|
657
|
+
setSelectedPluginHasMcpb(false);
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
async function detectMcpb() {
|
|
661
|
+
// Check plugin manifest first
|
|
662
|
+
const mcpServersSpec = selectedPlugin.plugin.manifest.mcpServers;
|
|
663
|
+
let hasMcpb = false;
|
|
664
|
+
if (mcpServersSpec) {
|
|
665
|
+
hasMcpb = typeof mcpServersSpec === 'string' && isMcpbSource(mcpServersSpec) || Array.isArray(mcpServersSpec) && mcpServersSpec.some(s_2 => typeof s_2 === 'string' && isMcpbSource(s_2));
|
|
666
|
+
}
|
|
667
|
+
// If not in manifest, read raw marketplace.json directly (bypassing schema validation)
|
|
668
|
+
// This works even with old cached marketplaces from before MCPB support
|
|
669
|
+
if (!hasMcpb) {
|
|
670
|
+
try {
|
|
671
|
+
const marketplaceDir = path.join(selectedPlugin.plugin.path, '..');
|
|
672
|
+
const marketplaceJsonPath = path.join(marketplaceDir, '.claude-plugin', 'marketplace.json');
|
|
673
|
+
const content = await fs.readFile(marketplaceJsonPath, 'utf-8');
|
|
674
|
+
const marketplace_1 = jsonParse(content);
|
|
675
|
+
const entry_0 = marketplace_1.plugins?.find((p) => p.name === selectedPlugin.plugin.name);
|
|
676
|
+
if (entry_0?.mcpServers) {
|
|
677
|
+
const spec = entry_0.mcpServers;
|
|
678
|
+
hasMcpb = typeof spec === 'string' && isMcpbSource(spec) || Array.isArray(spec) && spec.some((s_3) => typeof s_3 === 'string' && isMcpbSource(s_3));
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
catch (err) {
|
|
682
|
+
logForDebugging(`Failed to read raw marketplace.json: ${err}`);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
setSelectedPluginHasMcpb(hasMcpb);
|
|
686
|
+
}
|
|
687
|
+
void detectMcpb();
|
|
688
|
+
}, [selectedPlugin]);
|
|
689
|
+
// Load installed plugins grouped by marketplace
|
|
690
|
+
useEffect(() => {
|
|
691
|
+
async function loadInstalledPlugins() {
|
|
692
|
+
setLoading(true);
|
|
693
|
+
try {
|
|
694
|
+
const { enabled, disabled } = await loadAllPlugins();
|
|
695
|
+
const mergedSettings = getSettings_DEPRECATED(); // Use merged settings to respect all layers
|
|
696
|
+
const allPlugins = filterManagedDisabledPlugins([...enabled, ...disabled]);
|
|
697
|
+
// Group plugins by marketplace
|
|
698
|
+
const pluginsByMarketplace = {};
|
|
699
|
+
for (const plugin of allPlugins) {
|
|
700
|
+
const marketplace = plugin.source.split('@')[1] || 'local';
|
|
701
|
+
if (!pluginsByMarketplace[marketplace]) {
|
|
702
|
+
pluginsByMarketplace[marketplace] = [];
|
|
703
|
+
}
|
|
704
|
+
pluginsByMarketplace[marketplace].push(plugin);
|
|
705
|
+
}
|
|
706
|
+
// Create marketplace info array with enabled/disabled counts
|
|
707
|
+
const marketplaceInfos = [];
|
|
708
|
+
for (const [name, plugins] of Object.entries(pluginsByMarketplace)) {
|
|
709
|
+
const enabledCount = count(plugins, p => {
|
|
710
|
+
const pluginId = `${p.name}@${name}`;
|
|
711
|
+
return mergedSettings?.enabledPlugins?.[pluginId] !== false;
|
|
712
|
+
});
|
|
713
|
+
const disabledCount = plugins.length - enabledCount;
|
|
714
|
+
marketplaceInfos.push({
|
|
715
|
+
name,
|
|
716
|
+
installedPlugins: plugins,
|
|
717
|
+
enabledCount,
|
|
718
|
+
disabledCount
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
// Sort marketplaces: claude-plugin-directory first, then alphabetically
|
|
722
|
+
marketplaceInfos.sort((a, b) => {
|
|
723
|
+
if (a.name === 'claude-plugin-directory')
|
|
724
|
+
return -1;
|
|
725
|
+
if (b.name === 'claude-plugin-directory')
|
|
726
|
+
return 1;
|
|
727
|
+
return a.name.localeCompare(b.name);
|
|
728
|
+
});
|
|
729
|
+
setMarketplaces(marketplaceInfos);
|
|
730
|
+
// Build flat list of all plugin states
|
|
731
|
+
const allStates = [];
|
|
732
|
+
for (const marketplace of marketplaceInfos) {
|
|
733
|
+
for (const plugin of marketplace.installedPlugins) {
|
|
734
|
+
const pluginId = `${plugin.name}@${marketplace.name}`;
|
|
735
|
+
// Built-in plugins don't have V2 install entries — skip the lookup.
|
|
736
|
+
const scope = plugin.isBuiltin ? 'builtin' : getPluginInstallationFromV2(pluginId).scope;
|
|
737
|
+
allStates.push({
|
|
738
|
+
plugin,
|
|
739
|
+
marketplace: marketplace.name,
|
|
740
|
+
scope,
|
|
741
|
+
pendingEnable: undefined,
|
|
742
|
+
pendingUpdate: false
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
setPluginStates(allStates);
|
|
747
|
+
setSelectedIndex(0);
|
|
748
|
+
}
|
|
749
|
+
finally {
|
|
750
|
+
setLoading(false);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
void loadInstalledPlugins();
|
|
754
|
+
}, []);
|
|
755
|
+
// Auto-navigate to target plugin if specified (once only)
|
|
756
|
+
useEffect(() => {
|
|
757
|
+
if (hasAutoNavigated.current)
|
|
758
|
+
return;
|
|
759
|
+
if (targetPlugin && marketplaces.length > 0 && !loading) {
|
|
760
|
+
// targetPlugin may be `name` or `name@marketplace` (parseArgs passes the
|
|
761
|
+
// raw arg through). Parse it so p.name matching works either way.
|
|
762
|
+
const { name: targetName, marketplace: targetMktFromId } = parsePluginIdentifier(targetPlugin);
|
|
763
|
+
const effectiveTargetMarketplace = targetMarketplace ?? targetMktFromId;
|
|
764
|
+
// Use targetMarketplace if provided, otherwise search all
|
|
765
|
+
const marketplacesToSearch = effectiveTargetMarketplace ? marketplaces.filter(m => m.name === effectiveTargetMarketplace) : marketplaces;
|
|
766
|
+
// First check successfully loaded plugins
|
|
767
|
+
for (const marketplace_2 of marketplacesToSearch) {
|
|
768
|
+
const plugin = marketplace_2.installedPlugins.find(p_0 => p_0.name === targetName);
|
|
769
|
+
if (plugin) {
|
|
770
|
+
// Get scope from V2 data for proper operation handling
|
|
771
|
+
const pluginId_2 = `${plugin.name}@${marketplace_2.name}`;
|
|
772
|
+
const { scope: scope_4 } = getPluginInstallationFromV2(pluginId_2);
|
|
773
|
+
const pluginState = {
|
|
774
|
+
plugin,
|
|
775
|
+
marketplace: marketplace_2.name,
|
|
776
|
+
scope: scope_4,
|
|
777
|
+
pendingEnable: undefined,
|
|
778
|
+
pendingUpdate: false
|
|
779
|
+
};
|
|
780
|
+
setSelectedPlugin(pluginState);
|
|
781
|
+
setViewState('plugin-details');
|
|
782
|
+
pendingAutoActionRef.current = action;
|
|
783
|
+
hasAutoNavigated.current = true;
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
// Fall back to failed plugins (those with errors but not loaded)
|
|
788
|
+
const failedItem = unifiedItems.find(item_6 => item_6.type === 'failed-plugin' && item_6.name === targetName);
|
|
789
|
+
if (failedItem && failedItem.type === 'failed-plugin') {
|
|
790
|
+
setViewState({
|
|
791
|
+
type: 'failed-plugin-details',
|
|
792
|
+
plugin: {
|
|
793
|
+
id: failedItem.id,
|
|
794
|
+
name: failedItem.name,
|
|
795
|
+
marketplace: failedItem.marketplace,
|
|
796
|
+
errors: failedItem.errors,
|
|
797
|
+
scope: failedItem.scope
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
hasAutoNavigated.current = true;
|
|
801
|
+
}
|
|
802
|
+
// No match in loaded OR failed plugins — close the dialog with a
|
|
803
|
+
// message rather than silently landing on the plugin list. Only do
|
|
804
|
+
// this when an action was requested (e.g. /plugin uninstall X);
|
|
805
|
+
// plain navigation (/plugin manage) should still just show the list.
|
|
806
|
+
if (!hasAutoNavigated.current && action) {
|
|
807
|
+
hasAutoNavigated.current = true;
|
|
808
|
+
setResult(`Plugin "${targetPlugin}" is not installed in this project`);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}, [targetPlugin, targetMarketplace, marketplaces, loading, unifiedItems, action, setResult]);
|
|
812
|
+
// Handle single plugin operations from details view
|
|
813
|
+
const handleSingleOperation = async (operation) => {
|
|
814
|
+
if (!selectedPlugin)
|
|
815
|
+
return;
|
|
816
|
+
const pluginScope = selectedPlugin.scope || 'user';
|
|
817
|
+
const isBuiltin = pluginScope === 'builtin';
|
|
818
|
+
// Built-in plugins can only be enabled/disabled, not updated/uninstalled.
|
|
819
|
+
if (isBuiltin && (operation === 'update' || operation === 'uninstall')) {
|
|
820
|
+
setProcessError('Built-in plugins cannot be updated or uninstalled.');
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
// Managed scope plugins can only be updated, not enabled/disabled/uninstalled
|
|
824
|
+
if (!isBuiltin && !isInstallableScope(pluginScope) && operation !== 'update') {
|
|
825
|
+
setProcessError('This plugin is managed by your organization. Contact your admin to disable it.');
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
setIsProcessing(true);
|
|
829
|
+
setProcessError(null);
|
|
830
|
+
try {
|
|
831
|
+
const pluginId_3 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
832
|
+
let reverseDependents;
|
|
833
|
+
// enable/disable omit scope — pluginScope is the install scope from
|
|
834
|
+
// installed_plugins.json (where files are cached), which can diverge
|
|
835
|
+
// from the settings scope (where enablement lives). Passing it trips
|
|
836
|
+
// the cross-scope guard. Auto-detect finds the right scope. #38084
|
|
837
|
+
switch (operation) {
|
|
838
|
+
case 'enable':
|
|
839
|
+
{
|
|
840
|
+
const enableResult = await enablePluginOp(pluginId_3);
|
|
841
|
+
if (!enableResult.success) {
|
|
842
|
+
throw new Error(enableResult.message);
|
|
843
|
+
}
|
|
844
|
+
break;
|
|
845
|
+
}
|
|
846
|
+
case 'disable':
|
|
847
|
+
{
|
|
848
|
+
const disableResult = await disablePluginOp(pluginId_3);
|
|
849
|
+
if (!disableResult.success) {
|
|
850
|
+
throw new Error(disableResult.message);
|
|
851
|
+
}
|
|
852
|
+
reverseDependents = disableResult.reverseDependents;
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
case 'uninstall':
|
|
856
|
+
{
|
|
857
|
+
if (isBuiltin)
|
|
858
|
+
break; // guarded above; narrows pluginScope
|
|
859
|
+
if (!isInstallableScope(pluginScope))
|
|
860
|
+
break;
|
|
861
|
+
// If the plugin is enabled in .claude/settings.json (shared with the
|
|
862
|
+
// team), divert to a confirmation dialog that offers to disable in
|
|
863
|
+
// settings.local.json instead. Check the settings file directly —
|
|
864
|
+
// `pluginScope` (from installed_plugins.json) can be 'user' even when
|
|
865
|
+
// the plugin is ALSO project-enabled, and uninstalling the user-scope
|
|
866
|
+
// install would leave the project enablement active.
|
|
867
|
+
if (isPluginEnabledAtProjectScope(pluginId_3)) {
|
|
868
|
+
setIsProcessing(false);
|
|
869
|
+
setViewState('confirm-project-uninstall');
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
// If the plugin has persistent data (${CLAUDE_PLUGIN_DATA}) AND this
|
|
873
|
+
// is the last scope, prompt before deleting it. For multi-scope
|
|
874
|
+
// installs, the op's isLastScope check won't delete regardless of
|
|
875
|
+
// the user's y/n — showing the dialog would mislead ("y" → nothing
|
|
876
|
+
// happens). Length check mirrors pluginOperations.ts:513.
|
|
877
|
+
const installs = loadInstalledPluginsV2().plugins[pluginId_3];
|
|
878
|
+
const isLastScope = !installs || installs.length <= 1;
|
|
879
|
+
const dataSize = isLastScope ? await getPluginDataDirSize(pluginId_3) : null;
|
|
880
|
+
if (dataSize) {
|
|
881
|
+
setIsProcessing(false);
|
|
882
|
+
setViewState({
|
|
883
|
+
type: 'confirm-data-cleanup',
|
|
884
|
+
size: dataSize
|
|
885
|
+
});
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
const result_0 = await uninstallPluginOp(pluginId_3, pluginScope);
|
|
889
|
+
if (!result_0.success) {
|
|
890
|
+
throw new Error(result_0.message);
|
|
891
|
+
}
|
|
892
|
+
reverseDependents = result_0.reverseDependents;
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
case 'update':
|
|
896
|
+
{
|
|
897
|
+
if (isBuiltin)
|
|
898
|
+
break; // guarded above; narrows pluginScope
|
|
899
|
+
const result = await updatePluginOp(pluginId_3, pluginScope);
|
|
900
|
+
if (!result.success) {
|
|
901
|
+
throw new Error(result.message);
|
|
902
|
+
}
|
|
903
|
+
// If already up to date, show message and exit
|
|
904
|
+
if (result.alreadyUpToDate) {
|
|
905
|
+
setResult(`${selectedPlugin.plugin.name} is already at the latest version (${result.newVersion}).`);
|
|
906
|
+
if (onManageComplete) {
|
|
907
|
+
await onManageComplete();
|
|
908
|
+
}
|
|
909
|
+
setParentViewState({
|
|
910
|
+
type: 'menu'
|
|
911
|
+
});
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
914
|
+
// Success - will show standard message below
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
// Operations (enable, disable, uninstall, update) now use centralized functions
|
|
919
|
+
// that handle their own settings updates, so we only need to clear caches here
|
|
920
|
+
clearAllCaches();
|
|
921
|
+
// Prompt for manifest.userConfig + channel userConfig if the plugin ends
|
|
922
|
+
// up enabled. Re-read settings rather than keying on `operation ===
|
|
923
|
+
// 'enable'`: install enables on install, so the menu shows "Disable"
|
|
924
|
+
// first. PluginOptionsFlow itself checks getUnconfiguredOptions — if
|
|
925
|
+
// nothing needs filling, it calls onDone('skipped') immediately.
|
|
926
|
+
const pluginIdNow = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
927
|
+
const settingsAfter = getSettings_DEPRECATED();
|
|
928
|
+
const enabledAfter = settingsAfter?.enabledPlugins?.[pluginIdNow] !== false;
|
|
929
|
+
if (enabledAfter) {
|
|
930
|
+
setIsProcessing(false);
|
|
931
|
+
setViewState({
|
|
932
|
+
type: 'plugin-options'
|
|
933
|
+
});
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
const operationName = operation === 'enable' ? 'Enabled' : operation === 'disable' ? 'Disabled' : operation === 'update' ? 'Updated' : 'Uninstalled';
|
|
937
|
+
// Single-line warning — notification timeout is ~8s, multi-line would scroll off.
|
|
938
|
+
// The persistent record is in the Errors tab (dependency-unsatisfied after reload).
|
|
939
|
+
const depWarn = reverseDependents && reverseDependents.length > 0 ? ` · required by ${reverseDependents.join(', ')}` : '';
|
|
940
|
+
const message = `✓ ${operationName} ${selectedPlugin.plugin.name}${depWarn}. Run /reload-plugins to apply.`;
|
|
941
|
+
setResult(message);
|
|
942
|
+
if (onManageComplete) {
|
|
943
|
+
await onManageComplete();
|
|
944
|
+
}
|
|
945
|
+
setParentViewState({
|
|
946
|
+
type: 'menu'
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
catch (error_0) {
|
|
950
|
+
setIsProcessing(false);
|
|
951
|
+
const errorMessage = error_0 instanceof Error ? error_0.message : String(error_0);
|
|
952
|
+
setProcessError(`Failed to ${operation}: ${errorMessage}`);
|
|
953
|
+
logError(toError(error_0));
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
// Latest-ref: lets the auto-action effect call the current closure without
|
|
957
|
+
// adding handleSingleOperation (recreated every render) to its deps.
|
|
958
|
+
const handleSingleOperationRef = useRef(handleSingleOperation);
|
|
959
|
+
handleSingleOperationRef.current = handleSingleOperation;
|
|
960
|
+
// Auto-execute the action prop (/plugin uninstall X, /plugin enable X, etc.)
|
|
961
|
+
// once auto-navigation has landed on plugin-details.
|
|
962
|
+
useEffect(() => {
|
|
963
|
+
if (viewState === 'plugin-details' && selectedPlugin && pendingAutoActionRef.current) {
|
|
964
|
+
const pending = pendingAutoActionRef.current;
|
|
965
|
+
pendingAutoActionRef.current = undefined;
|
|
966
|
+
void handleSingleOperationRef.current(pending);
|
|
967
|
+
}
|
|
968
|
+
}, [viewState, selectedPlugin]);
|
|
969
|
+
// Handle toggle enable/disable
|
|
970
|
+
const handleToggle = React.useCallback(() => {
|
|
971
|
+
if (selectedIndex >= filteredItems.length)
|
|
972
|
+
return;
|
|
973
|
+
const item_7 = filteredItems[selectedIndex];
|
|
974
|
+
if (item_7?.type === 'flagged-plugin')
|
|
975
|
+
return;
|
|
976
|
+
if (item_7?.type === 'plugin') {
|
|
977
|
+
const pluginId_4 = `${item_7.plugin.name}@${item_7.marketplace}`;
|
|
978
|
+
const mergedSettings_0 = getSettings_DEPRECATED();
|
|
979
|
+
const currentPending = pendingToggles.get(pluginId_4);
|
|
980
|
+
const isEnabled_0 = mergedSettings_0?.enabledPlugins?.[pluginId_4] !== false;
|
|
981
|
+
const pluginScope_0 = item_7.scope;
|
|
982
|
+
const isBuiltin_0 = pluginScope_0 === 'builtin';
|
|
983
|
+
if (isBuiltin_0 || isInstallableScope(pluginScope_0)) {
|
|
984
|
+
const newPending = new Map(pendingToggles);
|
|
985
|
+
// Omit scope — see handleSingleOperation's enable/disable comment.
|
|
986
|
+
if (currentPending) {
|
|
987
|
+
// Cancel: reverse the operation back to the original state
|
|
988
|
+
newPending.delete(pluginId_4);
|
|
989
|
+
void (async () => {
|
|
990
|
+
try {
|
|
991
|
+
if (currentPending === 'will-disable') {
|
|
992
|
+
await enablePluginOp(pluginId_4);
|
|
993
|
+
}
|
|
994
|
+
else {
|
|
995
|
+
await disablePluginOp(pluginId_4);
|
|
996
|
+
}
|
|
997
|
+
clearAllCaches();
|
|
998
|
+
}
|
|
999
|
+
catch (err_0) {
|
|
1000
|
+
logError(err_0);
|
|
1001
|
+
}
|
|
1002
|
+
})();
|
|
1003
|
+
}
|
|
1004
|
+
else {
|
|
1005
|
+
newPending.set(pluginId_4, isEnabled_0 ? 'will-disable' : 'will-enable');
|
|
1006
|
+
void (async () => {
|
|
1007
|
+
try {
|
|
1008
|
+
if (isEnabled_0) {
|
|
1009
|
+
await disablePluginOp(pluginId_4);
|
|
1010
|
+
}
|
|
1011
|
+
else {
|
|
1012
|
+
await enablePluginOp(pluginId_4);
|
|
1013
|
+
}
|
|
1014
|
+
clearAllCaches();
|
|
1015
|
+
}
|
|
1016
|
+
catch (err_1) {
|
|
1017
|
+
logError(err_1);
|
|
1018
|
+
}
|
|
1019
|
+
})();
|
|
1020
|
+
}
|
|
1021
|
+
setPendingToggles(newPending);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
else if (item_7?.type === 'mcp') {
|
|
1025
|
+
void toggleMcpServer(item_7.client.name);
|
|
1026
|
+
}
|
|
1027
|
+
}, [selectedIndex, filteredItems, pendingToggles, pluginStates, toggleMcpServer]);
|
|
1028
|
+
// Handle accept (Enter) in plugin-list
|
|
1029
|
+
const handleAccept = React.useCallback(() => {
|
|
1030
|
+
if (selectedIndex >= filteredItems.length)
|
|
1031
|
+
return;
|
|
1032
|
+
const item_8 = filteredItems[selectedIndex];
|
|
1033
|
+
if (item_8?.type === 'plugin') {
|
|
1034
|
+
const state_0 = pluginStates.find(s_4 => s_4.plugin.name === item_8.plugin.name && s_4.marketplace === item_8.marketplace);
|
|
1035
|
+
if (state_0) {
|
|
1036
|
+
setSelectedPlugin(state_0);
|
|
1037
|
+
setViewState('plugin-details');
|
|
1038
|
+
setDetailsMenuIndex(0);
|
|
1039
|
+
setProcessError(null);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
else if (item_8?.type === 'flagged-plugin') {
|
|
1043
|
+
setViewState({
|
|
1044
|
+
type: 'flagged-detail',
|
|
1045
|
+
plugin: {
|
|
1046
|
+
id: item_8.id,
|
|
1047
|
+
name: item_8.name,
|
|
1048
|
+
marketplace: item_8.marketplace,
|
|
1049
|
+
reason: item_8.reason,
|
|
1050
|
+
text: item_8.text,
|
|
1051
|
+
flaggedAt: item_8.flaggedAt
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
setProcessError(null);
|
|
1055
|
+
}
|
|
1056
|
+
else if (item_8?.type === 'failed-plugin') {
|
|
1057
|
+
setViewState({
|
|
1058
|
+
type: 'failed-plugin-details',
|
|
1059
|
+
plugin: {
|
|
1060
|
+
id: item_8.id,
|
|
1061
|
+
name: item_8.name,
|
|
1062
|
+
marketplace: item_8.marketplace,
|
|
1063
|
+
errors: item_8.errors,
|
|
1064
|
+
scope: item_8.scope
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
setDetailsMenuIndex(0);
|
|
1068
|
+
setProcessError(null);
|
|
1069
|
+
}
|
|
1070
|
+
else if (item_8?.type === 'mcp') {
|
|
1071
|
+
setViewState({
|
|
1072
|
+
type: 'mcp-detail',
|
|
1073
|
+
client: item_8.client
|
|
1074
|
+
});
|
|
1075
|
+
setProcessError(null);
|
|
1076
|
+
}
|
|
1077
|
+
}, [selectedIndex, filteredItems, pluginStates]);
|
|
1078
|
+
// Plugin-list navigation (non-search mode)
|
|
1079
|
+
useKeybindings({
|
|
1080
|
+
'select:previous': () => {
|
|
1081
|
+
if (selectedIndex === 0) {
|
|
1082
|
+
setIsSearchMode(true);
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
pagination.handleSelectionChange(selectedIndex - 1, setSelectedIndex);
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
'select:next': () => {
|
|
1089
|
+
if (selectedIndex < filteredItems.length - 1) {
|
|
1090
|
+
pagination.handleSelectionChange(selectedIndex + 1, setSelectedIndex);
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
'select:accept': handleAccept
|
|
1094
|
+
}, {
|
|
1095
|
+
context: 'Select',
|
|
1096
|
+
isActive: viewState === 'plugin-list' && !isSearchMode
|
|
1097
|
+
});
|
|
1098
|
+
useKeybindings({
|
|
1099
|
+
'plugin:toggle': handleToggle
|
|
1100
|
+
}, {
|
|
1101
|
+
context: 'Plugin',
|
|
1102
|
+
isActive: viewState === 'plugin-list' && !isSearchMode
|
|
1103
|
+
});
|
|
1104
|
+
// Handle dismiss action in flagged-detail view
|
|
1105
|
+
const handleFlaggedDismiss = React.useCallback(() => {
|
|
1106
|
+
if (typeof viewState !== 'object' || viewState.type !== 'flagged-detail')
|
|
1107
|
+
return;
|
|
1108
|
+
void removeFlaggedPlugin(viewState.plugin.id);
|
|
1109
|
+
setViewState('plugin-list');
|
|
1110
|
+
}, [viewState]);
|
|
1111
|
+
useKeybindings({
|
|
1112
|
+
'select:accept': handleFlaggedDismiss
|
|
1113
|
+
}, {
|
|
1114
|
+
context: 'Select',
|
|
1115
|
+
isActive: typeof viewState === 'object' && viewState.type === 'flagged-detail'
|
|
1116
|
+
});
|
|
1117
|
+
// Build details menu items (needed for navigation)
|
|
1118
|
+
const detailsMenuItems = React.useMemo(() => {
|
|
1119
|
+
if (viewState !== 'plugin-details' || !selectedPlugin)
|
|
1120
|
+
return [];
|
|
1121
|
+
const mergedSettings_1 = getSettings_DEPRECATED();
|
|
1122
|
+
const pluginId_5 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1123
|
+
const isEnabled_1 = mergedSettings_1?.enabledPlugins?.[pluginId_5] !== false;
|
|
1124
|
+
const isBuiltin_1 = selectedPlugin.marketplace === 'builtin';
|
|
1125
|
+
const menuItems = [];
|
|
1126
|
+
menuItems.push({
|
|
1127
|
+
label: isEnabled_1 ? 'Disable plugin' : 'Enable plugin',
|
|
1128
|
+
action: () => void handleSingleOperation(isEnabled_1 ? 'disable' : 'enable')
|
|
1129
|
+
});
|
|
1130
|
+
// Update/Uninstall options — not available for built-in plugins
|
|
1131
|
+
if (!isBuiltin_1) {
|
|
1132
|
+
menuItems.push({
|
|
1133
|
+
label: selectedPlugin.pendingUpdate ? 'Unmark for update' : 'Mark for update',
|
|
1134
|
+
action: async () => {
|
|
1135
|
+
try {
|
|
1136
|
+
const localError = await checkIfLocalPlugin(selectedPlugin.plugin.name, selectedPlugin.marketplace);
|
|
1137
|
+
if (localError) {
|
|
1138
|
+
setProcessError(localError);
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
const newStates = [...pluginStates];
|
|
1142
|
+
const index = newStates.findIndex(s_5 => s_5.plugin.name === selectedPlugin.plugin.name && s_5.marketplace === selectedPlugin.marketplace);
|
|
1143
|
+
if (index !== -1) {
|
|
1144
|
+
newStates[index].pendingUpdate = !selectedPlugin.pendingUpdate;
|
|
1145
|
+
setPluginStates(newStates);
|
|
1146
|
+
setSelectedPlugin({
|
|
1147
|
+
...selectedPlugin,
|
|
1148
|
+
pendingUpdate: !selectedPlugin.pendingUpdate
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
catch (error_1) {
|
|
1153
|
+
setProcessError(error_1 instanceof Error ? error_1.message : 'Failed to check plugin update availability');
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
if (selectedPluginHasMcpb) {
|
|
1158
|
+
menuItems.push({
|
|
1159
|
+
label: 'Configure',
|
|
1160
|
+
action: async () => {
|
|
1161
|
+
setIsLoadingConfig(true);
|
|
1162
|
+
try {
|
|
1163
|
+
const mcpServersSpec_0 = selectedPlugin.plugin.manifest.mcpServers;
|
|
1164
|
+
let mcpbPath = null;
|
|
1165
|
+
if (typeof mcpServersSpec_0 === 'string' && isMcpbSource(mcpServersSpec_0)) {
|
|
1166
|
+
mcpbPath = mcpServersSpec_0;
|
|
1167
|
+
}
|
|
1168
|
+
else if (Array.isArray(mcpServersSpec_0)) {
|
|
1169
|
+
for (const spec_0 of mcpServersSpec_0) {
|
|
1170
|
+
if (typeof spec_0 === 'string' && isMcpbSource(spec_0)) {
|
|
1171
|
+
mcpbPath = spec_0;
|
|
1172
|
+
break;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
if (!mcpbPath) {
|
|
1177
|
+
setProcessError('No MCPB file found in plugin');
|
|
1178
|
+
setIsLoadingConfig(false);
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1181
|
+
const pluginId_6 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1182
|
+
const result_1 = await loadMcpbFile(mcpbPath, selectedPlugin.plugin.path, pluginId_6, undefined, undefined, true);
|
|
1183
|
+
if ('status' in result_1 && result_1.status === 'needs-config') {
|
|
1184
|
+
setConfigNeeded(result_1);
|
|
1185
|
+
setViewState('configuring');
|
|
1186
|
+
}
|
|
1187
|
+
else {
|
|
1188
|
+
setProcessError('Failed to load MCPB for configuration');
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
catch (err_2) {
|
|
1192
|
+
const errorMsg = errorMessage(err_2);
|
|
1193
|
+
setProcessError(`Failed to load configuration: ${errorMsg}`);
|
|
1194
|
+
}
|
|
1195
|
+
finally {
|
|
1196
|
+
setIsLoadingConfig(false);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
if (selectedPlugin.plugin.manifest.userConfig && Object.keys(selectedPlugin.plugin.manifest.userConfig).length > 0) {
|
|
1202
|
+
menuItems.push({
|
|
1203
|
+
label: 'Configure options',
|
|
1204
|
+
action: () => {
|
|
1205
|
+
setViewState({
|
|
1206
|
+
type: 'configuring-options',
|
|
1207
|
+
schema: selectedPlugin.plugin.manifest.userConfig
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
menuItems.push({
|
|
1213
|
+
label: 'Update now',
|
|
1214
|
+
action: () => void handleSingleOperation('update')
|
|
1215
|
+
});
|
|
1216
|
+
menuItems.push({
|
|
1217
|
+
label: 'Uninstall',
|
|
1218
|
+
action: () => void handleSingleOperation('uninstall')
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
if (selectedPlugin.plugin.manifest.homepage) {
|
|
1222
|
+
menuItems.push({
|
|
1223
|
+
label: 'Open homepage',
|
|
1224
|
+
action: () => void openBrowser(selectedPlugin.plugin.manifest.homepage)
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1227
|
+
if (selectedPlugin.plugin.manifest.repository) {
|
|
1228
|
+
menuItems.push({
|
|
1229
|
+
// Generic label — manifest.repository can be GitLab, Bitbucket,
|
|
1230
|
+
// Azure DevOps, etc. (gh-31598). pluginDetailsHelpers.tsx:74 keeps
|
|
1231
|
+
// 'View on GitHub' because that path has an explicit isGitHub check.
|
|
1232
|
+
label: 'View repository',
|
|
1233
|
+
action: () => void openBrowser(selectedPlugin.plugin.manifest.repository)
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
menuItems.push({
|
|
1237
|
+
label: 'Back to plugin list',
|
|
1238
|
+
action: () => {
|
|
1239
|
+
setViewState('plugin-list');
|
|
1240
|
+
setSelectedPlugin(null);
|
|
1241
|
+
setProcessError(null);
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
return menuItems;
|
|
1245
|
+
}, [viewState, selectedPlugin, selectedPluginHasMcpb, pluginStates]);
|
|
1246
|
+
// Plugin-details navigation
|
|
1247
|
+
useKeybindings({
|
|
1248
|
+
'select:previous': () => {
|
|
1249
|
+
if (detailsMenuIndex > 0) {
|
|
1250
|
+
setDetailsMenuIndex(detailsMenuIndex - 1);
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
'select:next': () => {
|
|
1254
|
+
if (detailsMenuIndex < detailsMenuItems.length - 1) {
|
|
1255
|
+
setDetailsMenuIndex(detailsMenuIndex + 1);
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
'select:accept': () => {
|
|
1259
|
+
if (detailsMenuItems[detailsMenuIndex]) {
|
|
1260
|
+
detailsMenuItems[detailsMenuIndex].action();
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}, {
|
|
1264
|
+
context: 'Select',
|
|
1265
|
+
isActive: viewState === 'plugin-details' && !!selectedPlugin
|
|
1266
|
+
});
|
|
1267
|
+
// Failed-plugin-details: only "Uninstall" option, handle Enter
|
|
1268
|
+
useKeybindings({
|
|
1269
|
+
'select:accept': () => {
|
|
1270
|
+
if (typeof viewState === 'object' && viewState.type === 'failed-plugin-details') {
|
|
1271
|
+
void (async () => {
|
|
1272
|
+
setIsProcessing(true);
|
|
1273
|
+
setProcessError(null);
|
|
1274
|
+
const pluginId_7 = viewState.plugin.id;
|
|
1275
|
+
const pluginScope_1 = viewState.plugin.scope;
|
|
1276
|
+
// Pass scope to uninstallPluginOp so it can find the correct V2
|
|
1277
|
+
// installation record and clean up on-disk files. Fall back to
|
|
1278
|
+
// default scope if not installable (e.g. 'managed', though that
|
|
1279
|
+
// case is guarded by isActive below). deleteDataDir=false: this
|
|
1280
|
+
// is a recovery path for a plugin that failed to load — it may
|
|
1281
|
+
// be reinstallable, so don't nuke ${CLAUDE_PLUGIN_DATA} silently.
|
|
1282
|
+
// The normal uninstall path prompts; this one preserves.
|
|
1283
|
+
const result_2 = isInstallableScope(pluginScope_1) ? await uninstallPluginOp(pluginId_7, pluginScope_1, false) : await uninstallPluginOp(pluginId_7, 'user', false);
|
|
1284
|
+
let success = result_2.success;
|
|
1285
|
+
if (!success) {
|
|
1286
|
+
// Plugin was never installed (only in enabledPlugins settings).
|
|
1287
|
+
// Remove directly from all editable settings sources.
|
|
1288
|
+
const editableSources = ['userSettings', 'projectSettings', 'localSettings'];
|
|
1289
|
+
for (const source of editableSources) {
|
|
1290
|
+
const settings = getSettingsForSource(source);
|
|
1291
|
+
if (settings?.enabledPlugins?.[pluginId_7] !== undefined) {
|
|
1292
|
+
updateSettingsForSource(source, {
|
|
1293
|
+
enabledPlugins: {
|
|
1294
|
+
...settings.enabledPlugins,
|
|
1295
|
+
[pluginId_7]: undefined
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
success = true;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
// Clear memoized caches so next loadAllPlugins() picks up settings changes
|
|
1302
|
+
clearAllCaches();
|
|
1303
|
+
}
|
|
1304
|
+
if (success) {
|
|
1305
|
+
if (onManageComplete) {
|
|
1306
|
+
await onManageComplete();
|
|
1307
|
+
}
|
|
1308
|
+
setIsProcessing(false);
|
|
1309
|
+
// Return to list (don't setResult — that closes the whole dialog)
|
|
1310
|
+
setViewState('plugin-list');
|
|
1311
|
+
}
|
|
1312
|
+
else {
|
|
1313
|
+
setIsProcessing(false);
|
|
1314
|
+
setProcessError(result_2.message);
|
|
1315
|
+
}
|
|
1316
|
+
})();
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}, {
|
|
1320
|
+
context: 'Select',
|
|
1321
|
+
isActive: typeof viewState === 'object' && viewState.type === 'failed-plugin-details' && viewState.plugin.scope !== 'managed'
|
|
1322
|
+
});
|
|
1323
|
+
// Confirm-project-uninstall: y/enter disables in settings.local.json, n/escape cancels
|
|
1324
|
+
useKeybindings({
|
|
1325
|
+
'confirm:yes': () => {
|
|
1326
|
+
if (!selectedPlugin)
|
|
1327
|
+
return;
|
|
1328
|
+
setIsProcessing(true);
|
|
1329
|
+
setProcessError(null);
|
|
1330
|
+
const pluginId_8 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1331
|
+
// Write `false` directly — disablePluginOp's cross-scope guard would
|
|
1332
|
+
// reject this (plugin isn't in localSettings yet; the override IS the
|
|
1333
|
+
// point).
|
|
1334
|
+
const { error: error_2 } = updateSettingsForSource('localSettings', {
|
|
1335
|
+
enabledPlugins: {
|
|
1336
|
+
...getSettingsForSource('localSettings')?.enabledPlugins,
|
|
1337
|
+
[pluginId_8]: false
|
|
1338
|
+
}
|
|
1339
|
+
});
|
|
1340
|
+
if (error_2) {
|
|
1341
|
+
setIsProcessing(false);
|
|
1342
|
+
setProcessError(`Failed to write settings: ${error_2.message}`);
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
clearAllCaches();
|
|
1346
|
+
setResult(`✓ Disabled ${selectedPlugin.plugin.name} in .claude/settings.local.json. Run /reload-plugins to apply.`);
|
|
1347
|
+
if (onManageComplete)
|
|
1348
|
+
void onManageComplete();
|
|
1349
|
+
setParentViewState({
|
|
1350
|
+
type: 'menu'
|
|
1351
|
+
});
|
|
1352
|
+
},
|
|
1353
|
+
'confirm:no': () => {
|
|
1354
|
+
setViewState('plugin-details');
|
|
1355
|
+
setProcessError(null);
|
|
1356
|
+
}
|
|
1357
|
+
}, {
|
|
1358
|
+
context: 'Confirmation',
|
|
1359
|
+
isActive: viewState === 'confirm-project-uninstall' && !!selectedPlugin && !isProcessing
|
|
1360
|
+
});
|
|
1361
|
+
// Confirm-data-cleanup: y uninstalls + deletes data dir, n uninstalls + keeps,
|
|
1362
|
+
// esc cancels. Raw useInput because: (1) the Confirmation context maps
|
|
1363
|
+
// enter→confirm:yes, which would make Enter delete the data directory — a
|
|
1364
|
+
// destructive default the UI text ("y to delete · n to keep") doesn't
|
|
1365
|
+
// advertise; (2) unlike confirm-project-uninstall (which uses useKeybindings
|
|
1366
|
+
// where n and escape both map to confirm:no), here n and escape are DIFFERENT
|
|
1367
|
+
// actions (keep-data vs cancel), so this deliberately stays on raw useInput.
|
|
1368
|
+
// eslint-disable-next-line custom-rules/prefer-use-keybindings -- raw y/n/esc; Enter must not trigger destructive delete
|
|
1369
|
+
useInput((input, key) => {
|
|
1370
|
+
if (!selectedPlugin)
|
|
1371
|
+
return;
|
|
1372
|
+
const pluginId_9 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1373
|
+
const pluginScope_2 = selectedPlugin.scope;
|
|
1374
|
+
// Dialog is only reachable from the uninstall case (which guards on
|
|
1375
|
+
// isBuiltin), but TS can't track that across viewState transitions.
|
|
1376
|
+
if (!pluginScope_2 || pluginScope_2 === 'builtin' || !isInstallableScope(pluginScope_2))
|
|
1377
|
+
return;
|
|
1378
|
+
const doUninstall = async (deleteDataDir) => {
|
|
1379
|
+
setIsProcessing(true);
|
|
1380
|
+
setProcessError(null);
|
|
1381
|
+
try {
|
|
1382
|
+
const result_3 = await uninstallPluginOp(pluginId_9, pluginScope_2, deleteDataDir);
|
|
1383
|
+
if (!result_3.success)
|
|
1384
|
+
throw new Error(result_3.message);
|
|
1385
|
+
clearAllCaches();
|
|
1386
|
+
const suffix = deleteDataDir ? '' : ' · data preserved';
|
|
1387
|
+
setResult(`${figures.tick} ${result_3.message}${suffix}`);
|
|
1388
|
+
if (onManageComplete)
|
|
1389
|
+
void onManageComplete();
|
|
1390
|
+
setParentViewState({
|
|
1391
|
+
type: 'menu'
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
catch (e_0) {
|
|
1395
|
+
setIsProcessing(false);
|
|
1396
|
+
setProcessError(e_0 instanceof Error ? e_0.message : String(e_0));
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
if (input === 'y' || input === 'Y') {
|
|
1400
|
+
void doUninstall(true);
|
|
1401
|
+
}
|
|
1402
|
+
else if (input === 'n' || input === 'N') {
|
|
1403
|
+
void doUninstall(false);
|
|
1404
|
+
}
|
|
1405
|
+
else if (key.escape) {
|
|
1406
|
+
setViewState('plugin-details');
|
|
1407
|
+
setProcessError(null);
|
|
1408
|
+
}
|
|
1409
|
+
}, {
|
|
1410
|
+
isActive: typeof viewState === 'object' && viewState.type === 'confirm-data-cleanup' && !!selectedPlugin && !isProcessing
|
|
1411
|
+
});
|
|
1412
|
+
// Reset selection when search query changes
|
|
1413
|
+
React.useEffect(() => {
|
|
1414
|
+
setSelectedIndex(0);
|
|
1415
|
+
}, [searchQuery]);
|
|
1416
|
+
// Handle input for entering search mode (text input handled by useSearchInput hook)
|
|
1417
|
+
// eslint-disable-next-line custom-rules/prefer-use-keybindings -- useInput needed for raw search mode text input
|
|
1418
|
+
useInput((input_0, key_0) => {
|
|
1419
|
+
const keyIsNotCtrlOrMeta = !key_0.ctrl && !key_0.meta;
|
|
1420
|
+
if (isSearchMode) {
|
|
1421
|
+
// Text input is handled by useSearchInput hook
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
// Enter search mode with '/' or any printable character (except navigation keys)
|
|
1425
|
+
if (input_0 === '/' && keyIsNotCtrlOrMeta) {
|
|
1426
|
+
setIsSearchMode(true);
|
|
1427
|
+
setSearchQuery('');
|
|
1428
|
+
setSelectedIndex(0);
|
|
1429
|
+
}
|
|
1430
|
+
else if (keyIsNotCtrlOrMeta && input_0.length > 0 && !/^\s+$/.test(input_0) && input_0 !== 'j' && input_0 !== 'k' && input_0 !== ' ') {
|
|
1431
|
+
setIsSearchMode(true);
|
|
1432
|
+
setSearchQuery(input_0);
|
|
1433
|
+
setSelectedIndex(0);
|
|
1434
|
+
}
|
|
1435
|
+
}, {
|
|
1436
|
+
isActive: viewState === 'plugin-list'
|
|
1437
|
+
});
|
|
1438
|
+
// Loading state
|
|
1439
|
+
if (loading) {
|
|
1440
|
+
return _jsx(Text, { children: "Loading installed plugins\u2026" });
|
|
1441
|
+
}
|
|
1442
|
+
// No plugins or MCPs installed
|
|
1443
|
+
if (unifiedItems.length === 0) {
|
|
1444
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, children: "Manage plugins" }) }), _jsx(Text, { children: "No plugins or MCP servers installed." }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Esc para volver" }) })] });
|
|
1445
|
+
}
|
|
1446
|
+
if (typeof viewState === 'object' && viewState.type === 'plugin-options' && selectedPlugin) {
|
|
1447
|
+
const pluginId_10 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1448
|
+
function finish(msg) {
|
|
1449
|
+
setResult(msg);
|
|
1450
|
+
// Plugin is enabled regardless of whether config was saved or
|
|
1451
|
+
// skipped — onManageComplete → markPluginsChanged → the
|
|
1452
|
+
// persistent "run /reload-plugins" notice.
|
|
1453
|
+
if (onManageComplete) {
|
|
1454
|
+
void onManageComplete();
|
|
1455
|
+
}
|
|
1456
|
+
setParentViewState({
|
|
1457
|
+
type: 'menu'
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
|
+
return _jsx(PluginOptionsFlow, { plugin: selectedPlugin.plugin, pluginId: pluginId_10, onDone: (outcome, detail) => {
|
|
1461
|
+
switch (outcome) {
|
|
1462
|
+
case 'configured':
|
|
1463
|
+
finish(`✓ Enabled and configured ${selectedPlugin.plugin.name}. Run /reload-plugins to apply.`);
|
|
1464
|
+
break;
|
|
1465
|
+
case 'skipped':
|
|
1466
|
+
finish(`✓ Enabled ${selectedPlugin.plugin.name}. Run /reload-plugins to apply.`);
|
|
1467
|
+
break;
|
|
1468
|
+
case 'error':
|
|
1469
|
+
finish(`Failed to save configuration: ${detail}`);
|
|
1470
|
+
break;
|
|
1471
|
+
}
|
|
1472
|
+
} });
|
|
1473
|
+
}
|
|
1474
|
+
// Configure options (from the Manage menu)
|
|
1475
|
+
if (typeof viewState === 'object' && viewState.type === 'configuring-options' && selectedPlugin) {
|
|
1476
|
+
const pluginId_11 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1477
|
+
return _jsx(PluginOptionsDialog, { title: `Configure ${selectedPlugin.plugin.name}`, subtitle: "Plugin options", configSchema: viewState.schema, initialValues: loadPluginOptions(pluginId_11), onSave: values => {
|
|
1478
|
+
try {
|
|
1479
|
+
savePluginOptions(pluginId_11, values, viewState.schema);
|
|
1480
|
+
clearAllCaches();
|
|
1481
|
+
setResult('Configuration saved. Run /reload-plugins for changes to take effect.');
|
|
1482
|
+
}
|
|
1483
|
+
catch (err_3) {
|
|
1484
|
+
setProcessError(`Failed to save configuration: ${errorMessage(err_3)}`);
|
|
1485
|
+
}
|
|
1486
|
+
setViewState('plugin-details');
|
|
1487
|
+
}, onCancel: () => setViewState('plugin-details') });
|
|
1488
|
+
}
|
|
1489
|
+
// Configuration view
|
|
1490
|
+
if (viewState === 'configuring' && configNeeded && selectedPlugin) {
|
|
1491
|
+
const pluginId_12 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1492
|
+
async function handleSave(config) {
|
|
1493
|
+
if (!configNeeded || !selectedPlugin)
|
|
1494
|
+
return;
|
|
1495
|
+
try {
|
|
1496
|
+
// Find MCPB path again
|
|
1497
|
+
const mcpServersSpec_1 = selectedPlugin.plugin.manifest.mcpServers;
|
|
1498
|
+
let mcpbPath_0 = null;
|
|
1499
|
+
if (typeof mcpServersSpec_1 === 'string' && isMcpbSource(mcpServersSpec_1)) {
|
|
1500
|
+
mcpbPath_0 = mcpServersSpec_1;
|
|
1501
|
+
}
|
|
1502
|
+
else if (Array.isArray(mcpServersSpec_1)) {
|
|
1503
|
+
for (const spec_1 of mcpServersSpec_1) {
|
|
1504
|
+
if (typeof spec_1 === 'string' && isMcpbSource(spec_1)) {
|
|
1505
|
+
mcpbPath_0 = spec_1;
|
|
1506
|
+
break;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
if (!mcpbPath_0) {
|
|
1511
|
+
setProcessError('No MCPB file found');
|
|
1512
|
+
setViewState('plugin-details');
|
|
1513
|
+
return;
|
|
1514
|
+
}
|
|
1515
|
+
// Reload with provided config
|
|
1516
|
+
await loadMcpbFile(mcpbPath_0, selectedPlugin.plugin.path, pluginId_12, undefined, config);
|
|
1517
|
+
// Success - go back to details
|
|
1518
|
+
setProcessError(null);
|
|
1519
|
+
setConfigNeeded(null);
|
|
1520
|
+
setViewState('plugin-details');
|
|
1521
|
+
setResult('Configuration saved. Run /reload-plugins for changes to take effect.');
|
|
1522
|
+
}
|
|
1523
|
+
catch (err_4) {
|
|
1524
|
+
const errorMsg_0 = errorMessage(err_4);
|
|
1525
|
+
setProcessError(`Failed to save configuration: ${errorMsg_0}`);
|
|
1526
|
+
setViewState('plugin-details');
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
function handleCancel() {
|
|
1530
|
+
setConfigNeeded(null);
|
|
1531
|
+
setViewState('plugin-details');
|
|
1532
|
+
}
|
|
1533
|
+
return _jsx(PluginOptionsDialog, { title: `Configure ${configNeeded.manifest.name}`, subtitle: `Plugin: ${selectedPlugin.plugin.name}`, configSchema: configNeeded.configSchema, initialValues: configNeeded.existingConfig, onSave: handleSave, onCancel: handleCancel });
|
|
1534
|
+
}
|
|
1535
|
+
// Flagged plugin detail view
|
|
1536
|
+
if (typeof viewState === 'object' && viewState.type === 'flagged-detail') {
|
|
1537
|
+
const fp = viewState.plugin;
|
|
1538
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { bold: true, children: [fp.name, " @ ", fp.marketplace] }) }), _jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { dimColor: true, children: "Status: " }), _jsx(Text, { color: "error", children: "Removed" })] }), _jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [_jsxs(Text, { color: "error", children: ["Removed from marketplace \u00B7 reason: ", fp.reason] }), _jsx(Text, { children: fp.text }), _jsxs(Text, { dimColor: true, children: ["Flagged on ", new Date(fp.flaggedAt).toLocaleDateString()] })] }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: _jsxs(Box, { children: [_jsxs(Text, { children: [figures.pointer, " "] }), _jsx(Text, { color: "suggestion", children: "Dismiss" })] }) }), _jsxs(Byline, { children: [_jsx(ConfigurableShortcutHint, { action: "select:accept", context: "Select", fallback: "Enter", description: "dismiss" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "volver" })] })] });
|
|
1539
|
+
}
|
|
1540
|
+
// Confirm-project-uninstall: warn about shared .claude/settings.json,
|
|
1541
|
+
// offer to disable in settings.local.json instead.
|
|
1542
|
+
if (viewState === 'confirm-project-uninstall' && selectedPlugin) {
|
|
1543
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, color: "warning", children: [selectedPlugin.plugin.name, " is enabled in .claude/settings.json (shared with your team)"] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { children: "Disable it just for you in .claude/settings.local.json?" }), _jsx(Text, { dimColor: true, children: "This has the same effect as uninstalling, without affecting other contributors." })] }), processError && _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: processError }) }), _jsx(Box, { marginTop: 1, children: isProcessing ? _jsx(Text, { dimColor: true, children: "Disabling\u2026" }) : _jsxs(Byline, { children: [_jsx(ConfigurableShortcutHint, { action: "confirm:yes", context: "Confirmation", fallback: "y", description: "disable" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "cancelar" })] }) })] });
|
|
1544
|
+
}
|
|
1545
|
+
// Confirm-data-cleanup: prompt before deleting ${CLAUDE_PLUGIN_DATA} dir
|
|
1546
|
+
if (typeof viewState === 'object' && viewState.type === 'confirm-data-cleanup' && selectedPlugin) {
|
|
1547
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: [selectedPlugin.plugin.name, " has ", viewState.size.human, " of persistent data"] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { children: "Delete it along with the plugin?" }), _jsx(Text, { dimColor: true, children: pluginDataDirPath(`${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`) })] }), processError && _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: processError }) }), _jsx(Box, { marginTop: 1, children: isProcessing ? _jsx(Text, { dimColor: true, children: "Uninstalling\u2026" }) : _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "y" }), " to delete \u00B7 ", _jsx(Text, { bold: true, children: "n" }), " to keep \u00B7", ' ', _jsx(Text, { bold: true, children: "esc" }), " to cancel"] }) })] });
|
|
1548
|
+
}
|
|
1549
|
+
// Plugin details view
|
|
1550
|
+
if (viewState === 'plugin-details' && selectedPlugin) {
|
|
1551
|
+
const mergedSettings_2 = getSettings_DEPRECATED(); // Use merged settings to respect all layers
|
|
1552
|
+
const pluginId_13 = `${selectedPlugin.plugin.name}@${selectedPlugin.marketplace}`;
|
|
1553
|
+
const isEnabled_2 = mergedSettings_2?.enabledPlugins?.[pluginId_13] !== false;
|
|
1554
|
+
// Compute plugin errors section
|
|
1555
|
+
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}@`));
|
|
1556
|
+
const pluginErrorsSection = filteredPluginErrors.length === 0 ? null : _jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { bold: true, color: "error", children: [filteredPluginErrors.length, ' ', plural(filteredPluginErrors.length, 'error'), ":"] }), filteredPluginErrors.map((error_3, i_0) => {
|
|
1557
|
+
const guidance = getErrorGuidance(error_3);
|
|
1558
|
+
return _jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsx(Text, { color: "error", children: formatErrorMessage(error_3) }), guidance && _jsxs(Text, { dimColor: true, italic: true, children: [figures.arrowRight, " ", guidance] })] }, i_0);
|
|
1559
|
+
})] });
|
|
1560
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { bold: true, children: [selectedPlugin.plugin.name, " @ ", selectedPlugin.marketplace] }) }), _jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: "Scope: " }), _jsx(Text, { children: selectedPlugin.scope || 'user' })] }), selectedPlugin.plugin.manifest.version && _jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: "Version: " }), _jsx(Text, { children: selectedPlugin.plugin.manifest.version })] }), selectedPlugin.plugin.manifest.description && _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: selectedPlugin.plugin.manifest.description }) }), selectedPlugin.plugin.manifest.author && _jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: "Author: " }), _jsx(Text, { children: selectedPlugin.plugin.manifest.author.name })] }), _jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { dimColor: true, children: "Status: " }), _jsx(Text, { color: isEnabled_2 ? 'success' : 'warning', children: isEnabled_2 ? 'Enabled' : 'Disabled' }), selectedPlugin.pendingUpdate && _jsx(Text, { color: "suggestion", children: " \u00B7 Marked for update" })] }), _jsx(PluginComponentsDisplay, { plugin: selectedPlugin.plugin, marketplace: selectedPlugin.marketplace }), pluginErrorsSection, _jsx(Box, { marginTop: 1, flexDirection: "column", children: detailsMenuItems.map((item_9, index_0) => {
|
|
1561
|
+
const isSelected = index_0 === detailsMenuIndex;
|
|
1562
|
+
return _jsxs(Box, { children: [isSelected && _jsxs(Text, { children: [figures.pointer, " "] }), !isSelected && _jsx(Text, { children: ' ' }), _jsx(Text, { bold: isSelected, color: item_9.label.includes('Uninstall') ? 'error' : item_9.label.includes('Update') ? 'suggestion' : undefined, children: item_9.label })] }, index_0);
|
|
1563
|
+
}) }), isProcessing && _jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Processing\u2026" }) }), processError && _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: processError }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, italic: true, children: _jsxs(Byline, { children: [_jsx(ConfigurableShortcutHint, { action: "select:previous", context: "Select", fallback: "\u2191", description: "navegar" }), _jsx(ConfigurableShortcutHint, { action: "select:accept", context: "Select", fallback: "Enter", description: "seleccionar" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "volver" })] }) }) })] });
|
|
1564
|
+
}
|
|
1565
|
+
// Failed plugin detail view
|
|
1566
|
+
if (typeof viewState === 'object' && viewState.type === 'failed-plugin-details') {
|
|
1567
|
+
const failedPlugin_0 = viewState.plugin;
|
|
1568
|
+
const firstError = failedPlugin_0.errors[0];
|
|
1569
|
+
const errorMessage_0 = firstError ? formatErrorMessage(firstError) : 'Failed to load';
|
|
1570
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, children: failedPlugin_0.name }), _jsxs(Text, { dimColor: true, children: [" @ ", failedPlugin_0.marketplace] }), _jsxs(Text, { dimColor: true, children: [" (", failedPlugin_0.scope, ")"] })] }), _jsx(Text, { color: "error", children: errorMessage_0 }), failedPlugin_0.scope === 'managed' ? _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Managed by your organization \u2014 contact your admin" }) }) : _jsxs(Box, { marginTop: 1, children: [_jsxs(Text, { color: "suggestion", children: [figures.pointer, " "] }), _jsx(Text, { bold: true, children: "Remove" })] }), isProcessing && _jsx(Text, { children: "Processing\u2026" }), processError && _jsx(Text, { color: "error", children: processError }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, italic: true, children: _jsxs(Byline, { children: [failedPlugin_0.scope !== 'managed' && _jsx(ConfigurableShortcutHint, { action: "select:accept", context: "Select", fallback: "Enter", description: "remove" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "volver" })] }) }) })] });
|
|
1571
|
+
}
|
|
1572
|
+
// MCP detail view
|
|
1573
|
+
if (typeof viewState === 'object' && viewState.type === 'mcp-detail') {
|
|
1574
|
+
const client_3 = viewState.client;
|
|
1575
|
+
const serverToolsCount = filterToolsByServer(mcpTools, client_3.name).length;
|
|
1576
|
+
// Common handlers for MCP menus
|
|
1577
|
+
const handleMcpViewTools = () => {
|
|
1578
|
+
setViewState({
|
|
1579
|
+
type: 'mcp-tools',
|
|
1580
|
+
client: client_3
|
|
1581
|
+
});
|
|
1582
|
+
};
|
|
1583
|
+
const handleMcpCancel = () => {
|
|
1584
|
+
setViewState('plugin-list');
|
|
1585
|
+
};
|
|
1586
|
+
const handleMcpComplete = (result_4) => {
|
|
1587
|
+
if (result_4) {
|
|
1588
|
+
setResult(result_4);
|
|
1589
|
+
}
|
|
1590
|
+
setViewState('plugin-list');
|
|
1591
|
+
};
|
|
1592
|
+
// Transform MCPServerConnection to appropriate ServerInfo type
|
|
1593
|
+
const scope_5 = client_3.config.scope;
|
|
1594
|
+
const configType = client_3.config.type;
|
|
1595
|
+
if (configType === 'stdio') {
|
|
1596
|
+
const server = {
|
|
1597
|
+
name: client_3.name,
|
|
1598
|
+
client: client_3,
|
|
1599
|
+
scope: scope_5,
|
|
1600
|
+
transport: 'stdio',
|
|
1601
|
+
config: client_3.config
|
|
1602
|
+
};
|
|
1603
|
+
return _jsx(MCPStdioServerMenu, { server: server, serverToolsCount: serverToolsCount, onViewTools: handleMcpViewTools, onCancel: handleMcpCancel, onComplete: handleMcpComplete, borderless: true });
|
|
1604
|
+
}
|
|
1605
|
+
else if (configType === 'sse') {
|
|
1606
|
+
const server_0 = {
|
|
1607
|
+
name: client_3.name,
|
|
1608
|
+
client: client_3,
|
|
1609
|
+
scope: scope_5,
|
|
1610
|
+
transport: 'sse',
|
|
1611
|
+
isAuthenticated: undefined,
|
|
1612
|
+
config: client_3.config
|
|
1613
|
+
};
|
|
1614
|
+
return _jsx(MCPRemoteServerMenu, { server: server_0, serverToolsCount: serverToolsCount, onViewTools: handleMcpViewTools, onCancel: handleMcpCancel, onComplete: handleMcpComplete, borderless: true });
|
|
1615
|
+
}
|
|
1616
|
+
else if (configType === 'http') {
|
|
1617
|
+
const server_1 = {
|
|
1618
|
+
name: client_3.name,
|
|
1619
|
+
client: client_3,
|
|
1620
|
+
scope: scope_5,
|
|
1621
|
+
transport: 'http',
|
|
1622
|
+
isAuthenticated: undefined,
|
|
1623
|
+
config: client_3.config
|
|
1624
|
+
};
|
|
1625
|
+
return _jsx(MCPRemoteServerMenu, { server: server_1, serverToolsCount: serverToolsCount, onViewTools: handleMcpViewTools, onCancel: handleMcpCancel, onComplete: handleMcpComplete, borderless: true });
|
|
1626
|
+
}
|
|
1627
|
+
else if (configType === 'claudeai-proxy') {
|
|
1628
|
+
const server_2 = {
|
|
1629
|
+
name: client_3.name,
|
|
1630
|
+
client: client_3,
|
|
1631
|
+
scope: scope_5,
|
|
1632
|
+
transport: 'claudeai-proxy',
|
|
1633
|
+
isAuthenticated: undefined,
|
|
1634
|
+
config: client_3.config
|
|
1635
|
+
};
|
|
1636
|
+
return _jsx(MCPRemoteServerMenu, { server: server_2, serverToolsCount: serverToolsCount, onViewTools: handleMcpViewTools, onCancel: handleMcpCancel, onComplete: handleMcpComplete, borderless: true });
|
|
1637
|
+
}
|
|
1638
|
+
// Fallback - shouldn't happen but handle gracefully
|
|
1639
|
+
setViewState('plugin-list');
|
|
1640
|
+
return null;
|
|
1641
|
+
}
|
|
1642
|
+
// MCP tools view
|
|
1643
|
+
if (typeof viewState === 'object' && viewState.type === 'mcp-tools') {
|
|
1644
|
+
const client_4 = viewState.client;
|
|
1645
|
+
const scope_6 = client_4.config.scope;
|
|
1646
|
+
const configType_0 = client_4.config.type;
|
|
1647
|
+
// Build ServerInfo for MCPToolListView
|
|
1648
|
+
let server_3;
|
|
1649
|
+
if (configType_0 === 'stdio') {
|
|
1650
|
+
server_3 = {
|
|
1651
|
+
name: client_4.name,
|
|
1652
|
+
client: client_4,
|
|
1653
|
+
scope: scope_6,
|
|
1654
|
+
transport: 'stdio',
|
|
1655
|
+
config: client_4.config
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
else if (configType_0 === 'sse') {
|
|
1659
|
+
server_3 = {
|
|
1660
|
+
name: client_4.name,
|
|
1661
|
+
client: client_4,
|
|
1662
|
+
scope: scope_6,
|
|
1663
|
+
transport: 'sse',
|
|
1664
|
+
isAuthenticated: undefined,
|
|
1665
|
+
config: client_4.config
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
else if (configType_0 === 'http') {
|
|
1669
|
+
server_3 = {
|
|
1670
|
+
name: client_4.name,
|
|
1671
|
+
client: client_4,
|
|
1672
|
+
scope: scope_6,
|
|
1673
|
+
transport: 'http',
|
|
1674
|
+
isAuthenticated: undefined,
|
|
1675
|
+
config: client_4.config
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
else {
|
|
1679
|
+
server_3 = {
|
|
1680
|
+
name: client_4.name,
|
|
1681
|
+
client: client_4,
|
|
1682
|
+
scope: scope_6,
|
|
1683
|
+
transport: 'claudeai-proxy',
|
|
1684
|
+
isAuthenticated: undefined,
|
|
1685
|
+
config: client_4.config
|
|
1686
|
+
};
|
|
1687
|
+
}
|
|
1688
|
+
return _jsx(MCPToolListView, { server: server_3, onSelectTool: (tool) => {
|
|
1689
|
+
setViewState({
|
|
1690
|
+
type: 'mcp-tool-detail',
|
|
1691
|
+
client: client_4,
|
|
1692
|
+
tool
|
|
1693
|
+
});
|
|
1694
|
+
}, onBack: () => setViewState({
|
|
1695
|
+
type: 'mcp-detail',
|
|
1696
|
+
client: client_4
|
|
1697
|
+
}) });
|
|
1698
|
+
}
|
|
1699
|
+
// MCP tool detail view
|
|
1700
|
+
if (typeof viewState === 'object' && viewState.type === 'mcp-tool-detail') {
|
|
1701
|
+
const { client: client_5, tool: tool_0 } = viewState;
|
|
1702
|
+
const scope_7 = client_5.config.scope;
|
|
1703
|
+
const configType_1 = client_5.config.type;
|
|
1704
|
+
// Build ServerInfo for MCPToolDetailView
|
|
1705
|
+
let server_4;
|
|
1706
|
+
if (configType_1 === 'stdio') {
|
|
1707
|
+
server_4 = {
|
|
1708
|
+
name: client_5.name,
|
|
1709
|
+
client: client_5,
|
|
1710
|
+
scope: scope_7,
|
|
1711
|
+
transport: 'stdio',
|
|
1712
|
+
config: client_5.config
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
else if (configType_1 === 'sse') {
|
|
1716
|
+
server_4 = {
|
|
1717
|
+
name: client_5.name,
|
|
1718
|
+
client: client_5,
|
|
1719
|
+
scope: scope_7,
|
|
1720
|
+
transport: 'sse',
|
|
1721
|
+
isAuthenticated: undefined,
|
|
1722
|
+
config: client_5.config
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
else if (configType_1 === 'http') {
|
|
1726
|
+
server_4 = {
|
|
1727
|
+
name: client_5.name,
|
|
1728
|
+
client: client_5,
|
|
1729
|
+
scope: scope_7,
|
|
1730
|
+
transport: 'http',
|
|
1731
|
+
isAuthenticated: undefined,
|
|
1732
|
+
config: client_5.config
|
|
1733
|
+
};
|
|
1734
|
+
}
|
|
1735
|
+
else {
|
|
1736
|
+
server_4 = {
|
|
1737
|
+
name: client_5.name,
|
|
1738
|
+
client: client_5,
|
|
1739
|
+
scope: scope_7,
|
|
1740
|
+
transport: 'claudeai-proxy',
|
|
1741
|
+
isAuthenticated: undefined,
|
|
1742
|
+
config: client_5.config
|
|
1743
|
+
};
|
|
1744
|
+
}
|
|
1745
|
+
return _jsx(MCPToolDetailView, { tool: tool_0, server: server_4, onBack: () => setViewState({
|
|
1746
|
+
type: 'mcp-tools',
|
|
1747
|
+
client: client_5
|
|
1748
|
+
}) });
|
|
1749
|
+
}
|
|
1750
|
+
// Plugin list view (main management interface)
|
|
1751
|
+
const visibleItems = pagination.getVisibleItems(filteredItems);
|
|
1752
|
+
return _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(SearchBox, { query: searchQuery, isFocused: isSearchMode, isTerminalFocused: isTerminalFocused, width: terminalWidth - 4, cursorOffset: searchCursorOffset }) }), filteredItems.length === 0 && searchQuery && _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { dimColor: true, children: ["No items match \"", searchQuery, "\""] }) }), pagination.scrollPosition.canScrollUp && _jsx(Box, { children: _jsxs(Text, { dimColor: true, children: [" ", figures.arrowUp, " more above"] }) }), visibleItems.map((item_10, visibleIndex) => {
|
|
1753
|
+
const actualIndex = pagination.toActualIndex(visibleIndex);
|
|
1754
|
+
const isSelected_0 = actualIndex === selectedIndex && !isSearchMode;
|
|
1755
|
+
// Check if we need to show a scope header
|
|
1756
|
+
const prevItem = visibleIndex > 0 ? visibleItems[visibleIndex - 1] : null;
|
|
1757
|
+
const showScopeHeader = !prevItem || prevItem.scope !== item_10.scope;
|
|
1758
|
+
// Get scope label
|
|
1759
|
+
const getScopeLabel = (scope_8) => {
|
|
1760
|
+
switch (scope_8) {
|
|
1761
|
+
case 'flagged':
|
|
1762
|
+
return 'Flagged';
|
|
1763
|
+
case 'project':
|
|
1764
|
+
return 'Project';
|
|
1765
|
+
case 'local':
|
|
1766
|
+
return 'Local';
|
|
1767
|
+
case 'user':
|
|
1768
|
+
return 'User';
|
|
1769
|
+
case 'enterprise':
|
|
1770
|
+
return 'Enterprise';
|
|
1771
|
+
case 'managed':
|
|
1772
|
+
return 'Managed';
|
|
1773
|
+
case 'builtin':
|
|
1774
|
+
return 'Built-in';
|
|
1775
|
+
case 'dynamic':
|
|
1776
|
+
return 'Built-in';
|
|
1777
|
+
default:
|
|
1778
|
+
return scope_8;
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
return _jsxs(React.Fragment, { children: [showScopeHeader && _jsx(Box, { marginTop: visibleIndex > 0 ? 1 : 0, paddingLeft: 2, children: _jsx(Text, { dimColor: item_10.scope !== 'flagged', color: item_10.scope === 'flagged' ? 'warning' : undefined, bold: item_10.scope === 'flagged', children: getScopeLabel(item_10.scope) }) }), _jsx(UnifiedInstalledCell, { item: item_10, isSelected: isSelected_0 })] }, item_10.id);
|
|
1782
|
+
}), pagination.scrollPosition.canScrollDown && _jsx(Box, { children: _jsxs(Text, { dimColor: true, children: [" ", figures.arrowDown, " more below"] }) }), _jsx(Box, { marginTop: 1, marginLeft: 1, children: _jsx(Text, { dimColor: true, italic: true, children: _jsxs(Byline, { children: [_jsx(Text, { children: "type to search" }), _jsx(ConfigurableShortcutHint, { action: "plugin:toggle", context: "Plugin", fallback: "Space", description: "toggle" }), _jsx(ConfigurableShortcutHint, { action: "select:accept", context: "Select", fallback: "Enter", description: "details" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "volver" })] }) }) }), pendingToggles.size > 0 && _jsx(Box, { marginLeft: 1, children: _jsx(Text, { dimColor: true, italic: true, children: "Run /reload-plugins to apply changes" }) })] });
|
|
1783
|
+
}
|