/** * Read/write helpers for OpenAI Codex CLI MCP config (`config.toml`). * * Codex stores MCP servers under `[mcp_servers.]` in either * `~/.codex/config.toml` (global) or `/.codex/config.toml` (project). * We only manage the `agenticros` entry — other servers are preserved. */ export type CodexConfigScope = "global" | "project"; export interface CodexAgenticrosConfig { configPath: string; exists: boolean; command?: string; args?: string[]; env?: Record; enabled?: boolean; } export interface CodexConfigIssue { severity: "red" | "yellow"; message: string; hint?: string; } export interface CodexConfigValidation { ok: boolean; issues: CodexConfigIssue[]; } /** Global Codex config: `~/.codex/config.toml`. */ export declare function globalCodexConfigPath(): string; /** Project-scoped Codex config: `/.codex/config.toml`. */ export declare function projectCodexConfigPath(cwd?: string): string; export declare function resolveCodexConfigPath(scope: CodexConfigScope, cwd?: string): string; /** * Build the TOML block for the AgenticROS MCP server. Uses an absolute path * to index.js (required by Codex) and leaves namespace empty so * `~/.agenticros/config.json` / `agenticros mode` drives the active robot. */ export declare function buildAgenticrosMcpTomlBlock(mcpEntryAbs: string, namespace?: string): string; /** Insert or replace the agenticros MCP block, preserving other TOML content. */ export declare function upsertAgenticrosBlock(existingContent: string | null, block: string): string; /** Parse the agenticros MCP section from a Codex config.toml file. */ export declare function readCodexAgenticrosConfig(configPath: string): CodexAgenticrosConfig; export declare function writeCodexAgenticrosConfig(configPath: string, mcpEntryAbs: string, options?: { namespace?: string; }): void; /** Validate Codex agenticros MCP config against expected MCP binary path. */ export declare function validateCodexAgenticrosConfig(cfg: CodexAgenticrosConfig, mcpEntryExpected?: string): CodexConfigValidation; /** Collect Codex config paths to inspect (global + project when in a workspace). */ export declare function listCodexConfigCandidates(repoRoot?: string): string[]; /** Doctor check entries for Codex MCP config (used by `agenticros doctor`). */ export declare function buildCodexDoctorChecks(mcpEntryExpected: string | undefined, repoRoot?: string): Array<{ id: string; label: string; severity: "green" | "yellow" | "red"; hint?: string; detail?: string; }>; //# sourceMappingURL=codex-config.d.ts.map