@integrity-labs/agt-cli 0.28.936 → 0.28.937

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.
package/dist/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-LN64VNHI.js";
43
+ } from "../chunk-B73ALGR7.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.936" : "dev";
5470
+ var cliVersion = true ? "0.28.937" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6727,7 +6727,7 @@ function handleError(err) {
6727
6727
  }
6728
6728
 
6729
6729
  // src/bin/agt.ts
6730
- var cliVersion2 = true ? "0.28.936" : "dev";
6730
+ var cliVersion2 = true ? "0.28.937" : "dev";
6731
6731
  var program = new Command();
6732
6732
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6733
6733
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6965,7 +6965,7 @@ function exchangeFailureKind(err) {
6965
6965
  }
6966
6966
 
6967
6967
  // src/lib/api-client.ts
6968
- var agtCliVersion = true ? "0.28.936" : "dev";
6968
+ var agtCliVersion = true ? "0.28.937" : "dev";
6969
6969
  var lastConfigHash = null;
6970
6970
  function setConfigHash(hash) {
6971
6971
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11590,4 +11590,4 @@ export {
11590
11590
  managerInstallSystemUnitCommand,
11591
11591
  managerUninstallSystemUnitCommand
11592
11592
  };
11593
- //# sourceMappingURL=chunk-LN64VNHI.js.map
11593
+ //# sourceMappingURL=chunk-B73ALGR7.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-LN64VNHI.js";
66
+ } from "../chunk-B73ALGR7.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.937" : "dev";
13919
13943
  function resolveBrewPath(execFileSync2) {
13920
13944
  try {
13921
13945
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();