/* auto-generated by NAPI-RS */ /* eslint-disable */ /** * The serialized document, whether the edit actually changed it (so the JS * write spine can skip a write and its backup on a no-op), and whether OK's * entry already existed (so the spine labels register-vs-update without * re-parsing). */ export interface McpEditResult { text: string changed: boolean existed: boolean } /** * Parse TOML text and return its data projected to a JSON string. * * Throws a JS exception only for genuinely-unparseable input. See * `toml_json::parse_toml_to_json` for the capability and lossiness contract. */ export declare function parseTomlToJson(tomlText: string): string /** * Remove only `[mcp_servers.]`, never the surrounding table. * Throws only for unparseable TOML. */ export declare function removeMcpServer(tomlText: string, serverName: string): McpEditResult /** * Resolve `path`'s symlink chain to its real write target so the caller writes * through a dotfile-managed symlink instead of replacing it. Never touches the * filesystem beyond reading link metadata. */ export declare function resolveSymlinkWritePath(path: string): SymlinkWritePaths /** * Where to read the existing config from and where to write the updated one * after following any symlink chain. `read_path` is absent when the chain * cycles or can't be resolved, in which case `write_path` is the original path * and writing a fresh file there breaks the link. */ export interface SymlinkWritePaths { readPath?: string writePath: string } /** * Insert or update only `[mcp_servers.]` from a JSON object of the * entry's managed keys, preserving every other document token. Throws only for * unparseable TOML or a non-object entry payload. */ export declare function upsertMcpServer(tomlText: string, serverName: string, entryJson: string): McpEditResult