@integrity-labs/agt-cli 0.28.1152 → 0.28.1153
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-ZC7SC63V.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5512,7 +5512,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5512
5512
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5513
5513
|
import chalk18 from "chalk";
|
|
5514
5514
|
import ora16 from "ora";
|
|
5515
|
-
var cliVersion = true ? "0.28.
|
|
5515
|
+
var cliVersion = true ? "0.28.1153" : "dev";
|
|
5516
5516
|
async function fetchLatestVersion() {
|
|
5517
5517
|
const host2 = getHost();
|
|
5518
5518
|
if (!host2) return null;
|
|
@@ -6772,7 +6772,7 @@ function handleError(err) {
|
|
|
6772
6772
|
}
|
|
6773
6773
|
|
|
6774
6774
|
// src/bin/agt.ts
|
|
6775
|
-
var cliVersion2 = true ? "0.28.
|
|
6775
|
+
var cliVersion2 = true ? "0.28.1153" : "dev";
|
|
6776
6776
|
var program = new Command();
|
|
6777
6777
|
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");
|
|
6778
6778
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -8078,7 +8078,7 @@ function exchangeFailureKind(err) {
|
|
|
8078
8078
|
}
|
|
8079
8079
|
|
|
8080
8080
|
// src/lib/api-client.ts
|
|
8081
|
-
var agtCliVersion = true ? "0.28.
|
|
8081
|
+
var agtCliVersion = true ? "0.28.1153" : "dev";
|
|
8082
8082
|
var lastConfigHash = null;
|
|
8083
8083
|
function setConfigHash(hash) {
|
|
8084
8084
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -13235,4 +13235,4 @@ export {
|
|
|
13235
13235
|
managerInstallSystemUnitCommand,
|
|
13236
13236
|
managerUninstallSystemUnitCommand
|
|
13237
13237
|
};
|
|
13238
|
-
//# sourceMappingURL=chunk-
|
|
13238
|
+
//# sourceMappingURL=chunk-ZC7SC63V.js.map
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
setConfigHash,
|
|
78
78
|
shellGuard,
|
|
79
79
|
tripClass
|
|
80
|
-
} from "../chunk-
|
|
80
|
+
} from "../chunk-ZC7SC63V.js";
|
|
81
81
|
import {
|
|
82
82
|
CLAUDE_CODE_SECURITY_FLOOR,
|
|
83
83
|
compareVersions
|
|
@@ -13674,7 +13674,6 @@ var client = null;
|
|
|
13674
13674
|
var chatChannel = null;
|
|
13675
13675
|
var driftChannel = null;
|
|
13676
13676
|
var assignChannel = null;
|
|
13677
|
-
var configChannel = null;
|
|
13678
13677
|
var kanbanChannel = null;
|
|
13679
13678
|
var integrationContextChannel = null;
|
|
13680
13679
|
var tokenRotationChannels = [];
|
|
@@ -13721,7 +13720,6 @@ function startRealtimeChat(config2) {
|
|
|
13721
13720
|
chatChannel = null;
|
|
13722
13721
|
driftChannel = null;
|
|
13723
13722
|
assignChannel = null;
|
|
13724
|
-
configChannel = null;
|
|
13725
13723
|
kanbanChannel = null;
|
|
13726
13724
|
integrationContextChannel = null;
|
|
13727
13725
|
tokenRotationChannels = [];
|
|
@@ -13809,34 +13807,6 @@ function startRealtimeAssignments(config2) {
|
|
|
13809
13807
|
});
|
|
13810
13808
|
log2(`[realtime] Subscribing to host_agents for host ${hostId}`);
|
|
13811
13809
|
}
|
|
13812
|
-
function startRealtimeConfig(config2) {
|
|
13813
|
-
const { agentIds, onConfigChange, log: log2 } = config2;
|
|
13814
|
-
if (agentIds.length === 0) return;
|
|
13815
|
-
const sb = ensureClient(config2);
|
|
13816
|
-
const filterStr = agentIds.length === 1 ? `agent_id=eq.${agentIds[0]}` : `agent_id=in.(${agentIds.join(",")})`;
|
|
13817
|
-
const lastKnown = /* @__PURE__ */ new Map();
|
|
13818
|
-
configChannel = sb.channel("config-realtime").on("postgres_changes", {
|
|
13819
|
-
event: "UPDATE",
|
|
13820
|
-
schema: "public",
|
|
13821
|
-
table: "agents",
|
|
13822
|
-
filter: filterStr
|
|
13823
|
-
}, (payload) => {
|
|
13824
|
-
const agent = payload.new;
|
|
13825
|
-
const fingerprint3 = `${agent.status}|${agent.framework}|${agent.session_mode}|${agent.primary_model}`;
|
|
13826
|
-
const prev = lastKnown.get(agent.agent_id);
|
|
13827
|
-
if (prev === fingerprint3) return;
|
|
13828
|
-
lastKnown.set(agent.agent_id, fingerprint3);
|
|
13829
|
-
log2(`[realtime] Agent config changed: ${agent.code_name} (status=${agent.status})`);
|
|
13830
|
-
onConfigChange(agent);
|
|
13831
|
-
}).subscribe((status) => {
|
|
13832
|
-
if (status === "SUBSCRIBED") {
|
|
13833
|
-
log2("[realtime] Config channel connected");
|
|
13834
|
-
} else if (status === "CLOSED" || status === "CHANNEL_ERROR") {
|
|
13835
|
-
log2(`[realtime] Config channel: ${status}`);
|
|
13836
|
-
}
|
|
13837
|
-
});
|
|
13838
|
-
log2(`[realtime] Subscribing to agents table for ${agentIds.length} agent(s)`);
|
|
13839
|
-
}
|
|
13840
13810
|
var METRICS_WINDOW = 200;
|
|
13841
13811
|
var kanbanMetrics = {
|
|
13842
13812
|
delivered: 0,
|
|
@@ -14056,13 +14026,6 @@ function stopRealtimeChat() {
|
|
|
14056
14026
|
}
|
|
14057
14027
|
assignChannel = null;
|
|
14058
14028
|
}
|
|
14059
|
-
if (configChannel) {
|
|
14060
|
-
try {
|
|
14061
|
-
configChannel.unsubscribe();
|
|
14062
|
-
} catch {
|
|
14063
|
-
}
|
|
14064
|
-
configChannel = null;
|
|
14065
|
-
}
|
|
14066
14029
|
if (kanbanChannel) {
|
|
14067
14030
|
try {
|
|
14068
14031
|
kanbanChannel.unsubscribe();
|
|
@@ -15799,7 +15762,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
15799
15762
|
var lastVersionCheckAt = 0;
|
|
15800
15763
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
15801
15764
|
var lastResponsivenessProbeAt = 0;
|
|
15802
|
-
var agtCliVersion = true ? "0.28.
|
|
15765
|
+
var agtCliVersion = true ? "0.28.1153" : "dev";
|
|
15803
15766
|
function resolveBrewPath(execFileSync3) {
|
|
15804
15767
|
try {
|
|
15805
15768
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -19212,7 +19175,6 @@ async function pollCycleInner() {
|
|
|
19212
19175
|
ensureRealtimeStarted(agentStates);
|
|
19213
19176
|
ensureRealtimeDriftStarted(agentStates);
|
|
19214
19177
|
ensureRealtimeAssignStarted(agentStates);
|
|
19215
|
-
ensureRealtimeConfigStarted(agentStates);
|
|
19216
19178
|
ensureRealtimeKanbanStarted(agentStates);
|
|
19217
19179
|
ensureRealtimeIntegrationContextStarted(agentStates);
|
|
19218
19180
|
try {
|
|
@@ -23052,7 +23014,6 @@ function holdRealtimeRebindInFlight(failures, agentIds, now, graceMs = REALTIME_
|
|
|
23052
23014
|
}
|
|
23053
23015
|
}
|
|
23054
23016
|
var realtimeAssignStarted = false;
|
|
23055
|
-
var realtimeConfigStarted = false;
|
|
23056
23017
|
var realtimeSubscribedAgentIds = /* @__PURE__ */ new Set();
|
|
23057
23018
|
function healRealtimeSocketDivergence() {
|
|
23058
23019
|
if (!shouldForcePollFallback(isRealtimeConnected(), isRealtimeSocketConnected())) return false;
|
|
@@ -23061,7 +23022,6 @@ function healRealtimeSocketDivergence() {
|
|
|
23061
23022
|
realtimeStarted = false;
|
|
23062
23023
|
realtimeDriftStarted = false;
|
|
23063
23024
|
realtimeAssignStarted = false;
|
|
23064
|
-
realtimeConfigStarted = false;
|
|
23065
23025
|
realtimeKanbanStarted = false;
|
|
23066
23026
|
subscribedIntegrationContextAgentIds = /* @__PURE__ */ new Set();
|
|
23067
23027
|
return true;
|
|
@@ -23079,7 +23039,6 @@ function ensureRealtimeStarted(agentStates) {
|
|
|
23079
23039
|
realtimeStarted = false;
|
|
23080
23040
|
realtimeDriftStarted = false;
|
|
23081
23041
|
realtimeAssignStarted = false;
|
|
23082
|
-
realtimeConfigStarted = false;
|
|
23083
23042
|
realtimeKanbanStarted = false;
|
|
23084
23043
|
subscribedIntegrationContextAgentIds = /* @__PURE__ */ new Set();
|
|
23085
23044
|
}
|
|
@@ -23119,7 +23078,6 @@ function ensureRealtimeStarted(agentStates) {
|
|
|
23119
23078
|
realtimeStarted = false;
|
|
23120
23079
|
realtimeDriftStarted = false;
|
|
23121
23080
|
realtimeAssignStarted = false;
|
|
23122
|
-
realtimeConfigStarted = false;
|
|
23123
23081
|
realtimeKanbanStarted = false;
|
|
23124
23082
|
subscribedIntegrationContextAgentIds = /* @__PURE__ */ new Set();
|
|
23125
23083
|
}
|
|
@@ -23360,30 +23318,6 @@ function ensureRealtimeAssignStarted(agentStates) {
|
|
|
23360
23318
|
log(`[realtime] Assignment subscription failed: ${err.message}`);
|
|
23361
23319
|
});
|
|
23362
23320
|
}
|
|
23363
|
-
function ensureRealtimeConfigStarted(agentStates) {
|
|
23364
|
-
if (realtimeConfigStarted) return;
|
|
23365
|
-
const activeAgentIds = agentStates.filter((a) => a.status === "active").map((a) => a.agentId);
|
|
23366
|
-
if (activeAgentIds.length === 0) return;
|
|
23367
|
-
const apiKey = process.env["AGT_API_KEY"];
|
|
23368
|
-
if (!apiKey) return;
|
|
23369
|
-
void exchangeApiKey(apiKey).then((exchange) => {
|
|
23370
|
-
if (!exchange.supabaseUrl || !exchange.supabaseAnonKey) return;
|
|
23371
|
-
startRealtimeConfig({
|
|
23372
|
-
supabaseUrl: exchange.supabaseUrl,
|
|
23373
|
-
supabaseAnonKey: exchange.supabaseAnonKey,
|
|
23374
|
-
token: exchange.token,
|
|
23375
|
-
agentIds: activeAgentIds,
|
|
23376
|
-
onConfigChange: (agent) => {
|
|
23377
|
-
agentState.knownStatuses.delete(agent.agent_id);
|
|
23378
|
-
},
|
|
23379
|
-
log
|
|
23380
|
-
});
|
|
23381
|
-
realtimeConfigStarted = true;
|
|
23382
|
-
log(`[realtime] Config subscription started for ${activeAgentIds.length} agent(s)`);
|
|
23383
|
-
}).catch((err) => {
|
|
23384
|
-
log(`[realtime] Config subscription failed: ${err.message}`);
|
|
23385
|
-
});
|
|
23386
|
-
}
|
|
23387
23321
|
function ensureRealtimeKanbanStarted(agentStates) {
|
|
23388
23322
|
if (realtimeKanbanStarted) return;
|
|
23389
23323
|
const activeAgentIds = agentStates.filter((a) => a.status === "active").map((a) => a.agentId);
|