@integrity-labs/agt-cli 0.28.579 → 0.28.581

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-TLF2BQRN.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-MHBLUAOV.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-44HJ5UBR.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-MKWK27KO.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-Y3ILQRLM.js";
56
+ } from "../chunk-VLAPXDCM.js";
57
57
  import {
58
58
  getProjectDir as getProjectDir2,
59
59
  getReadyTasks,
@@ -122,6 +122,7 @@ import {
122
122
  isAgentTimezoneOverrideExpired,
123
123
  isBareAck,
124
124
  isBucketQualified,
125
+ isControlPlaneOnlyConfigKey,
125
126
  isControlPlaneOnlyEnvVar,
126
127
  isConversationFailureCategory,
127
128
  isEmptyTotals,
@@ -182,7 +183,7 @@ import {
182
183
  toOpencodeModel,
183
184
  transcriptActivityAgeSeconds,
184
185
  writeEgressAllowlist
185
- } from "../chunk-RC5YRTZU.js";
186
+ } from "../chunk-RDBPQZVG.js";
186
187
  import {
187
188
  reapOrphanChannelMcps
188
189
  } from "../chunk-XWVM4KPK.js";
@@ -332,9 +333,18 @@ function canonicalize(value) {
332
333
  }
333
334
  return value;
334
335
  }
336
+ function hashableConfig(config2) {
337
+ if (!config2) return {};
338
+ const out = {};
339
+ for (const [key, value] of Object.entries(config2)) {
340
+ if (isControlPlaneOnlyConfigKey(key)) continue;
341
+ out[key] = value;
342
+ }
343
+ return out;
344
+ }
335
345
  function computeIntegrationsHash(integrations) {
336
346
  const payload = integrations.map(
337
- (i) => `${i.definition_id}:${JSON.stringify(canonicalize(i.credentials ?? {}))}:${JSON.stringify(canonicalize(i.config ?? {}))}`
347
+ (i) => `${i.definition_id}:${JSON.stringify(canonicalize(i.credentials ?? {}))}:${JSON.stringify(canonicalize(hashableConfig(i.config)))}`
338
348
  ).sort();
339
349
  return createHash2("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 16);
340
350
  }
@@ -347,6 +357,16 @@ function computeCapabilitySurfaceHash(integrations) {
347
357
  }
348
358
 
349
359
  // src/lib/host-integration-mapping.ts
360
+ var RECOGNISED_CREDENTIAL_DELIVERY = /* @__PURE__ */ new Set(["env", "broker"]);
361
+ var MAX_SHOWN_VALUE_CHARS = 120;
362
+ function describeUnrecognisedCredentialDelivery(value) {
363
+ if (value === void 0 || value === null) return null;
364
+ if (typeof value === "string" && RECOGNISED_CREDENTIAL_DELIVERY.has(value)) return null;
365
+ const shown = typeof value === "string" ? JSON.stringify(
366
+ value.length > MAX_SHOWN_VALUE_CHARS ? `${value.slice(0, MAX_SHOWN_VALUE_CHARS)}\u2026` : value
367
+ ) : `<${typeof value}>`;
368
+ return `unrecognised credential_delivery ${shown} \u2014 treating as env delivery. If this row is a github_app under the github-broker-credentials flag, the API has stripped its token AND the broker helper will be removed, leaving the agent with no GitHub credential at all (ENG-8800 AC5)`;
369
+ }
350
370
  function withResolvedRemoteMcp(integration) {
351
371
  return {
352
372
  ...integration,
@@ -356,9 +376,17 @@ function withResolvedRemoteMcp(integration) {
356
376
  // row into use-time credential delivery — anything else (including a value
357
377
  // a newer API might add later) reads as today's env delivery, so an
358
378
  // unrecognised value can never strip an agent's `git`/`gh` credentials.
359
- credentialDelivery: integration.credential_delivery === "broker" ? "broker" : void 0
379
+ credentialDelivery: normalizeCredentialDelivery(integration.credential_delivery)
360
380
  };
361
381
  }
382
+ function normalizeCredentialDelivery(value) {
383
+ const anomaly = describeUnrecognisedCredentialDelivery(value);
384
+ if (anomaly) {
385
+ process.stderr.write(`[host-integrations] [credential-delivery] ${anomaly}
386
+ `);
387
+ }
388
+ return value === "broker" ? "broker" : void 0;
389
+ }
362
390
 
363
391
  // src/lib/anchor-session-lifecycle.ts
364
392
  var DEFAULT_ANCHOR_SESSION_MAX_DURATION_MINUTES = 60;
@@ -11596,7 +11624,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
11596
11624
  var lastVersionCheckAt = 0;
11597
11625
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
11598
11626
  var lastResponsivenessProbeAt = 0;
11599
- var agtCliVersion = true ? "0.28.579" : "dev";
11627
+ var agtCliVersion = true ? "0.28.581" : "dev";
11600
11628
  function resolveBrewPath(execFileSync2) {
11601
11629
  try {
11602
11630
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -12903,7 +12931,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
12903
12931
  if (codeNames.length === 0) return;
12904
12932
  void (async () => {
12905
12933
  try {
12906
- const { collectDiagnostics } = await import("../persistent-session-TLF2BQRN.js");
12934
+ const { collectDiagnostics } = await import("../persistent-session-MHBLUAOV.js");
12907
12935
  await api.post("/host/heartbeat", {
12908
12936
  host_id: hostId,
12909
12937
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics)
@@ -13011,7 +13039,7 @@ async function pollCycle() {
13011
13039
  }
13012
13040
  try {
13013
13041
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
13014
- const { collectDiagnostics } = await import("../persistent-session-TLF2BQRN.js");
13042
+ const { collectDiagnostics } = await import("../persistent-session-MHBLUAOV.js");
13015
13043
  const diagCodeNames = [...agentState.persistentSessionAgents];
13016
13044
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics) : void 0;
13017
13045
  let tailscaleHostname;
@@ -13134,7 +13162,7 @@ async function pollCycle() {
13134
13162
  collectPanelessActivityProbes,
13135
13163
  getResponsivenessIntervalMs,
13136
13164
  occupancyQualificationClassifications
13137
- } = await import("../responsiveness-probe-XEE6AST5.js");
13165
+ } = await import("../responsiveness-probe-XGMKVWSH.js");
13138
13166
  const probeIntervalMs = getResponsivenessIntervalMs();
13139
13167
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
13140
13168
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -13225,7 +13253,7 @@ async function pollCycle() {
13225
13253
  collectResponsivenessProbes,
13226
13254
  livePendingInboundOldestAgeSeconds,
13227
13255
  parkPendingInbound
13228
- } = await import("../responsiveness-probe-XEE6AST5.js");
13256
+ } = await import("../responsiveness-probe-XGMKVWSH.js");
13229
13257
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
13230
13258
  const wedgeNow = /* @__PURE__ */ new Date();
13231
13259
  const liveAgents = agentState.persistentSessionAgents;
@@ -16795,7 +16823,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
16795
16823
  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}`));
16796
16824
  void (async () => {
16797
16825
  try {
16798
- const { collectDiagnostics } = await import("../persistent-session-TLF2BQRN.js");
16826
+ const { collectDiagnostics } = await import("../persistent-session-MHBLUAOV.js");
16799
16827
  await api.post("/host/heartbeat", {
16800
16828
  host_id: hostId,
16801
16829
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics)
@@ -16846,7 +16874,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
16846
16874
  }
16847
16875
  try {
16848
16876
  const hostId = await getHostId();
16849
- const { collectDiagnostics } = await import("../persistent-session-TLF2BQRN.js");
16877
+ const { collectDiagnostics } = await import("../persistent-session-MHBLUAOV.js");
16850
16878
  await api.post("/host/heartbeat", {
16851
16879
  host_id: hostId,
16852
16880
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics)
@@ -17424,7 +17452,7 @@ async function processClaudePairSessions(agents) {
17424
17452
  killPairSession,
17425
17453
  pairTmuxSession,
17426
17454
  finalizeClaudePairOnboarding
17427
- } = await import("../claude-pair-runtime-44HJ5UBR.js");
17455
+ } = await import("../claude-pair-runtime-MKWK27KO.js");
17428
17456
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
17429
17457
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
17430
17458
  const killed = await killPairSession(pairTmuxSession(pairId));