@integrity-labs/agt-cli 0.28.305 → 0.28.307

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
@@ -38,7 +38,7 @@ import {
38
38
  success,
39
39
  table,
40
40
  warn
41
- } from "../chunk-XVLVNR33.js";
41
+ } from "../chunk-BV55I3J5.js";
42
42
  import {
43
43
  CHANNEL_REGISTRY,
44
44
  DEFAULT_FRAMEWORK,
@@ -67,7 +67,7 @@ import {
67
67
  renderTemplate,
68
68
  resolveChannels,
69
69
  serializeManifestForSlackCli
70
- } from "../chunk-A546IARM.js";
70
+ } from "../chunk-QVYGYEBX.js";
71
71
  import "../chunk-XWVM4KPK.js";
72
72
 
73
73
  // src/bin/agt.ts
@@ -4826,7 +4826,7 @@ import { execFileSync, execSync } from "child_process";
4826
4826
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4827
4827
  import chalk18 from "chalk";
4828
4828
  import ora16 from "ora";
4829
- var cliVersion = true ? "0.28.305" : "dev";
4829
+ var cliVersion = true ? "0.28.307" : "dev";
4830
4830
  async function fetchLatestVersion() {
4831
4831
  const host2 = getHost();
4832
4832
  if (!host2) return null;
@@ -5843,7 +5843,7 @@ function handleError(err) {
5843
5843
  }
5844
5844
 
5845
5845
  // src/bin/agt.ts
5846
- var cliVersion2 = true ? "0.28.305" : "dev";
5846
+ var cliVersion2 = true ? "0.28.307" : "dev";
5847
5847
  var program = new Command();
5848
5848
  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");
5849
5849
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -18,7 +18,7 @@ import {
18
18
  resolveConnectivityProbe,
19
19
  worseConnectivityOutcome,
20
20
  wrapScheduledTaskPrompt
21
- } from "./chunk-A546IARM.js";
21
+ } from "./chunk-QVYGYEBX.js";
22
22
  import {
23
23
  parsePsRows
24
24
  } from "./chunk-XWVM4KPK.js";
@@ -991,9 +991,20 @@ function renderGuardrailBullet(g) {
991
991
  lines.push(` ${g.description.trim()}`);
992
992
  }
993
993
  lines.push(...g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF ? formatEmailDomainConfigLines(g.config) : g.definitionId === CALENDAR_CONFIDENTIALITY_DEF ? formatCalendarConfidentialityLines(g.config) : formatConfigLines(g.config));
994
- if (g.overrideApplied && g.overrideReason?.trim()) {
995
- lines.push(` *Override applied: ${g.overrideReason.trim()}*`);
994
+ return lines.join("\n");
995
+ }
996
+ function renderOverriddenGuardrailBullet(g) {
997
+ const reason = g.overrideReason?.trim() ?? "";
998
+ const lines = [`- **${g.displayName}** (${g.category}, from ${g.source})`];
999
+ if (g.enforcement === "disabled") {
1000
+ lines.push(` **This guardrail has been lifted by an approved operator override and no longer applies to you.**` + (reason ? ` Reason: ${reason}.` : "") + ` You are not bound by the original restriction.`);
1001
+ return lines.join("\n");
996
1002
  }
1003
+ lines.push(` **An approved operator override applies to this policy and takes precedence over the original restriction.**` + (reason ? ` Reason: ${reason}.` : "") + ` Follow the policy exactly as written below; it already reflects this exception. Do not re-impose the original restriction or refuse on its basis.`);
1004
+ if (g.description?.trim()) {
1005
+ lines.push(` ${g.description.trim()}`);
1006
+ }
1007
+ lines.push(...g.definitionId === EMAIL_DOMAIN_RESTRICT_DEF ? formatEmailDomainConfigLines(g.config) : g.definitionId === CALENDAR_CONFIDENTIALITY_DEF ? formatCalendarConfidentialityLines(g.config) : formatConfigLines(g.config));
997
1008
  return lines.join("\n");
998
1009
  }
999
1010
  function effectiveCalendarEnforcement(g) {
@@ -1009,12 +1020,15 @@ function effectiveCalendarEnforcement(g) {
1009
1020
  function buildGuardrailsSection(guardrails) {
1010
1021
  if (!guardrails || guardrails.length === 0)
1011
1022
  return "";
1012
- const active = guardrails.map((g) => ({ ...g, enforcement: effectiveCalendarEnforcement(g) })).filter((g) => g.enforcement !== "disabled");
1023
+ const active = guardrails.map((g) => ({ ...g, enforcement: effectiveCalendarEnforcement(g) })).filter((g) => g.enforcement !== "disabled" || !!(g.overrideApplied && g.overrideReason?.trim()));
1013
1024
  if (active.length === 0)
1014
1025
  return "";
1015
- const enforce = active.filter((g) => g.enforcement === "enforce");
1016
- const warn2 = active.filter((g) => g.enforcement === "warn");
1017
- const logOnly = active.filter((g) => g.enforcement === "log");
1026
+ const isOverridden = (g) => !!(g.overrideApplied && g.overrideReason?.trim());
1027
+ const overridden = active.filter(isOverridden);
1028
+ const normal = active.filter((g) => !isOverridden(g));
1029
+ const enforce = normal.filter((g) => g.enforcement === "enforce");
1030
+ const warn2 = normal.filter((g) => g.enforcement === "warn");
1031
+ const logOnly = normal.filter((g) => g.enforcement === "log");
1018
1032
  const blocks = [
1019
1033
  `## Guardrails`,
1020
1034
  ``,
@@ -1036,6 +1050,10 @@ function buildGuardrailsSection(guardrails) {
1036
1050
  blocks.push(``, `### Logged (observability only)`, ``);
1037
1051
  blocks.push(logOnly.map(renderGuardrailBullet).join("\n"));
1038
1052
  }
1053
+ if (overridden.length > 0) {
1054
+ blocks.push(``, `### Approved exceptions (an operator override applies - follow the adjusted policy)`, ``);
1055
+ blocks.push(overridden.map(renderOverriddenGuardrailBullet).join("\n"));
1056
+ }
1039
1057
  return blocks.join("\n") + "\n";
1040
1058
  }
1041
1059
  function generateClaudeMd(input) {
@@ -5882,7 +5900,7 @@ function requireHost() {
5882
5900
  }
5883
5901
 
5884
5902
  // src/lib/api-client.ts
5885
- var agtCliVersion = true ? "0.28.305" : "dev";
5903
+ var agtCliVersion = true ? "0.28.307" : "dev";
5886
5904
  var lastConfigHash = null;
5887
5905
  function setConfigHash(hash) {
5888
5906
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8181,4 +8199,4 @@ export {
8181
8199
  managerInstallSystemUnitCommand,
8182
8200
  managerUninstallSystemUnitCommand
8183
8201
  };
8184
- //# sourceMappingURL=chunk-XVLVNR33.js.map
8202
+ //# sourceMappingURL=chunk-BV55I3J5.js.map