@integrity-labs/agt-cli 0.28.356 → 0.28.357

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.
@@ -48,7 +48,7 @@ import {
48
48
  safeWriteJsonAtomic,
49
49
  setConfigHash,
50
50
  toOpencodeModel
51
- } from "../chunk-3OVI7DRG.js";
51
+ } from "../chunk-GAWEPU6C.js";
52
52
  import {
53
53
  getProjectDir as getProjectDir2,
54
54
  getReadyTasks,
@@ -9460,7 +9460,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
9460
9460
  var lastVersionCheckAt = 0;
9461
9461
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
9462
9462
  var lastResponsivenessProbeAt = 0;
9463
- var agtCliVersion = true ? "0.28.356" : "dev";
9463
+ var agtCliVersion = true ? "0.28.357" : "dev";
9464
9464
  function resolveBrewPath(execFileSync2) {
9465
9465
  try {
9466
9466
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -37361,7 +37361,7 @@ function buildSlackMcpInstructions(opts) {
37361
37361
  "Address users by user_name, never raw user ID. In multi-participant threads the CURRENT speaker is on the latest <channel> tag.",
37362
37362
  `Reactions (slack.react sparingly - prefer a reply): :${ackReaction}: = ack (auto-added on inbound, don't duplicate); \u2705 = success.` + (skipReactionOn ? ` "${skipReaction}" = seen, not replying.` : "") + " NEVER react to signal failure of your work - on failure slack.reply one sentence explaining it (no stack traces/secrets). \u23F3 and \u274C are system-only; never add them.",
37363
37363
  skipReactionOn ? `Decided NOT to reply to a DM or thread message (different @-mention, side chat, auto_followed catch-up, nothing useful)? slack.react with "${skipReaction}" so the sender knows you saw it - never post "this wasn't for me". Top-level channel messages you may skip silently.` : "A thread message NOT addressed to you (different @-mention, side chat, auto_followed catch-up): SILENTLY SKIP - no reaction, no reply.",
37364
- 'auto_followed="true" \u2192 reply only if useful OR your bot user is @-mentioned. Deliver a file: save under your project dir, call slack.upload_file with path + channel + inbound_id.'
37364
+ 'auto_followed="true" \u2192 reply only if useful (self-mentions auto-cleared server-side). own_bot_user_id=your Slack user ID. File: slack.upload_file path+channel+inbound_id.'
37365
37365
  ].join(" ");
37366
37366
  }
37367
37367
 
@@ -40854,7 +40854,7 @@ async function resolveBotUserIdOrThrow() {
40854
40854
  err.authFailed = sawAuthFailure;
40855
40855
  throw err;
40856
40856
  }
40857
- var botUserId = null;
40857
+ var botUserId = (process.env.SLACK_OWN_BOT_USER_ID ?? "").trim() || null;
40858
40858
  var slackBotUserIdClient = createSlackBotUserIdClient({
40859
40859
  agtHost: AGT_HOST,
40860
40860
  agtApiKey: AGT_API_KEY,
@@ -43016,10 +43016,12 @@ async function connectSocketMode() {
43016
43016
  });
43017
43017
  }
43018
43018
  const isAutoFollowed = !isDirectMessage && evt.type === "message" && isThreadReply && !!threadKey && trackedThreads.has(threadKey);
43019
+ const isSelfMentioned = !!botUserId && text.includes(`<@${botUserId}>`);
43020
+ const effectiveIsAutoFollowed = isAutoFollowed && !isSelfMentioned;
43019
43021
  const shouldEngage = decideSlackEngagement({
43020
43022
  type: evt.type ?? "message",
43021
43023
  text,
43022
- isAutoFollowed,
43024
+ isAutoFollowed: effectiveIsAutoFollowed,
43023
43025
  botUserId
43024
43026
  });
43025
43027
  const participantEntry = threadKey ? trackedThreads.get(threadKey) : void 0;
@@ -43155,7 +43157,13 @@ ${forwarded.text}` : forwarded.text;
43155
43157
  // !shouldEngage) owes no reply. Additive only; no consumer gates on
43156
43158
  // these yet (Slice 2).
43157
43159
  ...conversationalLaneMeta(shouldEngage),
43158
- ...isAutoFollowed ? { auto_followed: "true" } : {},
43160
+ // ENG-7919: surface the effective auto-follow state (already cleared when
43161
+ // the bot was @-mentioned) so the agent sees auto_followed="true" only
43162
+ // when the message genuinely requires discretionary engagement judgment.
43163
+ // Also inject own_bot_user_id so the agent can identify self-mentions in
43164
+ // future without relying on external directory lookups.
43165
+ ...effectiveIsAutoFollowed ? { auto_followed: "true" } : {},
43166
+ ...botUserId ? { own_bot_user_id: botUserId } : {},
43159
43167
  // Only set these when we actually have attachments to avoid
43160
43168
  // bloating every notification with empty metadata.
43161
43169
  ...fileMeta.length > 0 ? { files: JSON.stringify(fileMeta) } : {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.356",
3
+ "version": "0.28.357",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {