@integrity-labs/agt-cli 0.28.306 → 0.28.308

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.
@@ -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.306" : "dev";
5903
+ var agtCliVersion = true ? "0.28.308" : "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-2EHOMRDS.js.map
8202
+ //# sourceMappingURL=chunk-XPT5NDBD.js.map