@integrity-labs/agt-cli 0.27.96 → 0.27.97
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-6UQ6RPGV.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.97" : "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.97" : "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) => {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
provisionStopHook,
|
|
17
17
|
requireHost,
|
|
18
18
|
safeWriteJsonAtomic
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-6UQ6RPGV.js";
|
|
20
20
|
import {
|
|
21
21
|
getProjectDir as getProjectDir2,
|
|
22
22
|
getReadyTasks,
|
|
@@ -3996,7 +3996,7 @@ var cachedMaintenanceWindow = null;
|
|
|
3996
3996
|
var lastVersionCheckAt = 0;
|
|
3997
3997
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
3998
3998
|
var lastResponsivenessProbeAt = 0;
|
|
3999
|
-
var agtCliVersion = true ? "0.27.
|
|
3999
|
+
var agtCliVersion = true ? "0.27.97" : "dev";
|
|
4000
4000
|
function resolveBrewPath(execFileSync4) {
|
|
4001
4001
|
try {
|
|
4002
4002
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15264,6 +15264,26 @@ function createSingleTailSlot() {
|
|
|
15264
15264
|
};
|
|
15265
15265
|
}
|
|
15266
15266
|
|
|
15267
|
+
// src/telegram-command-registry.ts
|
|
15268
|
+
var HELP = {
|
|
15269
|
+
command: "help",
|
|
15270
|
+
description: "Show available commands"
|
|
15271
|
+
};
|
|
15272
|
+
var RESTART = {
|
|
15273
|
+
command: "restart",
|
|
15274
|
+
description: "Restart this agent"
|
|
15275
|
+
};
|
|
15276
|
+
var INVESTIGATE = {
|
|
15277
|
+
command: "investigate",
|
|
15278
|
+
description: "Live tail of this agent's terminal pane (operators only)"
|
|
15279
|
+
};
|
|
15280
|
+
function buildCommandRegistrations() {
|
|
15281
|
+
return [
|
|
15282
|
+
{ scope: { type: "default" }, commands: [HELP, RESTART] },
|
|
15283
|
+
{ scope: { type: "all_private_chats" }, commands: [HELP, RESTART, INVESTIGATE] }
|
|
15284
|
+
];
|
|
15285
|
+
}
|
|
15286
|
+
|
|
15267
15287
|
// src/pane-tail.ts
|
|
15268
15288
|
import { execFile } from "child_process";
|
|
15269
15289
|
import { promisify } from "util";
|
|
@@ -17992,6 +18012,24 @@ process.stderr.write(
|
|
|
17992
18012
|
`telegram-channel(${AGENT_CODE_NAME}): started, long-polling getUpdates
|
|
17993
18013
|
`
|
|
17994
18014
|
);
|
|
18015
|
+
void (async () => {
|
|
18016
|
+
for (const registration of buildCommandRegistrations()) {
|
|
18017
|
+
try {
|
|
18018
|
+
const resp = await telegramApiCall("setMyCommands", registration, 1e4);
|
|
18019
|
+
if (!resp.ok) {
|
|
18020
|
+
process.stderr.write(
|
|
18021
|
+
`telegram-channel(${AGENT_CODE_NAME}): setMyCommands(${registration.scope.type}) rejected: ${resp.description ?? "unknown"}
|
|
18022
|
+
`
|
|
18023
|
+
);
|
|
18024
|
+
}
|
|
18025
|
+
} catch (err) {
|
|
18026
|
+
process.stderr.write(
|
|
18027
|
+
`telegram-channel(${AGENT_CODE_NAME}): setMyCommands(${registration.scope.type}) failed: ${redactAugmentedPaths(err.message)}
|
|
18028
|
+
`
|
|
18029
|
+
);
|
|
18030
|
+
}
|
|
18031
|
+
}
|
|
18032
|
+
})();
|
|
17995
18033
|
pollLoop().catch((err) => {
|
|
17996
18034
|
process.stderr.write(
|
|
17997
18035
|
`telegram-channel(${AGENT_CODE_NAME}): poll loop died: ${err.message}
|
package/package.json
CHANGED
|
File without changes
|