import { Stitch } from "../generated/src/stitch.js";
import { StitchToolClient } from "./client.js";
import { type StitchConfig } from "./spec/client.js";
/** Config surface accepted by getOrCreateClient — the full client config. */
export interface SingletonClientConfig {
    apiKey?: string;
    accessToken?: string;
    projectId?: string;
    baseUrl?: string;
    timeout?: number;
    retry?: StitchConfig["retry"];
    entityCache?: boolean;
}
/**
 * Get or create the shared StitchToolClient instance.
 *
 * The cache key is the RESOLVED config (explicit input merged over env),
 * so a bare call after the environment changed produces a fresh client,
 * while an identical resolved config reuses the cached one.
 */
export declare function getOrCreateClient(config?: SingletonClientConfig): StitchToolClient;
/**
 * Reset the shared singleton state: closes the cached client
 * (fire-and-forget) and clears the cached instances. Intended for tests
 * and for processes that need to rotate credentials explicitly.
 */
export declare function resetStitchSingleton(): void;
/**
 * Default Stitch instance using environment variables.
 * Lazily initialized on first METHOD INVOCATION (not property access).
 *
 * Exposes both domain methods (from Stitch class) and tool methods
 * (listTools, callTool, close from StitchToolClient).
 *
 * @example
 * import { stitch } from '@google/stitch-sdk';
 *
 * // Domain API
 * const projects = await stitch.projects();
 *
 * // Tool API
 * const tools = await stitch.listTools();
 * await stitch.callTool("create_project", { title: "My App" });
 */
export declare const stitch: Stitch & Pick<StitchToolClient, "listTools" | "callTool" | "close">;
//# sourceMappingURL=singleton.d.ts.map