Commit b86bfc3
refactor: derive capability schemas and types from parent schemas
Schema refactoring:
- ClientTasksCapabilitySchema now extracted from ClientCapabilitiesSchema.shape.tasks.unwrap()
- ServerTasksCapabilitySchema now extracted from ServerCapabilitiesSchema.shape.tasks.unwrap()
- ElicitationCapabilitySchema now extracted from ClientCapabilitiesSchema.shape.elicitation.unwrap()
- Inline task and elicitation definitions in parent Capabilities schemas
Type generation:
- Add DERIVED_CAPABILITY_TYPES config in generate-schemas.ts
- Inject ClientTasksCapability and ServerTasksCapability type aliases during pre-processing
- Types derived as NonNullable<ParentType["property"]>
This makes the parent Capabilities schemas the single source of truth,
with sub-schemas and types derived from them.
Types.ts: ~1261 lines (down from ~2600, ~51% reduction total)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent fbb88e6 commit b86bfc3
File tree
3 files changed
+1510
-1428
lines changed- scripts
- src
- generated
3 files changed
+1510
-1428
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
113 | 123 | | |
114 | 124 | | |
115 | 125 | | |
| |||
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
148 | 161 | | |
149 | 162 | | |
150 | 163 | | |
| |||
266 | 279 | | |
267 | 280 | | |
268 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
269 | 307 | | |
270 | 308 | | |
271 | 309 | | |
| |||
0 commit comments