mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-09 03:11:58 +00:00
fix(slack): enable writable app home DMs in manifest
This commit is contained in:
parent
8e4f3ba4da
commit
24d3216175
2 changed files with 36 additions and 0 deletions
|
|
@ -48,6 +48,11 @@ def _build_full_manifest(bot_name: str, bot_description: str) -> dict:
|
|||
"background_color": "#1a1a2e",
|
||||
},
|
||||
"features": {
|
||||
"app_home": {
|
||||
"home_tab_enabled": False,
|
||||
"messages_tab_enabled": True,
|
||||
"messages_tab_read_only_enabled": False,
|
||||
},
|
||||
"bot_user": {
|
||||
"display_name": bot_name[:80],
|
||||
"always_online": True,
|
||||
|
|
@ -69,6 +74,7 @@ def _build_full_manifest(bot_name: str, bot_description: str) -> dict:
|
|||
"files:read",
|
||||
"files:write",
|
||||
"groups:history",
|
||||
"groups:read",
|
||||
"im:history",
|
||||
"im:read",
|
||||
"im:write",
|
||||
|
|
|
|||
30
tests/hermes_cli/test_slack_cli.py
Normal file
30
tests/hermes_cli/test_slack_cli.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"""Tests for Slack CLI helpers."""
|
||||
|
||||
from hermes_cli.slack_cli import _build_full_manifest
|
||||
|
||||
|
||||
class TestSlackFullManifest:
|
||||
"""Generated full Slack app manifest used by `hermes slack manifest`."""
|
||||
|
||||
def test_app_home_messages_are_writable(self):
|
||||
manifest = _build_full_manifest("Hermes", "Your Hermes agent on Slack")
|
||||
|
||||
assert manifest["features"]["app_home"] == {
|
||||
"home_tab_enabled": False,
|
||||
"messages_tab_enabled": True,
|
||||
"messages_tab_read_only_enabled": False,
|
||||
}
|
||||
|
||||
def test_private_channel_directory_scope_is_included(self):
|
||||
manifest = _build_full_manifest("Hermes", "Your Hermes agent on Slack")
|
||||
|
||||
bot_scopes = manifest["oauth_config"]["scopes"]["bot"]
|
||||
assert "groups:read" in bot_scopes
|
||||
|
||||
def test_assistant_features_remain_enabled(self):
|
||||
manifest = _build_full_manifest("Hermes", "Your Hermes agent on Slack")
|
||||
|
||||
assert "assistant_view" in manifest["features"]
|
||||
assert "assistant:write" in manifest["oauth_config"]["scopes"]["bot"]
|
||||
bot_events = manifest["settings"]["event_subscriptions"]["bot_events"]
|
||||
assert "assistant_thread_started" in bot_events
|
||||
Loading…
Add table
Add a link
Reference in a new issue