@integrity-labs/agt-cli 0.28.81 → 0.28.82
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 +3 -3
- package/dist/{chunk-DA3DAU5V.js → chunk-WSRT4VSX.js} +2 -2
- package/dist/lib/manager-worker.js +2 -2
- package/dist/mcp/slack-channel.js +5 -11
- package/dist/mcp/telegram-channel.js +7 -3
- package/package.json +1 -1
- /package/dist/{chunk-DA3DAU5V.js.map → chunk-WSRT4VSX.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
success,
|
|
38
38
|
table,
|
|
39
39
|
warn
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-WSRT4VSX.js";
|
|
41
41
|
import {
|
|
42
42
|
CHANNEL_REGISTRY,
|
|
43
43
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4777,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4777
4777
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4778
4778
|
import chalk18 from "chalk";
|
|
4779
4779
|
import ora16 from "ora";
|
|
4780
|
-
var cliVersion = true ? "0.28.
|
|
4780
|
+
var cliVersion = true ? "0.28.82" : "dev";
|
|
4781
4781
|
async function fetchLatestVersion() {
|
|
4782
4782
|
const host2 = getHost();
|
|
4783
4783
|
if (!host2) return null;
|
|
@@ -5791,7 +5791,7 @@ function handleError(err) {
|
|
|
5791
5791
|
}
|
|
5792
5792
|
|
|
5793
5793
|
// src/bin/agt.ts
|
|
5794
|
-
var cliVersion2 = true ? "0.28.
|
|
5794
|
+
var cliVersion2 = true ? "0.28.82" : "dev";
|
|
5795
5795
|
var program = new Command();
|
|
5796
5796
|
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");
|
|
5797
5797
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -7516,7 +7516,7 @@ function requireHost() {
|
|
|
7516
7516
|
}
|
|
7517
7517
|
|
|
7518
7518
|
// src/lib/api-client.ts
|
|
7519
|
-
var agtCliVersion = true ? "0.28.
|
|
7519
|
+
var agtCliVersion = true ? "0.28.82" : "dev";
|
|
7520
7520
|
var lastConfigHash = null;
|
|
7521
7521
|
function setConfigHash(hash) {
|
|
7522
7522
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8813,4 +8813,4 @@ export {
|
|
|
8813
8813
|
managerInstallSystemUnitCommand,
|
|
8814
8814
|
managerUninstallSystemUnitCommand
|
|
8815
8815
|
};
|
|
8816
|
-
//# sourceMappingURL=chunk-
|
|
8816
|
+
//# sourceMappingURL=chunk-WSRT4VSX.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireHost,
|
|
29
29
|
safeWriteJsonAtomic,
|
|
30
30
|
setConfigHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-WSRT4VSX.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectDir as getProjectDir2,
|
|
34
34
|
getReadyTasks,
|
|
@@ -6803,7 +6803,7 @@ var cachedMaintenanceWindow = null;
|
|
|
6803
6803
|
var lastVersionCheckAt = 0;
|
|
6804
6804
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6805
6805
|
var lastResponsivenessProbeAt = 0;
|
|
6806
|
-
var agtCliVersion = true ? "0.28.
|
|
6806
|
+
var agtCliVersion = true ? "0.28.82" : "dev";
|
|
6807
6807
|
function resolveBrewPath(execFileSync4) {
|
|
6808
6808
|
try {
|
|
6809
6809
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -18073,15 +18073,6 @@ async function postEphemeralViaResponseUrl(responseUrl, text, logTag) {
|
|
|
18073
18073
|
}
|
|
18074
18074
|
async function forwardOnboardingSlashCommand(opts) {
|
|
18075
18075
|
const { verb, path, userId, responseUrl, codeName } = opts;
|
|
18076
|
-
const allowed = getEffectiveAllowedUsers();
|
|
18077
|
-
if (allowed.size > 0 && (!userId || !allowed.has(userId))) {
|
|
18078
|
-
await postEphemeralViaResponseUrl(
|
|
18079
|
-
responseUrl,
|
|
18080
|
-
`\u{1F6AB} \`${verb}\` denied \u2014 your Slack user is not in the allowlist for \`${codeName}\`.`,
|
|
18081
|
-
codeName
|
|
18082
|
-
);
|
|
18083
|
-
return;
|
|
18084
|
-
}
|
|
18085
18076
|
if (!AGT_HOST || !AGT_API_KEY || !AGT_AGENT_ID) {
|
|
18086
18077
|
await postEphemeralViaResponseUrl(
|
|
18087
18078
|
responseUrl,
|
|
@@ -18097,9 +18088,12 @@ async function forwardOnboardingSlashCommand(opts) {
|
|
|
18097
18088
|
apiKey: AGT_API_KEY,
|
|
18098
18089
|
agentId: AGT_AGENT_ID
|
|
18099
18090
|
};
|
|
18100
|
-
const res = await apiCall2(cfg, "POST", `/host${path}`, {
|
|
18091
|
+
const res = await apiCall2(cfg, "POST", `/host${path}`, {
|
|
18092
|
+
agent_id: AGT_AGENT_ID,
|
|
18093
|
+
initiator: { channel: "slack", user_id: userId }
|
|
18094
|
+
});
|
|
18101
18095
|
const data = await res.json();
|
|
18102
|
-
const text = data.ok ? `\u{1F504} ${data.message ?? "Onboarding updated."}` : `:x: \`${verb}\` failed${data.error ? `: ${data.error}` : "."}`;
|
|
18096
|
+
const text = data.ok ? `\u{1F504} ${data.message ?? "Onboarding updated."}` : data.message ?? `:x: \`${verb}\` failed${data.error ? `: ${data.error}` : "."}`;
|
|
18103
18097
|
await postEphemeralViaResponseUrl(responseUrl, text, codeName);
|
|
18104
18098
|
} catch (err) {
|
|
18105
18099
|
process.stderr.write(
|
|
@@ -17190,7 +17190,8 @@ async function handleOnboardingCommand(opts) {
|
|
|
17190
17190
|
agentId: AGT_AGENT_ID
|
|
17191
17191
|
};
|
|
17192
17192
|
const res = await apiCall2(cfg, "POST", `/host/onboarding/${opts.mode}`, {
|
|
17193
|
-
agent_id: AGT_AGENT_ID
|
|
17193
|
+
agent_id: AGT_AGENT_ID,
|
|
17194
|
+
initiator: { channel: "telegram", user_id: opts.senderId }
|
|
17194
17195
|
});
|
|
17195
17196
|
const data = await res.json();
|
|
17196
17197
|
process.stderr.write(
|
|
@@ -17198,7 +17199,7 @@ async function handleOnboardingCommand(opts) {
|
|
|
17198
17199
|
`
|
|
17199
17200
|
);
|
|
17200
17201
|
await reply(
|
|
17201
|
-
data.ok ? `\u{1F504} ${data.message ?? "Onboarding updated."}` : `\u274C ${verb} failed${data.error ? `: ${data.error}` : "."}`
|
|
17202
|
+
data.ok ? `\u{1F504} ${data.message ?? "Onboarding updated."}` : data.message ?? `\u274C ${verb} failed${data.error ? `: ${data.error}` : "."}`
|
|
17202
17203
|
);
|
|
17203
17204
|
} catch (err) {
|
|
17204
17205
|
process.stderr.write(
|
|
@@ -19210,7 +19211,10 @@ async function pollLoop() {
|
|
|
19210
19211
|
await handleOnboardingCommand({
|
|
19211
19212
|
chatId,
|
|
19212
19213
|
messageId: String(msg.message_id),
|
|
19213
|
-
mode: access.command === "onboard" ? "reset" : "resume"
|
|
19214
|
+
mode: access.command === "onboard" ? "reset" : "resume",
|
|
19215
|
+
// ENG-6578: the manager gate compares the SENDER's user-id (not the
|
|
19216
|
+
// chat id — they differ in groups) to the resolved manager principal.
|
|
19217
|
+
senderId: msg.from?.id != null ? String(msg.from.id) : void 0
|
|
19214
19218
|
});
|
|
19215
19219
|
}
|
|
19216
19220
|
continue;
|
package/package.json
CHANGED
|
File without changes
|