@integrity-labs/agt-cli 0.28.123 → 0.28.124

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
@@ -37,7 +37,7 @@ import {
37
37
  success,
38
38
  table,
39
39
  warn
40
- } from "../chunk-TAXAKVZI.js";
40
+ } from "../chunk-P3IYLX6T.js";
41
41
  import {
42
42
  CHANNEL_REGISTRY,
43
43
  DEPLOYMENT_TEMPLATES,
@@ -64,7 +64,7 @@ import {
64
64
  renderTemplate,
65
65
  resolveChannels,
66
66
  serializeManifestForSlackCli
67
- } from "../chunk-3TBZBKJM.js";
67
+ } from "../chunk-CJGLCXS7.js";
68
68
 
69
69
  // src/bin/agt.ts
70
70
  import { join as join22 } from "path";
@@ -4777,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
4777
4777
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4778
4778
  import chalk18 from "chalk";
4779
4779
  import ora16 from "ora";
4780
- var cliVersion = true ? "0.28.123" : "dev";
4780
+ var cliVersion = true ? "0.28.124" : "dev";
4781
4781
  async function fetchLatestVersion() {
4782
4782
  const host2 = getHost();
4783
4783
  if (!host2) return null;
@@ -5791,7 +5791,7 @@ function handleError(err) {
5791
5791
  }
5792
5792
 
5793
5793
  // src/bin/agt.ts
5794
- var cliVersion2 = true ? "0.28.123" : "dev";
5794
+ var cliVersion2 = true ? "0.28.124" : "dev";
5795
5795
  var program = new Command();
5796
5796
  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");
5797
5797
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -5751,4 +5751,4 @@ export {
5751
5751
  parseEnvIntegrations,
5752
5752
  probeMcpEnvSubstitution
5753
5753
  };
5754
- //# sourceMappingURL=chunk-3TBZBKJM.js.map
5754
+ //# sourceMappingURL=chunk-CJGLCXS7.js.map
@@ -3,7 +3,7 @@ import {
3
3
  formatMissingVar,
4
4
  isClaudeFastMode,
5
5
  probeMcpEnvSubstitution
6
- } from "./chunk-3TBZBKJM.js";
6
+ } from "./chunk-CJGLCXS7.js";
7
7
  import {
8
8
  reapOrphanChannelMcps
9
9
  } from "./chunk-XWVM4KPK.js";
@@ -1568,4 +1568,4 @@ export {
1568
1568
  stopAllSessionsAndWait,
1569
1569
  getProjectDir
1570
1570
  };
1571
- //# sourceMappingURL=chunk-2LCGKN3V.js.map
1571
+ //# sourceMappingURL=chunk-FTI6BPE7.js.map
@@ -22,7 +22,7 @@ import {
22
22
  resolveConnectivityProbe,
23
23
  worseConnectivityOutcome,
24
24
  wrapScheduledTaskPrompt
25
- } from "./chunk-3TBZBKJM.js";
25
+ } from "./chunk-CJGLCXS7.js";
26
26
 
27
27
  // ../../packages/core/dist/integrations/registry.js
28
28
  var INTEGRATION_REGISTRY = [
@@ -7653,7 +7653,7 @@ function requireHost() {
7653
7653
  }
7654
7654
 
7655
7655
  // src/lib/api-client.ts
7656
- var agtCliVersion = true ? "0.28.123" : "dev";
7656
+ var agtCliVersion = true ? "0.28.124" : "dev";
7657
7657
  var lastConfigHash = null;
7658
7658
  function setConfigHash(hash) {
7659
7659
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8673,7 +8673,7 @@ function resolveStableAgtBin(rawPath) {
8673
8673
  }
8674
8674
  async function managerInstallCommand(opts = {}) {
8675
8675
  const json = isJsonMode();
8676
- const { installSupervisor, supervisorStatus } = await import("./manager-supervisor-P63HG5MR.js");
8676
+ const { installSupervisor, supervisorStatus } = await import("./manager-supervisor-RMC62QES.js");
8677
8677
  const intervalSec = parseInt(opts.interval ?? "10", 10);
8678
8678
  if (isNaN(intervalSec) || intervalSec < 5) {
8679
8679
  const msg = "Interval must be at least 5 seconds.";
@@ -8737,7 +8737,7 @@ async function managerInstallCommand(opts = {}) {
8737
8737
  }
8738
8738
  async function managerUninstallCommand() {
8739
8739
  const json = isJsonMode();
8740
- const { uninstallSupervisor } = await import("./manager-supervisor-P63HG5MR.js");
8740
+ const { uninstallSupervisor } = await import("./manager-supervisor-RMC62QES.js");
8741
8741
  const result = await uninstallSupervisor();
8742
8742
  if (!result.ok) {
8743
8743
  if (json) jsonOutput({ ok: false, error: result.error });
@@ -8753,7 +8753,7 @@ async function managerUninstallCommand() {
8753
8753
  }
8754
8754
  async function managerInstallSystemUnitCommand(opts = {}) {
8755
8755
  const json = isJsonMode();
8756
- const { installSystemUnit, systemUnitStatus } = await import("./manager-supervisor-P63HG5MR.js");
8756
+ const { installSystemUnit, systemUnitStatus } = await import("./manager-supervisor-RMC62QES.js");
8757
8757
  const intervalSec = parseInt(opts.interval ?? "10", 10);
8758
8758
  if (isNaN(intervalSec) || intervalSec < 5) {
8759
8759
  const msg = "Interval must be at least 5 seconds.";
@@ -8811,7 +8811,7 @@ async function managerInstallSystemUnitCommand(opts = {}) {
8811
8811
  }
8812
8812
  async function managerUninstallSystemUnitCommand() {
8813
8813
  const json = isJsonMode();
8814
- const { uninstallSystemUnit } = await import("./manager-supervisor-P63HG5MR.js");
8814
+ const { uninstallSystemUnit } = await import("./manager-supervisor-RMC62QES.js");
8815
8815
  const result = await uninstallSystemUnit();
8816
8816
  if (!result.ok) {
8817
8817
  if (json) jsonOutput({ ok: false, error: result.error });
@@ -8950,4 +8950,4 @@ export {
8950
8950
  managerInstallSystemUnitCommand,
8951
8951
  managerUninstallSystemUnitCommand
8952
8952
  };
8953
- //# sourceMappingURL=chunk-TAXAKVZI.js.map
8953
+ //# sourceMappingURL=chunk-P3IYLX6T.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-J4ODLVDJ.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-VH4DQ7JX.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-BJX6GLXE.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-SOCMU6MK.js.map
@@ -28,7 +28,7 @@ import {
28
28
  requireHost,
29
29
  safeWriteJsonAtomic,
30
30
  setConfigHash
31
- } from "../chunk-TAXAKVZI.js";
31
+ } from "../chunk-P3IYLX6T.js";
32
32
  import {
33
33
  getProjectDir as getProjectDir2,
34
34
  getReadyTasks,
@@ -72,7 +72,7 @@ import {
72
72
  takeZombieDetection,
73
73
  transcriptActivityAgeSeconds,
74
74
  writeEgressAllowlist
75
- } from "../chunk-2LCGKN3V.js";
75
+ } from "../chunk-FTI6BPE7.js";
76
76
  import {
77
77
  FLAGS_SCHEMA_VERSION,
78
78
  FLAG_REGISTRY,
@@ -108,7 +108,7 @@ import {
108
108
  resolveDmTarget,
109
109
  sumTranscriptUsageInWindow,
110
110
  wrapScheduledTaskPrompt
111
- } from "../chunk-3TBZBKJM.js";
111
+ } from "../chunk-CJGLCXS7.js";
112
112
  import {
113
113
  parsePsRows,
114
114
  reapOrphanChannelMcps
@@ -1567,6 +1567,11 @@ function decideSelfUpdateCoalesce(inputs) {
1567
1567
  if (elapsed >= windowMs) return { proceed: true, remainingMs: 0, lastAppliedMs: null };
1568
1568
  return { proceed: false, remainingMs: windowMs - elapsed, lastAppliedMs };
1569
1569
  }
1570
+ function isAgtVersionSmokeOk(stdout, expectedVersion) {
1571
+ if (!expectedVersion) return false;
1572
+ const token = stdout.trim().split(/\s+/)[0] ?? "";
1573
+ return token === expectedVersion;
1574
+ }
1570
1575
  function formatCoalesceDeferLogLine(opts) {
1571
1576
  const remainingSec = Math.ceil(opts.remainingMs / 1e3);
1572
1577
  const windowMin = Math.round(opts.windowMs / 6e4);
@@ -7000,7 +7005,7 @@ var cachedMaintenanceWindow = null;
7000
7005
  var lastVersionCheckAt = 0;
7001
7006
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
7002
7007
  var lastResponsivenessProbeAt = 0;
7003
- var agtCliVersion = true ? "0.28.123" : "dev";
7008
+ var agtCliVersion = true ? "0.28.124" : "dev";
7004
7009
  function resolveBrewPath(execFileSync4) {
7005
7010
  try {
7006
7011
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7512,15 +7517,31 @@ async function installAgtCliViaNpm(version, reasonLabel) {
7512
7517
  const args = isRoot ? installArgs : ["-n", "npm", ...installArgs];
7513
7518
  try {
7514
7519
  execFileSync4(cmd, args, { timeout: 18e4, stdio: "pipe" });
7515
- log(
7516
- `[self-update] agt CLI upgraded to ${version} (${reasonLabel}). Scheduling manager restart so the new binary takes effect.`
7517
- );
7518
- stampLastSelfUpdateApplied(selfUpdateAppliedMarkerPath());
7519
- restartAfterUpgrade = true;
7520
- pendingUpgradeVersion = version;
7521
7520
  } catch (err) {
7522
7521
  log(`[self-update] npm upgrade failed: ${err.message}`);
7522
+ return;
7523
+ }
7524
+ let smokeOk = false;
7525
+ try {
7526
+ const out = execFileSync4("agt", ["--version"], { timeout: 15e3, stdio: "pipe" }).toString();
7527
+ smokeOk = isAgtVersionSmokeOk(out, version);
7528
+ if (!smokeOk) {
7529
+ log(
7530
+ `[self-update] smoke check failed: \`agt --version\` did not report ${version} after install (got: ${out.trim().slice(0, 80)}). NOT restarting.`
7531
+ );
7532
+ }
7533
+ } catch (err) {
7534
+ log(
7535
+ `[self-update] smoke check failed: \`agt --version\` would not run after install (${err.message}). The binary may be dangling; NOT restarting. systemd ExecStartPre will repair on the next start if needed.`
7536
+ );
7523
7537
  }
7538
+ if (!smokeOk) return;
7539
+ log(
7540
+ `[self-update] agt CLI upgraded to ${version} (${reasonLabel}). Scheduling manager restart so the new binary takes effect.`
7541
+ );
7542
+ stampLastSelfUpdateApplied(selfUpdateAppliedMarkerPath());
7543
+ restartAfterUpgrade = true;
7544
+ pendingUpgradeVersion = version;
7524
7545
  }
7525
7546
  function isPrereleaseVersion(v) {
7526
7547
  return v.replace(/^v/, "").split("+")[0].includes("-");
@@ -8111,7 +8132,7 @@ async function pollCycle() {
8111
8132
  }
8112
8133
  try {
8113
8134
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
8114
- const { collectDiagnostics } = await import("../persistent-session-J4ODLVDJ.js");
8135
+ const { collectDiagnostics } = await import("../persistent-session-VH4DQ7JX.js");
8115
8136
  const diagCodeNames = [...agentState.persistentSessionAgents];
8116
8137
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
8117
8138
  let tailscaleHostname;
@@ -8212,7 +8233,7 @@ async function pollCycle() {
8212
8233
  const {
8213
8234
  collectResponsivenessProbes,
8214
8235
  getResponsivenessIntervalMs
8215
- } = await import("../responsiveness-probe-WEVTSOD3.js");
8236
+ } = await import("../responsiveness-probe-6ZOOSQXR.js");
8216
8237
  const probeIntervalMs = getResponsivenessIntervalMs();
8217
8238
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
8218
8239
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -8244,7 +8265,7 @@ async function pollCycle() {
8244
8265
  collectResponsivenessProbes,
8245
8266
  livePendingInboundOldestAgeSeconds,
8246
8267
  parkPendingInbound
8247
- } = await import("../responsiveness-probe-WEVTSOD3.js");
8268
+ } = await import("../responsiveness-probe-6ZOOSQXR.js");
8248
8269
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
8249
8270
  const wedgeNow = /* @__PURE__ */ new Date();
8250
8271
  const liveAgents = agentState.persistentSessionAgents;
@@ -11776,7 +11797,7 @@ async function processClaudePairSessions(agents) {
11776
11797
  killPairSession,
11777
11798
  pairTmuxSession,
11778
11799
  finalizeClaudePairOnboarding
11779
- } = await import("../claude-pair-runtime-BJX6GLXE.js");
11800
+ } = await import("../claude-pair-runtime-SOCMU6MK.js");
11780
11801
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11781
11802
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11782
11803
  const killed = await killPairSession(pairTmuxSession(pairId));