Repository navigation
Share Slack follow-up routing with durable hosts - #29
Merged
Merged
Conversation
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.
Durable Slack hosts currently normalize events with AgentChat but must implement their own rule for accepting unmentioned thread replies. Add
SlackHost.accepts(event, subscribed=...)and share the routing policy with the existing Rust/Node and Python Slack adapters. Hosts supply their saved subscription state and retain authorization, pause policy, persistence, and agent execution.The public method performs no I/O, creates no subscriptions, validates the event workspace, and preserves normalization/exclusion behavior. Documents integration with an existing durable conversation binding. Also annotates an existing Python FFI signature whose keyword arguments trigger the workspace Clippy limit.
Validation: full Python suite, 83 Rust workspace tests, Ruff, public Python typing smoke, cargo fmt, and Clippy with warnings denied. Tests cover subscribed/unsubscribed replies, mentions, DMs, quoted mentions, bot echoes, exclusions, subscription removal, malformed events, and workspace isolation.
Consumer integration: BerriAI/moyai#754. Moyai passes its existing thread binding as the subscription snapshot; it retains session ownership, authorization, pause policy and durable turn admission.
Real consumer demonstration
Ran actual baseline and final Moyai deployments with separate PostgreSQL databases, API/coordinator/broker/worker processes, local Temporal, and a real dev-gateway model (
openai/gpt-6-astra). A signed mention establishes context; an unmentioned follow-up receives the correct remembered code word in the same session. A duplicate event and an unrelated thread produce zero extra turns. Both revisions pass because this extracts existing behavior into the SDK. Slack HTTP was captured locally and S3 used moto; there were no real Slack posts.Before: Moyai
7a11af3, SDK6985d19. After: Moyai163737d, SDK1af6a76.The full comparison, setup and validation details are in BerriAI/moyai#754. Below is the actual final application recording (27s) and screenshot.
followups-after.mp4