@integrity-labs/agt-cli 0.28.706 → 0.28.708

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,10 +40,10 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-XS5RWL77.js";
43
+ } from "../chunk-7ZW4P5EU.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
- } from "../chunk-326G325O.js";
46
+ } from "../chunk-VYG4CTEQ.js";
47
47
  import {
48
48
  AnchorSessionClient,
49
49
  CHANNEL_REGISTRY,
@@ -73,7 +73,7 @@ import {
73
73
  requiredMcpWildcard,
74
74
  resolveChannels,
75
75
  serializeManifestForSlackCli
76
- } from "../chunk-QRGNDW6C.js";
76
+ } from "../chunk-NOGQSRQM.js";
77
77
  import "../chunk-XWVM4KPK.js";
78
78
 
79
79
  // src/bin/agt.ts
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.706" : "dev";
4912
+ var cliVersion = true ? "0.28.708" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.706" : "dev";
6092
+ var cliVersion2 = true ? "0.28.708" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -12,7 +12,7 @@ import {
12
12
  parseEnvFileEntries,
13
13
  parseEnvIntegrations,
14
14
  shellQuote
15
- } from "./chunk-326G325O.js";
15
+ } from "./chunk-VYG4CTEQ.js";
16
16
  import {
17
17
  BIND_FAILURE_QUARANTINE_THRESHOLD,
18
18
  INTEGRATIONS_SECTION_END,
@@ -59,7 +59,7 @@ import {
59
59
  resolveConnectivityProbe,
60
60
  worseConnectivityOutcome,
61
61
  wrapScheduledTaskPrompt
62
- } from "./chunk-QRGNDW6C.js";
62
+ } from "./chunk-NOGQSRQM.js";
63
63
  import {
64
64
  parsePsRows
65
65
  } from "./chunk-XWVM4KPK.js";
@@ -6396,7 +6396,7 @@ function exchangeFailureKind(err) {
6396
6396
  }
6397
6397
 
6398
6398
  // src/lib/api-client.ts
6399
- var agtCliVersion = true ? "0.28.706" : "dev";
6399
+ var agtCliVersion = true ? "0.28.708" : "dev";
6400
6400
  var lastConfigHash = null;
6401
6401
  function setConfigHash(hash) {
6402
6402
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10137,4 +10137,4 @@ export {
10137
10137
  managerInstallSystemUnitCommand,
10138
10138
  managerUninstallSystemUnitCommand
10139
10139
  };
10140
- //# sourceMappingURL=chunk-XS5RWL77.js.map
10140
+ //# sourceMappingURL=chunk-7ZW4P5EU.js.map
@@ -12811,4 +12811,4 @@ export {
12811
12811
  minutesSinceLocalMidnight,
12812
12812
  peekCurrentSession
12813
12813
  };
12814
- //# sourceMappingURL=chunk-QRGNDW6C.js.map
12814
+ //# sourceMappingURL=chunk-NOGQSRQM.js.map
@@ -17,7 +17,7 @@ import {
17
17
  rotateDailySession,
18
18
  sessionFileExists,
19
19
  todayLocalIso
20
- } from "./chunk-QRGNDW6C.js";
20
+ } from "./chunk-NOGQSRQM.js";
21
21
  import {
22
22
  reapOrphanChannelMcps
23
23
  } from "./chunk-XWVM4KPK.js";
@@ -4540,4 +4540,4 @@ export {
4540
4540
  stopAllSessionsAndWait,
4541
4541
  getProjectDir
4542
4542
  };
4543
- //# sourceMappingURL=chunk-326G325O.js.map
4543
+ //# sourceMappingURL=chunk-VYG4CTEQ.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-TPP35O6H.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-GIRGRUMF.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-HPYSFXPP.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-CNS5OLQE.js.map
@@ -54,7 +54,7 @@ import {
54
54
  safeWriteJsonAtomic,
55
55
  setConfigHash,
56
56
  tripClass
57
- } from "../chunk-XS5RWL77.js";
57
+ } from "../chunk-7ZW4P5EU.js";
58
58
  import {
59
59
  getProjectDir as getProjectDir2,
60
60
  getReadyTasks,
@@ -112,7 +112,7 @@ import {
112
112
  takeZombieDetection,
113
113
  toOpencodeModel,
114
114
  writeEgressAllowlist
115
- } from "../chunk-326G325O.js";
115
+ } from "../chunk-VYG4CTEQ.js";
116
116
  import {
117
117
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
118
118
  AnchorSessionClient,
@@ -197,7 +197,7 @@ import {
197
197
  subagentActivityAgeSeconds,
198
198
  sumTranscriptUsageInWindow,
199
199
  transcriptActivityAgeSeconds
200
- } from "../chunk-QRGNDW6C.js";
200
+ } from "../chunk-NOGQSRQM.js";
201
201
  import {
202
202
  reapOrphanChannelMcps
203
203
  } from "../chunk-XWVM4KPK.js";
@@ -12057,7 +12057,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
12057
12057
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
12058
12058
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
12059
12059
  async function channelInboundActivityAgeSecondsFor(codeName) {
12060
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-3HITHSYU.js");
12060
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-PIRS3LTX.js");
12061
12061
  const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
12062
12062
  if (newest === null) return null;
12063
12063
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -12705,7 +12705,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
12705
12705
  var lastVersionCheckAt = 0;
12706
12706
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
12707
12707
  var lastResponsivenessProbeAt = 0;
12708
- var agtCliVersion = true ? "0.28.706" : "dev";
12708
+ var agtCliVersion = true ? "0.28.708" : "dev";
12709
12709
  function resolveBrewPath(execFileSync3) {
12710
12710
  try {
12711
12711
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -13872,6 +13872,7 @@ var channelWriteFailureCounts = /* @__PURE__ */ new Map();
13872
13872
  var CHANNEL_WRITE_FAILURE_ESCALATE_EVERY = 90;
13873
13873
  var channelSyncFailures = /* @__PURE__ */ new Map();
13874
13874
  var channelSyncAttemptedSets = /* @__PURE__ */ new Map();
13875
+ var channelCredentialVerdicts = /* @__PURE__ */ new Map();
13875
13876
  function sameChannelSet(a, b) {
13876
13877
  if (a === void 0) return false;
13877
13878
  if (a.size !== b.size) return false;
@@ -13881,6 +13882,7 @@ function sameChannelSet(a, b) {
13881
13882
  function forgetChannelSyncState(agentId) {
13882
13883
  channelSyncFailures.delete(agentId);
13883
13884
  channelSyncAttemptedSets.delete(agentId);
13885
+ channelCredentialVerdicts.delete(agentId);
13884
13886
  }
13885
13887
  var CHANNEL_SYNC_FREE_ATTEMPTS = 3;
13886
13888
  var CHANNEL_SYNC_MAX_BACKOFF_MS = 5 * 6e4;
@@ -13924,6 +13926,26 @@ function stuckChannelSyncs(failures, now, thresholdMs = CHANNEL_SYNC_STUCK_AFTER
13924
13926
  out.sort((a, b) => b.stuck_for_seconds - a.stuck_for_seconds);
13925
13927
  return out;
13926
13928
  }
13929
+ function verifiedChannelCredentials(verdicts) {
13930
+ const out = [];
13931
+ for (const [agentId, channels] of verdicts) {
13932
+ for (const [channelId, verdict] of channels) {
13933
+ out.push({
13934
+ agent_id: agentId,
13935
+ channel_id: channelId,
13936
+ verified: verdict.verified,
13937
+ // Omitted rather than sent as null when converged: a reason only means
13938
+ // anything alongside a failure, and a stale one travelling with
13939
+ // `verified: true` reads as a warning about a healthy channel.
13940
+ ...verdict.verified || !verdict.reason ? {} : { reason: verdict.reason }
13941
+ });
13942
+ }
13943
+ }
13944
+ out.sort(
13945
+ (a, b) => a.agent_id === b.agent_id ? a.channel_id.localeCompare(b.channel_id) : a.agent_id.localeCompare(b.agent_id)
13946
+ );
13947
+ return out;
13948
+ }
13927
13949
  var persistedDeliveryBaseline = createDeliveryBaselineMaps();
13928
13950
  function loadSenderPolicyBaseline2() {
13929
13951
  loadSenderPolicyBaseline(persistedDeliveryBaseline, channelHashCacheDir(), log);
@@ -14210,7 +14232,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
14210
14232
  if (codeNames.length === 0) return;
14211
14233
  void (async () => {
14212
14234
  try {
14213
- const { collectDiagnostics } = await import("../persistent-session-TPP35O6H.js");
14235
+ const { collectDiagnostics } = await import("../persistent-session-GIRGRUMF.js");
14214
14236
  await api.post("/host/heartbeat", {
14215
14237
  host_id: hostId,
14216
14238
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -14328,7 +14350,7 @@ async function pollCycleInner() {
14328
14350
  }
14329
14351
  try {
14330
14352
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
14331
- const { collectDiagnostics } = await import("../persistent-session-TPP35O6H.js");
14353
+ const { collectDiagnostics } = await import("../persistent-session-GIRGRUMF.js");
14332
14354
  const diagCodeNames = [...agentState.persistentSessionAgents];
14333
14355
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
14334
14356
  let tailscaleHostname;
@@ -14415,6 +14437,23 @@ async function pollCycleInner() {
14415
14437
  // close a resolved alert on the edge. Omitting it when empty would make
14416
14438
  // "recovered" and "this CLI is too old to report" the same wire value.
14417
14439
  channel_sync_stuck: stuckChannelSyncs(channelSyncFailures, Date.now()),
14440
+ // ENG-9517: the POSITIVE direction of the field above — the current
14441
+ // per-channel on-disk credential verdict. Without it the control plane
14442
+ // could only ever learn that a channel was broken, and only after ten
14443
+ // minutes; it had no way to learn that one was working, so "installed"
14444
+ // and "never reached the host" were the same row.
14445
+ //
14446
+ // SAME absent-vs-empty contract as its neighbours, and it matters more
14447
+ // here because this field drives a UI completion state: an older CLI
14448
+ // omits it and the consumer must change nothing, while `[]` is an
14449
+ // affirmative "this manager checked and has no channels to report".
14450
+ // Collapsing the two would let a stale CLI read as an all-clear.
14451
+ //
14452
+ // Note this is NOT the complement of `channel_sync_stuck`. A channel
14453
+ // can be absent from both — not yet attempted, deferred by the backoff,
14454
+ // or on an adapter that cannot probe — and that third state has to stay
14455
+ // distinguishable from success.
14456
+ channel_credential_status: verifiedChannelCredentials(channelCredentialVerdicts),
14418
14457
  // ENG-9265: agents whose realtime token-rotation subscription has been
14419
14458
  // failing to bind for longer than the stuck threshold. Same contract as
14420
14459
  // the field above — ALWAYS sent, including as an empty array, because
@@ -14480,7 +14519,7 @@ async function pollCycleInner() {
14480
14519
  collectPanelessActivityProbes,
14481
14520
  getResponsivenessIntervalMs,
14482
14521
  occupancyQualificationClassifications
14483
- } = await import("../responsiveness-probe-3HITHSYU.js");
14522
+ } = await import("../responsiveness-probe-PIRS3LTX.js");
14484
14523
  const probeIntervalMs = getResponsivenessIntervalMs();
14485
14524
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
14486
14525
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -14590,7 +14629,7 @@ async function pollCycleInner() {
14590
14629
  collectResponsivenessProbes,
14591
14630
  livePendingInboundOldestAgeSeconds,
14592
14631
  parkPendingInbound
14593
- } = await import("../responsiveness-probe-3HITHSYU.js");
14632
+ } = await import("../responsiveness-probe-PIRS3LTX.js");
14594
14633
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
14595
14634
  const wedgeNow = /* @__PURE__ */ new Date();
14596
14635
  const liveAgents = agentState.persistentSessionAgents;
@@ -14746,7 +14785,7 @@ async function pollCycleInner() {
14746
14785
  }
14747
14786
  try {
14748
14787
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
14749
- const { probeSessionAuth } = await import("../session-auth-dead-LY5264IN.js");
14788
+ const { probeSessionAuth } = await import("../session-auth-dead-PYWTMI43.js");
14750
14789
  const observations = [];
14751
14790
  const pendingCacheCommits = [];
14752
14791
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -16042,6 +16081,29 @@ async function processAgent(agent, agentStates, managedToolkits) {
16042
16081
  }
16043
16082
  }
16044
16083
  const channelConfigConvergedThisTick = channelConfigConverged && !channelSyncDeferred;
16084
+ if (agent.status === "active" && !channelSyncDeferred && frameworkAdapter.hasChannelCredentials) {
16085
+ const verdicts = /* @__PURE__ */ new Map();
16086
+ for (const channelId of currentChannelIds) {
16087
+ if (quarantinedChannels.has(channelId)) continue;
16088
+ let onDisk = false;
16089
+ try {
16090
+ onDisk = frameworkAdapter.hasChannelCredentials(agent.code_name, channelId);
16091
+ } catch (err) {
16092
+ onDisk = false;
16093
+ log(
16094
+ `[channels] credential verification threw for '${agent.code_name}/${channelId}': ${err.message} \u2014 reporting as unverified (ENG-9517)`
16095
+ );
16096
+ }
16097
+ verdicts.set(channelId, {
16098
+ verified: onDisk,
16099
+ ...onDisk ? {} : { reason: channelConfigFailureReason || "credential not present on disk" }
16100
+ });
16101
+ }
16102
+ if (verdicts.size > 0) channelCredentialVerdicts.set(agent.agent_id, verdicts);
16103
+ else channelCredentialVerdicts.delete(agent.agent_id);
16104
+ } else {
16105
+ channelCredentialVerdicts.delete(agent.agent_id);
16106
+ }
16045
16107
  const restartDecision = channelConfigConvergedThisTick ? decideChannelRestart({
16046
16108
  previousChannelIds,
16047
16109
  currentChannelIds,
@@ -18525,7 +18587,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
18525
18587
  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}`));
18526
18588
  void (async () => {
18527
18589
  try {
18528
- const { collectDiagnostics } = await import("../persistent-session-TPP35O6H.js");
18590
+ const { collectDiagnostics } = await import("../persistent-session-GIRGRUMF.js");
18529
18591
  await api.post("/host/heartbeat", {
18530
18592
  host_id: hostId,
18531
18593
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -18576,7 +18638,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
18576
18638
  }
18577
18639
  try {
18578
18640
  const hostId = await getHostId();
18579
- const { collectDiagnostics } = await import("../persistent-session-TPP35O6H.js");
18641
+ const { collectDiagnostics } = await import("../persistent-session-GIRGRUMF.js");
18580
18642
  await api.post("/host/heartbeat", {
18581
18643
  host_id: hostId,
18582
18644
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19208,7 +19270,7 @@ async function processClaudePairSessions(agents) {
19208
19270
  killPairSession,
19209
19271
  pairTmuxSession,
19210
19272
  finalizeClaudePairOnboarding
19211
- } = await import("../claude-pair-runtime-HPYSFXPP.js");
19273
+ } = await import("../claude-pair-runtime-CNS5OLQE.js");
19212
19274
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
19213
19275
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
19214
19276
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -20446,6 +20508,7 @@ export {
20446
20508
  stopManager,
20447
20509
  stuckChannelSyncs,
20448
20510
  stuckRealtimeRebinds,
20449
- supersededRuntimeImageIds
20511
+ supersededRuntimeImageIds,
20512
+ verifiedChannelCredentials
20450
20513
  };
20451
20514
  //# sourceMappingURL=manager-worker.js.map