@toolpack-sdk/agents 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { A as AgentInput, e as AgentOutput } from './types-C3eW-auY.js';
1
+ import { A as AgentInput, f as AgentOutput } from './types-C3EZvpe0.js';
2
2
  import { Participant } from 'toolpack-sdk';
3
3
 
4
4
  /**
@@ -132,6 +132,15 @@ declare class SlackChannel extends BaseChannel {
132
132
  * ```
133
133
  */
134
134
  botUserId?: string;
135
+ /**
136
+ * The bot's Slack integration id (e.g. `'B_BOT123'`), populated by the
137
+ * startup self-check (`auth.test`) alongside `botUserId`.
138
+ *
139
+ * Used internally for self-suppression of DM `bot_message` events where
140
+ * Slack omits the `user` field (so `botUserId` comparison cannot fire).
141
+ * Not needed for regular channel posts — those carry `event.user`.
142
+ */
143
+ private botId?;
135
144
  /**
136
145
  * Normalized allowlist of channel identifiers, or `null` to accept any channel.
137
146
  * Derived from `config.channel` at construction time.
@@ -200,10 +209,11 @@ declare class SlackChannel extends BaseChannel {
200
209
  * 2. Channel allowlist (from `config.channel`): events outside the allowlist
201
210
  * are dropped. DMs (`im`/`mpim`) always pass because they are per-user, not
202
211
  * per-channel. Skipped entirely when `config.channel` is null/omitted.
203
- * 3. **Self-suppression (automatic):** events where `event.user` matches this
204
- * channel's own `botUserId` are dropped. This prevents agents from looping
205
- * on their own posts and requires no configuration — `botUserId` is
206
- * discovered via `auth.test` at startup.
212
+ * 3. **Self-suppression (automatic):** events where `event.user` matches
213
+ * `botUserId`, OR where `event.bot_id` matches `botId`, are dropped. This
214
+ * handles both channel posts (where Slack sets `event.user`) and DM posts
215
+ * (where Slack omits `event.user` but sets `event.bot_id`). Requires no
216
+ * configuration — both ids are discovered via `auth.test` at startup.
207
217
  * 4. Events without `bot_id` (human messages) pass.
208
218
  * 5. Explicit blocklist check (`blockedBotIds`) runs first for bot messages.
209
219
  * 6. If `allowedBotIds` is provided, strict mode applies: only listed bots
@@ -1,4 +1,4 @@
1
- import { A as AgentInput, e as AgentOutput } from './types-C3eW-auY.cjs';
1
+ import { A as AgentInput, f as AgentOutput } from './types-C3EZvpe0.cjs';
2
2
  import { Participant } from 'toolpack-sdk';
3
3
 
4
4
  /**
@@ -132,6 +132,15 @@ declare class SlackChannel extends BaseChannel {
132
132
  * ```
133
133
  */
134
134
  botUserId?: string;
135
+ /**
136
+ * The bot's Slack integration id (e.g. `'B_BOT123'`), populated by the
137
+ * startup self-check (`auth.test`) alongside `botUserId`.
138
+ *
139
+ * Used internally for self-suppression of DM `bot_message` events where
140
+ * Slack omits the `user` field (so `botUserId` comparison cannot fire).
141
+ * Not needed for regular channel posts — those carry `event.user`.
142
+ */
143
+ private botId?;
135
144
  /**
136
145
  * Normalized allowlist of channel identifiers, or `null` to accept any channel.
137
146
  * Derived from `config.channel` at construction time.
@@ -200,10 +209,11 @@ declare class SlackChannel extends BaseChannel {
200
209
  * 2. Channel allowlist (from `config.channel`): events outside the allowlist
201
210
  * are dropped. DMs (`im`/`mpim`) always pass because they are per-user, not
202
211
  * per-channel. Skipped entirely when `config.channel` is null/omitted.
203
- * 3. **Self-suppression (automatic):** events where `event.user` matches this
204
- * channel's own `botUserId` are dropped. This prevents agents from looping
205
- * on their own posts and requires no configuration — `botUserId` is
206
- * discovered via `auth.test` at startup.
212
+ * 3. **Self-suppression (automatic):** events where `event.user` matches
213
+ * `botUserId`, OR where `event.bot_id` matches `botId`, are dropped. This
214
+ * handles both channel posts (where Slack sets `event.user`) and DM posts
215
+ * (where Slack omits `event.user` but sets `event.bot_id`). Requires no
216
+ * configuration — both ids are discovered via `auth.test` at startup.
207
217
  * 4. Events without `bot_id` (human messages) pass.
208
218
  * 5. Explicit blocklist check (`blockedBotIds`) runs first for bot messages.
209
219
  * 6. If `allowedBotIds` is provided, strict mode applies: only listed bots