/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { Event } from '../events/event.js'; /** * Filters the events to return only the active events since the latest compaction. * If no compaction has occurred, returns all events. * * @param events The full history of events. * @returns The active events, starting with the latest CompactedEvent if present. */ export declare function getActiveEvents(events: Event[]): Event[]; /** * Determines the baseline index to retain from active raw events, * ensuring we don't split between a function call and its response. * * @param rawEvents The active raw events to consider for compaction. * @param eventRetentionSize The minimum number of raw events to keep at the end of the session. * @returns The index in `rawEvents` at which to split. Events before this index will be compacted. */ export declare function calculateRetainStartIndex(rawEvents: Event[], eventRetentionSize: number): number;