@integrity-labs/agt-cli 0.28.407 → 0.28.408
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 +4 -4
- package/dist/{chunk-5YCE2JNY.js → chunk-DRWBCTED.js} +3 -3
- package/dist/{chunk-RD7MIR3G.js → chunk-G7M7OFCG.js} +1 -1
- package/dist/{claude-pair-runtime-W5Z4K7XK.js → claude-pair-runtime-WWTKA7QC.js} +2 -2
- package/dist/lib/manager-worker.js +50 -35
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-2AC3P5DJ.js → persistent-session-WYGZTU4O.js} +2 -2
- package/dist/{responsiveness-probe-LGJNUSPU.js → responsiveness-probe-Z6XRHNMB.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-5YCE2JNY.js.map → chunk-DRWBCTED.js.map} +0 -0
- /package/dist/{chunk-RD7MIR3G.js.map → chunk-G7M7OFCG.js.map} +0 -0
- /package/dist/{claude-pair-runtime-W5Z4K7XK.js.map → claude-pair-runtime-WWTKA7QC.js.map} +0 -0
- /package/dist/{persistent-session-2AC3P5DJ.js.map → persistent-session-WYGZTU4O.js.map} +0 -0
- /package/dist/{responsiveness-probe-LGJNUSPU.js.map → responsiveness-probe-Z6XRHNMB.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-DRWBCTED.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
renderTemplate,
|
|
71
71
|
resolveChannels,
|
|
72
72
|
serializeManifestForSlackCli
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-G7M7OFCG.js";
|
|
74
74
|
import "../chunk-XWVM4KPK.js";
|
|
75
75
|
|
|
76
76
|
// src/bin/agt.ts
|
|
@@ -4829,7 +4829,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4829
4829
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4830
4830
|
import chalk18 from "chalk";
|
|
4831
4831
|
import ora16 from "ora";
|
|
4832
|
-
var cliVersion = true ? "0.28.
|
|
4832
|
+
var cliVersion = true ? "0.28.408" : "dev";
|
|
4833
4833
|
async function fetchLatestVersion() {
|
|
4834
4834
|
const host2 = getHost();
|
|
4835
4835
|
if (!host2) return null;
|
|
@@ -6001,7 +6001,7 @@ function handleError(err) {
|
|
|
6001
6001
|
}
|
|
6002
6002
|
|
|
6003
6003
|
// src/bin/agt.ts
|
|
6004
|
-
var cliVersion2 = true ? "0.28.
|
|
6004
|
+
var cliVersion2 = true ? "0.28.408" : "dev";
|
|
6005
6005
|
var program = new Command();
|
|
6006
6006
|
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");
|
|
6007
6007
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
resolveConnectivityProbe,
|
|
26
26
|
worseConnectivityOutcome,
|
|
27
27
|
wrapScheduledTaskPrompt
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-G7M7OFCG.js";
|
|
29
29
|
import {
|
|
30
30
|
parsePsRows
|
|
31
31
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6227,7 +6227,7 @@ function requireHost() {
|
|
|
6227
6227
|
}
|
|
6228
6228
|
|
|
6229
6229
|
// src/lib/api-client.ts
|
|
6230
|
-
var agtCliVersion = true ? "0.28.
|
|
6230
|
+
var agtCliVersion = true ? "0.28.408" : "dev";
|
|
6231
6231
|
var lastConfigHash = null;
|
|
6232
6232
|
function setConfigHash(hash) {
|
|
6233
6233
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8731,4 +8731,4 @@ export {
|
|
|
8731
8731
|
managerInstallSystemUnitCommand,
|
|
8732
8732
|
managerUninstallSystemUnitCommand
|
|
8733
8733
|
};
|
|
8734
|
-
//# sourceMappingURL=chunk-
|
|
8734
|
+
//# sourceMappingURL=chunk-DRWBCTED.js.map
|
|
@@ -12473,4 +12473,4 @@ export {
|
|
|
12473
12473
|
stopAllSessionsAndWait,
|
|
12474
12474
|
getProjectDir
|
|
12475
12475
|
};
|
|
12476
|
-
//# sourceMappingURL=chunk-
|
|
12476
|
+
//# sourceMappingURL=chunk-G7M7OFCG.js.map
|
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-WYGZTU4O.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-WWTKA7QC.js.map
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
resolveEffectivePinRaw,
|
|
46
46
|
safeWriteJsonAtomic,
|
|
47
47
|
setConfigHash
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-DRWBCTED.js";
|
|
49
49
|
import {
|
|
50
50
|
getProjectDir as getProjectDir2,
|
|
51
51
|
getReadyTasks,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
toOpencodeModel,
|
|
148
148
|
transcriptActivityAgeSeconds,
|
|
149
149
|
writeEgressAllowlist
|
|
150
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-G7M7OFCG.js";
|
|
151
151
|
import {
|
|
152
152
|
reapOrphanChannelMcps
|
|
153
153
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -1342,6 +1342,11 @@ function decideOpencodeModelRestart(input) {
|
|
|
1342
1342
|
return { restart, recordModel: true };
|
|
1343
1343
|
}
|
|
1344
1344
|
|
|
1345
|
+
// src/lib/restart-stop-strategy.ts
|
|
1346
|
+
function restartTargetsOpencodeServe(framework) {
|
|
1347
|
+
return framework === "opencode";
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1345
1350
|
// src/lib/connectivity-probe-runner.ts
|
|
1346
1351
|
var DEFAULT_INTERVAL_MS = 60 * 60 * 1e3;
|
|
1347
1352
|
var DEFAULT_MAX_PER_RUN = 25;
|
|
@@ -9302,7 +9307,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9302
9307
|
var lastVersionCheckAt = 0;
|
|
9303
9308
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9304
9309
|
var lastResponsivenessProbeAt = 0;
|
|
9305
|
-
var agtCliVersion = true ? "0.28.
|
|
9310
|
+
var agtCliVersion = true ? "0.28.408" : "dev";
|
|
9306
9311
|
function resolveBrewPath(execFileSync2) {
|
|
9307
9312
|
try {
|
|
9308
9313
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -10434,7 +10439,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
10434
10439
|
if (codeNames.length === 0) return;
|
|
10435
10440
|
void (async () => {
|
|
10436
10441
|
try {
|
|
10437
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10442
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
10438
10443
|
await api.post("/host/heartbeat", {
|
|
10439
10444
|
host_id: hostId,
|
|
10440
10445
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor)
|
|
@@ -10533,7 +10538,7 @@ async function pollCycle() {
|
|
|
10533
10538
|
}
|
|
10534
10539
|
try {
|
|
10535
10540
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
10536
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10541
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
10537
10542
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
10538
10543
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor) : void 0;
|
|
10539
10544
|
let tailscaleHostname;
|
|
@@ -10688,7 +10693,7 @@ async function pollCycle() {
|
|
|
10688
10693
|
const {
|
|
10689
10694
|
collectResponsivenessProbes,
|
|
10690
10695
|
getResponsivenessIntervalMs
|
|
10691
|
-
} = await import("../responsiveness-probe-
|
|
10696
|
+
} = await import("../responsiveness-probe-Z6XRHNMB.js");
|
|
10692
10697
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
10693
10698
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
10694
10699
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -10720,7 +10725,7 @@ async function pollCycle() {
|
|
|
10720
10725
|
collectResponsivenessProbes,
|
|
10721
10726
|
livePendingInboundOldestAgeSeconds,
|
|
10722
10727
|
parkPendingInbound
|
|
10723
|
-
} = await import("../responsiveness-probe-
|
|
10728
|
+
} = await import("../responsiveness-probe-Z6XRHNMB.js");
|
|
10724
10729
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-HYOOQV4A.js");
|
|
10725
10730
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
10726
10731
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -10943,26 +10948,31 @@ async function pollCycle() {
|
|
|
10943
10948
|
log(
|
|
10944
10949
|
`[restart] Dashboard requested restart for '${agent.code_name}' at ${requested} (reason=${restartReason ?? "manual"})`
|
|
10945
10950
|
);
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
}
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10951
|
+
const framework = agent.framework ?? agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
10952
|
+
if (restartTargetsOpencodeServe(framework)) {
|
|
10953
|
+
stopOpencodeSession(agent.code_name, log);
|
|
10954
|
+
} else {
|
|
10955
|
+
try {
|
|
10956
|
+
const { execSync: es } = await import("child_process");
|
|
10957
|
+
es(`tmux kill-session -t agt-${agent.code_name} 2>/dev/null`, { stdio: "ignore" });
|
|
10958
|
+
} catch {
|
|
10959
|
+
}
|
|
10960
|
+
const breakerReason = dashboardRestartBreakerReason(restartReason);
|
|
10961
|
+
stopPersistentSessionAndForgetMcpBaseline(agent.code_name, breakerReason);
|
|
10962
|
+
if (breakerReason && restartReasonBindsNewMcp(breakerReason)) {
|
|
10963
|
+
noteRestartRequested(agent.code_name, requested);
|
|
10964
|
+
beginRestartTiming(
|
|
10965
|
+
agent.code_name,
|
|
10966
|
+
{ reason: "integration-change (dashboard restart)", delivered: null, injectDelayMs: null },
|
|
10967
|
+
log
|
|
10968
|
+
);
|
|
10969
|
+
markRestartStopped(agent.code_name, log);
|
|
10970
|
+
const prior = pendingRestartVerifications.get(agent.code_name);
|
|
10971
|
+
pendingRestartVerifications.set(agent.code_name, {
|
|
10972
|
+
firedAt: Date.now(),
|
|
10973
|
+
attempts: prior?.attempts ?? 0
|
|
10974
|
+
});
|
|
10975
|
+
}
|
|
10966
10976
|
}
|
|
10967
10977
|
restartAcks.set(agent.agent_id, requested);
|
|
10968
10978
|
}
|
|
@@ -14003,12 +14013,17 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
14003
14013
|
return;
|
|
14004
14014
|
}
|
|
14005
14015
|
const displayName = refreshData.agent?.display_name ?? codeName;
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
}
|
|
14016
|
+
const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
14017
|
+
if (restartTargetsOpencodeServe(framework)) {
|
|
14018
|
+
stopOpencodeSession(codeName, log);
|
|
14019
|
+
} else {
|
|
14020
|
+
try {
|
|
14021
|
+
const { execSync: es } = await import("child_process");
|
|
14022
|
+
es(`tmux kill-session -t agt-${codeName} 2>/dev/null`, { stdio: "ignore" });
|
|
14023
|
+
} catch {
|
|
14024
|
+
}
|
|
14025
|
+
stopPersistentSessionAndForgetMcpBaseline(codeName);
|
|
14010
14026
|
}
|
|
14011
|
-
stopPersistentSessionAndForgetMcpBaseline(codeName);
|
|
14012
14027
|
const result = await ensurePersistentSession(
|
|
14013
14028
|
{ agent_id: agentId, code_name: codeName, display_name: displayName },
|
|
14014
14029
|
[],
|
|
@@ -14022,7 +14037,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
14022
14037
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
14023
14038
|
void (async () => {
|
|
14024
14039
|
try {
|
|
14025
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14040
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
14026
14041
|
await api.post("/host/heartbeat", {
|
|
14027
14042
|
host_id: hostId,
|
|
14028
14043
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor)
|
|
@@ -14072,7 +14087,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
14072
14087
|
}
|
|
14073
14088
|
try {
|
|
14074
14089
|
const hostId = await getHostId();
|
|
14075
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14090
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
14076
14091
|
await api.post("/host/heartbeat", {
|
|
14077
14092
|
host_id: hostId,
|
|
14078
14093
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor)
|
|
@@ -14525,7 +14540,7 @@ async function processClaudePairSessions(agents) {
|
|
|
14525
14540
|
killPairSession,
|
|
14526
14541
|
pairTmuxSession,
|
|
14527
14542
|
finalizeClaudePairOnboarding
|
|
14528
|
-
} = await import("../claude-pair-runtime-
|
|
14543
|
+
} = await import("../claude-pair-runtime-WWTKA7QC.js");
|
|
14529
14544
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
14530
14545
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
14531
14546
|
const killed = await killPairSession(pairTmuxSession(pairId));
|