fix(build): tighten TypeScript configuration and update dependencies for zod v4 compatibility

This commit is contained in:
2026-04-30 11:27:08 +00:00
parent e8fcdd05af
commit 6f5e49e5ef
9 changed files with 1511 additions and 3890 deletions
+27
View File
@@ -0,0 +1,27 @@
{
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartagent",
"description": "Agentic loop for ai-sdk (Vercel AI SDK). Wraps streamText with stopWhen for parallel multi-step tool execution. Built on @push.rocks/smartai.",
"npmPackagename": "@push.rocks/smartagent",
"license": "MIT",
"projectDomain": "push.rocks"
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
},
"@ship.zone/szci": {
"npmGlobalTools": []
}
}
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## 2026-04-30 - 3.0.3 - fix(build)
tighten TypeScript configuration and update dependencies for zod v4 compatibility
- enable stricter TypeScript checks with noImplicitAny and explicit node types
- update HTTP tool schemas to use explicit z.record key and value types for newer zod versions
- adjust test typing for calculator operations and refresh build-related dependencies and package metadata
## 2026-03-06 - 3.0.2 - fix(agent)
use output parameter when invoking onToolResult instead of toolCall.result
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Task Venture Capital GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+15 -15
View File
@@ -24,26 +24,27 @@
"license": "MIT",
"scripts": {
"test": "(tstest test/ --verbose --logfile --timeout 120)",
"build": "(tsbuild tsfolders --allowimplicitany)",
"build": "(tsbuild tsfolders)",
"buildDocs": "(tsdoc)"
},
"devDependencies": {
"@git.zone/tsbuild": "^4.3.0",
"@git.zone/tsbundle": "^2.9.1",
"@git.zone/tsrun": "^2.0.1",
"@git.zone/tstest": "^3.3.0",
"@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsrun": "^2.0.2",
"@git.zone/tstest": "^3.6.3",
"@push.rocks/qenv": "^6.1.3",
"@types/node": "^25.3.5"
"@types/json-schema": "^7.0.15",
"@types/lodash.clonedeep": "^4.5.9",
"@types/node": "^25.6.0"
},
"dependencies": {
"@push.rocks/smartai": "^2.0.0",
"@push.rocks/smartfs": "^1.4.0",
"@push.rocks/smartfs": "^1.5.1",
"@push.rocks/smartrequest": "^5.0.1",
"@push.rocks/smartshell": "^3.3.7",
"ai": "^6.0.0",
"zod": "^3.25.0"
"@push.rocks/smartshell": "^3.3.8",
"ai": "^6.0.170",
"zod": "^4.4.1"
},
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34",
"packageManager": "pnpm@10.28.2",
"repository": {
"type": "git",
"url": "https://code.foss.global/push.rocks/smartagent.git"
@@ -59,10 +60,9 @@
"dist/**/*",
"dist_*/**/*",
"assets/**/*",
".smartconfig.json",
"license",
"npmextra.json",
"readme.md"
],
"pnpm": {
"overrides": {}
}
]
}
+1433 -3868
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -66,6 +66,7 @@ tap.test('agent should call a single tool and incorporate the result', async ()
tap.test('agent should pick the right tool from multiple options', async () => {
const callLog: string[] = [];
type TCalculatorOperation = 'add' | 'subtract' | 'multiply' | 'divide';
const result = await runAgent({
model,
@@ -79,7 +80,7 @@ tap.test('agent should pick the right tool from multiple options', async () => {
a: z.number(),
b: z.number(),
}),
execute: async ({ operation, a, b }: { operation: string; a: number; b: number }) => {
execute: async ({ operation, a, b }: { operation: TCalculatorOperation; a: number; b: number }) => {
callLog.push(`calculator:${operation}(${a}, ${b})`);
switch (operation) {
case 'add': return String(a + b);
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartagent',
version: '3.0.2',
version: '3.0.3',
description: 'Agentic loop for ai-sdk (Vercel AI SDK). Wraps streamText with stopWhen for parallel multi-step tool execution. Built on @push.rocks/smartai.'
}
+3 -3
View File
@@ -7,7 +7,7 @@ export function httpTool(): plugins.ToolSet {
inputSchema: plugins.z.object({
url: plugins.z.string().describe('URL to request'),
headers: plugins.z
.record(plugins.z.string())
.record(plugins.z.string(), plugins.z.string())
.optional()
.describe('Request headers'),
}),
@@ -39,11 +39,11 @@ export function httpTool(): plugins.ToolSet {
inputSchema: plugins.z.object({
url: plugins.z.string().describe('URL to request'),
body: plugins.z
.record(plugins.z.unknown())
.record(plugins.z.string(), plugins.z.unknown())
.optional()
.describe('JSON body to send'),
headers: plugins.z
.record(plugins.z.string())
.record(plugins.z.string(), plugins.z.string())
.optional()
.describe('Request headers'),
}),
+2 -2
View File
@@ -3,10 +3,10 @@
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noImplicitAny": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {}
"types": ["node"]
},
"exclude": ["dist_*/**/*.d.ts"]
}