/**
 * Pure handler functions — the "business logic" behind every wire-protocol
 * method. The HTTP server (`server.ts`) and the stdio RPC (`rpc.ts`) both
 * call these. Tests call these directly without spinning a server.
 *
 * Each handler:
 *   - Takes a parsed request (already Zod-validated by the transport).
 *   - Returns a result that matches the response schema.
 *   - Throws `WireError` for caller-fixable errors (404, 400, 422).
 *   - Lets unexpected errors bubble — the transport maps them to 500.
 */
import type { FeedbackTrajectoryStore } from '../feedback-trajectory';
import type { TraceStore } from '../trace/store';
import { type FeedbackIngestResponse, type JudgeRequest, type JudgeResult, type ListRubricsResponse, type TracesIngestRequest, type TracesIngestResponse, type VersionResponse, type FeedbackTrajectory as WireFeedbackTrajectory } from './schemas';
/** Caller-fixable error. The transport renders this to 4xx + ErrorResponse. */
export declare class WireError extends Error {
    readonly code: string;
    readonly status: number;
    readonly details?: unknown | undefined;
    constructor(code: string, message: string, status?: number, details?: unknown | undefined);
}
export declare function handleJudge(req: JudgeRequest): Promise<JudgeResult>;
export declare function handleListRubrics(): ListRubricsResponse;
export declare function handleVersion(): VersionResponse;
/**
 * Pluggable stores the wire layer routes ingestion writes into. Both
 * are optional — when omitted, the corresponding endpoint returns 503.
 *
 * Production deployments wire a `FileSystemTraceStore` and
 * `FileSystemFeedbackTrajectoryStore` here. Tests substitute in-memory
 * stores.
 */
export interface IngestionStores {
    traceStore?: TraceStore;
    feedbackStore?: FeedbackTrajectoryStore;
}
/**
 * `POST /v1/traces/ingest` — accept a batch of `TraceEvent`s from the
 * production runtime. Best-effort: each event is appended independently;
 * one bad event does not poison the batch.
 *
 * Idempotency: the underlying store is append-only; consumers retrying
 * the same payload will get duplicate events. Consumers should
 * de-duplicate by `eventId` downstream — production traces frequently
 * land via at-least-once buses (Kafka, SQS) where dedup is unavoidable.
 */
export declare function handleTracesIngest(req: TracesIngestRequest, stores: IngestionStores): Promise<TracesIngestResponse>;
/**
 * `POST /v1/feedback` — accept a single `FeedbackTrajectory` from the
 * production runtime. Idempotent on `id`: re-posting the same trajectory
 * replaces the prior record.
 */
export declare function handleFeedbackIngest(req: WireFeedbackTrajectory, stores: IngestionStores): Promise<FeedbackIngestResponse>;
//# sourceMappingURL=handlers.d.ts.map