export declare const SCOPE_RENDER: { readonly REQUEST_RESPONSE: "request-response"; readonly RESPONSE_ONLY: "response-only"; readonly REQUEST_ONLY: "request-only"; }; export type ScopeRenderMode = (typeof SCOPE_RENDER)[keyof typeof SCOPE_RENDER]; export declare const SCOPE_ALL = "all"; export declare const SCOPE_ALL_ALIAS = "*"; /** * A slice of the transcript, as a pair of indexes over its conversation rows. Both ends are * inclusive and zero-based, and a negative index counts from the end — `-1` is the last row. * Mirrors Core's `SessionScopeRange`. */ export type ScopeRange = { from: number; to: number; }; export type ScopeMessageSelector = typeof SCOPE_ALL | typeof SCOPE_ALL_ALIAS | ScopeRange; /** * A range as a pair of real positions in a list of `length` rows: negatives taken from the end, * everything clamped inside, and the two ends ordered — so a range written backwards, or reaching * past either end, still names a slice that exists. */ export declare const resolveRange: (range: ScopeRange, length: number) => { start: number; end: number; }; export type WidgetScope = { messages?: ScopeMessageSelector; render?: ScopeRenderMode; }; export declare const SCOPE_UNAVAILABLE_REASON: { readonly INVALID_SELECTOR: "invalid-selector"; readonly INVALID_RENDER: "invalid-render"; readonly EMPTY_SESSION: "empty-session"; }; export type ScopeUnavailableReason = (typeof SCOPE_UNAVAILABLE_REASON)[keyof typeof SCOPE_UNAVAILABLE_REASON]; export type ScopeResolution = { kind: 'all'; } | { kind: 'visible'; visible: ReadonlySet; } | { kind: 'unavailable'; reason: ScopeUnavailableReason; keepVisible: ReadonlySet; }; type ScopedMessage = { type?: string; }; export declare function isScopeConfigured(scope: WidgetScope | undefined): boolean; export declare function groupIntoExchanges(messages: readonly ScopedMessage[]): number[][]; export declare function resolveScope(messages: readonly ScopedMessage[] | undefined, scope: WidgetScope | undefined): ScopeResolution; export declare function isIndexVisible(resolution: ScopeResolution, index: number): boolean; export {};