@integrity-labs/agt-cli 0.8.0 → 0.8.2
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 +2 -2
- package/dist/lib/manager-worker.js +18 -10
- package/dist/lib/manager-worker.js.map +1 -1
- package/package.json +1 -1
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.2" : "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.2" : "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) => {
|
|
@@ -411,6 +411,7 @@ function spawnSession(config2, session) {
|
|
|
411
411
|
if (existsSync(claudeMdPath)) args.push("--system-prompt-file", claudeMdPath);
|
|
412
412
|
args.push("--allow-dangerously-skip-permissions");
|
|
413
413
|
args.push("--dangerously-skip-permissions");
|
|
414
|
+
args.push("--strict-mcp-config");
|
|
414
415
|
args.push("--name", tmuxSession);
|
|
415
416
|
const mcpServerNames = collectMcpServerNames(mcpConfigPath, channelsConfigPath);
|
|
416
417
|
const mcpPatterns = mcpServerNames.map((name) => `mcp__${name.replace(/-/g, "_")}__*`);
|
|
@@ -426,7 +427,7 @@ function spawnSession(config2, session) {
|
|
|
426
427
|
"Skill"
|
|
427
428
|
].join(",");
|
|
428
429
|
args.push("--allowedTools", allowedTools);
|
|
429
|
-
let envPrefix = "";
|
|
430
|
+
let envPrefix = "CLAUDE_CODE_SIMPLE=1 ";
|
|
430
431
|
const envIntegrationsPath = join(projectDir, ".env.integrations");
|
|
431
432
|
if (existsSync(envIntegrationsPath)) {
|
|
432
433
|
try {
|
|
@@ -520,9 +521,12 @@ async function acceptDialogs(tmuxSession, codeName, log2) {
|
|
|
520
521
|
}
|
|
521
522
|
}
|
|
522
523
|
}
|
|
523
|
-
async function injectMessage(codeName, type, content, meta) {
|
|
524
|
+
async function injectMessage(codeName, type, content, meta, log2) {
|
|
525
|
+
const _log = log2 ?? ((_) => {
|
|
526
|
+
});
|
|
524
527
|
const session = sessions.get(codeName);
|
|
525
528
|
if (!session || session.status !== "running") {
|
|
529
|
+
_log(`[inject] SKIP '${codeName}' \u2014 session ${session ? `status=${session.status}` : "not found in Map"}`);
|
|
526
530
|
return false;
|
|
527
531
|
}
|
|
528
532
|
const prefix = meta?.task_name ? `[Task: ${meta.task_name}] ` : "";
|
|
@@ -535,11 +539,10 @@ async function injectMessage(codeName, type, content, meta) {
|
|
|
535
539
|
mkdirSync(tmpDir, { recursive: true });
|
|
536
540
|
const tmpFile = join(tmpDir, ".agt-inject-prompt.txt");
|
|
537
541
|
writeFileSync2(tmpFile, text);
|
|
542
|
+
_log(`[inject] acpx exec: cwd=${projectDir}, file=${tmpFile}, bin=${acpx}`);
|
|
538
543
|
execFileSync(acpx, [
|
|
539
544
|
"claude",
|
|
540
545
|
"exec",
|
|
541
|
-
"--cwd",
|
|
542
|
-
projectDir,
|
|
543
546
|
"-f",
|
|
544
547
|
tmpFile
|
|
545
548
|
], {
|
|
@@ -549,13 +552,18 @@ async function injectMessage(codeName, type, content, meta) {
|
|
|
549
552
|
stdio: "ignore"
|
|
550
553
|
});
|
|
551
554
|
return true;
|
|
552
|
-
} catch {
|
|
555
|
+
} catch (err) {
|
|
556
|
+
_log(`[inject] acpx exec failed for '${codeName}': ${err.message}`);
|
|
553
557
|
}
|
|
558
|
+
} else {
|
|
559
|
+
_log(`[inject] acpx binary not found \u2014 falling back to tmux send-keys`);
|
|
554
560
|
}
|
|
555
561
|
try {
|
|
556
562
|
execFileSync("tmux", ["send-keys", "-t", `agt-${codeName}`, text, "Enter"], { stdio: "ignore" });
|
|
563
|
+
_log(`[inject] tmux send-keys sent for '${codeName}' \u2014 unverified (returning false)`);
|
|
557
564
|
return false;
|
|
558
|
-
} catch {
|
|
565
|
+
} catch (err) {
|
|
566
|
+
_log(`[inject] tmux send-keys failed for '${codeName}': ${err.message}`);
|
|
559
567
|
return false;
|
|
560
568
|
}
|
|
561
569
|
}
|
|
@@ -1925,7 +1933,7 @@ async function processAgent(agent, agentStates) {
|
|
|
1925
1933
|
const names = integrations.map((i) => i.display_name || i.definition_id).join(", ");
|
|
1926
1934
|
injectMessage(agent.code_name, "system", `Your integrations have been updated. You now have access to: ${names}. Re-read your CLAUDE.md for details.`, {
|
|
1927
1935
|
task_name: "integration-update"
|
|
1928
|
-
}).catch(() => {
|
|
1936
|
+
}, log).catch(() => {
|
|
1929
1937
|
});
|
|
1930
1938
|
}
|
|
1931
1939
|
const managedIntegrations = integrations.filter((i) => i.auth_type === "managed");
|
|
@@ -2221,7 +2229,7 @@ async function processAgent(agent, agentStates) {
|
|
|
2221
2229
|
const taskHint = todayItem ? ` Top item: "${todayItem.title}" (priority ${todayItem.priority}).` : "";
|
|
2222
2230
|
injectMessage(agent.code_name, "task", `New work triggered. Check your kanban board with kanban_list and pick up the next item.${taskHint}`, {
|
|
2223
2231
|
task_name: "kanban-work-trigger"
|
|
2224
|
-
});
|
|
2232
|
+
}, log);
|
|
2225
2233
|
log(`[persistent-session] Work trigger injected for '${agent.code_name}'`);
|
|
2226
2234
|
} else {
|
|
2227
2235
|
log(`[persistent-session] Work trigger skipped for '${agent.code_name}' \u2014 session not yet healthy`);
|
|
@@ -2766,7 +2774,7 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
|
|
|
2766
2774
|
task_id: task.taskId,
|
|
2767
2775
|
template_id: task.templateId,
|
|
2768
2776
|
task_name: task.name
|
|
2769
|
-
});
|
|
2777
|
+
}, log);
|
|
2770
2778
|
if (injected) {
|
|
2771
2779
|
const updated = markTaskFired(codeName, task.taskId, "ok");
|
|
2772
2780
|
claudeSchedulerStates.set(codeName, updated);
|
|
@@ -2949,7 +2957,7 @@ function ensureRealtimeKanbanStarted(agentStates) {
|
|
|
2949
2957
|
if (isSessionHealthy(agent.codeName)) {
|
|
2950
2958
|
injectMessage(agent.codeName, "task", `New task added to your board: "${item.title}" (priority ${item.priority}). Pick it up \u2014 move to in_progress and start working.`, {
|
|
2951
2959
|
task_name: "kanban-work-trigger"
|
|
2952
|
-
});
|
|
2960
|
+
}, log);
|
|
2953
2961
|
log(`[realtime] Injected kanban-work trigger for '${agent.codeName}': "${item.title}"`);
|
|
2954
2962
|
} else {
|
|
2955
2963
|
fireClaudeWorkTrigger(agent.codeName, agent.agentId, boardItems);
|