Commit c8bc264
committed
refactor: eliminate sdk-compat.ts via isSpecType() (typescript-sdk#1887)
- spec.types.ts: import RequestId from @modelcontextprotocol/client (already public)
- app.ts/app-bridge.ts: replace pass-through *Schema shims with z.custom<T>(v => isSpecType('T', v))
- generate-schemas.ts: emit isSpecType-backed z.custom for external SDK types instead of importing from sdk-compat
- delete src/sdk-compat.ts
Friction surfaced: ExtensionHandle.setRequestHandler/sendRequest accept AnySchema (Zod-only),
so specTypeSchema()'s StandardSchemaV1 return cannot be passed directly. Wrapped via
z.custom(isSpecType) instead. #1868 should widen the param type to StandardSchemaV1 | AnySchema.1 parent 76b3ba7 commit c8bc264
File tree
9 files changed
+76
-155
lines changed- docs
- scripts
- src
- generated
9 files changed
+76
-155
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
117 | | - | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
194 | | - | |
195 | | - | |
196 | | - | |
| 196 | + | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
| 200 | + | |
200 | 201 | | |
| 202 | + | |
201 | 203 | | |
202 | | - | |
203 | | - | |
| 204 | + | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
| |||
637 | 634 | | |
638 | 635 | | |
639 | 636 | | |
640 | | - | |
| 637 | + | |
641 | 638 | | |
642 | 639 | | |
643 | 640 | | |
| |||
651 | 648 | | |
652 | 649 | | |
653 | 650 | | |
654 | | - | |
| 651 | + | |
655 | 652 | | |
656 | 653 | | |
657 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 23 | + | |
| 24 | + | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
234 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
240 | 237 | | |
241 | 238 | | |
242 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
243 | 242 | | |
244 | 243 | | |
245 | 244 | | |
| |||
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | | - | |
| 433 | + | |
435 | 434 | | |
436 | 435 | | |
437 | 436 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments