@integrity-labs/agt-cli 0.28.936 → 0.28.938

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.
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-LN64VNHI.js";
66
+ } from "../chunk-HEXKSBBV.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -9722,10 +9722,32 @@ function matchesThirdPartyGrant(evt, thirdPartyBots) {
9722
9722
  return false;
9723
9723
  return thirdPartyBots.some((b) => b.bot_id === botId || b.bot_user_id === botId);
9724
9724
  }
9725
+ function humanEditedMessage(evt) {
9726
+ if (evt.type !== "message" || evt.subtype !== "message_changed")
9727
+ return null;
9728
+ const inner = evt.message;
9729
+ if (!inner?.edited)
9730
+ return null;
9731
+ const merged = { ...evt };
9732
+ delete merged["message"];
9733
+ delete merged["subtype"];
9734
+ for (const [k, v] of Object.entries(inner)) {
9735
+ if (k === "edited" || v === void 0)
9736
+ continue;
9737
+ merged[k] = v;
9738
+ }
9739
+ merged["type"] = "message";
9740
+ if (evt.ts !== void 0)
9741
+ merged["edit_ts"] = evt.ts;
9742
+ return merged;
9743
+ }
9725
9744
  function decideSlackMessageForward(evt, thirdPartyBots) {
9726
9745
  if (evt.type !== "message") {
9727
9746
  return { forward: true };
9728
9747
  }
9748
+ const edited = humanEditedMessage(evt);
9749
+ if (edited)
9750
+ return decideSlackMessageForward(edited, thirdPartyBots);
9729
9751
  const granted = matchesThirdPartyGrant(evt, thirdPartyBots);
9730
9752
  if (!ALLOWED_MESSAGE_SUBTYPES.has(evt.subtype)) {
9731
9753
  if (!granted || evt.subtype !== "bot_message") {
@@ -9756,6 +9778,8 @@ function isAppMentionEcho(evt, botUserId) {
9756
9778
  function slackInboundDedupId(evt) {
9757
9779
  if (!evt.channel || !evt.ts)
9758
9780
  return null;
9781
+ if (evt.edit_ts)
9782
+ return `${evt.channel}:${evt.ts}:message_edit:${evt.edit_ts}`;
9759
9783
  return `${evt.channel}:${evt.ts}:${evt.type ?? "unknown"}`;
9760
9784
  }
9761
9785
  function mentionsUser(text, userId) {
@@ -13915,7 +13939,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13915
13939
  var lastVersionCheckAt = 0;
13916
13940
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13917
13941
  var lastResponsivenessProbeAt = 0;
13918
- var agtCliVersion = true ? "0.28.936" : "dev";
13942
+ var agtCliVersion = true ? "0.28.938" : "dev";
13919
13943
  function resolveBrewPath(execFileSync2) {
13920
13944
  try {
13921
13945
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();