@integrity-labs/agt-cli 0.28.506 → 0.28.508

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.
@@ -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-VX37ESOS.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-YQ7V5TS6.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-43UIRCO7.js";
56
+ } from "../chunk-GK3TSZ4S.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-LNPJI2AE.js";
177
177
  import {
178
178
  reapOrphanChannelMcps
179
179
  } from "../chunk-XWVM4KPK.js";
@@ -328,7 +328,12 @@ function withResolvedRemoteMcp(integration) {
328
328
  return {
329
329
  ...integration,
330
330
  remoteMcp: integration.remote_mcp ?? void 0,
331
- stdioMcp: integration.stdio_mcp === true ? true : void 0
331
+ stdioMcp: integration.stdio_mcp === true ? true : void 0,
332
+ // ENG-8344: same seam, same reason. Only the exact string 'broker' opts a
333
+ // row into use-time credential delivery — anything else (including a value
334
+ // a newer API might add later) reads as today's env delivery, so an
335
+ // unrecognised value can never strip an agent's `git`/`gh` credentials.
336
+ credentialDelivery: integration.credential_delivery === "broker" ? "broker" : void 0
332
337
  };
333
338
  }
334
339
 
@@ -1047,10 +1052,17 @@ function orphanedRemoteMcpKeys(mcpServers, expectedIntegrationKeys) {
1047
1052
  // src/lib/auto-resume.ts
1048
1053
  var DEFAULT_QUIET_MS = 18e5;
1049
1054
  var DEFAULT_BACKOFF_RESET_MS = 864e5;
1050
- function readAutoResumeConfig(env = process.env) {
1055
+ var AUTO_RESUME_FLAG_KEY = "auto-resume-enabled";
1056
+ function readAutoResumeEnvOverride(env = process.env) {
1051
1057
  const raw = (env["AGT_AUTO_RESUME_ENABLED"] ?? "").trim().toLowerCase();
1058
+ if (raw === "") return void 0;
1059
+ if (raw === "1" || raw === "true" || raw === "yes" || raw === "on") return true;
1060
+ if (raw === "0" || raw === "false" || raw === "no" || raw === "off") return false;
1061
+ return void 0;
1062
+ }
1063
+ function readAutoResumeConfig(opts = {}) {
1052
1064
  return {
1053
- enabled: raw === "1" || raw === "true" || raw === "yes" || raw === "on",
1065
+ enabled: readAutoResumeEnvOverride(opts.env ?? process.env) ?? opts.flagEnabled ?? false,
1054
1066
  quietMs: readEnvNumber("AGT_AUTO_RESUME_QUIET_MS", DEFAULT_QUIET_MS),
1055
1067
  backoffResetMs: readEnvNumber("AGT_AUTO_RESUME_BACKOFF_RESET_MS", DEFAULT_BACKOFF_RESET_MS)
1056
1068
  };
@@ -9092,8 +9104,22 @@ function maybeAutoResume(agent) {
9092
9104
  if (trip && autoResumeStandDowns.has(`${codeName}:${trip.trippedAt}`)) return;
9093
9105
  const decision = decideAutoResume({
9094
9106
  trip,
9107
+ // Rebase note: `main` replaced the raw `autoResumeMarkers.get(codeName)` read
9108
+ // with the `getAutoResumeMarker(codeName)` accessor while this branch was
9109
+ // open. Both sides of the conflict are independent - that change is about
9110
+ // WHERE the marker comes from, this branch's is about how the CONFIG is
9111
+ // resolved - so both are kept.
9095
9112
  marker: getAutoResumeMarker(codeName),
9096
- config: readAutoResumeConfig(),
9113
+ // ENG-8395: gate resolved PER AGENT. getBooleanForAgent applies
9114
+ // env override (AGT_AUTO_RESUME_ENABLED) → this agent's heartbeat override →
9115
+ // host-wide flag → compiled default false. That per-agent layer is the point
9116
+ // of the ticket: the env var's grain is the whole host, so arming one agent
9117
+ // on a 14-agent host was impossible before. readAutoResumeConfig re-applies
9118
+ // the env layer on top (same precedence, idempotent) so the env override
9119
+ // still wins even for a caller that passes no flag value.
9120
+ config: readAutoResumeConfig({
9121
+ flagEnabled: hostFlagStore().getBooleanForAgent(AUTO_RESUME_FLAG_KEY, agent.agent_id)
9122
+ }),
9097
9123
  now: Date.now()
9098
9124
  });
9099
9125
  if (decision.action === "skip") {
@@ -10012,7 +10038,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10012
10038
  var lastVersionCheckAt = 0;
10013
10039
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10014
10040
  var lastResponsivenessProbeAt = 0;
10015
- var agtCliVersion = true ? "0.28.506" : "dev";
10041
+ var agtCliVersion = true ? "0.28.508" : "dev";
10016
10042
  function resolveBrewPath(execFileSync2) {
10017
10043
  try {
10018
10044
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11219,7 +11245,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11219
11245
  if (codeNames.length === 0) return;
11220
11246
  void (async () => {
11221
11247
  try {
11222
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
11248
+ const { collectDiagnostics } = await import("../persistent-session-VX37ESOS.js");
11223
11249
  await api.post("/host/heartbeat", {
11224
11250
  host_id: hostId,
11225
11251
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11326,7 +11352,7 @@ async function pollCycle() {
11326
11352
  }
11327
11353
  try {
11328
11354
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11329
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
11355
+ const { collectDiagnostics } = await import("../persistent-session-VX37ESOS.js");
11330
11356
  const diagCodeNames = [...agentState.persistentSessionAgents];
11331
11357
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11332
11358
  let tailscaleHostname;
@@ -11441,7 +11467,7 @@ async function pollCycle() {
11441
11467
  collectResponsivenessProbes,
11442
11468
  collectPanelessActivityProbes,
11443
11469
  getResponsivenessIntervalMs
11444
- } = await import("../responsiveness-probe-PBWABVLJ.js");
11470
+ } = await import("../responsiveness-probe-5MEW5XNI.js");
11445
11471
  const probeIntervalMs = getResponsivenessIntervalMs();
11446
11472
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11447
11473
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -11505,7 +11531,7 @@ async function pollCycle() {
11505
11531
  collectResponsivenessProbes,
11506
11532
  livePendingInboundOldestAgeSeconds,
11507
11533
  parkPendingInbound
11508
- } = await import("../responsiveness-probe-PBWABVLJ.js");
11534
+ } = await import("../responsiveness-probe-5MEW5XNI.js");
11509
11535
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
11510
11536
  const wedgeNow = /* @__PURE__ */ new Date();
11511
11537
  const liveAgents = agentState.persistentSessionAgents;
@@ -14997,7 +15023,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
14997
15023
  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
15024
  void (async () => {
14999
15025
  try {
15000
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
15026
+ const { collectDiagnostics } = await import("../persistent-session-VX37ESOS.js");
15001
15027
  await api.post("/host/heartbeat", {
15002
15028
  host_id: hostId,
15003
15029
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15047,7 +15073,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
15047
15073
  }
15048
15074
  try {
15049
15075
  const hostId = await getHostId();
15050
- const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
15076
+ const { collectDiagnostics } = await import("../persistent-session-VX37ESOS.js");
15051
15077
  await api.post("/host/heartbeat", {
15052
15078
  host_id: hostId,
15053
15079
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15565,7 +15591,7 @@ async function processClaudePairSessions(agents) {
15565
15591
  killPairSession,
15566
15592
  pairTmuxSession,
15567
15593
  finalizeClaudePairOnboarding
15568
- } = await import("../claude-pair-runtime-7CZWWZJ2.js");
15594
+ } = await import("../claude-pair-runtime-YQ7V5TS6.js");
15569
15595
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
15570
15596
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
15571
15597
  const killed = await killPairSession(pairTmuxSession(pairId));