@integrity-labs/agt-cli 0.28.927 → 0.28.929

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 (24) hide show
  1. package/dist/bin/agt.js +51 -6
  2. package/dist/bin/agt.js.map +1 -1
  3. package/dist/{chunk-Y7ERASS6.js → chunk-IIIMUCGD.js} +18 -1
  4. package/dist/{chunk-Y7ERASS6.js.map → chunk-IIIMUCGD.js.map} +1 -1
  5. package/dist/{chunk-LWLTSFH3.js → chunk-VZVCPJC7.js} +23 -8
  6. package/dist/{chunk-LWLTSFH3.js.map → chunk-VZVCPJC7.js.map} +1 -1
  7. package/dist/{chunk-NIUBYSLW.js → chunk-ZNVYUZSM.js} +2 -2
  8. package/dist/{claude-pair-runtime-RFY57WC3.js → claude-pair-runtime-MA4CLC6B.js} +2 -2
  9. package/dist/lib/manager-worker.js +49 -15
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +17 -0
  12. package/dist/mcp/index.js +17 -0
  13. package/dist/mcp/origami.js +17 -0
  14. package/dist/mcp/slack-channel.js +17 -0
  15. package/dist/mcp/telegram-channel.js +17 -0
  16. package/dist/{persistent-session-O3AKW6IW.js → persistent-session-PYQ5U6FU.js} +3 -3
  17. package/dist/{responsiveness-probe-MIPUX3BG.js → responsiveness-probe-T4LKSNFO.js} +3 -3
  18. package/dist/{session-auth-dead-ZGZZLE4X.js → session-auth-dead-M5SFWTQH.js} +2 -2
  19. package/package.json +1 -1
  20. /package/dist/{chunk-NIUBYSLW.js.map → chunk-ZNVYUZSM.js.map} +0 -0
  21. /package/dist/{claude-pair-runtime-RFY57WC3.js.map → claude-pair-runtime-MA4CLC6B.js.map} +0 -0
  22. /package/dist/{persistent-session-O3AKW6IW.js.map → persistent-session-PYQ5U6FU.js.map} +0 -0
  23. /package/dist/{responsiveness-probe-MIPUX3BG.js.map → responsiveness-probe-T4LKSNFO.js.map} +0 -0
  24. /package/dist/{session-auth-dead-ZGZZLE4X.js.map → session-auth-dead-M5SFWTQH.js.map} +0 -0
@@ -19,7 +19,7 @@ import {
19
19
  rotateDailySession,
20
20
  sessionFileExists,
21
21
  todayLocalIso
22
- } from "./chunk-Y7ERASS6.js";
22
+ } from "./chunk-IIIMUCGD.js";
23
23
  import {
24
24
  reapOrphanChannelMcps
25
25
  } from "./chunk-XWVM4KPK.js";
@@ -5730,4 +5730,4 @@ export {
5730
5730
  stopAllSessionsAndWait,
5731
5731
  getProjectDir
5732
5732
  };
5733
- //# sourceMappingURL=chunk-NIUBYSLW.js.map
5733
+ //# sourceMappingURL=chunk-ZNVYUZSM.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-O3AKW6IW.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-PYQ5U6FU.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-RFY57WC3.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-MA4CLC6B.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-LWLTSFH3.js";
66
+ } from "../chunk-VZVCPJC7.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -136,7 +136,7 @@ import {
136
136
  takeZombieDetection,
137
137
  toOpencodeModel,
138
138
  writeEgressAllowlist
139
- } from "../chunk-NIUBYSLW.js";
139
+ } from "../chunk-ZNVYUZSM.js";
140
140
  import {
141
141
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
142
142
  AnchorSessionClient,
@@ -231,7 +231,7 @@ import {
231
231
  subagentActivityAgeSeconds,
232
232
  sumTranscriptUsageInWindow,
233
233
  transcriptActivityAgeSeconds
234
- } from "../chunk-Y7ERASS6.js";
234
+ } from "../chunk-IIIMUCGD.js";
235
235
  import {
236
236
  reapOrphanChannelMcps
237
237
  } from "../chunk-XWVM4KPK.js";
@@ -9305,6 +9305,21 @@ function configuredCeiling() {
9305
9305
  const raw = Number(process.env.AGT_ISOLATION_PIDS);
9306
9306
  return Number.isFinite(raw) && raw > 0 ? raw : 512;
9307
9307
  }
9308
+ function parseMemoryEvents(text) {
9309
+ if (text == null) return null;
9310
+ const wanted = /* @__PURE__ */ new Map();
9311
+ for (const line of text.split("\n")) {
9312
+ const [key, rawValue] = line.trim().split(/\s+/);
9313
+ if (key !== "oom_kill" && key !== "max") continue;
9314
+ const value = Number(rawValue);
9315
+ if (!Number.isFinite(value) || value < 0) return null;
9316
+ wanted.set(key, value);
9317
+ }
9318
+ const oomKill = wanted.get("oom_kill");
9319
+ const atCeiling = wanted.get("max");
9320
+ if (oomKill === void 0 || atCeiling === void 0) return null;
9321
+ return { oomKill, atCeiling };
9322
+ }
9308
9323
  function readTextReal(path) {
9309
9324
  try {
9310
9325
  return readFileSync29(path, "utf-8");
@@ -9388,7 +9403,26 @@ function samplePidPressureFor(codeName, io = {}) {
9388
9403
  ceiling,
9389
9404
  defunct: countDefunct(dir, readText),
9390
9405
  warnAt,
9391
- overThreshold: current >= warnAt
9406
+ overThreshold: current >= warnAt,
9407
+ // ENG-10370. Same directory, same `readText` seam, no extra resolution and
9408
+ // nothing spawned - the module's headline guarantee is unchanged because
9409
+ // this is one more `readFileSync` against a path already resolved.
9410
+ //
9411
+ // CGROUP v1 IS RULED OUT HERE BY CONSTRUCTION, not by a fallback, and the
9412
+ // mechanism is worth naming because the ticket asked for v1 to be "handled
9413
+ // or explicitly ruled out". `resolveCgroupDirReal` probes exactly two
9414
+ // layouts - `/sys/fs/cgroup/system.slice/docker-<id>.scope` and
9415
+ // `/sys/fs/cgroup/docker/<id>` - and BOTH are unified (v2) paths. A v1 host
9416
+ // splits cgroups by controller (`/sys/fs/cgroup/memory/docker/<id>`), so
9417
+ // neither probe hits, the resolver returns null, and this function has
9418
+ // already returned null above for PID pressure too.
9419
+ //
9420
+ // So on a v1 host this reports NOTHING rather than a false zero. That is
9421
+ // the silent-zero failure the AC was worried about, and it is structurally
9422
+ // impossible on this path rather than merely guarded against. If per-agent
9423
+ // cgroups ever land on a v1 host, the resolver is the single place that has
9424
+ // to learn about it, and both gauges follow.
9425
+ memory: parseMemoryEvents(readText(`${dir}/memory.events`))
9392
9426
  };
9393
9427
  }
9394
9428
  var lastSample = /* @__PURE__ */ new Map();
@@ -13187,7 +13221,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
13187
13221
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
13188
13222
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
13189
13223
  async function channelInboundActivityAgeSecondsFor(codeName) {
13190
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-MIPUX3BG.js");
13224
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-T4LKSNFO.js");
13191
13225
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
13192
13226
  if (newest === null) return null;
13193
13227
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13872,7 +13906,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13872
13906
  var lastVersionCheckAt = 0;
13873
13907
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13874
13908
  var lastResponsivenessProbeAt = 0;
13875
- var agtCliVersion = true ? "0.28.927" : "dev";
13909
+ var agtCliVersion = true ? "0.28.929" : "dev";
13876
13910
  function resolveBrewPath(execFileSync2) {
13877
13911
  try {
13878
13912
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -15462,7 +15496,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
15462
15496
  if (codeNames.length === 0) return;
15463
15497
  void (async () => {
15464
15498
  try {
15465
- const { collectDiagnostics } = await import("../persistent-session-O3AKW6IW.js");
15499
+ const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
15466
15500
  await api.post("/host/heartbeat", {
15467
15501
  host_id: hostId,
15468
15502
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -15604,7 +15638,7 @@ async function pollCycleInner() {
15604
15638
  }
15605
15639
  try {
15606
15640
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
15607
- const { collectDiagnostics } = await import("../persistent-session-O3AKW6IW.js");
15641
+ const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
15608
15642
  const diagCodeNames = [...agentState.persistentSessionAgents];
15609
15643
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
15610
15644
  let tailscaleHostname;
@@ -15779,7 +15813,7 @@ async function pollCycleInner() {
15779
15813
  collectPanelessActivityProbes,
15780
15814
  getResponsivenessIntervalMs,
15781
15815
  occupancyQualificationClassifications
15782
- } = await import("../responsiveness-probe-MIPUX3BG.js");
15816
+ } = await import("../responsiveness-probe-T4LKSNFO.js");
15783
15817
  const probeIntervalMs = getResponsivenessIntervalMs();
15784
15818
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15785
15819
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15896,7 +15930,7 @@ async function pollCycleInner() {
15896
15930
  collectResponsivenessProbes,
15897
15931
  livePendingInboundOldestAgeSeconds,
15898
15932
  parkPendingInbound
15899
- } = await import("../responsiveness-probe-MIPUX3BG.js");
15933
+ } = await import("../responsiveness-probe-T4LKSNFO.js");
15900
15934
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15901
15935
  const wedgeNow = /* @__PURE__ */ new Date();
15902
15936
  const liveAgents = agentState.persistentSessionAgents;
@@ -16052,7 +16086,7 @@ async function pollCycleInner() {
16052
16086
  }
16053
16087
  try {
16054
16088
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
16055
- const { probeSessionAuth } = await import("../session-auth-dead-ZGZZLE4X.js");
16089
+ const { probeSessionAuth } = await import("../session-auth-dead-M5SFWTQH.js");
16056
16090
  const observations = [];
16057
16091
  const pendingCacheCommits = [];
16058
16092
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -20316,7 +20350,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20316
20350
  try {
20317
20351
  const freshId = rotateSessionForWedge(codeName);
20318
20352
  consecutiveWedgeCycles.delete(codeName);
20319
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-MIPUX3BG.js");
20353
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-T4LKSNFO.js");
20320
20354
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
20321
20355
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
20322
20356
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -20359,7 +20393,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20359
20393
  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}`));
20360
20394
  void (async () => {
20361
20395
  try {
20362
- const { collectDiagnostics } = await import("../persistent-session-O3AKW6IW.js");
20396
+ const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
20363
20397
  await api.post("/host/heartbeat", {
20364
20398
  host_id: hostId,
20365
20399
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -20410,7 +20444,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
20410
20444
  }
20411
20445
  try {
20412
20446
  const hostId = await getHostId();
20413
- const { collectDiagnostics } = await import("../persistent-session-O3AKW6IW.js");
20447
+ const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
20414
20448
  await api.post("/host/heartbeat", {
20415
20449
  host_id: hostId,
20416
20450
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -21052,7 +21086,7 @@ async function processClaudePairSessions(agents) {
21052
21086
  killPairSession,
21053
21087
  pairTmuxSession,
21054
21088
  finalizeClaudePairOnboarding
21055
- } = await import("../claude-pair-runtime-RFY57WC3.js");
21089
+ } = await import("../claude-pair-runtime-MA4CLC6B.js");
21056
21090
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
21057
21091
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
21058
21092
  const killed = await killPairSession(pairTmuxSession(pairId));