Skip to content

feat: register terminal CLI commands declaratively - #14

Merged
offendingcommit merged 2 commits into
mainfrom
codex/feat-cli-command-registration
Jul 30, 2026
Merged

feat: register terminal CLI commands declaratively#14
offendingcommit merged 2 commits into
mainfrom
codex/feat-cli-command-registration

Conversation

@offendingcommit

@offendingcommit offendingcommit commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Plugin authors can now declare true terminal subcommands with
@command(type="cli") while the existing decorator remains a backward-compatible
slash command by default. This lets plugins use Hermes' native argparse
registration contract instead of treating terminal commands as in-session
command strings.

The command type is explicit in decorator metadata and registration summaries.
Slash and CLI namespaces can intentionally share a name, while duplicates
within either namespace still fail before partial registration. CLI handlers
must be synchronous, parser setup must also be synchronous, and invocation
logs do not expose parsed argument values or exception messages.

The release is versioned as 0.7.0. Existing positional
RegistrationSummary construction keeps the middleware field in its original
slot.

Validation

  • make test: 80 tests passed
  • Focused decorator and lifecycle suites passed
  • Real Hermes PluginContext.register_cli_command contract test passed
  • make build: source distribution and wheel built successfully
  • git diff --check origin/main: passed

Post-Deploy Monitoring & Validation

  • Watch plugin registration receipts for the expected cli_commands inventory.
  • Confirm a migrated consumer can parse hermes <command> --help and dispatch
    its handler through the host CLI.
  • Treat a missing command or register_cli_command signature error as rollback
    criteria.
  • Roll back by pinning consumers to hermes-plugin-kit 0.6.0.
  • Owner and window: plugin maintainer during the first consumer migration.

Compound Engineering

Plugin authors need a convention-correct way to expose terminal subcommands without overloading in-session slash command behavior. Preserve slash registration as the default while routing explicit CLI declarations through Hermes' native argparse registration contract.
Main added canonical plugin registration receipts after this branch was cut. Preserve that single receipt path while extending its inventory with terminal CLI commands.
@offendingcommit
offendingcommit merged commit df5debe into main Jul 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant