@integrity-labs/agt-cli 0.27.55 → 0.27.56
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-
|
|
30
|
+
} from "../chunk-YQKUGTQC.js";
|
|
31
31
|
import {
|
|
32
32
|
CHANNEL_REGISTRY,
|
|
33
33
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -2032,6 +2032,13 @@ function buildIntroduction(input4) {
|
|
|
2032
2032
|
|
|
2033
2033
|
// src/lib/impersonate-mcp-rewrite.ts
|
|
2034
2034
|
var SERVER_HOME_MCP_PATH_RE = /^\/home\/[^/]+\/\.augmented\/_mcp\/([^/]+)$/;
|
|
2035
|
+
var CHANNEL_SERVER_KEYS = /* @__PURE__ */ new Set([
|
|
2036
|
+
"slack",
|
|
2037
|
+
"telegram",
|
|
2038
|
+
"msteams",
|
|
2039
|
+
"direct-chat",
|
|
2040
|
+
"discord"
|
|
2041
|
+
]);
|
|
2035
2042
|
function rewriteMcpJsonForImpersonation(mcpJson, ctx) {
|
|
2036
2043
|
const parsed = JSON.parse(mcpJson);
|
|
2037
2044
|
if (!isPlainObject(parsed)) {
|
|
@@ -2047,12 +2054,12 @@ function rewriteMcpJsonForImpersonation(mcpJson, ctx) {
|
|
|
2047
2054
|
}
|
|
2048
2055
|
const rewrittenServers = {};
|
|
2049
2056
|
for (const [serverName, raw] of Object.entries(servers)) {
|
|
2050
|
-
rewrittenServers[serverName] = rewriteServerEntry(raw, ctx);
|
|
2057
|
+
rewrittenServers[serverName] = rewriteServerEntry(serverName, raw, ctx);
|
|
2051
2058
|
}
|
|
2052
2059
|
const out = { ...parsed, mcpServers: rewrittenServers };
|
|
2053
2060
|
return JSON.stringify(out, null, 2);
|
|
2054
2061
|
}
|
|
2055
|
-
function rewriteServerEntry(raw, ctx) {
|
|
2062
|
+
function rewriteServerEntry(serverName, raw, ctx) {
|
|
2056
2063
|
if (!isPlainObject(raw)) return raw;
|
|
2057
2064
|
let args = raw["args"];
|
|
2058
2065
|
if (Array.isArray(args)) {
|
|
@@ -2078,6 +2085,9 @@ function rewriteServerEntry(raw, ctx) {
|
|
|
2078
2085
|
if (env["AGT_RUN_ID"] === "${AGT_RUN_ID}") {
|
|
2079
2086
|
delete env["AGT_RUN_ID"];
|
|
2080
2087
|
}
|
|
2088
|
+
if (CHANNEL_SERVER_KEYS.has(serverName)) {
|
|
2089
|
+
env["AGT_ACT_AS_AGENT_ID"] = ctx.agentId;
|
|
2090
|
+
}
|
|
2081
2091
|
return { ...raw, args, env };
|
|
2082
2092
|
}
|
|
2083
2093
|
function fillIfEmpty(env, key, value) {
|
|
@@ -4710,7 +4720,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4710
4720
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4711
4721
|
import chalk18 from "chalk";
|
|
4712
4722
|
import ora16 from "ora";
|
|
4713
|
-
var cliVersion = true ? "0.27.
|
|
4723
|
+
var cliVersion = true ? "0.27.56" : "dev";
|
|
4714
4724
|
async function fetchLatestVersion() {
|
|
4715
4725
|
const host2 = getHost();
|
|
4716
4726
|
if (!host2) return null;
|
|
@@ -5488,7 +5498,7 @@ function handleError(err) {
|
|
|
5488
5498
|
}
|
|
5489
5499
|
|
|
5490
5500
|
// src/bin/agt.ts
|
|
5491
|
-
var cliVersion2 = true ? "0.27.
|
|
5501
|
+
var cliVersion2 = true ? "0.27.56" : "dev";
|
|
5492
5502
|
var program = new Command();
|
|
5493
5503
|
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");
|
|
5494
5504
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|