@integrity-labs/agt-cli 0.28.837 → 0.28.839
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/assets/review/post-review-findings.mjs +154 -5
- package/dist/bin/agt.js +3 -3
- package/dist/{chunk-PWCWBPNG.js → chunk-V2JMDOOU.js} +2 -2
- package/dist/lib/manager-worker.js +23 -18
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/slack-channel.js +21 -16
- package/package.json +1 -1
- /package/dist/{chunk-PWCWBPNG.js.map → chunk-V2JMDOOU.js.map} +0 -0
|
@@ -42462,6 +42462,15 @@ function buildDmUserInfo(usersInfoRes) {
|
|
|
42462
42462
|
|
|
42463
42463
|
// ../core/dist/channels/governance/slack-peer-classifier.js
|
|
42464
42464
|
var CODE_NAME_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
42465
|
+
function findThirdPartyGrant(msg, cfg) {
|
|
42466
|
+
return cfg.third_party_bots?.find((b) => {
|
|
42467
|
+
if (msg.user && b.bot_user_id === msg.user)
|
|
42468
|
+
return true;
|
|
42469
|
+
if (!msg.bot_id)
|
|
42470
|
+
return false;
|
|
42471
|
+
return b.bot_id === msg.bot_id || b.bot_user_id === msg.bot_id;
|
|
42472
|
+
});
|
|
42473
|
+
}
|
|
42465
42474
|
function classifyPeerMessage(msg, cfg, self) {
|
|
42466
42475
|
if (!msg.bot_id)
|
|
42467
42476
|
return { kind: "human" };
|
|
@@ -42471,6 +42480,18 @@ function classifyPeerMessage(msg, cfg, self) {
|
|
|
42471
42480
|
if (cfg.peer_disabled_mode === "all") {
|
|
42472
42481
|
return { kind: "drop", reason: "peer_disabled_all" };
|
|
42473
42482
|
}
|
|
42483
|
+
if (!cfg.peers.some((p2) => p2.bot_user_id === msg.user)) {
|
|
42484
|
+
const grant = findThirdPartyGrant(msg, cfg);
|
|
42485
|
+
if (grant) {
|
|
42486
|
+
if (cfg.peer_disabled_mode === "cross_team_only") {
|
|
42487
|
+
return { kind: "drop", reason: "peer_disabled_cross_team" };
|
|
42488
|
+
}
|
|
42489
|
+
if (grant.channel_ids.includes(msg.channel)) {
|
|
42490
|
+
return { kind: "bot-ingress", bot: grant };
|
|
42491
|
+
}
|
|
42492
|
+
return { kind: "drop", reason: "third_party_channel_not_allowlisted" };
|
|
42493
|
+
}
|
|
42494
|
+
}
|
|
42474
42495
|
if (cfg.peer_agent_mode === "off") {
|
|
42475
42496
|
return { kind: "drop", reason: "mode_off" };
|
|
42476
42497
|
}
|
|
@@ -42483,22 +42504,6 @@ function classifyPeerMessage(msg, cfg, self) {
|
|
|
42483
42504
|
}
|
|
42484
42505
|
const peer = cfg.peers.find((p2) => p2.bot_user_id === msg.user);
|
|
42485
42506
|
if (!peer) {
|
|
42486
|
-
const thirdParty = cfg.third_party_bots?.find((b) => {
|
|
42487
|
-
if (msg.user && b.bot_user_id === msg.user)
|
|
42488
|
-
return true;
|
|
42489
|
-
if (!msg.bot_id)
|
|
42490
|
-
return false;
|
|
42491
|
-
return b.bot_id === msg.bot_id || b.bot_user_id === msg.bot_id;
|
|
42492
|
-
});
|
|
42493
|
-
if (thirdParty) {
|
|
42494
|
-
if (cfg.peer_disabled_mode === "cross_team_only") {
|
|
42495
|
-
return { kind: "drop", reason: "peer_disabled_cross_team" };
|
|
42496
|
-
}
|
|
42497
|
-
if (thirdParty.channel_ids.includes(msg.channel)) {
|
|
42498
|
-
return { kind: "bot-ingress", bot: thirdParty };
|
|
42499
|
-
}
|
|
42500
|
-
return { kind: "drop", reason: "third_party_channel_not_allowlisted" };
|
|
42501
|
-
}
|
|
42502
42507
|
return { kind: "drop", reason: "unknown_peer" };
|
|
42503
42508
|
}
|
|
42504
42509
|
if (peer.gate_path === null) {
|
package/package.json
CHANGED
|
File without changes
|