/** One MCP server, in the de-facto `.mcp.json` shape. Secrets belong in `env` (or `headers`) as * `${VAR}` references, resolved from the operator's environment at launch. Remote-transport fields * (`type`/`url`/`headers`) are carried verbatim for connectors that support them. Any other * `.mcp.json` key an operator copies in (e.g. `timeout`) passes through to the rendered config * unchanged but gets NO `${VAR}` expansion — Claude only expands command/args/env/url/headers, * which is exactly the set {@link mcpServerEnvKeys} scans for secret names to forward. */ export interface McpServerSpec { command?: string; args?: string[]; env?: Record; type?: string; url?: string; headers?: Record; /** Pass-through for any other `.mcp.json` key (carried verbatim, no env expansion). */ [key: string]: unknown; } /** Per-connector settings. `mcpServers` are the operator servers SHARED with agents this connector * spawns, keyed by server name (`.mcp.json`-style). */ export interface ConnectorConfig { mcpServers?: Record; } /** Deliberate extra environment names for a spawned agent. The default boundary is a fixed OS * allow-list, the machine-wide `COTAL_*` operator knobs, and connector-declared inputs. `env` adds * named capability (including a host-session marker a persona has opted into); an empty array adds * none. There is no inherit mode. */ export interface SpawnConfig { env?: string[]; } /** The parsed cotal config file: a section per connector, keyed by connector name ("claude", …), * plus machine-local spawn policy. */ export interface CotalConfig { connectors?: Record; spawn?: SpawnConfig; } /** Operator-level config dir: `$XDG_CONFIG_HOME/cotal`; else `%APPDATA%\Cotal` on Windows (the * platform's per-user roaming config dir) or `~/.config/cotal` on POSIX. Holds `config.json` * and the installed-extensions prefix. */ export declare function globalConfigDir(): string; /** Operator-level config path: `/config.json`. */ export declare function globalConfigPath(): string; /** Space-local config path: `/.cotal/config.json`. */ export declare function spaceConfigPath(root: string): string; /** Load the merged cotal config: the operator-level file as the base, the space-local file layered * on top (more specific wins, per connector + server name). */ export declare function loadCotalConfig(root: string): CotalConfig; /** The MCP servers a connector should share with an agent it spawns, after applying an optional * per-spawn `selection` (the parsed `--share-tools` value): * `undefined` → every server declared for the connector (the config default) * `[]` → none (e.g. `--share-tools none`) * `[a, b]` → only those named, which MUST be declared (throws otherwise — no silent drop). */ export declare function connectorServers(config: CotalConfig, connector: string, selection?: readonly string[]): Record; /** Parse a `--share-tools` flag value into a selection for {@link connectorServers}: flag absent * → `undefined` (share all declared); `none` or empty → `[]` (share nothing); else the comma list. */ export declare function parseShareSelection(value: string | undefined): readonly string[] | undefined; /** Extra spawned-agent environment names the operator declared. Undefined means no extras. */ export declare function spawnEnvAllow(config: CotalConfig): readonly string[] | undefined; //# sourceMappingURL=connector-config.d.ts.map