troxy-cli 1.29.35 → 1.29.36

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.35",
3
+ "version": "1.29.36",
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": {
@@ -112,8 +112,6 @@ function troxyCommand(args, paused) {
112
112
  return { paused, text: paused ? 'Troxy routing is off. Type /troxy on to resume.' : 'Troxy routing is on. Type /troxy off to pause it.' };
113
113
  }
114
114
 
115
- // Whether this session has shown its one "Troxy is active" notice yet.
116
- let announced = false;
117
115
 
118
116
  // Session savings tracking: cumulative % savings from routing
119
117
  let sessionSavingsPercent = 0;
@@ -177,10 +175,7 @@ async function* routeStep($, e, next) {
177
175
  if (savings > 0) {
178
176
  routingCount += 1;
179
177
  sessionSavingsPercent = Math.round((sessionSavingsPercent * (routingCount - 1) + savings) / routingCount);
180
- }
181
- if (!announced) {
182
- announced = true;
183
- $.ui.toast(`Troxy is active · Session: -${sessionSavingsPercent}% saved`);
178
+ $.ui.toast(`Troxy routed to cheaper model · -${savings}% on this turn`);
184
179
  }
185
180
  const sid = await $.session.id();
186
181
  const file = modRouteFile($.plugin.root, sid);
@@ -204,7 +199,7 @@ export function register(on) {
204
199
  await $.store.set('paused', r.paused);
205
200
  return { text: r.text };
206
201
  });
207
- // Visual savings bar in terminal output
202
+ // Show session savings bar on every turn
208
203
  on('turn.start', async ($, e, next) => {
209
204
  const paused = Boolean(await $.store.get('paused'));
210
205
 
@@ -213,7 +208,7 @@ export function register(on) {
213
208
  const filledLength = Math.round((sessionSavingsPercent / 100) * barLength);
214
209
  const emptyLength = barLength - filledLength;
215
210
  const bar = '█'.repeat(filledLength) + '░'.repeat(emptyLength);
216
- console.log(`\n[${bar}] Troxy: -${sessionSavingsPercent}% saved\n`);
211
+ $.ui.toast(`[${bar}] Session: -${sessionSavingsPercent}% saved`);
217
212
  }
218
213
 
219
214
  return next(e);