Skip to content

feat(sdk): add Slack bot reference example - #995

Merged
kantord merged 6 commits into
mainfrom
issue-883
Sep 3, 2026
Merged

kantord merged 6 commits into
mainfrom
issue-883

Conversation

@kantord

@kantord kantord commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements #883 — the Slack ↔ mecatl SDK bridge, blocked on the SDK (#821)
M1 landing and the design in #882/#881.

  • Uses Slack's newer Agent Sessions API (agent_view/app_home_opened/
    agents.sessions.setStatus) after live testing showed bolt-js's
    Assistant class targets a different, older Slack feature that never
    fires for this app's configuration — see DESIGN.md for the full story.
  • Supports DM and channel @mention (public + private), one mecatl session
    per thread, auto-approved permission asks.
  • Panel-review follow-up in the same change: a caller allowlist
    (SLACK_ALLOWED_USER_IDS) and a per-user rate limit close the "anyone
    reachable can trigger unattended command execution" gap.
  • Remaining gaps (per-run spend budget, session persistence across
    restart, streaming/stop-button/approval UI) are tracked as TODOs in
    bridge.ts/DESIGN.md, not silently dropped.
  • Adds a docker-compose setup (mecated + bot, internal-only network —
    built and verified both images locally) and CI wiring (a
    slack-bot-example job mirroring the sdk job).

Test plan

  • task slack-bot:lint / typecheck / test — green
  • task sdk:test — untouched, still green
  • docker compose build (both images) — verified locally
  • docker compose up — mecated reaches healthy, bot container starts
    correctly (fails only at Slack's real auth with fake test tokens)
  • Live-tested against a real Slack workspace: DM works end to end
    (multi-turn, same session)
  • Channel @mention (public/private) — implemented, not yet
    live-verified
    (see DESIGN.md)
  • matlatl check . --strict — clean, llms.txt regenerated

Draft while channel support is still unverified live and the new
slack-bot-example CI job hasn't run yet.

Fully or partially written by an AI agent.

@kantord
kantord marked this pull request as ready for review September 2, 2026 16:10
kantord and others added 6 commits September 3, 2026 12:32
Implements the Slack ↔ mecatl SDK bridge for #883, blocked on the SDK
(#821) M1 landing and the design in #882/#881. Uses Slack's newer Agent
Sessions API (agent_view/app_home_opened/agents.sessions.setStatus) after
live testing showed bolt-js's Assistant class targets a different, older
Slack feature that never fires for this app's configuration — see
DESIGN.md for the full story.

Supports DM and channel @mention (public + private), one mecatl session
per thread, auto-approved permission asks. Panel-review follow-up in the
same change: a caller allowlist (SLACK_ALLOWED_USER_IDS) and a per-user
rate limit close the "anyone reachable can trigger unattended command
execution" gap; remaining gaps (per-run spend budget, session persistence
across restart, streaming/stop-button/approval UI) are tracked as TODOs
in bridge.ts/DESIGN.md, not silently dropped.

Also adds a docker-compose setup (mecated + bot, internal-only network)
and CI wiring (a slack-bot-example job mirroring the sdk job).

Fully or partially written by an AI agent.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
task sdk:lint recursively scans sdk/typescript/, and the new
examples/slack-bot/biome.json was a second root config nested under
it — Biome refuses that combination outright ("Found a nested root
configuration, but there's already a root configuration"), which broke
the TypeScript SDK CI job. The example package is meant to be
independently manageable (own lockfile, own Taskfile), so the SDK's
own linter should never reach into it at all.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@kantord
kantord merged commit 12a1cdd into main Sep 3, 2026
25 checks passed
@kantord
kantord deleted the issue-883 branch September 3, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants