import './assert_dev_env.js';
import type { AppSurfaceSpec } from '../http/surface.js';
import { type RpcEndpointsSuiteOption } from './rpc_helpers.js';
import type { BackendCapabilities } from './cross_backend/capabilities.js';
import type { SetupTest } from './cross_backend/setup.js';
import type { SessionOptions } from '../auth/session_cookie.js';
/** Options for `describe_rpc_round_trip_tests`. */
export interface RpcRoundTripTestOptions {
    /** Per-test fixture-producing function (per-describe cadence). */
    setup_test: SetupTest;
    /**
     * App surface (with route + RPC endpoint specs) for RPC endpoint
     * enumeration. Constructed in TS by the consumer; same shape for
     * in-process and cross-process tests.
     */
    surface_source: AppSurfaceSpec;
    /** Backend capability declarations. */
    capabilities: BackendCapabilities;
    /**
     * Session config — only needed to resolve factory-form `rpc_endpoints`
     * against a stub `AppServerContext` at setup time (the actions' input
     * schemas drive params generation; auth/dispatch run against the real
     * backend through `fixture.transport`).
     */
    session_options: SessionOptions<string>;
    /**
     * RPC endpoint specs — eager array or factory. The factory must return
     * the same endpoint `path` + `spec.method` list regardless of ctx
     * (invoked once at setup with a stub ctx; the real per-test live
     * dispatch goes through whatever the backend was started with).
     */
    rpc_endpoints: RpcEndpointsSuiteOption;
    /** Methods to skip, by name (e.g., `'zap_plan'`). */
    skip_methods?: Array<string>;
    /** Override generated params for specific methods (method name → params). */
    input_overrides?: Map<string, Record<string, unknown>>;
}
/**
 * Run schema-driven round-trip validation for RPC endpoints.
 *
 * For each method:
 * 1. Generate valid params from the action's input schema
 * 2. Fire a POST request with JSON-RPC envelope
 * 3. For `side_effects: false` methods, also fire a GET request
 * 4. Validate response is well-formed JSON-RPC; successful responses are
 *    also validated against the method's declared output schema
 *
 * Error responses (from missing DB state, etc.) are expected and validated
 * as well-formed JSON-RPC errors. Successful responses are validated against
 * `action.spec.output`. A `method not found` (-32601) error is the one
 * exception — it means the backend is missing a method the local surface
 * advertises, so the round-trip fails loud (`assert_method_implemented`)
 * rather than accepting it as a valid error envelope.
 */
export declare const describe_rpc_round_trip_tests: (options: RpcRoundTripTestOptions) => void;
//# sourceMappingURL=rpc_round_trip.d.ts.map