Skip to content

feat(telegram): allow plugins to invoke built-in commands#151

Open
l3wi wants to merge 3 commits intobanteg:masterfrom
l3wi:feat/plugin-invoke
Open

feat(telegram): allow plugins to invoke built-in commands#151
l3wi wants to merge 3 commits intobanteg:masterfrom
l3wi:feat/plugin-invoke

Conversation

@l3wi
Copy link
Contributor

@l3wi l3wi commented Jan 15, 2026

Summary

  • Add invoke_command method to CommandExecutor protocol enabling plugins to call built-in commands like /topic, /trigger, /model, /reasoning
  • Add CommandDispatcher type alias and make_command_dispatcher factory that captures loop state
  • Context override takes precedence over ambient context when specified, allowing plugins to target specific project/branch contexts

Test plan

  • All 344 existing tests pass
  • Added 8 new tests for invoke_command functionality
  • Linting passes

🤖 Generated with Claude Code

@l3wi l3wi force-pushed the feat/plugin-invoke branch from cadd04a to 8333d39 Compare January 15, 2026 22:40
Lewis Freiberg and others added 2 commits January 18, 2026 13:09
Add invoke_command method to CommandExecutor protocol enabling plugins
to call built-in commands like /topic, /trigger, /model, /reasoning.

- Add CommandDispatcher type alias for command invocation callback
- Add invoke_command to CommandExecutor protocol with optional context override
- Implement make_command_dispatcher factory that captures loop state
- Add _invoke_builtin_command to handle built-in command routing
- Context override takes precedence over ambient context when specified

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix function name references in _invoke_builtin_command to use public handlers
- Fix test helper references to use FakeTransport and make_cfg

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@l3wi l3wi force-pushed the feat/plugin-invoke branch from 8333d39 to 8ab7b80 Compare January 18, 2026 12:11
Add reference documentation for ctx.executor.invoke_command() method
and practical usage guide for invoking built-in commands from plugins.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@l3wi
Copy link
Contributor Author

l3wi commented Jan 18, 2026

Added info to the docs ✨

@banteg banteg added the enhancement New feature or request label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants