feat(slack): add --no-assistant flag to manifest generation - #51487
Merged
Conversation
By default `hermes slack manifest` opts the app into Slack's AI Assistant container (assistant_view feature + assistant:write scope + assistant_thread_* events). Slack then renders DMs as the right-hand Assistant split-pane, where every exchange is a thread and bare slash commands (/help, /new, ...) are not delivered as normal command events — they only work when the bot is @mentioned. There was no way to opt out short of hand-editing the generated JSON. Add --no-assistant to emit a flat-DM manifest that omits those three pieces, so DMs render as a normal chat and slash commands dispatch inline. The regular messaging surface (Messages tab, slash commands, Socket Mode, channel + DM scopes/events) is preserved in both modes. Default behaviour is unchanged (assistant mode still on). Tests: cover both manifest modes and the argparse wiring.
Contributor
🔎 Lint report:
|
1 task
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
Adds
--no-assistanttohermes slack manifest, emitting a flat-DM manifest that omits Slack's AI Assistant container (assistant_view,assistant:write,assistant_thread_*events). DMs then render as a normal chat where bare slash commands (/help,/new) dispatch inline instead of only on@mentioninside the Assistant thread pane.Salvage of #51416 by @victor-kyriazakos, cherry-picked onto current main with authorship preserved.
Why a flag, not a default flip
The Slack adapter actively uses assistant mode:
assistant_threads.setStatuspowers the "is thinking…" indicator, andassistant_thread_startedseeds session/memory scoping before the first DM message. Defaulting assistant off would silently regress that for every user to fix a slash-in-DM problem that only bites slash-heavy DM users. Assistant-on stays the default;--no-assistantis the opt-out. The assistant-on manifest is byte-identical to before (existing test retained).Changes
hermes_cli/slack_cli.py:_build_full_manifest(..., include_assistant=True); assistant pieces gated behind the flaghermes_cli/subcommands/slack.py:--no-assistantargparse wiringtests/hermes_cli/test_slack_cli.py: argparse default/set, omission, core-surface-preserved (7 tests)Validation
--no-assistantassistant_viewassistant:writescopeassistant_thread_*events7/7 tests pass. E2E-verified argparse → manifest → JSON for both modes against a temp HERMES_HOME.
Closes #51416.
Infographic