@mastra/schema-compat 0.0.0-ai-v5-20250813235735 → 0.0.0-bundle-recursion-20251030002519

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +107 -2
  2. package/README.md +0 -4
  3. package/dist/chunk-5WM4A32G.cjs +83 -0
  4. package/dist/chunk-5WM4A32G.cjs.map +1 -0
  5. package/dist/chunk-U2HXWNAF.js +77 -0
  6. package/dist/chunk-U2HXWNAF.js.map +1 -0
  7. package/dist/index.cjs +859 -134
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +858 -135
  12. package/dist/index.js.map +1 -1
  13. package/dist/provider-compats/anthropic.d.ts +5 -3
  14. package/dist/provider-compats/anthropic.d.ts.map +1 -1
  15. package/dist/provider-compats/deepseek.d.ts +5 -3
  16. package/dist/provider-compats/deepseek.d.ts.map +1 -1
  17. package/dist/provider-compats/google.d.ts +5 -3
  18. package/dist/provider-compats/google.d.ts.map +1 -1
  19. package/dist/provider-compats/meta.d.ts +5 -3
  20. package/dist/provider-compats/meta.d.ts.map +1 -1
  21. package/dist/provider-compats/openai-reasoning.d.ts +5 -3
  22. package/dist/provider-compats/openai-reasoning.d.ts.map +1 -1
  23. package/dist/provider-compats/openai.d.ts +5 -3
  24. package/dist/provider-compats/openai.d.ts.map +1 -1
  25. package/dist/schema-compatibility-v3.d.ts +288 -0
  26. package/dist/schema-compatibility-v3.d.ts.map +1 -0
  27. package/dist/schema-compatibility-v4.d.ts +279 -0
  28. package/dist/schema-compatibility-v4.d.ts.map +1 -0
  29. package/dist/schema-compatibility.d.ts +79 -164
  30. package/dist/schema-compatibility.d.ts.map +1 -1
  31. package/dist/types.d.ts +6 -0
  32. package/dist/types.d.ts.map +1 -0
  33. package/dist/utils-test-suite.d.ts +2 -0
  34. package/dist/utils-test-suite.d.ts.map +1 -0
  35. package/dist/utils.d.ts +16 -4
  36. package/dist/utils.d.ts.map +1 -1
  37. package/dist/zod-to-json-test-suite.d.ts +6 -0
  38. package/dist/zod-to-json-test-suite.d.ts.map +1 -0
  39. package/dist/zod-to-json.cjs +12 -0
  40. package/dist/zod-to-json.cjs.map +1 -0
  41. package/dist/zod-to-json.d.ts +6 -0
  42. package/dist/zod-to-json.d.ts.map +1 -0
  43. package/dist/zod-to-json.js +3 -0
  44. package/dist/zod-to-json.js.map +1 -0
  45. package/dist/zodTypes.d.ts +21 -0
  46. package/dist/zodTypes.d.ts.map +1 -0
  47. package/package.json +34 -10
  48. package/.turbo/turbo-build.log +0 -4
  49. package/eslint.config.js +0 -6
  50. package/src/index.ts +0 -39
  51. package/src/provider-compats/anthropic.ts +0 -43
  52. package/src/provider-compats/deepseek.ts +0 -35
  53. package/src/provider-compats/google.ts +0 -62
  54. package/src/provider-compats/meta.ts +0 -36
  55. package/src/provider-compats/openai-reasoning.ts +0 -91
  56. package/src/provider-compats/openai.ts +0 -56
  57. package/src/provider-compats.test.ts +0 -383
  58. package/src/schema-compatibility.test.ts +0 -491
  59. package/src/schema-compatibility.ts +0 -592
  60. package/src/utils.test.ts +0 -463
  61. package/src/utils.ts +0 -205
  62. package/tsconfig.build.json +0 -9
  63. package/tsconfig.json +0 -5
  64. package/tsup.config.ts +0 -17
  65. package/vitest.config.ts +0 -7
@@ -0,0 +1,288 @@
1
+ import type { Schema } from 'ai';
2
+ import type { JSONSchema7 } from 'json-schema';
3
+ import { z, ZodOptional, ZodObject, ZodArray, ZodUnion, ZodString, ZodNumber, ZodDate, ZodDefault, ZodNull } from 'zod';
4
+ import type { ZodTypeAny } from 'zod';
5
+ import type { Targets } from 'zod-to-json-schema';
6
+ import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility.js';
7
+ import type { ModelInformation } from './types.js';
8
+ /**
9
+ * All supported string validation check types that can be processed or converted to descriptions.
10
+ * @constant
11
+ */
12
+ export declare const ALL_STRING_CHECKS: readonly ["regex", "emoji", "email", "url", "uuid", "cuid", "min", "max"];
13
+ /**
14
+ * All supported number validation check types that can be processed or converted to descriptions.
15
+ * @constant
16
+ */
17
+ export declare const ALL_NUMBER_CHECKS: readonly ["min", "max", "multipleOf"];
18
+ /**
19
+ * All supported array validation check types that can be processed or converted to descriptions.
20
+ * @constant
21
+ */
22
+ export declare const ALL_ARRAY_CHECKS: readonly ["min", "max", "length"];
23
+ export declare const isOptional: (v: ZodTypeAny) => v is ZodOptional<any>;
24
+ export declare const isObj: (v: ZodTypeAny) => v is ZodObject<any, any, any>;
25
+ export declare const isNull: (v: ZodTypeAny) => v is ZodNull;
26
+ export declare const isArr: (v: ZodTypeAny) => v is ZodArray<any, any>;
27
+ export declare const isUnion: (v: ZodTypeAny) => v is ZodUnion<[ZodTypeAny, ...ZodTypeAny[]]>;
28
+ export declare const isString: (v: ZodTypeAny) => v is ZodString;
29
+ export declare const isNumber: (v: ZodTypeAny) => v is ZodNumber;
30
+ export declare const isDate: (v: ZodTypeAny) => v is ZodDate;
31
+ export declare const isDefault: (v: ZodTypeAny) => v is ZodDefault<any>;
32
+ /**
33
+ * Zod types that are not supported by most AI model providers and should be avoided.
34
+ * @constant
35
+ */
36
+ export declare const UNSUPPORTED_ZOD_TYPES: readonly ["ZodIntersection", "ZodNever", "ZodNull", "ZodTuple", "ZodUndefined"];
37
+ /**
38
+ * Zod types that are generally supported by AI model providers.
39
+ * @constant
40
+ */
41
+ export declare const SUPPORTED_ZOD_TYPES: readonly ["ZodObject", "ZodArray", "ZodUnion", "ZodString", "ZodNumber", "ZodDate", "ZodAny", "ZodDefault"];
42
+ /**
43
+ * All Zod types (both supported and unsupported).
44
+ * @constant
45
+ */
46
+ export declare const ALL_ZOD_TYPES: readonly ["ZodObject", "ZodArray", "ZodUnion", "ZodString", "ZodNumber", "ZodDate", "ZodAny", "ZodDefault", "ZodIntersection", "ZodNever", "ZodNull", "ZodTuple", "ZodUndefined"];
47
+ /**
48
+ * Type representing string validation checks.
49
+ */
50
+ export type StringCheckType = (typeof ALL_STRING_CHECKS)[number];
51
+ /**
52
+ * Type representing number validation checks.
53
+ */
54
+ export type NumberCheckType = (typeof ALL_NUMBER_CHECKS)[number];
55
+ /**
56
+ * Type representing array validation checks.
57
+ */
58
+ export type ArrayCheckType = (typeof ALL_ARRAY_CHECKS)[number];
59
+ /**
60
+ * Type representing unsupported Zod schema types.
61
+ */
62
+ export type UnsupportedZodType = (typeof UNSUPPORTED_ZOD_TYPES)[number];
63
+ /**
64
+ * Type representing supported Zod schema types.
65
+ */
66
+ export type SupportedZodType = (typeof SUPPORTED_ZOD_TYPES)[number];
67
+ /**
68
+ * Type representing all Zod schema types (supported and unsupported).
69
+ */
70
+ export type AllZodType = (typeof ALL_ZOD_TYPES)[number];
71
+ /**
72
+ * Utility type to extract the shape of a Zod object schema.
73
+ */
74
+ export type ZodShape<T extends z.AnyZodObject> = T['shape'];
75
+ /**
76
+ * Utility type to extract the keys from a Zod object shape.
77
+ */
78
+ export type ShapeKey<T extends z.AnyZodObject> = keyof ZodShape<T>;
79
+ /**
80
+ * Utility type to extract the value types from a Zod object shape.
81
+ */
82
+ export type ShapeValue<T extends z.AnyZodObject> = ZodShape<T>[ShapeKey<T>];
83
+ type ConstraintHelperText = string[];
84
+ /**
85
+ * Abstract base class for creating schema compatibility layers for different AI model providers.
86
+ *
87
+ * This class provides a framework for transforming Zod schemas to work with specific AI model
88
+ * provider requirements and limitations. Each provider may have different support levels for
89
+ * JSON Schema features, validation constraints, and data types.
90
+ *
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * import { SchemaCompatLayer } from '@mastra/schema-compat';
95
+ * import type { LanguageModelV1 } from 'ai';
96
+ *
97
+ * class CustomProviderCompat extends SchemaCompatLayer {
98
+ * constructor(model: ModelInformation) {
99
+ * super(model);
100
+ * }
101
+ *
102
+ * shouldApply(): boolean {
103
+ * return this.getModel().provider === 'custom-provider';
104
+ * }
105
+ *
106
+ * getSchemaTarget() {
107
+ * return 'jsonSchema7';
108
+ * }
109
+ *
110
+ * processZodType<T extends z.AnyZodObject>(value: z.ZodTypeAny): ShapeValue<T> {
111
+ * // Custom processing logic for this provider
112
+ * switch (value._def.typeName) {
113
+ * case 'ZodString':
114
+ * return this.defaultZodStringHandler(value, ['email', 'url']);
115
+ * default:
116
+ * return this.defaultUnsupportedZodTypeHandler(value);
117
+ * }
118
+ * }
119
+ * }
120
+ * ```
121
+ */
122
+ export declare class SchemaCompatLayer {
123
+ private model;
124
+ private parent;
125
+ /**
126
+ * Creates a new schema compatibility instance.
127
+ *
128
+ * @param model - The language model this compatibility layer applies to
129
+ */
130
+ constructor(model: ModelInformation, parent: ParentSchemaCompatLayer);
131
+ /**
132
+ * Gets the language model associated with this compatibility layer.
133
+ *
134
+ * @returns The language model instance
135
+ */
136
+ getModel(): ModelInformation;
137
+ getUnsupportedZodTypes(): readonly string[];
138
+ /**
139
+ * Type guard for optional Zod types
140
+ */
141
+ isOptional(v: ZodTypeAny): v is ZodOptional<any>;
142
+ /**
143
+ * Type guard for object Zod types
144
+ */
145
+ isObj(v: ZodTypeAny): v is ZodObject<any, any, any>;
146
+ /**
147
+ * Type guard for null Zod types
148
+ */
149
+ isNull(v: ZodTypeAny): v is ZodNull;
150
+ /**
151
+ * Type guard for array Zod types
152
+ */
153
+ isArr(v: ZodTypeAny): v is ZodArray<any, any>;
154
+ /**
155
+ * Type guard for union Zod types
156
+ */
157
+ isUnion(v: ZodTypeAny): v is ZodUnion<[ZodTypeAny, ...ZodTypeAny[]]>;
158
+ /**
159
+ * Type guard for string Zod types
160
+ */
161
+ isString(v: ZodTypeAny): v is ZodString;
162
+ /**
163
+ * Type guard for number Zod types
164
+ */
165
+ isNumber(v: ZodTypeAny): v is ZodNumber;
166
+ /**
167
+ * Type guard for date Zod types
168
+ */
169
+ isDate(v: ZodTypeAny): v is ZodDate;
170
+ /**
171
+ * Type guard for default Zod types
172
+ */
173
+ isDefault(v: ZodTypeAny): v is ZodDefault<any>;
174
+ /**
175
+ * Determines whether this compatibility layer should be applied for the current model.
176
+ *
177
+ * @returns True if this compatibility layer should be used, false otherwise
178
+ * @abstract
179
+ */
180
+ shouldApply(): boolean;
181
+ /**
182
+ * Returns the JSON Schema target format for this provider.
183
+ *
184
+ * @returns The schema target format, or undefined to use the default 'jsonSchema7'
185
+ * @abstract
186
+ */
187
+ getSchemaTarget(): Targets | undefined;
188
+ /**
189
+ * Processes a specific Zod type according to the provider's requirements.
190
+ *
191
+ * @param value - The Zod type to process
192
+ * @returns The processed Zod type
193
+ * @abstract
194
+ */
195
+ processZodType(value: ZodTypeAny): ZodTypeAny;
196
+ /**
197
+ * Default handler for Zod object types. Recursively processes all properties in the object.
198
+ *
199
+ * @param value - The Zod object to process
200
+ * @returns The processed Zod object
201
+ */
202
+ defaultZodObjectHandler(value: ZodObject<any, any, any>, options?: {
203
+ passthrough?: boolean;
204
+ }): ZodObject<any, any, any>;
205
+ /**
206
+ * Merges validation constraints into a parameter description.
207
+ *
208
+ * This helper method converts validation constraints that may not be supported
209
+ * by a provider into human-readable descriptions.
210
+ *
211
+ * @param description - The existing parameter description
212
+ * @param constraints - The validation constraints to merge
213
+ * @returns The updated description with constraints, or undefined if no constraints
214
+ */
215
+ mergeParameterDescription(description: string | undefined, constraints: ConstraintHelperText): string | undefined;
216
+ /**
217
+ * Default handler for unsupported Zod types. Throws an error for specified unsupported types.
218
+ *
219
+ * @param value - The Zod type to check
220
+ * @param throwOnTypes - Array of type names to throw errors for
221
+ * @returns The original value if not in the throw list
222
+ * @throws Error if the type is in the unsupported list
223
+ */
224
+ defaultUnsupportedZodTypeHandler<T extends z.AnyZodObject>(value: z.ZodTypeAny, throwOnTypes?: readonly UnsupportedZodType[]): ShapeValue<T>;
225
+ /**
226
+ * Default handler for Zod array types. Processes array constraints according to provider support.
227
+ *
228
+ * @param value - The Zod array to process
229
+ * @param handleChecks - Array constraints to convert to descriptions vs keep as validation
230
+ * @returns The processed Zod array
231
+ */
232
+ defaultZodArrayHandler(value: ZodArray<any, any>, handleChecks?: readonly ArrayCheckType[]): ZodArray<any, any>;
233
+ /**
234
+ * Default handler for Zod union types. Processes all union options.
235
+ *
236
+ * @param value - The Zod union to process
237
+ * @returns The processed Zod union
238
+ * @throws Error if union has fewer than 2 options
239
+ */
240
+ defaultZodUnionHandler(value: ZodUnion<[ZodTypeAny, ...ZodTypeAny[]]>): ZodTypeAny;
241
+ /**
242
+ * Default handler for Zod string types. Processes string validation constraints.
243
+ *
244
+ * @param value - The Zod string to process
245
+ * @param handleChecks - String constraints to convert to descriptions vs keep as validation
246
+ * @returns The processed Zod string
247
+ */
248
+ defaultZodStringHandler(value: ZodString, handleChecks?: readonly StringCheckType[]): ZodString;
249
+ /**
250
+ * Default handler for Zod number types. Processes number validation constraints.
251
+ *
252
+ * @param value - The Zod number to process
253
+ * @param handleChecks - Number constraints to convert to descriptions vs keep as validation
254
+ * @returns The processed Zod number
255
+ */
256
+ defaultZodNumberHandler(value: ZodNumber, handleChecks?: readonly NumberCheckType[]): ZodNumber;
257
+ /**
258
+ * Default handler for Zod date types. Converts dates to ISO strings with constraint descriptions.
259
+ *
260
+ * @param value - The Zod date to process
261
+ * @returns A Zod string schema representing the date in ISO format
262
+ */
263
+ defaultZodDateHandler(value: ZodDate): ZodString;
264
+ /**
265
+ * Default handler for Zod optional types. Processes the inner type and maintains optionality.
266
+ *
267
+ * @param value - The Zod optional to process
268
+ * @param handleTypes - Types that should be processed vs passed through
269
+ * @returns The processed Zod optional
270
+ */
271
+ defaultZodOptionalHandler(value: ZodOptional<any>, handleTypes?: readonly AllZodType[]): ZodTypeAny;
272
+ /**
273
+ * Processes a Zod object schema and converts it to an AI SDK Schema.
274
+ *
275
+ * @param zodSchema - The Zod object schema to process
276
+ * @returns An AI SDK Schema with provider-specific compatibility applied
277
+ */
278
+ processToAISDKSchema(zodSchema: z.ZodSchema): Schema;
279
+ /**
280
+ * Processes a Zod object schema and converts it to a JSON Schema.
281
+ *
282
+ * @param zodSchema - The Zod object schema to process
283
+ * @returns A JSONSchema7 object with provider-specific compatibility applied
284
+ */
285
+ processToJSONSchema(zodSchema: z.ZodSchema): JSONSchema7;
286
+ }
287
+ export {};
288
+ //# sourceMappingURL=schema-compatibility-v3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-compatibility-v3.d.ts","sourceRoot":"","sources":["../src/schema-compatibility-v3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACxH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,2EAA4E,CAAC;AAE3G;;;GAGG;AACH,eAAO,MAAM,iBAAiB,uCAIpB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,gBAAgB,mCAAoC,CAAC;AAElE,eAAO,MAAM,UAAU,GAAI,GAAG,UAAU,KAAG,CAAC,IAAI,WAAW,CAAC,GAAG,CAA6B,CAAC;AAC7F,eAAO,MAAM,KAAK,GAAI,GAAG,UAAU,KAAG,CAAC,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAA2B,CAAC;AAC9F,eAAO,MAAM,MAAM,GAAI,GAAG,UAAU,KAAG,CAAC,IAAI,OAA+B,CAAC;AAC5E,eAAO,MA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AQ,CAAC,CAAC,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC,GAAG,UAAU;IAUzF;;;;;;OAMG;IACI,uBAAuB,CAC5B,KAAK,EAAE,SAAS,EAChB,YAAY,GAAE,SAAS,eAAe,EAAsB,GAC3D,SAAS;IA2CZ;;;;;;OAMG;IACI,uBAAuB,CAC5B,KAAK,EAAE,SAAS,EAChB,YAAY,GAAE,SAAS,eAAe,EAAsB,GAC3D,SAAS;IAqDZ;;;;;OAKG;IACI,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS;IAkCvD;;;;;;OAMG;IACI,yBAAyB,CAC9B,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,EACvB,WAAW,GAAE,SAAS,UAAU,EAAwB,GACvD,UAAU;IAQb;;;;;OAKG;IACI,oBAAoB,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,MAAM;IAM3D;;;;;OAKG;IACI,mBAAmB,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,WAAW;CAGhE"}
@@ -0,0 +1,279 @@
1
+ import type { Schema } from 'ai';
2
+ import type { JSONSchema7 } from 'json-schema';
3
+ import { z, ZodOptional, ZodObject, ZodArray, ZodUnion, ZodString, ZodNumber, ZodDate, ZodDefault, ZodNull } from 'zod/v4';
4
+ import type { ZodAny, ZodType } from 'zod/v4';
5
+ import type { Targets } from 'zod-to-json-schema';
6
+ import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility.js';
7
+ import type { ModelInformation } from './types.js';
8
+ /**
9
+ * All supported string validation check types that can be processed or converted to descriptions.
10
+ * @constant
11
+ */
12
+ export declare const ALL_STRING_CHECKS: readonly ["regex", "emoji", "email", "url", "uuid", "cuid", "min_length", "max_length", "string_format"];
13
+ /**
14
+ * All supported number validation check types that can be processed or converted to descriptions.
15
+ * @constant
16
+ */
17
+ export declare const ALL_NUMBER_CHECKS: readonly ["greater_than", "less_than", "multiple_of"];
18
+ /**
19
+ * All supported array validation check types that can be processed or converted to descriptions.
20
+ * @constant
21
+ */
22
+ export declare const ALL_ARRAY_CHECKS: readonly ["min", "max", "length"];
23
+ /**
24
+ * Zod types that are not supported by most AI model providers and should be avoided.
25
+ * @constant
26
+ */
27
+ export declare const UNSUPPORTED_ZOD_TYPES: readonly ["ZodIntersection", "ZodNever", "ZodNull", "ZodTuple", "ZodUndefined"];
28
+ /**
29
+ * Zod types that are generally supported by AI model providers.
30
+ * @constant
31
+ */
32
+ export declare const SUPPORTED_ZOD_TYPES: readonly ["ZodObject", "ZodArray", "ZodUnion", "ZodString", "ZodNumber", "ZodDate", "ZodAny", "ZodDefault"];
33
+ /**
34
+ * All Zod types (both supported and unsupported).
35
+ * @constant
36
+ */
37
+ export declare const ALL_ZOD_TYPES: readonly ["ZodObject", "ZodArray", "ZodUnion", "ZodString", "ZodNumber", "ZodDate", "ZodAny", "ZodDefault", "ZodIntersection", "ZodNever", "ZodNull", "ZodTuple", "ZodUndefined"];
38
+ /**
39
+ * Type representing string validation checks.
40
+ */
41
+ export type StringCheckType = (typeof ALL_STRING_CHECKS)[number];
42
+ /**
43
+ * Type representing number validation checks.
44
+ */
45
+ export type NumberCheckType = (typeof ALL_NUMBER_CHECKS)[number];
46
+ /**
47
+ * Type representing array validation checks.
48
+ */
49
+ export type ArrayCheckType = (typeof ALL_ARRAY_CHECKS)[number];
50
+ /**
51
+ * Type representing unsupported Zod schema types.
52
+ */
53
+ export type UnsupportedZodType = (typeof UNSUPPORTED_ZOD_TYPES)[number];
54
+ /**
55
+ * Type representing supported Zod schema types.
56
+ */
57
+ export type SupportedZodType = (typeof SUPPORTED_ZOD_TYPES)[number];
58
+ /**
59
+ * Type representing all Zod schema types (supported and unsupported).
60
+ */
61
+ export type AllZodType = (typeof ALL_ZOD_TYPES)[number];
62
+ /**
63
+ * Utility type to extract the shape of a Zod object schema.
64
+ */
65
+ export type ZodShape<T extends z.ZodObject<any, any>> = T['shape'];
66
+ /**
67
+ * Utility type to extract the keys from a Zod object shape.
68
+ */
69
+ export type ShapeKey<T extends z.ZodObject<any, any>> = keyof ZodShape<T>;
70
+ /**
71
+ * Utility type to extract the value types from a Zod object shape.
72
+ */
73
+ export type ShapeValue<T extends z.ZodObject<any, any>> = ZodShape<T>[ShapeKey<T>];
74
+ type ConstraintHelperText = string[];
75
+ /**
76
+ * Abstract base class for creating schema compatibility layers for different AI model providers.
77
+ *
78
+ * This class provides a framework for transforming Zod schemas to work with specific AI model
79
+ * provider requirements and limitations. Each provider may have different support levels for
80
+ * JSON Schema features, validation constraints, and data types.
81
+ *
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * import { SchemaCompatLayer } from '@mastra/schema-compat';
86
+ * import type { LanguageModelV1 } from 'ai';
87
+ *
88
+ * class CustomProviderCompat extends SchemaCompatLayer {
89
+ * constructor(model: LanguageModelV1) {
90
+ * super(model);
91
+ * }
92
+ *
93
+ * shouldApply(): boolean {
94
+ * return this.getModel().provider === 'custom-provider';
95
+ * }
96
+ *
97
+ * getSchemaTarget() {
98
+ * return 'jsonSchema7';
99
+ * }
100
+ *
101
+ * processZodType<T extends z.AnyZodObject>(value: z.ZodAny): ShapeValue<T> {
102
+ * // Custom processing logic for this provider
103
+ * switch (value._def.typeName) {
104
+ * case 'ZodString':
105
+ * return this.defaultZodStringHandler(value, ['email', 'url']);
106
+ * default:
107
+ * return this.defaultUnsupportedZodTypeHandler(value);
108
+ * }
109
+ * }
110
+ * }
111
+ * ```
112
+ */
113
+ export declare class SchemaCompatLayer {
114
+ private model;
115
+ private parent;
116
+ /**
117
+ * Creates a new schema compatibility instance.
118
+ *
119
+ * @param model - The language model this compatibility layer applies to
120
+ */
121
+ constructor(model: ModelInformation, parent: ParentSchemaCompatLayer);
122
+ /**
123
+ * Gets the language model associated with this compatibility layer.
124
+ *
125
+ * @returns The language model instance
126
+ */
127
+ getModel(): ModelInformation;
128
+ getUnsupportedZodTypes(): readonly string[];
129
+ /**
130
+ * Type guard for optional Zod types
131
+ */
132
+ isOptional(v: ZodAny | ZodOptional<any>): v is ZodOptional<any>;
133
+ /**
134
+ * Type guard for object Zod types
135
+ */
136
+ isObj(v: ZodAny | ZodObject<any, any>): v is ZodObject<any, any>;
137
+ /**
138
+ * Type guard for null Zod types
139
+ */
140
+ isNull(v: ZodAny | ZodNull): v is ZodNull;
141
+ /**
142
+ * Type guard for array Zod types
143
+ */
144
+ isArr(v: ZodAny | ZodArray<any>): v is ZodArray<any>;
145
+ /**
146
+ * Type guard for union Zod types
147
+ */
148
+ isUnion(v: ZodAny | ZodUnion<[ZodAny, ...ZodAny[]]>): v is ZodUnion<[ZodAny, ...ZodAny[]]>;
149
+ /**
150
+ * Type guard for string Zod types
151
+ */
152
+ isString(v: ZodAny | ZodString): v is ZodString;
153
+ /**
154
+ * Type guard for number Zod types
155
+ */
156
+ isNumber(v: ZodAny | ZodNumber): v is ZodNumber;
157
+ /**
158
+ * Type guard for date Zod types
159
+ */
160
+ isDate(v: ZodAny | ZodDate): v is ZodDate;
161
+ /**
162
+ * Type guard for default Zod types
163
+ */
164
+ isDefault(v: ZodAny | ZodDefault<any>): v is ZodDefault<any>;
165
+ /**
166
+ * Determines whether this compatibility layer should be applied for the current model.
167
+ *
168
+ * @returns True if this compatibility layer should be used, false otherwise
169
+ * @abstract
170
+ */
171
+ shouldApply(): boolean;
172
+ /**
173
+ * Returns the JSON Schema target format for this provider.
174
+ *
175
+ * @returns The schema target format, or undefined to use the default 'jsonSchema7'
176
+ * @abstract
177
+ */
178
+ getSchemaTarget(): Targets | undefined;
179
+ /**
180
+ * Processes a specific Zod type according to the provider's requirements.
181
+ *
182
+ * @param value - The Zod type to process
183
+ * @returns The processed Zod type
184
+ * @abstract
185
+ */
186
+ processZodType(value: ZodType): ZodType;
187
+ /**
188
+ * Default handler for Zod object types. Recursively processes all properties in the object.
189
+ *
190
+ * @param value - The Zod object to process
191
+ * @returns The processed Zod object
192
+ */
193
+ defaultZodObjectHandler(value: ZodObject<any, any>, options?: {
194
+ passthrough?: boolean;
195
+ }): ZodObject<any, any>;
196
+ /**
197
+ * Merges validation constraints into a parameter description.
198
+ *
199
+ * This helper method converts validation constraints that may not be supported
200
+ * by a provider into human-readable descriptions.
201
+ *
202
+ * @param description - The existing parameter description
203
+ * @param constraints - The validation constraints to merge
204
+ * @returns The updated description with constraints, or undefined if no constraints
205
+ */
206
+ mergeParameterDescription(description: string | undefined, constraints: ConstraintHelperText): string | undefined;
207
+ /**
208
+ * Default handler for unsupported Zod types. Throws an error for specified unsupported types.
209
+ *
210
+ * @param value - The Zod type to check
211
+ * @param throwOnTypes - Array of type names to throw errors for
212
+ * @returns The original value if not in the throw list
213
+ * @throws Error if the type is in the unsupported list
214
+ */
215
+ defaultUnsupportedZodTypeHandler<T extends z.ZodObject<any, any>>(value: z.ZodAny, throwOnTypes?: readonly UnsupportedZodType[]): ShapeValue<T>;
216
+ /**
217
+ * Default handler for Zod array types. Processes array constraints according to provider support.
218
+ *
219
+ * @param value - The Zod array to process
220
+ * @param handleChecks - Array constraints to convert to descriptions vs keep as validation
221
+ * @returns The processed Zod array
222
+ */
223
+ defaultZodArrayHandler(value: ZodArray<any>, handleChecks?: readonly ArrayCheckType[]): ZodArray<any>;
224
+ /**
225
+ * Default handler for Zod union types. Processes all union options.
226
+ *
227
+ * @param value - The Zod union to process
228
+ * @returns The processed Zod union
229
+ * @throws Error if union has fewer than 2 options
230
+ */
231
+ defaultZodUnionHandler(value: ZodUnion<[ZodAny, ...ZodAny[]]>): ZodAny;
232
+ /**
233
+ * Default handler for Zod string types. Processes string validation constraints.
234
+ *
235
+ * @param value - The Zod string to process
236
+ * @param handleChecks - String constraints to convert to descriptions vs keep as validation
237
+ * @returns The processed Zod string
238
+ */
239
+ defaultZodStringHandler(value: ZodString, handleChecks?: readonly StringCheckType[]): ZodString;
240
+ /**
241
+ * Default handler for Zod number types. Processes number validation constraints.
242
+ *
243
+ * @param value - The Zod number to process
244
+ * @param handleChecks - Number constraints to convert to descriptions vs keep as validation
245
+ * @returns The processed Zod number
246
+ */
247
+ defaultZodNumberHandler(value: ZodNumber, handleChecks?: readonly NumberCheckType[]): ZodNumber;
248
+ /**
249
+ * Default handler for Zod date types. Converts dates to ISO strings with constraint descriptions.
250
+ *
251
+ * @param value - The Zod date to process
252
+ * @returns A Zod string schema representing the date in ISO format
253
+ */
254
+ defaultZodDateHandler(value: ZodDate): ZodString;
255
+ /**
256
+ * Default handler for Zod optional types. Processes the inner type and maintains optionality.
257
+ *
258
+ * @param value - The Zod optional to process
259
+ * @param handleTypes - Types that should be processed vs passed through
260
+ * @returns The processed Zod optional
261
+ */
262
+ defaultZodOptionalHandler(value: ZodOptional<any>, handleTypes?: readonly AllZodType[]): ZodType;
263
+ /**
264
+ * Processes a Zod object schema and converts it to an AI SDK Schema.
265
+ *
266
+ * @param zodSchema - The Zod object schema to process
267
+ * @returns An AI SDK Schema with provider-specific compatibility applied
268
+ */
269
+ processToAISDKSchema(zodSchema: ZodType): Schema;
270
+ /**
271
+ * Processes a Zod object schema and converts it to a JSON Schema.
272
+ *
273
+ * @param zodSchema - The Zod object schema to process
274
+ * @returns A JSONSchema7 object with provider-specific compatibility applied
275
+ */
276
+ processToJSONSchema(zodSchema: ZodType): JSONSchema7;
277
+ }
278
+ export {};
279
+ //# sourceMappingURL=schema-compatibility-v4.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-compatibility-v4.d.ts","sourceRoot":"","sources":["../src/schema-compatibility-v4.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,CAAC,EACD,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,OAAO,EACR,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,C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