troxy-cli 1.29.21 → 1.29.22

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.21",
3
+ "version": "1.29.22",
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": {
package/src/init.js CHANGED
@@ -951,10 +951,20 @@ async function maybeEnableTroxyInterception(proxyOptIn, hasDesktop, configPath =
951
951
 
952
952
  if (interceptionIsConfigured(configPath)) return; // already set up correctly, nothing to ask
953
953
 
954
+ // No auto-started background service on Windows yet (installService throws
955
+ // there), so pointing Claude Code at 127.0.0.1 would break every call
956
+ // after a reboot. Policies still work; the engine waits for Windows support.
957
+ if (process.platform === 'win32') {
958
+ console.log('\n The Troxy engine (lighter Claude Code requests) is not available on');
959
+ console.log(' Windows yet. Policies work. Mac and Linux get the engine today.');
960
+ return;
961
+ }
962
+
954
963
  let enable = proxyOptIn === true;
955
964
  if (proxyOptIn === null && process.stdin.isTTY) {
956
- console.log("\n Route Claude Code's model calls through Troxy for automatic cost");
957
- console.log(' optimization? Your normal Claude login (subscription or API key) still');
965
+ console.log("\n Turn on the Troxy engine? Claude Code's requests go through Troxy and");
966
+ console.log(' are made lighter, so your usage goes further. Your normal Claude login');
967
+ console.log(' (subscription or API key) still');
958
968
  console.log(' pays - Troxy never substitutes its own credential. Troxy does see your');
959
969
  console.log(' real credential in transit, forwarded upstream to actually make the');
960
970
  console.log(' call to Anthropic on your behalf.');
@@ -69,7 +69,7 @@ describe('reprovisionKeyConsumers: desktop detection gate', () => {
69
69
  it('maybeEnableTroxyInterception runs migration before the enable/proxyOptIn decision, so it always fires', () => {
70
70
  const fnStart = initSrc.indexOf('async function maybeEnableTroxyInterception');
71
71
  assert.ok(fnStart !== -1, 'maybeEnableTroxyInterception not found');
72
- const fnBody = initSrc.slice(fnStart, fnStart + 1000);
72
+ const fnBody = initSrc.slice(fnStart, fnStart + 2000);
73
73
  const migrateIdx = fnBody.indexOf('migrateBaseUrlProxyToInterception(');
74
74
  const optInIdx = fnBody.indexOf('proxyOptIn === true');
75
75
  assert.ok(migrateIdx !== -1, 'migrateBaseUrlProxyToInterception call not found in function body');