feat(managed_agents): Slack stateless webhook bridge template#614
Merged
Conversation
2 tasks
Stateless TypeScript/Bun bridge connecting Slack's Events API to
Managed Agents via CMA outbound webhooks — no held SSE streams, no
session-map DB (session.metadata carries channel + thread_ts).
- setup/create-agent.ts: one-time agent + environment (claude-opus-4-7)
- src/slack-events.ts: v0 HMAC verify, url_verification, fire-and-forget
kickoff (acks Slack within 3s)
- src/agent.ts: sessions.create with {slack_channel, slack_thread_ts}
- src/cma-webhook.ts: beta.webhooks.unwrap -> retrieve-then-filter ->
chat.postMessage in-thread
- README: diagram + 'bun install && claude' quickstart
- CLAUDE.md: invoke /claude-api, read skill.md, offer extensions menu
- skill.md: walkthrough, gotchas (sandbox, scope-vs-subscription,
xoxb-vs-xapp, workspace fan-out, retrieve-then-filter), debugging
Uses @anthropic-ai/sdk ^0.95.1 (beta.webhooks.unwrap).
16d734d to
103cc79
Compare
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.
Minimal TypeScript/Bun template connecting Slack's Events API to Claude Managed Agents using CMA outbound webhooks — no held SSE streams, no session-map database.
The CMA session
metadata(slack_channel,slack_thread_ts) is the entire routing state. Bridge is stateless, restart-safe, horizontally scalable.managed_agents/slack/README.md— diagram +bun install && claudequickstartCLAUDE.md— invokes/claude-api, readsskill.md, drives guided setup + extensions menuskill.md— walkthrough, gotchas (developer sandbox, scope-vs-subscription,xoxbvsxapp, workspace fan-out, retrieve-then-filter), debuggingsrc/+setup/— ~270 LOC, typechecks on@anthropic-ai/sdk@^0.95.1Proven end-to-end against a live Slack sandbox.
Sibling Linear template: #607