import type { JsonNode } from "./agent-config.js"; /** * The registry of AI-agent MCP clients the CLIs can configure — the engine-agnostic port of the * three CLIs' `utils/agents.ts` registry (config path + format + body path + the per-client * transport-entry shape). It carries **no engine specifics**: the server-entry name, the stdio-args * vector, and the server-binary path all come from the {@link EngineAdapter} the setup-mcp policy * passes in. Each entry only knows the CLIENT's quirks (where its config file lives, whether it uses * `url`/`serverUrl`, `type: 'http'` vs `'streamableHttp'`, a `tools: ['*']` allowlist, …). */ /** A JSON value stored on a client's server entry. */ export type AgentPropValue = JsonNode; /** The properties written onto a client's server entry (the transport-specific shape). */ export type AgentProps = Record; /** One AI-agent MCP client. */ export interface AgentDefinition { /** Stable client id (`claude-code`, `cursor`, `codex`, …). */ readonly id: string; /** Human-readable client name. */ readonly name: string; /** Relative skills path for this client, or null when it has no skills directory. */ readonly skillsPath: string | null; /** Display string for the client's config file location. */ readonly configPathDisplay: string; /** Config file format. */ readonly configFormat: "json" | "toml"; /** The body path the server entry nests under (e.g. `mcpServers`, `servers`, `mcp`, `mcp_servers`). */ readonly bodyPath: string; /** * Whether this client can complete native MCP OAuth (RFC 9728) itself. `undefined`/`true` (the * default) means the config is credential-free — the client authorizes natively, so writing a * static `Authorization` header would both fail (hosted endpoint 401s a plugin token) and suppress * the client's own OAuth. `false` marks a client that cannot do MCP OAuth (it may receive a header * via the explicit PAT fallback). See design 03 Flow A / decision D11 / M7. */ readonly supportsOAuth?: boolean; /** Absolute config-file path for a project root (some clients ignore it — user-global config). */ getConfigPath(projectPath: string): string; /** Build the stdio server-entry props from the resolved server binary path + args vector. */ getStdioProps(serverPath: string, args: string[]): AgentProps; /** Build the http server-entry props from the (pinned) URL + optional auth headers. */ getHttpProps(url: string, headers: Record | undefined): AgentProps; /** Keys to strip from an existing entry when writing a stdio config. */ readonly stdioRemoveKeys: readonly string[]; /** Keys to strip from an existing entry when writing an http config. */ readonly httpRemoveKeys: readonly string[]; } /** Keys that identify the transport and are marked required-for-configuration by the setup-mcp policy. */ export declare const REQUIRED_PROP_KEYS: ReadonlySet; /** * The built-in AI-agent registry (ported from the CLIs; superset across the three). The stdio `args` * vector and the server-entry name are supplied by the adapter, so entries stay engine-neutral. */ export declare const agentRegistry: readonly AgentDefinition[]; /** Look up an agent by id. */ export declare function getAgentById(id: string): AgentDefinition | undefined; /** Every registered agent id. */ export declare function getAgentIds(): string[]; //# sourceMappingURL=agents-registry.d.ts.map