v2: codemod iterations, canonical zod schema exports from sdk-shared (#2354)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
parent
7ea6fde1b6
commit
0fb8406d83
1 changed files with 2954 additions and 1665 deletions
|
|
@ -51,7 +51,7 @@
|
|||
For raw JSON Schema (e.g. TypeBox output), use the new `fromJsonSchema` adapter:
|
||||
|
||||
```typescript
|
||||
import { fromJsonSchema, AjvJsonSchemaValidator } from '@modelcontextprotocol/core';
|
||||
import { fromJsonSchema, AjvJsonSchemaValidator } from '@modelcontextprotocol/core-internal';
|
||||
|
||||
server.registerTool(
|
||||
'greet',
|
||||
|
|
@ -64,7 +64,8 @@
|
|||
|
||||
**Breaking changes:**
|
||||
- `experimental.tasks.getTaskResult()` no longer accepts a `resultSchema` parameter. Returns `GetTaskPayloadResult` (a loose `Result`); cast to the expected type at the call site.
|
||||
- Removed unused exports from `@modelcontextprotocol/core`: `SchemaInput`, `schemaToJson`, `parseSchemaAsync`, `getSchemaShape`, `getSchemaDescription`, `isOptionalSchema`, `unwrapOptionalSchema`. Use the new `standardSchemaToJsonSchema` and `validateStandardSchema` instead.
|
||||
- Removed unused exports from `@modelcontextprotocol/core-internal`: `SchemaInput`, `schemaToJson`, `parseSchemaAsync`, `getSchemaShape`, `getSchemaDescription`, `isOptionalSchema`, `unwrapOptionalSchema`. Use the new `standardSchemaToJsonSchema` and `validateStandardSchema`
|
||||
instead.
|
||||
- `completable()` remains Zod-specific (it relies on Zod's `.shape` introspection).
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
|||
Loading…
Reference in a new issue