@troxy/cli 0.1.0 → 0.1.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,10 +1,10 @@
1
1
  {
2
2
  "name": "@troxy/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
7
- "troxy": "./bin/troxy.js"
7
+ "troxy": "bin/troxy.js"
8
8
  },
9
9
  "scripts": {
10
10
  "test": "node --test src/tests/*.test.js"
@@ -15,6 +15,10 @@
15
15
  "engines": {
16
16
  "node": ">=18"
17
17
  },
18
+ "files": [
19
+ "bin/",
20
+ "src/"
21
+ ],
18
22
  "keywords": ["mcp", "ai", "payments", "policy", "agents"],
19
23
  "license": "MIT"
20
24
  }
package/src/api.js CHANGED
@@ -48,3 +48,6 @@ export const api = {
48
48
  // Evaluate (agent API key)
49
49
  evaluate: (body, apiKey) => request('POST', '/evaluate', { apiKey, body }),
50
50
  };
51
+
52
+ // Named export for backwards compat with init.js + mcp-server.js
53
+ export const evaluatePayment = (body, apiKey) => api.evaluate(body, apiKey);
@@ -1,63 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- tags: ['v*']
7
- pull_request:
8
- branches: [main]
9
-
10
- jobs:
11
- # ─────────────────────────────────────────────
12
- # TEST — runs on every push and PR
13
- # ─────────────────────────────────────────────
14
- test:
15
- name: Test (Node ${{ matrix.node }})
16
- runs-on: ubuntu-latest
17
-
18
- strategy:
19
- matrix:
20
- node: ['18', '20', '22']
21
-
22
- steps:
23
- - uses: actions/checkout@v4
24
-
25
- - name: Setup Node.js ${{ matrix.node }}
26
- uses: actions/setup-node@v4
27
- with:
28
- node-version: ${{ matrix.node }}
29
- cache: npm
30
-
31
- - name: Install dependencies
32
- run: npm ci
33
-
34
- - name: Run tests
35
- run: npm test
36
-
37
- # ─────────────────────────────────────────────
38
- # PUBLISH — runs only on version tags (v*)
39
- # Requires NPM_TOKEN secret in repo settings
40
- # ─────────────────────────────────────────────
41
- publish:
42
- name: Publish to npm
43
- runs-on: ubuntu-latest
44
- needs: test
45
- if: startsWith(github.ref, 'refs/tags/v')
46
-
47
- steps:
48
- - uses: actions/checkout@v4
49
-
50
- - name: Setup Node.js
51
- uses: actions/setup-node@v4
52
- with:
53
- node-version: '20'
54
- registry-url: 'https://registry.npmjs.org'
55
- cache: npm
56
-
57
- - name: Install dependencies
58
- run: npm ci
59
-
60
- - name: Publish
61
- run: npm publish --access public
62
- env:
63
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}