@integrity-labs/agt-cli 0.28.596 → 0.28.598

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.
Files changed (27) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-6NVRWZ5W.js → chunk-4E3L4U34.js} +2 -2
  3. package/dist/{chunk-3PNRUCHD.js → chunk-6EBAJFLZ.js} +7 -1
  4. package/dist/chunk-6EBAJFLZ.js.map +1 -0
  5. package/dist/{chunk-EAZQXZ4Q.js → chunk-TJUR7PJ5.js} +51 -8
  6. package/dist/chunk-TJUR7PJ5.js.map +1 -0
  7. package/dist/{claude-pair-runtime-5WB2FMIX.js → claude-pair-runtime-7CNOVI5H.js} +2 -2
  8. package/dist/lib/manager-worker.js +85 -14
  9. package/dist/lib/manager-worker.js.map +1 -1
  10. package/dist/mcp/augmented-admin.js +1 -1
  11. package/dist/mcp/augmented-help-kb.js +1 -1
  12. package/dist/mcp/augmented-support.js +1 -1
  13. package/dist/mcp/direct-chat-channel.js +6 -0
  14. package/dist/mcp/origami.js +6 -0
  15. package/dist/mcp/slack-channel.js +6 -0
  16. package/dist/mcp/telegram-channel.js +6 -0
  17. package/dist/{persistent-session-BGMQQYW2.js → persistent-session-5VAAQJQA.js} +3 -3
  18. package/dist/{responsiveness-probe-VAGPO5FZ.js → responsiveness-probe-AZKD6KEV.js} +3 -3
  19. package/dist/{session-auth-dead-CWFGB472.js → session-auth-dead-5VN6KL6H.js} +2 -2
  20. package/package.json +2 -2
  21. package/dist/chunk-3PNRUCHD.js.map +0 -1
  22. package/dist/chunk-EAZQXZ4Q.js.map +0 -1
  23. /package/dist/{chunk-6NVRWZ5W.js.map → chunk-4E3L4U34.js.map} +0 -0
  24. /package/dist/{claude-pair-runtime-5WB2FMIX.js.map → claude-pair-runtime-7CNOVI5H.js.map} +0 -0
  25. /package/dist/{persistent-session-BGMQQYW2.js.map → persistent-session-5VAAQJQA.js.map} +0 -0
  26. /package/dist/{responsiveness-probe-VAGPO5FZ.js.map → responsiveness-probe-AZKD6KEV.js.map} +0 -0
  27. /package/dist/{session-auth-dead-CWFGB472.js.map → session-auth-dead-5VN6KL6H.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  expandTemplateVars,
8
8
  isolationMode,
9
9
  parseEnvIntegrations
10
- } from "./chunk-6NVRWZ5W.js";
10
+ } from "./chunk-4E3L4U34.js";
11
11
  import {
12
12
  BIND_FAILURE_QUARANTINE_THRESHOLD,
13
13
  INTEGRATIONS_SECTION_END,
@@ -48,7 +48,7 @@ import {
48
48
  resolveConnectivityProbe,
49
49
  worseConnectivityOutcome,
50
50
  wrapScheduledTaskPrompt
51
- } from "./chunk-3PNRUCHD.js";
51
+ } from "./chunk-6EBAJFLZ.js";
52
52
  import {
53
53
  parsePsRows
54
54
  } from "./chunk-XWVM4KPK.js";
@@ -462,7 +462,7 @@ function mergeEnvIntegrationsContent(existing, args) {
462
462
  }
463
463
 
464
464
  // ../../packages/core/dist/provisioning/frameworks/claudecode/index.js
465
- import { readFileSync as readFileSync3, writeFileSync as writeFileSync3, mkdirSync as mkdirSync2, existsSync as existsSync3, chmodSync as chmodSync3, readdirSync, rmSync, statSync, copyFileSync, lstatSync, realpathSync, symlinkSync, readlinkSync, renameSync as renameSync3 } from "fs";
465
+ import { readFileSync as readFileSync3, writeFileSync as writeFileSync3, mkdirSync as mkdirSync2, existsSync as existsSync3, chmodSync as chmodSync3, readdirSync, rmSync, copyFileSync, lstatSync, realpathSync, symlinkSync, readlinkSync, renameSync as renameSync3, opendirSync } from "fs";
466
466
  import { join as join2, relative, dirname as dirname2 } from "path";
467
467
  import { homedir as homedir2 } from "os";
468
468
  import { execFile } from "child_process";
@@ -1597,7 +1597,7 @@ function sweepScratchDir(codeName, now = Date.now()) {
1597
1597
  for (const entry of entries) {
1598
1598
  const full = join2(scratchDir, entry);
1599
1599
  try {
1600
- if (statSync(full).mtimeMs >= cutoff)
1600
+ if (isFreshWithin(full, cutoff))
1601
1601
  continue;
1602
1602
  rmSync(full, { recursive: true, force: true });
1603
1603
  removed += 1;
@@ -1606,6 +1606,49 @@ function sweepScratchDir(codeName, now = Date.now()) {
1606
1606
  }
1607
1607
  return removed;
1608
1608
  }
1609
+ var SCRATCH_SCAN_ENTRY_BUDGET = 5e3;
1610
+ function isFreshWithin(path, cutoff) {
1611
+ let budget = SCRATCH_SCAN_ENTRY_BUDGET;
1612
+ const queue = [path];
1613
+ while (queue.length > 0) {
1614
+ if (budget-- <= 0)
1615
+ return true;
1616
+ const current = queue.pop();
1617
+ let stat;
1618
+ try {
1619
+ stat = lstatSync(current);
1620
+ } catch {
1621
+ return true;
1622
+ }
1623
+ if (stat.mtimeMs >= cutoff)
1624
+ return true;
1625
+ if (!stat.isDirectory())
1626
+ continue;
1627
+ let dir;
1628
+ try {
1629
+ dir = opendirSync(current);
1630
+ } catch {
1631
+ return true;
1632
+ }
1633
+ try {
1634
+ while (budget > 0) {
1635
+ const child = dir.readSync();
1636
+ if (child === null)
1637
+ break;
1638
+ queue.push(join2(current, child.name));
1639
+ budget -= 1;
1640
+ }
1641
+ } catch {
1642
+ return true;
1643
+ } finally {
1644
+ try {
1645
+ dir.closeSync();
1646
+ } catch {
1647
+ }
1648
+ }
1649
+ }
1650
+ return false;
1651
+ }
1609
1652
  function syncMcpToProject(codeName) {
1610
1653
  const agentDir = getAgentDir(codeName);
1611
1654
  const projectDir = getProjectDir(codeName);
@@ -5987,7 +6030,7 @@ function exchangeFailureKind(err) {
5987
6030
  }
5988
6031
 
5989
6032
  // src/lib/api-client.ts
5990
- var agtCliVersion = true ? "0.28.596" : "dev";
6033
+ var agtCliVersion = true ? "0.28.598" : "dev";
5991
6034
  var lastConfigHash = null;
5992
6035
  function setConfigHash(hash) {
5993
6036
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -6252,7 +6295,7 @@ function atomicWriteFileSync(path, data) {
6252
6295
  }
6253
6296
 
6254
6297
  // src/lib/feature-flags-host.ts
6255
- import { existsSync as existsSync5, readFileSync as readFileSync5, statSync as statSync2 } from "fs";
6298
+ import { existsSync as existsSync5, readFileSync as readFileSync5, statSync } from "fs";
6256
6299
  import { join as join4 } from "path";
6257
6300
  function defaultFlagsCachePath(configDir) {
6258
6301
  return join4(configDir, "flags-cache.json");
@@ -6286,7 +6329,7 @@ function flagsCacheAgeSeconds(cache, path, now = /* @__PURE__ */ new Date()) {
6286
6329
  return Math.max(0, (now.getTime() - fromRecorded) / 1e3);
6287
6330
  }
6288
6331
  try {
6289
- return Math.max(0, (now.getTime() - statSync2(path).mtimeMs) / 1e3);
6332
+ return Math.max(0, (now.getTime() - statSync(path).mtimeMs) / 1e3);
6290
6333
  } catch {
6291
6334
  return null;
6292
6335
  }
@@ -9442,4 +9485,4 @@ export {
9442
9485
  managerInstallSystemUnitCommand,
9443
9486
  managerUninstallSystemUnitCommand
9444
9487
  };
9445
- //# sourceMappingURL=chunk-EAZQXZ4Q.js.map
9488
+ //# sourceMappingURL=chunk-TJUR7PJ5.js.map