import { type AgentConfig, type Scope } from "./agents.js"; /** * Turns JSONC (OpenCode, VS Code) into JSON: drops // and /* *\/ comments and * trailing commas outside strings. */ export declare function stripJsonc(text: string): string; export declare function readJsonConfig(path: string): Promise>; export declare function mergeServerEntry(config: Record, configKey: string, name: string, entry: Record): { config: Record; replaced: boolean; }; /** Serializes a flat entry as a TOML table. JSON string/array literals are valid TOML for the values we write. */ export declare function buildTomlTable(table: string, entry: Record): string; /** * Sets `[table]` to `entry`: removes every `[table]` / `[table.*]` section * wherever it sits, writes the new block where the first one was (or at the * end), and leaves every other line, comments included, as it was. * * The edit is line-based to keep the file's formatting, so the result is * parsed and compared with the expected document before it is returned. A * layout this cannot rewrite safely (the table, or a parent table, defined * inline or with dotted keys) throws instead of producing a broken file. */ export declare function upsertTomlTable(existing: string, table: string, entry: Record): { content: string; replaced: boolean; }; export declare function resolveMcpPath(agent: AgentConfig, scope: Scope): Promise; /** Writes the `upstash` server into the agent's MCP config, keeping every other server. */ export declare function writeMcpEntry(agent: AgentConfig, scope: Scope): Promise<{ path: string; replaced: boolean; }>; /** Whether the agent's MCP config already declares the `upstash` server. */ export declare function hasMcpEntry(agent: AgentConfig, scope: Scope): Promise; //# sourceMappingURL=mcp-config.d.ts.map