/** * The projection's fold: pure, synchronous, and driven by committed Session * events. The state is plain JSON so the projection cache can persist it, and * every path returns the same state reference for an event the plugin does not * care about, which is what keeps the projection drive from publishing on * unrelated traffic. * * @module dsh-context-snapshot-bar/projection/state */ import type { SessionEvent } from '@deepseek-ai/dsh-session/types'; import type { BarState } from '../shared/types.ts'; import { type Config } from '../shared/config.ts'; /** The state for an empty Session log. */ export declare function initialState(config: Config): BarState; /** * Fold one committed Session event into the projection state. * * @param state - the state covering every earlier event. * @param event - the next committed Session event. * @param config - the resolved plugin configuration. * @returns the next state, or the same reference when this event changes nothing the plugin shows. */ export declare function reduceEvent(state: BarState, event: SessionEvent, config: Config): BarState; /** * Whether a recorded snapshot seq still occupies a current surface position. * @param state - the state covering every committed event. * @returns true when the snapshot's own event is still in the surface. */ export declare function snapshotStillOnSurface(state: BarState): boolean; //# sourceMappingURL=state.d.ts.map