import { type McpServerConfig, type McpTarget } from '../services/mcp-manager.js'; import { type ListServerToolsResult } from '../services/mcp-tools.js'; import { type McpIntegration, type McpIntegrationConfig } from './mcp-registry.js'; export type McpServerEntry = { command?: string; args?: string[]; env?: Record; url?: string; type?: string; headers?: Record; oauth?: Extract['opencodeOAuth']; }; export type McpWriteResult = { target: McpTarget; status: 'written' | 'skipped' | 'unsupported' | 'error'; path?: string; error?: string; }; export type McpServerHealth = { name: string; target: McpTarget; ownership: 'managed' | 'user'; transport: 'stdio' | 'http'; configured: true; authenticated: boolean | null; reachable: boolean; tools: string[]; toolsets: string[]; error?: string; divergent: boolean; }; export type McpTargetHealth = { target: McpTarget; path: string; supported: boolean; unsupportedReason?: string; servers: McpServerHealth[]; }; /** * Returns integrations relevant for the given profile IDs. An integration is * relevant if at least one of its target profiles is in the active set. * * When `cwd` is provided, local (user/project) integrations are merged in via * {@link getAllIntegrations} — internal MCP servers configured on this machine * appear alongside the built-in catalog. Omit `cwd` for the built-in set only. */ export declare function getRelevantIntegrations(profileIds: string[], cwd?: string): McpIntegration[]; /** * Builds an mcp.json server entry from an integration definition and * user-provided credentials. For HTTP integrations the entry only needs * a `url`. For stdio integrations the entry includes command, args, and * env with credential values filled in. */ export declare function buildMcpEntry(integration: McpIntegration, credentials: Record, target?: McpTarget): McpServerEntry; /** * Generates a human-readable setup guide for an integration. * Suitable for display in CLI output or webview. */ export declare function formatSetupGuide(integration: McpIntegration): string; /** Inspect the target-native configs and, optionally, perform real tools/list checks. */ export declare function checkMcpHealth(workspacePath: string, checkTools?: (config: McpServerConfig, cwd: string) => Promise): Promise; /** * Writes third-party integration entries to every supported LLM config target: * Cursor, VS Code Copilot, Windsurf, Claude Desktop, and Claude Code (project + global). * * Mirrors the mcpConfigService.writeIntegrationConfig() logic from the VS Code extension * so the CLI produces the same propagation without importing extension code. */ export declare function writeIntegrationToAllTargets(entries: Record, global: boolean, workspacePath: string): McpWriteResult[];