/** * Which JSON Schema a driver may mark as strictly validated. * * Strict tool input is not "JSON Schema, enforced" — it is a SUBSET of JSON * Schema, and a keyword outside that subset does not degrade. The vendor * rejects the entire request, so one unexpressible field in one tool takes down * every tool in the call and the turn dies before a single token is produced. * * This exists because that happened. A tool declared its integer-or-`"end"` * field as `oneOf`, which is outside the subset while its synonym `anyOf` is * inside it, and the driver marked the tool strict without ever asking whether * the schema it was vouching for could be said in that dialect. Measured * against the live API: strict + `oneOf` is a 400, strict + `anyOf` is * accepted, and non-strict + `oneOf` is accepted. * * That last row is why nothing caught it. Neither half is wrong on its own — * the schema is valid JSON Schema and the strict decision is correct policy — * so no test of either one fails. Only the pairing does, and the pairing had no * owner until this function. * * The check is cheap and runs where the pairing is made, which is the only * place both facts are in hand. */ export interface StrictSchemaViolation { /** Dotted path to the offending keyword, e.g. `properties.insertLine.oneOf`. */ readonly path: string; readonly keyword: string; /** What to write instead. */ readonly remedy: string; } /** * Every place a schema leaves the strict subset, with its exact path. * * The path is the point. The vendor's own error names the tool and the * keyword but not where inside the schema it sits, which on a schema of any * size is the difference between a glance and an afternoon. */ export declare function findStrictSchemaViolations(schema: unknown, path?: string): StrictSchemaViolation[]; /** * Refuse a schema the driver is about to vouch for and cannot. * * Refusing here rather than dropping `strict` quietly: a caller who set * `enforceModelInput` asked for the guarantee, and silently not providing it * is the failure this repo names `refuse, do not degrade`. The alternative * costs a turn and teaches nothing — the vendor's 400 arrives with the tool * name and the keyword, but not the path, and not the fix. */ export declare function assertStrictSchema(toolName: string, schema: unknown): void; //# sourceMappingURL=strict-schema.d.ts.map