import type { DeliverPayload, SubagentInputRequestHookPayload } from "#channel/types.js";
import type { HarnessEmitFn, HarnessSession, SessionStateMap } from "#harness/types.js";
import type { RunMode } from "#shared/run-mode.js";
import type { InputResponse } from "#runtime/input/types.js";
/**
 * Runs the parent-side work for a `subagent-input-request`. Conversation
 * mode emits a waiting boundary on the parent stream; the returned proxy
 * entries route the eventual response back down to the child.
 */
export declare function emitProxiedInputRequest(input: {
    readonly emit: HarnessEmitFn;
    readonly hookPayload: SubagentInputRequestHookPayload;
    readonly mode: RunMode;
    readonly session: HarnessSession;
}): Promise<{
    readonly entries: readonly (readonly [requestId: string, childContinuationToken: string])[];
    readonly session: HarnessSession;
}>;
/**
 * Outcome of splitting one deliver payload by the session's proxy map.
 * `forSelf` is the parent-local remainder (or `undefined` when fully
 * routed); `forChildren` carries one entry per descendant token.
 */
export interface RoutedDeliverPayload {
    readonly forChildren: readonly {
        readonly childContinuationToken: string;
        readonly payload: {
            readonly inputResponses: readonly InputResponse[];
        };
    }[];
    readonly forSelf: DeliverPayload | undefined;
}
/** Splits a deliver payload into parent-local and proxied-child buckets. */
export declare function routeDeliverPayload(input: {
    readonly payload: DeliverPayload;
    readonly state: SessionStateMap | undefined;
}): RoutedDeliverPayload;
