diff --git a/.changeset/standard-schema-spec-dependency.md b/.changeset/standard-schema-spec-dependency.md new file mode 100644 index 000000000..a248214d6 --- /dev/null +++ b/.changeset/standard-schema-spec-dependency.md @@ -0,0 +1,7 @@ +--- +'@tanstack/ai': patch +--- + +Move `@standard-schema/spec` from `devDependencies` to `dependencies`. Closes #602. + +The package's published `.d.ts` files (`types.d.ts`, `activities/chat/tools/tool-definition.d.ts`, `activities/chat/tools/schema-converter.d.ts`) import types from `@standard-schema/spec`, so consumers need it installed for type resolution to succeed. With `skipLibCheck: true`, `tsc` silently ignored the unresolved module, but type-aware tools like `@typescript-eslint` (with `recommendedTypeChecked` / `projectService: true`) failed to resolve return types — surfacing as `Unsafe assignment of an error typed value` on `useChat()` destructuring and cascading errors through downstream usages. diff --git a/packages/typescript/ai/package.json b/packages/typescript/ai/package.json index 48c68c650..8d598ef9c 100644 --- a/packages/typescript/ai/package.json +++ b/packages/typescript/ai/package.json @@ -66,6 +66,7 @@ ], "dependencies": { "@ag-ui/core": "^0.0.52", + "@standard-schema/spec": "^1.1.0", "@tanstack/ai-event-client": "workspace:*", "partial-json": "^0.1.7" }, @@ -79,7 +80,6 @@ }, "devDependencies": { "@opentelemetry/api": "^1.9.0", - "@standard-schema/spec": "^1.1.0", "@vitest/coverage-v8": "4.0.14", "zod": "^4.2.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c86e7cd66..f4e548b8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -953,6 +953,9 @@ importers: '@ag-ui/core': specifier: ^0.0.52 version: 0.0.52 + '@standard-schema/spec': + specifier: ^1.1.0 + version: 1.1.0 '@tanstack/ai-event-client': specifier: workspace:* version: link:../ai-event-client @@ -963,9 +966,6 @@ importers: '@opentelemetry/api': specifier: ^1.9.0 version: 1.9.1 - '@standard-schema/spec': - specifier: ^1.1.0 - version: 1.1.0 '@vitest/coverage-v8': specifier: 4.0.14 version: 4.0.14(vitest@4.0.14(@opentelemetry/api@1.9.1)(@types/node@24.10.3)(happy-dom@20.0.11)(jiti@2.6.1)(jsdom@27.3.0(postcss@8.5.9))(lightningcss@1.30.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))