@integrity-labs/agt-cli 0.28.1213 → 0.28.1215

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 (30) hide show
  1. package/dist/bin/agt.js +6 -6
  2. package/dist/{chunk-4CZE7RP3.js → chunk-BPXFPKJ4.js} +14 -13
  3. package/dist/chunk-BPXFPKJ4.js.map +1 -0
  4. package/dist/{chunk-R5LKV5S3.js → chunk-HZ4EL7WU.js} +2 -2
  5. package/dist/{chunk-BNNSPFLM.js → chunk-K4Y3PMWM.js} +2 -2
  6. package/dist/{chunk-HIL72LVG.js → chunk-KZZZUC5N.js} +2 -2
  7. package/dist/{chunk-HIL72LVG.js.map → chunk-KZZZUC5N.js.map} +1 -1
  8. package/dist/{chunk-UNWOF62A.js → chunk-Y2PSZAJQ.js} +3 -3
  9. package/dist/{claude-code-updater-WKIW4KL7.js → claude-code-updater-PBEYKZ34.js} +3 -3
  10. package/dist/{claude-pair-runtime-NPBJS73B.js → claude-pair-runtime-5RPDOVKD.js} +3 -3
  11. package/dist/lib/manager-worker.js +19 -19
  12. package/dist/mcp/augmented-admin.js +19 -0
  13. package/dist/mcp/direct-chat-channel.js +1 -1
  14. package/dist/mcp/index.js +1 -1
  15. package/dist/mcp/origami.js +1 -1
  16. package/dist/mcp/slack-channel.js +27 -15
  17. package/dist/mcp/telegram-channel.js +1 -1
  18. package/dist/{persistent-session-YA4OONJJ.js → persistent-session-NCDYGOAP.js} +4 -4
  19. package/dist/{responsiveness-probe-Z2V5JZAI.js → responsiveness-probe-6BYTKCOJ.js} +4 -4
  20. package/dist/{session-auth-dead-M3BMV27A.js → session-auth-dead-SO5JH3MQ.js} +3 -3
  21. package/package.json +1 -1
  22. package/dist/chunk-4CZE7RP3.js.map +0 -1
  23. /package/dist/{chunk-R5LKV5S3.js.map → chunk-HZ4EL7WU.js.map} +0 -0
  24. /package/dist/{chunk-BNNSPFLM.js.map → chunk-K4Y3PMWM.js.map} +0 -0
  25. /package/dist/{chunk-UNWOF62A.js.map → chunk-Y2PSZAJQ.js.map} +0 -0
  26. /package/dist/{claude-code-updater-WKIW4KL7.js.map → claude-code-updater-PBEYKZ34.js.map} +0 -0
  27. /package/dist/{claude-pair-runtime-NPBJS73B.js.map → claude-pair-runtime-5RPDOVKD.js.map} +0 -0
  28. /package/dist/{persistent-session-YA4OONJJ.js.map → persistent-session-NCDYGOAP.js.map} +0 -0
  29. /package/dist/{responsiveness-probe-Z2V5JZAI.js.map → responsiveness-probe-6BYTKCOJ.js.map} +0 -0
  30. /package/dist/{session-auth-dead-M3BMV27A.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-R5LKV5S3.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-HIL72LVG.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-UNWOF62A.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-BNNSPFLM.js";
16
+ } from "./chunk-K4Y3PMWM.js";
17
17
  import "./chunk-XWVM4KPK.js";
18
- import "./chunk-HIL72LVG.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-WKIW4KL7.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-HIL72LVG.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-YA4OONJJ.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-NPBJS73B.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-4CZE7RP3.js";
88
+ } from "../chunk-BPXFPKJ4.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-BNNSPFLM.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-UNWOF62A.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-R5LKV5S3.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-HIL72LVG.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-Z2V5JZAI.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.1213" : "dev";
16450
+ var agtCliVersion = true ? "0.28.1215" : "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-YA4OONJJ.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-YA4OONJJ.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-WKIW4KL7.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-Z2V5JZAI.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-Z2V5JZAI.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-Z2V5JZAI.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-YA4OONJJ.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-M3BMV27A.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-Z2V5JZAI.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-YA4OONJJ.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-YA4OONJJ.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-NPBJS73B.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)}`);
@@ -21261,6 +21261,10 @@ var AdminDebugClient = class _AdminDebugClient {
21261
21261
  getAgentIntegrations(agentId) {
21262
21262
  return this.get(`/admin/debug/agents/${encodeURIComponent(agentId)}/integrations`);
21263
21263
  }
21264
+ /** The agent's skills (agent + team + org + global) and routines/schedules, metadata only (CS-2237). */
21265
+ getAgentSkills(agentId) {
21266
+ return this.get(`/admin/debug/agents/${encodeURIComponent(agentId)}/skills`);
21267
+ }
21264
21268
  searchHosts(args) {
21265
21269
  return this.get("/admin/debug/hosts", _AdminDebugClient.cleanQuery(args));
21266
21270
  }
@@ -21486,6 +21490,9 @@ var getAgentSchema = strictObject({
21486
21490
  var getAgentIntegrationsSchema = strictObject({
21487
21491
  agent_id: external_exports.string().min(1).max(64).describe("The agent UUID whose effective integration set to resolve.")
21488
21492
  });
21493
+ var getAgentSkillsSchema = strictObject({
21494
+ agent_id: external_exports.string().min(1).max(64).describe("The agent UUID whose skills, routines and schedules to list (metadata only).")
21495
+ });
21489
21496
  var searchHostsSchema = strictObject({
21490
21497
  q: external_exports.string().max(128).optional().describe("Case-insensitive substring match on host name."),
21491
21498
  status: external_exports.string().max(32).optional().describe("Filter by host status (active | decommissioned)."),
@@ -21787,6 +21794,18 @@ server.registerTool(
21787
21794
  }
21788
21795
  }
21789
21796
  );
21797
+ server.registerTool(
21798
+ "debug_get_agent_skills",
21799
+ { description: "List ONE agent's skills, routines and schedules as METADATA ONLY (CS-2237) - the read for \"which skills does this agent actually get, from which scope, and is that routine/schedule running?\". Returns { agent_id, code_name, team_id, organization_id, skills[], skill_counts, skill_scopes_queried, routines[], schedules[], last_run_lookup, not_covered[] }. Skills cover every scope the agent receives from (agent + team + organization + global); each entry is { id, code_name, display_name, description, scope, version, status (draft | published), updated_at, effective, not_effective_reason (draft | shadowed_by_more_specific | blank_body | null), shadowed_by_scope }. `effective` mirrors the host-refresh delivery rails: only published rows are delivered, the most specific published scope wins per code_name, and a blank override still shadows (the agent then gets neither). Schedules are agent_scheduled_tasks (`source: scheduled_task`) and recurring kanban templates (`source: recurring_kanban`): { id, source, name, schedule_kind, cron, every, at, timezone, status (enabled | disabled), routine_id, routine_role, last_run, next_run_at, next_run_basis, last_delivery_status, last_delivery_at, consecutive_failure_count, updated_at }. Routines are { id, name, status, paused, paused_at, origin, executor, recurrence { kind, cron, every, timezone }, runtimes[], last_run, next_run_at, updated_at }, with last/next run taken from the routine's execute-role runtime. `last_run` is { state: 'found', at, outcome } | { state: 'none' } | { state: 'none_in_retention', retention_days } | { state: 'unavailable', reason }. `none` means it provably never ran (created inside the 90-day runs retention window); `none_in_retention` means no run in the last 90 days, NOT that it never ran; `unavailable` means the runs lookup failed or was truncated - check `last_run_lookup`. NEVER returns skill bodies, routine descriptions, scheduled-task prompts or delivery targets, and there is no option to include them. Integration-bundled child skills are not listed here (see debug_get_agent_integrations). Fails closed (uniform not-found) for an unauthorized/unknown agent; a failed skills/schedules/routines read returns an error naming the section rather than an empty list. Audited as a cross-org access. Pass { agent_id }.", inputSchema: getAgentSkillsSchema },
21800
+ async (args) => {
21801
+ try {
21802
+ const result = await client.getAgentSkills(args.agent_id);
21803
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
21804
+ } catch (err) {
21805
+ return { content: [{ type: "text", text: formatError2(err) }], isError: true };
21806
+ }
21807
+ }
21808
+ );
21790
21809
  server.registerTool(
21791
21810
  "debug_search_hosts",
21792
21811
  { description: "Search managed hosts across authorized orgs. Returns a projection per host (name, org, status, framework version, last-seen verdict, EC2 + Claude auth status) \u2014 no api-key fingerprints or secrets. Filter with { q, status, limit }.", inputSchema: searchHostsSchema },
@@ -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
@@ -30538,7 +30538,7 @@ var FLAG_REGISTRY = [
30538
30538
  },
30539
30539
  {
30540
30540
  key: "slack-scheduled-channel-guard",
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). 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.',
30542
30542
  flagType: "enum",
30543
30543
  allowedValues: ["off", "shadow", "enforce"],
30544
30544
  // Ships in SHADOW, not off: the counter is the whole point - the fleet metric
@@ -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-UNWOF62A.js";
72
- import "./chunk-R5LKV5S3.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-HIL72LVG.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-YA4OONJJ.js.map
150
+ //# sourceMappingURL=persistent-session-NCDYGOAP.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-UNWOF62A.js";
4
- import "./chunk-R5LKV5S3.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-HIL72LVG.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-Z2V5JZAI.js.map
807
+ //# sourceMappingURL=responsiveness-probe-6BYTKCOJ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-R5LKV5S3.js";
4
- import "./chunk-HIL72LVG.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-M3BMV27A.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.1213",
3
+ "version": "0.28.1215",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {