unbrowse 2.12.7 → 3.0.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.
- package/README.md +127 -10
- package/SKILL.md +791 -0
- package/bin/unbrowse-update-hint.mjs +22 -0
- package/bin/unbrowse-wrapper.mjs +107 -0
- package/bin/unbrowse.js +37 -0
- package/dist/cli.js +3387 -500
- package/dist/mcp.js +1983 -0
- package/package.json +15 -6
- package/runtime-src/agent-outcome.ts +166 -0
- package/runtime-src/analytics-session.ts +55 -0
- package/runtime-src/api/browse-index.ts +317 -0
- package/runtime-src/api/browse-session.ts +572 -0
- package/runtime-src/api/browse-submit-prereqs.ts +48 -0
- package/runtime-src/api/browse-submit.ts +1184 -0
- package/runtime-src/api/routes.ts +1357 -32
- package/runtime-src/auth/index.ts +296 -33
- package/runtime-src/auth/runtime.ts +116 -0
- package/runtime-src/browser/index.ts +659 -0
- package/runtime-src/browser/types.ts +41 -0
- package/runtime-src/build-info.generated.ts +6 -0
- package/runtime-src/capture/index.ts +685 -125
- package/runtime-src/capture/prefetch.ts +95 -0
- package/runtime-src/capture/rsc.ts +45 -0
- package/runtime-src/cli/shortcuts.ts +273 -0
- package/runtime-src/cli.ts +1181 -383
- package/runtime-src/client/graph-client.ts +100 -0
- package/runtime-src/client/index.ts +711 -32
- package/runtime-src/execution/index.ts +706 -147
- package/runtime-src/execution/robots.ts +167 -0
- package/runtime-src/execution/search-forms.ts +188 -0
- package/runtime-src/foundry/publish-bundle.ts +392 -0
- package/runtime-src/graph/index.ts +707 -19
- package/runtime-src/graph/planner.ts +411 -0
- package/runtime-src/graph/session.ts +294 -0
- package/runtime-src/graph/trace-store.ts +136 -0
- package/runtime-src/indexer/index.ts +465 -0
- package/runtime-src/intent-match.ts +27 -27
- package/runtime-src/kuri/client.ts +1227 -244
- package/runtime-src/mcp.ts +1698 -0
- package/runtime-src/orchestrator/browser-agent.ts +374 -0
- package/runtime-src/orchestrator/dag-advisor.ts +59 -0
- package/runtime-src/orchestrator/dag-feedback.ts +257 -0
- package/runtime-src/orchestrator/first-pass-action.ts +403 -0
- package/runtime-src/orchestrator/index.ts +2921 -532
- package/runtime-src/orchestrator/passive-publish.ts +187 -0
- package/runtime-src/orchestrator/timing-economics.ts +80 -0
- package/runtime-src/payments/cascade.ts +137 -0
- package/runtime-src/payments/index.ts +270 -0
- package/runtime-src/payments/wallet.ts +98 -0
- package/runtime-src/publish/review-context.ts +93 -0
- package/runtime-src/publish/sanitize.ts +197 -0
- package/runtime-src/publish/schema-review.ts +192 -0
- package/runtime-src/publish-admission.ts +388 -0
- package/runtime-src/reverse-engineer/description-prompt.ts +213 -0
- package/runtime-src/reverse-engineer/index.ts +361 -45
- package/runtime-src/router.ts +17 -0
- package/runtime-src/routing-telemetry.ts +395 -0
- package/runtime-src/runtime/browser-access.ts +11 -0
- package/runtime-src/runtime/browser-auth.ts +12 -0
- package/runtime-src/runtime/browser-host.ts +48 -0
- package/runtime-src/runtime/lifecycle.ts +17 -0
- package/runtime-src/runtime/local-server.ts +227 -22
- package/runtime-src/runtime/paths.ts +13 -5
- package/runtime-src/runtime/setup.ts +56 -1
- package/runtime-src/runtime/supervisor.ts +69 -0
- package/runtime-src/runtime/update-hints.ts +351 -0
- package/runtime-src/server.ts +11 -11
- package/runtime-src/settings.ts +221 -0
- package/runtime-src/single-binary.ts +143 -0
- package/runtime-src/site-policy.ts +54 -0
- package/runtime-src/stale-cleanup-runner.ts +144 -0
- package/runtime-src/stale-cleanup.ts +133 -0
- package/runtime-src/telemetry-attribution.ts +120 -0
- package/runtime-src/telemetry.ts +253 -0
- package/runtime-src/types/skill.ts +581 -2
- package/runtime-src/verification/auth-gate.ts +8 -0
- package/runtime-src/verification/candidates.ts +27 -0
- package/runtime-src/verification/index.ts +35 -14
- package/runtime-src/verification/matrix.ts +30 -0
- package/runtime-src/version.ts +106 -10
- package/runtime-src/workflow/artifact.ts +161 -0
- package/runtime-src/workflow/compile.ts +808 -0
- package/runtime-src/workflow/publish.ts +225 -0
- package/runtime-src/workflow/runtime.ts +213 -0
- package/scripts/postinstall.mjs +120 -0
- package/scripts/release-assets.mjs +28 -0
- package/scripts/verify-release-assets.mjs +43 -0
- package/vendor/kuri/darwin-arm64/kuri +0 -0
- package/vendor/kuri/darwin-x64/kuri +0 -0
- package/vendor/kuri/linux-arm64/kuri +0 -0
- package/vendor/kuri/linux-x64/kuri +0 -0
- package/vendor/kuri/manifest.json +24 -0
- package/runtime-src/transform/schema-hints.ts +0 -358
package/README.md
CHANGED
|
@@ -2,28 +2,85 @@
|
|
|
2
2
|
|
|
3
3
|
This package installs the `unbrowse` CLI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Unbrowse is a local Model Context Protocol (MCP) server and CLI that turns any website into a reusable API interface for agents. It captures network traffic, reverse-engineers the real endpoints underneath the UI, and stores what it learns in a shared marketplace so the next agent can reuse it instantly.
|
|
6
6
|
|
|
7
7
|
One agent learns a site once. Every later agent gets the fast path.
|
|
8
8
|
|
|
9
|
+
Unbrowse is a drop-in replacement for OpenClaw / `agent-browser` browser flows for agents: on the API-native path it is typically ~30x faster, ~90% cheaper, and turns repeated browser work into reusable route assets.
|
|
10
|
+
|
|
9
11
|
> Security note: capture and execution stay local by default. Credentials stay on your machine. Learned API contracts are published to the shared marketplace only after capture. See [SKILL.md](./SKILL.md) for the full agent-facing API reference and tool-policy guidance.
|
|
10
12
|
|
|
13
|
+
## MCP server
|
|
14
|
+
|
|
15
|
+
Unbrowse implements the Model Context Protocol over stdio. `unbrowse mcp` is the MCP server entrypoint.
|
|
16
|
+
|
|
17
|
+
- Protocol: JSON-RPC 2.0 MCP over stdio
|
|
18
|
+
- Handshake: `initialize`, `notifications/initialized`, `ping`
|
|
19
|
+
- Capability surface today: `tools/list` and `tools/call`
|
|
20
|
+
- Current MCP shape: tools only. No `resources/*` or `prompts/*` methods yet.
|
|
21
|
+
- Runtime model: the MCP server fronts the local Unbrowse runtime on `http://localhost:6969`; hosts talk standard MCP, and Unbrowse uses the local HTTP runtime behind the scenes.
|
|
22
|
+
|
|
23
|
+
Core MCP tools:
|
|
24
|
+
|
|
25
|
+
- Discovery: `unbrowse_health`, `unbrowse_search`, `unbrowse_resolve`, `unbrowse_execute`, `unbrowse_feedback`
|
|
26
|
+
- Auth/cache: `unbrowse_login`, `unbrowse_skills`, `unbrowse_skill`, `unbrowse_sessions`
|
|
27
|
+
- Browser capture: `unbrowse_go`, `unbrowse_snap`, `unbrowse_click`, `unbrowse_fill`, `unbrowse_type`, `unbrowse_press`, `unbrowse_select`, `unbrowse_scroll`, `unbrowse_submit`, `unbrowse_screenshot`, `unbrowse_text`, `unbrowse_markdown`, `unbrowse_cookies`, `unbrowse_eval`, `unbrowse_sync`, `unbrowse_close`
|
|
28
|
+
|
|
29
|
+
Typical MCP host config:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"unbrowse": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["-y", "unbrowse", "mcp"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
11
42
|
## Quick start
|
|
12
43
|
|
|
13
44
|
```bash
|
|
14
|
-
#
|
|
15
|
-
|
|
45
|
+
# One-line install from the latest GitHub release
|
|
46
|
+
curl -fsSL https://unbrowse.ai/install.sh | sh
|
|
16
47
|
```
|
|
17
48
|
|
|
18
|
-
|
|
49
|
+
That installer now follows the Kuri pattern: detect platform, download the matching release tarball, install `unbrowse` into `~/.local/bin`, then run `unbrowse setup`.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Deterministic setup from a repo clone
|
|
53
|
+
git clone --single-branch --depth 1 https://github.com/unbrowse-ai/unbrowse.git ~/unbrowse
|
|
54
|
+
cd ~/unbrowse && ./setup --host off
|
|
55
|
+
```
|
|
19
56
|
|
|
20
|
-
|
|
57
|
+
`./setup` installs repo dependencies, prebuilds the packaged CLI runtime, installs a stable `unbrowse` shim, and then runs the real first-time bootstrap: ToS acceptance, agent registration + API-key caching, and wallet detection when present.
|
|
58
|
+
|
|
59
|
+
If a wallet is configured, that wallet address becomes the contributor/payment truth: it is synced onto your agent profile, used as the destination for contributor payouts when your routes earn, and used as the spending wallet for paid marketplace routes.
|
|
60
|
+
|
|
61
|
+
Recommended for new installs: set up Crossmint `lobster.cash` during bootstrap. `unbrowse setup` now encourages it, and when the tooling is already present it will try `npx @crossmint/lobster-cli setup` automatically. That wallet becomes the payout destination for contributed routes and the spending wallet for paid marketplace routes.
|
|
62
|
+
|
|
63
|
+
Unbrowse supports wallet providers such as Crossmint `lobster.cash` for x402-gated routes. If you use `lobster.cash`, set `LOBSTER_WALLET_ADDRESS`. Other providers can use `AGENT_WALLET_ADDRESS` and optional `AGENT_WALLET_PROVIDER`.
|
|
64
|
+
|
|
65
|
+
For repeat npm use after a healthy publish:
|
|
21
66
|
|
|
22
67
|
```bash
|
|
23
68
|
npm install -g unbrowse
|
|
24
69
|
unbrowse setup
|
|
25
70
|
```
|
|
26
71
|
|
|
72
|
+
The npm package is binary-first: install downloads the prebuilt Bun-compiled CLI for your platform. It does not ship the TypeScript runtime or JS fallback launcher.
|
|
73
|
+
On supported platforms, install now fails fast if the matching GitHub release asset is missing or unreachable.
|
|
74
|
+
|
|
75
|
+
For generic MCP hosts:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git clone --single-branch --depth 1 https://github.com/unbrowse-ai/unbrowse.git ~/unbrowse
|
|
79
|
+
cd ~/unbrowse && ./setup --host mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
That writes a ready-to-import MCP config to `~/.config/unbrowse/mcp/unbrowse.json`. A generic template is also published at [`/mcp.json`](https://www.unbrowse.ai/mcp.json).
|
|
83
|
+
|
|
27
84
|
If your agent host uses skills:
|
|
28
85
|
|
|
29
86
|
```bash
|
|
@@ -34,11 +91,28 @@ npx skills add unbrowse-ai/unbrowse
|
|
|
34
91
|
|
|
35
92
|
Unbrowse no longer self-updates at runtime. If you already have Unbrowse installed, upgrade to the latest version after each release or the new flow may not work on your machine.
|
|
36
93
|
|
|
37
|
-
|
|
94
|
+
Check the exact command for your install with:
|
|
38
95
|
|
|
39
96
|
```bash
|
|
40
|
-
|
|
41
|
-
|
|
97
|
+
unbrowse upgrade
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Codex and Claude installs now also get a session-start update hint during `unbrowse setup`, so newer releases are surfaced in the host before the CLI drifts too far behind.
|
|
101
|
+
|
|
102
|
+
If you installed from a repo clone:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
cd ~/unbrowse
|
|
106
|
+
git pull --ff-only
|
|
107
|
+
./setup --host off
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
If you installed for a generic MCP host:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
cd ~/unbrowse
|
|
114
|
+
git pull --ff-only
|
|
115
|
+
./setup --host mcp
|
|
42
116
|
```
|
|
43
117
|
|
|
44
118
|
If your agent host uses skills, rerun its skill install/update command too:
|
|
@@ -49,27 +123,44 @@ npx skills add unbrowse-ai/unbrowse
|
|
|
49
123
|
|
|
50
124
|
Need help or want release updates? Join the Discord: [discord.gg/VWugEeFNsG](https://discord.gg/VWugEeFNsG)
|
|
51
125
|
|
|
52
|
-
Every CLI command auto-starts the local
|
|
126
|
+
Every CLI command auto-starts the local runtime on `http://localhost:6969` by default, and `unbrowse mcp` uses that same runtime behind the MCP stdio surface. Override with `UNBROWSE_URL`, `PORT`, or `HOST`. On first startup it auto-registers as an agent with the marketplace and caches credentials in `~/.unbrowse/config.json`. `unbrowse setup` now prompts for an email-shaped identity first; headless setups can provide `UNBROWSE_AGENT_EMAIL`.
|
|
127
|
+
Public companion docs: [docs.unbrowse.ai](https://docs.unbrowse.ai)
|
|
53
128
|
|
|
54
129
|
Works with Claude Code, Open Code, Cursor, Codex, Windsurf, and any agent host that can call a local CLI or skill.
|
|
55
130
|
|
|
56
131
|
## What setup does
|
|
57
132
|
|
|
58
|
-
- Checks local
|
|
133
|
+
- Checks the local runtime/package-manager environment for the repo bootstrap or packaged CLI path.
|
|
134
|
+
- Prebuilds the packaged CLI runtime and installs the stable `unbrowse` shim for the repo bootstrap path.
|
|
59
135
|
- Verifies the bundled Kuri binary, or builds it from the vendored Kuri source when working from repo source with Zig installed.
|
|
60
136
|
- Registers the Open Code `/unbrowse` command when Open Code is present.
|
|
137
|
+
- Runs the first-use flow: ToS, agent registration/API-key caching, wallet detection, and Crossmint `lobster.cash` encouragement.
|
|
61
138
|
- Starts the local Unbrowse server unless `--no-start` is passed.
|
|
62
139
|
|
|
63
140
|
## Common commands
|
|
64
141
|
|
|
65
142
|
```bash
|
|
66
143
|
unbrowse health
|
|
144
|
+
unbrowse mcp
|
|
67
145
|
unbrowse resolve --intent "get trending searches" --url "https://google.com" --pretty
|
|
68
146
|
unbrowse login --url "https://calendar.google.com"
|
|
69
147
|
unbrowse skills
|
|
70
148
|
unbrowse search --intent "get stock prices"
|
|
71
149
|
```
|
|
72
150
|
|
|
151
|
+
For most MCP hosts, the standard flow is `unbrowse_resolve` first, then `unbrowse_execute`. For JS-heavy or first-time capture workflows, use the browser tool chain: `unbrowse_go -> unbrowse_snap -> action tools -> unbrowse_submit/unbrowse_sync -> unbrowse_close`.
|
|
152
|
+
|
|
153
|
+
## Dependency walk for multi-step UIs
|
|
154
|
+
|
|
155
|
+
Treat each successful browser submit as a dependency boundary.
|
|
156
|
+
|
|
157
|
+
- Do not jump straight to guessed downstream URLs like `/date-selection.html` or `/payment.html` unless the current session already reached them through the real page flow.
|
|
158
|
+
- Use `unbrowse_submit` for the actual transition, then trust the returned `url`, `session_id`, and any next-step hints over your own assumptions.
|
|
159
|
+
- `unbrowse_sync` after a good transition so the route graph records which request chain unlocked the next page.
|
|
160
|
+
- If a page later returns `abandonedCart`, `session_expired`, or a wrong audience/product variant, restart from the last known good upstream step and walk forward again.
|
|
161
|
+
|
|
162
|
+
The dependency graph is not just API-to-API. On JS-heavy checkout flows it also captures browser-state prerequisites: selected product, resident/non-resident audience, date, slot, auth, and cart state. Future agents should reason from those prerequisites before calling deeper steps.
|
|
163
|
+
|
|
73
164
|
## Demo notes
|
|
74
165
|
|
|
75
166
|
- First-time capture/indexing on a site can take 20-80 seconds. That is the slow path; repeats should be much faster.
|
|
@@ -80,6 +171,21 @@ unbrowse search --intent "get stock prices"
|
|
|
80
171
|
|
|
81
172
|
If you tried Unbrowse on a site or API and could not get it to work, add it to [Discussion #53](https://github.com/unbrowse-ai/unbrowse/discussions/53). We use that thread to collect missing or broken targets so we can turn them into requirements for the next eval pass.
|
|
82
173
|
|
|
174
|
+
## Docs
|
|
175
|
+
|
|
176
|
+
The synced skill repo also carries the public docs set:
|
|
177
|
+
|
|
178
|
+
- [Quickstart](./docs/guides/quickstart.md)
|
|
179
|
+
- [API reference](./docs/api.md)
|
|
180
|
+
- [Deployment guide](./docs/deployment.md)
|
|
181
|
+
- [Release checklist](./docs/RELEASING.md)
|
|
182
|
+
|
|
183
|
+
Whitepaper companion docs:
|
|
184
|
+
|
|
185
|
+
- [Whitepaper companion index](./docs/whitepaper/README.md)
|
|
186
|
+
- [For Technical Readers](./docs/whitepaper/for-technical-readers.md)
|
|
187
|
+
- [For Investors](./docs/whitepaper/for-investors.md)
|
|
188
|
+
|
|
83
189
|
## How it works
|
|
84
190
|
|
|
85
191
|
When an agent asks for something, Unbrowse first searches the marketplace for an existing skill. If one exists with enough confidence, it executes immediately. If not, Unbrowse captures the site, learns the APIs behind it, publishes a reusable skill, and executes that instead.
|
|
@@ -135,6 +241,7 @@ Non-GET endpoints (POST, PUT, DELETE) require explicit confirmation:
|
|
|
135
241
|
|
|
136
242
|
- `dry_run: true` — preview what would execute without side effects
|
|
137
243
|
- `confirm_unsafe: true` — explicit user consent to proceed
|
|
244
|
+
- `confirm_third_party_terms: true` — extra explicit confirmation for policy-sensitive domains/actions such as X write endpoints
|
|
138
245
|
|
|
139
246
|
GET endpoints auto-execute. Mutations never fire without opt-in.
|
|
140
247
|
|
|
@@ -157,6 +264,16 @@ See [SKILL.md](./SKILL.md) for the full API reference including all endpoints, s
|
|
|
157
264
|
| GET | `/v1/stats/summary` | Platform stats |
|
|
158
265
|
| GET | `/health` | Health check |
|
|
159
266
|
|
|
267
|
+
## Docs
|
|
268
|
+
|
|
269
|
+
The standalone skill repo also carries the core repo docs:
|
|
270
|
+
|
|
271
|
+
- [Quickstart guide](./docs/guides/quickstart.md)
|
|
272
|
+
- [API notes](./docs/api.md)
|
|
273
|
+
- [Codex eval harness](./docs/codex-eval-harness.md)
|
|
274
|
+
- [Deployment notes](./docs/deployment.md)
|
|
275
|
+
- [Release checklist](./docs/RELEASING.md)
|
|
276
|
+
|
|
160
277
|
## Configuration
|
|
161
278
|
|
|
162
279
|
### Runtime directories
|