@integrity-labs/agt-cli 0.28.149 → 0.28.151
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 +4 -4
- package/dist/{chunk-SVF454L3.js → chunk-HYW5ZAGY.js} +2 -3
- package/dist/{chunk-5AIF4FOP.js → chunk-SKANUWSB.js} +247 -5
- package/dist/chunk-SKANUWSB.js.map +1 -0
- package/dist/{chunk-A4S52T2C.js → chunk-SZX4F3O5.js} +55 -11
- package/dist/chunk-SZX4F3O5.js.map +1 -0
- package/dist/{claude-pair-runtime-OU4ROYH4.js → claude-pair-runtime-ZSBUAMO3.js} +2 -2
- package/dist/lib/manager-worker.js +101 -281
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/remote-oauth-proxy.js +168 -0
- package/dist/{persistent-session-IMMJEVRD.js → persistent-session-S2674LBO.js} +3 -3
- package/dist/{responsiveness-probe-Z2GD24QE.js → responsiveness-probe-NHQYDMHJ.js} +3 -3
- package/package.json +2 -2
- package/dist/chunk-5AIF4FOP.js.map +0 -1
- package/dist/chunk-A4S52T2C.js.map +0 -1
- /package/dist/{chunk-SVF454L3.js.map → chunk-HYW5ZAGY.js.map} +0 -0
- /package/dist/{claude-pair-runtime-OU4ROYH4.js.map → claude-pair-runtime-ZSBUAMO3.js.map} +0 -0
- /package/dist/{persistent-session-IMMJEVRD.js.map → persistent-session-S2674LBO.js.map} +0 -0
- /package/dist/{responsiveness-probe-Z2GD24QE.js.map → responsiveness-probe-NHQYDMHJ.js.map} +0 -0
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveConnectivityProbe,
|
|
23
23
|
worseConnectivityOutcome,
|
|
24
24
|
wrapScheduledTaskPrompt
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SKANUWSB.js";
|
|
26
26
|
|
|
27
27
|
// ../../packages/core/dist/integrations/registry.js
|
|
28
28
|
var INTEGRATION_REGISTRY = [
|
|
@@ -3988,6 +3988,24 @@ function buildRemoteMcpEntry(definitionId) {
|
|
|
3988
3988
|
function buildHostBrokeredRemoteMcpEntry(url) {
|
|
3989
3989
|
return { type: "http", url };
|
|
3990
3990
|
}
|
|
3991
|
+
function buildOAuthRemoteMcpProxyEntry(definitionId, paths) {
|
|
3992
|
+
const def = INTEGRATION_REGISTRY.find((d) => d.id === definitionId);
|
|
3993
|
+
if (def?.remoteMcp)
|
|
3994
|
+
return null;
|
|
3995
|
+
const provider = OAUTH_PROVIDERS[definitionId];
|
|
3996
|
+
if (!provider?.mcpUrl)
|
|
3997
|
+
return null;
|
|
3998
|
+
return {
|
|
3999
|
+
command: "node",
|
|
4000
|
+
args: [paths.proxyPath],
|
|
4001
|
+
env: {
|
|
4002
|
+
AGT_REMOTE_MCP_URL: provider.mcpUrl,
|
|
4003
|
+
AGT_REMOTE_MCP_TOKEN_FILE: paths.tokenFile,
|
|
4004
|
+
AGT_REMOTE_MCP_TOKEN_VAR: envVarForToken(definitionId),
|
|
4005
|
+
AGT_REMOTE_MCP_LABEL: definitionId
|
|
4006
|
+
}
|
|
4007
|
+
};
|
|
4008
|
+
}
|
|
3991
4009
|
|
|
3992
4010
|
// ../../packages/core/dist/provisioning/native-mcp.js
|
|
3993
4011
|
function buildNativeMcpEntry(spec, ctx) {
|
|
@@ -5923,7 +5941,16 @@ function buildMcpJson(input) {
|
|
|
5923
5941
|
if (postizIntegration) {
|
|
5924
5942
|
mcpServers["postiz"] = buildPostizMcpEntry(postizIntegration);
|
|
5925
5943
|
}
|
|
5944
|
+
const remoteOAuthProxyPaths = {
|
|
5945
|
+
proxyPath: join4(getHomeDir3(), ".augmented", "_mcp", "remote-oauth-proxy.js"),
|
|
5946
|
+
tokenFile: join4(getProjectDir(input.agent.code_name), ".env.integrations")
|
|
5947
|
+
};
|
|
5926
5948
|
for (const integration of input.integrations ?? []) {
|
|
5949
|
+
const proxyEntry = buildOAuthRemoteMcpProxyEntry(integration.definition_id, remoteOAuthProxyPaths);
|
|
5950
|
+
if (proxyEntry) {
|
|
5951
|
+
mcpServers[integration.definition_id] = proxyEntry;
|
|
5952
|
+
continue;
|
|
5953
|
+
}
|
|
5927
5954
|
const entry = buildRemoteMcpEntry(integration.definition_id);
|
|
5928
5955
|
if (entry) {
|
|
5929
5956
|
mcpServers[integration.definition_id] = entry;
|
|
@@ -7007,7 +7034,16 @@ ${sections}`
|
|
|
7007
7034
|
if (postizIntegration) {
|
|
7008
7035
|
this.writeMcpServer(codeName, "postiz", buildPostizMcpEntry(postizIntegration));
|
|
7009
7036
|
}
|
|
7037
|
+
const remoteOAuthProxyPaths = {
|
|
7038
|
+
proxyPath: join4(getHomeDir3(), ".augmented", "_mcp", "remote-oauth-proxy.js"),
|
|
7039
|
+
tokenFile: join4(getProjectDir(codeName), ".env.integrations")
|
|
7040
|
+
};
|
|
7010
7041
|
for (const integration of integrations) {
|
|
7042
|
+
const proxyEntry = buildOAuthRemoteMcpProxyEntry(integration.definition_id, remoteOAuthProxyPaths);
|
|
7043
|
+
if (proxyEntry) {
|
|
7044
|
+
this.writeMcpServer(codeName, integration.definition_id, proxyEntry);
|
|
7045
|
+
continue;
|
|
7046
|
+
}
|
|
7011
7047
|
const entry = buildRemoteMcpEntry(integration.definition_id);
|
|
7012
7048
|
if (entry) {
|
|
7013
7049
|
this.writeMcpServer(codeName, integration.definition_id, entry);
|
|
@@ -7814,7 +7850,7 @@ function requireHost() {
|
|
|
7814
7850
|
}
|
|
7815
7851
|
|
|
7816
7852
|
// src/lib/api-client.ts
|
|
7817
|
-
var agtCliVersion = true ? "0.28.
|
|
7853
|
+
var agtCliVersion = true ? "0.28.151" : "dev";
|
|
7818
7854
|
var lastConfigHash = null;
|
|
7819
7855
|
function setConfigHash(hash) {
|
|
7820
7856
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8266,14 +8302,15 @@ function readMcpHttpServerConfig(projectDir, serverKey, env) {
|
|
|
8266
8302
|
const raw = readFileSync8(join8(projectDir, ".mcp.json"), "utf-8");
|
|
8267
8303
|
const servers = JSON.parse(raw).mcpServers ?? {};
|
|
8268
8304
|
const entry = servers[serverKey];
|
|
8269
|
-
if (entry
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8305
|
+
if (!entry) return null;
|
|
8306
|
+
const unresolved = /* @__PURE__ */ new Set();
|
|
8307
|
+
const sub = (value) => {
|
|
8308
|
+
if (!env) return value;
|
|
8309
|
+
const r = expandTemplateVars(value, env);
|
|
8310
|
+
for (const name of r.unresolved) unresolved.add(name);
|
|
8311
|
+
return r.value;
|
|
8312
|
+
};
|
|
8313
|
+
if (typeof entry.url === "string" && (entry.type === "http" || entry.type === void 0)) {
|
|
8277
8314
|
const url = sub(entry.url);
|
|
8278
8315
|
let headers;
|
|
8279
8316
|
if (entry.headers) {
|
|
@@ -8282,6 +8319,13 @@ function readMcpHttpServerConfig(projectDir, serverKey, env) {
|
|
|
8282
8319
|
}
|
|
8283
8320
|
return { url, ...headers ? { headers } : {}, unresolved: [...unresolved] };
|
|
8284
8321
|
}
|
|
8322
|
+
const proxyUrl = entry.env?.["AGT_REMOTE_MCP_URL"];
|
|
8323
|
+
const tokenVar = entry.env?.["AGT_REMOTE_MCP_TOKEN_VAR"];
|
|
8324
|
+
if (entry.command && typeof proxyUrl === "string" && typeof tokenVar === "string") {
|
|
8325
|
+
const url = sub(proxyUrl);
|
|
8326
|
+
const bearer = sub(`\${${tokenVar}}`);
|
|
8327
|
+
return { url, headers: { Authorization: `Bearer ${bearer}` }, unresolved: [...unresolved] };
|
|
8328
|
+
}
|
|
8285
8329
|
return null;
|
|
8286
8330
|
} catch {
|
|
8287
8331
|
return null;
|
|
@@ -9111,4 +9155,4 @@ export {
|
|
|
9111
9155
|
managerInstallSystemUnitCommand,
|
|
9112
9156
|
managerUninstallSystemUnitCommand
|
|
9113
9157
|
};
|
|
9114
|
-
//# sourceMappingURL=chunk-
|
|
9158
|
+
//# sourceMappingURL=chunk-SZX4F3O5.js.map
|