@integrity-labs/agt-cli 0.28.606 → 0.28.607
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
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-DYADWFBV.js";
|
|
44
44
|
import {
|
|
45
45
|
readDirectChatSessionState
|
|
46
46
|
} from "../chunk-DESCRVVM.js";
|
|
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4909
4909
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4910
4910
|
import chalk18 from "chalk";
|
|
4911
4911
|
import ora16 from "ora";
|
|
4912
|
-
var cliVersion = true ? "0.28.
|
|
4912
|
+
var cliVersion = true ? "0.28.607" : "dev";
|
|
4913
4913
|
async function fetchLatestVersion() {
|
|
4914
4914
|
const host2 = getHost();
|
|
4915
4915
|
if (!host2) return null;
|
|
@@ -6089,7 +6089,7 @@ function handleError(err) {
|
|
|
6089
6089
|
}
|
|
6090
6090
|
|
|
6091
6091
|
// src/bin/agt.ts
|
|
6092
|
-
var cliVersion2 = true ? "0.28.
|
|
6092
|
+
var cliVersion2 = true ? "0.28.607" : "dev";
|
|
6093
6093
|
var program = new Command();
|
|
6094
6094
|
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");
|
|
6095
6095
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6030,7 +6030,7 @@ function exchangeFailureKind(err) {
|
|
|
6030
6030
|
}
|
|
6031
6031
|
|
|
6032
6032
|
// src/lib/api-client.ts
|
|
6033
|
-
var agtCliVersion = true ? "0.28.
|
|
6033
|
+
var agtCliVersion = true ? "0.28.607" : "dev";
|
|
6034
6034
|
var lastConfigHash = null;
|
|
6035
6035
|
function setConfigHash(hash) {
|
|
6036
6036
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -9505,4 +9505,4 @@ export {
|
|
|
9505
9505
|
managerInstallSystemUnitCommand,
|
|
9506
9506
|
managerUninstallSystemUnitCommand
|
|
9507
9507
|
};
|
|
9508
|
-
//# sourceMappingURL=chunk-
|
|
9508
|
+
//# sourceMappingURL=chunk-DYADWFBV.js.map
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
safeWriteJsonAtomic,
|
|
54
54
|
setConfigHash,
|
|
55
55
|
tripClass
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-DYADWFBV.js";
|
|
57
57
|
import {
|
|
58
58
|
getProjectDir as getProjectDir2,
|
|
59
59
|
getReadyTasks,
|
|
@@ -11880,7 +11880,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
11880
11880
|
var lastVersionCheckAt = 0;
|
|
11881
11881
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
11882
11882
|
var lastResponsivenessProbeAt = 0;
|
|
11883
|
-
var agtCliVersion = true ? "0.28.
|
|
11883
|
+
var agtCliVersion = true ? "0.28.607" : "dev";
|
|
11884
11884
|
function resolveBrewPath(execFileSync3) {
|
|
11885
11885
|
try {
|
|
11886
11886
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -13823,6 +13823,7 @@ async function pollCycle() {
|
|
|
13823
13823
|
const agentStates = [];
|
|
13824
13824
|
const fastRespawn = hostFlagStore().getBoolean("fast-mcp-restart-respawn");
|
|
13825
13825
|
const processOrder = fastRespawn ? reorderRestartedFirst(agents, new Set(restartAcks.keys())) : agents;
|
|
13826
|
+
const managedToolkits = createManagedToolkitReader(agents.map((a) => a.agent_id));
|
|
13826
13827
|
for (const agent of processOrder) {
|
|
13827
13828
|
if (restartInFlight.has(agent.agent_id)) {
|
|
13828
13829
|
const existing = state7.agents.find((a) => a.agentId === agent.agent_id);
|
|
@@ -13832,7 +13833,7 @@ async function pollCycle() {
|
|
|
13832
13833
|
}
|
|
13833
13834
|
}
|
|
13834
13835
|
try {
|
|
13835
|
-
await processAgent(agent, agentStates);
|
|
13836
|
+
await processAgent(agent, agentStates, managedToolkits);
|
|
13836
13837
|
} catch (err) {
|
|
13837
13838
|
log(`Error processing agent '${agent.code_name}': ${err.message}`);
|
|
13838
13839
|
const existing = state7.agents.find((a) => a.agentId === agent.agent_id);
|
|
@@ -14069,7 +14070,45 @@ async function getOrCacheRegisteredAgents(adapter, profile) {
|
|
|
14069
14070
|
}
|
|
14070
14071
|
return cached;
|
|
14071
14072
|
}
|
|
14072
|
-
async function
|
|
14073
|
+
async function fetchManagedToolkits(agentIds) {
|
|
14074
|
+
const data = await api.post(
|
|
14075
|
+
"/host/managed-toolkits",
|
|
14076
|
+
{ agent_ids: [...agentIds] }
|
|
14077
|
+
);
|
|
14078
|
+
return data.toolkits ?? [];
|
|
14079
|
+
}
|
|
14080
|
+
function createManagedToolkitReader(agentIds, fetchToolkits = fetchManagedToolkits) {
|
|
14081
|
+
const requested = [...new Set(agentIds)];
|
|
14082
|
+
let batch = null;
|
|
14083
|
+
const loadBatch = () => {
|
|
14084
|
+
batch ??= (async () => {
|
|
14085
|
+
if (requested.length === 0) return /* @__PURE__ */ new Map();
|
|
14086
|
+
try {
|
|
14087
|
+
const toolkits = await fetchToolkits(requested);
|
|
14088
|
+
const byAgent = new Map(
|
|
14089
|
+
requested.map((id) => [id, []])
|
|
14090
|
+
);
|
|
14091
|
+
for (const tk of toolkits) byAgent.get(tk.agent_id)?.push(tk);
|
|
14092
|
+
return byAgent;
|
|
14093
|
+
} catch (err) {
|
|
14094
|
+
log(
|
|
14095
|
+
`[managed-toolkit] batch fetch for ${requested.length} agent(s) failed: ${err.message} \u2014 falling back to per-agent fetches this cycle (ENG-9057)`
|
|
14096
|
+
);
|
|
14097
|
+
return null;
|
|
14098
|
+
}
|
|
14099
|
+
})();
|
|
14100
|
+
return batch;
|
|
14101
|
+
};
|
|
14102
|
+
return {
|
|
14103
|
+
async forAgent(agentId) {
|
|
14104
|
+
const byAgent = await loadBatch();
|
|
14105
|
+
const fromBatch = byAgent?.get(agentId);
|
|
14106
|
+
if (fromBatch) return fromBatch;
|
|
14107
|
+
return (await fetchToolkits([agentId])).filter((tk) => tk.agent_id === agentId);
|
|
14108
|
+
}
|
|
14109
|
+
};
|
|
14110
|
+
}
|
|
14111
|
+
async function processAgent(agent, agentStates, managedToolkits) {
|
|
14073
14112
|
if (!config) return;
|
|
14074
14113
|
const renderIntegrationsSection = shouldRenderIntegrationsSection();
|
|
14075
14114
|
syncAccountEnforcementMarker(
|
|
@@ -15353,8 +15392,7 @@ async function processAgent(agent, agentStates) {
|
|
|
15353
15392
|
const fwForMcp = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
15354
15393
|
if (frameworkAdapter.writeMcpServer) {
|
|
15355
15394
|
try {
|
|
15356
|
-
const
|
|
15357
|
-
const agentToolkits = (toolkitData.toolkits ?? []).filter((tk) => tk.agent_id === agent.agent_id);
|
|
15395
|
+
const agentToolkits = await managedToolkits.forAgent(agent.agent_id);
|
|
15358
15396
|
const expectedServerIds = /* @__PURE__ */ new Set();
|
|
15359
15397
|
const desiredEntries = [];
|
|
15360
15398
|
for (const tk of agentToolkits) {
|
|
@@ -18679,6 +18717,7 @@ export {
|
|
|
18679
18717
|
claudeCodeUpgradeMarkerPath,
|
|
18680
18718
|
claudeCodeUpgradeThrottled,
|
|
18681
18719
|
claudeManagedSettingsPath,
|
|
18720
|
+
createManagedToolkitReader,
|
|
18682
18721
|
dashboardRestartBreakerReason,
|
|
18683
18722
|
decideDayRolloverAction,
|
|
18684
18723
|
ensureClaudeManagedSettings,
|