/** Marker field tagged onto every Lisa-owned MCP server entry. */
export declare const LISA_MANAGED_MARKER: "_lisaManaged";
/**
 * Where agy reads user-scope MCP config (shared with Antigravity desktop).
 * @returns Absolute path to `~/.gemini/config/mcp_config.json`.
 */
export declare function defaultUserMcpConfigPath(): string;
/**
 * Project-scope MCP config path. NOTE: the agy CLI does NOT auto-load this path
 * (only the user-global file is read — ticket-1054); kept for callers/tools
 * that target a per-workspace file directly. `lisa apply` uses user scope.
 * @param destDir - Absolute path to the host project root.
 * @returns Absolute path to `<destDir>/.agents/mcp_config.json`.
 */
export declare function defaultProjectMcpConfigPath(destDir: string): string;
/** MCP config scope: per-project workspace file or the shared user file. */
export type AgyMcpScope = "project" | "user";
/**
 * Resolve the agy MCP config path for a given scope.
 *
 * `lisa apply` uses `scope: "user"` because the agy CLI only auto-loads the
 * user-global `~/.gemini/config/mcp_config.json` (the project-scope file is
 * never read — ticket-1054). The `"project"` scope remains available for
 * callers that explicitly want a per-workspace file, but it is NOT what the agy
 * CLI consumes. The default stays `"project"` for backward compatibility of
 * this pure resolver; `processAgyEmit` passes `"user"` explicitly.
 * @param opts - Scope selector and (for project scope) the host project root.
 * @param opts.scope - `"project"` (default) or `"user"`.
 * @param opts.destDir - Host project root; required for project scope.
 * @returns Absolute path to the mcp_config.json for the requested scope.
 */
export declare function resolveAgyMcpConfigPath(opts: {
    readonly scope?: AgyMcpScope;
    readonly destDir?: string;
}): string;
/** A single MCP server entry in agy's mcp_config.json schema. */
export interface AgyMcpServerEntry {
    /** stdio: command to launch. Mutually exclusive with serverUrl. */
    readonly command?: string;
    readonly args?: readonly string[];
    readonly env?: Readonly<Record<string, string>>;
    /** HTTP transport: agy-specific key (NOT `url`). */
    readonly serverUrl?: string;
    readonly headers?: Readonly<Record<string, string>>;
    /** Lisa ownership marker; only present on Lisa-managed entries. */
    readonly [LISA_MANAGED_MARKER]?: boolean;
}
/** Top-level mcp_config.json shape. */
export interface AgyMcpConfig {
    readonly mcpServers?: Readonly<Record<string, AgyMcpServerEntry>>;
}
/** Input MCP server entry in Claude/Codex shape, before agy translation. */
export interface ClaudeMcpServerEntry {
    /** stdio command. */
    readonly command?: string;
    readonly args?: readonly string[];
    readonly env?: Readonly<Record<string, string>>;
    /** Claude/Codex HTTP shape: `{type:"http", url:"..."}`. */
    readonly type?: "stdio" | "http" | "sse";
    readonly url?: string;
    readonly headers?: Readonly<Record<string, string>>;
}
/**
 * Translate a Claude/Codex-shape MCP entry to agy's shape.
 *
 * Rules:
 *   - stdio entries: pass through `command`/`args`/`env` unchanged.
 *   - http entries: rename `url` → `serverUrl`, drop the `type` field, keep
 *     `headers` if present.
 *   - sse entries: agy SSE support is unverified at the schema level; pass
 *     through `serverUrl` and headers for parity with HTTP. Caller should
 *     verify before relying on SSE on agy.
 *
 * The Lisa-managed marker is attached at write time, not in this pure transform.
 * @param input Claude/Codex-format MCP server entry.
 * @returns agy-format MCP server entry.
 */
export declare function translateMcpEntryToAgy(input: ClaudeMcpServerEntry): AgyMcpServerEntry;
/**
 * Collect Lisa's MCP servers from the built plugin `.mcp.json` files (base plus
 * each detected stack), returning the merged Claude/Codex-shape server map.
 *
 * agy ignores plugin-bundled MCP, so `processAgyEmit` reads these files and
 * installs the result into agy's aggregate `mcp_config.json` via
 * `installAgyMcpConfig` (which translates `url` → `serverUrl`). Shallow-merged
 * base-first, so a later stack overrides the base on a name collision.
 * @param pluginRoot - Absolute path to the `plugins/` directory.
 * @param detectedTypes - Detected project types (e.g. `["expo"]`).
 * @returns Merged map of server name → Claude/Codex-shape entry (`{}` if none).
 */
export declare function collectLisaMcpServers(pluginRoot: string, detectedTypes: readonly string[]): Record<string, ClaudeMcpServerEntry>;
/** Result of the agy MCP install pass. */
export interface AgyMcpInstallResult {
    /** Absolute path written. */
    readonly path: string;
    /** Number of Lisa-managed entries written. */
    readonly lisaEntryCount: number;
    /** Number of host-authored entries preserved. */
    readonly hostEntryCount: number;
}
/**
 * Install Lisa's MCP servers into agy's mcp_config.json using tagged-merge.
 *
 * Tagged-merge rules:
 *   1. Read existing mcpServers (if any).
 *   2. Strip every entry where `_lisaManaged === true`.
 *   3. Add Lisa's entries with `_lisaManaged: true` attached.
 *   4. Host entries (no marker) are preserved verbatim.
 *
 * The target path defaults to `~/.gemini/config/mcp_config.json`. Pass
 * `targetPath` to override (e.g. for the project-level `.agents/mcp_config.json`).
 * @param lisaMcpServers - Lisa's MCP servers in Claude/Codex shape, keyed by
 *   server name.
 * @param targetPath - Absolute path to the mcp_config.json file. Defaults to
 *   the user-level path.
 * @returns Result with the path written and entry counts.
 */
export declare function installAgyMcpConfig(lisaMcpServers: Readonly<Record<string, ClaudeMcpServerEntry>>, targetPath?: string): Promise<AgyMcpInstallResult>;
//# sourceMappingURL=mcp-installer.d.ts.map