{"version":3,"file":"schema-Cjk6OMG9.cjs","names":["toStandardSchema","z3","toStandardSchemaZodV4","toStandardSchemaZodV3","toStandardSchemaAiSdk","toStandardSchemaJsonSchema"],"sources":["../src/standard-schema/adapters/zod-v4.ts","../src/standard-schema/standard-schema.ts"],"sourcesContent":["import type { StandardSchemaV1, StandardJSONSchemaV1 } from '@standard-schema/spec';\nimport { toJSONSchema } from 'zod/v4';\nimport { patchRecordSchemas } from '../../zod-to-json';\nimport type { StandardSchemaWithJSON, StandardSchemaWithJSONProps } from '../standard-schema.types';\n\n/**\n * Supported JSON Schema targets for z.toJSONSchema().\n * Works with both real Zod v4 and Zod 3.25's v4 compat layer.\n */\nconst SUPPORTED_TARGETS = new Set(['draft-07', 'draft-04', 'draft-2020-12']);\n\n/**\n * Maps Mastra's target names to Zod v4's expected format.\n * Zod v4's z.toJSONSchema() expects \"draft-7\" instead of \"draft-07\",\n * and \"draft-4\" instead of \"draft-04\".\n */\nconst ZOD_V4_TARGET_MAP: Record<string, string> = {\n  'draft-07': 'draft-7',\n  'draft-04': 'draft-4',\n};\n\n/**\n * Options for the Zod v4 adapter's JSON Schema conversion.\n */\nexport interface ZodV4AdapterOptions {\n  unrepresentable?: 'any' | 'error';\n  override?: (ctx: { zodSchema: unknown; jsonSchema: Record<string, unknown> }) => undefined;\n}\n\n/**\n * Converts a Zod v4 schema to JSON Schema using z.toJSONSchema().\n *\n * Works with both real Zod v4 and Zod 3.25's v4 compat layer.\n *\n * @internal\n */\nfunction convertToJsonSchema(\n  zodSchema: unknown,\n  options: StandardJSONSchemaV1.Options,\n  adapterOptions: ZodV4AdapterOptions,\n): Record<string, unknown> {\n  // Work around a Zod v4 bug where `z.record(valueSchema)` puts the value\n  // in `def.keyType` instead of `def.valueType`, which crashes\n  // `toJSONSchema`'s `recordProcessor`. The legacy `zodToJsonSchema` entry\n  // applies the same patch; this keeps the `applyCompatLayer` path in sync.\n  // Idempotent — safe to call repeatedly.\n  patchRecordSchemas(zodSchema);\n\n  const target = SUPPORTED_TARGETS.has(options.target) ? options.target : 'draft-07';\n\n  const jsonSchemaOptions: Record<string, unknown> = {\n    target: ZOD_V4_TARGET_MAP[target] ?? target,\n  };\n\n  if (adapterOptions.unrepresentable) {\n    jsonSchemaOptions.unrepresentable = adapterOptions.unrepresentable;\n  }\n\n  // The override option works in real Zod v4 but is a no-op in 3.25 compat.\n  if (adapterOptions.override) {\n    jsonSchemaOptions.override = adapterOptions.override;\n  }\n\n  return toJSONSchema(zodSchema as Parameters<typeof toJSONSchema>[0], jsonSchemaOptions) as Record<string, unknown>;\n}\n\n/**\n * Wraps a Zod v4 schema to implement the full @standard-schema/spec interface.\n *\n * Zod v4 schemas (and Zod 3.25's v4 compat layer) implement `StandardSchemaV1`\n * (validation) but may not implement `StandardJSONSchemaV1` (JSON Schema conversion)\n * on the `~standard` property. This adapter adds the `jsonSchema` property using\n * `z.toJSONSchema()` to provide JSON Schema conversion capabilities.\n *\n * @param zodSchema - A Zod v4 schema (has `_zod` property)\n * @param adapterOptions - Options passed to z.toJSONSchema()\n * @returns The schema wrapped with StandardSchemaWithJSON support\n */\nexport function toStandardSchema<T>(\n  zodSchema: T & { _zod: unknown; '~standard': StandardSchemaV1.Props },\n  adapterOptions: ZodV4AdapterOptions = {},\n): T & StandardSchemaWithJSON {\n  // Create a wrapper object that preserves the original schema's prototype chain\n  const wrapper = Object.create(zodSchema) as T & StandardSchemaWithJSON;\n\n  // Get the existing ~standard property from Zod\n  const existingStandard = (zodSchema as any)['~standard'] as StandardSchemaV1.Props;\n\n  // Create the JSON Schema converter using z.toJSONSchema()\n  const jsonSchemaConverter: StandardJSONSchemaV1.Converter = {\n    input: (options: StandardJSONSchemaV1.Options): Record<string, unknown> => {\n      return convertToJsonSchema(zodSchema, options, adapterOptions);\n    },\n    output: (options: StandardJSONSchemaV1.Options): Record<string, unknown> => {\n      return convertToJsonSchema(zodSchema, options, adapterOptions);\n    },\n  };\n\n  // Define the enhanced ~standard property\n  Object.defineProperty(wrapper, '~standard', {\n    value: {\n      ...existingStandard,\n      jsonSchema: jsonSchemaConverter,\n    } satisfies StandardSchemaWithJSONProps,\n    writable: false,\n    enumerable: true,\n    configurable: false,\n  });\n\n  return wrapper;\n}\n","import type { Schema } from '@internal/ai-v6';\nimport type { StandardJSONSchemaV1, StandardSchemaV1 } from '@standard-schema/spec';\nimport type { JSONSchema7 } from 'json-schema';\nimport z3 from 'zod/v3';\nimport type { ZodType } from 'zod/v3';\nimport type { PublicSchema } from '../schema.types';\nimport { patchRecordSchemas } from '../zod-to-json';\nimport { toStandardSchema as toStandardSchemaAiSdk } from './adapters/ai-sdk';\nimport { toStandardSchema as toStandardSchemaJsonSchema } from './adapters/json-schema';\nimport { toStandardSchema as toStandardSchemaZodV3 } from './adapters/zod-v3';\nimport { toStandardSchema as toStandardSchemaZodV4 } from './adapters/zod-v4';\nimport type { StandardSchemaWithJSON } from './standard-schema.types';\n\n/**\n * Override function for JSON Schema conversion.\n * Handles types that Zod v4 cannot natively represent in JSON Schema:\n * - z.date() -> { type: 'string', format: 'date-time' }\n */\nfunction jsonSchemaOverride(ctx: { zodSchema: unknown; jsonSchema: Record<string, unknown> }): undefined {\n  const zodSchema = ctx.zodSchema as {\n    type?: string;\n    _def?: { typeName?: string };\n    _zod?: { def?: { type?: string; coerce?: boolean } };\n    optional?: () => unknown;\n  };\n\n  if (\n    ctx.jsonSchema.type === 'object' &&\n    ctx.jsonSchema.properties !== undefined &&\n    !ctx.jsonSchema.additionalProperties\n  ) {\n    ctx.jsonSchema.additionalProperties = false;\n  }\n\n  if (zodSchema) {\n    // Zod v4: zodSchema.type === 'date'\n    // Zod v3: zodSchema._def.typeName === 'ZodDate'\n    const isDateType = zodSchema?.type === 'date' || zodSchema?._def?.typeName === 'ZodDate';\n\n    if (isDateType) {\n      // Zod v4 dates need explicit JSON schema conversion (zod-to-json-schema doesn't handle them)\n      if (zodSchema?.type === 'date') {\n        ctx.jsonSchema.type = 'string';\n        ctx.jsonSchema.format = 'date-time';\n      }\n      // Mark dates for #traverse: x-date=true means string→Date conversion needed.\n      // z.coerce.date() handles its own coercion, so mark as false to prevent conversion.\n      // Zod v3 has no coerce, so all v3 dates are strict (handled by preProcessJSONNode fallback).\n      ctx.jsonSchema['x-date'] = !zodSchema._zod?.def?.coerce;\n      // @ts-expect-error - catchall is a valid property for zod\n    } else if (zodSchema?.type === 'object' && zodSchema._zod?.def?.catchall?.type === 'unknown') {\n      ctx.jsonSchema.additionalProperties = true;\n    }\n  }\n\n  return undefined;\n}\n/**\n * Library options for JSON Schema conversion.\n * - unrepresentable: 'any' allows z.custom() and other unrepresentable types to be converted to {}\n *   instead of throwing \"Custom types cannot be represented in JSON Schema\"\n * - override: converts z.date() to { type: 'string', format: 'date-time' }\n */\nexport const JSON_SCHEMA_LIBRARY_OPTIONS = {\n  unrepresentable: 'any' as const,\n  override: jsonSchemaOverride,\n};\n\nexport type {\n  StandardSchemaWithJSON,\n  StandardSchemaWithJSONProps,\n  InferInput,\n  InferOutput,\n  StandardSchemaIssue,\n} from './standard-schema.types';\n\nfunction isVercelSchema(schema: unknown): schema is Schema {\n  return (\n    typeof schema === 'object' &&\n    schema !== null &&\n    '_type' in schema &&\n    'jsonSchema' in schema &&\n    typeof (schema as Schema).jsonSchema === 'object'\n  );\n}\n\n/**\n * Check if a schema is Zod v4 (has _zod property which is v4-only)\n */\nfunction isZodV4(schema: unknown): boolean {\n  return typeof schema === 'object' && schema !== null && '_zod' in schema;\n}\n\n/**\n * Check if a schema is Zod v3.\n *\n * Zod v3 can come from:\n * 1. The old standalone 'zod-v3' package\n * 2. The 'zod/v3' compat export from modern zod\n *\n * We detect Zod v3 by checking:\n * - Has ~standard.vendor === 'zod' (both v3 and v4 have this)\n * - Does NOT have ~standard.jsonSchema (only Zod v4 has native JSON Schema support)\n * - Does NOT have _zod property (only Zod v4 has this)\n *\n * Note: We can't use instanceof z3.ZodType because the old 'zod-v3' package\n * has a different prototype chain than 'zod/v3'.\n */\nfunction isZodV3(schema: unknown): schema is ZodType {\n  if (schema === null || typeof schema !== 'object') {\n    return false;\n  }\n\n  // Must not be Zod v4\n  if (isZodV4(schema)) {\n    return false;\n  }\n\n  // Check for ~standard with vendor 'zod' but no jsonSchema\n  if ('~standard' in schema) {\n    const std = (schema as any)['~standard'];\n    if (typeof std === 'object' && std !== null && std.vendor === 'zod' && !('jsonSchema' in std)) {\n      return true;\n    }\n  }\n\n  // Fallback: check instanceof for zod/v3 compat export\n  return schema instanceof z3.ZodType;\n}\n\nexport function toStandardSchema<T = unknown>(schema: PublicSchema<T>): StandardSchemaWithJSON<T> {\n  // Work around a Zod v4 (< 4.4.0) bug where single-arg `z.record(valueSchema)`\n  // puts the value in `def.keyType` and leaves `def.valueType` undefined, which\n  // crashes `toJSONSchema`'s recordProcessor. This must run BEFORE the\n  // StandardSchemaWithJSON short-circuit below: Zod >= 4.2 natively exposes\n  // `~standard.jsonSchema`, so those schemas are returned as-is and never go\n  // through our Zod v4 adapter. Patching mutates the defs in place, so Zod's\n  // native converter picks up the fix too. Idempotent — safe to call repeatedly.\n  if (isZodV4(schema)) {\n    patchRecordSchemas(schema);\n  }\n\n  // First check: if already StandardSchemaWithJSON, return as-is\n  // This handles ArkType, Zod v4 (when it has jsonSchema), and pre-wrapped schemas\n  if (isStandardSchemaWithJSON(schema)) {\n    return schema;\n  }\n\n  // Check for Zod v4 schemas without ~standard.jsonSchema\n  // This handles both real Zod v4 and Zod 3.25's v4 compat layer where\n  // ~standard.jsonSchema is not present on the schema object\n  if (isZodV4(schema)) {\n    return toStandardSchemaZodV4(schema as any, {\n      unrepresentable: JSON_SCHEMA_LIBRARY_OPTIONS.unrepresentable,\n      override: JSON_SCHEMA_LIBRARY_OPTIONS.override,\n    });\n  }\n\n  // Check for Zod v3 schemas (need wrapping to add JSON Schema support)\n  // Important: Must use isZodV3() not instanceof z3.ZodType because\n  // Zod v4 schemas are also instanceof z3.ZodType due to prototype compatibility\n  if (isZodV3(schema)) {\n    return toStandardSchemaZodV3(schema as ZodType);\n  }\n\n  // Check for AI SDK Schema objects (Vercel's jsonSchema wrapper)\n  if (isVercelSchema(schema)) {\n    return toStandardSchemaAiSdk(schema as Schema<T>);\n  }\n\n  // At this point, assume it's a plain JSON Schema object\n  // JSON Schema objects are plain objects with properties like 'type', 'properties', etc.\n  if (schema === null || (typeof schema !== 'object' && typeof schema !== 'function')) {\n    throw new Error(`Unsupported schema type: ${typeof schema}`);\n  }\n\n  // If it's a function that's not StandardSchemaWithJSON, it's not supported\n  if (typeof schema === 'function') {\n    throw new Error(`Unsupported schema type: function (schema libraries should implement StandardSchemaWithJSON)`);\n  }\n\n  return toStandardSchemaJsonSchema(schema as JSONSchema7);\n}\n\n/**\n * Type guard to check if a value implements the StandardSchemaV1 interface.\n *\n * @param value - The value to check\n * @returns True if the value implements StandardSchemaV1\n *\n * @example\n * ```typescript\n * import { isStandardSchema } from '@mastra/schema-compat';\n *\n * if (isStandardSchema(someValue)) {\n *   const result = someValue['~standard'].validate(input);\n * }\n * ```\n */\nexport function isStandardSchema(value: unknown): value is StandardSchemaV1 {\n  // Check for object or function (some libraries like ArkType use callable schemas)\n  if (value === null || (typeof value !== 'object' && typeof value !== 'function')) {\n    return false;\n  }\n  if (!('~standard' in value)) {\n    return false;\n  }\n  const std = (value as any)['~standard'];\n  return (\n    typeof std === 'object' &&\n    std !== null &&\n    'version' in std &&\n    std.version === 1 &&\n    'vendor' in std &&\n    'validate' in std &&\n    typeof std.validate === 'function'\n  );\n}\n\n/**\n * Type guard to check if a value implements the StandardJSONSchemaV1 interface.\n *\n * @param value - The value to check\n * @returns True if the value implements StandardJSONSchemaV1\n *\n * @example\n * ```typescript\n * import { isStandardJSONSchema } from '@mastra/schema-compat';\n *\n * if (isStandardJSONSchema(someValue)) {\n *   const jsonSchema = someValue['~standard'].jsonSchema.output({ target: 'draft-07' });\n * }\n * ```\n */\nexport function isStandardJSONSchema(value: unknown): value is StandardJSONSchemaV1 {\n  // Check for object or function (some libraries like ArkType use callable schemas)\n  if (value === null || (typeof value !== 'object' && typeof value !== 'function')) {\n    return false;\n  }\n  if (!('~standard' in value)) {\n    return false;\n  }\n  const std = (value as any)['~standard'];\n  if (typeof std !== 'object' || std === null) {\n    return false;\n  }\n  if (!('version' in std) || std.version !== 1 || !('vendor' in std)) {\n    return false;\n  }\n  if (!('jsonSchema' in std) || typeof std.jsonSchema !== 'object') {\n    return false;\n  }\n  return typeof std.jsonSchema.input === 'function' && typeof std.jsonSchema.output === 'function';\n}\n\n/**\n * Type guard to check if a value implements both StandardSchemaV1 and StandardJSONSchemaV1.\n *\n * @param value - The value to check\n * @returns True if the value implements both interfaces\n *\n * @example\n * ```typescript\n * import { isStandardSchemaWithJSON } from '@mastra/schema-compat';\n *\n * if (isStandardSchemaWithJSON(someValue)) {\n *   // Can use both validation and JSON Schema conversion\n *   const result = someValue['~standard'].validate(input);\n *   const jsonSchema = someValue['~standard'].jsonSchema.output({ target: 'draft-07' });\n * }\n * ```\n */\nexport function isStandardSchemaWithJSON(value: unknown): value is StandardSchemaWithJSON {\n  return isStandardSchema(value) && isStandardJSONSchema(value);\n}\n\n/**\n * Converts a StandardSchemaWithJSON to a JSON Schema.\n *\n * @param schema - The StandardSchemaWithJSON schema to convert\n * @param options - Conversion options\n * @param options.target - The JSON Schema target version (default: 'draft-07')\n * @param options.io - Whether to use input or output schema (default: 'output')\n *   - 'input': Use for tool parameters, function arguments, request bodies\n *   - 'output': Use for return types, response bodies\n * @returns The JSON Schema representation\n *\n * @example\n * ```typescript\n * import { standardSchemaToJSONSchema, toStandardSchema } from '@mastra/schema-compat';\n * import { z } from 'zod';\n *\n * const zodSchema = z.object({ name: z.string() });\n * const standardSchema = toStandardSchema(zodSchema);\n *\n * // For output types (default)\n * const outputSchema = standardSchemaToJSONSchema(standardSchema);\n *\n * // For input types (tool parameters)\n * const inputSchema = standardSchemaToJSONSchema(standardSchema, { io: 'input' });\n * ```\n */\nexport function standardSchemaToJSONSchema(\n  schema: StandardSchemaWithJSON,\n  options: {\n    target?: StandardJSONSchemaV1.Target;\n    io?: 'input' | 'output';\n    override?: (typeof JSON_SCHEMA_LIBRARY_OPTIONS)['override'];\n  } = {},\n): JSONSchema7 {\n  const { target = 'draft-07', io = 'output', override = JSON_SCHEMA_LIBRARY_OPTIONS.override } = options;\n  const jsonSchemaFn = schema['~standard'].jsonSchema[io];\n  let jsonSchema = jsonSchemaFn({\n    target,\n    libraryOptions: {\n      ...JSON_SCHEMA_LIBRARY_OPTIONS,\n      override,\n    },\n  }) as JSONSchema7;\n\n  // make sure only jsonSchema is left, no standard schema metadata\n  jsonSchema = JSON.parse(JSON.stringify(jsonSchema));\n\n  return jsonSchema;\n}\n"],"mappings":";;;;;;;;;;;;;AASA,MAAM,oCAAoB,IAAI,IAAI;CAAC;CAAY;CAAY;AAAe,CAAC;;;;;;AAO3E,MAAM,oBAA4C;CAChD,YAAY;CACZ,YAAY;AACd;;;;;;;;AAiBA,SAAS,oBACP,WACA,SACA,gBACyB;CAMzB,oBAAA,mBAAmB,SAAS;CAE5B,MAAM,SAAS,kBAAkB,IAAI,QAAQ,MAAM,IAAI,QAAQ,SAAS;CAExE,MAAM,oBAA6C,EACjD,QAAQ,kBAAkB,WAAW,OACvC;CAEA,IAAI,eAAe,iBACjB,kBAAkB,kBAAkB,eAAe;CAIrD,IAAI,eAAe,UACjB,kBAAkB,WAAW,eAAe;CAG9C,QAAA,GAAA,OAAA,aAAA,CAAoB,WAAiD,iBAAiB;AACxF;;;;;;;;;;;;;AAcA,SAAgBA,mBACd,WACA,iBAAsC,CAAC,GACX;CAE5B,MAAM,UAAU,OAAO,OAAO,SAAS;CAGvC,MAAM,mBAAoB,UAAkB;CAG5C,MAAM,sBAAsD;EAC1D,QAAQ,YAAmE;GACzE,OAAO,oBAAoB,WAAW,SAAS,cAAc;EAC/D;EACA,SAAS,YAAmE;GAC1E,OAAO,oBAAoB,WAAW,SAAS,cAAc;EAC/D;CACF;CAGA,OAAO,eAAe,SAAS,aAAa;EAC1C,OAAO;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