@integrity-labs/agt-cli 0.28.719 → 0.28.720

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.
@@ -17,7 +17,7 @@ import {
17
17
  rotateDailySession,
18
18
  sessionFileExists,
19
19
  todayLocalIso
20
- } from "./chunk-7LH3SVAD.js";
20
+ } from "./chunk-32WU3HBU.js";
21
21
  import {
22
22
  reapOrphanChannelMcps
23
23
  } from "./chunk-XWVM4KPK.js";
@@ -4694,4 +4694,4 @@ export {
4694
4694
  stopAllSessionsAndWait,
4695
4695
  getProjectDir
4696
4696
  };
4697
- //# sourceMappingURL=chunk-FNALM4HG.js.map
4697
+ //# sourceMappingURL=chunk-E3WGN4GX.js.map
@@ -13,7 +13,7 @@ import {
13
13
  parseEnvFileEntries,
14
14
  parseEnvIntegrations,
15
15
  shellQuote
16
- } from "./chunk-FNALM4HG.js";
16
+ } from "./chunk-E3WGN4GX.js";
17
17
  import {
18
18
  BIND_FAILURE_QUARANTINE_THRESHOLD,
19
19
  INTEGRATIONS_SECTION_END,
@@ -62,7 +62,7 @@ import {
62
62
  sessionTranscriptDir,
63
63
  worseConnectivityOutcome,
64
64
  wrapScheduledTaskPrompt
65
- } from "./chunk-7LH3SVAD.js";
65
+ } from "./chunk-32WU3HBU.js";
66
66
  import {
67
67
  parsePsRows
68
68
  } from "./chunk-XWVM4KPK.js";
@@ -6428,7 +6428,7 @@ function exchangeFailureKind(err) {
6428
6428
  }
6429
6429
 
6430
6430
  // src/lib/api-client.ts
6431
- var agtCliVersion = true ? "0.28.719" : "dev";
6431
+ var agtCliVersion = true ? "0.28.720" : "dev";
6432
6432
  var lastConfigHash = null;
6433
6433
  function setConfigHash(hash) {
6434
6434
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10470,4 +10470,4 @@ export {
10470
10470
  managerInstallSystemUnitCommand,
10471
10471
  managerUninstallSystemUnitCommand
10472
10472
  };
10473
- //# sourceMappingURL=chunk-FG5F657H.js.map
10473
+ //# sourceMappingURL=chunk-V5T2K5NN.js.map
@@ -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-2AWYIUCX.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-7NXQBNZB.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-PDG74SAT.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-EKP2KR6N.js.map
@@ -57,7 +57,7 @@ import {
57
57
  safeWriteJsonAtomic,
58
58
  setConfigHash,
59
59
  tripClass
60
- } from "../chunk-FG5F657H.js";
60
+ } from "../chunk-V5T2K5NN.js";
61
61
  import {
62
62
  getProjectDir as getProjectDir2,
63
63
  getReadyTasks,
@@ -115,7 +115,7 @@ import {
115
115
  takeZombieDetection,
116
116
  toOpencodeModel,
117
117
  writeEgressAllowlist
118
- } from "../chunk-FNALM4HG.js";
118
+ } from "../chunk-E3WGN4GX.js";
119
119
  import {
120
120
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
121
121
  AnchorSessionClient,
@@ -200,7 +200,7 @@ import {
200
200
  subagentActivityAgeSeconds,
201
201
  sumTranscriptUsageInWindow,
202
202
  transcriptActivityAgeSeconds
203
- } from "../chunk-7LH3SVAD.js";
203
+ } from "../chunk-32WU3HBU.js";
204
204
  import {
205
205
  reapOrphanChannelMcps
206
206
  } from "../chunk-XWVM4KPK.js";
@@ -12063,7 +12063,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
12063
12063
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
12064
12064
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
12065
12065
  async function channelInboundActivityAgeSecondsFor(codeName) {
12066
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-JQS4WA2L.js");
12066
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-UDFTVXOW.js");
12067
12067
  const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
12068
12068
  if (newest === null) return null;
12069
12069
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -12711,7 +12711,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
12711
12711
  var lastVersionCheckAt = 0;
12712
12712
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
12713
12713
  var lastResponsivenessProbeAt = 0;
12714
- var agtCliVersion = true ? "0.28.719" : "dev";
12714
+ var agtCliVersion = true ? "0.28.720" : "dev";
12715
12715
  function resolveBrewPath(execFileSync3) {
12716
12716
  try {
12717
12717
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -14238,7 +14238,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
14238
14238
  if (codeNames.length === 0) return;
14239
14239
  void (async () => {
14240
14240
  try {
14241
- const { collectDiagnostics } = await import("../persistent-session-2AWYIUCX.js");
14241
+ const { collectDiagnostics } = await import("../persistent-session-7NXQBNZB.js");
14242
14242
  await api.post("/host/heartbeat", {
14243
14243
  host_id: hostId,
14244
14244
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -14356,7 +14356,7 @@ async function pollCycleInner() {
14356
14356
  }
14357
14357
  try {
14358
14358
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
14359
- const { collectDiagnostics } = await import("../persistent-session-2AWYIUCX.js");
14359
+ const { collectDiagnostics } = await import("../persistent-session-7NXQBNZB.js");
14360
14360
  const diagCodeNames = [...agentState.persistentSessionAgents];
14361
14361
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
14362
14362
  let tailscaleHostname;
@@ -14525,7 +14525,7 @@ async function pollCycleInner() {
14525
14525
  collectPanelessActivityProbes,
14526
14526
  getResponsivenessIntervalMs,
14527
14527
  occupancyQualificationClassifications
14528
- } = await import("../responsiveness-probe-JQS4WA2L.js");
14528
+ } = await import("../responsiveness-probe-UDFTVXOW.js");
14529
14529
  const probeIntervalMs = getResponsivenessIntervalMs();
14530
14530
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
14531
14531
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -14635,7 +14635,7 @@ async function pollCycleInner() {
14635
14635
  collectResponsivenessProbes,
14636
14636
  livePendingInboundOldestAgeSeconds,
14637
14637
  parkPendingInbound
14638
- } = await import("../responsiveness-probe-JQS4WA2L.js");
14638
+ } = await import("../responsiveness-probe-UDFTVXOW.js");
14639
14639
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
14640
14640
  const wedgeNow = /* @__PURE__ */ new Date();
14641
14641
  const liveAgents = agentState.persistentSessionAgents;
@@ -14791,7 +14791,7 @@ async function pollCycleInner() {
14791
14791
  }
14792
14792
  try {
14793
14793
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
14794
- const { probeSessionAuth } = await import("../session-auth-dead-VBMZW4GG.js");
14794
+ const { probeSessionAuth } = await import("../session-auth-dead-DQW6NXDX.js");
14795
14795
  const observations = [];
14796
14796
  const pendingCacheCommits = [];
14797
14797
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -18622,7 +18622,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
18622
18622
  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}`));
18623
18623
  void (async () => {
18624
18624
  try {
18625
- const { collectDiagnostics } = await import("../persistent-session-2AWYIUCX.js");
18625
+ const { collectDiagnostics } = await import("../persistent-session-7NXQBNZB.js");
18626
18626
  await api.post("/host/heartbeat", {
18627
18627
  host_id: hostId,
18628
18628
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -18673,7 +18673,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
18673
18673
  }
18674
18674
  try {
18675
18675
  const hostId = await getHostId();
18676
- const { collectDiagnostics } = await import("../persistent-session-2AWYIUCX.js");
18676
+ const { collectDiagnostics } = await import("../persistent-session-7NXQBNZB.js");
18677
18677
  await api.post("/host/heartbeat", {
18678
18678
  host_id: hostId,
18679
18679
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19305,7 +19305,7 @@ async function processClaudePairSessions(agents) {
19305
19305
  killPairSession,
19306
19306
  pairTmuxSession,
19307
19307
  finalizeClaudePairOnboarding
19308
- } = await import("../claude-pair-runtime-PDG74SAT.js");
19308
+ } = await import("../claude-pair-runtime-EKP2KR6N.js");
19309
19309
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
19310
19310
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
19311
19311
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -30036,8 +30036,14 @@ function readDirectChatPendingInboundMarker(dir, sessionId, messageId, readFileI
30036
30036
  return null;
30037
30037
  }
30038
30038
  }
30039
+ var MAX_REPORTED_ORPHANS = 20;
30039
30040
  function sweepAgedDirectChatMarkers(dir, deps) {
30040
- const result = { cleared: 0, orphaned: 0 };
30041
+ const result = {
30042
+ cleared: 0,
30043
+ orphaned: 0,
30044
+ orphanedIdentities: [],
30045
+ orphanedTruncated: false
30046
+ };
30041
30047
  if (!dir) return result;
30042
30048
  let names;
30043
30049
  try {
@@ -30063,11 +30069,21 @@ function sweepAgedDirectChatMarkers(dir, deps) {
30063
30069
  }
30064
30070
  result.cleared += 1;
30065
30071
  if (undelivered) {
30072
+ const identity = {
30073
+ inboundId: marker.inbound_id,
30074
+ receivedAt: marker.received_at,
30075
+ sessionId: marker.session_id
30076
+ };
30066
30077
  try {
30067
- deps.onOrphaned();
30078
+ deps.onOrphaned(identity);
30068
30079
  } catch {
30069
30080
  }
30070
30081
  result.orphaned += 1;
30082
+ if (result.orphanedIdentities.length < MAX_REPORTED_ORPHANS) {
30083
+ result.orphanedIdentities.push(identity);
30084
+ } else {
30085
+ result.orphanedTruncated = true;
30086
+ }
30071
30087
  }
30072
30088
  }
30073
30089
  return result;
@@ -34383,6 +34399,12 @@ var NOTICE_KIND_AUDIENCE = {
34383
34399
  // call addressed to the machine.
34384
34400
  live_advisor_escalation: "agent",
34385
34401
  live_advisor_session_open: "agent",
34402
+ // ENG-9631's counterpart to the open briefing, and agent-directed for the
34403
+ // same reason: `buildSessionCloseMessage` writes in the second person to the
34404
+ // machine — "the sales call YOU were advising on", "you will not be woken
34405
+ // again". Read the builder, as this file asks. The person already knows they
34406
+ // pressed Stop; the one who does not know is the agent.
34407
+ live_advisor_session_close: "agent",
34386
34408
  // The assigner reopened a card and the agent must work it again.
34387
34409
  assigner_reopen: "agent",
34388
34410
  // An inbound trigger event delivered onto the rail for the agent to handle.
@@ -39342,6 +39364,19 @@ function sweepAgedDirectChatMarkersNow(thresholdMs) {
39342
39364
  if (res.cleared > 0) {
39343
39365
  process.stderr.write(
39344
39366
  `direct-chat-channel(${AGT_AGENT_CODE_NAME}): stale-marker sweep cleared=${res.cleared} orphaned=${res.orphaned}
39367
+ `
39368
+ );
39369
+ }
39370
+ if (res.orphaned > 0) {
39371
+ const now2 = Date.now();
39372
+ const detail = res.orphanedIdentities.map((o) => {
39373
+ const receivedMs = o.receivedAt ? Date.parse(o.receivedAt) : NaN;
39374
+ const age = Number.isFinite(receivedMs) ? `${Math.round((now2 - receivedMs) / 6e4)}m` : "age?";
39375
+ return `${o.inboundId ?? "inbound?"}(session=${o.sessionId ?? "?"} age=${age})`;
39376
+ }).join(" ");
39377
+ const more = res.orphanedTruncated ? ` (+${res.orphaned - res.orphanedIdentities.length} more not listed)` : "";
39378
+ process.stderr.write(
39379
+ `direct-chat-channel(${AGT_AGENT_CODE_NAME}): orphaned_detail ${detail}${more}
39345
39380
  `
39346
39381
  );
39347
39382
  }
package/dist/mcp/index.js CHANGED
@@ -41799,6 +41799,12 @@ var NOTICE_KIND_AUDIENCE = {
41799
41799
  // call addressed to the machine.
41800
41800
  live_advisor_escalation: "agent",
41801
41801
  live_advisor_session_open: "agent",
41802
+ // ENG-9631's counterpart to the open briefing, and agent-directed for the
41803
+ // same reason: `buildSessionCloseMessage` writes in the second person to the
41804
+ // machine — "the sales call YOU were advising on", "you will not be woken
41805
+ // again". Read the builder, as this file asks. The person already knows they
41806
+ // pressed Stop; the one who does not know is the agent.
41807
+ live_advisor_session_close: "agent",
41802
41808
  // The assigner reopened a card and the agent must work it again.
41803
41809
  assigner_reopen: "agent",
41804
41810
  // An inbound trigger event delivered onto the rail for the agent to handle.
@@ -40591,6 +40591,12 @@ var NOTICE_KIND_AUDIENCE = {
40591
40591
  // call addressed to the machine.
40592
40592
  live_advisor_escalation: "agent",
40593
40593
  live_advisor_session_open: "agent",
40594
+ // ENG-9631's counterpart to the open briefing, and agent-directed for the
40595
+ // same reason: `buildSessionCloseMessage` writes in the second person to the
40596
+ // machine — "the sales call YOU were advising on", "you will not be woken
40597
+ // again". Read the builder, as this file asks. The person already knows they
40598
+ // pressed Stop; the one who does not know is the agent.
40599
+ live_advisor_session_close: "agent",
40594
40600
  // The assigner reopened a card and the agent must work it again.
40595
40601
  assigner_reopen: "agent",
40596
40602
  // An inbound trigger event delivered onto the rail for the agent to handle.
@@ -34704,6 +34704,12 @@ var NOTICE_KIND_AUDIENCE = {
34704
34704
  // call addressed to the machine.
34705
34705
  live_advisor_escalation: "agent",
34706
34706
  live_advisor_session_open: "agent",
34707
+ // ENG-9631's counterpart to the open briefing, and agent-directed for the
34708
+ // same reason: `buildSessionCloseMessage` writes in the second person to the
34709
+ // machine — "the sales call YOU were advising on", "you will not be woken
34710
+ // again". Read the builder, as this file asks. The person already knows they
34711
+ // pressed Stop; the one who does not know is the agent.
34712
+ live_advisor_session_close: "agent",
34707
34713
  // The assigner reopened a card and the agent must work it again.
34708
34714
  assigner_reopen: "agent",
34709
34715
  // An inbound trigger event delivered onto the rail for the agent to handle.
@@ -34860,6 +34860,12 @@ var NOTICE_KIND_AUDIENCE = {
34860
34860
  // call addressed to the machine.
34861
34861
  live_advisor_escalation: "agent",
34862
34862
  live_advisor_session_open: "agent",
34863
+ // ENG-9631's counterpart to the open briefing, and agent-directed for the
34864
+ // same reason: `buildSessionCloseMessage` writes in the second person to the
34865
+ // machine — "the sales call YOU were advising on", "you will not be woken
34866
+ // again". Read the builder, as this file asks. The person already knows they
34867
+ // pressed Stop; the one who does not know is the agent.
34868
+ live_advisor_session_close: "agent",
34863
34869
  // The assigner reopened a card and the agent must work it again.
34864
34870
  assigner_reopen: "agent",
34865
34871
  // An inbound trigger event delivered onto the rail for the agent to handle.
@@ -46,8 +46,8 @@ import {
46
46
  writeDirectChatSessionState,
47
47
  writeEgressAllowlist,
48
48
  writePersistentClaudeWrapper
49
- } from "./chunk-FNALM4HG.js";
50
- import "./chunk-7LH3SVAD.js";
49
+ } from "./chunk-E3WGN4GX.js";
50
+ import "./chunk-32WU3HBU.js";
51
51
  import "./chunk-XWVM4KPK.js";
52
52
  export {
53
53
  EGRESS_BASELINE_DOMAINS,
@@ -98,4 +98,4 @@ export {
98
98
  writeEgressAllowlist,
99
99
  writePersistentClaudeWrapper
100
100
  };
101
- //# sourceMappingURL=persistent-session-2AWYIUCX.js.map
101
+ //# sourceMappingURL=persistent-session-7NXQBNZB.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-FNALM4HG.js";
4
- import "./chunk-7LH3SVAD.js";
3
+ } from "./chunk-E3WGN4GX.js";
4
+ import "./chunk-32WU3HBU.js";
5
5
  import "./chunk-XWVM4KPK.js";
6
6
 
7
7
  // src/lib/responsiveness-probe.ts
@@ -745,4 +745,4 @@ export {
745
745
  readAndResetSlackReplyBindingClassifications,
746
746
  readAndResetSlackReplyTargetClassifications
747
747
  };
748
- //# sourceMappingURL=responsiveness-probe-JQS4WA2L.js.map
748
+ //# sourceMappingURL=responsiveness-probe-UDFTVXOW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-7LH3SVAD.js";
3
+ } from "./chunk-32WU3HBU.js";
4
4
 
5
5
  // src/lib/session-auth-dead.ts
6
6
  import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
@@ -203,4 +203,4 @@ export {
203
203
  decideSessionAuthState,
204
204
  probeSessionAuth
205
205
  };
206
- //# sourceMappingURL=session-auth-dead-VBMZW4GG.js.map
206
+ //# sourceMappingURL=session-auth-dead-DQW6NXDX.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.719",
3
+ "version": "0.28.720",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {