Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

feat(composer): offer roster bots in the @ picker (#43) - #65

Closed
BowmanStephen wants to merge 3 commits into
NousResearch:mainfrom
BowmanStephen:feat/43-composer-mentions
Closed

feat(composer): offer roster bots in the @ picker (#43)#65
BowmanStephen wants to merge 3 commits into
NousResearch:mainfrom
BowmanStephen:feat/43-composer-mentions

Conversation

@BowmanStephen

Copy link
Copy Markdown

What

Registers a composer.mentions provider so the composer's @ picker offers every roster bot (except the active profile) as a grouped Bots entry.

How

  • New resolveMentions({ gatewayProfile }) reads $lastRoster, excludes the active profile, maps each bot to { text: '@' + botHandle(name), display: displayName(bot, meta[name]), meta: bot.description || bot.title || 'Agent', group: 'Bots' }.
  • Registered via ctx.register({ id: 'mention-provider', area: COMPOSER_AREAS.mentions, data: { resolve: resolveMentions } }).
  • The core side (hermes-agent #86814) defines the composer.mentions seam: mention entries are merged into useAtCompletions, filtered by text or display name (case-insensitive), and tagged metadata.mention = true so they survive the mid-message inline filter alongside skills.

Compatibility

Older gateways / desktop builds without the core seam simply never call the provider — no breakage. Entries use displayName semantics (meta title wins, else profile title, else handle).

Tests

Also in this branch

…arch#48)

A bot that never had a 'Bot Chat' session made the handoff command
fail with 'No session found matching Bot Chat' and the reply silently
drop. The @mention middleware now ensures every mentioned bot has a
canonical chat before composing the handoff:

- ensureCanonicalChat() adopts an existing 'Bot Chat' session when the
  pin is missing (created via CLI/gateway) instead of minting a duplicate
- createCanonicalChat() gains { navigate: false } so the pre-flight
  never hijacks the user's view — the kickoff still runs so the gateway
  doesn't prune the zero-message session
- if pre-creation fails, the handoff note tells the agent the fallback
  (send without -c, then rename) instead of letting it vanish silently

Tests: 4 new (adopt existing, create without navigate, pinned short-
circuit, navigate:false never opens a session). 48 total, all pass.
Registers a composer.mentions provider: every roster bot (except the
active profile) appears as a grouped 'Bots' entry in the composer's @
autocomplete, with the display name from bot-meta, description/title as
the secondary line, and the @handle as the inserted text.

Needs hermes-agent PR #86814 (composer.mentions contribution surface);
on older desktop builds the plugin's registration is inert.

Tests: 4 new (roster listed, meta title override, meta fallback order,
active profile excluded). 59 total, all pass.
Upstream NousResearch#64 (hide Bot Chats) added $hideBotChats reads to
createCanonicalChat; the pre-flight test harness must stub it.
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for building this, @BowmanStephen! Closing as already implemented: the composer @ picker already surfaces roster bots today — typing @ (e.g. @maroo…) shows the bot with its description right in the native autocomplete, confirmed live in the desktop app. So the #43 gap this targets is already covered on current builds.

If you spot a specific case where a bot you'd expect is NOT offered in the picker, please open an issue with a repro and we'll take a look. The separate #48 pre-flight piece bundled here is being tracked on its own (core hermes-agent#86794); appreciate the effort.

@teknium1 teknium1 closed this Aug 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants