/** * Render the workspace's declared MCP servers into the **coding agent's own** * native MCP config, so a developer who runs `skaile install` in a project and * then opens their coding agent in that folder gets the same MCP servers * skaile's own agent loop wires up. * * This is the sibling of skill deployment (`.claude/skills/`): skills already * render into the driver target's native tree, MCP servers now do too. * * Declarations come from the single resolver `loadMcpServerDeclarations()` in * `@skaile/workspaces/core` — the same one the runner uses. There is no second * resolver here. */ import type { DriverTarget } from "@skaile/workspaces/core"; /** A skipped declaration and the human-readable reason it was not rendered. */ export interface SkippedMcpServer { id: string; reason: string; } /** Outcome of one {@link renderMcpServerConfig} pass. */ export interface RenderMcpConfigResult { /** Absolute path to the config file, when the target is supported. */ path?: string; /** Whether the config file was actually written. */ written: boolean; /** IDs skaile wrote (and now owns) in this pass. */ servers: string[]; /** Previously-owned IDs removed in this pass. */ removed: string[]; /** Declarations deliberately not rendered, with reasons. */ skipped: SkippedMcpServer[]; } /** Options for {@link renderMcpServerConfig}. */ export interface RenderMcpConfigOptions { /** Warning sink. Defaults to `console.warn` prefixed with `skaile:`. */ warn?: (message: string) => void; } /** * Render every MCP server declared for `projectDir` into `driverTarget`'s * native project-scope MCP config. * * Merge rules, in short: * - Entries skaile previously wrote (tracked in `.skaile/mcp-managed.json`) are * refreshed, or deleted once their declaration disappears. * - A hand-written entry with the same id is left untouched and warned about. * - Every other key of the config file survives verbatim. * - A project with no renderable servers and no prior state writes nothing. * * Unsupported driver targets (`codex`, `omp`) are a silent no-op. * * @param projectDir - Workspace root where `skaile.yaml` lives. * @param driverTarget - Coding agent whose native MCP config to write. * @param opts - Optional warning sink. * @returns What was written, removed and skipped. * @docLink packages/asset-manager/concepts#coding-agent-mcp-config */ export declare function renderMcpServerConfig(projectDir: string, driverTarget: DriverTarget, opts?: RenderMcpConfigOptions): Promise; //# sourceMappingURL=mcp-config.d.ts.map