@integrity-labs/agt-cli 0.27.157 → 0.27.158

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
@@ -28,7 +28,7 @@ import {
28
28
  success,
29
29
  table,
30
30
  warn
31
- } from "../chunk-R2ILRTGB.js";
31
+ } from "../chunk-ELEMDMTQ.js";
32
32
  import {
33
33
  CHANNEL_REGISTRY,
34
34
  DEPLOYMENT_TEMPLATES,
@@ -4941,7 +4941,7 @@ import { execFileSync, execSync } from "child_process";
4941
4941
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4942
4942
  import chalk18 from "chalk";
4943
4943
  import ora16 from "ora";
4944
- var cliVersion = true ? "0.27.157" : "dev";
4944
+ var cliVersion = true ? "0.27.158" : "dev";
4945
4945
  async function fetchLatestVersion() {
4946
4946
  const host2 = getHost();
4947
4947
  if (!host2) return null;
@@ -5864,7 +5864,7 @@ function handleError(err) {
5864
5864
  }
5865
5865
 
5866
5866
  // src/bin/agt.ts
5867
- var cliVersion2 = true ? "0.27.157" : "dev";
5867
+ var cliVersion2 = true ? "0.27.158" : "dev";
5868
5868
  var program = new Command();
5869
5869
  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");
5870
5870
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -8017,4 +8017,4 @@ export {
8017
8017
  managerInstallSystemUnitCommand,
8018
8018
  managerUninstallSystemUnitCommand
8019
8019
  };
8020
- //# sourceMappingURL=chunk-R2ILRTGB.js.map
8020
+ //# sourceMappingURL=chunk-ELEMDMTQ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  import { spawn, execSync, execFileSync as execFileSync3 } from "child_process";
11
11
  import { join as join2, dirname } from "path";
12
12
  import { homedir as homedir2, platform, userInfo } from "os";
13
- import { existsSync as existsSync3, readFileSync as readFileSync4, readdirSync, writeFileSync as writeFileSync3, appendFileSync, mkdirSync as mkdirSync2, chmodSync, copyFileSync, rmSync } from "fs";
13
+ import { existsSync as existsSync3, readFileSync as readFileSync4, readdirSync as readdirSync2, writeFileSync as writeFileSync3, appendFileSync, mkdirSync as mkdirSync2, chmodSync, copyFileSync, rmSync } from "fs";
14
14
  import { fileURLToPath } from "url";
15
15
 
16
16
  // src/lib/mcp-sanitize.ts
@@ -157,7 +157,7 @@ import { randomUUID as randomUUID2 } from "crypto";
157
157
 
158
158
  // src/lib/daily-session.ts
159
159
  import { randomUUID } from "crypto";
160
- import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync3, renameSync, statSync, writeFileSync as writeFileSync2 } from "fs";
160
+ import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync3, readdirSync, renameSync, statSync, writeFileSync as writeFileSync2 } from "fs";
161
161
  import { homedir } from "os";
162
162
  import { join } from "path";
163
163
  var HISTORY_DAYS = 7;
@@ -294,6 +294,25 @@ function transcriptActivityAgeSeconds(projectDir, sessionId, now = /* @__PURE__
294
294
  return null;
295
295
  }
296
296
  }
297
+ function subagentActivityAgeSeconds(projectDir, sessionId, now = /* @__PURE__ */ new Date()) {
298
+ if (!sessionId) return null;
299
+ const dir = join(sessionTranscriptDir(projectDir), sessionId, "subagents");
300
+ try {
301
+ let freshestMtimeMs = null;
302
+ for (const name of readdirSync(dir)) {
303
+ if (!name.endsWith(".jsonl")) continue;
304
+ try {
305
+ const mtimeMs = statSync(join(dir, name)).mtimeMs;
306
+ if (freshestMtimeMs === null || mtimeMs > freshestMtimeMs) freshestMtimeMs = mtimeMs;
307
+ } catch {
308
+ }
309
+ }
310
+ if (freshestMtimeMs === null) return null;
311
+ return Math.max(0, Math.floor((now.getTime() - freshestMtimeMs) / 1e3));
312
+ } catch {
313
+ return null;
314
+ }
315
+ }
297
316
  function isAgentIdle(projectDir, sessionId, idleSeconds = 60, now = /* @__PURE__ */ new Date()) {
298
317
  const path = sessionFilePath(projectDir, sessionId);
299
318
  if (!existsSync2(path)) return true;
@@ -597,7 +616,7 @@ function syncClaudeCredsToRoot() {
597
616
  }
598
617
  let sourcePath = null;
599
618
  try {
600
- const entries = readdirSync("/home", { withFileTypes: true });
619
+ const entries = readdirSync2("/home", { withFileTypes: true });
601
620
  outer: for (const entry of entries) {
602
621
  if (!entry.isDirectory()) continue;
603
622
  for (const filename of [".credentials.json", "credentials.json"]) {
@@ -1588,6 +1607,7 @@ export {
1588
1607
  buildAllowedTools,
1589
1608
  sessionTranscriptDir,
1590
1609
  transcriptActivityAgeSeconds,
1610
+ subagentActivityAgeSeconds,
1591
1611
  isAgentIdle,
1592
1612
  isStaleForToday,
1593
1613
  peekCurrentSession,
@@ -1621,4 +1641,4 @@ export {
1621
1641
  stopAllSessionsAndWait,
1622
1642
  getProjectDir
1623
1643
  };
1624
- //# sourceMappingURL=chunk-OXDE5AVS.js.map
1644
+ //# sourceMappingURL=chunk-GJVY7WKU.js.map