Skip to content

fix: mount default agent preset so Telegram sessions get the full toolset - #5

Open
j0935586110-lgtm wants to merge 1 commit into
LoserFox:mainfrom
j0935586110-lgtm:fix/mount-agent-preset
Open

j0935586110-lgtm wants to merge 1 commit into
LoserFox:mainfrom
j0935586110-lgtm:fix/mount-agent-preset

Conversation

@j0935586110-lgtm

Copy link
Copy Markdown

Problem

TelegramBridge creates agents via ctx.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-apiproxy composes agents with presets.mount(agentCtx, resolvedId) in its setup. This bridge skips that step.

Fix

  • inject now also requests agentPresets.
  • Both ctx.agents.create() call sites pass a setup that mounts the default preset (standard):
setup: async (agentCtx) => {
  await this.ctx.agentPresets.mount(agentCtx)
}
  • Adds @deepseek-ai/dsh-agent-presets as a peer dependency (for the injectable agentPresets service).

Verification

Before the fix, a Telegram session's tool list contained only the home-level mcp__filesystem__* tools (plus approval:policy / sandbox:policy). After the fix, /new sessions see the full standard toolset (bash, read, write, edit, glob, grep, web_search, subagent, todo_write, skill, create_goal, …). tsc compiles cleanly.

…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.
@GhitGwen

Copy link
Copy Markdown

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.

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.

2 participants