@integrity-labs/agt-cli 0.28.1291 → 0.28.1292
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/{api-client-6L3L4HKS.js → api-client-KSSMYKP7.js} +2 -2
- package/dist/bin/agt.js +4 -4
- package/dist/{chunk-G4T3PGWR.js → chunk-CNDXVFNT.js} +2 -2
- package/dist/{chunk-RPZSSKF7.js → chunk-Q5Y5WO2A.js} +2 -2
- package/dist/lib/manager-worker.js +33 -6
- package/dist/lib/manager-worker.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{api-client-6L3L4HKS.js.map → api-client-KSSMYKP7.js.map} +0 -0
- /package/dist/{chunk-G4T3PGWR.js.map → chunk-CNDXVFNT.js.map} +0 -0
- /package/dist/{chunk-RPZSSKF7.js.map → chunk-Q5Y5WO2A.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
mintRotatedHostKey,
|
|
16
16
|
probeHostKey,
|
|
17
17
|
setConfigHash
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CNDXVFNT.js";
|
|
19
19
|
import "./chunk-LAJEUIP7.js";
|
|
20
20
|
import "./chunk-DGUM43GV.js";
|
|
21
21
|
export {
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
probeHostKey,
|
|
37
37
|
setConfigHash
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=api-client-
|
|
39
|
+
//# sourceMappingURL=api-client-KSSMYKP7.js.map
|
package/dist/bin/agt.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
success,
|
|
32
32
|
table,
|
|
33
33
|
warn
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-Q5Y5WO2A.js";
|
|
35
35
|
import {
|
|
36
36
|
ApiError,
|
|
37
37
|
PROD_AGT_HOST,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
getHost,
|
|
43
43
|
getHostId,
|
|
44
44
|
setActiveTeam
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-CNDXVFNT.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir,
|
|
48
48
|
isSessionResumeDisabled,
|
|
@@ -5207,7 +5207,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5207
5207
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
5208
5208
|
import chalk17 from "chalk";
|
|
5209
5209
|
import ora15 from "ora";
|
|
5210
|
-
var cliVersion = true ? "0.28.
|
|
5210
|
+
var cliVersion = true ? "0.28.1292" : "dev";
|
|
5211
5211
|
async function fetchLatestVersion() {
|
|
5212
5212
|
const host2 = getHost();
|
|
5213
5213
|
if (!host2) return null;
|
|
@@ -6467,7 +6467,7 @@ function handleError(err) {
|
|
|
6467
6467
|
}
|
|
6468
6468
|
|
|
6469
6469
|
// src/bin/agt.ts
|
|
6470
|
-
var cliVersion2 = true ? "0.28.
|
|
6470
|
+
var cliVersion2 = true ? "0.28.1292" : "dev";
|
|
6471
6471
|
var program = new Command();
|
|
6472
6472
|
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");
|
|
6473
6473
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -103,7 +103,7 @@ function exchangeFailureKind(err) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/lib/api-client.ts
|
|
106
|
-
var agtCliVersion = true ? "0.28.
|
|
106
|
+
var agtCliVersion = true ? "0.28.1292" : "dev";
|
|
107
107
|
var lastConfigHash = null;
|
|
108
108
|
function setConfigHash(hash) {
|
|
109
109
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
api,
|
|
469
469
|
getHostId
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-CNDXVFNT.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
exchangeApiKey,
|
|
3
3
|
getApiKey,
|
|
4
4
|
getHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CNDXVFNT.js";
|
|
6
6
|
import {
|
|
7
7
|
LATE_BOUND_VARS,
|
|
8
8
|
PLATFORM_DENY_PERMISSIONS,
|
|
@@ -13853,4 +13853,4 @@ export {
|
|
|
13853
13853
|
managerInstallSystemUnitCommand,
|
|
13854
13854
|
managerUninstallSystemUnitCommand
|
|
13855
13855
|
};
|
|
13856
|
-
//# sourceMappingURL=chunk-
|
|
13856
|
+
//# sourceMappingURL=chunk-Q5Y5WO2A.js.map
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
tripClass,
|
|
71
71
|
writeEtcEnvironment,
|
|
72
72
|
writeProfileDScript
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-Q5Y5WO2A.js";
|
|
74
74
|
import {
|
|
75
75
|
ApiError,
|
|
76
76
|
adoptHostKeyInProcess,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
probeHostKey,
|
|
89
89
|
requireHost,
|
|
90
90
|
setConfigHash
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-CNDXVFNT.js";
|
|
92
92
|
import {
|
|
93
93
|
BLOCKED_ON_PROMPT_DECISION,
|
|
94
94
|
CHANNEL_SECRET_ENV_KEYS,
|
|
@@ -15566,7 +15566,7 @@ function createFileMigrationReportIO(codeName, log2) {
|
|
|
15566
15566
|
};
|
|
15567
15567
|
}
|
|
15568
15568
|
var managerHostPost = async (path, body) => {
|
|
15569
|
-
const { api: api2, ApiError: ApiError3 } = await import("../api-client-
|
|
15569
|
+
const { api: api2, ApiError: ApiError3 } = await import("../api-client-KSSMYKP7.js");
|
|
15570
15570
|
try {
|
|
15571
15571
|
const json = await api2.post(path, body);
|
|
15572
15572
|
return { status: 200, json };
|
|
@@ -16204,6 +16204,29 @@ var PersistentSessionStuckTracker = class {
|
|
|
16204
16204
|
}
|
|
16205
16205
|
};
|
|
16206
16206
|
|
|
16207
|
+
// src/lib/heartbeat-diagnostics-code-names.ts
|
|
16208
|
+
function heartbeatDiagnosticsCodeNames(persistentSessionAgents, spawnOutcomeCodeNames) {
|
|
16209
|
+
const out = /* @__PURE__ */ new Set();
|
|
16210
|
+
for (const codeName of persistentSessionAgents) if (codeName) out.add(codeName);
|
|
16211
|
+
for (const codeName of spawnOutcomeCodeNames) if (codeName) out.add(codeName);
|
|
16212
|
+
return [...out];
|
|
16213
|
+
}
|
|
16214
|
+
var SpawnOutcomeRoster = class {
|
|
16215
|
+
recorded = /* @__PURE__ */ new Set();
|
|
16216
|
+
record(codeName) {
|
|
16217
|
+
if (codeName) this.recorded.add(codeName);
|
|
16218
|
+
}
|
|
16219
|
+
/** Every name recorded since the previous drain, then empty. */
|
|
16220
|
+
drain() {
|
|
16221
|
+
const out = [...this.recorded];
|
|
16222
|
+
this.recorded.clear();
|
|
16223
|
+
return out;
|
|
16224
|
+
}
|
|
16225
|
+
};
|
|
16226
|
+
function spawnOutcomeIfRecorded(outcomeFor, recordedSinceHeartbeat) {
|
|
16227
|
+
return (codeName) => recordedSinceHeartbeat.has(codeName) ? outcomeFor(codeName) : void 0;
|
|
16228
|
+
}
|
|
16229
|
+
|
|
16207
16230
|
// src/lib/transient-api-error-log.ts
|
|
16208
16231
|
var CODE_KIND = {
|
|
16209
16232
|
"429": "rate_limit",
|
|
@@ -17514,12 +17537,14 @@ function cancelPendingSessionRestart(codeName) {
|
|
|
17514
17537
|
log(`[hot-reload] Cancelled pending restart timer for '${codeName}' (another teardown path is handling it)`);
|
|
17515
17538
|
}
|
|
17516
17539
|
var lastSpawnOutcomeByAgent = /* @__PURE__ */ new Map();
|
|
17540
|
+
var spawnOutcomesSinceHeartbeat = new SpawnOutcomeRoster();
|
|
17517
17541
|
var lastSpawnDecisionByAgent = /* @__PURE__ */ new Map();
|
|
17518
17542
|
function recordSpawnOutcome(codeName, result) {
|
|
17519
17543
|
lastSpawnOutcomeByAgent.set(codeName, {
|
|
17520
17544
|
spawnAttempted: result.spawnAttempted,
|
|
17521
17545
|
sessionHealthyAfter: result.sessionHealthyAfter
|
|
17522
17546
|
});
|
|
17547
|
+
spawnOutcomesSinceHeartbeat.record(codeName);
|
|
17523
17548
|
if (result.decision) lastSpawnDecisionByAgent.set(codeName, result.decision);
|
|
17524
17549
|
}
|
|
17525
17550
|
function spawnOutcomeForDiagnostics(codeName) {
|
|
@@ -18513,7 +18538,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
18513
18538
|
var lastVersionCheckAt = 0;
|
|
18514
18539
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
18515
18540
|
var lastResponsivenessProbeAt = 0;
|
|
18516
|
-
var agtCliVersion = true ? "0.28.
|
|
18541
|
+
var agtCliVersion = true ? "0.28.1292" : "dev";
|
|
18517
18542
|
function resolveBrewPath(execFileSync5) {
|
|
18518
18543
|
try {
|
|
18519
18544
|
const out = execFileSync5("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -20768,8 +20793,10 @@ async function pollCycleInner() {
|
|
|
20768
20793
|
try {
|
|
20769
20794
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
20770
20795
|
const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
|
|
20771
|
-
const
|
|
20772
|
-
const
|
|
20796
|
+
const recordedSinceHeartbeat = new Set(spawnOutcomesSinceHeartbeat.drain());
|
|
20797
|
+
const diagCodeNames = heartbeatDiagnosticsCodeNames(agentState.persistentSessionAgents, recordedSinceHeartbeat);
|
|
20798
|
+
const heartbeatSpawnOutcomeFor = spawnOutcomeIfRecorded(spawnOutcomeForDiagnostics, recordedSinceHeartbeat);
|
|
20799
|
+
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, heartbeatSpawnOutcomeFor, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
|
|
20773
20800
|
let tailscaleHostname;
|
|
20774
20801
|
try {
|
|
20775
20802
|
const { execSync: es } = await import("child_process");
|