import type { UserContent } from "ai";
import type { SessionAuthContext } from "#channel/types.js";
import type { MessageStreamEvent, SubagentCalledStreamEvent } from "#protocol/message.js";
import type { ChannelCors } from "#public/definitions/channel.js";
import { type EveChannelCors, type EveChannelCorsOptions, type EveChannelInput, type EveMessageContext, type EveMessageResult } from "#eve-channel/types.js";
export declare function healthResponse(): Response;
export declare function findRemoteSubagentBinding(input: {
    readonly callId: string;
    readonly childSessionId: string;
    readonly childStreamPath: string;
    readonly parentSessionId: string;
    readonly parent: {
        getEventStream(options?: {
            startIndex?: number;
        }): Promise<ReadableStream<MessageStreamEvent>>;
        getStreamTailIndex(): Promise<number>;
    };
}): Promise<SubagentCalledStreamEvent | undefined>;
export declare function normalizeEveCors(cors: EveChannelCors | undefined): ChannelCors;
export declare function normalizeEveCorsOrigin(origin: NonNullable<EveChannelCorsOptions["origin"]>): "*" | "null" | readonly string[];
interface OnMessageOutcome {
    readonly auth: SessionAuthContext | null;
    readonly context?: readonly string[];
    readonly title?: string;
}
export declare function resolveOnMessage(input: {
    readonly auth: SessionAuthContext | null;
    readonly config: EveChannelInput;
    readonly message: string | UserContent;
    readonly request: Request;
    readonly sessionId?: string;
}): Promise<OnMessageOutcome | Response>;
export declare function defaultOnMessage(ctx: EveMessageContext): EveMessageResult;
export {};
