import type { EnvShell } from "../platform/base.js"; export interface EnvVar { key: string; value: string; } /** Format a single env assignment for the target shell. */ export declare function formatExport(v: EnvVar, shell: EnvShell): string; export declare function formatUnset(key: string, shell: EnvShell): string; /** * Insert or replace the aih-managed block for `scope` in a shell profile. * * Idempotent by construction: the region between the begin/end markers is * replaced wholesale, so re-running with the same vars yields byte-identical * output and lines outside the markers are never touched. Preserves the file's * existing EOL style (CRLF vs LF). */ export declare function upsertManagedBlock(existing: string, scope: string, vars: EnvVar[], shell: EnvShell, unsetKeys?: readonly string[]): string; /** * Insert or replace the aih-managed `scope` block carrying arbitrary `body` text * (the format-agnostic core of {@link upsertManagedBlock}). The `#`-comment markers * are valid in any `#`-commented format — shell profiles AND TOML — so `aih mcp` * reuses this to fold its `[mcp_servers.*]` tables into Codex's `~/.codex/config.toml` * without clobbering the rest of the file. Idempotent: the region between the markers * is replaced wholesale, content outside is untouched, and the file's EOL style * (CRLF vs LF) is preserved. */ export declare function upsertTextBlock(existing: string, scope: string, body: string): string; /** Remove the managed block for `scope` if present (used by uninstall paths). */ export declare function removeManagedBlock(existing: string, scope: string): string;