From f05bf9365086d7332c4fbe9149aa142f3f6b7fe5 Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Mon, 16 Mar 2026 22:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20check.ts=20=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0=E9=AA=8C=E8=AF=81=E5=BA=93=E4=B8=BA?= =?UTF-8?q?=20zod=EF=BC=8C=E5=8D=87=E7=BA=A7=20package.json=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=B9=B6=E6=B7=BB=E5=8A=A0=20zod=20=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/routes/cnb-env/check.ts | 6 +++--- package.json | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/agent/routes/cnb-env/check.ts b/agent/routes/cnb-env/check.ts index faa2f0f..ea0f915 100644 --- a/agent/routes/cnb-env/check.ts +++ b/agent/routes/cnb-env/check.ts @@ -1,6 +1,6 @@ import { createSkill } from '@kevisual/router'; import { app, cnbManager } from '../../app.ts'; -import { tool } from '@opencode-ai/plugin/tool'; +import { z } from 'zod'; app.route({ @@ -15,8 +15,8 @@ app.route({ title: 'CNB 登录验证信息', summary: '验证 CNB 登录信息是否有效', args: { - checkToken: tool.schema.boolean().describe('是否检查 Token 的有效性').default(true), - checkCookie: tool.schema.boolean().describe('是否检查 Cookie 的有效性').default(false), + checkToken: z.boolean().describe('是否检查 Token 的有效性').default(true), + checkCookie: z.boolean().describe('是否检查 Cookie 的有效性').default(false), }, }) } diff --git a/package.json b/package.json index 00209b4..1c4454e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/cnb", - "version": "0.0.50", + "version": "0.0.51", "description": "", "main": "index.js", "basename": "/root/cnb", @@ -46,7 +46,8 @@ "ai": "^6.0.116", "commander": "^14.0.3", "dayjs": "^1.11.20", - "dotenv": "^17.3.1" + "dotenv": "^17.3.1", + "zod": "^4.3.6" }, "publishConfig": { "access": "public" @@ -62,8 +63,7 @@ "es-toolkit": "^1.45.1", "nanoid": "^5.1.7", "unstorage": "^1.17.4", - "ws": "npm:@kevisual/ws", - "zod": "^4.3.6" + "ws": "npm:@kevisual/ws" }, "exports": { ".": "./src/index.ts",