@integrity-labs/agt-cli 0.12.7 → 0.12.9
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 +3 -3
- package/dist/{chunk-35KA6J3P.js → chunk-ZFTZDO5E.js} +49 -20
- package/dist/chunk-ZFTZDO5E.js.map +1 -0
- package/dist/lib/manager-worker.js +29 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/mcp/index.js +3 -6
- package/mcp/telegram-channel.js +14218 -0
- package/package.json +4 -3
- package/dist/chunk-35KA6J3P.js.map +0 -1
package/dist/bin/agt.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolveChannels,
|
|
33
33
|
serializeManifestForSlackCli,
|
|
34
34
|
setActiveTeam
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-ZFTZDO5E.js";
|
|
36
36
|
|
|
37
37
|
// src/bin/agt.ts
|
|
38
38
|
import { join as join11 } from "path";
|
|
@@ -3717,7 +3717,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
3717
3717
|
import { existsSync as existsSync5, realpathSync } from "fs";
|
|
3718
3718
|
import chalk20 from "chalk";
|
|
3719
3719
|
import ora15 from "ora";
|
|
3720
|
-
var cliVersion = true ? "0.12.
|
|
3720
|
+
var cliVersion = true ? "0.12.9" : "dev";
|
|
3721
3721
|
async function fetchLatestVersion() {
|
|
3722
3722
|
const host2 = getHost();
|
|
3723
3723
|
if (!host2) return null;
|
|
@@ -4166,7 +4166,7 @@ function handleError(err) {
|
|
|
4166
4166
|
}
|
|
4167
4167
|
|
|
4168
4168
|
// src/bin/agt.ts
|
|
4169
|
-
var cliVersion2 = true ? "0.12.
|
|
4169
|
+
var cliVersion2 = true ? "0.12.9" : "dev";
|
|
4170
4170
|
var program = new Command();
|
|
4171
4171
|
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");
|
|
4172
4172
|
program.hook("preAction", (thisCommand) => {
|
|
@@ -3284,16 +3284,43 @@ ${sections}`
|
|
|
3284
3284
|
const agentDir = getAgentDir(codeName);
|
|
3285
3285
|
mkdirSync4(agentDir, { recursive: true });
|
|
3286
3286
|
const isPersistent = options?.sessionMode === "persistent";
|
|
3287
|
-
if (
|
|
3287
|
+
if (channelId === "telegram") {
|
|
3288
|
+
const botToken = config["bot_token"];
|
|
3289
|
+
if (!botToken)
|
|
3290
|
+
return;
|
|
3291
|
+
const allowedChats = config["allowed_chats"];
|
|
3292
|
+
const localTelegramChannel = join4(getHomeDir3(), ".augmented", "_mcp", "telegram-channel.js");
|
|
3293
|
+
const telegramEnv = {
|
|
3294
|
+
TELEGRAM_BOT_TOKEN: botToken,
|
|
3295
|
+
AGT_AGENT_CODE_NAME: codeName
|
|
3296
|
+
};
|
|
3297
|
+
if (allowedChats && allowedChats.length > 0) {
|
|
3298
|
+
telegramEnv.TELEGRAM_ALLOWED_CHATS = allowedChats.join(",");
|
|
3299
|
+
}
|
|
3300
|
+
const telegramEntry = {
|
|
3301
|
+
command: "node",
|
|
3302
|
+
args: [localTelegramChannel],
|
|
3303
|
+
env: telegramEnv
|
|
3304
|
+
};
|
|
3305
|
+
const provisionMcpPath = join4(agentDir, "provision", ".mcp.json");
|
|
3306
|
+
mkdirSync4(dirname4(provisionMcpPath), { recursive: true });
|
|
3307
|
+
let mcpConfig2 = { mcpServers: {} };
|
|
3308
|
+
try {
|
|
3309
|
+
mcpConfig2 = JSON.parse(readFileSync4(provisionMcpPath, "utf-8"));
|
|
3310
|
+
if (!mcpConfig2.mcpServers)
|
|
3311
|
+
mcpConfig2.mcpServers = {};
|
|
3312
|
+
} catch {
|
|
3313
|
+
}
|
|
3314
|
+
mcpConfig2.mcpServers["telegram"] = telegramEntry;
|
|
3315
|
+
writeFileSync4(provisionMcpPath, JSON.stringify(mcpConfig2, null, 2));
|
|
3316
|
+
syncMcpToProject(codeName);
|
|
3317
|
+
return;
|
|
3318
|
+
}
|
|
3319
|
+
if (isPersistent && (channelId === "discord" || channelId === "slack")) {
|
|
3288
3320
|
const channelDir = join4(getHomeDir3(), ".claude", "channels", channelId);
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
if (botToken) {
|
|
3293
|
-
writeFileSync4(join4(channelDir, ".env"), `TELEGRAM_BOT_TOKEN=${botToken}
|
|
3294
|
-
`);
|
|
3295
|
-
}
|
|
3296
|
-
} else if (channelId === "discord") {
|
|
3321
|
+
if (channelId === "discord")
|
|
3322
|
+
mkdirSync4(channelDir, { recursive: true });
|
|
3323
|
+
if (channelId === "discord") {
|
|
3297
3324
|
const botToken = config["bot_token"];
|
|
3298
3325
|
if (botToken) {
|
|
3299
3326
|
writeFileSync4(join4(channelDir, ".env"), `DISCORD_BOT_TOKEN=${botToken}
|
|
@@ -3347,16 +3374,7 @@ ${sections}`
|
|
|
3347
3374
|
mcpConfig = { mcpServers: {} };
|
|
3348
3375
|
}
|
|
3349
3376
|
const mcpServers = mcpConfig.mcpServers;
|
|
3350
|
-
if (channelId === "
|
|
3351
|
-
const botToken = config["bot_token"];
|
|
3352
|
-
if (!botToken)
|
|
3353
|
-
return;
|
|
3354
|
-
mcpServers["telegram"] = {
|
|
3355
|
-
command: "npx",
|
|
3356
|
-
args: ["-y", "@anthropic/claude-code-telegram"],
|
|
3357
|
-
env: { TELEGRAM_BOT_TOKEN: botToken }
|
|
3358
|
-
};
|
|
3359
|
-
} else if (channelId === "discord") {
|
|
3377
|
+
if (channelId === "discord") {
|
|
3360
3378
|
const botToken = config["bot_token"];
|
|
3361
3379
|
if (!botToken)
|
|
3362
3380
|
return;
|
|
@@ -3398,6 +3416,17 @@ ${sections}`
|
|
|
3398
3416
|
writeFileSync4(mcpJsonPath, JSON.stringify(mcpConfig, null, 2));
|
|
3399
3417
|
syncMcpToProject(codeName);
|
|
3400
3418
|
},
|
|
3419
|
+
hasChannelCredentials(codeName, channelId) {
|
|
3420
|
+
const provisionMcpPath = join4(getAgentDir(codeName), "provision", ".mcp.json");
|
|
3421
|
+
if (!existsSync4(provisionMcpPath))
|
|
3422
|
+
return false;
|
|
3423
|
+
try {
|
|
3424
|
+
const parsed = JSON.parse(readFileSync4(provisionMcpPath, "utf-8"));
|
|
3425
|
+
return Boolean(parsed.mcpServers?.[channelId]);
|
|
3426
|
+
} catch {
|
|
3427
|
+
return false;
|
|
3428
|
+
}
|
|
3429
|
+
},
|
|
3401
3430
|
removeChannelCredentials(codeName, channelId) {
|
|
3402
3431
|
const agentDir = getAgentDir(codeName);
|
|
3403
3432
|
const mcpJsonPath = join4(agentDir, "provision", ".mcp.json");
|
|
@@ -6334,4 +6363,4 @@ export {
|
|
|
6334
6363
|
detectDrift,
|
|
6335
6364
|
provision
|
|
6336
6365
|
};
|
|
6337
|
-
//# sourceMappingURL=chunk-
|
|
6366
|
+
//# sourceMappingURL=chunk-ZFTZDO5E.js.map
|