@agentguard-run/burn 0.2.6 → 0.2.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.7 (2026-09-19)
4
+
5
+ - Fix the STOP badge padding so every card row is 66 visible characters wide. Preserve the card wording.
6
+ - Use light box-drawing glyphs for the STOP frame after checking a real Claude Code hook denial. Start the frame below the host Error prefix so its edges align.
7
+ - Test both spawn and model-call cards with ANSI colour enabled and disabled, including wrapped advice.
8
+
3
9
  ## 0.2.6 (2026-09-19)
4
10
 
5
11
  - Fix inflated enforcement usage: repeated assistant content blocks and copied child histories now share the same provider response identity as `why`. Persist only usage deltas; rebuild old counters once without replacing their receipt chain head.
package/dist/src/cli.js CHANGED
File without changes
@@ -251,7 +251,9 @@ function handleSpawnPreToolUse(input, home, now) {
251
251
  function buildDenyReason(report, _reservation) {
252
252
  // Claude Code shows this reason to the user. A box reads as an alarm; a
253
253
  // sentence reads as a log line. Colour is off: the host decides rendering.
254
- return (0, render_1.renderStop)(report, { colour: false });
254
+ // Claude trims leading whitespace before adding Error:. A zero-width word
255
+ // joiner preserves the blank first line, keeping that prefix off the frame.
256
+ return '\u2060\n' + (0, render_1.renderStop)(report, { colour: false });
255
257
  }
256
258
  function deny(reason) {
257
259
  return {
@@ -177,25 +177,25 @@ function renderStop(report, opts = {}) {
177
177
  const on = opts.colour ?? false;
178
178
  const lead = report.findings.find((f) => f.verdict === 'STOP')?.summary ?? 'Fan-out ceiling reached.';
179
179
  const w = 64;
180
- const bar = ''.repeat(w);
180
+ const bar = ''.repeat(w);
181
181
  const title = opts.subject === 'call' ? ' model call blocked' : ' agent spawn blocked';
182
182
  const lines = [];
183
- lines.push(paint(on, C.red, `┏${bar}┓`));
184
- lines.push(paint(on, C.red, ' ') + paint(on, C.bold + C.bgRed + C.white, ' AGENTGUARD STOP ') + paint(on, C.bold, title) + paint(on, C.red, ' '.repeat(w - 19 - title.length) + ''));
185
- lines.push(paint(on, C.red, `┣${bar}┫`));
186
- lines.push(paint(on, C.red, ' ') + lead.padEnd(w - 1).slice(0, w - 1) + paint(on, C.red, ''));
187
- lines.push(paint(on, C.red, ' ') + paint(on, C.dim, `${(0, evaluate_1.fmt)(report.totals.tokens)} tokens · ${report.totals.spawns} spawns · depth ${report.totals.maxDepth}`.padEnd(w - 1)) + paint(on, C.red, ''));
188
- lines.push(paint(on, C.red, `┣${bar}┫`));
189
- lines.push(paint(on, C.red, ' ') + paint(on, C.bold, 'DO NOW'.padEnd(w - 1)) + paint(on, C.red, ''));
183
+ lines.push(paint(on, C.red, `┌${bar}┐`));
184
+ lines.push(paint(on, C.red, ' ') + paint(on, C.bold + C.bgRed + C.white, ' AGENTGUARD STOP ') + paint(on, C.bold, title) + paint(on, C.red, ' '.repeat(w - 18 - title.length) + ''));
185
+ lines.push(paint(on, C.red, `├${bar}┤`));
186
+ lines.push(paint(on, C.red, ' ') + lead.padEnd(w - 1).slice(0, w - 1) + paint(on, C.red, ''));
187
+ lines.push(paint(on, C.red, ' ') + paint(on, C.dim, `${(0, evaluate_1.fmt)(report.totals.tokens)} tokens · ${report.totals.spawns} spawns · depth ${report.totals.maxDepth}`.padEnd(w - 1)) + paint(on, C.red, ''));
188
+ lines.push(paint(on, C.red, `├${bar}┤`));
189
+ lines.push(paint(on, C.red, ' ') + paint(on, C.bold, 'DO NOW'.padEnd(w - 1)) + paint(on, C.red, ''));
190
190
  report.prescriptions.slice(0, 3).forEach((p, i) => {
191
191
  const wrapped = wrap(`${i + 1}. ${p}`, w - 2, ' ');
192
192
  for (const line of wrapped) {
193
- lines.push(paint(on, C.red, ' ') + line.padEnd(w - 1) + paint(on, C.red, ''));
193
+ lines.push(paint(on, C.red, ' ') + line.padEnd(w - 1) + paint(on, C.red, ''));
194
194
  }
195
195
  });
196
- lines.push(paint(on, C.red, `┣${bar}┫`));
197
- lines.push(paint(on, C.red, ' ') + paint(on, C.dim, 'override once: agentguard-burn resume --once --reason "..."'.padEnd(w - 1)) + paint(on, C.red, ''));
198
- lines.push(paint(on, C.red, `┗${bar}┛`));
196
+ lines.push(paint(on, C.red, `├${bar}┤`));
197
+ lines.push(paint(on, C.red, ' ') + paint(on, C.dim, 'override once: agentguard-burn resume --once --reason "..."'.padEnd(w - 1)) + paint(on, C.red, ''));
198
+ lines.push(paint(on, C.red, `└${bar}┘`));
199
199
  return lines.join('\n');
200
200
  }
201
201
  /** Word-aware wrap. Continuation lines are indented. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentguard-run/burn",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Local session usage and runaway-agent circuit breaker. Explain tokens, cache rewrites and API list cost, track pace, warn on heavy turns, and gate agent fan-out with signed receipts. Nothing leaves the machine.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "commonjs",