@integrity-labs/agt-cli 0.28.506 → 0.28.507

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.
@@ -43,7 +43,7 @@ import {
43
43
  resolveConnectivityProbe,
44
44
  worseConnectivityOutcome,
45
45
  wrapScheduledTaskPrompt
46
- } from "./chunk-SMHHGXI5.js";
46
+ } from "./chunk-4PRR22KH.js";
47
47
  import {
48
48
  parsePsRows
49
49
  } from "./chunk-XWVM4KPK.js";
@@ -5062,7 +5062,7 @@ function exchangeFailureKind(err) {
5062
5062
  }
5063
5063
 
5064
5064
  // src/lib/api-client.ts
5065
- var agtCliVersion = true ? "0.28.506" : "dev";
5065
+ var agtCliVersion = true ? "0.28.507" : "dev";
5066
5066
  var lastConfigHash = null;
5067
5067
  function setConfigHash(hash) {
5068
5068
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8368,4 +8368,4 @@ export {
8368
8368
  managerInstallSystemUnitCommand,
8369
8369
  managerUninstallSystemUnitCommand
8370
8370
  };
8371
- //# sourceMappingURL=chunk-43UIRCO7.js.map
8371
+ //# sourceMappingURL=chunk-75NQ7UBH.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-RAXQFDPB.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-OMAAP4OU.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-7CZWWZJ2.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-37TIOIJQ.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-43UIRCO7.js";
56
+ } from "../chunk-75NQ7UBH.js";
57
57
  import {
58
58
  getProjectDir as getProjectDir2,
59
59
  getReadyTasks,
@@ -173,7 +173,7 @@ import {
173
173
  toOpencodeModel,
174
174
  transcriptActivityAgeSeconds,
175
175
  writeEgressAllowlist
176
- } from "../chunk-SMHHGXI5.js";
176
+ } from "../chunk-4PRR22KH.js";
177
177
  import {
178
178
  reapOrphanChannelMcps
179
179
  } from "../chunk-XWVM4KPK.js";
@@ -1047,10 +1047,17 @@ function orphanedRemoteMcpKeys(mcpServers, expectedIntegrationKeys) {
1047
1047
  // src/lib/auto-resume.ts
1048
1048
  var DEFAULT_QUIET_MS = 18e5;
1049
1049
  var DEFAULT_BACKOFF_RESET_MS = 864e5;
1050
- function readAutoResumeConfig(env = process.env) {
1050
+ var AUTO_RESUME_FLAG_KEY = "auto-resume-enabled";
1051
+ function readAutoResumeEnvOverride(env = process.env) {
1051
1052
  const raw = (env["AGT_AUTO_RESUME_ENABLED"] ?? "").trim().toLowerCase();
1053
+ if (raw === "") return void 0;
1054
+ if (raw === "1" || raw === "true" || raw === "yes" || raw === "on") return true;
1055
+ if (raw === "0" || raw === "false" || raw === "no" || raw === "off") return false;
1056
+ return void 0;
1057
+ }
1058
+ function readAutoResumeConfig(opts = {}) {
1052
1059
  return {
1053
- enabled: raw === "1" || raw === "true" || raw === "yes" || raw === "on",
1060
+ enabled: readAutoResumeEnvOverride(opts.env ?? process.env) ?? opts.flagEnabled ?? false,
1054
1061
  quietMs: readEnvNumber("AGT_AUTO_RESUME_QUIET_MS", DEFAULT_QUIET_MS),
1055
1062
  backoffResetMs: readEnvNumber("AGT_AUTO_RESUME_BACKOFF_RESET_MS", DEFAULT_BACKOFF_RESET_MS)
1056
1063
  };
@@ -9092,8 +9099,22 @@ function maybeAutoResume(agent) {
9092
9099
  if (trip && autoResumeStandDowns.has(`${codeName}:${trip.trippedAt}`)) return;
9093
9100
  const decision = decideAutoResume({
9094
9101
  trip,
9102
+ // Rebase note: `main` replaced the raw `autoResumeMarkers.get(codeName)` read
9103
+ // with the `getAutoResumeMarker(codeName)` accessor while this branch was
9104
+ // open. Both sides of the conflict are independent - that change is about
9105
+ // WHERE the marker comes from, this branch's is about how the CONFIG is
9106
+ // resolved - so both are kept.
9095
9107
  marker: getAutoResumeMarker(codeName),
9096
- config: readAutoResumeConfig(),
9108
+ // ENG-8395: gate resolved PER AGENT. getBooleanForAgent applies
9109
+ // env override (AGT_AUTO_RESUME_ENABLED) → this agent's heartbeat override →
9110
+ // host-wide flag → compiled default false. That per-agent layer is the point
9111
+ // of the ticket: the env var's grain is the whole host, so arming one agent
9112
+ // on a 14-agent host was impossible before. readAutoResumeConfig re-applies
9113
+ // the env layer on top (same precedence, idempotent) so the env override
9114
+ // still wins even for a caller that passes no flag value.
9115
+ config: readAutoResumeConfig({
9116
+ flagEnabled: hostFlagStore().getBooleanForAgent(AUTO_RESUME_FLAG_KEY, agent.agent_id)
9117
+ }),
9097
9118
  now: Date.now()
9098
9119
  });
9099
9120
  if (decision.action === "skip") {
@@ -10012,7 +10033,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10012
10033
  var lastVersionCheckAt = 0;
10013
10034
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10014
10035
  var lastResponsivenessProbeAt = 0;
10015
- var agtCliVersion = true ? "0.28.506" : "dev";
10036
+ var agtCliVersion = true ? "0.28.507" : "dev";
10016
10037
  function resolveBrewPath(execFileSync2) {
10017
10038
  try {
10018
10039
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11219,7 +11240,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11219
11240
  if (codeNames.length === 0) return;
11220
11241
  void (async () => {
11221
11242
  try {
11222
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
11243
+ const { collectDiagnostics } = await import("../persistent-session-OMAAP4OU.js");
11223
11244
  await api.post("/host/heartbeat", {
11224
11245
  host_id: hostId,
11225
11246
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11326,7 +11347,7 @@ async function pollCycle() {
11326
11347
  }
11327
11348
  try {
11328
11349
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11329
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
11350
+ const { collectDiagnostics } = await import("../persistent-session-OMAAP4OU.js");
11330
11351
  const diagCodeNames = [...agentState.persistentSessionAgents];
11331
11352
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11332
11353
  let tailscaleHostname;
@@ -11441,7 +11462,7 @@ async function pollCycle() {
11441
11462
  collectResponsivenessProbes,
11442
11463
  collectPanelessActivityProbes,
11443
11464
  getResponsivenessIntervalMs
11444
- } = await import("../responsiveness-probe-PBWABVLJ.js");
11465
+ } = await import("../responsiveness-probe-NRH2AQW6.js");
11445
11466
  const probeIntervalMs = getResponsivenessIntervalMs();
11446
11467
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11447
11468
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -11505,7 +11526,7 @@ async function pollCycle() {
11505
11526
  collectResponsivenessProbes,
11506
11527
  livePendingInboundOldestAgeSeconds,
11507
11528
  parkPendingInbound
11508
- } = await import("../responsiveness-probe-PBWABVLJ.js");
11529
+ } = await import("../responsiveness-probe-NRH2AQW6.js");
11509
11530
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
11510
11531
  const wedgeNow = /* @__PURE__ */ new Date();
11511
11532
  const liveAgents = agentState.persistentSessionAgents;
@@ -14997,7 +15018,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
14997
15018
  void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
14998
15019
  void (async () => {
14999
15020
  try {
15000
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
15021
+ const { collectDiagnostics } = await import("../persistent-session-OMAAP4OU.js");
15001
15022
  await api.post("/host/heartbeat", {
15002
15023
  host_id: hostId,
15003
15024
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15047,7 +15068,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
15047
15068
  }
15048
15069
  try {
15049
15070
  const hostId = await getHostId();
15050
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
15071
+ const { collectDiagnostics } = await import("../persistent-session-OMAAP4OU.js");
15051
15072
  await api.post("/host/heartbeat", {
15052
15073
  host_id: hostId,
15053
15074
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15565,7 +15586,7 @@ async function processClaudePairSessions(agents) {
15565
15586
  killPairSession,
15566
15587
  pairTmuxSession,
15567
15588
  finalizeClaudePairOnboarding
15568
- } = await import("../claude-pair-runtime-7CZWWZJ2.js");
15589
+ } = await import("../claude-pair-runtime-37TIOIJQ.js");
15569
15590
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
15570
15591
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
15571
15592
  const killed = await killPairSession(pairTmuxSession(pairId));