Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions CODE_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ C-ABI bindings.
| `python/rustwright/cli.py` | CLI entry points. |
| `python/rustwright/pytest_plugin.py` | Pytest fixtures. |
| `python/playwright/*`, `python/patchright/*`, `python/cloakbrowser/*` | Compatibility import packages. Public alpha compatibility imports should be enabled only through opt-in compatibility mode. |
| `rust-native/` | Native Rust facade crate over `rustwright-core` (crates.io `rustwright`); also the facade `mcp/` consumes. |
| `mcp/` | `rustwright-mcp`: the canonical native Rust MCP stdio server on the promoted engine facade, with its npm packaging under `mcp/npm/`. |
| `rust-native/` | Native Rust facade crate over `rustwright-core` (crates.io `rustwright`); the shared actor consumes this facade. |
| `agent/` | Transport-independent native actor: browser session, tabs, refs, snapshots, actions, cancellation, file confinement, and structured errors. |
| `mcp/` | `rustwright-mcp`: MCP schemas, request-ID adaptation, response shaping, stdio transport, and npm packaging over `rustwright-agent`. |
| `cli/` | Persistent daemon and command/output adapter over `rustwright-agent`; it does not own browser or ref semantics. |
| `node/` | napi-rs binding (in-process, links `rustwright-core` directly). |
| `capi/` | Shared C ABI (`librustwright_capi`) over `rustwright-core`; the boundary for the Go/Java/C#/Ruby/PHP bindings. |
| `go/`, `java/`, `csharp/`, `ruby/`, `php/` | C-ABI language bindings (alpha surface) + per-language conformance runners. |
Expand Down Expand Up @@ -283,12 +285,13 @@ Chrome-for-Testing installer is linux x86_64-only.
without changing the legacy C ABI behavior.
2. Keep every language binding limited to graph materialization, native leaf
conversion, ownership, and public validation.
3. Maintain the generated async Python facade and its ownership checks.
4. Extract Python event waiters/context managers into
3. Keep MCP and CLI code limited to transport, validation, and output shaping.
4. Maintain the generated async Python facade and its ownership checks.
5. Extract Python event waiters/context managers into
`python/rustwright/events.py` (pairs with roadmap track 7).
5. Extract Rust launch/process code into `src/browser/launch.rs`, then CDP
6. Extract Rust launch/process code into `src/browser/launch.rs`, then CDP
transport/session code into `src/cdp/`.
6. Split tests by subsystem after the corresponding code module split.
7. Split tests by subsystem after the corresponding code module split.

The module splits move code without changing ownership; the lightening
roadmap changes ownership (shim → core). When the two conflict, lightening
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = ["browser", "automation", "cdp", "playwright", "chromium"]
categories = ["web-programming"]

[workspace]
members = ["node", "capi", "rust-native"]
members = ["node", "capi", "rust-native", "agent"]
resolver = "2"

[features]
Expand Down
15 changes: 15 additions & 0 deletions agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "rustwright-agent"
version = "0.1.0"
edition = "2024"
publish = false
[features]
test-support = []


[dependencies]
base64 = "=0.22.1"
rustwright = { path = "../rust-native" }
serde = { version = "1.0.194", features = ["derive"] }
serde_json = "1.0.127"
tokio = { version = "1.52.3", features = ["sync", "time"] }
Loading
Loading