@integrity-labs/agt-cli 0.28.671 → 0.28.672
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 +6 -6
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-ZU2BHLUS.js → chunk-EX6INJDG.js} +20 -76
- package/dist/chunk-EX6INJDG.js.map +1 -0
- package/dist/{chunk-57XP5OG6.js → chunk-YAVWYI5S.js} +104 -5
- package/dist/chunk-YAVWYI5S.js.map +1 -0
- package/dist/{chunk-DWFN5PMF.js → chunk-YOID6KOQ.js} +22 -1
- package/dist/chunk-YOID6KOQ.js.map +1 -0
- package/dist/{claude-pair-runtime-ANNQRKO4.js → claude-pair-runtime-UZ2JB2KY.js} +2 -2
- package/dist/lib/manager-worker.js +52 -20
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +21 -0
- package/dist/mcp/index.js +21 -0
- package/dist/mcp/origami.js +21 -0
- package/dist/mcp/slack-channel.js +21 -0
- package/dist/mcp/telegram-channel.js +21 -0
- package/dist/{persistent-session-LTFB4M53.js → persistent-session-PYAJ4VJW.js} +3 -3
- package/dist/{responsiveness-probe-P2S3UMRE.js → responsiveness-probe-5I2LIVCA.js} +3 -3
- package/dist/{session-auth-dead-YHSQBOB4.js → session-auth-dead-NUX643UJ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-57XP5OG6.js.map +0 -1
- package/dist/chunk-DWFN5PMF.js.map +0 -1
- package/dist/chunk-ZU2BHLUS.js.map +0 -1
- /package/dist/{claude-pair-runtime-ANNQRKO4.js.map → claude-pair-runtime-UZ2JB2KY.js.map} +0 -0
- /package/dist/{persistent-session-LTFB4M53.js.map → persistent-session-PYAJ4VJW.js.map} +0 -0
- /package/dist/{responsiveness-probe-P2S3UMRE.js.map → responsiveness-probe-5I2LIVCA.js.map} +0 -0
- /package/dist/{session-auth-dead-YHSQBOB4.js.map → session-auth-dead-NUX643UJ.js.map} +0 -0
|
@@ -8,8 +8,11 @@ import {
|
|
|
8
8
|
expandTemplateVars,
|
|
9
9
|
isolationMode,
|
|
10
10
|
log,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
mergeEnvIntegrationsContent,
|
|
12
|
+
parseEnvFileEntries,
|
|
13
|
+
parseEnvIntegrations,
|
|
14
|
+
shellQuote
|
|
15
|
+
} from "./chunk-YAVWYI5S.js";
|
|
13
16
|
import {
|
|
14
17
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
15
18
|
INTEGRATIONS_SECTION_END,
|
|
@@ -56,7 +59,7 @@ import {
|
|
|
56
59
|
resolveConnectivityProbe,
|
|
57
60
|
worseConnectivityOutcome,
|
|
58
61
|
wrapScheduledTaskPrompt
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-YOID6KOQ.js";
|
|
60
63
|
import {
|
|
61
64
|
parsePsRows
|
|
62
65
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -405,70 +408,6 @@ function extractCommandNotFound(stderr) {
|
|
|
405
408
|
return null;
|
|
406
409
|
}
|
|
407
410
|
|
|
408
|
-
// ../../packages/core/dist/provisioning/env-integrations-file.js
|
|
409
|
-
function shellQuote(value) {
|
|
410
|
-
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
411
|
-
}
|
|
412
|
-
var CHANNEL_SECRET_ENV_KEYS = [
|
|
413
|
-
"SLACK_BOT_TOKEN",
|
|
414
|
-
"SLACK_APP_TOKEN",
|
|
415
|
-
"TELEGRAM_BOT_TOKEN",
|
|
416
|
-
"MSTEAMS_CLIENT_SECRET"
|
|
417
|
-
];
|
|
418
|
-
var MCP_SERVER_SECRET_ENV_KEYS = [
|
|
419
|
-
"COMPOSIO_API_KEY",
|
|
420
|
-
"PIPEDREAM_CLIENT_SECRET"
|
|
421
|
-
];
|
|
422
|
-
var PRESERVED_ENV_KEYS = [
|
|
423
|
-
...CHANNEL_SECRET_ENV_KEYS,
|
|
424
|
-
...MCP_SERVER_SECRET_ENV_KEYS
|
|
425
|
-
];
|
|
426
|
-
var HEADER = "# Augmented integrations \u2014 auto-generated, do not edit";
|
|
427
|
-
function parseEnvFileEntries(content) {
|
|
428
|
-
const out = /* @__PURE__ */ new Map();
|
|
429
|
-
for (const line of content.split("\n")) {
|
|
430
|
-
if (!line || line.startsWith("#") || !line.includes("="))
|
|
431
|
-
continue;
|
|
432
|
-
const eqIdx = line.indexOf("=");
|
|
433
|
-
out.set(line.slice(0, eqIdx), line.slice(eqIdx + 1));
|
|
434
|
-
}
|
|
435
|
-
return out;
|
|
436
|
-
}
|
|
437
|
-
function renderEnvIntegrations(entries) {
|
|
438
|
-
const lines = [HEADER];
|
|
439
|
-
for (const [key, rendered] of entries)
|
|
440
|
-
lines.push(`${key}=${rendered}`);
|
|
441
|
-
return lines.join("\n") + "\n";
|
|
442
|
-
}
|
|
443
|
-
function mergeEnvIntegrationsContent(existing, args) {
|
|
444
|
-
const current = existing === null ? /* @__PURE__ */ new Map() : parseEnvFileEntries(existing);
|
|
445
|
-
let next;
|
|
446
|
-
if (args.mode === "upsert") {
|
|
447
|
-
next = new Map(current);
|
|
448
|
-
for (const [key, raw] of Object.entries(args.updates)) {
|
|
449
|
-
if (raw === null)
|
|
450
|
-
next.delete(key);
|
|
451
|
-
else
|
|
452
|
-
next.set(key, shellQuote(raw));
|
|
453
|
-
}
|
|
454
|
-
} else {
|
|
455
|
-
next = /* @__PURE__ */ new Map();
|
|
456
|
-
for (const [key, raw] of Object.entries(args.updates)) {
|
|
457
|
-
if (raw !== null)
|
|
458
|
-
next.set(key, shellQuote(raw));
|
|
459
|
-
}
|
|
460
|
-
const preserve = args.preserveKeys ?? PRESERVED_ENV_KEYS;
|
|
461
|
-
for (const key of preserve) {
|
|
462
|
-
if (key in args.updates)
|
|
463
|
-
continue;
|
|
464
|
-
if (!next.has(key) && current.has(key)) {
|
|
465
|
-
next.set(key, current.get(key));
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return renderEnvIntegrations(next);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
411
|
// ../../packages/core/dist/provisioning/frameworks/claudecode/index.js
|
|
473
412
|
import { readFileSync as readFileSync4, writeFileSync as writeFileSync4, mkdirSync as mkdirSync3, existsSync as existsSync4, chmodSync as chmodSync4, readdirSync, rmSync as rmSync2, copyFileSync, lstatSync, realpathSync, symlinkSync, readlinkSync, renameSync as renameSync4, opendirSync } from "fs";
|
|
474
413
|
import { join as join3, relative, dirname as dirname3 } from "path";
|
|
@@ -4902,6 +4841,12 @@ ${sections}`
|
|
|
4902
4841
|
const senderPolicyEnv = senderPolicyTeamId ? { AGT_TEAM_ID: senderPolicyTeamId } : {};
|
|
4903
4842
|
const agentDir = getAgentDir(codeName);
|
|
4904
4843
|
mkdirSync3(agentDir, { recursive: true });
|
|
4844
|
+
const persistChannelSecrets = options?.channelSecretDelivery !== "spawn-env";
|
|
4845
|
+
const channelSecretUpdates = (updates, fullKeySet) => {
|
|
4846
|
+
if (persistChannelSecrets)
|
|
4847
|
+
return updates;
|
|
4848
|
+
return Object.fromEntries(fullKeySet.map((k) => [k, null]));
|
|
4849
|
+
};
|
|
4905
4850
|
const isPersistent = options?.sessionMode === "persistent";
|
|
4906
4851
|
const peerDisabledMode = options?.peerDisabled ?? (options?.telegramPeerDisabled === true ? "all" : "off");
|
|
4907
4852
|
if (channelId === "telegram") {
|
|
@@ -4914,7 +4859,7 @@ ${sections}`
|
|
|
4914
4859
|
const resolvedAgtApiKeyForTelegram = process.env["AGT_API_KEY"]?.trim();
|
|
4915
4860
|
writeEnvIntegrationsForAgent(codeName, {
|
|
4916
4861
|
mode: "upsert",
|
|
4917
|
-
updates: { TELEGRAM_BOT_TOKEN: botToken }
|
|
4862
|
+
updates: channelSecretUpdates({ TELEGRAM_BOT_TOKEN: botToken }, ["TELEGRAM_BOT_TOKEN"])
|
|
4918
4863
|
});
|
|
4919
4864
|
const telegramEnv = {
|
|
4920
4865
|
TELEGRAM_BOT_TOKEN: "${TELEGRAM_BOT_TOKEN}",
|
|
@@ -5068,10 +5013,10 @@ ${sections}`
|
|
|
5068
5013
|
};
|
|
5069
5014
|
writeEnvIntegrationsForAgent(codeName, {
|
|
5070
5015
|
mode: "upsert",
|
|
5071
|
-
updates: {
|
|
5016
|
+
updates: channelSecretUpdates({
|
|
5072
5017
|
SLACK_BOT_TOKEN: botToken,
|
|
5073
5018
|
...appToken ? { SLACK_APP_TOKEN: appToken } : {}
|
|
5074
|
-
}
|
|
5019
|
+
}, ["SLACK_BOT_TOKEN", "SLACK_APP_TOKEN"])
|
|
5075
5020
|
});
|
|
5076
5021
|
const localSlackChannel = join3(getHomeDir(), ".augmented", "_mcp", "slack-channel.js");
|
|
5077
5022
|
const slackAvatarEnvUrl = resolveAvatarEnvUrl(options?.agentAvatarUrl).url;
|
|
@@ -5279,10 +5224,10 @@ ${sections}`
|
|
|
5279
5224
|
};
|
|
5280
5225
|
writeEnvIntegrationsForAgent(codeName, {
|
|
5281
5226
|
mode: "upsert",
|
|
5282
|
-
updates: {
|
|
5227
|
+
updates: channelSecretUpdates({
|
|
5283
5228
|
SLACK_BOT_TOKEN: botToken,
|
|
5284
5229
|
...appToken ? { SLACK_APP_TOKEN: appToken } : {}
|
|
5285
|
-
}
|
|
5230
|
+
}, ["SLACK_BOT_TOKEN", "SLACK_APP_TOKEN"])
|
|
5286
5231
|
});
|
|
5287
5232
|
const slackAvatarEnvUrl = resolveAvatarEnvUrl(options?.agentAvatarUrl).url;
|
|
5288
5233
|
if (isPersistent && existsSync4(localSlackChannel)) {
|
|
@@ -5369,7 +5314,7 @@ ${sections}`
|
|
|
5369
5314
|
};
|
|
5370
5315
|
writeEnvIntegrationsForAgent(codeName, {
|
|
5371
5316
|
mode: "upsert",
|
|
5372
|
-
updates: { MSTEAMS_CLIENT_SECRET: clientSecret }
|
|
5317
|
+
updates: channelSecretUpdates({ MSTEAMS_CLIENT_SECRET: clientSecret }, ["MSTEAMS_CLIENT_SECRET"])
|
|
5373
5318
|
});
|
|
5374
5319
|
const teamsEnv = {
|
|
5375
5320
|
MSTEAMS_APP_ID: appId,
|
|
@@ -6347,7 +6292,7 @@ function exchangeFailureKind(err) {
|
|
|
6347
6292
|
}
|
|
6348
6293
|
|
|
6349
6294
|
// src/lib/api-client.ts
|
|
6350
|
-
var agtCliVersion = true ? "0.28.
|
|
6295
|
+
var agtCliVersion = true ? "0.28.672" : "dev";
|
|
6351
6296
|
var lastConfigHash = null;
|
|
6352
6297
|
function setConfigHash(hash) {
|
|
6353
6298
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10007,7 +9952,6 @@ export {
|
|
|
10007
9952
|
LITERAL_SECRET_PATTERNS,
|
|
10008
9953
|
safeWriteJsonAtomic,
|
|
10009
9954
|
extractCommandNotFound,
|
|
10010
|
-
CHANNEL_SECRET_ENV_KEYS,
|
|
10011
9955
|
migrateAgentDirToIdKeyed,
|
|
10012
9956
|
provisionStopHook,
|
|
10013
9957
|
provisionIsolationHook,
|
|
@@ -10089,4 +10033,4 @@ export {
|
|
|
10089
10033
|
managerInstallSystemUnitCommand,
|
|
10090
10034
|
managerUninstallSystemUnitCommand
|
|
10091
10035
|
};
|
|
10092
|
-
//# sourceMappingURL=chunk-
|
|
10036
|
+
//# sourceMappingURL=chunk-EX6INJDG.js.map
|