@integrity-labs/agt-cli 0.28.324 → 0.28.326
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-KHSPRKK2.js → chunk-3PT6JAFU.js} +2 -2
- package/dist/lib/manager-worker.js +20 -8
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +35 -0
- package/dist/mcp/slack-channel.js +67 -9
- package/dist/mcp/teams-channel.js +7 -1
- package/dist/mcp/telegram-channel.js +39 -1
- package/package.json +1 -1
- /package/dist/{chunk-KHSPRKK2.js.map → chunk-3PT6JAFU.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
success,
|
|
39
39
|
table,
|
|
40
40
|
warn
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-3PT6JAFU.js";
|
|
42
42
|
import {
|
|
43
43
|
AnchorSessionClient,
|
|
44
44
|
CHANNEL_REGISTRY,
|
|
@@ -4827,7 +4827,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4827
4827
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4828
4828
|
import chalk18 from "chalk";
|
|
4829
4829
|
import ora16 from "ora";
|
|
4830
|
-
var cliVersion = true ? "0.28.
|
|
4830
|
+
var cliVersion = true ? "0.28.326" : "dev";
|
|
4831
4831
|
async function fetchLatestVersion() {
|
|
4832
4832
|
const host2 = getHost();
|
|
4833
4833
|
if (!host2) return null;
|
|
@@ -5931,7 +5931,7 @@ function handleError(err) {
|
|
|
5931
5931
|
}
|
|
5932
5932
|
|
|
5933
5933
|
// src/bin/agt.ts
|
|
5934
|
-
var cliVersion2 = true ? "0.28.
|
|
5934
|
+
var cliVersion2 = true ? "0.28.326" : "dev";
|
|
5935
5935
|
var program = new Command();
|
|
5936
5936
|
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");
|
|
5937
5937
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6705,7 +6705,7 @@ function requireHost() {
|
|
|
6705
6705
|
}
|
|
6706
6706
|
|
|
6707
6707
|
// src/lib/api-client.ts
|
|
6708
|
-
var agtCliVersion = true ? "0.28.
|
|
6708
|
+
var agtCliVersion = true ? "0.28.326" : "dev";
|
|
6709
6709
|
var lastConfigHash = null;
|
|
6710
6710
|
function setConfigHash(hash) {
|
|
6711
6711
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -9102,4 +9102,4 @@ export {
|
|
|
9102
9102
|
managerInstallSystemUnitCommand,
|
|
9103
9103
|
managerUninstallSystemUnitCommand
|
|
9104
9104
|
};
|
|
9105
|
-
//# sourceMappingURL=chunk-
|
|
9105
|
+
//# sourceMappingURL=chunk-3PT6JAFU.js.map
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
requireHost,
|
|
44
44
|
safeWriteJsonAtomic,
|
|
45
45
|
setConfigHash
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-3PT6JAFU.js";
|
|
47
47
|
import {
|
|
48
48
|
getProjectDir as getProjectDir2,
|
|
49
49
|
getReadyTasks,
|
|
@@ -5989,6 +5989,11 @@ function decideModeForward(evt, policy) {
|
|
|
5989
5989
|
const label = extractAugmentedSlackLabel(evt);
|
|
5990
5990
|
if (!label)
|
|
5991
5991
|
return { forward: false, reason: "sender_policy" };
|
|
5992
|
+
if (policy.registeredAgentSlackUserIds !== void 0) {
|
|
5993
|
+
if (typeof evt.user !== "string" || !policy.registeredAgentSlackUserIds.has(evt.user)) {
|
|
5994
|
+
return { forward: false, reason: "sender_policy" };
|
|
5995
|
+
}
|
|
5996
|
+
}
|
|
5992
5997
|
if (policy.mode === "team_agents_only" || policy.mode === "manager_only" || policy.mode === "team_only") {
|
|
5993
5998
|
if (!policy.teamId || label.teamId !== policy.teamId) {
|
|
5994
5999
|
return { forward: false, reason: "sender_policy" };
|
|
@@ -6079,7 +6084,8 @@ function parsePeersEnv(raw, gateRaw) {
|
|
|
6079
6084
|
return [];
|
|
6080
6085
|
const gateMap = /* @__PURE__ */ new Map();
|
|
6081
6086
|
let gateConfigInvalid = false;
|
|
6082
|
-
|
|
6087
|
+
const gatePresent = !!(gateRaw && gateRaw.trim().length > 0);
|
|
6088
|
+
if (gatePresent) {
|
|
6083
6089
|
try {
|
|
6084
6090
|
const gateParsed = JSON.parse(gateRaw);
|
|
6085
6091
|
if (!gateParsed || typeof gateParsed !== "object" || Array.isArray(gateParsed)) {
|
|
@@ -6122,6 +6128,8 @@ function parsePeersEnv(raw, gateRaw) {
|
|
|
6122
6128
|
peer.gate_path = null;
|
|
6123
6129
|
} else if (gateMap.has(e.bot_user_id)) {
|
|
6124
6130
|
peer.gate_path = gateMap.get(e.bot_user_id) ?? null;
|
|
6131
|
+
} else if (gatePresent) {
|
|
6132
|
+
peer.gate_path = null;
|
|
6125
6133
|
}
|
|
6126
6134
|
out.push(peer);
|
|
6127
6135
|
}
|
|
@@ -6252,23 +6260,27 @@ function buildSlackSenderPolicyFromEnv(env, ctx) {
|
|
|
6252
6260
|
throw new Error("SLACK_INTERNAL_ONLY=true requires SLACK_HOME_TEAM_ID. The bot install must have a known team_id (run auth.test against the workspace and persist the result).");
|
|
6253
6261
|
}
|
|
6254
6262
|
const internalOnlyFields = internalOnly ? { internalOnly: true, homeTeamId } : {};
|
|
6263
|
+
const slackPeersRaw = env["SLACK_PEERS"];
|
|
6264
|
+
const registryFields = slackPeersRaw && slackPeersRaw.trim().length > 0 ? {
|
|
6265
|
+
registeredAgentSlackUserIds: new Set(parsePeersEnv(slackPeersRaw, env["SLACK_PEERS_GATE"]).map((p) => p.bot_user_id))
|
|
6266
|
+
} : {};
|
|
6255
6267
|
const teamId = ctx.agentTeamId;
|
|
6256
6268
|
if (raw === "all")
|
|
6257
|
-
return { mode: "all", ...internalOnlyFields };
|
|
6269
|
+
return { mode: "all", ...internalOnlyFields, ...registryFields };
|
|
6258
6270
|
if (raw === "agents_only")
|
|
6259
|
-
return { mode: "agents_only", ...internalOnlyFields };
|
|
6271
|
+
return { mode: "agents_only", ...internalOnlyFields, ...registryFields };
|
|
6260
6272
|
if (raw === "team_agents_only") {
|
|
6261
6273
|
if (!teamId) {
|
|
6262
6274
|
throw new Error("SLACK_SENDER_POLICY=team_agents_only requires AGT_TEAM_ID");
|
|
6263
6275
|
}
|
|
6264
|
-
return { mode: "team_agents_only", teamId, ...internalOnlyFields };
|
|
6276
|
+
return { mode: "team_agents_only", teamId, ...internalOnlyFields, ...registryFields };
|
|
6265
6277
|
}
|
|
6266
6278
|
if (raw === "team_only") {
|
|
6267
6279
|
if (!teamId) {
|
|
6268
6280
|
throw new Error("SLACK_SENDER_POLICY=team_only requires AGT_TEAM_ID");
|
|
6269
6281
|
}
|
|
6270
6282
|
const teamPrincipalSlackUserIds = (env["SLACK_SENDER_POLICY_TEAM_PRINCIPAL_IDS"] ?? "").split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
6271
|
-
return { mode: "team_only", teamId, teamPrincipalSlackUserIds, ...internalOnlyFields };
|
|
6283
|
+
return { mode: "team_only", teamId, teamPrincipalSlackUserIds, ...internalOnlyFields, ...registryFields };
|
|
6272
6284
|
}
|
|
6273
6285
|
if (raw === "manager_only") {
|
|
6274
6286
|
const principalSlackUserId = env["SLACK_SENDER_POLICY_PRINCIPAL_ID"];
|
|
@@ -6278,7 +6290,7 @@ function buildSlackSenderPolicyFromEnv(env, ctx) {
|
|
|
6278
6290
|
if (!principalSlackUserId) {
|
|
6279
6291
|
throw new Error("SLACK_SENDER_POLICY=manager_only requires SLACK_SENDER_POLICY_PRINCIPAL_ID. Set agent.reports_to_person with a slack_user_id in contact_preferences and re-run /host/refresh.");
|
|
6280
6292
|
}
|
|
6281
|
-
return { mode: "manager_only", teamId, principalSlackUserId, ...internalOnlyFields };
|
|
6293
|
+
return { mode: "manager_only", teamId, principalSlackUserId, ...internalOnlyFields, ...registryFields };
|
|
6282
6294
|
}
|
|
6283
6295
|
throw new Error(`Invalid SLACK_SENDER_POLICY=${JSON.stringify(env["SLACK_SENDER_POLICY"])}`);
|
|
6284
6296
|
}
|
|
@@ -8362,7 +8374,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
8362
8374
|
var lastVersionCheckAt = 0;
|
|
8363
8375
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
8364
8376
|
var lastResponsivenessProbeAt = 0;
|
|
8365
|
-
var agtCliVersion = true ? "0.28.
|
|
8377
|
+
var agtCliVersion = true ? "0.28.326" : "dev";
|
|
8366
8378
|
function resolveBrewPath(execFileSync2) {
|
|
8367
8379
|
try {
|
|
8368
8380
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|