@integrity-labs/agt-cli 0.28.706 → 0.28.707
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-5U45RQEM.js";
|
|
44
44
|
import {
|
|
45
45
|
readDirectChatSessionState
|
|
46
46
|
} from "../chunk-326G325O.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.707" : "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.707" : "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) => {
|
|
@@ -6396,7 +6396,7 @@ function exchangeFailureKind(err) {
|
|
|
6396
6396
|
}
|
|
6397
6397
|
|
|
6398
6398
|
// src/lib/api-client.ts
|
|
6399
|
-
var agtCliVersion = true ? "0.28.
|
|
6399
|
+
var agtCliVersion = true ? "0.28.707" : "dev";
|
|
6400
6400
|
var lastConfigHash = null;
|
|
6401
6401
|
function setConfigHash(hash) {
|
|
6402
6402
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10137,4 +10137,4 @@ export {
|
|
|
10137
10137
|
managerInstallSystemUnitCommand,
|
|
10138
10138
|
managerUninstallSystemUnitCommand
|
|
10139
10139
|
};
|
|
10140
|
-
//# sourceMappingURL=chunk-
|
|
10140
|
+
//# sourceMappingURL=chunk-5U45RQEM.js.map
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
safeWriteJsonAtomic,
|
|
55
55
|
setConfigHash,
|
|
56
56
|
tripClass
|
|
57
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-5U45RQEM.js";
|
|
58
58
|
import {
|
|
59
59
|
getProjectDir as getProjectDir2,
|
|
60
60
|
getReadyTasks,
|
|
@@ -12705,7 +12705,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12705
12705
|
var lastVersionCheckAt = 0;
|
|
12706
12706
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12707
12707
|
var lastResponsivenessProbeAt = 0;
|
|
12708
|
-
var agtCliVersion = true ? "0.28.
|
|
12708
|
+
var agtCliVersion = true ? "0.28.707" : "dev";
|
|
12709
12709
|
function resolveBrewPath(execFileSync3) {
|
|
12710
12710
|
try {
|
|
12711
12711
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -13872,6 +13872,7 @@ var channelWriteFailureCounts = /* @__PURE__ */ new Map();
|
|
|
13872
13872
|
var CHANNEL_WRITE_FAILURE_ESCALATE_EVERY = 90;
|
|
13873
13873
|
var channelSyncFailures = /* @__PURE__ */ new Map();
|
|
13874
13874
|
var channelSyncAttemptedSets = /* @__PURE__ */ new Map();
|
|
13875
|
+
var channelCredentialVerdicts = /* @__PURE__ */ new Map();
|
|
13875
13876
|
function sameChannelSet(a, b) {
|
|
13876
13877
|
if (a === void 0) return false;
|
|
13877
13878
|
if (a.size !== b.size) return false;
|
|
@@ -13881,6 +13882,7 @@ function sameChannelSet(a, b) {
|
|
|
13881
13882
|
function forgetChannelSyncState(agentId) {
|
|
13882
13883
|
channelSyncFailures.delete(agentId);
|
|
13883
13884
|
channelSyncAttemptedSets.delete(agentId);
|
|
13885
|
+
channelCredentialVerdicts.delete(agentId);
|
|
13884
13886
|
}
|
|
13885
13887
|
var CHANNEL_SYNC_FREE_ATTEMPTS = 3;
|
|
13886
13888
|
var CHANNEL_SYNC_MAX_BACKOFF_MS = 5 * 6e4;
|
|
@@ -13924,6 +13926,26 @@ function stuckChannelSyncs(failures, now, thresholdMs = CHANNEL_SYNC_STUCK_AFTER
|
|
|
13924
13926
|
out.sort((a, b) => b.stuck_for_seconds - a.stuck_for_seconds);
|
|
13925
13927
|
return out;
|
|
13926
13928
|
}
|
|
13929
|
+
function verifiedChannelCredentials(verdicts) {
|
|
13930
|
+
const out = [];
|
|
13931
|
+
for (const [agentId, channels] of verdicts) {
|
|
13932
|
+
for (const [channelId, verdict] of channels) {
|
|
13933
|
+
out.push({
|
|
13934
|
+
agent_id: agentId,
|
|
13935
|
+
channel_id: channelId,
|
|
13936
|
+
verified: verdict.verified,
|
|
13937
|
+
// Omitted rather than sent as null when converged: a reason only means
|
|
13938
|
+
// anything alongside a failure, and a stale one travelling with
|
|
13939
|
+
// `verified: true` reads as a warning about a healthy channel.
|
|
13940
|
+
...verdict.verified || !verdict.reason ? {} : { reason: verdict.reason }
|
|
13941
|
+
});
|
|
13942
|
+
}
|
|
13943
|
+
}
|
|
13944
|
+
out.sort(
|
|
13945
|
+
(a, b) => a.agent_id === b.agent_id ? a.channel_id.localeCompare(b.channel_id) : a.agent_id.localeCompare(b.agent_id)
|
|
13946
|
+
);
|
|
13947
|
+
return out;
|
|
13948
|
+
}
|
|
13927
13949
|
var persistedDeliveryBaseline = createDeliveryBaselineMaps();
|
|
13928
13950
|
function loadSenderPolicyBaseline2() {
|
|
13929
13951
|
loadSenderPolicyBaseline(persistedDeliveryBaseline, channelHashCacheDir(), log);
|
|
@@ -14415,6 +14437,23 @@ async function pollCycleInner() {
|
|
|
14415
14437
|
// close a resolved alert on the edge. Omitting it when empty would make
|
|
14416
14438
|
// "recovered" and "this CLI is too old to report" the same wire value.
|
|
14417
14439
|
channel_sync_stuck: stuckChannelSyncs(channelSyncFailures, Date.now()),
|
|
14440
|
+
// ENG-9517: the POSITIVE direction of the field above — the current
|
|
14441
|
+
// per-channel on-disk credential verdict. Without it the control plane
|
|
14442
|
+
// could only ever learn that a channel was broken, and only after ten
|
|
14443
|
+
// minutes; it had no way to learn that one was working, so "installed"
|
|
14444
|
+
// and "never reached the host" were the same row.
|
|
14445
|
+
//
|
|
14446
|
+
// SAME absent-vs-empty contract as its neighbours, and it matters more
|
|
14447
|
+
// here because this field drives a UI completion state: an older CLI
|
|
14448
|
+
// omits it and the consumer must change nothing, while `[]` is an
|
|
14449
|
+
// affirmative "this manager checked and has no channels to report".
|
|
14450
|
+
// Collapsing the two would let a stale CLI read as an all-clear.
|
|
14451
|
+
//
|
|
14452
|
+
// Note this is NOT the complement of `channel_sync_stuck`. A channel
|
|
14453
|
+
// can be absent from both — not yet attempted, deferred by the backoff,
|
|
14454
|
+
// or on an adapter that cannot probe — and that third state has to stay
|
|
14455
|
+
// distinguishable from success.
|
|
14456
|
+
channel_credential_status: verifiedChannelCredentials(channelCredentialVerdicts),
|
|
14418
14457
|
// ENG-9265: agents whose realtime token-rotation subscription has been
|
|
14419
14458
|
// failing to bind for longer than the stuck threshold. Same contract as
|
|
14420
14459
|
// the field above — ALWAYS sent, including as an empty array, because
|
|
@@ -16042,6 +16081,29 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
16042
16081
|
}
|
|
16043
16082
|
}
|
|
16044
16083
|
const channelConfigConvergedThisTick = channelConfigConverged && !channelSyncDeferred;
|
|
16084
|
+
if (agent.status === "active" && !channelSyncDeferred && frameworkAdapter.hasChannelCredentials) {
|
|
16085
|
+
const verdicts = /* @__PURE__ */ new Map();
|
|
16086
|
+
for (const channelId of currentChannelIds) {
|
|
16087
|
+
if (quarantinedChannels.has(channelId)) continue;
|
|
16088
|
+
let onDisk = false;
|
|
16089
|
+
try {
|
|
16090
|
+
onDisk = frameworkAdapter.hasChannelCredentials(agent.code_name, channelId);
|
|
16091
|
+
} catch (err) {
|
|
16092
|
+
onDisk = false;
|
|
16093
|
+
log(
|
|
16094
|
+
`[channels] credential verification threw for '${agent.code_name}/${channelId}': ${err.message} \u2014 reporting as unverified (ENG-9517)`
|
|
16095
|
+
);
|
|
16096
|
+
}
|
|
16097
|
+
verdicts.set(channelId, {
|
|
16098
|
+
verified: onDisk,
|
|
16099
|
+
...onDisk ? {} : { reason: channelConfigFailureReason || "credential not present on disk" }
|
|
16100
|
+
});
|
|
16101
|
+
}
|
|
16102
|
+
if (verdicts.size > 0) channelCredentialVerdicts.set(agent.agent_id, verdicts);
|
|
16103
|
+
else channelCredentialVerdicts.delete(agent.agent_id);
|
|
16104
|
+
} else {
|
|
16105
|
+
channelCredentialVerdicts.delete(agent.agent_id);
|
|
16106
|
+
}
|
|
16045
16107
|
const restartDecision = channelConfigConvergedThisTick ? decideChannelRestart({
|
|
16046
16108
|
previousChannelIds,
|
|
16047
16109
|
currentChannelIds,
|
|
@@ -20446,6 +20508,7 @@ export {
|
|
|
20446
20508
|
stopManager,
|
|
20447
20509
|
stuckChannelSyncs,
|
|
20448
20510
|
stuckRealtimeRebinds,
|
|
20449
|
-
supersededRuntimeImageIds
|
|
20511
|
+
supersededRuntimeImageIds,
|
|
20512
|
+
verifiedChannelCredentials
|
|
20450
20513
|
};
|
|
20451
20514
|
//# sourceMappingURL=manager-worker.js.map
|