import { type Capacity } from '../backend-contract/primitives.js'; import type { OverflowPolicy } from '../backend-contract/streams.js'; import type { PublicStreamOverflowPolicy } from './streams.js'; export type StreamPreset = 'latest' | 'balanced' | 'lossless-bounded' | 'custom'; export interface CustomStreamBudget { readonly itemCapacity: number; readonly byteCapacity: number; readonly reservedControlCapacity?: number; readonly overflowPolicy?: PublicStreamOverflowPolicy; } export type StreamPolicy = Exclude | { readonly preset: 'custom'; readonly budget: CustomStreamBudget; }; export interface StreamBudget { readonly itemCapacity: Capacity; readonly byteCapacity: Capacity; readonly reservedControlCapacity: Capacity; readonly overflowPolicy: OverflowPolicy; } export interface StreamPresetInput { readonly preset?: StreamPreset; readonly custom?: Partial & { readonly overflowPolicy?: PublicStreamOverflowPolicy; }; } /** * Maps a public stream preset to exact bounded capacities. * * - `latest`: UI/status where newest value matters (bounded drop-oldest) * - `balanced`: normal scan/sensor notifications (bounded drop-oldest with visible notice) * - `lossless-bounded`: command/response that must fail rather than drop (terminal overflow) * - `custom`: caller-supplied budgets through `StreamPolicy` */ export declare function resolveStreamPreset(input?: StreamPresetInput): StreamBudget; export declare function resolveStreamPolicy(policy?: StreamPolicy): StreamBudget; export declare const STREAM_PRESET_DEFAULTS: Readonly<{ scan: StreamPreset; notification: StreamPreset; indication: StreamPreset; }>; //# sourceMappingURL=stream-presets.d.ts.map