@integrity-labs/agt-cli 0.28.1010 → 0.28.1011

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,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-V6HO4MUI.js";
43
+ } from "../chunk-IXWRE7BB.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-HSYBLAWA.js";
48
+ } from "../chunk-APSSNA7A.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1010" : "dev";
5477
+ var cliVersion = true ? "0.28.1011" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1010" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1011" : "dev";
6738
6738
  var program = new Command();
6739
6739
  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");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -83,6 +83,18 @@ function invalidDuration(name, ms) {
83
83
  if (Number.isFinite(ms) && ms >= MIN_DURATION_MS) return null;
84
84
  return `[bounded-exec] refusing to run: ${name}=${String(ms)} is not a usable deadline (needs a finite value >= ${MIN_DURATION_MS}ms). A zero or sub-millisecond duration DISABLES the deadline or the SIGKILL escalation, which would leave this call unbounded while reporting that it was bounded (ENG-9781).`;
85
85
  }
86
+ function boundedArgv(file, args, timeoutMs, killAfterMs, available) {
87
+ return available ? {
88
+ execFile: "timeout",
89
+ execArgs: [
90
+ "--signal=TERM",
91
+ `--kill-after=${toTimeoutArg(killAfterMs)}`,
92
+ toTimeoutArg(timeoutMs),
93
+ file,
94
+ ...args
95
+ ]
96
+ } : { execFile: file, execArgs: [...args] };
97
+ }
86
98
  function hardBoundedExecFile(file, args, opts) {
87
99
  const exec = opts.exec ?? execFileSync;
88
100
  const killAfterMs = opts.killAfterMs ?? DEFAULT_KILL_AFTER_MS;
@@ -103,14 +115,7 @@ function hardBoundedExecFile(file, args, opts) {
103
115
  );
104
116
  }
105
117
  const nodeTimeoutMs = available ? opts.timeoutMs + killAfterMs + 5e3 : opts.timeoutMs;
106
- const execFile2 = available ? "timeout" : file;
107
- const execArgs = available ? [
108
- "--signal=TERM",
109
- `--kill-after=${toTimeoutArg(killAfterMs)}`,
110
- toTimeoutArg(opts.timeoutMs),
111
- file,
112
- ...args
113
- ] : [...args];
118
+ const { execFile: execFile2, execArgs } = boundedArgv(file, args, opts.timeoutMs, killAfterMs, available);
114
119
  const now = opts.now ?? (() => performance.now());
115
120
  const startedAt = now();
116
121
  try {
@@ -5563,12 +5568,13 @@ function resetRestartCount(codeName) {
5563
5568
  const session = sessions2.get(codeName);
5564
5569
  if (session) session.restartCount = 0;
5565
5570
  }
5566
- function collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeFor, pidPressureFor, forwardedToolsFor) {
5571
+ function collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeFor, pidPressureFor, forwardedToolsFor, runtimeVersionFor) {
5567
5572
  return codeNames.map((codeName) => {
5568
5573
  const quarantinedChannels = quarantineEntriesFor?.(codeName) ?? [];
5569
5574
  const spawnOutcome = spawnOutcomeFor?.(codeName);
5570
5575
  const pidPressure = pidPressureFor?.(codeName) ?? null;
5571
5576
  const forwardedTools = forwardedToolsFor?.(codeName) ?? null;
5577
+ const runtimeVersion = runtimeVersionFor?.(codeName);
5572
5578
  const oc = getOpencodeSessionState(codeName);
5573
5579
  if (oc) {
5574
5580
  const serveAlive = isOpencodeSessionHealthy(codeName);
@@ -5609,6 +5615,9 @@ function collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, sp
5609
5615
  // null would blind exactly the agents nobody is watching. If the file is
5610
5616
  // absent the accessor already returns null.
5611
5617
  forwardedTools,
5618
+ // ENG-10857: carried on BOTH return paths, for the reason stated just above.
5619
+ // An opencode agent in a container runs a baked binary too.
5620
+ ...runtimeVersion ? { runtimeVersion } : {},
5612
5621
  ...turn ? {
5613
5622
  turnHealth: {
5614
5623
  lastOutcome: turn.lastOutcome,
@@ -5688,7 +5697,10 @@ function collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, sp
5688
5697
  pidPressure,
5689
5698
  // ENG-9477: both return paths carry it. A field on only one of them is the
5690
5699
  // divergence class this file already learned from twice (ENG-7188, ENG-8876).
5691
- forwardedTools
5700
+ forwardedTools,
5701
+ // ENG-10857: carried on BOTH return paths, for the reason stated just above.
5702
+ // An opencode agent in a container runs a baked binary too.
5703
+ ...runtimeVersion ? { runtimeVersion } : {}
5692
5704
  };
5693
5705
  });
5694
5706
  }
@@ -5733,6 +5745,9 @@ export {
5733
5745
  toOpencodeModel,
5734
5746
  mergeOpencodeConfigArtifact,
5735
5747
  readChannelServerEnv,
5748
+ DEFAULT_KILL_AFTER_MS,
5749
+ hasTimeoutBinary,
5750
+ boundedArgv,
5736
5751
  hardBoundedExecFile,
5737
5752
  hardBoundedCapture,
5738
5753
  LATE_BOUND_VARS,
@@ -5841,4 +5856,4 @@ export {
5841
5856
  stopAllSessionsAndWait,
5842
5857
  getProjectDir
5843
5858
  };
5844
- //# sourceMappingURL=chunk-HSYBLAWA.js.map
5859
+ //# sourceMappingURL=chunk-APSSNA7A.js.map