@agentguard-run/burn 0.6.2 → 0.7.1

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.
@@ -13,6 +13,7 @@ exports.runLivePanel = runLivePanel;
13
13
  const node_crypto_1 = require("node:crypto");
14
14
  const node_fs_1 = require("node:fs");
15
15
  const canvas_1 = require("./canvas");
16
+ const copy_ramp_1 = require("./copy-ramp");
16
17
  const ledger_panel_1 = require("./ledger-panel");
17
18
  const recording_1 = require("./recording");
18
19
  const sessions_1 = require("./insights/sessions");
@@ -119,6 +120,8 @@ function renderPhonePanel(snapshot, options = {}) {
119
120
  c.bar(13, 0, w, fraction, color).bar(14, 0, w, fraction, color);
120
121
  // One block per copy that launched. The spawn-rate counter also counts the attempt that reached the ceiling and was refused,
121
122
  // so once a STOP is shown the copies that ran are one fewer than the counter. The grid only exists when the ceiling was recorded.
123
+ // Each block carries its copy's ramp colour (copy01 to copy15, teal into violet), never the bar's state colour: at the
124
+ // ceiling the bar is red because the next attempt was refused, while the copies that ran are neither allowed-green nor refused-red.
122
125
  if (snapshot.spawnCeiling !== null && snapshot.spawnCeiling > 0) {
123
126
  const ceiling = snapshot.spawnCeiling, attempts = Math.min(ceiling, Math.max(0, snapshot.spawns ?? 0));
124
127
  const filled = snapshot.stop && attempts >= ceiling ? attempts - 1 : attempts;
@@ -129,8 +132,8 @@ function renderPhonePanel(snapshot, options = {}) {
129
132
  c.put(16, Math.max(13, w - tag.length), tag, refused ? 'red' : 'slate');
130
133
  for (let index = 0; index < ceiling; index++) {
131
134
  const row = 17 + Math.floor(index / perRow) * 2, col = (index % perRow) * (blockWidth + 1);
132
- const on = index < filled, glyph = (on ? '█' : '░').repeat(blockWidth);
133
- c.put(row, col, glyph, on ? color : 'slate').put(row + 1, col, glyph, on ? color : 'slate');
135
+ const on = index < filled, glyph = (on ? '█' : '░').repeat(blockWidth), tint = on ? (0, copy_ramp_1.copyName)(index) : 'slate';
136
+ c.put(row, col, glyph, tint).put(row + 1, col, glyph, tint);
134
137
  }
135
138
  }
136
139
  c.put(22, 0, 'LAST 3 DECISIONS', 'slate');
@@ -15,6 +15,7 @@ const node_util_1 = require("node:util");
15
15
  const node_path_1 = require("node:path");
16
16
  const canvas_1 = require("@napi-rs/canvas");
17
17
  const canvas_2 = require("./canvas");
18
+ const copy_ramp_1 = require("./copy-ramp");
18
19
  const frames_1 = require("./frames");
19
20
  const recording_1 = require("./recording");
20
21
  const run = (0, node_util_1.promisify)(node_child_process_1.execFile);
@@ -95,7 +96,8 @@ async function renderCanvasPng(snapshot, width = 1920, height = 1080, style = 'd
95
96
  ctx.font = `${style === 'default' ? '' : 'bold '}${26 * cellWidth / CELL_WIDTH}px "${FONT_ALIAS}"`;
96
97
  ctx.textBaseline = 'alphabetic';
97
98
  // Showcase and phone palette: brighter than the terminal palette so text survives re-encoding on social players.
98
- const VIDEO_HEX = style === 'default' ? {} : { mint: '#2ABCB4', slate: '#B4BECF', amber: '#F59E0B', red: '#FF5A4E', white: '#FFFFFF' };
99
+ // The copies' ramp (copy01 to copy15) is the same in both, one hue per copy from teal into violet.
100
+ const VIDEO_HEX = style === 'default' ? {} : { mint: '#2ABCB4', slate: '#B4BECF', amber: '#F59E0B', red: '#FF5A4E', white: '#FFFFFF', ...Object.fromEntries(copy_ramp_1.COPY_RAMP.map(entry => [entry.name, entry.chip])) };
99
101
  for (let row = 0; row < snapshot.height; row++)
100
102
  for (let col = 0; col < snapshot.width; col++) {
101
103
  const cell = snapshot.cells[row][col];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentguard-run/burn",
3
- "version": "0.6.2",
3
+ "version": "0.7.1",
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. Developer command ranking requires explicit --rank.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://agentguard.run/burn",
@@ -63,7 +63,7 @@
63
63
  "dependencies": {
64
64
  "@napi-rs/canvas": "^1.0.9",
65
65
  "@agentguard-run/spend": "0.22.0",
66
- "ajv": "8.17.1"
66
+ "ajv": "8.18.0"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/node": "^22",