From 56a8828382ccb0802ded3c57ab64ec7f9f52604d Mon Sep 17 00:00:00 2001 From: "Anthony Fu (via agent)" Date: Thu, 13 Aug 2026 08:11:30 +0000 Subject: [PATCH] fix(inspect): drop @valibot/to-json-schema runtime dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The inspect plugin depended on @valibot/to-json-schema, which peer-depends on valibot without inspect declaring it — yielding an unmet-peer warning under Yarn (and violating devframe's validator-neutral policy, since the plugin shipped a preference for one schema library). Schema introspection now relies solely on each schema's own Standard JSON Schema converter (~standard.jsonSchema, e.g. zod 4) and degrades to a permissive object schema otherwise, mirroring the pattern already used by devframe's own MCP adapter (packages/devframe/src/adapters/mcp/to-json-schema.ts). Fixes https://github.com/devframes/devframe/issues/188 Fixed with the help of an agent. --- plugins/inspect/package.json | 1 - plugins/inspect/src/rpc/functions/_schema.ts | 17 +++++++++-------- plugins/inspect/src/types.ts | 8 ++++---- pnpm-lock.yaml | 15 --------------- pnpm-workspace.yaml | 1 - 5 files changed, 13 insertions(+), 29 deletions(-) diff --git a/plugins/inspect/package.json b/plugins/inspect/package.json index 7422cc83..dc42a8b7 100644 --- a/plugins/inspect/package.json +++ b/plugins/inspect/package.json @@ -56,7 +56,6 @@ } }, "dependencies": { - "@valibot/to-json-schema": "catalog:deps", "cac": "catalog:deps", "nostics": "catalog:deps" }, diff --git a/plugins/inspect/src/rpc/functions/_schema.ts b/plugins/inspect/src/rpc/functions/_schema.ts index 0562e26e..aec5db43 100644 --- a/plugins/inspect/src/rpc/functions/_schema.ts +++ b/plugins/inspect/src/rpc/functions/_schema.ts @@ -1,5 +1,4 @@ import type { StandardJSONSchemaV1, StandardSchemaV1 } from '@standard-schema/spec' -import { toJsonSchema } from '@valibot/to-json-schema' const FALLBACK_SCHEMA = Object.freeze({ type: 'object', additionalProperties: true }) @@ -9,17 +8,19 @@ type MaybeJsonSchema = StandardSchemaV1['~standard'] & Partial=20'} @@ -14009,10 +13998,6 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@valibot/to-json-schema@1.7.1(valibot@1.4.2(typescript@6.0.3))': - dependencies: - valibot: 1.4.2(typescript@6.0.3) - '@vercel/nft@1.5.0(rollup@4.60.3)(supports-color@10.2.2)': dependencies: '@mapbox/node-pre-gyp': 2.0.3(supports-color@10.2.2) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 92e3b5ed..c06fe075 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -77,7 +77,6 @@ catalogs: '@modelcontextprotocol/client': ^2.0.0 '@modelcontextprotocol/server': ^2.0.0 '@standard-schema/spec': ^1.1.0 - '@valibot/to-json-schema': ^1.7.1 birpc: ^4.1.0 cac: ^7.0.0 chokidar: ^5.0.0