import * as Transport from '../../../server/Transport.js';
import * as ChannelStore from '../../session/ChannelStore.js';
import * as Sse_core from '../../session/Sse.js';
import type { SessionReceipt } from '../../session/Types.js';
declare const prepaidSessionTick: unique symbol;
/** SSE transport with Tempo session controller. */
export type Sse = Transport.Sse<Sse_core.SessionController>;
export type PrepaidSessionReceipt = SessionReceipt & {
    [prepaidSessionTick]?: true | undefined;
};
export declare function markPrepaidSessionTick(receipt: SessionReceipt): SessionReceipt;
/**
 * Creates a Tempo-metered SSE transport.
 *
 * Wraps an HTTP transport with:
 * - Context capture from credentials (channelId, tickCost)
 * - Per-token charging via Sse.serve for generator/iterable responses
 * - Auto-detection of upstream SSE responses
 * - Fallback to standard HTTP receipt handling for plain Response
 */
export declare function sse(options: sse.Options & {
    store: ChannelStore.ChannelStore;
}): Sse;
export declare namespace sse {
    type Options = {
        /**
         * When true, the charge loop uses polling instead of `waitForUpdate()`.
         *
         * Required for runtimes like Cloudflare Workers where resolving promises
         * across request contexts is not supported. Without this flag, a mid-stream
         * voucher POST (Request B) would resolve a waiter created in the streaming
         * request context (Request A), causing a Workers error.
         *
         * @default false
         */
        poll?: boolean | undefined;
        /** Polling interval (in milliseconds). @default 10 */
        pollingInterval?: number | undefined;
    };
}
/** Default SSE serve: iterates values and emits `event: message` per value. */
export declare function defaultServe(options: {
    generate: AsyncIterable<string> | ((...args: any[]) => AsyncIterable<string>);
    challengeId: string;
}): Response;
export {};
//# sourceMappingURL=transport.d.ts.map