/** * Schema compatibility audits. * * Each provider has a different idea of what JSON Schema features it accepts * for tool definitions. The normalizers in `normalize.ts`, `strict-mode`, * and `adapt.ts` rewrite incoming schemas to fit. This module is the * *audit* counterpart: it walks a (presumably already-sanitized) schema and * reports any feature the target provider would reject. Tests use it to lock * down the contract; the runtime uses it to fail-open with diagnostic logs * rather than silently shipping a broken tool definition. */ export type SchemaCompatibilityProvider = "openai-strict" | "google" | "cloud-code-assist-claude"; export interface SchemaCompatibilityViolation { path: string; rule: string; message: string; key?: string; value?: unknown; } export interface SchemaCompatibilityResult { provider: SchemaCompatibilityProvider; compatible: boolean; violations: SchemaCompatibilityViolation[]; } export interface StrictSchemaEnforcementResult { schema: Record; strict: boolean; } export declare function validateSchemaCompatibility(schema: unknown, provider: SchemaCompatibilityProvider): SchemaCompatibilityResult; export declare function validateStrictSchemaEnforcement(originalSchema: Record, result: StrictSchemaEnforcementResult): SchemaCompatibilityResult;