@integrity-labs/agt-cli 0.27.113 → 0.27.114
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
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
success,
|
|
29
29
|
table,
|
|
30
30
|
warn
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-7KIMZAMG.js";
|
|
32
32
|
import {
|
|
33
33
|
CHANNEL_REGISTRY,
|
|
34
34
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4934,7 +4934,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4934
4934
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4935
4935
|
import chalk18 from "chalk";
|
|
4936
4936
|
import ora16 from "ora";
|
|
4937
|
-
var cliVersion = true ? "0.27.
|
|
4937
|
+
var cliVersion = true ? "0.27.114" : "dev";
|
|
4938
4938
|
async function fetchLatestVersion() {
|
|
4939
4939
|
const host2 = getHost();
|
|
4940
4940
|
if (!host2) return null;
|
|
@@ -5857,7 +5857,7 @@ function handleError(err) {
|
|
|
5857
5857
|
}
|
|
5858
5858
|
|
|
5859
5859
|
// src/bin/agt.ts
|
|
5860
|
-
var cliVersion2 = true ? "0.27.
|
|
5860
|
+
var cliVersion2 = true ? "0.27.114" : "dev";
|
|
5861
5861
|
var program = new Command();
|
|
5862
5862
|
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");
|
|
5863
5863
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
provisionStopHook,
|
|
18
18
|
requireHost,
|
|
19
19
|
safeWriteJsonAtomic
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-7KIMZAMG.js";
|
|
21
21
|
import {
|
|
22
22
|
getProjectDir as getProjectDir2,
|
|
23
23
|
getReadyTasks,
|
|
@@ -3789,6 +3789,7 @@ var autoResumeInFlight = /* @__PURE__ */ new Set();
|
|
|
3789
3789
|
var AUTO_RESUME_SELF_WINDOW_MS = 12e4;
|
|
3790
3790
|
var autoResumeLoggedSkips = /* @__PURE__ */ new Map();
|
|
3791
3791
|
var autoResumeStandDowns = /* @__PURE__ */ new Set();
|
|
3792
|
+
var killPausedCodeNames = /* @__PURE__ */ new Set();
|
|
3792
3793
|
function maybeAutoResume(agent) {
|
|
3793
3794
|
const codeName = agent.code_name;
|
|
3794
3795
|
if (autoResumeInFlight.has(codeName)) return;
|
|
@@ -4173,7 +4174,7 @@ var cachedMaintenanceWindow = null;
|
|
|
4173
4174
|
var lastVersionCheckAt = 0;
|
|
4174
4175
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4175
4176
|
var lastResponsivenessProbeAt = 0;
|
|
4176
|
-
var agtCliVersion = true ? "0.27.
|
|
4177
|
+
var agtCliVersion = true ? "0.27.114" : "dev";
|
|
4177
4178
|
function resolveBrewPath(execFileSync4) {
|
|
4178
4179
|
try {
|
|
4179
4180
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -5818,6 +5819,16 @@ async function processAgent(agent, agentStates) {
|
|
|
5818
5819
|
if (previousKnownStatus !== agent.status) {
|
|
5819
5820
|
log(`Agent '${agent.code_name}' is ${agent.status}, skipping provisioning`);
|
|
5820
5821
|
}
|
|
5822
|
+
if (agent.kill_switch) {
|
|
5823
|
+
killPausedCodeNames.add(agent.code_name);
|
|
5824
|
+
if (previousKnownStatus !== agent.status) {
|
|
5825
|
+
log(
|
|
5826
|
+
`[kill-switch] '${agent.code_name}' halted by ${agent.kill_switch.scope ?? "unknown"} kill switch` + (agent.kill_switch.reason ? ` (reason: ${agent.kill_switch.reason})` : "") + ` source=${agent.kill_switch.source ?? "unknown"}`
|
|
5827
|
+
);
|
|
5828
|
+
}
|
|
5829
|
+
} else if (killPausedCodeNames.delete(agent.code_name)) {
|
|
5830
|
+
log(`[kill-switch] '${agent.code_name}' kill switch cleared while still ${agent.status} (no resume \u2014 paused for another reason)`);
|
|
5831
|
+
}
|
|
5821
5832
|
await stopGatewayIfRunning(agent.code_name, adapter);
|
|
5822
5833
|
stopPersistentSessionAndForgetMcpBaseline(agent.code_name);
|
|
5823
5834
|
try {
|
|
@@ -5826,7 +5837,7 @@ async function processAgent(agent, agentStates) {
|
|
|
5826
5837
|
log(`Killed tmux session for paused agent '${agent.code_name}'`);
|
|
5827
5838
|
} catch {
|
|
5828
5839
|
}
|
|
5829
|
-
if (agent.status === "paused") {
|
|
5840
|
+
if (agent.status === "paused" && !agent.kill_switch) {
|
|
5830
5841
|
maybeAutoResume(agent);
|
|
5831
5842
|
}
|
|
5832
5843
|
agentStates.push({
|
|
@@ -5932,6 +5943,16 @@ async function processAgent(agent, agentStates) {
|
|
|
5932
5943
|
log(`[auto-resume] Cleared auto-resume marker for '${agent.code_name}' on operator resume \u2014 credit re-armed (ENG-6088)`);
|
|
5933
5944
|
}
|
|
5934
5945
|
}
|
|
5946
|
+
if (previousStatus === "paused" && agent.status === "active" && killPausedCodeNames.delete(agent.code_name)) {
|
|
5947
|
+
log(`[kill-switch] '${agent.code_name}' kill switch cleared \u2014 resuming session`);
|
|
5948
|
+
void injectMessage(
|
|
5949
|
+
agent.code_name,
|
|
5950
|
+
"system",
|
|
5951
|
+
"The kill switch that halted you has been cleared. Your session is resuming.",
|
|
5952
|
+
{ task_name: "kill-switch-resume" },
|
|
5953
|
+
log
|
|
5954
|
+
).catch(() => false);
|
|
5955
|
+
}
|
|
5935
5956
|
let channelCacheMutated = false;
|
|
5936
5957
|
for (const key of agentState.knownChannelConfigHashes.keys()) {
|
|
5937
5958
|
if (key.startsWith(`${agent.agent_id}:`)) {
|