troxy-cli 1.29.34 → 1.29.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.29.34",
3
+ "version": "1.29.35",
4
4
  "description": "A secure control layer for AI agents: policies across payments, messages, logins, destructive actions, model usage, and secrets, all enforceable from the CLI",
5
5
  "homepage": "https://troxy.io",
6
6
  "bugs": {
@@ -204,13 +204,18 @@ export function register(on) {
204
204
  await $.store.set('paused', r.paused);
205
205
  return { text: r.text };
206
206
  });
207
- // Status line showing live savings
207
+ // Visual savings bar in terminal output
208
208
  on('turn.start', async ($, e, next) => {
209
209
  const paused = Boolean(await $.store.get('paused'));
210
- const status = paused
211
- ? 'Troxy: off'
212
- : (routingCount > 0 ? `Troxy: -${sessionSavingsPercent}% saved` : 'Troxy: active');
213
- $.statusLine.set(status);
210
+
211
+ if (!paused && routingCount > 0) {
212
+ const barLength = 20;
213
+ const filledLength = Math.round((sessionSavingsPercent / 100) * barLength);
214
+ const emptyLength = barLength - filledLength;
215
+ const bar = '█'.repeat(filledLength) + '░'.repeat(emptyLength);
216
+ console.log(`\n[${bar}] Troxy: -${sessionSavingsPercent}% saved\n`);
217
+ }
218
+
214
219
  return next(e);
215
220
  });
216
221
  // Routing fails open: a scorer or hook error must never break the session,