@integrity-labs/agt-cli 0.8.7 → 0.8.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
CHANGED
|
@@ -3411,7 +3411,7 @@ async function acpxCloseCommand(agent2, _opts, cmd) {
|
|
|
3411
3411
|
import { execSync } from "child_process";
|
|
3412
3412
|
import chalk19 from "chalk";
|
|
3413
3413
|
import ora15 from "ora";
|
|
3414
|
-
var cliVersion = true ? "0.8.
|
|
3414
|
+
var cliVersion = true ? "0.8.9" : "dev";
|
|
3415
3415
|
async function fetchLatestVersion() {
|
|
3416
3416
|
const host2 = AGT_HOST;
|
|
3417
3417
|
if (!host2) return null;
|
|
@@ -3527,7 +3527,7 @@ async function checkForUpdateOnStartup() {
|
|
|
3527
3527
|
}
|
|
3528
3528
|
|
|
3529
3529
|
// src/bin/agt.ts
|
|
3530
|
-
var cliVersion2 = true ? "0.8.
|
|
3530
|
+
var cliVersion2 = true ? "0.8.9" : "dev";
|
|
3531
3531
|
var program = new Command();
|
|
3532
3532
|
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");
|
|
3533
3533
|
program.hook("preAction", (thisCommand) => {
|
|
@@ -2551,6 +2551,19 @@ async function executeAndProcessClaudeTask(codeName, agentId, task, prompt) {
|
|
|
2551
2551
|
sanitizeMcpJson(mcpConfigPath, requireHost());
|
|
2552
2552
|
try {
|
|
2553
2553
|
const claudeMdPath = join2(projectDir, "CLAUDE.md");
|
|
2554
|
+
const serverNames = [];
|
|
2555
|
+
const channelsConfigPath = join2(projectDir, ".mcp-channels.json");
|
|
2556
|
+
for (const p of [mcpConfigPath, channelsConfigPath]) {
|
|
2557
|
+
if (existsSync2(p)) {
|
|
2558
|
+
try {
|
|
2559
|
+
const d = JSON.parse(readFileSync3(p, "utf-8"));
|
|
2560
|
+
if (d.mcpServers) serverNames.push(...Object.keys(d.mcpServers));
|
|
2561
|
+
} catch {
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
const mcpPatterns = serverNames.map((n) => `mcp__${n.replace(/-/g, "_")}__*`);
|
|
2566
|
+
const allowedTools = [...mcpPatterns, "Bash", "Read", "Write", "Edit", "Grep", "Glob"].join(",");
|
|
2554
2567
|
const claudeArgs = [
|
|
2555
2568
|
"-p",
|
|
2556
2569
|
prompt,
|
|
@@ -2558,16 +2571,33 @@ async function executeAndProcessClaudeTask(codeName, agentId, task, prompt) {
|
|
|
2558
2571
|
"text",
|
|
2559
2572
|
"--mcp-config",
|
|
2560
2573
|
mcpConfigPath,
|
|
2574
|
+
"--strict-mcp-config",
|
|
2561
2575
|
"--allowedTools",
|
|
2562
|
-
|
|
2576
|
+
allowedTools,
|
|
2577
|
+
"--allow-dangerously-skip-permissions",
|
|
2578
|
+
"--dangerously-skip-permissions"
|
|
2563
2579
|
];
|
|
2580
|
+
if (existsSync2(channelsConfigPath)) claudeArgs.push("--mcp-config", channelsConfigPath);
|
|
2564
2581
|
if (existsSync2(claudeMdPath)) {
|
|
2565
2582
|
claudeArgs.push("--system-prompt-file", claudeMdPath);
|
|
2566
2583
|
}
|
|
2584
|
+
const childEnv = { ...process.env };
|
|
2585
|
+
const envIntPath = join2(projectDir, ".env.integrations");
|
|
2586
|
+
if (existsSync2(envIntPath)) {
|
|
2587
|
+
try {
|
|
2588
|
+
for (const line of readFileSync3(envIntPath, "utf-8").split("\n")) {
|
|
2589
|
+
if (!line || line.startsWith("#") || !line.includes("=")) continue;
|
|
2590
|
+
const eqIdx = line.indexOf("=");
|
|
2591
|
+
childEnv[line.slice(0, eqIdx)] = line.slice(eqIdx + 1);
|
|
2592
|
+
}
|
|
2593
|
+
} catch {
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2567
2596
|
const { stdout, stderr } = await execFilePromiseLong("claude", claudeArgs, {
|
|
2568
2597
|
cwd: projectDir,
|
|
2569
2598
|
timeout: 3e5,
|
|
2570
|
-
stdin: "ignore"
|
|
2599
|
+
stdin: "ignore",
|
|
2600
|
+
env: childEnv
|
|
2571
2601
|
});
|
|
2572
2602
|
if (stderr) {
|
|
2573
2603
|
log(`[claude-scheduler] Task '${task.name}' stderr for '${codeName}': ${stderr.slice(0, 500)}`);
|