diff --git a/CHANGELOG.md b/CHANGELOG.md index 611968e..220bb88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ new version heading in the same commit. ## [Unreleased] +## [0.141.2] β€” 2026-07-13 +### Fixed +- **Slack: a plain message in a channel the bot sits in no longer gets the `/agent` help list.** The app + subscribes to `message.channels` so plain in-thread follow-ups reach thread-continuity β€” but that also + delivers a `message` event for *every* channel post, and a non-continuation one fell through to + `fireSlack` β†’ the `/agent` router, which replied "πŸ‘‹ Address an agent…" to ordinary channel chatter. The + socket now only starts a fresh run on an explicit **@mention** (`app_mention`) or a **DM** (`im`/`mpim`); + a plain channel message matters only as a thread continuation, otherwise it's dropped silently. Brings + Slack to parity with Discord, whose parser already ignores non-mention guild messages. + ## [0.141.1] β€” 2026-07-13 ### Fixed - **Unattended (automation/cron/task) sessions no longer leak a live pane after they finish.** An agent that diff --git a/package-lock.json b/package-lock.json index c20c91c..cbd9d3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "agent-os", - "version": "0.141.1", + "version": "0.141.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "agent-os", - "version": "0.141.1", + "version": "0.141.2", "license": "MIT", "bin": { "agent-os": "bin/agent-os" diff --git a/package.json b/package.json index 9b123f4..64894dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "agent-os", - "version": "0.141.1", + "version": "0.141.2", "description": "A generic, governed operating system for running autonomous agents safely across brands. Ships with a local web console.", "license": "MIT", "type": "commonjs", diff --git a/src/edge/slack-socket.ts b/src/edge/slack-socket.ts index 418162a..d5d7b74 100644 --- a/src/edge/slack-socket.ts +++ b/src/edge/slack-socket.ts @@ -182,6 +182,14 @@ export class SlackSocket { return; } + // Not a thread continuation. A plain channel `message` (no @mention) only reached us because the app + // subscribes to `message.channels` FOR that continuity β€” it's just chatter in a channel the bot + // happens to sit in, never a fresh trigger. Only an explicit @mention (`app_mention`) or a DM + // (`im`/`mpim`) starts a new run; otherwise drop it silently so we don't spam the `/agent` router's + // help list into the channel. (Mirrors Discord, whose parser already drops non-mention guild messages.) + const isDm = ev.channelType === 'im' || ev.channelType === 'mpim'; + if (ev.eventType !== 'app_mention' && !isDm) return; + const result = this.autos.fireSlack( { eventType: ev.eventType,