/** * Projection assembly: binds the plugin's configuration to the pure fold and * view functions and publishes them under the plugin's projection key. * * @module dsh-context-snapshot-bar/projection */ import type { ProjectionDefinition } from '@deepseek-ai/dsh-session-projection'; import type { BarState } from '../shared/types.js'; import { type Config } from '../shared/config.js'; /** The projection key this plugin owns; the Client reads the same key. */ export declare const PROJECTION_KEY = "contextSnapshotBar"; /** * Assemble the projection definition for one resolved configuration. * * Every callback the registry drives is total, because the registry's eager * `drive` calls `apply` and `wire.view` without a guard of its own: a fold that * threw would escape into the Session append that committed the event and * disturb a running turn. A fault therefore returns the state it was given, or * the empty view, and reports once rather than on every event. * * @param config - the resolved plugin configuration. * @param report - sink for the first fault; defaults to the host console. * @returns the definition to register with the session-projection registry. */ /** The definition shape this plugin registers: the wire view is always present. */ export type BarProjectionDefinition = ProjectionDefinition<'contextSnapshotBar', BarState> & { wire: NonNullable['wire']>; }; /** Sink for the first fault a projection reports. */ export type ProjectionFaultReporter = (error: unknown) => void; export declare function createProjection(config: Config, report?: ProjectionFaultReporter): BarProjectionDefinition; //# sourceMappingURL=index.d.ts.map