@integrity-labs/agt-cli 0.28.838 → 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/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-MZNTGZA7.js";
43
+ } from "../chunk-V2JMDOOU.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.838" : "dev";
5470
+ var cliVersion = true ? "0.28.839" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.838" : "dev";
6661
+ var cliVersion2 = true ? "0.28.839" : "dev";
6662
6662
  var program = new Command();
6663
6663
  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");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6566,7 +6566,7 @@ function exchangeFailureKind(err) {
6566
6566
  }
6567
6567
 
6568
6568
  // src/lib/api-client.ts
6569
- var agtCliVersion = true ? "0.28.838" : "dev";
6569
+ var agtCliVersion = true ? "0.28.839" : "dev";
6570
6570
  var lastConfigHash = null;
6571
6571
  function setConfigHash(hash) {
6572
6572
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10924,4 +10924,4 @@ export {
10924
10924
  managerInstallSystemUnitCommand,
10925
10925
  managerUninstallSystemUnitCommand
10926
10926
  };
10927
- //# sourceMappingURL=chunk-MZNTGZA7.js.map
10927
+ //# sourceMappingURL=chunk-V2JMDOOU.js.map
@@ -60,7 +60,7 @@ import {
60
60
  safeWriteJsonAtomic,
61
61
  setConfigHash,
62
62
  tripClass
63
- } from "../chunk-MZNTGZA7.js";
63
+ } from "../chunk-V2JMDOOU.js";
64
64
  import {
65
65
  getProjectDir as getProjectDir2,
66
66
  getReadyTasks,
@@ -9598,6 +9598,15 @@ function decideSenderPolicyForward(evt, policy) {
9598
9598
 
9599
9599
  // ../../packages/core/dist/channels/governance/slack-peer-classifier.js
9600
9600
  var CODE_NAME_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
9601
+ function findThirdPartyGrant(msg, cfg) {
9602
+ return cfg.third_party_bots?.find((b) => {
9603
+ if (msg.user && b.bot_user_id === msg.user)
9604
+ return true;
9605
+ if (!msg.bot_id)
9606
+ return false;
9607
+ return b.bot_id === msg.bot_id || b.bot_user_id === msg.bot_id;
9608
+ });
9609
+ }
9601
9610
  function classifyPeerMessage(msg, cfg, self) {
9602
9611
  if (!msg.bot_id)
9603
9612
  return { kind: "human" };
@@ -9607,6 +9616,18 @@ function classifyPeerMessage(msg, cfg, self) {
9607
9616
  if (cfg.peer_disabled_mode === "all") {
9608
9617
  return { kind: "drop", reason: "peer_disabled_all" };
9609
9618
  }
9619
+ if (!cfg.peers.some((p) => p.bot_user_id === msg.user)) {
9620
+ const grant = findThirdPartyGrant(msg, cfg);
9621
+ if (grant) {
9622
+ if (cfg.peer_disabled_mode === "cross_team_only") {
9623
+ return { kind: "drop", reason: "peer_disabled_cross_team" };
9624
+ }
9625
+ if (grant.channel_ids.includes(msg.channel)) {
9626
+ return { kind: "bot-ingress", bot: grant };
9627
+ }
9628
+ return { kind: "drop", reason: "third_party_channel_not_allowlisted" };
9629
+ }
9630
+ }
9610
9631
  if (cfg.peer_agent_mode === "off") {
9611
9632
  return { kind: "drop", reason: "mode_off" };
9612
9633
  }
@@ -9619,22 +9640,6 @@ function classifyPeerMessage(msg, cfg, self) {
9619
9640
  }
9620
9641
  const peer = cfg.peers.find((p) => p.bot_user_id === msg.user);
9621
9642
  if (!peer) {
9622
- const thirdParty = cfg.third_party_bots?.find((b) => {
9623
- if (msg.user && b.bot_user_id === msg.user)
9624
- return true;
9625
- if (!msg.bot_id)
9626
- return false;
9627
- return b.bot_id === msg.bot_id || b.bot_user_id === msg.bot_id;
9628
- });
9629
- if (thirdParty) {
9630
- if (cfg.peer_disabled_mode === "cross_team_only") {
9631
- return { kind: "drop", reason: "peer_disabled_cross_team" };
9632
- }
9633
- if (thirdParty.channel_ids.includes(msg.channel)) {
9634
- return { kind: "bot-ingress", bot: thirdParty };
9635
- }
9636
- return { kind: "drop", reason: "third_party_channel_not_allowlisted" };
9637
- }
9638
9643
  return { kind: "drop", reason: "unknown_peer" };
9639
9644
  }
9640
9645
  if (peer.gate_path === null) {
@@ -13669,7 +13674,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13669
13674
  var lastVersionCheckAt = 0;
13670
13675
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13671
13676
  var lastResponsivenessProbeAt = 0;
13672
- var agtCliVersion = true ? "0.28.838" : "dev";
13677
+ var agtCliVersion = true ? "0.28.839" : "dev";
13673
13678
  function resolveBrewPath(execFileSync2) {
13674
13679
  try {
13675
13680
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();