import type { JSONSchema, JSONSchemaDefinition } from './schema-context';
import type { Ajv } from 'ajv';
export declare function clearRefCaches(): void;
/**
 * Resolve a $ref within the provided definition against the given root schema.
 * - Supports in-document JSON Pointer refs only (e.g. "#/$defs/Address").
 * - If siblings are present next to $ref, they are shallow-merged over the resolved target.
 * - Resolves chains of $ref until a non-$ref definition is reached or a cycle is detected.
 * - Memoized per root/definition identity.
 */
export declare function resolveRef(def: JSONSchema, root: JSONSchemaDefinition): JSONSchema;
/**
 * Resolve a $ref in a schema definition, supporting both in-document ("#...")
 * and external references (e.g., "https://example.com/schema#/$defs/Thing") when
 * an AJV instance is available. Sibling keywords next to $ref are shallow-merged
 * over the resolved target at each step. Cycles are detected and resolution stops.
 */
export declare function resolveAnyRef(def: JSONSchema, root: JSONSchemaDefinition, ajv: Ajv | undefined): JSONSchema;
