/** * Shared MCP sync helpers for coding-agent service implementations. * * @experimental This API is unstable and may change without notice. */ import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import * as Effect from "effect/Effect"; import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; import { type AppError } from "../app-error/index.js"; import type { AddMcpServerArgs, McpServerSyncOutcome, RemoveMcpServerArgs } from "./coding-agent.js"; import type { McpServerEntry } from "../settings/index.js"; export interface CliInvocation { readonly command: string; readonly args: ReadonlyArray; readonly timeoutMs: number; readonly cwd: string; } export interface CliInvocationResult { readonly exitCode: number; readonly stdout: string; readonly stderr: string; } type NodePlatform = NodeJS.Platform; export declare const runCliInvocation: (invocation: CliInvocation) => Effect.Effect; export interface MixedStrategyConfig { readonly configPath: string; readonly cliAdd: ReadonlyArray; readonly cliRemove: ReadonlyArray; readonly supportedPlatforms?: ReadonlyArray; readonly addIdempotentPatterns?: ReadonlyArray; readonly removeIdempotentPatterns?: ReadonlyArray; readonly timeoutMs?: number; } export interface SyncInlineMcpServerArgs { readonly workspaceRoot: string; readonly serverName: string; readonly entry: McpServerEntry; readonly scope?: "project" | "user"; } export interface PruneManagedMcpServersArgs { readonly workspaceRoot: string; readonly declaredServerNames: ReadonlySet; readonly scope?: "project" | "user"; /** Inspect and report stale targets without changing agent configuration. */ readonly dryRun?: boolean; } export declare const syncInlineMcpServerToAgents: (agentIds: ReadonlyArray, args: SyncInlineMcpServerArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; export declare const syncInlineMcpServerToAgent: (agentId: string, args: SyncInlineMcpServerArgs) => Effect.Effect; export declare const pruneManagedMcpServersForAgent: (agentId: string, args: PruneManagedMcpServersArgs) => Effect.Effect; export declare const addMcpServerMixed: (strategy: MixedStrategyConfig, args: AddMcpServerArgs) => Effect.Effect; export declare const removeMcpServerMixed: (strategy: MixedStrategyConfig, args: RemoveMcpServerArgs) => Effect.Effect; export declare const addMcpServerConfigOnly: (configPathTemplate: string, args: AddMcpServerArgs) => Effect.Effect; export declare const removeMcpServerConfigOnly: (configPathTemplate: string, args: RemoveMcpServerArgs) => Effect.Effect; export interface ConfigFirstStrategy { readonly configPath: string; readonly verifyCommand?: ReadonlyArray; readonly supportedPlatforms?: ReadonlyArray; readonly timeoutMs?: number; } export declare const addMcpServerConfigFirst: (strategy: ConfigFirstStrategy, args: AddMcpServerArgs) => Effect.Effect; export declare const removeMcpServerConfigFirst: (strategy: ConfigFirstStrategy, args: RemoveMcpServerArgs) => Effect.Effect; export declare const addMcpServerFromManifest: (agentId: string, args: AddMcpServerArgs) => Effect.Effect; export declare const removeMcpServerFromManifest: (agentId: string, args: RemoveMcpServerArgs) => Effect.Effect; export {}; //# sourceMappingURL=mcp-sync.d.ts.map