/** * Wire validation for the `contextSnapshotBar` view: the Host validates the * view before it leaves the process, and the Client validates what it receives * over the transport. Branded ids are checked structurally here — a brand has * no runtime representation, so `z.custom` is the only validator that both * accepts a legitimately branded value and infers the branded type. * * @module dsh-context-snapshot-bar/shared/schema */ import { z } from 'zod'; import type { SessionSeq } from '@deepseek-ai/dsh-session/types'; import type { ToolCallId } from '@deepseek-ai/dsh-llm'; import type { BarState, BarView, ChangeView, CompressionView, NodeView, SectionView, SnapshotView, ToolCallView } from './types.js'; /** * A non-negative safe-integer event sequence, branded. * @returns a schema accepting a value the caller already holds as a {@link SessionSeq}. */ export declare function sessionSeqSchema(): z.ZodType; /** * A tool-call identifier string, branded. * @returns a schema accepting a value the caller already holds as a {@link ToolCallId}. */ export declare function toolCallIdSchema(): z.ZodType; /** Schema for {@link ToolCallView}. */ export declare const toolCallViewSchema: z.ZodType; /** Schema for {@link NodeView}. */ export declare const nodeViewSchema: z.ZodType; /** Schema for {@link SectionView}. */ export declare const sectionViewSchema: z.ZodType; /** Schema for {@link SnapshotView}. */ export declare const snapshotViewSchema: z.ZodType; /** Schema for {@link CompressionView}. */ export declare const compressionViewSchema: z.ZodType; /** Schema for {@link ChangeView}. */ export declare const changeViewSchema: z.ZodType; /** Schema for the complete {@link BarView} wire payload. */ export declare const barViewSchema: z.ZodType; /** * Validate persisted fold state before it seeds a fold. * * A cache row written under a different configuration fingerprint is rejected * here, which makes the registry discard it and replay the log instead of * extending text that the previous bounds truncated. * * @param fingerprint - the fingerprint of the configuration now loaded. * @returns a schema accepting exactly the state this configuration may resume. */ export declare function stateSchemaFor(fingerprint: string): z.ZodType; //# sourceMappingURL=schema.d.ts.map