/**
 * @fileoverview Lint rules for Zod schema validation: type checking, `.describe()` presence,
 * and JSON Schema serializability.
 * Covers MCP spec rules T3-T5 and framework convention for field descriptions.
 * @module src/linter/rules/schema-rules
 */
import type { LintDiagnostic } from '../types.js';
/**
 * Checks that a schema is a ZodObject (required for tool inputSchema).
 * Spec: T3-T4 — inputSchema MUST be a JSON Schema object with type: "object".
 */
export declare function checkIsZodObject(schema: unknown, fieldName: string, definitionType: LintDiagnostic['definitionType'], definitionName: string): LintDiagnostic | null;
/**
 * Checks that all fields in a ZodObject have `.describe()` set, recursing into
 * nested objects, array element types, and union/discriminatedUnion variants.
 * Framework convention: every field the LLM reads should carry a description.
 *
 * Path syntax in diagnostic messages:
 *   - `.key` for object properties
 *   - `[]` for array element types
 *   - `|<i>` for union / discriminatedUnion variant at index i
 */
export declare function checkFieldDescriptions(schema: unknown, fieldName: string, definitionType: LintDiagnostic['definitionType'], definitionName: string): LintDiagnostic[];
/** Recursively strips optional/nullable/default/readonly/nonoptional wrappers. */
export declare function unwrapWrappers(field: unknown): unknown;
/** Unwrap optional/nullable/default and return the Zod 4 `_zod.def.type` discriminator. */
export declare function getCoreDefType(field: unknown): string | undefined;
/**
 * Checks that a Zod schema can be converted to JSON Schema.
 * The MCP SDK serializes schemas via `toJSONSchema()` when handling `tools/list`.
 * Types like `z.custom()`, `z.date()`, `z.transform()`, etc. throw at serialization
 * time, causing a hard runtime failure for any client that enumerates tools.
 */
export declare function checkSchemaSerializable(schema: unknown, fieldName: string, definitionType: LintDiagnostic['definitionType'], definitionName: string): LintDiagnostic | null;
/** Runtime check for ZodObject via Zod 4's `_zod.def.type`. */
export declare function isZodObject(value: unknown): boolean;
/** Reads a ZodObject's raw shape, defensively across Zod 4 / legacy internals. */
export declare function objectShape(schema: unknown): Record<string, unknown> | undefined;
/** Reads the top-level field names of a ZodObject, defensively across Zod 4 / legacy shapes. */
export declare function objectShapeKeys(schema: unknown): string[];
//# sourceMappingURL=schema-rules.d.ts.map