fix(slack): keep transient status in assistant UI - #45109
Conversation
Review: Org-specific MCP tool names in shared Slack adapterThe (("mcp_zoblin_connections_close", "close_"), "is checking Close"),
(("mcp_zoblin_connections_growth_n8n", "n8n"), "is checking n8n"),
(("mcp_zoblin_connections_railway", "railway"), "is checking Railway"),
(("mcp_google_sheets", "sheet"), "is checking Sheets"),
(("mcp_ga4", "analytics"), "is checking analytics"),These are specific to one deployment's MCP server configuration ( Suggestion: Move these to the generic fallback path or make the activity map configurable. The generic entries ( |
|
Closing: this was opened from the wrong ownership model. These Hermes operator changes are local/private unless Zavala explicitly chooses a remote under zavala-ai. |
Builds on the salvaged typing_status_text plumbing (PR #62007): instead of a static 'is thinking...', Slack's assistant status line now updates live as the agent works — 'is running pytest tests/…', 'is reading docs/api.md…' — and reverts to the static text between tool calls. Mechanics: - agent/display.py: build_status_phrase() derives a <=49-char present- tense phrase from the existing _TOOL_VERBS table (+ 'is using <name>' for plugin/MCP tools; None for _thinking). - base adapter: supports_status_text capability flag + set_status_text() per-chat store, cleared when the typing loop winds down. - Slack adapter: send_typing() renders the live phrase when set, falling back to typing_status_text then 'is thinking...'. - gateway/run.py: progress_callback stashes the phrase on tool.started and clears on tool.completed. Rendering rides the existing _keep_typing refresh cadence — zero additional Slack API calls, no rate-limit exposure. Works with tool_progress: off (Slack default); the callback is now armed whenever the adapter supports status text. - display.live_status config (full|verb|off, default full): 'verb' hides argument previews for shared/customer-facing channels. Also fixes a latent crash in the cherry-picked from_dict: malformed non-dict 'extra' sections broke typing_status_text resolution (uses the already-coerced extra dict). Design notes: status text is a side-effect display channel only — never enters the transcript, no prompt-cache impact. Lifecycle guarantees from the stuck-status fix family are preserved (per-thread tracking, clear-on-finish via existing stop_typing paths). Related: #45109 (closed; same direction via lifecycle states), #59010/#51363 (native task cards — complementary, larger scope).
Builds on the salvaged typing_status_text plumbing (PR NousResearch#62007): instead of a static 'is thinking...', Slack's assistant status line now updates live as the agent works — 'is running pytest tests/…', 'is reading docs/api.md…' — and reverts to the static text between tool calls. Mechanics: - agent/display.py: build_status_phrase() derives a <=49-char present- tense phrase from the existing _TOOL_VERBS table (+ 'is using <name>' for plugin/MCP tools; None for _thinking). - base adapter: supports_status_text capability flag + set_status_text() per-chat store, cleared when the typing loop winds down. - Slack adapter: send_typing() renders the live phrase when set, falling back to typing_status_text then 'is thinking...'. - gateway/run.py: progress_callback stashes the phrase on tool.started and clears on tool.completed. Rendering rides the existing _keep_typing refresh cadence — zero additional Slack API calls, no rate-limit exposure. Works with tool_progress: off (Slack default); the callback is now armed whenever the adapter supports status text. - display.live_status config (full|verb|off, default full): 'verb' hides argument previews for shared/customer-facing channels. Also fixes a latent crash in the cherry-picked from_dict: malformed non-dict 'extra' sections broke typing_status_text resolution (uses the already-coerced extra dict). Design notes: status text is a side-effect display channel only — never enters the transcript, no prompt-cache impact. Lifecycle guarantees from the stuck-status fix family are preserved (per-thread tracking, clear-on-finish via existing stop_typing paths). Related: NousResearch#45109 (closed; same direction via lifecycle states), NousResearch#59010/NousResearch#51363 (native task cards — complementary, larger scope).
Summary
Keeps transient gateway lifecycle/status updates in Slack Assistant status instead of falling back into permanent chat messages.
This preserves the Slack Assistant bottom status affordance for semantic states like compacting context, recalling prior context, reading files, and drafting the reply, while keeping internal lifecycle plumbing out of user-visible message history.
What changed
assistant_threads_setStatuswhen Slack thread metadata is available.Tests
pytest -o 'addopts=' tests/gateway/test_slack.py -k 'send_or_update_status or gateway_restart_status_wording_is_natural or sets_status_in_thread or noop_without_thread or missing_scope or stop_typing or send_clears_status_after_final_post or streaming_final_edit_clears_status' -q13 passed, 186 deselectedpython -m py_compile gateway/run.py gateway/platforms/slack.py tests/gateway/test_slack.pygit diff --check HEAD~1..HEAD