troxy-cli 1.2.4 → 1.2.5

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/bin/troxy.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { runInit } from '../src/init.js';
3
3
  import { runUninstall } from '../src/uninstall.js';
4
4
  import { runMcp } from '../src/mcp-server.js';
5
- import { runLogin, clearSession, requireKey, getKeySource } from '../src/auth.js';
5
+ import { runLogin, clearSession, requireKey, requireJwt, getKeySource } from '../src/auth.js';
6
6
  import { runPolicies } from '../src/policies.js';
7
7
  import { runMcps } from '../src/mcps.js';
8
8
  import { runActivity } from '../src/activity.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
package/src/policies.js CHANGED
@@ -126,7 +126,17 @@ function _condSummary(p) {
126
126
  }
127
127
 
128
128
  function _condDetail(p) {
129
- const c = p.conditions || [];
130
- if (!c.length) return 'none (always matches)';
131
- return c.map(x => `${x.field} ${x.operator} ${x.value || ''}${x.value2 ? '–'+x.value2 : ''}`).join(' AND ');
129
+ const c = p.conditions || [];
130
+ const or = p.or_conditions || [];
131
+ const parts = [];
132
+ if (c.length) {
133
+ parts.push(c.map(x => `${x.field} ${x.operator} ${x.value || ''}${x.value2 ? '–'+x.value2 : ''}`).join(' AND '));
134
+ }
135
+ if (or.length) {
136
+ or.forEach(row => {
137
+ const conds = (row.conditions || []).map(x => `${x.field} ${x.operator} ${x.value || ''}`).join(' AND ');
138
+ parts.push(`${row.action}${conds ? ' if ' + conds : ''}`);
139
+ });
140
+ }
141
+ return parts.length ? parts.join('\n ') : 'none (always matches)';
132
142
  }