feat(telegram): add agent mode overrides and shortcuts#208
Open
jemeraldo wants to merge 3 commits intobanteg:masterfrom
Open
feat(telegram): add agent mode overrides and shortcuts#208jemeraldo wants to merge 3 commits intobanteg:masterfrom
jemeraldo wants to merge 3 commits intobanteg:masterfrom
Conversation
Add /mode with per-topic/chat persistence and dynamic /<mode> shortcuts from OpenCode discovery while avoiding command collisions. Propagate mode overrides to supported runners and surface available modes in Telegram startup output with soft-fail discovery.
Raise the default agent mode discovery timeout to 8 seconds and expose it as transports.telegram.mode_discovery_timeout_s. Wire the setting through backend discovery and document the new knob for slow startup environments.
Add a generic agent-mode capability layer on engine backends and TransportRuntime so Telegram no longer probes engine CLIs directly. Wire OpenCode mode discovery through backend hooks, refresh capabilities on config reload, and update plugin/docs/test coverage to match the architecture and specification guidance.
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.
Summary
/modecommand for engine mode overrides with chat/topic persistence and clear/show flows/plan,/build, plus discovered custom modes) with collision-safe registration--agent, show discovered modes in startup message, and make mode discovery timeout configurable (transports.telegram.mode_discovery_timeout_s, default8.0)Testing
UPD
EngineBackend.discover_agent_modes+AgentModeCapabilitiesfor plugin-friendly engine supportcommands-and-directives,telegram transport,plugin-api,write-a-plugin,opencode runner,module-map)ruff,ty,pytest -q: 562 passed)