feat(codemod): manifest handling overhaul and fixes from migrating sample dependents (#2393)
This commit is contained in:
parent
6cc7b1cb66
commit
e4e8b22dff
1 changed files with 4888 additions and 448 deletions
5
.changeset/codemod-completable-protocol.md
Normal file
5
.changeset/codemod-completable-protocol.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@modelcontextprotocol/codemod': minor
|
||||
---
|
||||
|
||||
Three migration-sweep fixes. `completable()` calls whose first argument is an optional-wrapped schema are rewritten to apply `.optional()` to the `completable(...)` result — v2 resolves completion metadata after unwrapping an outer optional wrapper, so the v1 nesting produced empty completion lists without an error; wrapper shapes the codemod cannot invert get an action-required marker instead. Imports of `Protocol` and `mergeCapabilities` from v1's `shared/protocol.js` are no longer rewritten to a member the v2 packages do not export: the symbols are dropped from the rewritten import and an action-required marker explains the replacement (`fallbackRequestHandler` for unrouted inbound requests; a plain object spread for capability merging). The manifest zod-range warning now describes the symptom by vintage — zod 4.0–4.1 ranges fail type-checking (TS2769), while zod-3 ranges fail type-checking or at the first `tools/list` depending on the imported zod entry point.
|
||||
Loading…
Reference in a new issue