import type { DurableSessionState } from "#execution/durable-session-store.js";
import type { TaskAgentRequestDelivery } from "#tasks/types.js";
export interface AgentRequestDelivery {
    readonly accumulateUsage?: boolean;
    readonly ownerId: string;
    readonly replyTo: TaskAgentRequestDelivery["replyTo"];
    readonly request: TaskAgentRequestDelivery["request"];
    readonly taskId?: string;
}
export interface TaskAgentRequestContext {
    readonly parentWritable: WritableStream<Uint8Array>;
    readonly serializedContext: Record<string, unknown>;
    readonly sessionState: DurableSessionState;
}
export interface AppliedTaskAgentRequest {
    readonly serializedContext: Record<string, unknown>;
    readonly sessionState: DurableSessionState;
}
/**
 * Applies one workflow-owned agent request to the parent session: `agent-invoke`
 * spawns the child with parent-owned material and `agent-settled` releases the
 * handle. Child authorization and HITL ride their own task envelope arms.
 */
export declare function applyTaskAgentRequest(delivery: AgentRequestDelivery, ctx: TaskAgentRequestContext): Promise<AppliedTaskAgentRequest>;
