@mastra/schema-compat 1.2.11 → 1.2.14-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/_types/@internal_ai-sdk-v5/dist/index.d.ts +11 -8
- package/dist/{chunk-MXN3UURE.js → chunk-32GCIDQI.js} +175 -175
- package/dist/chunk-32GCIDQI.js.map +1 -0
- package/dist/{chunk-ZRSV37SF.cjs → chunk-7IQVBFIT.cjs} +4 -4
- package/dist/{chunk-ZRSV37SF.cjs.map → chunk-7IQVBFIT.cjs.map} +1 -1
- package/dist/{chunk-H72LBCXW.js → chunk-JRKBFHQT.js} +3 -3
- package/dist/{chunk-H72LBCXW.js.map → chunk-JRKBFHQT.js.map} +1 -1
- package/dist/{chunk-B6ZU4MU5.cjs → chunk-PRX3QIA2.cjs} +175 -175
- package/dist/chunk-PRX3QIA2.cjs.map +1 -0
- package/dist/index.cjs +28 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/json-schema/utils.d.ts +1 -1
- package/dist/json-schema.d.ts +1 -1
- package/dist/provider-compats/anthropic.d.ts +1 -1
- package/dist/provider-compats/deepseek.d.ts +1 -1
- package/dist/provider-compats/google.d.ts +1 -1
- package/dist/provider-compats/meta.d.ts +1 -1
- package/dist/provider-compats/openai.d.ts +1 -1
- package/dist/schema.cjs +7 -7
- package/dist/schema.js +1 -1
- package/dist/schema.types.d.ts +1 -1
- package/dist/standard-schema/adapters/ai-sdk.d.ts +1 -1
- package/dist/standard-schema/adapters/json-schema.cjs +3 -3
- package/dist/standard-schema/adapters/json-schema.d.ts +1 -1
- package/dist/standard-schema/adapters/json-schema.js +1 -1
- package/dist/standard-schema/standard-schema.d.ts +1 -1
- package/dist/zod-to-json.d.ts +1 -1
- package/package.json +15 -15
- package/dist/chunk-B6ZU4MU5.cjs.map +0 -1
- package/dist/chunk-MXN3UURE.js.map +0 -1
package/dist/json-schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { jsonSchema } from './_types/@internal_ai-sdk-v4/dist/index.d.ts';
|
|
2
2
|
export type { Schema } from './_types/@internal_ai-sdk-v4/dist/index.d.ts';
|
|
3
|
-
export type { JSONSchema7 } from '
|
|
3
|
+
export type { JSONSchema7 } from './_types/@types_json-schema/index.d.ts';
|
|
4
4
|
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema7 } from '
|
|
1
|
+
import type { JSONSchema7 } from '../_types/@types_json-schema/index.d.ts';
|
|
2
2
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
3
3
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
4
4
|
import type { Targets } from 'zod-to-json-schema';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema7 } from '
|
|
1
|
+
import type { JSONSchema7 } from '../_types/@types_json-schema/index.d.ts';
|
|
2
2
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
3
3
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
4
4
|
import type { Targets } from 'zod-to-json-schema';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema7 } from '
|
|
1
|
+
import type { JSONSchema7 } from '../_types/@types_json-schema/index.d.ts';
|
|
2
2
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
3
3
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
4
4
|
import type { Targets } from 'zod-to-json-schema';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema7 } from '
|
|
1
|
+
import type { JSONSchema7 } from '../_types/@types_json-schema/index.d.ts';
|
|
2
2
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
3
3
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
4
4
|
import type { Targets } from 'zod-to-json-schema';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema7 } from '
|
|
1
|
+
import type { JSONSchema7 } from '../_types/@types_json-schema/index.d.ts';
|
|
2
2
|
import type { ZodType as ZodTypeV3 } from 'zod/v3';
|
|
3
3
|
import type { ZodType as ZodTypeV4 } from 'zod/v4';
|
|
4
4
|
import type { Targets } from 'zod-to-json-schema';
|
package/dist/schema.cjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7IQVBFIT_cjs = require('./chunk-7IQVBFIT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "JSON_SCHEMA_LIBRARY_OPTIONS", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk7IQVBFIT_cjs.JSON_SCHEMA_LIBRARY_OPTIONS; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "isStandardJSONSchema", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk7IQVBFIT_cjs.isStandardJSONSchema; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "isStandardSchema", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk7IQVBFIT_cjs.isStandardSchema; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "isStandardSchemaWithJSON", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk7IQVBFIT_cjs.isStandardSchemaWithJSON; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "standardSchemaToJSONSchema", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk7IQVBFIT_cjs.standardSchemaToJSONSchema; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "toStandardSchema", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk7IQVBFIT_cjs.toStandardSchema; }
|
|
30
30
|
});
|
|
31
31
|
//# sourceMappingURL=schema.cjs.map
|
|
32
32
|
//# sourceMappingURL=schema.cjs.map
|
package/dist/schema.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { JSON_SCHEMA_LIBRARY_OPTIONS, isStandardJSONSchema, isStandardSchema, isStandardSchemaWithJSON, standardSchemaToJSONSchema, toStandardSchema } from './chunk-
|
|
1
|
+
export { JSON_SCHEMA_LIBRARY_OPTIONS, isStandardJSONSchema, isStandardSchema, isStandardSchemaWithJSON, standardSchemaToJSONSchema, toStandardSchema } from './chunk-JRKBFHQT.js';
|
|
2
2
|
//# sourceMappingURL=schema.js.map
|
|
3
3
|
//# sourceMappingURL=schema.js.map
|
package/dist/schema.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Schema as SchemaV4 } from './_types/@internal_ai-sdk-v4/dist/index.d.ts';
|
|
2
2
|
import type { Schema as SchemaV5 } from './_types/@internal_ai-sdk-v5/dist/index.d.ts';
|
|
3
3
|
import type { Schema as SchemaV6 } from './_types/@internal_ai-v6/dist/index.d.ts';
|
|
4
|
-
import type { JSONSchema7 } from '
|
|
4
|
+
import type { JSONSchema7 } from './_types/@types_json-schema/index.d.ts';
|
|
5
5
|
import type z3 from 'zod/v3';
|
|
6
6
|
import type z4 from 'zod/v4';
|
|
7
7
|
import type { StandardSchemaWithJSON } from './standard-schema/standard-schema.types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Schema } from '../../_types/@internal_ai-v6/dist/index.d.ts';
|
|
2
|
-
import type { JSONSchema7 } from '
|
|
2
|
+
import type { JSONSchema7 } from '../../_types/@types_json-schema/index.d.ts';
|
|
3
3
|
import type { StandardSchemaWithJSON, StandardSchemaWithJSONProps } from '../standard-schema.types.js';
|
|
4
4
|
/**
|
|
5
5
|
* A wrapper class that makes AI SDK Schema compatible with @standard-schema/spec.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPRX3QIA2_cjs = require('../../chunk-PRX3QIA2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "JsonSchemaWrapper", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkPRX3QIA2_cjs.JsonSchemaWrapper; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "toStandardSchema", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkPRX3QIA2_cjs.toStandardSchema; }
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=json-schema.cjs.map
|
|
16
16
|
//# sourceMappingURL=json-schema.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
|
-
import type { JSONSchema7 } from '
|
|
2
|
+
import type { JSONSchema7 } from '../../_types/@types_json-schema/index.d.ts';
|
|
3
3
|
import type { StandardSchemaWithJSON, StandardSchemaWithJSONProps } from '../standard-schema.types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Options for creating a Standard Schema from JSON Schema.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StandardJSONSchemaV1, StandardSchemaV1 } from '../_types/@standard-schema_spec/dist/index.d.ts';
|
|
2
|
-
import type { JSONSchema7 } from '
|
|
2
|
+
import type { JSONSchema7 } from '../_types/@types_json-schema/index.d.ts';
|
|
3
3
|
import type { PublicSchema } from '../schema.types.js';
|
|
4
4
|
import type { StandardSchemaWithJSON } from './standard-schema.types.js';
|
|
5
5
|
/**
|
package/dist/zod-to-json.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema7 } from '
|
|
1
|
+
import type { JSONSchema7 } from './_types/@types_json-schema/index.d.ts';
|
|
2
2
|
import type { Targets } from 'zod-to-json-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Recursively ensures all properties in an object schema are included in the `required` array.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/schema-compat",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14-alpha.0",
|
|
4
4
|
"description": "Tool schema compatibility layer for Mastra.ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -101,30 +101,30 @@
|
|
|
101
101
|
"zod": "^3.25.0 || ^4.0.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
104
|
+
"@ai-sdk/anthropic": "^3.0.82",
|
|
105
105
|
"@ai-sdk/google": "^3.0.70",
|
|
106
106
|
"@ai-sdk/openai": "^3.0.63",
|
|
107
107
|
"@standard-schema/spec": "^1.1.0",
|
|
108
108
|
"@types/json-schema": "^7.0.15",
|
|
109
|
-
"@types/node": "22.19.
|
|
110
|
-
"@vitest/coverage-v8": "4.1.
|
|
111
|
-
"@vitest/ui": "4.1.
|
|
112
|
-
"ajv": "^8.
|
|
109
|
+
"@types/node": "22.19.21",
|
|
110
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
111
|
+
"@vitest/ui": "4.1.8",
|
|
112
|
+
"ajv": "^8.20.0",
|
|
113
113
|
"arktype": "^2.2.0",
|
|
114
|
-
"eslint": "^10.
|
|
114
|
+
"eslint": "^10.4.1",
|
|
115
115
|
"json-schema-traverse": "^1.0.0",
|
|
116
116
|
"tsup": "^8.5.1",
|
|
117
117
|
"typescript": "^6.0.3",
|
|
118
|
-
"vitest": "4.1.
|
|
118
|
+
"vitest": "4.1.8",
|
|
119
119
|
"zod": "^4.4.3",
|
|
120
120
|
"zod-v3": "npm:zod@^3.25.76",
|
|
121
|
-
"@internal/ai-sdk-v4": "0.0.
|
|
122
|
-
"@internal/ai-v6": "0.0.
|
|
123
|
-
"@internal/
|
|
124
|
-
"@internal/
|
|
125
|
-
"@internal/
|
|
126
|
-
"@internal/
|
|
127
|
-
"@internal/ai-sdk-v5": "0.0.
|
|
121
|
+
"@internal/ai-sdk-v4": "0.0.52",
|
|
122
|
+
"@internal/ai-v6": "0.0.52",
|
|
123
|
+
"@internal/llm-recorder": "0.0.41",
|
|
124
|
+
"@internal/lint": "0.0.105",
|
|
125
|
+
"@internal/test-utils": "0.0.41",
|
|
126
|
+
"@internal/types-builder": "0.0.80",
|
|
127
|
+
"@internal/ai-sdk-v5": "0.0.52"
|
|
128
128
|
},
|
|
129
129
|
"homepage": "https://mastra.ai",
|
|
130
130
|
"repository": {
|