@integrity-labs/agt-cli 0.28.486 → 0.28.488

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-XP53UXQR.js";
43
+ } from "../chunk-PMDCZKFQ.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -71,7 +71,7 @@ import {
71
71
  requiredMcpWildcard,
72
72
  resolveChannels,
73
73
  serializeManifestForSlackCli
74
- } from "../chunk-SRR5XVWJ.js";
74
+ } from "../chunk-XZI5IHQP.js";
75
75
  import "../chunk-XWVM4KPK.js";
76
76
 
77
77
  // src/bin/agt.ts
@@ -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.486" : "dev";
4833
+ var cliVersion = true ? "0.28.488" : "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.486" : "dev";
6005
+ var cliVersion2 = true ? "0.28.488" : "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) => {
@@ -30,7 +30,7 @@ import {
30
30
  resolveConnectivityProbe,
31
31
  worseConnectivityOutcome,
32
32
  wrapScheduledTaskPrompt
33
- } from "./chunk-SRR5XVWJ.js";
33
+ } from "./chunk-XZI5IHQP.js";
34
34
  import {
35
35
  parsePsRows
36
36
  } from "./chunk-XWVM4KPK.js";
@@ -3094,6 +3094,25 @@ function buildMcpJson(input) {
3094
3094
  args: [localXeroMcpPath],
3095
3095
  env: {
3096
3096
  ...brokerMode ? {} : { XERO_CLIENT_BEARER_TOKEN: "${XERO_ACCESS_TOKEN}" },
3097
+ // ENG-8264: broker mode must ALSO declare which env var holds the
3098
+ // credential, or dropping the `${XERO_ACCESS_TOKEN}` reference above
3099
+ // silently re-classifies it. `findMcpServersUsingVars` only sees vars
3100
+ // referenced as `${VAR}`, so with that reference gone the manager's
3101
+ // `envOnlyRespawnVars` treats XERO_ACCESS_TOKEN as env-only and
3102
+ // schedules a FULL SESSION RESPAWN on every OAuth rotation (~30 min) -
3103
+ // trading the ~20-min child kill ENG-5318 fixed for something worse.
3104
+ // Observed live on stirling at 2026-08-02T07:29:34Z.
3105
+ //
3106
+ // This is a declaration of fact, not a carve-out: in broker mode the
3107
+ // server fetches the freshest token from the credential broker on every
3108
+ // call (that is what AGT_INTEGRATION_ID/AGT_AGENT_ID above are for), so
3109
+ // a rotation genuinely needs no restart - exactly what
3110
+ // AGT_REMOTE_MCP_TOKEN_VAR means. `liveProxyTokenVars` reads this key
3111
+ // off ANY mcpServers entry, not only remote-proxy ones, so the manager
3112
+ // filters the var out of the respawn set. The `${VAR}` reference stays
3113
+ // absent, so stale-mcp-reaper stays quiet too: both restart paths
3114
+ // satisfied at once.
3115
+ ...brokerMode ? { AGT_REMOTE_MCP_TOKEN_VAR: "XERO_ACCESS_TOKEN" } : {},
3097
3116
  XERO_TENANT_ID: "${XERO_TENANT_ID}",
3098
3117
  AGT_HOST: "${AGT_HOST}",
3099
3118
  AGT_TOKEN: "${AGT_TOKEN}",
@@ -4285,6 +4304,13 @@ ${sections}`
4285
4304
  const brokerMode = Boolean(agentId && xeroIntegration.id);
4286
4305
  const xeroEnv = {
4287
4306
  ...brokerMode ? {} : { XERO_CLIENT_BEARER_TOKEN: "${XERO_ACCESS_TOKEN}" },
4307
+ // ENG-8264: declare the credential var in broker mode so the manager
4308
+ // does not re-classify it as env-only and respawn the whole session on
4309
+ // every rotation. Mirrors the buildMcpJson path above - see that block
4310
+ // for the full rationale. Kept in both renderers deliberately: they
4311
+ // produce the same entry by two routes, and a fix in only one of them
4312
+ // is a fix that holds until whichever path the agent happens to take.
4313
+ ...brokerMode ? { AGT_REMOTE_MCP_TOKEN_VAR: "XERO_ACCESS_TOKEN" } : {},
4288
4314
  XERO_TENANT_ID: "${XERO_TENANT_ID}",
4289
4315
  // ENG-4922: writes go through xero-broker → read-only vendor server.
4290
4316
  ...hasXeroBroker ? { XERO_WRITES_VIA_BROKER: "true" } : {},
@@ -4938,7 +4964,7 @@ function exchangeFailureKind(err) {
4938
4964
  }
4939
4965
 
4940
4966
  // src/lib/api-client.ts
4941
- var agtCliVersion = true ? "0.28.486" : "dev";
4967
+ var agtCliVersion = true ? "0.28.488" : "dev";
4942
4968
  var lastConfigHash = null;
4943
4969
  function setConfigHash(hash) {
4944
4970
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7667,4 +7693,4 @@ export {
7667
7693
  managerInstallSystemUnitCommand,
7668
7694
  managerUninstallSystemUnitCommand
7669
7695
  };
7670
- //# sourceMappingURL=chunk-XP53UXQR.js.map
7696
+ //# sourceMappingURL=chunk-PMDCZKFQ.js.map