@integrity-labs/agt-cli 0.24.5 → 0.24.6

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
@@ -26,7 +26,7 @@ import {
26
26
  success,
27
27
  table,
28
28
  warn
29
- } from "../chunk-QWMGMV4N.js";
29
+ } from "../chunk-VMHT2DM7.js";
30
30
  import {
31
31
  CHANNEL_REGISTRY,
32
32
  DEPLOYMENT_TEMPLATES,
@@ -3736,7 +3736,7 @@ import { execFileSync, execSync } from "child_process";
3736
3736
  import { existsSync as existsSync5, realpathSync } from "fs";
3737
3737
  import chalk17 from "chalk";
3738
3738
  import ora15 from "ora";
3739
- var cliVersion = true ? "0.24.5" : "dev";
3739
+ var cliVersion = true ? "0.24.6" : "dev";
3740
3740
  async function fetchLatestVersion() {
3741
3741
  const host2 = getHost();
3742
3742
  if (!host2) return null;
@@ -4268,7 +4268,7 @@ function handleError(err) {
4268
4268
  }
4269
4269
 
4270
4270
  // src/bin/agt.ts
4271
- var cliVersion2 = true ? "0.24.5" : "dev";
4271
+ var cliVersion2 = true ? "0.24.6" : "dev";
4272
4272
  var program = new Command();
4273
4273
  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");
4274
4274
  program.hook("preAction", (thisCommand) => {
@@ -6710,4 +6710,4 @@ export {
6710
6710
  managerInstallSystemUnitCommand,
6711
6711
  managerUninstallSystemUnitCommand
6712
6712
  };
6713
- //# sourceMappingURL=chunk-QWMGMV4N.js.map
6713
+ //# sourceMappingURL=chunk-VMHT2DM7.js.map
@@ -12,7 +12,7 @@ import {
12
12
  provisionOrientHook,
13
13
  provisionStopHook,
14
14
  requireHost
15
- } from "../chunk-QWMGMV4N.js";
15
+ } from "../chunk-VMHT2DM7.js";
16
16
  import {
17
17
  findTaskByTemplate,
18
18
  getProjectDir as getProjectDir2,
@@ -534,7 +534,7 @@ function reapMissingMcpSessions(args) {
534
534
  );
535
535
  }
536
536
  }
537
- stopSession(codeName);
537
+ stopSession(codeName, { activeKeys: active });
538
538
  return {
539
539
  missing,
540
540
  restarted: true,
@@ -572,6 +572,9 @@ function decideChannelRestart(input) {
572
572
  }
573
573
 
574
574
  // src/lib/restart-breaker.ts
575
+ function reaperRestartBreakerReason(activeKeys) {
576
+ return activeKeys.length >= 2 ? "mcp-presence-reaper" : void 0;
577
+ }
575
578
  var DEFAULT_MAX = 2;
576
579
  var DEFAULT_WINDOW_MS = 6e5;
577
580
  function readEnvNumber(name, fallback) {
@@ -2806,7 +2809,7 @@ var cachedFrameworkVersion = null;
2806
2809
  var lastVersionCheckAt = 0;
2807
2810
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
2808
2811
  var lastResponsivenessProbeAt = 0;
2809
- var agtCliVersion = true ? "0.24.5" : "dev";
2812
+ var agtCliVersion = true ? "0.24.6" : "dev";
2810
2813
  function resolveBrewPath(execFileSync4) {
2811
2814
  try {
2812
2815
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -5149,12 +5152,17 @@ async function processAgent(agent, agentStates) {
5149
5152
  codeName: agent.code_name,
5150
5153
  mcpJson: mcpJsonParsed,
5151
5154
  sessionStartedAt: sess?.startedAt ?? null,
5152
- // ENG-5441: mcp-presence-reaper-driven restart counts against
5153
- // the breaker. Each declared MCP has its own ENG-5279 give-up
5154
- // cap (~3 cycles per server), but a thrashing collection of
5155
- // MCPs can still rotate restarts of the whole session. The
5156
- // breaker catches the rotating case the per-MCP cap can't see.
5157
- stopSession: (codeName) => stopPersistentSessionAndForgetMcpBaseline(codeName, "mcp-presence-reaper"),
5155
+ // ENG-5441 / ENG-5547: a mcp-presence-reaper restart counts against
5156
+ // the agent-wide breaker ONLY when several distinct MCP servers are
5157
+ // missing at once a thrashing collection that rotates restarts of
5158
+ // the whole session, which the per-MCP cap can't see. A restart
5159
+ // driven by a SINGLE persistently-failing server is left to that
5160
+ // server's own ENG-5279 give-up cap ( marked unhealthy via onGiveUp
5161
+ // → dropped from the next .mcp.json), so one bad integration is
5162
+ // isolated and the agent keeps running degraded instead of being
5163
+ // paused wholesale. reaperRestartBreakerReason() encodes that
5164
+ // single-vs-multi decision; undefined means "restart, don't count".
5165
+ stopSession: (codeName, ctx) => stopPersistentSessionAndForgetMcpBaseline(codeName, reaperRestartBreakerReason(ctx.activeKeys)),
5158
5166
  // ENG-5292: when the reaper gives up on a managed MCP (cap from
5159
5167
  // ENG-5279 + state-preservation from ENG-5285 both said "this
5160
5168
  // MCP keeps failing after 3 restart cycles"), mark the matching