@integrity-labs/agt-cli 0.24.4 → 0.24.5
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
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
success,
|
|
27
27
|
table,
|
|
28
28
|
warn
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-QWMGMV4N.js";
|
|
30
30
|
import {
|
|
31
31
|
CHANNEL_REGISTRY,
|
|
32
32
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -3736,7 +3736,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
3736
3736
|
import { existsSync as existsSync5, realpathSync } from "fs";
|
|
3737
3737
|
import chalk17 from "chalk";
|
|
3738
3738
|
import ora15 from "ora";
|
|
3739
|
-
var cliVersion = true ? "0.24.
|
|
3739
|
+
var cliVersion = true ? "0.24.5" : "dev";
|
|
3740
3740
|
async function fetchLatestVersion() {
|
|
3741
3741
|
const host2 = getHost();
|
|
3742
3742
|
if (!host2) return null;
|
|
@@ -4268,7 +4268,7 @@ function handleError(err) {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
|
|
4270
4270
|
// src/bin/agt.ts
|
|
4271
|
-
var cliVersion2 = true ? "0.24.
|
|
4271
|
+
var cliVersion2 = true ? "0.24.5" : "dev";
|
|
4272
4272
|
var program = new Command();
|
|
4273
4273
|
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");
|
|
4274
4274
|
program.hook("preAction", (thisCommand) => {
|
|
@@ -4511,6 +4511,33 @@ function mapScheduledTasks(tasks) {
|
|
|
4511
4511
|
};
|
|
4512
4512
|
});
|
|
4513
4513
|
}
|
|
4514
|
+
function buildUrlMcpServerEntry(url, headers) {
|
|
4515
|
+
const hasHeaders = !!headers && Object.keys(headers).length > 0;
|
|
4516
|
+
if (url.includes("composio.dev") && hasHeaders) {
|
|
4517
|
+
return { type: "http", url, headers };
|
|
4518
|
+
}
|
|
4519
|
+
if (url.includes("mcp.pipedream.net")) {
|
|
4520
|
+
const pdUrl = new URL(url);
|
|
4521
|
+
const pathParts = pdUrl.pathname.split("/").filter(Boolean);
|
|
4522
|
+
const externalUserId = decodeURIComponent(pathParts[0] ?? "");
|
|
4523
|
+
const appSlug = decodeURIComponent(pathParts[1] ?? "");
|
|
4524
|
+
const h = headers ?? {};
|
|
4525
|
+
return {
|
|
4526
|
+
command: "npx",
|
|
4527
|
+
args: ["-y", "@pipedream/mcp", "stdio", "--app", appSlug, "--external-user-id", externalUserId],
|
|
4528
|
+
env: {
|
|
4529
|
+
PIPEDREAM_PROJECT_ID: h["x-pd-project-id"] ?? process.env["PIPEDREAM_PROJECT_ID"] ?? "",
|
|
4530
|
+
PIPEDREAM_CLIENT_ID: h["x-pd-client-id"] ?? process.env["PIPEDREAM_CLIENT_ID"] ?? "",
|
|
4531
|
+
PIPEDREAM_CLIENT_SECRET: h["x-pd-client-secret"] ?? process.env["PIPEDREAM_CLIENT_SECRET"] ?? "",
|
|
4532
|
+
PIPEDREAM_PROJECT_ENVIRONMENT: h["x-pd-environment"] ?? process.env["PIPEDREAM_ENVIRONMENT"] ?? "development"
|
|
4533
|
+
}
|
|
4534
|
+
};
|
|
4535
|
+
}
|
|
4536
|
+
if (hasHeaders) {
|
|
4537
|
+
return { type: "http", url, headers };
|
|
4538
|
+
}
|
|
4539
|
+
return { command: "npx", args: ["-y", "mcp-remote", url, "--allow-http"] };
|
|
4540
|
+
}
|
|
4514
4541
|
var claudeCodeAdapter = {
|
|
4515
4542
|
id: "claude-code",
|
|
4516
4543
|
label: "Claude Code",
|
|
@@ -5241,41 +5268,7 @@ ${sections}`
|
|
|
5241
5268
|
const mcpServers = mcpConfig["mcpServers"];
|
|
5242
5269
|
let serverEntry;
|
|
5243
5270
|
if ("url" in config) {
|
|
5244
|
-
|
|
5245
|
-
serverEntry = {
|
|
5246
|
-
command: "npx",
|
|
5247
|
-
args: ["-y", "@composio/mcp", "start", "--url", config.url],
|
|
5248
|
-
env: config.headers ?? {}
|
|
5249
|
-
};
|
|
5250
|
-
} else if (config.url.includes("mcp.pipedream.net")) {
|
|
5251
|
-
const pdUrl = new URL(config.url);
|
|
5252
|
-
const pathParts = pdUrl.pathname.split("/").filter(Boolean);
|
|
5253
|
-
const externalUserId = decodeURIComponent(pathParts[0] ?? "");
|
|
5254
|
-
const appSlug = decodeURIComponent(pathParts[1] ?? "");
|
|
5255
|
-
const headers = config.headers ?? {};
|
|
5256
|
-
const authToken = (headers["Authorization"] ?? "").replace("Bearer ", "");
|
|
5257
|
-
serverEntry = {
|
|
5258
|
-
command: "npx",
|
|
5259
|
-
args: ["-y", "@pipedream/mcp", "stdio", "--app", appSlug, "--external-user-id", externalUserId],
|
|
5260
|
-
env: {
|
|
5261
|
-
PIPEDREAM_PROJECT_ID: headers["x-pd-project-id"] ?? process.env["PIPEDREAM_PROJECT_ID"] ?? "",
|
|
5262
|
-
PIPEDREAM_CLIENT_ID: headers["x-pd-client-id"] ?? process.env["PIPEDREAM_CLIENT_ID"] ?? "",
|
|
5263
|
-
PIPEDREAM_CLIENT_SECRET: headers["x-pd-client-secret"] ?? process.env["PIPEDREAM_CLIENT_SECRET"] ?? "",
|
|
5264
|
-
PIPEDREAM_PROJECT_ENVIRONMENT: headers["x-pd-environment"] ?? process.env["PIPEDREAM_ENVIRONMENT"] ?? "development"
|
|
5265
|
-
}
|
|
5266
|
-
};
|
|
5267
|
-
} else if (config.headers && Object.keys(config.headers).length > 0) {
|
|
5268
|
-
serverEntry = {
|
|
5269
|
-
type: "http",
|
|
5270
|
-
url: config.url,
|
|
5271
|
-
headers: config.headers
|
|
5272
|
-
};
|
|
5273
|
-
} else {
|
|
5274
|
-
serverEntry = {
|
|
5275
|
-
command: "npx",
|
|
5276
|
-
args: ["-y", "mcp-remote", config.url, "--allow-http"]
|
|
5277
|
-
};
|
|
5278
|
-
}
|
|
5271
|
+
serverEntry = buildUrlMcpServerEntry(config.url, config.headers);
|
|
5279
5272
|
} else {
|
|
5280
5273
|
serverEntry = { command: config.command };
|
|
5281
5274
|
if (config.args?.length)
|
|
@@ -6717,4 +6710,4 @@ export {
|
|
|
6717
6710
|
managerInstallSystemUnitCommand,
|
|
6718
6711
|
managerUninstallSystemUnitCommand
|
|
6719
6712
|
};
|
|
6720
|
-
//# sourceMappingURL=chunk-
|
|
6713
|
+
//# sourceMappingURL=chunk-QWMGMV4N.js.map
|