@robota-sdk/agent-tools 3.0.0-beta.2 → 3.0.0-beta.4
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/dist/node/index.cjs +6 -0
- package/dist/node/index.d.cts +1 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +6 -0
- package/package.json +3 -3
package/dist/node/index.cjs
CHANGED
|
@@ -276,6 +276,12 @@ function convertZodTypeToProperty(typeObj) {
|
|
|
276
276
|
return { ...innerProperty, ...base };
|
|
277
277
|
}
|
|
278
278
|
throw new Error("ZodDefault is missing innerType; cannot convert to JSON schema.");
|
|
279
|
+
case "ZodRecord":
|
|
280
|
+
if (typeDef.valueType) {
|
|
281
|
+
const valueProperty = convertZodTypeToProperty(typeDef.valueType);
|
|
282
|
+
return { type: "object", additionalProperties: valueProperty, ...base };
|
|
283
|
+
}
|
|
284
|
+
return { type: "object", additionalProperties: { type: "string" }, ...base };
|
|
279
285
|
default:
|
|
280
286
|
throw new Error(`Unsupported Zod type: ${String(typeDef.typeName)}`);
|
|
281
287
|
}
|
package/dist/node/index.d.cts
CHANGED
package/dist/node/index.d.ts
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -226,6 +226,12 @@ function convertZodTypeToProperty(typeObj) {
|
|
|
226
226
|
return { ...innerProperty, ...base };
|
|
227
227
|
}
|
|
228
228
|
throw new Error("ZodDefault is missing innerType; cannot convert to JSON schema.");
|
|
229
|
+
case "ZodRecord":
|
|
230
|
+
if (typeDef.valueType) {
|
|
231
|
+
const valueProperty = convertZodTypeToProperty(typeDef.valueType);
|
|
232
|
+
return { type: "object", additionalProperties: valueProperty, ...base };
|
|
233
|
+
}
|
|
234
|
+
return { type: "object", additionalProperties: { type: "string" }, ...base };
|
|
229
235
|
default:
|
|
230
236
|
throw new Error(`Unsupported Zod type: ${String(typeDef.typeName)}`);
|
|
231
237
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-tools",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.4",
|
|
4
4
|
"description": "Tool registry and implementations for Robota SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"zod": "^3.24.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@robota-sdk/agent-core": "3.0.0-beta.
|
|
29
|
+
"@robota-sdk/agent-core": "3.0.0-beta.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"openapi-types": "^12.1.3",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"tsup": "^8.0.1",
|
|
35
35
|
"typescript": "^5.3.3",
|
|
36
36
|
"vitest": "^1.6.1",
|
|
37
|
-
"@robota-sdk/agent-core": "3.0.0-beta.
|
|
37
|
+
"@robota-sdk/agent-core": "3.0.0-beta.4"
|
|
38
38
|
},
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"publishConfig": {
|