/**
 * Pure helper: convert new {@link AgentMessage} rows into
 * {@link AgentMessageStreamEvent} entries for the SSE pipeline (spec 093,
 * research decision 2).
 *
 * Mirrors the existing computeFeatureDeltas / computePrDeltas / computeStatusDeltas
 * shape: caller owns the cache, helper is pure beyond mutating that cache,
 * never queries repositories. The cache tracks both a high-water mark
 * (`lastSeenAt`) AND a small `deliveredIds` set so we are robust to
 * duplicate ids returned within the same `since` cursor window (e.g. a
 * sub-millisecond burst of messages with identical createdAt timestamps).
 */
import type { AgentMessage } from '../../../../domain/generated/output.js';
import type { StreamedAgentEvent } from './stream-agent-events.types.js';
/** Per-connection cached state for the agent-message stream. */
export interface CachedAgentMessageState {
    /** High-water mark — millis of the most-recent message we emitted. */
    lastSeenAt: number;
    /** Ids already emitted (bounded set; trimmed by the use case if needed). */
    deliveredIds: Set<string>;
}
export interface ComputeMessageDeltasArgs {
    /** Messages returned by IAgentMessageBus.listFor for the current scope. */
    messages: AgentMessage[];
    cache: CachedAgentMessageState;
}
export declare function computeMessageDeltas(args: ComputeMessageDeltasArgs): StreamedAgentEvent[];
//# sourceMappingURL=compute-message-deltas.d.ts.map