Repository navigation
fix: mount default agent preset so Telegram sessions get the full toolset - #5
Open
j0935586110-lgtm wants to merge 1 commit into
Open
j0935586110-lgtm wants to merge 1 commit into
j0935586110-lgtm wants to merge 1 commit into
Conversation
…lset The bridge created agents via ctx.agents.create() without joining any agent preset, so Telegram sessions resolved tools against the empty global layer — only the home-level mcp-filesystem was visible, no bash/fs/web. Mount the default preset (standard) in the create setup, mirroring how the host-apiproxy web path composes agents. Adds @deepseek-ai/dsh-agent-presets as a peer dep for the injectable agentPresets service.
|
Tested — KO on rc.7: bot goes mute after applying the patch.** DSH 0.1.0-rc.7, telegram 0.1.0. Both call sites patched + inject updated. No reply, no error in logs. Revert restores behavior. The diagnosis (sessions resolve against empty global layer without a preset) is confirmed from our side. |
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.
Problem
TelegramBridgecreates agents viactx.agents.create()but never joins an agent preset. Without a preset, each Telegram session resolves its tools / prompt sections / skill catalog against the empty global layer — so only globally-registered tools (e.g. a home-level MCP filesystem) are visible, and every preset-layer tool (bash,read/write/edit,web_search,subagent,todo_write,skill,create_goal, background jobs, …) is missing.The Web UI path works because
dsh-host-apiproxycomposes agents withpresets.mount(agentCtx, resolvedId)in itssetup. This bridge skips that step.Fix
injectnow also requestsagentPresets.ctx.agents.create()call sites pass asetupthat mounts the default preset (standard):@deepseek-ai/dsh-agent-presetsas a peer dependency (for the injectableagentPresetsservice).Verification
Before the fix, a Telegram session's tool list contained only the home-level
mcp__filesystem__*tools (plusapproval:policy/sandbox:policy). After the fix,/newsessions see the fullstandardtoolset (bash,read,write,edit,glob,grep,web_search,subagent,todo_write,skill,create_goal, …).tsccompiles cleanly.