@integrity-labs/agt-cli 0.28.729 → 0.28.730
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
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
success,
|
|
42
42
|
table,
|
|
43
43
|
warn
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-3V7HETFZ.js";
|
|
45
45
|
import {
|
|
46
46
|
getProjectDir,
|
|
47
47
|
isSessionResumeDisabled,
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.730" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6654,7 +6654,7 @@ function handleError(err) {
|
|
|
6654
6654
|
}
|
|
6655
6655
|
|
|
6656
6656
|
// src/bin/agt.ts
|
|
6657
|
-
var cliVersion2 = true ? "0.28.
|
|
6657
|
+
var cliVersion2 = true ? "0.28.730" : "dev";
|
|
6658
6658
|
var program = new Command();
|
|
6659
6659
|
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");
|
|
6660
6660
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6428,7 +6428,7 @@ function exchangeFailureKind(err) {
|
|
|
6428
6428
|
}
|
|
6429
6429
|
|
|
6430
6430
|
// src/lib/api-client.ts
|
|
6431
|
-
var agtCliVersion = true ? "0.28.
|
|
6431
|
+
var agtCliVersion = true ? "0.28.730" : "dev";
|
|
6432
6432
|
var lastConfigHash = null;
|
|
6433
6433
|
function setConfigHash(hash) {
|
|
6434
6434
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10474,4 +10474,4 @@ export {
|
|
|
10474
10474
|
managerInstallSystemUnitCommand,
|
|
10475
10475
|
managerUninstallSystemUnitCommand
|
|
10476
10476
|
};
|
|
10477
|
-
//# sourceMappingURL=chunk-
|
|
10477
|
+
//# sourceMappingURL=chunk-3V7HETFZ.js.map
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
safeWriteJsonAtomic,
|
|
58
58
|
setConfigHash,
|
|
59
59
|
tripClass
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-3V7HETFZ.js";
|
|
61
61
|
import {
|
|
62
62
|
getProjectDir as getProjectDir2,
|
|
63
63
|
getReadyTasks,
|
|
@@ -5568,6 +5568,22 @@ function createTickBoardFetcher(fetchBoard) {
|
|
|
5568
5568
|
};
|
|
5569
5569
|
}
|
|
5570
5570
|
|
|
5571
|
+
// src/lib/refresh-manifest-flags.ts
|
|
5572
|
+
var REFRESH_MANIFEST_FLAGS = {
|
|
5573
|
+
/** Knowledge as slug + hash instead of inline bodies. */
|
|
5574
|
+
knowledge_manifest: true,
|
|
5575
|
+
/** Global + shared ROOT skills as metadata + hash. */
|
|
5576
|
+
skills_manifest: true,
|
|
5577
|
+
/**
|
|
5578
|
+
* Integration CHILD skills as metadata + hash. Deliberately not folded into
|
|
5579
|
+
* `skills_manifest`: a manager that claimed the family but could not decode
|
|
5580
|
+
* this lane would read it as empty, and an empty integration-skill list is
|
|
5581
|
+
* what the orphan sweep treats as "every integration was uninstalled" — it
|
|
5582
|
+
* deletes the folders off disk. The flag has to name the exact capability.
|
|
5583
|
+
*/
|
|
5584
|
+
integration_skills_manifest: true
|
|
5585
|
+
};
|
|
5586
|
+
|
|
5571
5587
|
// src/lib/channel-hash-cache.ts
|
|
5572
5588
|
import { existsSync as existsSync8, readFileSync as readFileSync19, writeFileSync as writeFileSync10 } from "fs";
|
|
5573
5589
|
import { join as join25 } from "path";
|
|
@@ -12979,7 +12995,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12979
12995
|
var lastVersionCheckAt = 0;
|
|
12980
12996
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12981
12997
|
var lastResponsivenessProbeAt = 0;
|
|
12982
|
-
var agtCliVersion = true ? "0.28.
|
|
12998
|
+
var agtCliVersion = true ? "0.28.730" : "dev";
|
|
12983
12999
|
function resolveBrewPath(execFileSync3) {
|
|
12984
13000
|
try {
|
|
12985
13001
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15840,20 +15856,12 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
15840
15856
|
try {
|
|
15841
15857
|
refreshData = await api.post("/host/refresh", {
|
|
15842
15858
|
agent_id: agent.agent_id,
|
|
15843
|
-
// ENG-9585: ask for hashes instead of
|
|
15844
|
-
//
|
|
15845
|
-
//
|
|
15846
|
-
|
|
15847
|
-
//
|
|
15848
|
-
|
|
15849
|
-
// understands one and not the other must still be able to answer.
|
|
15850
|
-
skills_manifest: true,
|
|
15851
|
-
// ENG-9585: and the integration lane, a third flag for the same reason
|
|
15852
|
-
// one level sharper. A manager that sent `skills_manifest` but could not
|
|
15853
|
-
// decode THIS manifest would read the lane as empty and sweep every
|
|
15854
|
-
// integration skill folder off disk, so the flag has to name the exact
|
|
15855
|
-
// capability rather than the family.
|
|
15856
|
-
integration_skills_manifest: true
|
|
15859
|
+
// ENG-9585: ask for hashes instead of bodies on all three lanes. The
|
|
15860
|
+
// rationale for each flag, and for their staying three flags rather than
|
|
15861
|
+
// one, now lives with the constant — so that a new `/host/refresh` caller
|
|
15862
|
+
// inherits it instead of having to rediscover it. The manifest is
|
|
15863
|
+
// normalised back into `refreshData.knowledge` immediately below.
|
|
15864
|
+
...REFRESH_MANIFEST_FLAGS
|
|
15857
15865
|
});
|
|
15858
15866
|
if (refreshData.knowledge_manifest) {
|
|
15859
15867
|
const resolved = await resolveKnowledgeFromManifest({
|
|
@@ -17179,12 +17187,10 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
17179
17187
|
}
|
|
17180
17188
|
const freshData = await api.post("/host/refresh", {
|
|
17181
17189
|
agent_id: agent.agent_id,
|
|
17182
|
-
knowledge_manifest: true,
|
|
17183
17190
|
// Only `scheduled_tasks` is read here, so ask for the manifest shape on
|
|
17184
17191
|
// every lane — nothing in this branch consumes a skill body, and the
|
|
17185
17192
|
// skill lanes are the largest part of the payload being discarded.
|
|
17186
|
-
|
|
17187
|
-
integration_skills_manifest: true
|
|
17193
|
+
...REFRESH_MANIFEST_FLAGS
|
|
17188
17194
|
});
|
|
17189
17195
|
tasks = freshData.scheduled_tasks ?? tasks;
|
|
17190
17196
|
}
|
|
@@ -18945,6 +18951,17 @@ function restartReasonNeedsRender(reason) {
|
|
|
18945
18951
|
function restartReasonStampsTiming(reason) {
|
|
18946
18952
|
return reason === "integration-change";
|
|
18947
18953
|
}
|
|
18954
|
+
async function fetchSpawnRefreshData(agentId, codeName, lane) {
|
|
18955
|
+
try {
|
|
18956
|
+
return await api.post("/host/refresh", {
|
|
18957
|
+
agent_id: agentId,
|
|
18958
|
+
...REFRESH_MANIFEST_FLAGS
|
|
18959
|
+
});
|
|
18960
|
+
} catch (err) {
|
|
18961
|
+
log(`[${lane}] refresh failed for '${codeName}', leaving for slow poll: ${err.message}`);
|
|
18962
|
+
return null;
|
|
18963
|
+
}
|
|
18964
|
+
}
|
|
18948
18965
|
async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
18949
18966
|
const prev = state8.agents.find((a) => a.agentId === agentId);
|
|
18950
18967
|
const codeName = prev?.codeName;
|
|
@@ -18964,13 +18981,8 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
18964
18981
|
try {
|
|
18965
18982
|
log(`[restart-lane] Fast restart for '${codeName}' at ${requestedAt}`);
|
|
18966
18983
|
const hostId = await getHostId();
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
refreshData = await api.post("/host/refresh", { agent_id: agentId });
|
|
18970
|
-
} catch (err) {
|
|
18971
|
-
log(`[restart-lane] refresh failed for '${codeName}', leaving for slow poll: ${err.message}`);
|
|
18972
|
-
return;
|
|
18973
|
-
}
|
|
18984
|
+
const refreshData = await fetchSpawnRefreshData(agentId, codeName, "restart-lane");
|
|
18985
|
+
if (!refreshData) return;
|
|
18974
18986
|
const displayName = refreshData.agent?.display_name ?? codeName;
|
|
18975
18987
|
const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
18976
18988
|
if (restartTargetsOpencodeServe(framework)) {
|
|
@@ -19025,13 +19037,8 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
19025
19037
|
restartInFlight.add(agentId);
|
|
19026
19038
|
try {
|
|
19027
19039
|
if (isSessionHealthy(codeName)) return;
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
refreshData = await api.post("/host/refresh", { agent_id: agentId });
|
|
19031
|
-
} catch (err) {
|
|
19032
|
-
log(`[fast-mcp-respawn] refresh failed for '${codeName}', leaving for slow poll: ${err.message}`);
|
|
19033
|
-
return;
|
|
19034
|
-
}
|
|
19040
|
+
const refreshData = await fetchSpawnRefreshData(agentId, codeName, "fast-mcp-respawn");
|
|
19041
|
+
if (!refreshData) return;
|
|
19035
19042
|
const displayName = refreshData.agent?.display_name ?? codeName;
|
|
19036
19043
|
const result = await ensurePersistentSession(
|
|
19037
19044
|
{ agent_id: agentId, code_name: codeName, display_name: displayName },
|