import { type PythonCmd } from "../../python.js"; export { findPython, type PythonCmd } from "../../python.js"; export interface BridgeError extends Error { trace?: string; } export declare class ResolveBridge { private child?; private pending; private buffer; private readyPromise?; private nextId; private bridgePath?; /** * The child process is dead when: * - we never spawned it, * - it exited naturally (exitCode !== null), * - or it was signalled (signalCode !== null). * * Node's ChildProcess exposes both fields directly so we don't keep a * parallel `dead` flag in sync — the standard idiom across real codebases * (mastra, openclaw, AFFiNE, midscene, paseo, takt, rivet) reads them * straight off the child. */ private isChildDead; /** * Start the bridge. Idempotent — subsequent calls return the same readiness * promise. After the bridge dies (Resolve quit, Python crash), the next * call respawns from scratch. */ ensureStarted(): Promise; private handshakeDone; private handleLine; /** * Send a method call to the bridge. Resolves with the `result` payload, * rejects with a BridgeError if the bridge reports `ok: false`. */ call(method: string, params?: Record, opts?: { signal?: AbortSignal; }): Promise; kill(): void; get scriptPath(): string | undefined; } /** * Build the env block the Python bridge needs. Sets RESOLVE_SCRIPT_API, * RESOLVE_SCRIPT_LIB, and prepends the Modules dir to PYTHONPATH if not * already configured. * * Honours pre-set env vars (so power users with custom installs aren't * overridden). */ export declare function resolveEnv(py?: PythonCmd): NodeJS.ProcessEnv; //# sourceMappingURL=bridge.d.ts.map