fix(cli): veadk agentkit shows no subcommands on Typer ≥ 0.26#605
Merged
Conversation
…stance gate
Since Typer 0.26 a TyperGroup is no longer a click.Group subclass, so the
`isinstance(agentkit_commands, click.Group)` guard evaluated False and the loop
re-exporting AgentKit's subcommands never ran — `veadk agentkit` showed no
commands at all on newer Typer. Iterate `getattr(..., 'commands', {})` by
duck-typing instead, which works across Typer versions (verified on 0.21.1 and
0.26.7).
zakahan
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
veadk agentkit --helplists no commands (only--help) in environments with a newer Typer — every re-exported AgentKit subcommand (build/config/deploy/runtime/…) disappears.Root cause
cli_agentkit.pyre-exports the AgentKit CLI's subcommands behind anisinstancegate:Since Typer 0.26 a
TyperGroupis no longer aclick.Groupsubclass, so the guard silently evaluatesFalseand the loop never runs — theagentkitgroup ends up empty. It worked on Typer 0.21 (where the isinstance held) but breaks on 0.26.7. Unrelated to the recent harness changes; this was a latent bug the version bump exposed.Fix
Drop the
isinstancegate and iterate by duck-typing on.commands(always present on a TyperGroup):Verification
veadk agentkitlists all 13 commands (unchanged).ruff+pyrightclean; full suite green (272 passed).🤖 Generated with Claude Code