pop-pay 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -13,7 +13,24 @@ The runtime security layer for AI agent commerce. Card credentials are injected
13
13
 
14
14
  ## Getting Started
15
15
 
16
- Add pop-pay to your MCP client config:
16
+ ### 1. Initialize the credential vault
17
+
18
+ ```bash
19
+ npx -y pop-pay pop-init-vault
20
+ ```
21
+
22
+ This encrypts your card credentials into `~/.config/pop-pay/vault.enc` (AES-256-GCM). The MCP server decrypts automatically at startup.
23
+
24
+ For stronger protection (recommended — blocks agents with shell access):
25
+
26
+ ```bash
27
+ npx -y pop-pay pop-init-vault --passphrase # one-time setup
28
+ npx -y pop-pay pop-unlock # run once before each session
29
+ ```
30
+
31
+ ### 2. Add to your MCP client
32
+
33
+ Standard config for any MCP-compatible client:
17
34
 
18
35
  ```json
19
36
  {
@@ -22,11 +39,7 @@ Add pop-pay to your MCP client config:
22
39
  "command": "npx",
23
40
  "args": ["-y", "pop-pay", "launch-mcp"],
24
41
  "env": {
25
- "POP_CDP_URL": "http://localhost:9222",
26
- "POP_ALLOWED_CATEGORIES": "[\"aws\",\"cloudflare\"]",
27
- "POP_MAX_PER_TX": "100.0",
28
- "POP_MAX_DAILY": "500.0",
29
- "POP_GUARDRAIL_ENGINE": "keyword"
42
+ "POP_CDP_URL": "http://localhost:9222"
30
43
  }
31
44
  }
32
45
  }
@@ -38,49 +51,38 @@ Add pop-pay to your MCP client config:
38
51
  <details>
39
52
  <summary>Claude Code</summary>
40
53
 
41
- ```bash
42
- claude mcp add pop-pay -- npx -y pop-pay launch-mcp
43
- ```
44
-
45
- With environment variables:
54
+ Claude Code uses its own CLI — the JSON config above is not needed.
46
55
 
47
56
  ```bash
48
- claude mcp add pop-pay \
49
- -e POP_CDP_URL=http://localhost:9222 \
50
- -e POP_ALLOWED_CATEGORIES='["aws","cloudflare"]' \
51
- -e POP_MAX_PER_TX=100.0 \
52
- -e POP_MAX_DAILY=500.0 \
53
- -e POP_GUARDRAIL_ENGINE=keyword \
54
- -- npx -y pop-pay launch-mcp
57
+ claude mcp add --scope user pop-pay -- npx -y pop-pay launch-mcp
55
58
  ```
56
59
 
57
- </details>
58
-
59
- <details>
60
- <summary>Cursor</summary>
61
-
62
- Add to `~/.cursor/mcp.json` using the standard config block above.
60
+ `--scope user` makes it available across all projects. To remove: `claude mcp remove pop-pay`
63
61
 
64
62
  </details>
65
63
 
66
64
  <details>
67
- <summary>Windsurf</summary>
65
+ <summary>Cursor / Windsurf / VS Code</summary>
68
66
 
69
- Add to `~/.codeium/windsurf/mcp_config.json` using the standard config block above.
67
+ Add the JSON config above to:
68
+ - **Cursor**: `~/.cursor/mcp.json`
69
+ - **Windsurf**: `~/.codeium/windsurf/mcp_config.json`
70
+ - **VS Code (Copilot)**: `.vscode/mcp.json` in project root
70
71
 
71
72
  </details>
72
73
 
73
74
  <details>
74
- <summary>VS Code (Copilot)</summary>
75
+ <summary>OpenClaw / NemoClaw</summary>
75
76
 
76
- Add to `.vscode/mcp.json` in your project root using the standard config block above.
77
+ OpenClaw has its own CLI the JSON config above is not needed.
77
78
 
78
- </details>
79
+ ```bash
80
+ openclaw mcp add pop-pay -- npx -y pop-pay launch-mcp
81
+ ```
79
82
 
80
- <details>
81
- <summary>OpenClaw / NemoClaw</summary>
83
+ Or add to `~/.openclaw/mcp_servers.json` using the JSON config above.
82
84
 
83
- Compatible with any MCP host. See the [Integration Guide](./docs/INTEGRATION_GUIDE.md) for setup instructions and System Prompt templates.
85
+ For System Prompt templates and NemoClaw sandbox setup, see [Integration Guide §4](./docs/INTEGRATION_GUIDE.md).
84
86
 
85
87
  </details>
86
88
 
@@ -91,26 +93,17 @@ Compatible with any MCP host. See the [Integration Guide](./docs/INTEGRATION_GUI
91
93
  docker-compose up -d
92
94
  ```
93
95
 
94
- Runs the MCP server + headless Chromium with CDP. Mount your encrypted vault from the host. See `docker-compose.yml` for configuration.
96
+ Runs the MCP server + headless Chromium with CDP. Mount your encrypted vault from the host.
95
97
 
96
98
  </details>
97
99
 
98
- ## Vault Setup
99
-
100
- Credentials are stored in an AES-256-GCM encrypted vault — plaintext card data never touches disk.
101
-
102
- ```bash
103
- npx pop-init-vault
104
- ```
105
-
106
- **Passphrase mode** (recommended — protects against agents with shell access):
100
+ ### 3. Launch Chrome with CDP and start using
107
101
 
108
102
  ```bash
109
- npx pop-init-vault --passphrase # one-time setup
110
- npx pop-unlock # run once before each MCP session
103
+ npx -y pop-pay launch
111
104
  ```
112
105
 
113
- `pop-unlock` derives the key from your passphrase and stores it in the OS keyring. The MCP server reads it automatically at startup.
106
+ Restart your MCP client. The agent now has access to pop-pay's MCP tools.
114
107
 
115
108
  ## MCP Tools
116
109
 
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * pop-pay CLI dispatcher.
4
+ * Routes subcommands to the appropriate module.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=cli-main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-main.d.ts","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * pop-pay CLI dispatcher.
5
+ * Routes subcommands to the appropriate module.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const node_fs_1 = require("node:fs");
9
+ const node_path_1 = require("node:path");
10
+ function getVersion() {
11
+ try {
12
+ const pkgPath = (0, node_path_1.join)(__dirname, "..", "package.json");
13
+ const pkg = JSON.parse((0, node_fs_1.readFileSync)(pkgPath, "utf8"));
14
+ return pkg.version;
15
+ }
16
+ catch {
17
+ return "unknown";
18
+ }
19
+ }
20
+ function showHelp() {
21
+ console.log(`pop-pay v${getVersion()} — Semantic Payment Guardrail for AI Agents
22
+
23
+ Usage: pop-pay <command> [options]
24
+
25
+ Commands:
26
+ launch-mcp Start the MCP server (stdio transport)
27
+ launch Launch Chrome with CDP remote debugging
28
+ init-vault Initialize the encrypted credential vault
29
+ unlock Unlock the vault for the current session
30
+ dashboard Start the monitoring dashboard
31
+
32
+ Options:
33
+ -v, --version Show version
34
+ -h, --help Show this help message`);
35
+ }
36
+ async function main() {
37
+ const subcommand = process.argv[2];
38
+ if (!subcommand || subcommand === "--help" || subcommand === "-h") {
39
+ showHelp();
40
+ return;
41
+ }
42
+ if (subcommand === "--version" || subcommand === "-v") {
43
+ console.log(getVersion());
44
+ return;
45
+ }
46
+ switch (subcommand) {
47
+ case "launch-mcp":
48
+ process.argv.splice(2, 1);
49
+ await import("./mcp-server.js");
50
+ break;
51
+ case "launch":
52
+ case "pop-launch":
53
+ process.argv.splice(2, 1);
54
+ await import("./cli.js");
55
+ break;
56
+ case "init-vault":
57
+ case "pop-init-vault":
58
+ process.argv.splice(2, 1);
59
+ await import("./cli-vault.js");
60
+ break;
61
+ case "unlock":
62
+ case "pop-unlock":
63
+ // Keep "unlock" in argv — cli-vault.ts detects it via process.argv.includes("unlock")
64
+ process.argv[2] = "unlock";
65
+ await import("./cli-vault.js");
66
+ break;
67
+ case "dashboard":
68
+ process.argv.splice(2, 1);
69
+ await import("./cli-dashboard.js");
70
+ break;
71
+ default:
72
+ console.error(`Unknown command: ${subcommand}\n`);
73
+ showHelp();
74
+ process.exit(1);
75
+ }
76
+ }
77
+ main().catch((err) => {
78
+ console.error("pop-pay:", err.message ?? err);
79
+ process.exit(1);
80
+ });
81
+ //# sourceMappingURL=cli-main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-main.js","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":";;AAEA;;;GAGG;;AAEH,qCAAuC;AACvC,yCAAiC;AAEjC,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACtD,MAAM,GAAG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AY;YACf,sFAAsF;YACtF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;YAC3B,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;YAC/B,MAAM;QAER,KAAK,WAAW;YACd,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1B,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;YACnC,MAAM;QAER;YACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,UAAU,IAAI,CAAC,CAAC;YAClD,QAAQ,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "pop-pay",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Point One Percent - Semantic Payment Guardrail for AI Agents. It only takes 0.1% of hallucination to drain 100% of your wallet.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
8
+ "pop-pay": "dist/cli-main.js",
8
9
  "pop-launch": "dist/cli.js",
9
10
  "pop-init-vault": "dist/cli-vault.js",
10
- "pop-unlock": "dist/cli-vault.js",
11
- "pop-pay": "dist/cli-dashboard.js"
11
+ "pop-unlock": "dist/cli-vault.js"
12
12
  },
13
13
  "scripts": {
14
14
  "build": "tsc",