troxy-cli 1.0.0 → 1.0.2

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.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
package/src/activity.js CHANGED
@@ -7,7 +7,8 @@ const DECISION_ICON = { ALLOW: '✓', BLOCK: '✗', ESCALATE: '⏳', NOTIFY: '~'
7
7
  export async function runActivity(flags) {
8
8
  const jwt = requireJwt();
9
9
  const limit = Number(flags.limit || 20);
10
- const rows = await api.activity(jwt, limit);
10
+ const data = await api.activity(jwt, limit);
11
+ const rows = data?.items || [];
11
12
 
12
13
  if (!rows.length) { console.log('\n No activity yet.\n'); return; }
13
14
 
package/src/cards.js CHANGED
@@ -16,9 +16,9 @@ export async function runCards([sub, ...args], flags) {
16
16
  ['Name', 'Last 4', 'Status', 'Budget', 'Used'],
17
17
  cards.map(c => [
18
18
  c.name,
19
- c.last_four ? `···${c.last_four}` : '—',
19
+ c.last4 ? `···${c.last4}` : '—',
20
20
  c.status,
21
- c.monthly_budget ? `$${c.monthly_budget}` : 'no limit',
21
+ c.budget ? `$${c.budget}` : 'no limit',
22
22
  `$${Number(c.budget_used || 0).toFixed(2)}`,
23
23
  ]),
24
24
  );