@integrity-labs/agt-cli 0.28.741 → 0.28.743

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
@@ -41,12 +41,12 @@ import {
41
41
  success,
42
42
  table,
43
43
  warn
44
- } from "../chunk-2HGXCU4Y.js";
44
+ } from "../chunk-3YSX7UJQ.js";
45
45
  import {
46
46
  getProjectDir,
47
47
  isSessionResumeDisabled,
48
48
  readDirectChatSessionState
49
- } from "../chunk-JDNULCLF.js";
49
+ } from "../chunk-4JHG7DJW.js";
50
50
  import {
51
51
  AnchorSessionClient,
52
52
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-MAXKAS4Q.js";
82
+ } from "../chunk-PD3Y3C46.js";
83
83
  import "../chunk-XWVM4KPK.js";
84
84
 
85
85
  // src/bin/agt.ts
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.741" : "dev";
5470
+ var cliVersion = true ? "0.28.743" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6654,7 +6654,7 @@ function handleError(err) {
6654
6654
  }
6655
6655
 
6656
6656
  // src/bin/agt.ts
6657
- var cliVersion2 = true ? "0.28.741" : "dev";
6657
+ var cliVersion2 = true ? "0.28.743" : "dev";
6658
6658
  var program = new Command();
6659
6659
  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");
6660
6660
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -13,7 +13,7 @@ import {
13
13
  parseEnvFileEntries,
14
14
  parseEnvIntegrations,
15
15
  shellQuote
16
- } from "./chunk-JDNULCLF.js";
16
+ } from "./chunk-4JHG7DJW.js";
17
17
  import {
18
18
  BIND_FAILURE_QUARANTINE_THRESHOLD,
19
19
  INTEGRATIONS_SECTION_END,
@@ -62,7 +62,7 @@ import {
62
62
  sessionTranscriptDir,
63
63
  worseConnectivityOutcome,
64
64
  wrapScheduledTaskPrompt
65
- } from "./chunk-MAXKAS4Q.js";
65
+ } from "./chunk-PD3Y3C46.js";
66
66
  import {
67
67
  parsePsRows
68
68
  } from "./chunk-XWVM4KPK.js";
@@ -6430,7 +6430,7 @@ function exchangeFailureKind(err) {
6430
6430
  }
6431
6431
 
6432
6432
  // src/lib/api-client.ts
6433
- var agtCliVersion = true ? "0.28.741" : "dev";
6433
+ var agtCliVersion = true ? "0.28.743" : "dev";
6434
6434
  var lastConfigHash = null;
6435
6435
  function setConfigHash(hash) {
6436
6436
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10476,4 +10476,4 @@ export {
10476
10476
  managerInstallSystemUnitCommand,
10477
10477
  managerUninstallSystemUnitCommand
10478
10478
  };
10479
- //# sourceMappingURL=chunk-2HGXCU4Y.js.map
10479
+ //# sourceMappingURL=chunk-3YSX7UJQ.js.map
@@ -17,7 +17,7 @@ import {
17
17
  rotateDailySession,
18
18
  sessionFileExists,
19
19
  todayLocalIso
20
- } from "./chunk-MAXKAS4Q.js";
20
+ } from "./chunk-PD3Y3C46.js";
21
21
  import {
22
22
  reapOrphanChannelMcps
23
23
  } from "./chunk-XWVM4KPK.js";
@@ -4929,4 +4929,4 @@ export {
4929
4929
  stopAllSessionsAndWait,
4930
4930
  getProjectDir
4931
4931
  };
4932
- //# sourceMappingURL=chunk-JDNULCLF.js.map
4932
+ //# sourceMappingURL=chunk-4JHG7DJW.js.map
@@ -13037,4 +13037,4 @@ export {
13037
13037
  peekCurrentSession,
13038
13038
  readDailySessionPin
13039
13039
  };
13040
- //# sourceMappingURL=chunk-MAXKAS4Q.js.map
13040
+ //# sourceMappingURL=chunk-PD3Y3C46.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-E7TUUVAI.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-5FNVPGNL.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-JUGH4TOW.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-LEWSA5RI.js.map
@@ -57,7 +57,7 @@ import {
57
57
  safeWriteJsonAtomic,
58
58
  setConfigHash,
59
59
  tripClass
60
- } from "../chunk-2HGXCU4Y.js";
60
+ } from "../chunk-3YSX7UJQ.js";
61
61
  import {
62
62
  getProjectDir as getProjectDir2,
63
63
  getReadyTasks,
@@ -118,7 +118,7 @@ import {
118
118
  takeZombieDetection,
119
119
  toOpencodeModel,
120
120
  writeEgressAllowlist
121
- } from "../chunk-JDNULCLF.js";
121
+ } from "../chunk-4JHG7DJW.js";
122
122
  import {
123
123
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
124
124
  AnchorSessionClient,
@@ -203,7 +203,7 @@ import {
203
203
  subagentActivityAgeSeconds,
204
204
  sumTranscriptUsageInWindow,
205
205
  transcriptActivityAgeSeconds
206
- } from "../chunk-MAXKAS4Q.js";
206
+ } from "../chunk-PD3Y3C46.js";
207
207
  import {
208
208
  reapOrphanChannelMcps
209
209
  } from "../chunk-XWVM4KPK.js";
@@ -5600,6 +5600,22 @@ function createTickBoardFetcher(fetchBoard) {
5600
5600
  // src/lib/kanban-board-token.ts
5601
5601
  var BoardTokenCache = class {
5602
5602
  entries = /* @__PURE__ */ new Map();
5603
+ counts = { unchanged: 0, full: 0, refetch: 0 };
5604
+ /**
5605
+ * Counts since the last {@link resetStats}. Read once per poll cycle for the
5606
+ * `[poll-cycle]` log line — the ONLY place this feature's hit rate is
5607
+ * visible. Server-side it is unmeasurable: in the API Gateway access log an
5608
+ * `{ unchanged: true }` response and a genuinely empty board are the same
5609
+ * ~90 bytes, so a token that never matched would present as a fleet of agents
5610
+ * with empty boards rather than as a saving that is not being taken.
5611
+ */
5612
+ stats() {
5613
+ return { ...this.counts };
5614
+ }
5615
+ /** Zero the counters. Called at the top of each poll cycle. */
5616
+ resetStats() {
5617
+ this.counts = { unchanged: 0, full: 0, refetch: 0 };
5618
+ }
5603
5619
  /** The token to send as `known_token`, or undefined when we hold no board. */
5604
5620
  tokenFor(agentId) {
5605
5621
  return this.entries.get(agentId)?.token;
@@ -5619,12 +5635,17 @@ var BoardTokenCache = class {
5619
5635
  resolve(agentId, res) {
5620
5636
  if (res.unchanged === true) {
5621
5637
  const held = this.entries.get(agentId);
5622
- if (!held) return null;
5638
+ if (!held) {
5639
+ this.counts.refetch += 1;
5640
+ return null;
5641
+ }
5642
+ this.counts.unchanged += 1;
5623
5643
  if (typeof res.board_token === "string" && res.board_token.length > 0) {
5624
5644
  this.entries.set(agentId, { token: res.board_token, rows: held.rows });
5625
5645
  }
5626
5646
  return held.rows;
5627
5647
  }
5648
+ this.counts.full += 1;
5628
5649
  const rows = res.items ?? [];
5629
5650
  if (typeof res.board_token === "string" && res.board_token.length > 0) {
5630
5651
  this.entries.set(agentId, { token: res.board_token, rows });
@@ -12501,7 +12522,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
12501
12522
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
12502
12523
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
12503
12524
  async function channelInboundActivityAgeSecondsFor(codeName) {
12504
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-PXXWLOML.js");
12525
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-NQIXADTX.js");
12505
12526
  const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
12506
12527
  if (newest === null) return null;
12507
12528
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13154,7 +13175,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13154
13175
  var lastVersionCheckAt = 0;
13155
13176
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13156
13177
  var lastResponsivenessProbeAt = 0;
13157
- var agtCliVersion = true ? "0.28.741" : "dev";
13178
+ var agtCliVersion = true ? "0.28.743" : "dev";
13158
13179
  function resolveBrewPath(execFileSync3) {
13159
13180
  try {
13160
13181
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -14695,7 +14716,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
14695
14716
  if (codeNames.length === 0) return;
14696
14717
  void (async () => {
14697
14718
  try {
14698
- const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
14719
+ const { collectDiagnostics } = await import("../persistent-session-5FNVPGNL.js");
14699
14720
  await api.post("/host/heartbeat", {
14700
14721
  host_id: hostId,
14701
14722
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -14836,7 +14857,7 @@ async function pollCycleInner() {
14836
14857
  }
14837
14858
  try {
14838
14859
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
14839
- const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
14860
+ const { collectDiagnostics } = await import("../persistent-session-5FNVPGNL.js");
14840
14861
  const diagCodeNames = [...agentState.persistentSessionAgents];
14841
14862
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
14842
14863
  let tailscaleHostname;
@@ -15005,7 +15026,7 @@ async function pollCycleInner() {
15005
15026
  collectPanelessActivityProbes,
15006
15027
  getResponsivenessIntervalMs,
15007
15028
  occupancyQualificationClassifications
15008
- } = await import("../responsiveness-probe-PXXWLOML.js");
15029
+ } = await import("../responsiveness-probe-NQIXADTX.js");
15009
15030
  const probeIntervalMs = getResponsivenessIntervalMs();
15010
15031
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15011
15032
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15115,7 +15136,7 @@ async function pollCycleInner() {
15115
15136
  collectResponsivenessProbes,
15116
15137
  livePendingInboundOldestAgeSeconds,
15117
15138
  parkPendingInbound
15118
- } = await import("../responsiveness-probe-PXXWLOML.js");
15139
+ } = await import("../responsiveness-probe-NQIXADTX.js");
15119
15140
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15120
15141
  const wedgeNow = /* @__PURE__ */ new Date();
15121
15142
  const liveAgents = agentState.persistentSessionAgents;
@@ -15271,7 +15292,7 @@ async function pollCycleInner() {
15271
15292
  }
15272
15293
  try {
15273
15294
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
15274
- const { probeSessionAuth } = await import("../session-auth-dead-HZZJK37X.js");
15295
+ const { probeSessionAuth } = await import("../session-auth-dead-3UZTQDWC.js");
15275
15296
  const observations = [];
15276
15297
  const pendingCacheCommits = [];
15277
15298
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -15436,6 +15457,7 @@ async function pollCycleInner() {
15436
15457
  pollCycleFetchSkips = 0;
15437
15458
  pollCycleMemoriesUnchanged = 0;
15438
15459
  pollCycleMemoriesFull = 0;
15460
+ boardTokenCache.resetStats();
15439
15461
  for (const agent of processOrder) {
15440
15462
  if (restartInFlight.has(agent.agent_id)) {
15441
15463
  const existing = state8.agents.find((a) => a.agentId === agent.agent_id);
@@ -15474,8 +15496,9 @@ async function pollCycleInner() {
15474
15496
  promptBindProbeAttempts.set(agent.code_name, PROMPT_BIND_PROBE_ATTEMPTS);
15475
15497
  }
15476
15498
  }
15499
+ const boardStats = boardTokenCache.stats();
15477
15500
  log(
15478
- `[poll-cycle] agents=${processOrder.length} refresh_fetched=${pollCycleFetches} refresh_skipped=${pollCycleFetchSkips} memories_unchanged=${pollCycleMemoriesUnchanged} memories_full=${pollCycleMemoriesFull} duration_ms=${Date.now() - cycleStartedAt}`
15501
+ `[poll-cycle] agents=${processOrder.length} refresh_fetched=${pollCycleFetches} refresh_skipped=${pollCycleFetchSkips} memories_unchanged=${pollCycleMemoriesUnchanged} memories_full=${pollCycleMemoriesFull} board_unchanged=${boardStats.unchanged} board_full=${boardStats.full} board_refetch=${boardStats.refetch} duration_ms=${Date.now() - cycleStartedAt}`
15479
15502
  );
15480
15503
  void maybeReportActivityCache({ api, log });
15481
15504
  const crossAgentPrune = managedPruneLedger.summarize();
@@ -19233,7 +19256,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
19233
19256
  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}`));
19234
19257
  void (async () => {
19235
19258
  try {
19236
- const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
19259
+ const { collectDiagnostics } = await import("../persistent-session-5FNVPGNL.js");
19237
19260
  await api.post("/host/heartbeat", {
19238
19261
  host_id: hostId,
19239
19262
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19279,7 +19302,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
19279
19302
  }
19280
19303
  try {
19281
19304
  const hostId = await getHostId();
19282
- const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
19305
+ const { collectDiagnostics } = await import("../persistent-session-5FNVPGNL.js");
19283
19306
  await api.post("/host/heartbeat", {
19284
19307
  host_id: hostId,
19285
19308
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19915,7 +19938,7 @@ async function processClaudePairSessions(agents) {
19915
19938
  killPairSession,
19916
19939
  pairTmuxSession,
19917
19940
  finalizeClaudePairOnboarding
19918
- } = await import("../claude-pair-runtime-JUGH4TOW.js");
19941
+ } = await import("../claude-pair-runtime-LEWSA5RI.js");
19919
19942
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
19920
19943
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
19921
19944
  const killed = await killPairSession(pairTmuxSession(pairId));