@integrity-labs/agt-cli 0.28.795 → 0.28.797

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,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-PHQQM44E.js";
43
+ } from "../chunk-BLPEFF5R.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-FWMZ2SLT.js";
48
+ } from "../chunk-KGOED2L3.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-UKFIAO43.js";
82
+ } from "../chunk-ZL7RC5VO.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.795" : "dev";
5470
+ var cliVersion = true ? "0.28.797" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.795" : "dev";
6661
+ var cliVersion2 = true ? "0.28.797" : "dev";
6662
6662
  var program = new Command();
6663
6663
  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");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -14,7 +14,7 @@ import {
14
14
  parseEnvFileEntries,
15
15
  parseEnvIntegrations,
16
16
  shellQuote
17
- } from "./chunk-FWMZ2SLT.js";
17
+ } from "./chunk-KGOED2L3.js";
18
18
  import {
19
19
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
20
  INTEGRATIONS_SECTION_END,
@@ -22,6 +22,9 @@ import {
22
22
  INTEGRATION_REGISTRY,
23
23
  MIN_PROVISIONING_MAX_FOR_QUARANTINE_ORDERING,
24
24
  OAUTH_PROVIDERS,
25
+ PROBE_HOME_RELATIVE_PATH_SEGMENTS,
26
+ PROBE_SYSTEM_PATH_FLOOR,
27
+ PROBE_TOOLKIT_PATH_DIRS,
25
28
  REMOTE_MCP_PROXY_ENV,
26
29
  RESTART_BREAKER_NEW_AGENT_GRACE_CEILING,
27
30
  RESTART_BREAKER_NEW_AGENT_GRACE_MS,
@@ -66,7 +69,7 @@ import {
66
69
  sessionTranscriptDir,
67
70
  worseConnectivityOutcome,
68
71
  wrapScheduledTaskPrompt
69
- } from "./chunk-UKFIAO43.js";
72
+ } from "./chunk-ZL7RC5VO.js";
70
73
  import {
71
74
  parsePsRows
72
75
  } from "./chunk-XWVM4KPK.js";
@@ -6518,7 +6521,7 @@ function exchangeFailureKind(err) {
6518
6521
  }
6519
6522
 
6520
6523
  // src/lib/api-client.ts
6521
- var agtCliVersion = true ? "0.28.795" : "dev";
6524
+ var agtCliVersion = true ? "0.28.797" : "dev";
6522
6525
  var lastConfigHash = null;
6523
6526
  function setConfigHash(hash) {
6524
6527
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8503,6 +8506,7 @@ function verdictForUnavailableMcpConfig(cause, ctx) {
8503
8506
  // src/lib/connectivity-probe-context.ts
8504
8507
  import { delimiter as pathDelimiter, join as join6 } from "path";
8505
8508
  import { existsSync as existsSync7, readFileSync as readFileSync7 } from "fs";
8509
+ import { homedir as homedir5 } from "os";
8506
8510
 
8507
8511
  // src/lib/mcp-stdio-probe.ts
8508
8512
  import { spawn } from "child_process";
@@ -9211,14 +9215,14 @@ function deriveMcpServerKey(input) {
9211
9215
  if (isDefaultRemoteMcpConnection(input.connectionKey)) return base;
9212
9216
  return remoteMcpServerKey(input.definitionId, input.connectionKey);
9213
9217
  }
9214
- var SYSTEM_PATH_FLOOR = [
9215
- "/usr/local/sbin",
9216
- "/usr/local/bin",
9217
- "/usr/sbin",
9218
- "/usr/bin",
9219
- "/sbin",
9220
- "/bin"
9221
- ];
9218
+ var SYSTEM_PATH_FLOOR = PROBE_SYSTEM_PATH_FLOOR;
9219
+ function toolkitPathDirs() {
9220
+ const home = process.env.HOME?.trim() || homedir5();
9221
+ return [
9222
+ ...PROBE_TOOLKIT_PATH_DIRS,
9223
+ ...PROBE_HOME_RELATIVE_PATH_SEGMENTS.map((seg) => join6(home, seg))
9224
+ ];
9225
+ }
9222
9226
  function buildProbeEnv(projectDir, agentId) {
9223
9227
  const probeEnv = { ...process.env };
9224
9228
  try {
@@ -9237,6 +9241,12 @@ function buildProbeEnv(projectDir, agentId) {
9237
9241
  const parts = probeEnv.PATH ? probeEnv.PATH.split(pathDelimiter) : [];
9238
9242
  parts.unshift(agentBinDir);
9239
9243
  if (process.platform !== "win32") {
9244
+ let insertAt = 1;
9245
+ for (const dir of toolkitPathDirs()) {
9246
+ if (!existsSync7(dir)) continue;
9247
+ parts.splice(insertAt, 0, dir);
9248
+ insertAt += 1;
9249
+ }
9240
9250
  for (const dir of SYSTEM_PATH_FLOOR) {
9241
9251
  if (!parts.includes(dir)) parts.push(dir);
9242
9252
  }
@@ -9573,7 +9583,7 @@ function describeWorkerModuleFailure(err) {
9573
9583
 
9574
9584
  // src/lib/drain-transcript-flush.ts
9575
9585
  import { existsSync as existsSync8, readdirSync as readdirSync2 } from "fs";
9576
- import { homedir as homedir5 } from "os";
9586
+ import { homedir as homedir6 } from "os";
9577
9587
  import { dirname as dirname6, join as join8, relative as relative2, sep } from "path";
9578
9588
  import { spawn as spawn2 } from "child_process";
9579
9589
 
@@ -9618,7 +9628,7 @@ function readHostArchiveAddress(path) {
9618
9628
 
9619
9629
  // src/lib/drain-transcript-flush.ts
9620
9630
  function sessionsBaseDir() {
9621
- return join8(homedir5(), ".claude", "projects");
9631
+ return join8(homedir6(), ".claude", "projects");
9622
9632
  }
9623
9633
  var PER_FILE_UPLOAD_TIMEOUT_MS = 3e4;
9624
9634
  var UPLOAD_CONCURRENCY = 4;
@@ -9798,7 +9808,7 @@ function drainTranscriptFlushDeps(log2) {
9798
9808
  // tree — the thing host-archive-address.ts's header warns about.
9799
9809
  readSourceLayout: (codeName) => {
9800
9810
  const agentDir = dirname6(getProjectDir(codeName));
9801
- const codeNameDir = join8(homedir5(), ".augmented", codeName);
9811
+ const codeNameDir = join8(homedir6(), ".augmented", codeName);
9802
9812
  return { layout: agentDir === codeNameDir ? "codename-keyed" : "id-keyed", agentDir };
9803
9813
  },
9804
9814
  readSessionPin: (codeName) => readDailySessionPin(codeName),
@@ -9887,7 +9897,7 @@ function decidePin(opts) {
9887
9897
  import chalk3 from "chalk";
9888
9898
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
9889
9899
  import { join as join10 } from "path";
9890
- import { homedir as homedir6, userInfo } from "os";
9900
+ import { homedir as homedir7, userInfo } from "os";
9891
9901
  import { spawn as spawn4 } from "child_process";
9892
9902
 
9893
9903
  // src/lib/watchdog.ts
@@ -10121,7 +10131,7 @@ function normalizePinInEnv(env) {
10121
10131
  function managerStartCommand(opts) {
10122
10132
  const json = isJsonMode();
10123
10133
  if (!process.env.HOME || !process.env.HOME.trim()) {
10124
- const fallback = homedir6();
10134
+ const fallback = homedir7();
10125
10135
  process.env.HOME = fallback;
10126
10136
  if (!json) {
10127
10137
  info(`HOME was not set in the manager env \u2014 defaulting to ${fallback}.`);
@@ -10155,7 +10165,7 @@ function managerStartCommand(opts) {
10155
10165
  process.exitCode = 1;
10156
10166
  return;
10157
10167
  }
10158
- const configDir = opts.configDir ?? join10(homedir6(), ".augmented");
10168
+ const configDir = opts.configDir ?? join10(homedir7(), ".augmented");
10159
10169
  if (opts.supervise) {
10160
10170
  if (json) {
10161
10171
  jsonOutput({ ok: false, error: "--supervise is not supported with --json" });
@@ -10251,7 +10261,7 @@ function runSupervisorLoop(intervalSec, configDir) {
10251
10261
  }
10252
10262
  async function managerStopCommand(opts = {}) {
10253
10263
  const json = isJsonMode();
10254
- const configDir = opts.configDir ?? join10(homedir6(), ".augmented");
10264
+ const configDir = opts.configDir ?? join10(homedir7(), ".augmented");
10255
10265
  try {
10256
10266
  const result = await stopWatchdog(configDir);
10257
10267
  if (!result.stopped && !result.pid) {
@@ -10279,7 +10289,7 @@ async function managerStopCommand(opts = {}) {
10279
10289
  }
10280
10290
  function managerStatusCommand(opts = {}) {
10281
10291
  const json = isJsonMode();
10282
- const configDir = opts.configDir ?? join10(homedir6(), ".augmented");
10292
+ const configDir = opts.configDir ?? join10(homedir7(), ".augmented");
10283
10293
  const status = getManagerStatus(configDir);
10284
10294
  if (!status) {
10285
10295
  if (json) {
@@ -10371,7 +10381,7 @@ async function managerInstallCommand(opts = {}) {
10371
10381
  process.exitCode = 1;
10372
10382
  return;
10373
10383
  }
10374
- const configDir = opts.configDir ?? join10(homedir6(), ".augmented");
10384
+ const configDir = opts.configDir ?? join10(homedir7(), ".augmented");
10375
10385
  const rawAgtBin = process.argv[1];
10376
10386
  if (!rawAgtBin) {
10377
10387
  const msg = "Could not resolve the agt binary path from argv. Re-run via the installed `agt` command.";
@@ -10382,7 +10392,7 @@ async function managerInstallCommand(opts = {}) {
10382
10392
  }
10383
10393
  const agtBin = resolveStableAgtBin(rawAgtBin);
10384
10394
  if (process.platform === "darwin") {
10385
- const home = homedir6();
10395
+ const home = homedir7();
10386
10396
  const protectedRoots = ["Documents", "Downloads", "Desktop", "Movies", "Music", "Pictures"];
10387
10397
  const offending = protectedRoots.map((r) => join10(home, r)).find((p) => agtBin === p || agtBin.startsWith(`${p}/`));
10388
10398
  if (offending) {
@@ -10397,7 +10407,7 @@ async function managerInstallCommand(opts = {}) {
10397
10407
  AGT_HOST: getHost(),
10398
10408
  // ?? alone wouldn't catch `HOME=""` from a stripped systemd env.
10399
10409
  // Treat empty / whitespace-only as missing.
10400
- HOME: process.env.HOME?.trim() || homedir6(),
10410
+ HOME: process.env.HOME?.trim() || homedir7(),
10401
10411
  USER: process.env.USER?.trim() || userInfo().username
10402
10412
  };
10403
10413
  const apiKey = getApiKey();
@@ -10755,4 +10765,4 @@ export {
10755
10765
  managerInstallSystemUnitCommand,
10756
10766
  managerUninstallSystemUnitCommand
10757
10767
  };
10758
- //# sourceMappingURL=chunk-PHQQM44E.js.map
10768
+ //# sourceMappingURL=chunk-BLPEFF5R.js.map