@integrity-labs/agt-cli 0.27.29 → 0.27.31

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
@@ -27,7 +27,7 @@ import {
27
27
  success,
28
28
  table,
29
29
  warn
30
- } from "../chunk-HX74HMG4.js";
30
+ } from "../chunk-E6MGOZTL.js";
31
31
  import {
32
32
  CHANNEL_REGISTRY,
33
33
  DEPLOYMENT_TEMPLATES,
@@ -1558,7 +1558,7 @@ import chalk10 from "chalk";
1558
1558
  import ora10 from "ora";
1559
1559
  import { spawn } from "child_process";
1560
1560
  import { existsSync as existsSync6, readFileSync as readFileSync5, writeFileSync as writeFileSync7 } from "fs";
1561
- import { dirname as dirname3, join as join10 } from "path";
1561
+ import { delimiter, dirname as dirname3, join as join10 } from "path";
1562
1562
  import { fileURLToPath as fileURLToPath2 } from "url";
1563
1563
 
1564
1564
  // src/lib/impersonate-flag.ts
@@ -2046,6 +2046,12 @@ function rewriteServerEntry(raw, ctx) {
2046
2046
  fillIfEmpty(env, "HOME", ctx.operatorHome);
2047
2047
  fillIfEmpty(env, "AGT_AGENT_ID", ctx.agentId);
2048
2048
  fillIfEmpty(env, "AGT_AGENT_CODE_NAME", ctx.agentCodeName);
2049
+ if ("PATH" in env) {
2050
+ env["PATH"] = ctx.operatorPath;
2051
+ }
2052
+ if (env["AGT_RUN_ID"] === "${AGT_RUN_ID}") {
2053
+ delete env["AGT_RUN_ID"];
2054
+ }
2049
2055
  return { ...raw, args, env };
2050
2056
  }
2051
2057
  function fillIfEmpty(env, key, value) {
@@ -2129,6 +2135,7 @@ async function impersonateConnectCommand(token, options = {}) {
2129
2135
  join10(personaDir, ".mcp.json"),
2130
2136
  rewriteMcpJsonForImpersonation(bundle.artifacts[".mcp.json"], {
2131
2137
  operatorHome: process.env.HOME ?? "",
2138
+ operatorPath: resolveOperatorPath(),
2132
2139
  cliMcpBundleDir: resolveCliMcpBundleDir(),
2133
2140
  impersonationToken: bundle.token,
2134
2141
  apiHost: host2,
@@ -2428,6 +2435,14 @@ function resolveCliMcpBundleDir() {
2428
2435
  }
2429
2436
  return candidates[candidates.length - 1];
2430
2437
  }
2438
+ function resolveOperatorPath(execPath = process.execPath, inheritedPath = process.env.PATH ?? "") {
2439
+ const nodeBinDir = dirname3(execPath);
2440
+ const segments = inheritedPath.split(delimiter).filter((s) => s.length > 0);
2441
+ if (!segments.includes(nodeBinDir)) {
2442
+ segments.unshift(nodeBinDir);
2443
+ }
2444
+ return segments.join(delimiter);
2445
+ }
2431
2446
  function buildImpersonateClaudeLaunch(projectCwd, inheritEnv = process.env, agentId = null) {
2432
2447
  const env = {
2433
2448
  ...inheritEnv,
@@ -4643,7 +4658,7 @@ import { execFileSync, execSync } from "child_process";
4643
4658
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4644
4659
  import chalk18 from "chalk";
4645
4660
  import ora16 from "ora";
4646
- var cliVersion = true ? "0.27.29" : "dev";
4661
+ var cliVersion = true ? "0.27.31" : "dev";
4647
4662
  async function fetchLatestVersion() {
4648
4663
  const host2 = getHost();
4649
4664
  if (!host2) return null;
@@ -5175,7 +5190,7 @@ function handleError(err) {
5175
5190
  }
5176
5191
 
5177
5192
  // src/bin/agt.ts
5178
- var cliVersion2 = true ? "0.27.29" : "dev";
5193
+ var cliVersion2 = true ? "0.27.31" : "dev";
5179
5194
  var program = new Command();
5180
5195
  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");
5181
5196
  program.hook("preAction", (thisCommand) => {