import type { DeliverHookPayload } from "#channel/types.js";
import { type DurableSessionState } from "#execution/durable-session-store.js";
export type RoutedDeliverResult = {
    readonly kind: "cancel-turn";
    readonly serializedContext: Record<string, unknown>;
    readonly sessionState: DurableSessionState;
} | {
    readonly kind: "continue";
    readonly remainder: DeliverHookPayload | undefined;
    readonly serializedContext: Record<string, unknown>;
    readonly sessionState: DurableSessionState;
};
/** Splits an envelope and validates task routes before forwarding descendant input. */
export declare function routeProxiedDeliverStep(input: {
    readonly delivery: DeliverHookPayload;
    readonly sessionWritable: WritableStream<Uint8Array>;
    readonly serializedContext?: Record<string, unknown>;
    readonly sessionState: DurableSessionState;
}): Promise<RoutedDeliverResult>;
