@integrity-labs/agt-cli 0.27.90 → 0.27.92

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.
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
100
100
  return { ok: true };
101
101
  } catch {
102
102
  }
103
- const { resolveClaudeBinary } = await import("./persistent-session-BMP74QGP.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-SPGHFGCF.js");
104
104
  const claudeBin = resolveClaudeBinary();
105
105
  const pairEnv = {
106
106
  ...process.env,
@@ -373,4 +373,4 @@ export {
373
373
  startClaudePair,
374
374
  submitClaudePairCode
375
375
  };
376
- //# sourceMappingURL=claude-pair-runtime-XCZUY66M.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-JVMK3POM.js.map
@@ -16,7 +16,7 @@ import {
16
16
  provisionStopHook,
17
17
  requireHost,
18
18
  safeWriteJsonAtomic
19
- } from "../chunk-BGXIKCLR.js";
19
+ } from "../chunk-FXXCD523.js";
20
20
  import {
21
21
  getProjectDir as getProjectDir2,
22
22
  getReadyTasks,
@@ -54,7 +54,7 @@ import {
54
54
  stopPersistentSession,
55
55
  takeWatchdogGiveUpCount,
56
56
  takeZombieDetection
57
- } from "../chunk-4MZWINDQ.js";
57
+ } from "../chunk-RDIDG5IF.js";
58
58
  import {
59
59
  KANBAN_CHECK_COMMAND,
60
60
  appendDmFooter,
@@ -695,6 +695,18 @@ function extractMsTeamsBehaviourSubset(config2) {
695
695
  };
696
696
  }
697
697
 
698
+ // src/lib/slack-behaviour-restart.ts
699
+ function extractSlackBehaviourSubset(config2) {
700
+ const rawAllowed = config2?.["allowed_users"];
701
+ return {
702
+ thread_auto_follow: config2?.["thread_auto_follow"] ?? "off",
703
+ channel_response_mode: config2?.["channel_response_mode"] ?? "mention_only",
704
+ // Mirror the adapter's defensive filter exactly — a malformed entry the
705
+ // adapter would drop must not count as an env change.
706
+ allowed_users: Array.isArray(rawAllowed) ? rawAllowed.filter((v) => typeof v === "string" && v.trim().length > 0).map((v) => v.trim()) : []
707
+ };
708
+ }
709
+
698
710
  // src/lib/channel-quarantine.ts
699
711
  import { readFileSync } from "fs";
700
712
  import { join } from "path";
@@ -2942,6 +2954,14 @@ var agentState = {
2942
2954
  * the session when an operator saves the webapp's Teams Advanced panel.
2943
2955
  */
2944
2956
  knownMsTeamsBehaviourHashes: /* @__PURE__ */ new Map(),
2957
+ /**
2958
+ * ENG-6035: hash of the Slack behaviour subset (allowed_users,
2959
+ * thread_auto_follow, channel_response_mode) from the agent's slack
2960
+ * channel config. Same last-hop rationale as the Teams map above —
2961
+ * slack-channel reads SLACK_ALLOWED_USERS (and friends) once at boot,
2962
+ * so an operator save needs this dedicated value-change trigger.
2963
+ */
2964
+ knownSlackBehaviourHashes: /* @__PURE__ */ new Map(),
2945
2965
  // ---------------------------------------------------------------------------
2946
2966
  // codeName-keyed
2947
2967
  // ---------------------------------------------------------------------------
@@ -2973,6 +2993,7 @@ function clearAgentState(agentId, codeName) {
2973
2993
  agentState.knownManagedMcpStructure.delete(agentId);
2974
2994
  agentState.knownSenderPolicyHashes.delete(agentId);
2975
2995
  agentState.knownMsTeamsBehaviourHashes.delete(agentId);
2996
+ agentState.knownSlackBehaviourHashes.delete(agentId);
2976
2997
  agentState.agentDisplayNames.delete(codeName);
2977
2998
  agentState.codeNameToAgentId.delete(codeName);
2978
2999
  let channelCacheMutated = false;
@@ -3975,7 +3996,7 @@ var cachedMaintenanceWindow = null;
3975
3996
  var lastVersionCheckAt = 0;
3976
3997
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
3977
3998
  var lastResponsivenessProbeAt = 0;
3978
- var agtCliVersion = true ? "0.27.90" : "dev";
3999
+ var agtCliVersion = true ? "0.27.92" : "dev";
3979
4000
  function resolveBrewPath(execFileSync4) {
3980
4001
  try {
3981
4002
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -5166,7 +5187,7 @@ async function pollCycle() {
5166
5187
  }
5167
5188
  try {
5168
5189
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
5169
- const { collectDiagnostics } = await import("../persistent-session-BMP74QGP.js");
5190
+ const { collectDiagnostics } = await import("../persistent-session-SPGHFGCF.js");
5170
5191
  const diagCodeNames = [...agentState.persistentSessionAgents];
5171
5192
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
5172
5193
  let tailscaleHostname;
@@ -5239,7 +5260,7 @@ async function pollCycle() {
5239
5260
  const {
5240
5261
  collectResponsivenessProbes,
5241
5262
  getResponsivenessIntervalMs
5242
- } = await import("../responsiveness-probe-AFOPQEFX.js");
5263
+ } = await import("../responsiveness-probe-PR7RS6JB.js");
5243
5264
  const probeIntervalMs = getResponsivenessIntervalMs();
5244
5265
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
5245
5266
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -5472,6 +5493,13 @@ async function pollCycle() {
5472
5493
  },
5473
5494
  log,
5474
5495
  now: () => Date.now()
5496
+ }, {
5497
+ // ENG-6055: heal-keystroke escalation. 'disturb' (default) retries
5498
+ // with x→BSpace→Enter after the first bare Enter fails — a bare
5499
+ // retry repeats the exact keystroke the stuck TUI state eats
5500
+ // (kylie 2026-06-05). AGT_INPUT_HEAL_MODE=bare reverts to the
5501
+ // pre-ENG-6055 behaviour if a future CC/tmux pairing misbehaves.
5502
+ healMode: process.env.AGT_INPUT_HEAL_MODE === "bare" ? "bare" : "disturb"
5475
5503
  });
5476
5504
  }
5477
5505
  const lastHealthCheck = lastHarvestAt.get("__cron_health__") ?? 0;
@@ -6165,6 +6193,7 @@ async function processAgent(agent, agentStates) {
6165
6193
  );
6166
6194
  }
6167
6195
  agentState.knownSenderPolicyHashes.set(agent.agent_id, senderPolicyHash);
6196
+ let msteamsBehaviourRestartScheduled = false;
6168
6197
  if (currentChannelIds.has("msteams")) {
6169
6198
  const msteamsEntry = refreshData.channel_configs?.["msteams"];
6170
6199
  const behaviourSubset = extractMsTeamsBehaviourSubset(
@@ -6206,11 +6235,59 @@ async function processAgent(agent, agentStates) {
6206
6235
  "msteams behaviour change",
6207
6236
  "channel-behaviour-change"
6208
6237
  );
6238
+ msteamsBehaviourRestartScheduled = true;
6209
6239
  }
6210
6240
  agentState.knownMsTeamsBehaviourHashes.set(agent.agent_id, behaviourHash);
6211
6241
  } else {
6212
6242
  agentState.knownMsTeamsBehaviourHashes.delete(agent.agent_id);
6213
6243
  }
6244
+ if (currentChannelIds.has("slack")) {
6245
+ const slackEntry = refreshData.channel_configs?.["slack"];
6246
+ const slackBehaviourSubset = extractSlackBehaviourSubset(
6247
+ slackEntry?.config
6248
+ );
6249
+ const slackBehaviourHash = createHash3("sha256").update(canonicalJson(slackBehaviourSubset)).digest("hex");
6250
+ const prevSlackBehaviourHash = agentState.knownSlackBehaviourHashes.get(agent.agent_id);
6251
+ const slackBehaviourDecision = decideSenderPolicyRestart({
6252
+ previousHash: prevSlackBehaviourHash,
6253
+ currentHash: slackBehaviourHash,
6254
+ sessionMode: refreshData.agent.session_mode,
6255
+ framework: agentFrameworkCache.get(agent.code_name) ?? "openclaw",
6256
+ sessionHealthy: isSessionHealthy(agent.code_name),
6257
+ // A channel-set, sender-policy, or msteams-behaviour restart
6258
+ // scheduled this tick respawns the MCP children with the
6259
+ // freshly-written env for free.
6260
+ channelSetRestartAlreadyScheduled: channelSetRestartScheduled || senderPolicyDecision.restart || msteamsBehaviourRestartScheduled
6261
+ });
6262
+ if (slackBehaviourDecision.restart) {
6263
+ log(
6264
+ `[hot-reload] slack behaviour settings changed for '${agent.code_name}' (${prevSlackBehaviourHash?.slice(0, 8) ?? "first"} \u2192 ${slackBehaviourHash.slice(0, 8)}) \u2014 restarting session`
6265
+ );
6266
+ const slackBehaviourNotice = "Your Slack channel behaviour settings were updated. Restarting session shortly so the slack-channel MCP picks up the new configuration.";
6267
+ const slackBehaviourDelivered = await injectMessage(
6268
+ agent.code_name,
6269
+ "system",
6270
+ slackBehaviourNotice,
6271
+ { task_name: "channel-update" },
6272
+ log
6273
+ ).catch(() => false);
6274
+ const slackBehaviourDelay = slackBehaviourDelivered ? 8e3 : 3e3;
6275
+ if (!slackBehaviourDelivered) {
6276
+ log(
6277
+ `[hot-reload] Inject notification unconfirmed for '${agent.code_name}' \u2014 proceeding with shorter delay`
6278
+ );
6279
+ }
6280
+ scheduleSessionRestart(
6281
+ agent.code_name,
6282
+ slackBehaviourDelay,
6283
+ "slack behaviour change",
6284
+ "channel-behaviour-change"
6285
+ );
6286
+ }
6287
+ agentState.knownSlackBehaviourHashes.set(agent.agent_id, slackBehaviourHash);
6288
+ } else {
6289
+ agentState.knownSlackBehaviourHashes.delete(agent.agent_id);
6290
+ }
6214
6291
  }
6215
6292
  const agentSessionMode = refreshData.agent.session_mode;
6216
6293
  if (agentSessionMode === "persistent" && (agentFrameworkCache.get(agent.code_name) ?? "openclaw") === "claude-code") {
@@ -9484,7 +9561,7 @@ async function processClaudePairSessions(agents) {
9484
9561
  killPairSession,
9485
9562
  pairTmuxSession,
9486
9563
  finalizeClaudePairOnboarding
9487
- } = await import("../claude-pair-runtime-XCZUY66M.js");
9564
+ } = await import("../claude-pair-runtime-JVMK3POM.js");
9488
9565
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
9489
9566
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
9490
9567
  const killed = await killPairSession(pairTmuxSession(pairId));