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.
|
|
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
|
-
//
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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,
|