@integrity-labs/agt-cli 0.28.789 → 0.28.791

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,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-HV5D3USK.js";
43
+ } from "../chunk-EPMGQHEU.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-2GZ7EG7V.js";
48
+ } from "../chunk-5YVKL47B.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-PUEQQOJI.js";
82
+ } from "../chunk-LZOCRUOY.js";
83
83
  import "../chunk-XWVM4KPK.js";
84
84
 
85
85
  // src/bin/agt.ts
@@ -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.789" : "dev";
5470
+ var cliVersion = true ? "0.28.791" : "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.789" : "dev";
6661
+ var cliVersion2 = true ? "0.28.791" : "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) => {
@@ -18,7 +18,7 @@ import {
18
18
  rotateDailySession,
19
19
  sessionFileExists,
20
20
  todayLocalIso
21
- } from "./chunk-PUEQQOJI.js";
21
+ } from "./chunk-LZOCRUOY.js";
22
22
  import {
23
23
  reapOrphanChannelMcps
24
24
  } from "./chunk-XWVM4KPK.js";
@@ -5155,4 +5155,4 @@ export {
5155
5155
  stopAllSessionsAndWait,
5156
5156
  getProjectDir
5157
5157
  };
5158
- //# sourceMappingURL=chunk-2GZ7EG7V.js.map
5158
+ //# sourceMappingURL=chunk-5YVKL47B.js.map
@@ -14,7 +14,7 @@ import {
14
14
  parseEnvFileEntries,
15
15
  parseEnvIntegrations,
16
16
  shellQuote
17
- } from "./chunk-2GZ7EG7V.js";
17
+ } from "./chunk-5YVKL47B.js";
18
18
  import {
19
19
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
20
  INTEGRATIONS_SECTION_END,
@@ -66,7 +66,7 @@ import {
66
66
  sessionTranscriptDir,
67
67
  worseConnectivityOutcome,
68
68
  wrapScheduledTaskPrompt
69
- } from "./chunk-PUEQQOJI.js";
69
+ } from "./chunk-LZOCRUOY.js";
70
70
  import {
71
71
  parsePsRows
72
72
  } from "./chunk-XWVM4KPK.js";
@@ -6518,7 +6518,7 @@ function exchangeFailureKind(err) {
6518
6518
  }
6519
6519
 
6520
6520
  // src/lib/api-client.ts
6521
- var agtCliVersion = true ? "0.28.789" : "dev";
6521
+ var agtCliVersion = true ? "0.28.791" : "dev";
6522
6522
  var lastConfigHash = null;
6523
6523
  function setConfigHash(hash) {
6524
6524
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10755,4 +10755,4 @@ export {
10755
10755
  managerInstallSystemUnitCommand,
10756
10756
  managerUninstallSystemUnitCommand
10757
10757
  };
10758
- //# sourceMappingURL=chunk-HV5D3USK.js.map
10758
+ //# sourceMappingURL=chunk-EPMGQHEU.js.map
@@ -929,6 +929,39 @@ function formatCalendarConfidentialityLines(config) {
929
929
  }
930
930
  return lines;
931
931
  }
932
+ var CHANNEL_ALLOWLIST_KEY = "allowed_channels";
933
+ function hasEmptyChannelAllowlist(g) {
934
+ const config = g.config ?? {};
935
+ if (!Object.prototype.hasOwnProperty.call(config, CHANNEL_ALLOWLIST_KEY))
936
+ return false;
937
+ const value = config[CHANNEL_ALLOWLIST_KEY];
938
+ if (!Array.isArray(value))
939
+ return true;
940
+ return value.filter((c) => typeof c === "string" && c.trim() !== "").length === 0;
941
+ }
942
+ function effectiveChannelAllowlistEnforcement(g) {
943
+ if (g.enforcement === "disabled")
944
+ return g.enforcement;
945
+ if (g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF)
946
+ return g.enforcement;
947
+ if (g.definitionId === CALENDAR_CONFIDENTIALITY_DEF)
948
+ return g.enforcement;
949
+ if (!hasEmptyChannelAllowlist(g))
950
+ return g.enforcement;
951
+ return "log";
952
+ }
953
+ function formatEmptyChannelAllowlistLines() {
954
+ return [
955
+ ` **This guardrail is misconfigured and enforces nothing.** Its channel allowlist`,
956
+ ` contains no usable channel entry \u2014 it is empty, or holds only blanks or values`,
957
+ ` that are not channel names \u2014 so it names no permitted channel and no forbidden`,
958
+ ` one, and nothing in the platform reads it. Do NOT refuse to post on its basis,`,
959
+ ` and do not treat it as a`,
960
+ ` list of channels you are approved for. Report it to your operator: this guardrail`,
961
+ ` was retired from the library in July 2026 (ENG-7476) and this application outlived`,
962
+ ` the removal (ENG-9663).`
963
+ ];
964
+ }
932
965
  function renderGuardrailBullet(g) {
933
966
  const lines = [];
934
967
  const header = `- **${g.displayName}** (${g.category}, from ${g.source})`;
@@ -936,7 +969,11 @@ function renderGuardrailBullet(g) {
936
969
  if (g.description?.trim()) {
937
970
  lines.push(` ${g.description.trim()}`);
938
971
  }
939
- lines.push(...g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF ? formatEmailDomainConfigLines(g.config) : g.definitionId === CALENDAR_CONFIDENTIALITY_DEF ? formatCalendarConfidentialityLines(g.config) : formatConfigLines(g.config));
972
+ lines.push(...g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF ? formatEmailDomainConfigLines(g.config) : g.definitionId === CALENDAR_CONFIDENTIALITY_DEF ? formatCalendarConfidentialityLines(g.config) : (
973
+ // ENG-9663: checked AFTER the two named formatters, so an email or
974
+ // calendar guardrail can never be captured by the structural match.
975
+ hasEmptyChannelAllowlist(g) ? formatEmptyChannelAllowlistLines() : formatConfigLines(g.config)
976
+ ));
940
977
  return lines.join("\n");
941
978
  }
942
979
  function renderOverriddenGuardrailBullet(g) {
@@ -950,7 +987,11 @@ function renderOverriddenGuardrailBullet(g) {
950
987
  if (g.description?.trim()) {
951
988
  lines.push(` ${g.description.trim()}`);
952
989
  }
953
- lines.push(...g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF ? formatEmailDomainConfigLines(g.config) : g.definitionId === CALENDAR_CONFIDENTIALITY_DEF ? formatCalendarConfidentialityLines(g.config) : formatConfigLines(g.config));
990
+ lines.push(...g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF ? formatEmailDomainConfigLines(g.config) : g.definitionId === CALENDAR_CONFIDENTIALITY_DEF ? formatCalendarConfidentialityLines(g.config) : (
991
+ // ENG-9663: checked AFTER the two named formatters, so an email or
992
+ // calendar guardrail can never be captured by the structural match.
993
+ hasEmptyChannelAllowlist(g) ? formatEmptyChannelAllowlistLines() : formatConfigLines(g.config)
994
+ ));
954
995
  return lines.join("\n");
955
996
  }
956
997
  function effectiveCalendarEnforcement(g) {
@@ -985,9 +1026,12 @@ function buildGuardrailsSection(guardrails) {
985
1026
  if (!guardrails || guardrails.length === 0)
986
1027
  return "";
987
1028
  const active = guardrails.map((g) => {
988
- const enforcement = effectiveEmailEnforcement({
1029
+ const enforcement = effectiveChannelAllowlistEnforcement({
989
1030
  ...g,
990
- enforcement: effectiveCalendarEnforcement(g)
1031
+ enforcement: effectiveEmailEnforcement({
1032
+ ...g,
1033
+ enforcement: effectiveCalendarEnforcement(g)
1034
+ })
991
1035
  });
992
1036
  return { ...g, enforcement };
993
1037
  }).filter((g) => g.enforcement !== "disabled" || !!(g.overrideApplied && g.overrideReason?.trim()));
@@ -13527,4 +13571,4 @@ export {
13527
13571
  peekCurrentSession,
13528
13572
  readDailySessionPin
13529
13573
  };
13530
- //# sourceMappingURL=chunk-PUEQQOJI.js.map
13574
+ //# sourceMappingURL=chunk-LZOCRUOY.js.map