Commit 8f352b6
committed
fix(registry): dedupe getAllCommands so aliases are not emitted twice
Aliases register the same Command object under more than one path
('speech generate' -> speechSynthesize, 'search web' -> searchQuery), so the
traversal in getAllCommands returned it once per path.
config export-schema maps that list straight to tool schemas, so it emitted 19
entries with only 17 distinct names — mmx_speech_synthesize and mmx_search_query
each appeared twice. Duplicate function names are rejected by both the Anthropic
and OpenAI tool APIs, so the exported schema could not be used as-is.
Dedupe by object identity: callers of getAllCommands want the set of distinct
commands, not the set of invocation paths. Alias routing is unaffected.1 parent 7ba4460 commit 8f352b6
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
0 commit comments