/** * Plugin configuration: the deployment-varying bounds on how much context the * two cards carry, plus the fingerprint that isolates the projection cache * across config changes. Every field is validated here at plugin load; a value * outside its range fails the load rather than silently clamping. * * @module dsh-context-snapshot-bar/shared/config */ import { z } from 'zod'; /** The complete plugin configuration with every default resolved. */ export interface Config { /** Maximum number of surface nodes the Client receives. */ visibleNodeLimit: number; /** Maximum characters of one node's text excerpt. */ excerptChars: number; /** Maximum characters of one tool call's serialized arguments. */ toolArgsChars: number; /** Maximum number of replaced nodes kept in the compression comparison. */ comparisonNodeLimit: number; /** Maximum characters of snapshot text kept per contribution. */ snapshotPreviewChars: number; /** Maximum number of snapshot contributions the Client receives. */ snapshotSectionLimit: number; /** Whether the snapshot card may ask the Host for a model-written digest. */ snapshotSummaryEnabled: boolean; /** Provider route the digest call uses; empty leaves the digest unavailable. */ snapshotSummaryProvider: string; /** Model id the digest call uses; empty leaves the digest unavailable. */ snapshotSummaryModel: string; /** Output-token cap for one digest call. */ snapshotSummaryMaxTokens: number; /** End-to-end deadline for one digest call, in milliseconds. */ snapshotSummaryTimeoutMs: number; } /** * Validate untrusted configuration against the declared ranges. * * Called only while the plugin loads; the plugin never re-validates config it * has already resolved. * * @param input - the `config` object Cordis read from the composition, or undefined for all defaults. * @returns the configuration with every default filled in. * @throws {Error} when a supplied field is out of range or not an integer. */ export declare function resolveConfig(input: unknown): Config; /** * Fingerprint the resolved configuration for cache isolation. * * The projection's persisted state is only reusable while it was folded under * the same bounds: a changed excerpt length would otherwise resume computing * from text truncated by the previous configuration. * * @param config - the resolved configuration. * @returns a stable string that differs whenever any bound differs. */ export declare function configFingerprint(config: Config): string; /** Schema for the Cordis `config` field; validation errors fail the plugin load. */ export declare const ConfigSchema: z.ZodObject<{ visibleNodeLimit: z.ZodDefault; excerptChars: z.ZodDefault; toolArgsChars: z.ZodDefault; comparisonNodeLimit: z.ZodDefault; snapshotPreviewChars: z.ZodDefault; snapshotSectionLimit: z.ZodDefault; snapshotSummaryEnabled: z.ZodDefault; snapshotSummaryProvider: z.ZodDefault; snapshotSummaryModel: z.ZodDefault; snapshotSummaryMaxTokens: z.ZodDefault; snapshotSummaryTimeoutMs: z.ZodDefault; }, z.core.$strip>; //# sourceMappingURL=config.d.ts.map