You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sdk): address PR review for preset registry (SD-3128)
Three review findings from PR 3541:
1. Restore structured ToolCatalog.tools type. The refactor narrowed the
public catalog row to `unknown[]`, breaking TS consumers that read
tools[i].toolName etc. Move ToolCatalogEntry + ToolCatalogOperation
into presets.ts as public types and tighten the catalog signature.
2. Fail fast on malformed provider bundles. Node and Python preset
loaders previously coerced a missing or non-array `tools` field to
`[]`, hiding broken codegen output behind a silently empty tool
surface. Restore the pre-presets TOOLS_ASSET_INVALID throw at the
preset boundary.
3. Cross-lang parity for empty-string presets. Python choose_tools
treated `{'preset': ''}` as legacy via `or DEFAULT_PRESET`; Node and
MCP both raise PRESET_NOT_FOUND. Use an explicit None check so
Python matches.
Tests added covering structural catalog access, empty-string preset
fail-fast, and cross-lang parity for the empty-string case.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments