import createClient from "openapi-fetch";
import type { paths } from "./openapi_types.js";
type LocalTransportClient = ReturnType<typeof createClient<paths>>;
/**
 * Resolves the environment for the local transport child process, in priority order:
 *   1. NEOTOMA_ENV ("production" | "development") — set by bootstrap (`neotoma dev`/`prod`)
 *   2. NEOTOMA_SESSION_ENV ("prod" | "dev") — set by `--env` flag in runCli
 *   3. NEOTOMA_CLI_PREFERRED_ENV ("prod" | "dev") — inherited from parent session
 *   4. preferred_env in ~/.config/neotoma/config.json — sticky across invocations
 *   5a. Build-origin heuristic: dist/ builds are npm-installed end-user installs → production
 *   5b. Port inference from baseUrl (3180 → production, else development) — source-checkout fallback
 *
 * Exported for unit tests. Do NOT call port inference first — that is the bug this
 * function exists to prevent (silent dev/prod DB file split based on whichever API
 * happens to be running). dist/ builds default to production because an end user who
 * installed Neotoma via npm should never silently hit the development DB.
 */
export declare function resolveLocalTransportEnv(baseUrl?: string): "production" | "development";
export declare function getLocalTransportClient(options: {
    token?: string;
    baseUrl?: string;
}): Promise<LocalTransportClient>;
export declare function shutdownLocalTransport(): Promise<void>;
export {};
//# sourceMappingURL=local_transport.d.ts.map