@integrity-labs/agt-cli 0.28.489 → 0.28.490

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-46GY6S7I.js";
43
+ } from "../chunk-DNRXJESD.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
4830
4830
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4831
4831
  import chalk18 from "chalk";
4832
4832
  import ora16 from "ora";
4833
- var cliVersion = true ? "0.28.489" : "dev";
4833
+ var cliVersion = true ? "0.28.490" : "dev";
4834
4834
  async function fetchLatestVersion() {
4835
4835
  const host2 = getHost();
4836
4836
  if (!host2) return null;
@@ -6002,7 +6002,7 @@ function handleError(err) {
6002
6002
  }
6003
6003
 
6004
6004
  // src/bin/agt.ts
6005
- var cliVersion2 = true ? "0.28.489" : "dev";
6005
+ var cliVersion2 = true ? "0.28.490" : "dev";
6006
6006
  var program = new Command();
6007
6007
  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");
6008
6008
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -4964,7 +4964,7 @@ function exchangeFailureKind(err) {
4964
4964
  }
4965
4965
 
4966
4966
  // src/lib/api-client.ts
4967
- var agtCliVersion = true ? "0.28.489" : "dev";
4967
+ var agtCliVersion = true ? "0.28.490" : "dev";
4968
4968
  var lastConfigHash = null;
4969
4969
  function setConfigHash(hash) {
4970
4970
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7699,4 +7699,4 @@ export {
7699
7699
  managerInstallSystemUnitCommand,
7700
7700
  managerUninstallSystemUnitCommand
7701
7701
  };
7702
- //# sourceMappingURL=chunk-46GY6S7I.js.map
7702
+ //# sourceMappingURL=chunk-DNRXJESD.js.map
@@ -44,7 +44,7 @@ import {
44
44
  resolveEffectivePinRaw,
45
45
  safeWriteJsonAtomic,
46
46
  setConfigHash
47
- } from "../chunk-46GY6S7I.js";
47
+ } from "../chunk-DNRXJESD.js";
48
48
  import {
49
49
  getProjectDir as getProjectDir2,
50
50
  getReadyTasks,
@@ -1825,7 +1825,29 @@ var GATEABLE_RESTART_REASONS = /* @__PURE__ */ new Set([
1825
1825
  "mcp-presence-reaper",
1826
1826
  // ENG-7949: same gate-but-window-exempt shape as 'mcp-presence-reaper' — see
1827
1827
  // WINDOW_EXEMPT_RESTART_REASONS below for why this one skips the window too.
1828
- "channel-mcp-down"
1828
+ "channel-mcp-down",
1829
+ // ENG-8343: a value-only credential RE-MINT (canonically the GitHub App
1830
+ // installation token, ~1h TTL) rewrites GITHUB_ACCESS_TOKEN/GITHUB_TOKEN, and
1831
+ // the ENG-7510 env-only path stops the session to deliver it. Absent from this
1832
+ // allowlist it hit the fail-open default above and bypassed BOTH axes, so the
1833
+ // stop landed ~3ms after the schedule — unconditionally, mid-turn, roughly once
1834
+ // an hour per affected agent (6 agents / ~144 kills a day at time of filing).
1835
+ //
1836
+ // This absence was an oversight, NOT a decision: ENG-7541 introduced the reason
1837
+ // for the breaker and nobody added it here. The call site in manager-worker.ts
1838
+ // documented the opposite ("defers until idle (never mid-turn) ... safe on a
1839
+ // busy agent"), which is why the gap survived ENG-7541, ENG-7737 and ENG-8264
1840
+ // without anyone catching it. Contrast 'integration-change' and 'hot-reload-mcp'
1841
+ // above, whose absence IS deliberate and is documented as such.
1842
+ //
1843
+ // Deliberately NOT given an idle-escalation ceiling like the window axis has
1844
+ // (ENG-8224). A repair that can never fire is worse than interrupting a turn
1845
+ // when the thing being repaired is a dead channel or a dead toolkit; a rotated
1846
+ // credential is not that. The worst case here is an agent that stays busy past
1847
+ // the outgoing token's expiry and sees 401s on `gh`/`git` until its next quiet
1848
+ // gap, which is strictly cheaper than destroying the turn. Do not "fix" this by
1849
+ // forcing the restart through on a deadline.
1850
+ "credential-rotation"
1829
1851
  ]);
1830
1852
  function isGateableRestartReason(reason) {
1831
1853
  return reason != null && GATEABLE_RESTART_REASONS.has(reason);
@@ -1833,7 +1855,8 @@ function isGateableRestartReason(reason) {
1833
1855
  var WINDOW_EXEMPT_RESTART_REASONS = /* @__PURE__ */ new Set([
1834
1856
  "channel-set-change",
1835
1857
  "sender-policy-change",
1836
- "channel-mcp-down"
1858
+ "channel-mcp-down",
1859
+ "credential-rotation"
1837
1860
  ]);
1838
1861
  var RESTART_WINDOW_DEFER_ESCALATE_AFTER = 20;
1839
1862
  function shouldRelaxRestartWindowGate(deferStreak) {
@@ -9344,12 +9367,16 @@ function restartReasonBindsNewMcp(breakerReason) {
9344
9367
  // hit this predicate. Including it arms the ENG-6174 respawn verification for
9345
9368
  // the ONE real respawn of an integration add.
9346
9369
  breakerReason === "integration-change" || // ENG-7541: a 'credential-rotation' respawn IS the env-only re-mint path
9347
- // (ENG-7510), just tagged with a non-tripping breaker class. It must behave
9348
- // IDENTICALLY to 'hot-reload-mcp' for respawn timing + verification — come
9349
- // back immediately so the agent picks up the fresh credential, and arm the
9370
+ // (ENG-7510), just tagged with a non-tripping breaker class. Once its stop
9371
+ // fires it must behave IDENTICALLY to 'hot-reload-mcp' — come back
9372
+ // immediately so the agent picks up the fresh credential, and arm the
9350
9373
  // ENG-6174 respawn verification (the unchanged MCP set re-binds normally, so
9351
- // verification passes). The ONLY thing that differs from 'hot-reload-mcp' is
9352
- // the breaker tally it lands on.
9374
+ // verification passes).
9375
+ // ENG-8343 scope note: "immediately" here is POST-STOP respawn timing only.
9376
+ // WHEN the stop itself fires is now gated (defer-until-idle, window-exempt) —
9377
+ // exactly the combination 'channel-set-change' above already has: gated at
9378
+ // the stop, immediate on the way back. Do not read this predicate as a claim
9379
+ // that the stop is ungated.
9353
9380
  breakerReason === "credential-rotation";
9354
9381
  }
9355
9382
  function dashboardRestartBreakerReason(restartReason) {
@@ -10079,7 +10106,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10079
10106
  var lastVersionCheckAt = 0;
10080
10107
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10081
10108
  var lastResponsivenessProbeAt = 0;
10082
- var agtCliVersion = true ? "0.28.489" : "dev";
10109
+ var agtCliVersion = true ? "0.28.490" : "dev";
10083
10110
  function resolveBrewPath(execFileSync2) {
10084
10111
  try {
10085
10112
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();