proxypro-harness 0.1.0

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.
Files changed (3) hide show
  1. package/README.md +54 -0
  2. package/lib/cli.js +35313 -0
  3. package/package.json +28 -0
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # proxypro-harness
2
+
3
+ > Headless [ProxyPro](https://github.com/trongitnlu/proxypro) AI harness — drive a Playwright browser through the ProxyPro capturing proxy and expose it to Claude Code (or any MCP HTTP client), with native action ↔ network-flow correlation.
4
+
5
+ Run ProxyPro's engine + MCP server **without the desktop GUI**, so an AI agent can
6
+ develop and test a web app end-to-end: serve a mocked backend, drive a real
7
+ browser through the proxy, see which network calls each UI action triggered, and
8
+ inject faults — all over MCP.
9
+
10
+ ## Quick start
11
+
12
+ ```bash
13
+ npx proxypro-harness
14
+ # → boots the engine + MCP server on http://127.0.0.1:9091/mcp
15
+ # then connect a client:
16
+ claude mcp add --transport http proxypro http://127.0.0.1:9091/mcp
17
+ ```
18
+
19
+ ## Prerequisites
20
+
21
+ - **Node.js ≥ 18.**
22
+ - **The `proxypro-engine` binary.** This package does not ship it. It is resolved, in order:
23
+ 1. `--engine <path>` flag
24
+ 2. `PROXYPRO_ENGINE` environment variable
25
+ 3. an installed **ProxyPro.app** on macOS (`/Applications/ProxyPro.app/Contents/Resources/proxypro-engine`) — auto-detected, no config needed
26
+ 4. a source build (`make engine` in a checkout)
27
+ - **Chromium.** Auto-installed on first run via `playwright install chromium` (~150 MB, one-time). Skip with `--no-auto-install` and install manually.
28
+
29
+ ## Options
30
+
31
+ | Flag | Default | Description |
32
+ |------|---------|-------------|
33
+ | `--engine <path>` | auto-resolved | Path to the `proxypro-engine` binary. |
34
+ | `--headed` | off (headless) | Launch the browser with a visible window to watch it live. |
35
+ | `--record` | off | Record browser sessions to `.webm` (saved when `browser_close` is called). |
36
+ | `--no-auto-install` | off | Don't auto-install Chromium on first run. |
37
+ | `-h`, `--help` | — | Show help. |
38
+
39
+ ## What you get
40
+
41
+ The harness exposes ProxyPro's engine MCP tools (captures, rules, Map Local mocks,
42
+ replay, SSL proxying) **plus** headless-only browser + correlation tools:
43
+ `browser_launch`, `browser_goto`, `browser_click`, `browser_fill`,
44
+ `browser_snapshot`, `browser_screenshot`, `browser_eval`, `browser_close`, and
45
+ `flows_for_action` / `wait_for_idle` to learn which captured flows each browser
46
+ action triggered.
47
+
48
+ > The browser routes through the proxy with TLS errors ignored (dev convenience).
49
+ > SSL capture defaults to allowlist mode — ask the agent to `set_ssl_proxying_mode("all")`
50
+ > for full visibility during a session.
51
+
52
+ ## License
53
+
54
+ See the ProxyPro repository.