@mastra/schema-compat 0.11.3-alpha.0 → 0.11.4-alpha.0
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/provider-compats/anthropic.d.ts +2 -2
- package/dist/provider-compats/deepseek.d.ts +2 -2
- package/dist/provider-compats/google.d.ts +2 -2
- package/dist/provider-compats/meta.d.ts +2 -2
- package/dist/provider-compats/openai-reasoning.d.ts +2 -2
- package/dist/provider-compats/openai-reasoning.d.ts.map +1 -1
- package/dist/provider-compats/openai.d.ts +2 -2
- package/dist/schema-compatibility-v3.d.ts +2 -2
- package/dist/schema-compatibility-v4.d.ts +2 -2
- package/dist/schema-compatibility.d.ts +3 -3
- package/dist/utils.d.ts +1 -1
- package/package.json +4 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
2
2
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
3
3
|
import type { Targets } from 'zod-to-json-schema';
|
|
4
|
-
import { SchemaCompatLayer } from '../schema-compatibility';
|
|
5
|
-
import type { ModelInformation } from '../types';
|
|
4
|
+
import { SchemaCompatLayer } from '../schema-compatibility.js';
|
|
5
|
+
import type { ModelInformation } from '../types.js';
|
|
6
6
|
export declare class DeepSeekSchemaCompatLayer extends SchemaCompatLayer {
|
|
7
7
|
constructor(model: ModelInformation);
|
|
8
8
|
getSchemaTarget(): Targets | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
2
2
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
3
3
|
import type { Targets } from 'zod-to-json-schema';
|
|
4
|
-
import { SchemaCompatLayer } from '../schema-compatibility';
|
|
5
|
-
import type { ModelInformation } from '../types';
|
|
4
|
+
import { SchemaCompatLayer } from '../schema-compatibility.js';
|
|
5
|
+
import type { ModelInformation } from '../types.js';
|
|
6
6
|
export declare class GoogleSchemaCompatLayer extends SchemaCompatLayer {
|
|
7
7
|
constructor(model: ModelInformation);
|
|
8
8
|
getSchemaTarget(): Targets | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
2
2
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
3
3
|
import type { Targets } from 'zod-to-json-schema';
|
|
4
|
-
import { SchemaCompatLayer } from '../schema-compatibility';
|
|
5
|
-
import type { ModelInformation } from '../types';
|
|
4
|
+
import { SchemaCompatLayer } from '../schema-compatibility.js';
|
|
5
|
+
import type { ModelInformation } from '../types.js';
|
|
6
6
|
export declare class MetaSchemaCompatLayer extends SchemaCompatLayer {
|
|
7
7
|
constructor(model: ModelInformation);
|
|
8
8
|
getSchemaTarget(): Targets | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
2
2
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
3
3
|
import type { Targets } from 'zod-to-json-schema';
|
|
4
|
-
import { SchemaCompatLayer } from '../schema-compatibility';
|
|
5
|
-
import type { ModelInformation } from '../types';
|
|
4
|
+
import { SchemaCompatLayer } from '../schema-compatibility.js';
|
|
5
|
+
import type { ModelInformation } from '../types.js';
|
|
6
6
|
export declare class OpenAIReasoningSchemaCompatLayer extends SchemaCompatLayer {
|
|
7
7
|
constructor(model: ModelInformation);
|
|
8
8
|
getSchemaTarget(): Targets | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-reasoning.d.ts","sourceRoot":"","sources":["../../src/provider-compats/openai-reasoning.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,SAAS,EAA4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eV3 } from 'zod/v3';
|
|
2
2
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
3
3
|
import type { Targets } from 'zod-to-json-schema';
|
|
4
|
-
import { SchemaCompatLayer } from '../schema-compatibility';
|
|
5
|
-
import type { ModelInformation } from '../types';
|
|
4
|
+
import { SchemaCompatLayer } from '../schema-compatibility.js';
|
|
5
|
+
import type { ModelInformation } from '../types.js';
|
|
6
6
|
export declare class OpenAISchemaCompatLayer extends SchemaCompatLayer {
|
|
7
7
|
constructor(model: ModelInformation);
|
|
8
8
|
getSchemaTarget(): Targets | undefined;
|
|
@@ -3,8 +3,8 @@ import type { JSONSchema7 } from 'json-schema';
|
|
|
3
3
|
import { z, ZodOptional, ZodObject, ZodArray, ZodUnion, ZodString, ZodNumber, ZodDate, ZodDefault, ZodNull } from 'zod';
|
|
4
4
|
import type { ZodTypeAny } from 'zod';
|
|
5
5
|
import type { Targets } from 'zod-to-json-schema';
|
|
6
|
-
import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility';
|
|
7
|
-
import type { ModelInformation } from './types';
|
|
6
|
+
import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility.js';
|
|
7
|
+
import type { ModelInformation } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* All supported string validation check types that can be processed or converted to descriptions.
|
|
10
10
|
* @constant
|
|
@@ -3,8 +3,8 @@ import type { JSONSchema7 } from 'json-schema';
|
|
|
3
3
|
import { z, ZodOptional, ZodObject, ZodArray, ZodUnion, ZodString, ZodNumber, ZodDate, ZodDefault, ZodNull } from 'zod/v4';
|
|
4
4
|
import type { ZodAny, ZodType } from 'zod/v4';
|
|
5
5
|
import type { Targets } from 'zod-to-json-schema';
|
|
6
|
-
import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility';
|
|
7
|
-
import type { ModelInformation } from './types';
|
|
6
|
+
import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility.js';
|
|
7
|
+
import type { ModelInformation } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* All supported string validation check types that can be processed or converted to descriptions.
|
|
10
10
|
* @constant
|
|
@@ -3,8 +3,8 @@ import type { JSONSchema7 } from 'json-schema';
|
|
|
3
3
|
import type { z as zV3 } from 'zod/v3';
|
|
4
4
|
import type { z as zV4, ZodType } from 'zod/v4';
|
|
5
5
|
import type { Targets } from 'zod-to-json-schema';
|
|
6
|
-
import type { UnsupportedZodType as UnsupportedZodTypeV3, ShapeValue as ShapeValueV3, StringCheckType, NumberCheckType, ArrayCheckType, AllZodType as AllZodTypeV3 } from './schema-compatibility-v3';
|
|
7
|
-
import type { UnsupportedZodType as UnsupportedZodTypeV4, ShapeValue as ShapeValueV4, AllZodType as AllZodTypeV4 } from './schema-compatibility-v4';
|
|
6
|
+
import type { UnsupportedZodType as UnsupportedZodTypeV3, ShapeValue as ShapeValueV3, StringCheckType, NumberCheckType, ArrayCheckType, AllZodType as AllZodTypeV3 } from './schema-compatibility-v3.js';
|
|
7
|
+
import type { UnsupportedZodType as UnsupportedZodTypeV4, ShapeValue as ShapeValueV4, AllZodType as AllZodTypeV4 } from './schema-compatibility-v4.js';
|
|
8
8
|
type StringConstraints = {
|
|
9
9
|
minLength?: number;
|
|
10
10
|
maxLength?: number;
|
|
@@ -35,7 +35,7 @@ type DateConstraints = {
|
|
|
35
35
|
maxDate?: string;
|
|
36
36
|
dateFormat?: string;
|
|
37
37
|
};
|
|
38
|
-
import type { ModelInformation } from './types';
|
|
38
|
+
import type { ModelInformation } from './types.js';
|
|
39
39
|
export declare abstract class SchemaCompatLayer {
|
|
40
40
|
private model;
|
|
41
41
|
private v3Layer;
|
package/dist/utils.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { JSONSchema7 } from 'json-schema';
|
|
|
3
3
|
import type { ZodSchema as ZodSchemaV3, ZodType as ZodTypeV3 } from 'zod/v3';
|
|
4
4
|
import type { ZodType as ZodSchemaV4, ZodType as ZodTypeV4 } from 'zod/v4';
|
|
5
5
|
import type { Targets } from 'zod-to-json-schema';
|
|
6
|
-
import type { SchemaCompatLayer } from './schema-compatibility';
|
|
6
|
+
import type { SchemaCompatLayer } from './schema-compatibility.js';
|
|
7
7
|
type ZodSchema = ZodSchemaV3 | ZodSchemaV4;
|
|
8
8
|
type ZodType = ZodTypeV3 | ZodTypeV4;
|
|
9
9
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/schema-compat",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4-alpha.0",
|
|
4
4
|
"description": "Tool schema compatibility layer for Mastra.ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -55,12 +55,13 @@
|
|
|
55
55
|
"@types/json-schema": "^7.0.15",
|
|
56
56
|
"@types/node": "^20.19.0",
|
|
57
57
|
"ai": "4.3.16",
|
|
58
|
-
"eslint": "^9.
|
|
58
|
+
"eslint": "^9.35.0",
|
|
59
59
|
"tsup": "^8.5.0",
|
|
60
60
|
"typescript": "^5.8.3",
|
|
61
61
|
"vitest": "^3.2.4",
|
|
62
62
|
"zod": "^3.25.76",
|
|
63
|
-
"@internal/lint": "0.0.
|
|
63
|
+
"@internal/lint": "0.0.41",
|
|
64
|
+
"@internal/types-builder": "0.0.16"
|
|
64
65
|
},
|
|
65
66
|
"homepage": "https://mastra.ai",
|
|
66
67
|
"repository": {
|