@integrity-labs/agt-cli 0.28.245 → 0.28.247

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-X427LHOW.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-7BQ2OE2R.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-OURKHXEW.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-HHEVB5WF.js.map
@@ -37,7 +37,7 @@ import {
37
37
  requireHost,
38
38
  safeWriteJsonAtomic,
39
39
  setConfigHash
40
- } from "../chunk-NMSN674U.js";
40
+ } from "../chunk-6UPAGHRR.js";
41
41
  import {
42
42
  getProjectDir as getProjectDir2,
43
43
  getReadyTasks,
@@ -122,7 +122,7 @@ import {
122
122
  takeZombieDetection,
123
123
  transcriptActivityAgeSeconds,
124
124
  writeEgressAllowlist
125
- } from "../chunk-ZS2T67OF.js";
125
+ } from "../chunk-NFO3GOL3.js";
126
126
  import {
127
127
  reapOrphanChannelMcps
128
128
  } from "../chunk-XWVM4KPK.js";
@@ -6509,7 +6509,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6509
6509
  var lastVersionCheckAt = 0;
6510
6510
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6511
6511
  var lastResponsivenessProbeAt = 0;
6512
- var agtCliVersion = true ? "0.28.245" : "dev";
6512
+ var agtCliVersion = true ? "0.28.247" : "dev";
6513
6513
  function resolveBrewPath(execFileSync2) {
6514
6514
  try {
6515
6515
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7359,7 +7359,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
7359
7359
  if (codeNames.length === 0) return;
7360
7360
  void (async () => {
7361
7361
  try {
7362
- const { collectDiagnostics } = await import("../persistent-session-X427LHOW.js");
7362
+ const { collectDiagnostics } = await import("../persistent-session-7BQ2OE2R.js");
7363
7363
  await api.post("/host/heartbeat", {
7364
7364
  host_id: hostId,
7365
7365
  agent_diagnostics: collectDiagnostics(codeNames)
@@ -7457,7 +7457,7 @@ async function pollCycle() {
7457
7457
  }
7458
7458
  try {
7459
7459
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
7460
- const { collectDiagnostics } = await import("../persistent-session-X427LHOW.js");
7460
+ const { collectDiagnostics } = await import("../persistent-session-7BQ2OE2R.js");
7461
7461
  const diagCodeNames = [...agentState.persistentSessionAgents];
7462
7462
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
7463
7463
  let tailscaleHostname;
@@ -7605,7 +7605,7 @@ async function pollCycle() {
7605
7605
  const {
7606
7606
  collectResponsivenessProbes,
7607
7607
  getResponsivenessIntervalMs
7608
- } = await import("../responsiveness-probe-CFF27A7B.js");
7608
+ } = await import("../responsiveness-probe-MUY7HOGQ.js");
7609
7609
  const probeIntervalMs = getResponsivenessIntervalMs();
7610
7610
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
7611
7611
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -7637,7 +7637,7 @@ async function pollCycle() {
7637
7637
  collectResponsivenessProbes,
7638
7638
  livePendingInboundOldestAgeSeconds,
7639
7639
  parkPendingInbound
7640
- } = await import("../responsiveness-probe-CFF27A7B.js");
7640
+ } = await import("../responsiveness-probe-MUY7HOGQ.js");
7641
7641
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
7642
7642
  const wedgeNow = /* @__PURE__ */ new Date();
7643
7643
  const liveAgents = agentState.persistentSessionAgents;
@@ -10452,7 +10452,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
10452
10452
  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}`));
10453
10453
  void (async () => {
10454
10454
  try {
10455
- const { collectDiagnostics } = await import("../persistent-session-X427LHOW.js");
10455
+ const { collectDiagnostics } = await import("../persistent-session-7BQ2OE2R.js");
10456
10456
  await api.post("/host/heartbeat", {
10457
10457
  host_id: hostId,
10458
10458
  agent_diagnostics: collectDiagnostics([codeName])
@@ -10502,7 +10502,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
10502
10502
  }
10503
10503
  try {
10504
10504
  const hostId = await getHostId();
10505
- const { collectDiagnostics } = await import("../persistent-session-X427LHOW.js");
10505
+ const { collectDiagnostics } = await import("../persistent-session-7BQ2OE2R.js");
10506
10506
  await api.post("/host/heartbeat", {
10507
10507
  host_id: hostId,
10508
10508
  agent_diagnostics: collectDiagnostics([codeName])
@@ -10893,7 +10893,7 @@ async function processClaudePairSessions(agents) {
10893
10893
  killPairSession,
10894
10894
  pairTmuxSession,
10895
10895
  finalizeClaudePairOnboarding
10896
- } = await import("../claude-pair-runtime-OURKHXEW.js");
10896
+ } = await import("../claude-pair-runtime-HHEVB5WF.js");
10897
10897
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
10898
10898
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
10899
10899
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -39832,6 +39832,18 @@ var FLAG_REGISTRY = [
39832
39832
  defaultValue: false,
39833
39833
  public: true
39834
39834
  },
39835
+ {
39836
+ key: "agent-offers",
39837
+ description: "Agent Routines and the Offers surface (ADR-0041 D4a/D8, ENG-7417): the capability-discovery surface where an agent earns the right to propose a Routine (an Offer) from observed repetition, elicitation, or its template. off = the surface is fully dark (no candidate intake, no Offer creation, no delivery). shadow = the observer runs and would-be Offers are written with a shadow marker, visible to platform admins only, never delivered - the D4a calibration mode that must hit the precision bar on real transcripts before any org goes live. on = the full surface for the org. Evaluated API-side only (the observed feeder additionally requires the memory-extraction flag, whose pipeline it rides), so no host materialisation seam is needed. Flipping off kills candidate intake and Offer delivery but NOT already accepted Routines - their runtimes are ordinary scheduled tasks / kanban templates the user consented to; disabling those is an explicit per-routine revoke (D5b). Ships dark; per-org rollout from the admin Feature Flags page.",
39838
+ flagType: "enum",
39839
+ allowedValues: ["off", "shadow", "on"],
39840
+ // Declared safe value is `off` (fully dark). Fail-safe direction: a flag-DB
39841
+ // read error must never start accumulating routine candidates or delivering
39842
+ // proactive Offers on its own. Shadow is a deliberate per-org calibration
39843
+ // step, not the absent-flag fallback. No envVar - net-new API-side control
39844
+ // with no pre-flags env gate to migrate (ADR-0022 / check-new-env-gates.sh).
39845
+ defaultValue: "off"
39846
+ },
39835
39847
  {
39836
39848
  key: "channel-quarantine-mode",
39837
39849
  description: "Optional-channel quarantine (ENG-5932): off = disabled, shadow = log matches only, enforce = quarantine.",
@@ -14377,11 +14377,12 @@ function extractForwardedContent(attachments) {
14377
14377
  if (!raw || typeof raw !== "object") continue;
14378
14378
  const att = raw;
14379
14379
  let body = asTrimmed(att.text) || asTrimmed(att.fallback);
14380
- if (!body && Array.isArray(att.message_blocks)) {
14380
+ if (Array.isArray(att.message_blocks)) {
14381
14381
  for (const mb of att.message_blocks) {
14382
- const rendered = renderSlackBlocks(mb?.message?.blocks).text.trim();
14383
- if (rendered) {
14384
- body = rendered;
14382
+ const rendered = renderSlackBlocks(mb?.message?.blocks);
14383
+ const renderedText = rendered.text.trim();
14384
+ if (renderedText && (!body || rendered.hadTable)) {
14385
+ body = renderedText;
14385
14386
  break;
14386
14387
  }
14387
14388
  }
@@ -16946,7 +16947,7 @@ function describeLivePending(registry2, now) {
16946
16947
  }).join("; ");
16947
16948
  }
16948
16949
  function resolveReplyBinding(input) {
16949
- const { mode, args, registry: registry2 } = input;
16950
+ const { mode, args, registry: registry2, knownThread } = input;
16950
16951
  const now = input.now ?? Date.now();
16951
16952
  const modelChannel = args.channel;
16952
16953
  const modelThread = args.thread_ts;
@@ -16969,7 +16970,7 @@ function resolveReplyBinding(input) {
16969
16970
  unknownInboundId: true
16970
16971
  };
16971
16972
  }
16972
- return classifyByCoords(mode, args, registry2, now, true);
16973
+ return classifyByCoords(mode, args, registry2, now, true, knownThread);
16973
16974
  }
16974
16975
  if (args.proactive === true) {
16975
16976
  return {
@@ -16979,9 +16980,9 @@ function resolveReplyBinding(input) {
16979
16980
  unknownInboundId: false
16980
16981
  };
16981
16982
  }
16982
- return classifyByCoords(mode, args, registry2, now, false);
16983
+ return classifyByCoords(mode, args, registry2, now, false, knownThread);
16983
16984
  }
16984
- function classifyByCoords(mode, args, registry2, now, unknownInboundId) {
16985
+ function classifyByCoords(mode, args, registry2, now, unknownInboundId, knownThread) {
16985
16986
  const modelChannel = args.channel;
16986
16987
  const modelThread = args.thread_ts;
16987
16988
  const matched = matchByCoords(registry2, modelChannel, args.message_ts, modelThread);
@@ -17001,6 +17002,15 @@ function classifyByCoords(mode, args, registry2, now, unknownInboundId) {
17001
17002
  unknownInboundId
17002
17003
  };
17003
17004
  }
17005
+ const participatesInThread = !!modelChannel && (!!modelThread && knownThread?.(modelChannel, modelThread) || !!args.message_ts && knownThread?.(modelChannel, args.message_ts)) === true;
17006
+ if (participatesInThread) {
17007
+ return {
17008
+ channel: modelChannel,
17009
+ threadTs: modelThread,
17010
+ classification: "known_thread",
17011
+ unknownInboundId
17012
+ };
17013
+ }
17004
17014
  const decision = {
17005
17015
  channel: modelChannel,
17006
17016
  threadTs: modelThread,
@@ -20469,7 +20479,16 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
20469
20479
  const binding = resolveReplyBinding({
20470
20480
  mode: bindingMode,
20471
20481
  args: { inbound_id, channel, thread_ts, message_ts, proactive },
20472
- registry: slackInboundRegistry
20482
+ registry: slackInboundRegistry,
20483
+ // ENG-7409: the persisted bot_posted thread-participation signal (survives
20484
+ // restart via loadThreadStore). A reply into a thread the agent has posted
20485
+ // in is a legitimate follow-up, so it must not be flagged unknown_target
20486
+ // even when no live inbound marker survives - this is what stops warn from
20487
+ // nagging (and enforce from blocking) ordinary in-thread conversation.
20488
+ knownThread: (c, t) => {
20489
+ const k = buildThreadKey(c, t);
20490
+ return !!k && !!trackedThreads.get(k)?.bot_posted;
20491
+ }
20473
20492
  });
20474
20493
  recordReplyBindingClassification(SLACK_AGENT_DIR, "slack", {
20475
20494
  classification: binding.classification,
@@ -36,7 +36,7 @@ import {
36
36
  writeDirectChatSessionState,
37
37
  writeEgressAllowlist,
38
38
  writePersistentClaudeWrapper
39
- } from "./chunk-ZS2T67OF.js";
39
+ } from "./chunk-NFO3GOL3.js";
40
40
  import "./chunk-XWVM4KPK.js";
41
41
  export {
42
42
  EGRESS_BASELINE_DOMAINS,
@@ -77,4 +77,4 @@ export {
77
77
  writeEgressAllowlist,
78
78
  writePersistentClaudeWrapper
79
79
  };
80
- //# sourceMappingURL=persistent-session-X427LHOW.js.map
80
+ //# sourceMappingURL=persistent-session-7BQ2OE2R.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-ZS2T67OF.js";
3
+ } from "./chunk-NFO3GOL3.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -418,4 +418,4 @@ export {
418
418
  readAndResetSlackReplyBindingClassifications,
419
419
  readAndResetSlackReplyTargetClassifications
420
420
  };
421
- //# sourceMappingURL=responsiveness-probe-CFF27A7B.js.map
421
+ //# sourceMappingURL=responsiveness-probe-MUY7HOGQ.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.245",
3
+ "version": "0.28.247",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {