@mastra/schema-compat 0.10.4-alpha.0 → 0.10.5-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.
@@ -1,23 +1,23 @@
1
1
 
2
- > @mastra/schema-compat@0.10.4-alpha.0 build /home/runner/work/mastra/mastra/packages/schema-compat
2
+ > @mastra/schema-compat@0.10.5-alpha.0 build /home/runner/work/mastra/mastra/packages/schema-compat
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.5.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 2187ms
9
+ TSC ⚡️ Build success in 2142ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/packages/schema-compat/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/packages/schema-compat/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 1840ms
16
+ DTS ⚡️ Build success in 1865ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
20
  ESM dist/index.js 21.14 KB
21
- ESM ⚡️ Build success in 111ms
21
+ ESM ⚡️ Build success in 149ms
22
22
  CJS dist/index.cjs 21.76 KB
23
- CJS ⚡️ Build success in 138ms
23
+ CJS ⚡️ Build success in 150ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mastra/schema-compat
2
2
 
3
+ ## 0.10.5-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 4da943f: Fix Cannot read properties of undefined (reading 'typeName') in schema compat check
8
+
9
+ ## 0.10.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 0c85311: Fix Google models ZodNull tool schema handling
14
+
3
15
  ## 0.10.4-alpha.0
4
16
 
5
17
  ### Patch Changes
package/LICENSE.md CHANGED
@@ -1,46 +1,15 @@
1
- # Elastic License 2.0 (ELv2)
1
+ # Apache License 2.0
2
2
 
3
- Copyright (c) 2025 Mastra AI, Inc.
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
4
 
5
- **Acceptance**
6
- By using the software, you agree to all of the terms and conditions below.
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
7
8
 
8
- **Copyright License**
9
- The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
10
 
11
- **Limitations**
12
- You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
13
-
14
- You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
15
-
16
- You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
17
-
18
- **Patents**
19
- The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
20
-
21
- **Notices**
22
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
23
-
24
- If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
25
-
26
- **No Other Rights**
27
- These terms do not imply any licenses other than those expressly granted in these terms.
28
-
29
- **Termination**
30
- If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
31
-
32
- **No Liability**
33
- As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
34
-
35
- **Definitions**
36
- The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
37
-
38
- _you_ refers to the individual or entity agreeing to these terms.
39
-
40
- _your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
41
-
42
- _your licenses_ are all the licenses granted to you for the software under these terms.
43
-
44
- _use_ means anything you do with the software requiring one of your licenses.
45
-
46
- _trademark_ means trademarks, service marks, and similar rights.
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
package/dist/index.cjs CHANGED
@@ -162,8 +162,8 @@ var SchemaCompatLayer = class {
162
162
  * @throws Error if the type is in the unsupported list
163
163
  */
164
164
  defaultUnsupportedZodTypeHandler(value, throwOnTypes = UNSUPPORTED_ZOD_TYPES) {
165
- if (throwOnTypes.includes(value._def.typeName)) {
166
- throw new Error(`${this.model.modelId} does not support zod type: ${value._def.typeName}`);
165
+ if (throwOnTypes.includes(value._def?.typeName)) {
166
+ throw new Error(`${this.model.modelId} does not support zod type: ${value._def?.typeName}`);
167
167
  }
168
168
  return value;
169
169
  }
package/dist/index.js CHANGED
@@ -160,8 +160,8 @@ var SchemaCompatLayer = class {
160
160
  * @throws Error if the type is in the unsupported list
161
161
  */
162
162
  defaultUnsupportedZodTypeHandler(value, throwOnTypes = UNSUPPORTED_ZOD_TYPES) {
163
- if (throwOnTypes.includes(value._def.typeName)) {
164
- throw new Error(`${this.model.modelId} does not support zod type: ${value._def.typeName}`);
163
+ if (throwOnTypes.includes(value._def?.typeName)) {
164
+ throw new Error(`${this.model.modelId} does not support zod type: ${value._def?.typeName}`);
165
165
  }
166
166
  return value;
167
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/schema-compat",
3
- "version": "0.10.4-alpha.0",
3
+ "version": "0.10.5-alpha.0",
4
4
  "description": "Tool schema compatibility layer for Mastra.ai",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "zod"
27
27
  ],
28
28
  "author": "",
29
- "license": "Elastic-2.0",
29
+ "license": "Apache-2.0",
30
30
  "dependencies": {
31
31
  "json-schema": "^0.4.0",
32
32
  "zod-from-json-schema": "^0.0.5",
@@ -40,12 +40,12 @@
40
40
  "@types/json-schema": "^7.0.15",
41
41
  "@types/node": "^20.19.0",
42
42
  "ai": "4.3.16",
43
- "eslint": "^9.29.0",
43
+ "eslint": "^9.30.1",
44
44
  "tsup": "^8.5.0",
45
45
  "typescript": "^5.8.3",
46
46
  "vitest": "^3.2.4",
47
47
  "zod": "^3.25.67",
48
- "@internal/lint": "0.0.17"
48
+ "@internal/lint": "0.0.19"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",
@@ -300,8 +300,8 @@ export abstract class SchemaCompatLayer {
300
300
  value: z.ZodTypeAny,
301
301
  throwOnTypes: readonly UnsupportedZodType[] = UNSUPPORTED_ZOD_TYPES,
302
302
  ): ShapeValue<T> {
303
- if (throwOnTypes.includes(value._def.typeName as UnsupportedZodType)) {
304
- throw new Error(`${this.model.modelId} does not support zod type: ${value._def.typeName}`);
303
+ if (throwOnTypes.includes(value._def?.typeName as UnsupportedZodType)) {
304
+ throw new Error(`${this.model.modelId} does not support zod type: ${value._def?.typeName}`);
305
305
  }
306
306
  return value as ShapeValue<T>;
307
307
  }