@integrity-labs/agt-cli 0.7.3 → 0.7.5
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.7.
|
|
3414
|
+
var cliVersion = true ? "0.7.5" : "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.7.
|
|
3530
|
+
var cliVersion2 = true ? "0.7.5" : "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) => {
|
|
@@ -776,6 +776,7 @@ var state = {
|
|
|
776
776
|
var registeredAgentsCache = /* @__PURE__ */ new Map();
|
|
777
777
|
var agentFrameworkCache = /* @__PURE__ */ new Map();
|
|
778
778
|
var frameworkBinaryChecked = /* @__PURE__ */ new Set();
|
|
779
|
+
var agentRuntimeAuthenticated = false;
|
|
779
780
|
function resolveAgentFramework(codeName) {
|
|
780
781
|
const frameworkId = agentFrameworkCache.get(codeName) ?? "openclaw";
|
|
781
782
|
return getFramework(frameworkId);
|
|
@@ -904,6 +905,21 @@ async function ensureFrameworkBinary(frameworkId) {
|
|
|
904
905
|
}
|
|
905
906
|
}
|
|
906
907
|
}
|
|
908
|
+
agentRuntimeAuthenticated = checkClaudeAuth(execFileSync);
|
|
909
|
+
}
|
|
910
|
+
function checkClaudeAuth(execFileSync) {
|
|
911
|
+
try {
|
|
912
|
+
const authOutput = execFileSync("claude", ["auth", "status"], { timeout: 1e4, stdio: "pipe" }).toString();
|
|
913
|
+
const authStatus = JSON.parse(authOutput);
|
|
914
|
+
if (authStatus.loggedIn) {
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
log('\u26A0\uFE0F Claude Code is not authenticated. Run "claude" in a terminal to log in, then restart the manager.');
|
|
918
|
+
return false;
|
|
919
|
+
} catch {
|
|
920
|
+
log('\u26A0\uFE0F Could not check Claude Code auth status. Run "claude" in a terminal to ensure it is logged in.');
|
|
921
|
+
return false;
|
|
922
|
+
}
|
|
907
923
|
}
|
|
908
924
|
function loadGatewayPorts() {
|
|
909
925
|
try {
|
|
@@ -1225,7 +1241,8 @@ async function pollCycle() {
|
|
|
1225
1241
|
await api.post("/host/heartbeat", {
|
|
1226
1242
|
host_id: hostId,
|
|
1227
1243
|
framework_version: cachedFrameworkVersion ?? void 0,
|
|
1228
|
-
host_security: detectHostSecurity() ?? void 0
|
|
1244
|
+
host_security: detectHostSecurity() ?? void 0,
|
|
1245
|
+
agent_runtime_authenticated: agentRuntimeAuthenticated
|
|
1229
1246
|
});
|
|
1230
1247
|
} catch (err) {
|
|
1231
1248
|
log(`Heartbeat failed: ${err.message}`);
|
|
@@ -2421,6 +2438,14 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
|
|
|
2421
2438
|
devChannels.push("server:slack");
|
|
2422
2439
|
}
|
|
2423
2440
|
}
|
|
2441
|
+
if (!agentRuntimeAuthenticated) {
|
|
2442
|
+
const { execFileSync } = await import("child_process");
|
|
2443
|
+
agentRuntimeAuthenticated = checkClaudeAuth(execFileSync);
|
|
2444
|
+
if (!agentRuntimeAuthenticated) {
|
|
2445
|
+
log(`[persistent-session] Skipping '${codeName}' \u2014 Claude Code not authenticated`);
|
|
2446
|
+
return;
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2424
2449
|
if (!isSessionHealthy(codeName)) {
|
|
2425
2450
|
if (persistentSessionAgents.has(codeName)) {
|
|
2426
2451
|
log(`[persistent-session] Session for '${codeName}' is unhealthy, will restart`);
|