@integrity-labs/agt-cli 0.28.1212 → 0.28.1214

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.
Files changed (28) hide show
  1. package/dist/bin/agt.js +6 -6
  2. package/dist/{chunk-QII2YF5V.js → chunk-CJ5S5WWP.js} +5 -5
  3. package/dist/{chunk-6YBTIPCB.js → chunk-HZ4EL7WU.js} +2 -2
  4. package/dist/{chunk-POUQ6BY5.js → chunk-K4Y3PMWM.js} +2 -2
  5. package/dist/{chunk-PL2SNTAN.js → chunk-KZZZUC5N.js} +2 -2
  6. package/dist/{chunk-PL2SNTAN.js.map → chunk-KZZZUC5N.js.map} +1 -1
  7. package/dist/{chunk-OFYHF2CU.js → chunk-Y2PSZAJQ.js} +3 -3
  8. package/dist/{claude-code-updater-GCXW25K2.js → claude-code-updater-PBEYKZ34.js} +3 -3
  9. package/dist/{claude-pair-runtime-FZPM6JE6.js → claude-pair-runtime-5RPDOVKD.js} +3 -3
  10. package/dist/lib/manager-worker.js +19 -19
  11. package/dist/mcp/direct-chat-channel.js +1 -1
  12. package/dist/mcp/index.js +43 -7
  13. package/dist/mcp/origami.js +1 -1
  14. package/dist/mcp/slack-channel.js +27 -15
  15. package/dist/mcp/telegram-channel.js +1 -1
  16. package/dist/{persistent-session-65FCCLDW.js → persistent-session-NCDYGOAP.js} +4 -4
  17. package/dist/{responsiveness-probe-6CJCC736.js → responsiveness-probe-6BYTKCOJ.js} +4 -4
  18. package/dist/{session-auth-dead-FWNR2IOO.js → session-auth-dead-SO5JH3MQ.js} +3 -3
  19. package/package.json +1 -1
  20. /package/dist/{chunk-QII2YF5V.js.map → chunk-CJ5S5WWP.js.map} +0 -0
  21. /package/dist/{chunk-6YBTIPCB.js.map → chunk-HZ4EL7WU.js.map} +0 -0
  22. /package/dist/{chunk-POUQ6BY5.js.map → chunk-K4Y3PMWM.js.map} +0 -0
  23. /package/dist/{chunk-OFYHF2CU.js.map → chunk-Y2PSZAJQ.js.map} +0 -0
  24. /package/dist/{claude-code-updater-GCXW25K2.js.map → claude-code-updater-PBEYKZ34.js.map} +0 -0
  25. /package/dist/{claude-pair-runtime-FZPM6JE6.js.map → claude-pair-runtime-5RPDOVKD.js.map} +0 -0
  26. /package/dist/{persistent-session-65FCCLDW.js.map → persistent-session-NCDYGOAP.js.map} +0 -0
  27. /package/dist/{responsiveness-probe-6CJCC736.js.map → responsiveness-probe-6BYTKCOJ.js.map} +0 -0
  28. /package/dist/{session-auth-dead-FWNR2IOO.js.map → session-auth-dead-SO5JH3MQ.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  rotateDailySession,
5
5
  sessionFileExists,
6
6
  todayLocalIso
7
- } from "./chunk-6YBTIPCB.js";
7
+ } from "./chunk-HZ4EL7WU.js";
8
8
  import {
9
9
  classifyUnanswerablePane,
10
10
  customApiKeyDialogKeys,
@@ -51,7 +51,7 @@ import {
51
51
  remoteMcpConnectionEnvInfix,
52
52
  remoteMcpConnectionLabel,
53
53
  remoteMcpConnectionScopedEnvVar
54
- } from "./chunk-PL2SNTAN.js";
54
+ } from "./chunk-KZZZUC5N.js";
55
55
  import {
56
56
  CLAUDE_CONFIG_DIR_ENV,
57
57
  approveApiKeyInClaudeConfig,
@@ -6173,4 +6173,4 @@ export {
6173
6173
  stopAllSessionsAndWait,
6174
6174
  getProjectDir
6175
6175
  };
6176
- //# sourceMappingURL=chunk-OFYHF2CU.js.map
6176
+ //# sourceMappingURL=chunk-Y2PSZAJQ.js.map
@@ -13,9 +13,9 @@ import {
13
13
  probeClaudeInstalls,
14
14
  readsAsNativeInstall,
15
15
  shouldRunClaudeCodeUpdater
16
- } from "./chunk-POUQ6BY5.js";
16
+ } from "./chunk-K4Y3PMWM.js";
17
17
  import "./chunk-XWVM4KPK.js";
18
- import "./chunk-PL2SNTAN.js";
18
+ import "./chunk-KZZZUC5N.js";
19
19
  import "./chunk-AIUIMEUS.js";
20
20
  import "./chunk-DGUM43GV.js";
21
21
  export {
@@ -34,4 +34,4 @@ export {
34
34
  readsAsNativeInstall,
35
35
  shouldRunClaudeCodeUpdater
36
36
  };
37
- //# sourceMappingURL=claude-code-updater-GCXW25K2.js.map
37
+ //# sourceMappingURL=claude-code-updater-PBEYKZ34.js.map
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  redactPaneFrame,
10
10
  sanitizeTerminalFrame
11
- } from "./chunk-PL2SNTAN.js";
11
+ } from "./chunk-KZZZUC5N.js";
12
12
  import {
13
13
  CLAUDE_CONFIG_DIR_ENV,
14
14
  claudeConfigDirFor,
@@ -321,7 +321,7 @@ async function spawnPairSession(session) {
321
321
  return { ok: true };
322
322
  } catch {
323
323
  }
324
- const { resolveClaudeBinary } = await import("./persistent-session-65FCCLDW.js");
324
+ const { resolveClaudeBinary } = await import("./persistent-session-NCDYGOAP.js");
325
325
  const claudeBin = resolveClaudeBinary();
326
326
  const pairEnv = {
327
327
  ...process.env,
@@ -836,4 +836,4 @@ export {
836
836
  startClaudePair,
837
837
  submitClaudePairCode
838
838
  };
839
- //# sourceMappingURL=claude-pair-runtime-FZPM6JE6.js.map
839
+ //# sourceMappingURL=claude-pair-runtime-5RPDOVKD.js.map
@@ -85,7 +85,7 @@ import {
85
85
  tripClass,
86
86
  writeEtcEnvironment,
87
87
  writeProfileDScript
88
- } from "../chunk-QII2YF5V.js";
88
+ } from "../chunk-CJ5S5WWP.js";
89
89
  import {
90
90
  CLAUDE_CODE_SECURITY_FLOOR,
91
91
  SELF_UPDATE_TIMEOUTS,
@@ -99,7 +99,7 @@ import {
99
99
  runSafeCleanup,
100
100
  tightestDiskStat,
101
101
  withPackageCacheLock
102
- } from "../chunk-POUQ6BY5.js";
102
+ } from "../chunk-K4Y3PMWM.js";
103
103
  import {
104
104
  rewriteSupervisorApiKey,
105
105
  supervisorChannelsRefusing
@@ -192,7 +192,7 @@ import {
192
192
  webFetchBaselineValue,
193
193
  webFetchRestartNeeded,
194
194
  writeEgressAllowlist
195
- } from "../chunk-OFYHF2CU.js";
195
+ } from "../chunk-Y2PSZAJQ.js";
196
196
  import {
197
197
  isAgentIdle,
198
198
  isStaleForToday,
@@ -202,7 +202,7 @@ import {
202
202
  sessionTranscriptDir,
203
203
  subagentActivityAgeSeconds,
204
204
  transcriptActivityAgeSeconds
205
- } from "../chunk-6YBTIPCB.js";
205
+ } from "../chunk-HZ4EL7WU.js";
206
206
  import {
207
207
  classifyUnanswerablePane,
208
208
  focusedConfirmDialogBlock,
@@ -330,7 +330,7 @@ import {
330
330
  stabiliseResetInstant,
331
331
  sumTranscriptUsageInWindow,
332
332
  summarizeTranscriptActivity
333
- } from "../chunk-PL2SNTAN.js";
333
+ } from "../chunk-KZZZUC5N.js";
334
334
  import {
335
335
  CLAUDE_CONFIG_DIR_ENV,
336
336
  claudeConfigDirFor,
@@ -15650,7 +15650,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
15650
15650
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
15651
15651
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
15652
15652
  async function channelInboundActivityAgeSecondsFor(codeName) {
15653
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-6CJCC736.js");
15653
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-6BYTKCOJ.js");
15654
15654
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
15655
15655
  if (newest === null) return null;
15656
15656
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -16447,7 +16447,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
16447
16447
  var lastVersionCheckAt = 0;
16448
16448
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
16449
16449
  var lastResponsivenessProbeAt = 0;
16450
- var agtCliVersion = true ? "0.28.1212" : "dev";
16450
+ var agtCliVersion = true ? "0.28.1214" : "dev";
16451
16451
  function resolveBrewPath(execFileSync3) {
16452
16452
  try {
16453
16453
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -18351,7 +18351,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
18351
18351
  if (codeNames.length === 0) return;
18352
18352
  void (async () => {
18353
18353
  try {
18354
- const { collectDiagnostics } = await import("../persistent-session-65FCCLDW.js");
18354
+ const { collectDiagnostics } = await import("../persistent-session-NCDYGOAP.js");
18355
18355
  await api.post("/host/heartbeat", {
18356
18356
  host_id: hostId,
18357
18357
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -18494,7 +18494,7 @@ async function pollCycleInner() {
18494
18494
  }
18495
18495
  try {
18496
18496
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
18497
- const { collectDiagnostics } = await import("../persistent-session-65FCCLDW.js");
18497
+ const { collectDiagnostics } = await import("../persistent-session-NCDYGOAP.js");
18498
18498
  const diagCodeNames = [...agentState.persistentSessionAgents];
18499
18499
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
18500
18500
  let tailscaleHostname;
@@ -18752,7 +18752,7 @@ async function pollCycleInner() {
18752
18752
  }
18753
18753
  try {
18754
18754
  const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
18755
- const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-GCXW25K2.js");
18755
+ const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-PBEYKZ34.js");
18756
18756
  const securityFloor = currentSecurityFloor();
18757
18757
  claudeUpdaterInFlight = true;
18758
18758
  if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
@@ -18787,7 +18787,7 @@ async function pollCycleInner() {
18787
18787
  collectPanelessActivityProbes,
18788
18788
  getResponsivenessIntervalMs,
18789
18789
  occupancyQualificationClassifications
18790
- } = await import("../responsiveness-probe-6CJCC736.js");
18790
+ } = await import("../responsiveness-probe-6BYTKCOJ.js");
18791
18791
  const probeIntervalMs = getResponsivenessIntervalMs();
18792
18792
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
18793
18793
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -18904,7 +18904,7 @@ async function pollCycleInner() {
18904
18904
  collectResponsivenessProbes,
18905
18905
  livePendingInboundOldestAgeSeconds,
18906
18906
  parkPendingInbound
18907
- } = await import("../responsiveness-probe-6CJCC736.js");
18907
+ } = await import("../responsiveness-probe-6BYTKCOJ.js");
18908
18908
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
18909
18909
  const wedgeNow = /* @__PURE__ */ new Date();
18910
18910
  const liveAgents = agentState.persistentSessionAgents;
@@ -19190,7 +19190,7 @@ async function pollCycleInner() {
19190
19190
  }
19191
19191
  }
19192
19192
  );
19193
- const { parkPendingInbound } = await import("../responsiveness-probe-6CJCC736.js");
19193
+ const { parkPendingInbound } = await import("../responsiveness-probe-6BYTKCOJ.js");
19194
19194
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
19195
19195
  paneFatalStreak.delete(codeName);
19196
19196
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -19221,7 +19221,7 @@ async function pollCycleInner() {
19221
19221
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
19222
19222
  bindSourceEscalations
19223
19223
  } = await import("../transcript-mount-health-OHE6IVJV.js");
19224
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-65FCCLDW.js");
19224
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-NCDYGOAP.js");
19225
19225
  const mountConfig = resolveTranscriptMountConfig();
19226
19226
  const liveAgents = agentState.persistentSessionAgents;
19227
19227
  for (const tracked of [
@@ -19386,7 +19386,7 @@ async function pollCycleInner() {
19386
19386
  }
19387
19387
  try {
19388
19388
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
19389
- const { probeSessionAuth } = await import("../session-auth-dead-FWNR2IOO.js");
19389
+ const { probeSessionAuth } = await import("../session-auth-dead-SO5JH3MQ.js");
19390
19390
  const observations = [];
19391
19391
  const pendingCacheCommits = [];
19392
19392
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -24116,7 +24116,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
24116
24116
  try {
24117
24117
  const freshId = rotateSessionForWedge(codeName);
24118
24118
  consecutiveWedgeCycles.delete(codeName);
24119
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-6CJCC736.js");
24119
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-6BYTKCOJ.js");
24120
24120
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
24121
24121
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
24122
24122
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -24159,7 +24159,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
24159
24159
  void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
24160
24160
  void (async () => {
24161
24161
  try {
24162
- const { collectDiagnostics } = await import("../persistent-session-65FCCLDW.js");
24162
+ const { collectDiagnostics } = await import("../persistent-session-NCDYGOAP.js");
24163
24163
  await api.post("/host/heartbeat", {
24164
24164
  host_id: hostId,
24165
24165
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -24210,7 +24210,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
24210
24210
  }
24211
24211
  try {
24212
24212
  const hostId = await getHostId();
24213
- const { collectDiagnostics } = await import("../persistent-session-65FCCLDW.js");
24213
+ const { collectDiagnostics } = await import("../persistent-session-NCDYGOAP.js");
24214
24214
  await api.post("/host/heartbeat", {
24215
24215
  host_id: hostId,
24216
24216
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -24912,7 +24912,7 @@ async function processClaudePairSessions(agents) {
24912
24912
  snapshotPairConfig,
24913
24913
  // ENG-11659: result -> report body + the manager.log line that records it.
24914
24914
  planPairStartReport
24915
- } = await import("../claude-pair-runtime-FZPM6JE6.js");
24915
+ } = await import("../claude-pair-runtime-5RPDOVKD.js");
24916
24916
  const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
24917
24917
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
24918
24918
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
@@ -44837,7 +44837,7 @@ var FLAG_REGISTRY = [
44837
44837
  },
44838
44838
  {
44839
44839
  key: "slack-scheduled-channel-guard",
44840
- description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). NOTE: enforce is currently CLAMPED to shadow host-side and setting it here will not take effect - it stays blocked until ENG-8142 teaches the Stop hook to tell a refused reply from a delivered one, because until then a blocked send fails silently (no recovery, no re-prompt, nothing in the channel). Lifting the clamp is a code change, not a flag flip.',
44840
+ description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). ENG-8794 removed the clamp, so enforce takes effect. A refused send at runtime has not been exercised on a stage. CS-1564: a thread the agent named, where a person is owed a reply, is not refused or moved.',
44841
44841
  flagType: "enum",
44842
44842
  allowedValues: ["off", "shadow", "enforce"],
44843
44843
  // Ships in SHADOW, not off: the counter is the whole point - the fleet metric
package/dist/mcp/index.js CHANGED
@@ -29018,6 +29018,36 @@ var CONDITIONAL_DELIVERY_BODY = [
29018
29018
  "Your own bookkeeping is not activity: creating, updating, or closing THIS routine's own scheduled-task / status-check card is internal housekeeping and is never, by itself, a reason to deliver."
29019
29019
  ].join("\n");
29020
29020
 
29021
+ // ../core/dist/scheduled-tasks/schedule-at.js
29022
+ function describeScheduleAt(stored, timeZone) {
29023
+ if (!stored)
29024
+ return "no time set";
29025
+ const instantMs = Date.parse(stored);
29026
+ if (Number.isNaN(instantMs))
29027
+ return stored;
29028
+ const instant = new Date(instantMs).toISOString();
29029
+ const zone = timeZone?.trim() || "UTC";
29030
+ try {
29031
+ const parts = new Map(new Intl.DateTimeFormat("en-GB", {
29032
+ timeZone: zone,
29033
+ hourCycle: "h23",
29034
+ weekday: "short",
29035
+ day: "numeric",
29036
+ month: "short",
29037
+ year: "numeric",
29038
+ hour: "2-digit",
29039
+ minute: "2-digit",
29040
+ timeZoneName: "longOffset"
29041
+ }).formatToParts(instantMs).map((p2) => [p2.type, p2.value]));
29042
+ const offsetName = parts.get("timeZoneName") ?? "GMT";
29043
+ const offset = offsetName === "GMT" ? "UTC+00:00" : offsetName.replace("GMT", "UTC");
29044
+ const when = `${parts.get("hour")}:${parts.get("minute")} ${parts.get("weekday")} ${parts.get("day")} ${parts.get("month")} ${parts.get("year")}`;
29045
+ return `${instant} (${when} in ${zone}, ${offset})`;
29046
+ } catch {
29047
+ return `${instant} (timezone "${zone}" is not recognised, so no local time)`;
29048
+ }
29049
+ }
29050
+
29021
29051
  // ../core/dist/liveness/agent-liveness.js
29022
29052
  var FRESH_HEARTBEAT_THRESHOLD_MS = 2 * 60 * 1e3;
29023
29053
 
@@ -30508,7 +30538,7 @@ var FLAG_REGISTRY = [
30508
30538
  },
30509
30539
  {
30510
30540
  key: "slack-scheduled-channel-guard",
30511
- description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). NOTE: enforce is currently CLAMPED to shadow host-side and setting it here will not take effect - it stays blocked until ENG-8142 teaches the Stop hook to tell a refused reply from a delivered one, because until then a blocked send fails silently (no recovery, no re-prompt, nothing in the channel). Lifting the clamp is a code change, not a flag flip.',
30541
+ description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). ENG-8794 removed the clamp, so enforce takes effect. A refused send at runtime has not been exercised on a stage. CS-1564: a thread the agent named, where a person is owed a reply, is not refused or moved.',
30512
30542
  flagType: "enum",
30513
30543
  allowedValues: ["off", "shadow", "enforce"],
30514
30544
  // Ships in SHADOW, not off: the counter is the whole point - the fleet metric
@@ -52405,7 +52435,7 @@ server.tool(
52405
52435
  return { content: [{ type: "text", text: "No scheduled tasks." }] };
52406
52436
  }
52407
52437
  const lines = data.tasks.map((t) => {
52408
- const schedule = t.schedule_kind === "cron" ? `cron: ${t.schedule_expr}` : t.schedule_kind === "every" ? `every: ${t.schedule_every}` : `at: ${t.schedule_at}`;
52438
+ const schedule = t.schedule_kind === "cron" ? `cron: ${t.schedule_expr}` : t.schedule_kind === "every" ? `every: ${t.schedule_every}` : `at: ${describeScheduleAt(t.schedule_at, t.timezone)}`;
52409
52439
  const status = t.enabled ? "\u2705" : "\u23F8\uFE0F";
52410
52440
  const prompt = params.include_full_prompt ? t.prompt : `${t.prompt.slice(0, 100)}${t.prompt.length > 100 ? "..." : ""}`;
52411
52441
  const truncationHint = !params.include_full_prompt && t.prompt.length > 100 ? " (preview - call again with include_full_prompt: true for the whole thing)" : "";
@@ -52423,8 +52453,8 @@ server.tool(
52423
52453
  schedule_kind: external_exports.enum(["cron", "every", "at"]).describe('Schedule type: cron (cron expression), every (interval like "30m"), at (one-time ISO timestamp)'),
52424
52454
  schedule_expr: external_exports.string().optional().describe('Cron expression (required for cron kind, e.g. "0 9 * * 1-5")'),
52425
52455
  schedule_every: external_exports.string().optional().describe('Interval (required for every kind, e.g. "30m", "2h", "1d")'),
52426
- schedule_at: external_exports.string().optional().describe('ISO 8601 timestamp (required for at kind, e.g. "2026-04-04T14:00:00Z")'),
52427
- timezone: external_exports.string().optional().describe('Timezone (default: UTC, e.g. "Australia/Sydney")'),
52456
+ schedule_at: external_exports.string().optional().describe('ISO 8601 time (required for at kind). With Z or an offset it is that exact instant ("2026-04-04T14:00:00Z"). With no offset it is local time in `timezone` ("2026-04-04T14:00:00"), and is refused if daylight saving skips or repeats it.'),
52457
+ timezone: external_exports.string().optional().describe('IANA timezone (e.g. "Australia/Sydney"). Default: the team timezone, else UTC.'),
52428
52458
  prompt: external_exports.string().describe("What to do when the task fires"),
52429
52459
  delivery_channel: external_exports.string().optional().describe('Channel platform to deliver results to (e.g. "slack", "telegram"). Default: "slack" if available.'),
52430
52460
  delivery_to: DeliveryTargetSchema.optional().describe(
@@ -52467,7 +52497,10 @@ server.tool(
52467
52497
  // twelve-hour hole.
52468
52498
  text: [
52469
52499
  `Created scheduled task "${data.task.name}" [id: ${data.task.id}]`,
52470
- params.schedule_kind === "cron" && params.schedule_expr ? describeCronCoverage(params.schedule_expr, data.task.timezone ?? params.timezone) : null
52500
+ params.schedule_kind === "cron" && params.schedule_expr ? describeCronCoverage(params.schedule_expr, data.task.timezone ?? params.timezone) : null,
52501
+ // CS-1789: say which time was stored, so a wrong reading shows now
52502
+ // rather than when the task fires.
52503
+ params.schedule_kind === "at" ? `Fires at ${describeScheduleAt(data.task.schedule_at, data.task.timezone)}` : null
52471
52504
  ].filter(Boolean).join("\n\n")
52472
52505
  }
52473
52506
  ]
@@ -52514,7 +52547,7 @@ server.tool(
52514
52547
  'Interval string (e.g. "30m", "2h") when schedule_kind is every'
52515
52548
  ),
52516
52549
  schedule_at: external_exports.string().optional().describe(
52517
- "ISO 8601 timestamp when schedule_kind is at (one-off task)"
52550
+ "ISO 8601 time when schedule_kind is at (one-off task). With Z or an offset it is that exact instant. With no offset it is local time in `timezone` if given, else in the task's timezone."
52518
52551
  ),
52519
52552
  timezone: external_exports.string().optional().describe('IANA timezone (e.g. "America/Los_Angeles")'),
52520
52553
  prompt: external_exports.string().optional().describe(
@@ -52576,7 +52609,10 @@ server.tool(
52576
52609
  if (params[key] !== void 0) updatedFields.push(key);
52577
52610
  }
52578
52611
  const summary = `Updated scheduled task ${params.task_id} (${updatedFields.join(", ") || "no changes"})`;
52579
- return { content: [{ type: "text", text: summary }] };
52612
+ const firesAt = data.task?.schedule_kind === "at" && (params.schedule_at !== void 0 || params.timezone !== void 0) ? `
52613
+
52614
+ Fires at ${describeScheduleAt(data.task.schedule_at, data.task.timezone)}` : "";
52615
+ return { content: [{ type: "text", text: `${summary}${firesAt}` }] };
52580
52616
  }
52581
52617
  );
52582
52618
  server.tool(
@@ -44343,7 +44343,7 @@ var FLAG_REGISTRY = [
44343
44343
  },
44344
44344
  {
44345
44345
  key: "slack-scheduled-channel-guard",
44346
- description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). NOTE: enforce is currently CLAMPED to shadow host-side and setting it here will not take effect - it stays blocked until ENG-8142 teaches the Stop hook to tell a refused reply from a delivered one, because until then a blocked send fails silently (no recovery, no re-prompt, nothing in the channel). Lifting the clamp is a code change, not a flag flip.',
44346
+ description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). ENG-8794 removed the clamp, so enforce takes effect. A refused send at runtime has not been exercised on a stage. CS-1564: a thread the agent named, where a person is owed a reply, is not refused or moved.',
44347
44347
  flagType: "enum",
44348
44348
  allowedValues: ["off", "shadow", "enforce"],
44349
44349
  // Ships in SHADOW, not off: the counter is the whole point - the fleet metric
@@ -39195,7 +39195,7 @@ var FLAG_REGISTRY = [
39195
39195
  },
39196
39196
  {
39197
39197
  key: "slack-scheduled-channel-guard",
39198
- description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). NOTE: enforce is currently CLAMPED to shadow host-side and setting it here will not take effect - it stays blocked until ENG-8142 teaches the Stop hook to tell a refused reply from a delivered one, because until then a blocked send fails silently (no recovery, no re-prompt, nothing in the channel). Lifting the clamp is a code change, not a flag flip.',
39198
+ description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). ENG-8794 removed the clamp, so enforce takes effect. A refused send at runtime has not been exercised on a stage. CS-1564: a thread the agent named, where a person is owed a reply, is not refused or moved.',
39199
39199
  flagType: "enum",
39200
39200
  allowedValues: ["off", "shadow", "enforce"],
39201
39201
  // Ships in SHADOW, not off: the counter is the whole point - the fleet metric
@@ -45786,19 +45786,26 @@ function recordReplyTargetClassification(agentDir, channel, classification) {
45786
45786
  function scheduledDestOverridesNamedChannel(opts) {
45787
45787
  if (opts.inboundId || opts.enforceBound) return false;
45788
45788
  if (opts.channelGuardCorrected) return false;
45789
+ if (opts.namedThreadOwed) return false;
45789
45790
  if (!opts.scheduledTargetChannel) return false;
45790
45791
  if (!opts.namedChannel) return false;
45791
45792
  return opts.scheduledTargetChannel !== opts.namedChannel;
45792
45793
  }
45794
+ function explicitThreadTsFromCaller(threadTs) {
45795
+ return typeof threadTs === "string" && threadTs ? threadTs : void 0;
45796
+ }
45793
45797
  function explicitThreadForScheduledPriority(threadTs, owedReplies) {
45794
- if (typeof threadTs !== "string" || !threadTs) return void 0;
45795
- return owedReplies(threadTs) > 0 ? threadTs : void 0;
45798
+ const explicit = explicitThreadTsFromCaller(threadTs);
45799
+ if (!explicit) return void 0;
45800
+ return owedReplies(explicit) > 0 ? explicit : void 0;
45796
45801
  }
45797
45802
  function resolveSlackScheduledPriority(opts) {
45798
45803
  const inboundUnresolved = !!opts.inboundId && opts.inboundResolved === false;
45799
45804
  const inboundWins = !!(opts.inboundId && !inboundUnresolved || opts.enforceBound);
45800
- const effectiveChannel = inboundWins ? opts.bindingChannel ?? opts.fallbackChannel : opts.scheduledDest && !inboundUnresolved ? opts.scheduledDest.channel : opts.fallbackChannel;
45801
- const keepExplicitThread = !inboundWins && !inboundUnresolved && !!opts.scheduledDest && !opts.scheduledDest.thread_ts && !!opts.explicitThreadTs && opts.fallbackChannel === opts.scheduledDest.channel;
45805
+ const keepOwedThreadElsewhere = !inboundWins && !inboundUnresolved && !!opts.scheduledDest && !!opts.explicitThreadTs && !!opts.namedThreadOwed && opts.fallbackChannel !== opts.scheduledDest.channel;
45806
+ const effectiveChannel = inboundWins ? opts.bindingChannel ?? opts.fallbackChannel : opts.scheduledDest && !inboundUnresolved && !keepOwedThreadElsewhere ? opts.scheduledDest.channel : opts.fallbackChannel;
45807
+ const keepSameChannelThread = !inboundWins && !inboundUnresolved && !!opts.scheduledDest && !opts.scheduledDest.thread_ts && !!opts.explicitThreadTs && opts.fallbackChannel === opts.scheduledDest.channel;
45808
+ const keepExplicitThread = keepSameChannelThread || keepOwedThreadElsewhere;
45802
45809
  const effectiveThreadTs = opts.forcedRoot ? void 0 : inboundWins ? opts.bindingThreadTs ?? void 0 : keepExplicitThread ? opts.explicitThreadTs ?? void 0 : opts.scheduledDest && !inboundUnresolved ? opts.scheduledDest.thread_ts : opts.fallbackThreadTs ?? void 0;
45803
45810
  const settleThreadTs = inboundWins ? opts.bindingThreadTs ?? void 0 : opts.fallbackSettleThreadTs ?? void 0;
45804
45811
  const scheduledRetarget = !inboundWins && !inboundUnresolved && !!opts.scheduledDest && !keepExplicitThread;
@@ -50397,8 +50404,16 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
50397
50404
  }
50398
50405
  const enforceBound = bindingMode === "enforce" && (binding.classification === "bound" || binding.classification === "coords_corrected");
50399
50406
  const resolvedFallbackChannel = channelGuard.corrected && channelGuard.channel ? channelGuard.channel : channel;
50407
+ const namedThreadTs = channelGuard.corrected ? channelGuard.threadTs : thread_ts;
50400
50408
  const scheduledMarker = readScheduledTurnMarker(SLACK_AGENT_DIR);
50401
- const scheduledDest = scheduledMarker ? resolveScheduledTurnDestination(scheduledMarker, { channel, thread_ts }) : null;
50409
+ const scheduledDest = scheduledMarker ? resolveScheduledTurnDestination(scheduledMarker, {
50410
+ channel: resolvedFallbackChannel,
50411
+ thread_ts: explicitThreadTsFromCaller(namedThreadTs)
50412
+ }) : null;
50413
+ const namedThreadOwed = explicitThreadForScheduledPriority(
50414
+ namedThreadTs,
50415
+ (ts) => countOwedSlackRepliesForThread(SLACK_PENDING_INBOUND_DIR, resolvedFallbackChannel, ts)
50416
+ ) !== void 0;
50402
50417
  const scheduledChannelGuardMode = resolveSlackScheduledChannelGuardMode();
50403
50418
  const scheduledChannelOverride = scheduledChannelGuardMode !== "off" && scheduledDestOverridesNamedChannel({
50404
50419
  inboundId: inbound_id,
@@ -50410,7 +50425,8 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
50410
50425
  // requested channel for a target-less marker, so comparing the resolved
50411
50426
  // value compared the raw arg against the corrected one.
50412
50427
  scheduledTargetChannel: scheduledMarker?.target?.channel_id ?? null,
50413
- namedChannel: resolvedFallbackChannel
50428
+ namedChannel: resolvedFallbackChannel,
50429
+ namedThreadOwed
50414
50430
  });
50415
50431
  if (scheduledChannelOverride) {
50416
50432
  const enforced = scheduledChannelGuardMode === "enforce";
@@ -50511,14 +50527,10 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
50511
50527
  forcedRoot,
50512
50528
  enforceBound,
50513
50529
  scheduledDest: scheduledDest ?? null,
50514
- // ENG-11715: the caller's own thread_ts, ONLY when a human in that thread
50515
- // is still owed a reply (a non-discretionary pending-inbound marker). That
50516
- // distinguishes a reply to a person from a scheduled task's output reusing
50517
- // a stale thread (ENG-7712). Read before the send settles markers.
50518
- explicitThreadTs: explicitThreadForScheduledPriority(
50519
- thread_ts,
50520
- (ts) => countOwedSlackRepliesForThread(SLACK_PENDING_INBOUND_DIR, resolvedFallbackChannel, ts)
50521
- ),
50530
+ // CS-1564: the caller's own thread_ts, whether or not anyone is owed there.
50531
+ // The resolver's option docs say when each one wins.
50532
+ explicitThreadTs: explicitThreadTsFromCaller(namedThreadTs),
50533
+ namedThreadOwed,
50522
50534
  bindingChannel: binding.channel,
50523
50535
  bindingThreadTs: binding.threadTs,
50524
50536
  fallbackChannel: resolvedFallbackChannel,
@@ -39386,7 +39386,7 @@ var FLAG_REGISTRY = [
39386
39386
  },
39387
39387
  {
39388
39388
  key: "slack-scheduled-channel-guard",
39389
- description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). NOTE: enforce is currently CLAMPED to shadow host-side and setting it here will not take effect - it stays blocked until ENG-8142 teaches the Stop hook to tell a refused reply from a delivered one, because until then a blocked send fails silently (no recovery, no re-prompt, nothing in the channel). Lifting the clamp is a code change, not a flag flip.',
39389
+ description: 'Guard on slack.reply that refuses to let an active scheduled-task destination silently move a reply to a DIFFERENT channel than the agent named (ENG-8137). CS-1505 gave an explicit inbound_id priority over the task destination but left the no-inbound_id case treating "no inbound reference" as "no destination specified" - and `channel` is a REQUIRED argument, so every call names one. The symptom: a question asked in one channel answered in another, and a reply meant as a DM landing in a public channel. Fires only when the marker carries an EXPLICIT target, the named channel differs from it, and neither an inbound_id, an enforce binding, nor an ENG-7542 channel correction is available to arbitrate. off = never runs (today behaviour: silent retarget). shadow = count + log the would-block but STILL route as today, so the false-positive rate is measurable before anyone refuses a send. enforce = block the reply and tell the agent to retry. Read live from the heartbeat flags-cache (or the env override). ENG-8794 removed the clamp, so enforce takes effect. A refused send at runtime has not been exercised on a stage. CS-1564: a thread the agent named, where a person is owed a reply, is not refused or moved.',
39390
39390
  flagType: "enum",
39391
39391
  allowedValues: ["off", "shadow", "enforce"],
39392
39392
  // Ships in SHADOW, not off: the counter is the whole point - the fleet metric
@@ -68,12 +68,12 @@ import {
68
68
  writeDirectChatSessionState,
69
69
  writeEgressAllowlist,
70
70
  writePersistentClaudeWrapper
71
- } from "./chunk-OFYHF2CU.js";
72
- import "./chunk-6YBTIPCB.js";
71
+ } from "./chunk-Y2PSZAJQ.js";
72
+ import "./chunk-HZ4EL7WU.js";
73
73
  import "./chunk-HYQ7VOC3.js";
74
74
  import "./chunk-6HBXEJHO.js";
75
75
  import "./chunk-XWVM4KPK.js";
76
- import "./chunk-PL2SNTAN.js";
76
+ import "./chunk-KZZZUC5N.js";
77
77
  import "./chunk-AIUIMEUS.js";
78
78
  import "./chunk-DGUM43GV.js";
79
79
  export {
@@ -147,4 +147,4 @@ export {
147
147
  writeEgressAllowlist,
148
148
  writePersistentClaudeWrapper
149
149
  };
150
- //# sourceMappingURL=persistent-session-65FCCLDW.js.map
150
+ //# sourceMappingURL=persistent-session-NCDYGOAP.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-OFYHF2CU.js";
4
- import "./chunk-6YBTIPCB.js";
3
+ } from "./chunk-Y2PSZAJQ.js";
4
+ import "./chunk-HZ4EL7WU.js";
5
5
  import "./chunk-HYQ7VOC3.js";
6
6
  import "./chunk-6HBXEJHO.js";
7
7
  import "./chunk-XWVM4KPK.js";
8
- import "./chunk-PL2SNTAN.js";
8
+ import "./chunk-KZZZUC5N.js";
9
9
  import "./chunk-AIUIMEUS.js";
10
10
  import "./chunk-DGUM43GV.js";
11
11
 
@@ -804,4 +804,4 @@ export {
804
804
  readAndResetSlackReplyBindingClassifications,
805
805
  readAndResetSlackReplyTargetClassifications
806
806
  };
807
- //# sourceMappingURL=responsiveness-probe-6CJCC736.js.map
807
+ //# sourceMappingURL=responsiveness-probe-6BYTKCOJ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-6YBTIPCB.js";
4
- import "./chunk-PL2SNTAN.js";
3
+ } from "./chunk-HZ4EL7WU.js";
4
+ import "./chunk-KZZZUC5N.js";
5
5
  import "./chunk-DGUM43GV.js";
6
6
 
7
7
  // src/lib/session-auth-dead.ts
@@ -205,4 +205,4 @@ export {
205
205
  decideSessionAuthState,
206
206
  probeSessionAuth
207
207
  };
208
- //# sourceMappingURL=session-auth-dead-FWNR2IOO.js.map
208
+ //# sourceMappingURL=session-auth-dead-SO5JH3MQ.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1212",
3
+ "version": "0.28.1214",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {