@integrity-labs/agt-cli 0.28.927 → 0.28.928

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.
package/dist/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-LWLTSFH3.js";
43
+ } from "../chunk-OXWLTPU2.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.927" : "dev";
5470
+ var cliVersion = true ? "0.28.928" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6682,7 +6682,7 @@ function handleError(err) {
6682
6682
  }
6683
6683
 
6684
6684
  // src/bin/agt.ts
6685
- var cliVersion2 = true ? "0.28.927" : "dev";
6685
+ var cliVersion2 = true ? "0.28.928" : "dev";
6686
6686
  var program = new Command();
6687
6687
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6688
6688
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6942,7 +6942,7 @@ function exchangeFailureKind(err) {
6942
6942
  }
6943
6943
 
6944
6944
  // src/lib/api-client.ts
6945
- var agtCliVersion = true ? "0.28.927" : "dev";
6945
+ var agtCliVersion = true ? "0.28.928" : "dev";
6946
6946
  var lastConfigHash = null;
6947
6947
  function setConfigHash(hash) {
6948
6948
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11552,4 +11552,4 @@ export {
11552
11552
  managerInstallSystemUnitCommand,
11553
11553
  managerUninstallSystemUnitCommand
11554
11554
  };
11555
- //# sourceMappingURL=chunk-LWLTSFH3.js.map
11555
+ //# sourceMappingURL=chunk-OXWLTPU2.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-LWLTSFH3.js";
66
+ } from "../chunk-OXWLTPU2.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -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();
@@ -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.928" : "dev";
13876
13910
  function resolveBrewPath(execFileSync2) {
13877
13911
  try {
13878
13912
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();