fastbrowser 0.1.2__tar.gz
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.
- fastbrowser-0.1.2/.gitignore +32 -0
- fastbrowser-0.1.2/CHANGELOG.md +21 -0
- fastbrowser-0.1.2/CONTRIBUTING.md +39 -0
- fastbrowser-0.1.2/Cargo.lock +1810 -0
- fastbrowser-0.1.2/Cargo.toml +81 -0
- fastbrowser-0.1.2/LICENSE +201 -0
- fastbrowser-0.1.2/PKG-INFO +294 -0
- fastbrowser-0.1.2/README.md +311 -0
- fastbrowser-0.1.2/README.zh.md +311 -0
- fastbrowser-0.1.2/benches/perf.rs +239 -0
- fastbrowser-0.1.2/benches/snapshot.rs +64 -0
- fastbrowser-0.1.2/bindings/python/.github/workflows/ci.yml +38 -0
- fastbrowser-0.1.2/bindings/python/.gitignore +14 -0
- fastbrowser-0.1.2/bindings/python/CHANGELOG.md +14 -0
- fastbrowser-0.1.2/bindings/python/Cargo.lock +694 -0
- fastbrowser-0.1.2/bindings/python/Cargo.toml +21 -0
- fastbrowser-0.1.2/bindings/python/LICENSE +201 -0
- fastbrowser-0.1.2/bindings/python/README.md +265 -0
- fastbrowser-0.1.2/bindings/python/README.zh.md +255 -0
- fastbrowser-0.1.2/bindings/python/src/lib.rs +337 -0
- fastbrowser-0.1.2/bindings/python/tests/test_api.py +125 -0
- fastbrowser-0.1.2/bindings/python/tests/test_async.py +62 -0
- fastbrowser-0.1.2/bindings/python/tests/test_basic.py +198 -0
- fastbrowser-0.1.2/bindings/python/tests/test_chromium.py +90 -0
- fastbrowser-0.1.2/build.rs +13 -0
- fastbrowser-0.1.2/docs/api-reference.md +331 -0
- fastbrowser-0.1.2/docs/api-reference.zh.md +599 -0
- fastbrowser-0.1.2/docs/architecture.md +97 -0
- fastbrowser-0.1.2/docs/c-api.md +75 -0
- fastbrowser-0.1.2/docs/engine-trait.md +100 -0
- fastbrowser-0.1.2/docs/snapshot.md +89 -0
- fastbrowser-0.1.2/docs/tool-protocol.md +71 -0
- fastbrowser-0.1.2/examples/agent_loop.rs +61 -0
- fastbrowser-0.1.2/pyproject.toml +41 -0
- fastbrowser-0.1.2/python/fastbrowser/__init__.py +261 -0
- fastbrowser-0.1.2/python/fastbrowser/py.typed +0 -0
- fastbrowser-0.1.2/src/async_core/mod.rs +33 -0
- fastbrowser-0.1.2/src/async_core/orchestrate.rs +381 -0
- fastbrowser-0.1.2/src/async_core/shell.rs +1006 -0
- fastbrowser-0.1.2/src/audit.rs +393 -0
- fastbrowser-0.1.2/src/bin/main.rs +844 -0
- fastbrowser-0.1.2/src/bridge/mod.rs +8 -0
- fastbrowser-0.1.2/src/bridge/runtime.rs +344 -0
- fastbrowser-0.1.2/src/cdp/client.rs +627 -0
- fastbrowser-0.1.2/src/cdp/command.rs +307 -0
- fastbrowser-0.1.2/src/cdp/discovery.rs +239 -0
- fastbrowser-0.1.2/src/cdp/event.rs +106 -0
- fastbrowser-0.1.2/src/cdp/mod.rs +20 -0
- fastbrowser-0.1.2/src/cdp/transport.rs +133 -0
- fastbrowser-0.1.2/src/config.rs +113 -0
- fastbrowser-0.1.2/src/engine/cookie.rs +158 -0
- fastbrowser-0.1.2/src/engine/error.rs +151 -0
- fastbrowser-0.1.2/src/engine/events.rs +161 -0
- fastbrowser-0.1.2/src/engine/host.rs +128 -0
- fastbrowser-0.1.2/src/engine/inject.rs +372 -0
- fastbrowser-0.1.2/src/engine/input.rs +265 -0
- fastbrowser-0.1.2/src/engine/mod.rs +51 -0
- fastbrowser-0.1.2/src/engine/notify.rs +138 -0
- fastbrowser-0.1.2/src/engine/snapshot.rs +278 -0
- fastbrowser-0.1.2/src/engine/tab.rs +114 -0
- fastbrowser-0.1.2/src/engine/trait_.rs +459 -0
- fastbrowser-0.1.2/src/engine/view.rs +206 -0
- fastbrowser-0.1.2/src/engines/bundled.rs +205 -0
- fastbrowser-0.1.2/src/engines/cdp.rs +3089 -0
- fastbrowser-0.1.2/src/engines/cef.rs +186 -0
- fastbrowser-0.1.2/src/engines/mock.rs +2392 -0
- fastbrowser-0.1.2/src/engines/mod.rs +337 -0
- fastbrowser-0.1.2/src/engines/webview.rs +860 -0
- fastbrowser-0.1.2/src/lib.rs +41 -0
- fastbrowser-0.1.2/src/log.rs +33 -0
- fastbrowser-0.1.2/src/png.rs +438 -0
- fastbrowser-0.1.2/src/sdk/device_callback.rs +88 -0
- fastbrowser-0.1.2/src/sdk/ffi.rs +600 -0
- fastbrowser-0.1.2/src/sdk/mod.rs +580 -0
- fastbrowser-0.1.2/src/sdk/plugin.rs +127 -0
- fastbrowser-0.1.2/src/sdk/types.rs +30 -0
- fastbrowser-0.1.2/src/session/cookie.rs +97 -0
- fastbrowser-0.1.2/src/session/manager.rs +204 -0
- fastbrowser-0.1.2/src/session/mod.rs +20 -0
- fastbrowser-0.1.2/src/session/profile.rs +56 -0
- fastbrowser-0.1.2/src/session/session_store.rs +134 -0
- fastbrowser-0.1.2/src/session/storage.rs +60 -0
- fastbrowser-0.1.2/src/tools/advanced.rs +178 -0
- fastbrowser-0.1.2/src/tools/agent.rs +226 -0
- fastbrowser-0.1.2/src/tools/cookies.rs +235 -0
- fastbrowser-0.1.2/src/tools/device.rs +69 -0
- fastbrowser-0.1.2/src/tools/dialog.rs +94 -0
- fastbrowser-0.1.2/src/tools/extract.rs +255 -0
- fastbrowser-0.1.2/src/tools/form.rs +243 -0
- fastbrowser-0.1.2/src/tools/interact.rs +506 -0
- fastbrowser-0.1.2/src/tools/mod.rs +36 -0
- fastbrowser-0.1.2/src/tools/nav.rs +179 -0
- fastbrowser-0.1.2/src/tools/network.rs +184 -0
- fastbrowser-0.1.2/src/tools/page.rs +447 -0
- fastbrowser-0.1.2/src/tools/pdf.rs +74 -0
- fastbrowser-0.1.2/src/tools/registry.rs +219 -0
- fastbrowser-0.1.2/src/tools/tabs.rs +292 -0
- fastbrowser-0.1.2/src/tools/tool.rs +284 -0
- fastbrowser-0.1.2/src/tools/wait.rs +491 -0
- fastbrowser-0.1.2/tests/agent_e2e.rs +171 -0
- fastbrowser-0.1.2/tests/agent_loop.rs +70 -0
- fastbrowser-0.1.2/tests/agent_tools.rs +358 -0
- fastbrowser-0.1.2/tests/async_core_e2e.rs +828 -0
- fastbrowser-0.1.2/tests/bundled_chromium_integration.rs +147 -0
- fastbrowser-0.1.2/tests/chromium_headed_integration.rs +746 -0
- fastbrowser-0.1.2/tests/chromium_integration.rs +2404 -0
- fastbrowser-0.1.2/tests/cli_e2e.rs +362 -0
- fastbrowser-0.1.2/tests/common/mod.rs +256 -0
- fastbrowser-0.1.2/tests/cross_process_tabs.rs +206 -0
- fastbrowser-0.1.2/tests/edge_cases.rs +601 -0
- fastbrowser-0.1.2/tests/end_to_end.rs +139 -0
- fastbrowser-0.1.2/tests/gap_hunting.rs +1081 -0
- fastbrowser-0.1.2/tests/new_features.rs +126 -0
- fastbrowser-0.1.2/tests/perf_smoke.rs +181 -0
- fastbrowser-0.1.2/tests/public_api.rs +164 -0
- fastbrowser-0.1.2/tests/tool_contract.rs +395 -0
- fastbrowser-0.1.2/tests/webview_cabi_e2e.rs +257 -0
- fastbrowser-0.1.2/tests/webview_ops_e2e.rs +343 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Build / packaging artifacts and vendored browsers (self-contained, repo-local)
|
|
2
|
+
/target/
|
|
3
|
+
/dist/
|
|
4
|
+
/c_dist/
|
|
5
|
+
/vendor/
|
|
6
|
+
|
|
7
|
+
*.rs.bk
|
|
8
|
+
.DS_Store
|
|
9
|
+
.idea/
|
|
10
|
+
# Python 绑定产物
|
|
11
|
+
__pycache__/
|
|
12
|
+
*.pyc
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.benchmarks/
|
|
15
|
+
bindings/python/*.egg-info/
|
|
16
|
+
bindings/python/dist/
|
|
17
|
+
bindings/python/build/
|
|
18
|
+
bindings/python/target/
|
|
19
|
+
bindings/python/.venv*/
|
|
20
|
+
bindings/python/.pytest_cache/
|
|
21
|
+
bindings/python/.mypy_cache/
|
|
22
|
+
bindings/python/python/**/*.so
|
|
23
|
+
# Node 绑定产物
|
|
24
|
+
bindings/node/node_modules/
|
|
25
|
+
bindings/node/build/
|
|
26
|
+
bindings/node/*.node
|
|
27
|
+
# Swift 绑定产物
|
|
28
|
+
bindings/swift/.build/
|
|
29
|
+
# Go 绑定产物
|
|
30
|
+
bindings/go/*.test
|
|
31
|
+
# 本地日志
|
|
32
|
+
*.log
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project
|
|
5
|
+
adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-09
|
|
10
|
+
|
|
11
|
+
- Initial release.
|
|
12
|
+
- Engine-agnostic `BrowserEngine` trait (mock / bundled Chromium / external
|
|
13
|
+
Chromium via CDP / CEF / system WebView) with `auto` fallback.
|
|
14
|
+
- LLM-native tool manifest (JSON-Schema params, JSON outputs).
|
|
15
|
+
- Interactive-element snapshot (`PageSnapshot`, a/b/c ids).
|
|
16
|
+
- Real-browser semantics over CDP: coordinate click with Playwright-style
|
|
17
|
+
actionability, real keyboard input, event stream, downloads, OSR frame
|
|
18
|
+
streaming, real PNG screenshots, cookies/storage, file upload, PDF.
|
|
19
|
+
- Profile isolation via CDP `BrowserContext`.
|
|
20
|
+
- Sync shell (CLI / C ABI) and async shell (`AsyncFastbrowser`).
|
|
21
|
+
- C ABI (`fastbrowser_c/`) and bindings (`bindings/`).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Contributing to fastbrowser
|
|
2
|
+
|
|
3
|
+
Thanks for your interest! This is a Rust workspace-free single crate (plus a
|
|
4
|
+
`fastbrowser_c/` C ABI and `bindings/`).
|
|
5
|
+
|
|
6
|
+
## Development
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
# Format / lint / test (mock engine, no browser required)
|
|
10
|
+
cargo fmt --all -- --check
|
|
11
|
+
cargo clippy --features engine-cdp --all-targets
|
|
12
|
+
cargo test --features engine-cdp
|
|
13
|
+
|
|
14
|
+
# Real-Chromium integration tests (auto-SKIP when no browser is found)
|
|
15
|
+
./scripts/fetch-chromium.sh # downloads Chrome for Testing → vendor/chromium
|
|
16
|
+
cargo test --features engine-cdp --test chromium_integration
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Build artifacts (`target/`, `dist/`, `vendor/`) are git-ignored. Override their
|
|
20
|
+
location with `CARGO_TARGET_DIR` / `VENDOR_DIR` if needed.
|
|
21
|
+
|
|
22
|
+
## Language
|
|
23
|
+
|
|
24
|
+
The kernel is **English-only**: everything a host, the CLI, an LLM, or the C ABI
|
|
25
|
+
can see (error messages, JSON results, tool descriptions, log lines, CLI help)
|
|
26
|
+
must be English. Do not add runtime localization to the kernel — hosts own the UI
|
|
27
|
+
language. `scripts/check-english.py` (run in CI) rejects CJK text in code lines;
|
|
28
|
+
keep code and string literals ASCII.
|
|
29
|
+
|
|
30
|
+
## Pull requests
|
|
31
|
+
|
|
32
|
+
- Keep changes focused; add tests for new behavior.
|
|
33
|
+
- Run `cargo fmt` and `cargo clippy` before opening a PR.
|
|
34
|
+
- The public API (`src/sdk/`, `src/engine/`) and the tool manifest
|
|
35
|
+
(`tool_list()`) are considered stable — call out any breaking change.
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
By contributing you agree your contributions are licensed under Apache-2.0.
|