import type { AgentProvider, AgentTimelineItem } from "./agent-sdk-types.js";
import type { AgentTimelineRow } from "./agent-manager.js";
export type TimelineProjectionMode = "canonical" | "projected";
export type TimelineSeqRange = {
    startSeq: number;
    endSeq: number;
};
export type TimelineProjectionKind = "assistant_merge" | "tool_lifecycle";
export type TimelineLimitDirection = "tail" | "before" | "after";
export type TimelineProjectionEntry = {
    provider: AgentProvider;
    item: AgentTimelineItem;
    timestamp: string;
    seqStart: number;
    seqEnd: number;
    sourceSeqRanges: TimelineSeqRange[];
    collapsed: TimelineProjectionKind[];
};
type ProjectedWindowSelection = {
    projectedEntries: TimelineProjectionEntry[];
    selectedRows: AgentTimelineRow[];
    minSeq: number | null;
    maxSeq: number | null;
};
export declare function projectTimelineRows(rows: readonly AgentTimelineRow[], provider: AgentProvider, mode: TimelineProjectionMode): TimelineProjectionEntry[];
/**
 * Select a timeline window based on projected-entry count, then map it back to
 * contiguous canonical rows. This avoids cutting through merged assistant
 * chunks when callers request canonical rows with a bounded limit.
 */
export declare function selectTimelineWindowByProjectedLimit(input: {
    rows: readonly AgentTimelineRow[];
    provider: AgentProvider;
    direction: TimelineLimitDirection;
    limit: number;
    collapseToolLifecycle?: boolean;
}): ProjectedWindowSelection;
export {};
//# sourceMappingURL=timeline-projection.d.ts.map