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
{{ message }}
Repository navigation
extension types: a toolDefinition() helper so shared def consts keep literal names #248
Tools declared through a shared def const (export const fooDef = {name: 'foo', ...} — the pattern tanstack, whiteboard, ios, recorder and test-runner all use so client and server share one definition) widen name to string. ToolNameOf maps a non-literal name to never, so those tools are deliberately absent from the typed registry client — and therefore also invisible to the type-level collision checks (#247's prefix/duplicate/segment diagnostics).
Work: a toolDefinition() identity helper providing a const Name inference site, applied to the ~40 shared def objects, so every tool keeps its literal name into RegisterExtension. Mechanical after the helper exists; the type tests from packages/extension/test/extension-registry.test-d.ts are the model.
Acceptance:
A shared-def tool appears on the typed client with its literal name
Collision diagnostics cover shared-def tools (a duplicate between a shared-def tool and an inline one is a diagnostic)
No cast, no second declaration mechanism; suite green
Activity