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.
Files changed (118) hide show
  1. fastbrowser-0.1.2/.gitignore +32 -0
  2. fastbrowser-0.1.2/CHANGELOG.md +21 -0
  3. fastbrowser-0.1.2/CONTRIBUTING.md +39 -0
  4. fastbrowser-0.1.2/Cargo.lock +1810 -0
  5. fastbrowser-0.1.2/Cargo.toml +81 -0
  6. fastbrowser-0.1.2/LICENSE +201 -0
  7. fastbrowser-0.1.2/PKG-INFO +294 -0
  8. fastbrowser-0.1.2/README.md +311 -0
  9. fastbrowser-0.1.2/README.zh.md +311 -0
  10. fastbrowser-0.1.2/benches/perf.rs +239 -0
  11. fastbrowser-0.1.2/benches/snapshot.rs +64 -0
  12. fastbrowser-0.1.2/bindings/python/.github/workflows/ci.yml +38 -0
  13. fastbrowser-0.1.2/bindings/python/.gitignore +14 -0
  14. fastbrowser-0.1.2/bindings/python/CHANGELOG.md +14 -0
  15. fastbrowser-0.1.2/bindings/python/Cargo.lock +694 -0
  16. fastbrowser-0.1.2/bindings/python/Cargo.toml +21 -0
  17. fastbrowser-0.1.2/bindings/python/LICENSE +201 -0
  18. fastbrowser-0.1.2/bindings/python/README.md +265 -0
  19. fastbrowser-0.1.2/bindings/python/README.zh.md +255 -0
  20. fastbrowser-0.1.2/bindings/python/src/lib.rs +337 -0
  21. fastbrowser-0.1.2/bindings/python/tests/test_api.py +125 -0
  22. fastbrowser-0.1.2/bindings/python/tests/test_async.py +62 -0
  23. fastbrowser-0.1.2/bindings/python/tests/test_basic.py +198 -0
  24. fastbrowser-0.1.2/bindings/python/tests/test_chromium.py +90 -0
  25. fastbrowser-0.1.2/build.rs +13 -0
  26. fastbrowser-0.1.2/docs/api-reference.md +331 -0
  27. fastbrowser-0.1.2/docs/api-reference.zh.md +599 -0
  28. fastbrowser-0.1.2/docs/architecture.md +97 -0
  29. fastbrowser-0.1.2/docs/c-api.md +75 -0
  30. fastbrowser-0.1.2/docs/engine-trait.md +100 -0
  31. fastbrowser-0.1.2/docs/snapshot.md +89 -0
  32. fastbrowser-0.1.2/docs/tool-protocol.md +71 -0
  33. fastbrowser-0.1.2/examples/agent_loop.rs +61 -0
  34. fastbrowser-0.1.2/pyproject.toml +41 -0
  35. fastbrowser-0.1.2/python/fastbrowser/__init__.py +261 -0
  36. fastbrowser-0.1.2/python/fastbrowser/py.typed +0 -0
  37. fastbrowser-0.1.2/src/async_core/mod.rs +33 -0
  38. fastbrowser-0.1.2/src/async_core/orchestrate.rs +381 -0
  39. fastbrowser-0.1.2/src/async_core/shell.rs +1006 -0
  40. fastbrowser-0.1.2/src/audit.rs +393 -0
  41. fastbrowser-0.1.2/src/bin/main.rs +844 -0
  42. fastbrowser-0.1.2/src/bridge/mod.rs +8 -0
  43. fastbrowser-0.1.2/src/bridge/runtime.rs +344 -0
  44. fastbrowser-0.1.2/src/cdp/client.rs +627 -0
  45. fastbrowser-0.1.2/src/cdp/command.rs +307 -0
  46. fastbrowser-0.1.2/src/cdp/discovery.rs +239 -0
  47. fastbrowser-0.1.2/src/cdp/event.rs +106 -0
  48. fastbrowser-0.1.2/src/cdp/mod.rs +20 -0
  49. fastbrowser-0.1.2/src/cdp/transport.rs +133 -0
  50. fastbrowser-0.1.2/src/config.rs +113 -0
  51. fastbrowser-0.1.2/src/engine/cookie.rs +158 -0
  52. fastbrowser-0.1.2/src/engine/error.rs +151 -0
  53. fastbrowser-0.1.2/src/engine/events.rs +161 -0
  54. fastbrowser-0.1.2/src/engine/host.rs +128 -0
  55. fastbrowser-0.1.2/src/engine/inject.rs +372 -0
  56. fastbrowser-0.1.2/src/engine/input.rs +265 -0
  57. fastbrowser-0.1.2/src/engine/mod.rs +51 -0
  58. fastbrowser-0.1.2/src/engine/notify.rs +138 -0
  59. fastbrowser-0.1.2/src/engine/snapshot.rs +278 -0
  60. fastbrowser-0.1.2/src/engine/tab.rs +114 -0
  61. fastbrowser-0.1.2/src/engine/trait_.rs +459 -0
  62. fastbrowser-0.1.2/src/engine/view.rs +206 -0
  63. fastbrowser-0.1.2/src/engines/bundled.rs +205 -0
  64. fastbrowser-0.1.2/src/engines/cdp.rs +3089 -0
  65. fastbrowser-0.1.2/src/engines/cef.rs +186 -0
  66. fastbrowser-0.1.2/src/engines/mock.rs +2392 -0
  67. fastbrowser-0.1.2/src/engines/mod.rs +337 -0
  68. fastbrowser-0.1.2/src/engines/webview.rs +860 -0
  69. fastbrowser-0.1.2/src/lib.rs +41 -0
  70. fastbrowser-0.1.2/src/log.rs +33 -0
  71. fastbrowser-0.1.2/src/png.rs +438 -0
  72. fastbrowser-0.1.2/src/sdk/device_callback.rs +88 -0
  73. fastbrowser-0.1.2/src/sdk/ffi.rs +600 -0
  74. fastbrowser-0.1.2/src/sdk/mod.rs +580 -0
  75. fastbrowser-0.1.2/src/sdk/plugin.rs +127 -0
  76. fastbrowser-0.1.2/src/sdk/types.rs +30 -0
  77. fastbrowser-0.1.2/src/session/cookie.rs +97 -0
  78. fastbrowser-0.1.2/src/session/manager.rs +204 -0
  79. fastbrowser-0.1.2/src/session/mod.rs +20 -0
  80. fastbrowser-0.1.2/src/session/profile.rs +56 -0
  81. fastbrowser-0.1.2/src/session/session_store.rs +134 -0
  82. fastbrowser-0.1.2/src/session/storage.rs +60 -0
  83. fastbrowser-0.1.2/src/tools/advanced.rs +178 -0
  84. fastbrowser-0.1.2/src/tools/agent.rs +226 -0
  85. fastbrowser-0.1.2/src/tools/cookies.rs +235 -0
  86. fastbrowser-0.1.2/src/tools/device.rs +69 -0
  87. fastbrowser-0.1.2/src/tools/dialog.rs +94 -0
  88. fastbrowser-0.1.2/src/tools/extract.rs +255 -0
  89. fastbrowser-0.1.2/src/tools/form.rs +243 -0
  90. fastbrowser-0.1.2/src/tools/interact.rs +506 -0
  91. fastbrowser-0.1.2/src/tools/mod.rs +36 -0
  92. fastbrowser-0.1.2/src/tools/nav.rs +179 -0
  93. fastbrowser-0.1.2/src/tools/network.rs +184 -0
  94. fastbrowser-0.1.2/src/tools/page.rs +447 -0
  95. fastbrowser-0.1.2/src/tools/pdf.rs +74 -0
  96. fastbrowser-0.1.2/src/tools/registry.rs +219 -0
  97. fastbrowser-0.1.2/src/tools/tabs.rs +292 -0
  98. fastbrowser-0.1.2/src/tools/tool.rs +284 -0
  99. fastbrowser-0.1.2/src/tools/wait.rs +491 -0
  100. fastbrowser-0.1.2/tests/agent_e2e.rs +171 -0
  101. fastbrowser-0.1.2/tests/agent_loop.rs +70 -0
  102. fastbrowser-0.1.2/tests/agent_tools.rs +358 -0
  103. fastbrowser-0.1.2/tests/async_core_e2e.rs +828 -0
  104. fastbrowser-0.1.2/tests/bundled_chromium_integration.rs +147 -0
  105. fastbrowser-0.1.2/tests/chromium_headed_integration.rs +746 -0
  106. fastbrowser-0.1.2/tests/chromium_integration.rs +2404 -0
  107. fastbrowser-0.1.2/tests/cli_e2e.rs +362 -0
  108. fastbrowser-0.1.2/tests/common/mod.rs +256 -0
  109. fastbrowser-0.1.2/tests/cross_process_tabs.rs +206 -0
  110. fastbrowser-0.1.2/tests/edge_cases.rs +601 -0
  111. fastbrowser-0.1.2/tests/end_to_end.rs +139 -0
  112. fastbrowser-0.1.2/tests/gap_hunting.rs +1081 -0
  113. fastbrowser-0.1.2/tests/new_features.rs +126 -0
  114. fastbrowser-0.1.2/tests/perf_smoke.rs +181 -0
  115. fastbrowser-0.1.2/tests/public_api.rs +164 -0
  116. fastbrowser-0.1.2/tests/tool_contract.rs +395 -0
  117. fastbrowser-0.1.2/tests/webview_cabi_e2e.rs +257 -0
  118. 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.