import type { DeliverHookPayload } from "#channel/types.js"; import { type DurableSessionState } from "#execution/durable-session-store.js"; import { type SessionStepState } from "#execution/publish-session-events.js"; import { type WithSessionStateDelta } from "#execution/session/state-delta.js"; export type RoutedDeliverResult = { readonly kind: "cancel-turn"; readonly serializedContext: Record; readonly sessionState: DurableSessionState; } | { readonly kind: "continue"; readonly remainder: DeliverHookPayload | undefined; readonly serializedContext: Record; readonly sessionState: DurableSessionState; }; /** * Splits an envelope and forwards descendant input to the child that asked for * it. This session relayed each forwarded request's `input.requested`, so it * also relays their `input.resolved` once the answers are on their way down. */ export declare function routeProxiedDeliverStep(input: SessionStepState & { readonly delivery: DeliverHookPayload; }): Promise>; /** * Maps a delivery's channel-specific answers to the requests a held turn waits * on, so the turn can tell they answer it. Returns the mapped delivery, or * `undefined` when the channel maps none of them to one of `requestIds`. */ export declare function mapHeldInputResponsesStep(input: SessionStepState & { readonly delivery: DeliverHookPayload; readonly requestIds: readonly string[]; }): Promise>;