import { z } from "zod";
import type { MCPServerConfig } from "./types.js";
/**
 * Where a server config lives. We collapse Claude Code's three scopes
 * (local/project/user) into two:
 * - "global"  → ~/.gg/mcp.json   (all GG Coder sessions)
 * - "project" → ./.gg/mcp.json   (the current project root)
 */
export type MCPScope = "global" | "project";
/**
 * On-disk entry shape. Accepts both Claude's `.mcp.json` fields
 * (`type`, `url`, `headers`, `command`, `args`, `env`, `timeout`) and our
 * extra (`enabled`) so configs are portable in both directions.
 */
declare const StoredServerEntrySchema: z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        http: "http";
        sse: "sse";
        stdio: "stdio";
        "streamable-http": "streamable-http";
    }>>;
    url: z.ZodOptional<z.ZodString>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    command: z.ZodOptional<z.ZodString>;
    args: z.ZodOptional<z.ZodArray<z.ZodString>>;
    env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    timeout: z.ZodOptional<z.ZodNumber>;
    enabled: z.ZodOptional<z.ZodBoolean>;
}, z.core.$loose>;
export type StoredServerEntry = z.infer<typeof StoredServerEntrySchema>;
declare const McpFileSchema: z.ZodObject<{
    mcpServers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        type: z.ZodOptional<z.ZodEnum<{
            http: "http";
            sse: "sse";
            stdio: "stdio";
            "streamable-http": "streamable-http";
        }>>;
        url: z.ZodOptional<z.ZodString>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        command: z.ZodOptional<z.ZodString>;
        args: z.ZodOptional<z.ZodArray<z.ZodString>>;
        env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        timeout: z.ZodOptional<z.ZodNumber>;
        enabled: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$loose>>>;
}, z.core.$strip>;
export type McpFile = z.infer<typeof McpFileSchema>;
/** A loaded server config paired with the scope it came from. */
export interface ScopedServer {
    config: MCPServerConfig;
    scope: MCPScope;
}
export declare function globalMcpPath(): string;
export declare function projectMcpPath(cwd: string): string;
/** Map an on-disk entry to a runtime MCPServerConfig. */
export declare function fromStoredEntry(name: string, entry: StoredServerEntry): MCPServerConfig;
/** Map a runtime MCPServerConfig to the on-disk (Claude-compatible) entry. */
export declare function toStoredEntry(config: MCPServerConfig): StoredServerEntry;
/**
 * Load servers from both scopes. Project wins on name collision (global entries
 * whose name also exists in project are dropped). Each result carries its scope.
 */
export declare function loadServers(cwd: string): Promise<ScopedServer[]>;
/**
 * Add (or overwrite) a server in the target scope's file. Rejects a duplicate
 * name within the same scope unless `overwrite` is true.
 */
export declare function addServer(entry: MCPServerConfig, scope: MCPScope, cwd: string, overwrite?: boolean): Promise<{
    ok: true;
} | {
    ok: false;
    error: string;
}>;
/** Remove a server from a scope. Returns true if it existed. */
export declare function removeServer(name: string, scope: MCPScope, cwd: string): Promise<boolean>;
/** Look up a single server across both scopes (project wins). */
export declare function getServer(name: string, cwd: string): Promise<ScopedServer | undefined>;
export {};
//# sourceMappingURL=store.d.ts.map