/** * Model-gated value strips — a pre-pass that runs at the top of the * `prepareArguments` override, before the validate-then-repair engine. * * Adapted from monotykamary/pi-tool-repair (MIT): its `stripAnchorBleedInPlace` * and `stripGrammarTokenLeaksInPlace`. Two differences from upstream: * - Anchor stripping skips regex-typed fields (the `grep.pattern` field), where * a leading `^` / trailing `$` may be intended regex syntax and is * indistinguishable from a bled anchor — so we never guess there. * - Strips are surfaced through this extension's repair-note / telemetry * machinery (a distinct rule id per strip) rather than debug stderr. * * Why a pre-pass and not an engine rule: the engine's rules fire on * schema-invalid input, but an anchor-bled string still validates as a string. * Strips transform input that is valid both before and after, so they run * ahead of the engine on their own trigger (a model gate), not on a validation * failure. See design decision D1. */ /** Model families that bleed regex anchors into generated values. */ export declare const ANCHOR_BLEED_MODELS: readonly RegExp[]; /** Model families that leak GLM-style grammar tokens into keys/values. */ export declare const GRAMMAR_LEAK_MODELS: readonly RegExp[]; /** * Regex-typed fields exempt from anchor stripping, keyed by tool. `grep.pattern` * is the only true regex field among the built-ins (`find.pattern` is a glob, * where anchors are never syntax, so it is *not* exempt). See D2 and * docs/research.md Claim 8. */ export declare const ANCHOR_STRIP_SKIP: Record>; export declare const STRIP_ANCHOR_RULE = "stripAnchorBleed"; export declare const STRIP_GRAMMAR_RULE = "stripGrammarTokenLeak"; export interface ValueStripResult { changed: boolean; /** Distinct rule identifier per strip that fired. */ rules: string[]; /** Model-facing notes for the repair-note channel. */ notes: string[]; } /** * Run the model-gated strips over a clone of `input`. Returns the (possibly * modified) clone plus a result describing what fired. When nothing fires, * `result.changed` is false and the original `input` reference is returned. */ export declare function stripValues(options: { toolName: string; input: unknown; modelId: string | undefined; }): { input: unknown; result: ValueStripResult; }; //# sourceMappingURL=value-strips.d.ts.map