/** * Derive a {@link PersistedSchemaEnvelope} from a Standard Schema v1 * validator. Supports zod 3 (via the optional `zod-to-json-schema` peer-dep) * and zod 4 (via its native `z.toJSONSchema()`); both are loaded lazily so * hub never statically imports zod. Other validator families write a stub * envelope flagging the kind. * * @see docs/superpowers/specs/2026-05-22-schema-dump-design.md * * @module */ import type { PersistedSchemaEnvelope } from './types.js'; /** * Heuristic Zod detection — uses the Standard Schema v1 `~standard.vendor` * property (present in Zod v3.23+ and Zod v4+). Falls back to the * `_def.typeName` heuristic for older Zod v3 builds that predate Standard * Schema support. */ export declare function isZodSchema(value: unknown): boolean; /** * Returns `true` when the validator was created with the Zod v4 native API * (i.e. `import { z } from 'zod'` where zod resolves to v4). Zod v4 native * schemas carry a `_zod` property whereas Zod v3 schemas (and the v3-compat * shim shipped inside zod@4 at `zod/v3`) use `_def.typeName`. * * Kept duck-typed so hub never statically imports zod. */ export declare function isZod4Schema(value: unknown): boolean; export declare function derivePersistedSchema(validator: unknown): Promise;