import { type HintMove } from './review-diff.js'; import type { McpServerRef, PinStore, PinnedServer, RulesetRef, ToolDef } from './types.js'; /** * `warden.lock.json` — reviewed tool definitions committed next to the MCP config. * * The lock is the pull-request form of a pin. Whoever adds or changes a server * runs `scan --update-lock`; the diff of this file is what reviewers read — the * tool descriptions that will reach the model, not just the command line. CI then * runs `scan --lock` and fails when the config starts a server the lock does not * know, starts it differently, or the server now advertises different tools. * * Stored entries are ordinary {@link PinnedServer} records (plus the MTL/1 digest * HISTOR keys tool sets by), so the same {@link PinningGate} decides drift for * `wrap` and for `scan`. */ export declare const LOCK_VERSION = 1; export interface LockEntry extends PinnedServer { /** MTL/1 digest (HISTOR's key); absent when the set has no MTL/1 form. */ mtlDigest?: string; } export interface LockFile { lockfileVersion: number; generatedBy: string; ruleset: RulesetRef; servers: Record; } export declare class LockStore implements PinStore { readonly entries: Map; constructor(entries?: Record); getPin(id: string): Promise; putPin(): Promise; } /** Read a lock. A missing file is an empty lock; a malformed one is an error, never "empty". */ export declare function readLock(path: string): Promise; /** Recursively sort object keys so the committed file diffs line by line, not reorder by reorder. */ export declare function sortKeys(value: unknown): unknown; export declare function lockEntryFor(server: McpServerRef, tools: ToolDef[], mtlDigest: string | undefined, previous: LockEntry | undefined, now: string): LockEntry; export declare function writeLock(path: string, lock: LockFile): Promise; export interface ToolChange { tool: string; kind: 'added' | 'removed' | 'changed'; before?: ToolDef; after?: ToolDef; hints?: HintMove[]; } /** What changed between the reviewed tools and the ones served now, tool by tool. */ export declare function diffTools(before: readonly ToolDef[] | undefined, after: readonly ToolDef[]): ToolChange[]; //# sourceMappingURL=scan-lock.d.ts.map