/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { Event } from './event.js'; /** * A specialized Event type that represents a synthesized summary of past events. * This is used to compress session history without losing critical context. */ export interface CompactedEvent extends Event { /** * Identifies this event as a compacted event. */ readonly isCompacted: true; /** * The start time of the context that was compacted. */ startTime: number; /** * The end time of the context that was compacted. */ endTime: number; /** * The summarized content of the compacted events. */ compactedContent: string; /** * Identifies this compacted event as the persistent context scratchpad. */ isScratchpad?: boolean; } /** * Type guard to check if an event is a CompactedEvent. */ export declare function isCompactedEvent(event: Event): event is CompactedEvent; /** * Type guard to check if an event is a scratchpad CompactedEvent. */ export declare function isScratchpadEvent(event: Event): event is CompactedEvent & { isScratchpad: true; }; export declare function createCompactedEvent(params?: Partial): CompactedEvent;