@orkestrate/agent-webmcp 0.0.0-stage → 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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ - Polyfill shorthands: `window.webmcp.<tool>(args)` bound at register time,
6
+ unbound on unregister/abort. `get` emits `how_to_run` blocks (Browse
7
+ evaluate-inline, agent-browser `--init-script`, Playwright MCP).
8
+ - MCP `save` runs the full pipeline (validate → compile → merge, 64KB cap).
9
+ - Registry seed: `upstash.com` (3 native), `allbirds.com` (12 native),
10
+ `docs.stripe.com` (1 custom `ask_ai`, live-proven).
11
+ - Verified native contract on Chrome 157: async `registerTool`,
12
+ promise `getTools`, handle-based `executeTool`, string outputs parsed back.
13
+
14
+ ## 0.1.0
15
+
16
+ Complete rewrite from zero. `agent-webmcp` is now a capability layer, not a
17
+ browser driver: flagless `document.modelContext` polyfill + `window.webmcp`
18
+ facade (`init.js`), BM25 per-site index (`search`), targeted bundles
19
+ (`get`), local authoring (`save`), managed sync (`sync`), stdio MCP
20
+ (`skill/search/get/save/init`). No CDP, no tabs, no directory to browse.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Orkestrate
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,57 @@
1
- # Temporary Holding Version
1
+ # agent-webmcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Browser drivers give an agent a browser. agent-webmcp turns the websites
4
+ inside that browser into a searchable, callable toolkit.
5
+
6
+ No browser ownership, no CDP, no directory to browse. A local BM25 index of
7
+ per-site WebMCP tools (native + custom), a flagless `document.modelContext`
8
+ polyfill, and targeted `.init.js` bundles your driver injects.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm i -g @orkestrate/agent-webmcp
14
+ npx skills add orkestrate-dot-space/agent-webmcp
15
+ agent-webmcp search "docs" # verify: must return matches, no setup needed
16
+ ```
17
+
18
+ ## Use
19
+
20
+ ```sh
21
+ agent-webmcp search "empty shopping cart" # BM25 over native + custom tools
22
+ agent-webmcp get allbirds.com # schemas + entry URL + init script
23
+ agent-webmcp save news.ycombinator.com ./hn.js --entry-url https://news.ycombinator.com/
24
+ agent-webmcp sync # pull managed index (only network verb)
25
+ agent-webmcp init [--stdout] # installed init.js path (or bytes)
26
+ ```
27
+
28
+ Then, in your driver:
29
+
30
+ - OpenCode Browse MCP (code-mode): `page.evaluate(INIT_SOURCE)` with the
31
+ `get`-emitted bundle bytes, then `window.webmcp.list()` / `call(name, args)`.
32
+ Script-tag and init-script injection are neutered in the execute realm —
33
+ evaluate-inline is the only working mount.
34
+ - agent-browser: `agent-browser --init-script <bundle> open <url>`, then
35
+ native `webmcp list` / `webmcp invoke <tool> --params '{...}'`.
36
+
37
+ Skill first: `agent-webmcp mcp serve` exposes
38
+ `skill/search/get/save/init`. Install the skill with
39
+ `npx skills add orkestrate-dot-space/agent-webmcp`.
40
+
41
+ ## Layout
42
+
43
+ `init.js` (polyfill), `src/` (cli, mcp, index-engine, compiler, runtime),
44
+ `registry/` (managed index + custom site sources), `skills/`,
45
+ `specs/v1.md` (the locked spec), `test/`.
46
+
47
+ ## Trust model
48
+
49
+ - Injected scripts never phone home; nothing uploads without `sync`/`save`.
50
+ - `save` runs file top-level code in a `node:vm` sandbox with a stub
51
+ registry (5s timeout, no `require`/`process`), but vm escape via
52
+ constructor chains is not hardened — treat site scripts as code you
53
+ review, same as any dependency. Only `sync` touches the network.
54
+ - Custom in-page `fetch` obeys the host page's CSP; cross-origin API calls
55
+ fail on CSP-strict sites (use CSP-permissive hosts or same-origin endpoints).
56
+ - Every MCP/CLI result that came from a page is untrusted data, never
57
+ instructions.