Commit 4d2ab8c
feat: generate sdk.types.ts with SDK-compatible type hierarchy
Write pre-processed types to sdk.types.ts so types.ts can re-export them:
1. spec.types.ts → preProcessTypes() → sdk.types.ts
2. sdk.types.ts → ts-to-zod → sdk.schemas.ts
3. types.ts can now re-export from sdk.types.ts + sdk.schemas.ts
Generated files:
- sdk.types.ts: Types with `extends Request`/`Notification` (not JSONRPC*)
- sdk.schemas.ts: Zod schemas matching SDK hierarchy
- sdk.schemas.zod.test.ts: Integration tests
This enables types.ts to become a thin re-export layer in a follow-up.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent e223551 commit 4d2ab8c
File tree
6 files changed
+2603
-21
lines changed- scripts
- src/generated
- test/generated
6 files changed
+2603
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
102 | 121 | | |
103 | 122 | | |
104 | | - | |
| 123 | + | |
105 | 124 | | |
106 | 125 | | |
107 | 126 | | |
| |||
121 | 140 | | |
122 | 141 | | |
123 | 142 | | |
124 | | - | |
125 | | - | |
| 143 | + | |
| 144 | + | |
126 | 145 | | |
127 | 146 | | |
128 | 147 | | |
129 | 148 | | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
133 | | - | |
134 | | - | |
| 152 | + | |
| 153 | + | |
135 | 154 | | |
136 | 155 | | |
137 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
203 | | - | |
| 211 | + | |
204 | 212 | | |
205 | 213 | | |
206 | | - | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| |||
393 | 401 | | |
394 | 402 | | |
395 | 403 | | |
396 | | - | |
| 404 | + | |
397 | 405 | | |
398 | 406 | | |
399 | 407 | | |
| |||
File renamed without changes.
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments