vibatchium 0.5.0__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 (73) hide show
  1. vibatchium-0.5.0/.github/workflows/publish.yml +72 -0
  2. vibatchium-0.5.0/.github/workflows/test.yml +81 -0
  3. vibatchium-0.5.0/.gitignore +31 -0
  4. vibatchium-0.5.0/LICENSE +17 -0
  5. vibatchium-0.5.0/PKG-INFO +155 -0
  6. vibatchium-0.5.0/README.md +103 -0
  7. vibatchium-0.5.0/pyproject.toml +120 -0
  8. vibatchium-0.5.0/tests/__init__.py +0 -0
  9. vibatchium-0.5.0/tests/_imap_server.py +210 -0
  10. vibatchium-0.5.0/tests/conftest.py +83 -0
  11. vibatchium-0.5.0/tests/fixtures/api-test +1 -0
  12. vibatchium-0.5.0/tests/fixtures/iframe.html +6 -0
  13. vibatchium-0.5.0/tests/fixtures/second.html +3 -0
  14. vibatchium-0.5.0/tests/fixtures/simple.html +28 -0
  15. vibatchium-0.5.0/tests/smoke_cloudflare.py +83 -0
  16. vibatchium-0.5.0/tests/test_elements.py +76 -0
  17. vibatchium-0.5.0/tests/test_frames_storage_waits.py +115 -0
  18. vibatchium-0.5.0/tests/test_navigation.py +34 -0
  19. vibatchium-0.5.0/tests/test_observe_profile.py +74 -0
  20. vibatchium-0.5.0/tests/test_p0_fixes.py +111 -0
  21. vibatchium-0.5.0/tests/test_p1_extras.py +99 -0
  22. vibatchium-0.5.0/tests/test_setup_cmd.py +209 -0
  23. vibatchium-0.5.0/tests/test_wave4.py +94 -0
  24. vibatchium-0.5.0/tests/test_wave5_caps.py +123 -0
  25. vibatchium-0.5.0/tests/test_wave5_selfheal.py +148 -0
  26. vibatchium-0.5.0/tests/test_wave5_sessions.py +246 -0
  27. vibatchium-0.5.0/tests/test_wave6_checkpoint.py +205 -0
  28. vibatchium-0.5.0/tests/test_wave6_email.py +200 -0
  29. vibatchium-0.5.0/tests/test_wave6_email_live.py +150 -0
  30. vibatchium-0.5.0/tests/test_wave6_evals.py +152 -0
  31. vibatchium-0.5.0/tests/test_wave6_humanize.py +158 -0
  32. vibatchium-0.5.0/tests/test_wave6_liveview.py +197 -0
  33. vibatchium-0.5.0/tests/test_wave6_proxy.py +254 -0
  34. vibatchium-0.5.0/tests/test_wave6_rest.py +332 -0
  35. vibatchium-0.5.0/tests/test_wave6_safety.py +458 -0
  36. vibatchium-0.5.0/tests/test_wave6_vault.py +259 -0
  37. vibatchium-0.5.0/tests/test_wave6_vision.py +313 -0
  38. vibatchium-0.5.0/tests/test_wave6_warmup.py +150 -0
  39. vibatchium-0.5.0/tests/test_wave7_audit_fixes.py +307 -0
  40. vibatchium-0.5.0/tests/test_wave7_codex_friction.py +160 -0
  41. vibatchium-0.5.0/tests/test_wave7_default_headless.py +85 -0
  42. vibatchium-0.5.0/tests/test_wave7_just_works.py +245 -0
  43. vibatchium-0.5.0/tests/test_wave7_onboarding.py +248 -0
  44. vibatchium-0.5.0/tests/test_wave7_recycle_and_walled.py +167 -0
  45. vibatchium-0.5.0/tests/test_wave7_research.py +197 -0
  46. vibatchium-0.5.0/tests/test_wave7_safety_grayswan.py +329 -0
  47. vibatchium-0.5.0/tests/test_wave7_semantic_selectors.py +203 -0
  48. vibatchium-0.5.0/tests/test_wave7_stealth_gate.py +304 -0
  49. vibatchium-0.5.0/vibatchium/__init__.py +1 -0
  50. vibatchium-0.5.0/vibatchium/cli.py +2575 -0
  51. vibatchium-0.5.0/vibatchium/client.py +119 -0
  52. vibatchium-0.5.0/vibatchium/daemon/__init__.py +25 -0
  53. vibatchium-0.5.0/vibatchium/daemon/backends.py +192 -0
  54. vibatchium-0.5.0/vibatchium/daemon/browser.py +201 -0
  55. vibatchium-0.5.0/vibatchium/daemon/elements.py +211 -0
  56. vibatchium-0.5.0/vibatchium/daemon/handlers.py +1466 -0
  57. vibatchium-0.5.0/vibatchium/daemon/handlers_extra.py +1521 -0
  58. vibatchium-0.5.0/vibatchium/daemon/observe.py +375 -0
  59. vibatchium-0.5.0/vibatchium/daemon/paths.py +254 -0
  60. vibatchium-0.5.0/vibatchium/daemon/registry.py +509 -0
  61. vibatchium-0.5.0/vibatchium/daemon/server.py +395 -0
  62. vibatchium-0.5.0/vibatchium/evals.py +214 -0
  63. vibatchium-0.5.0/vibatchium/humanize.py +195 -0
  64. vibatchium-0.5.0/vibatchium/liveview.py +467 -0
  65. vibatchium-0.5.0/vibatchium/mcp_server.py +836 -0
  66. vibatchium-0.5.0/vibatchium/proxy.py +243 -0
  67. vibatchium-0.5.0/vibatchium/rest.py +353 -0
  68. vibatchium-0.5.0/vibatchium/safety.py +586 -0
  69. vibatchium-0.5.0/vibatchium/secrets.py +447 -0
  70. vibatchium-0.5.0/vibatchium/setup_cmd.py +283 -0
  71. vibatchium-0.5.0/vibatchium/stealth/__init__.py +18 -0
  72. vibatchium-0.5.0/vibatchium/stealth/mouse.py +90 -0
  73. vibatchium-0.5.0/vibatchium/vision.py +395 -0
@@ -0,0 +1,72 @@
1
+ name: publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v3
20
+
21
+ - name: Set up Python
22
+ run: uv python install 3.12
23
+
24
+ - name: Verify tag matches pyproject version
25
+ run: |
26
+ tag="${GITHUB_REF_NAME#v}"
27
+ pyver=$(grep -E '^version = "' pyproject.toml | head -1 | sed -E 's/version = "([^"]+)"/\1/')
28
+ if [ "$tag" != "$pyver" ]; then
29
+ echo "::error::Git tag v$tag does not match pyproject.toml version $pyver"
30
+ exit 1
31
+ fi
32
+
33
+ - name: Build sdist + wheel
34
+ run: uv build
35
+
36
+ - name: Upload artifacts
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: dist
40
+ path: dist/
41
+
42
+ pypi:
43
+ needs: build
44
+ runs-on: ubuntu-latest
45
+ permissions:
46
+ id-token: write
47
+ steps:
48
+ - uses: actions/download-artifact@v4
49
+ with:
50
+ name: dist
51
+ path: dist/
52
+ - uses: pypa/gh-action-pypi-publish@release/v1
53
+
54
+ release:
55
+ needs: pypi
56
+ runs-on: ubuntu-latest
57
+ permissions:
58
+ contents: write
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ - uses: actions/download-artifact@v4
62
+ with:
63
+ name: dist
64
+ path: dist/
65
+ - name: Create GitHub Release
66
+ env:
67
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68
+ run: |
69
+ gh release create "$GITHUB_REF_NAME" \
70
+ --title "$GITHUB_REF_NAME" \
71
+ --generate-notes \
72
+ dist/*
@@ -0,0 +1,81 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ pytest:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.11", "3.12", "3.13"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install system deps (Xvfb + Chrome runtime)
25
+ run: |
26
+ sudo apt-get update -qq
27
+ sudo apt-get install -yq xvfb libnss3 libatk-bridge2.0-0 libdrm2 \
28
+ libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
29
+ libgbm1 libxss1 libasound2t64 || sudo apt-get install -yq libasound2
30
+
31
+ - name: Install vibatchium + extras
32
+ run: |
33
+ python -m pip install -U pip
34
+ # [all] = annotate + llm + liveview + secrets + rest. Required so
35
+ # the vault, live-view, and REST tests can actually run rather than
36
+ # crashing on ModuleNotFoundError. GPL/AGPL extras (stealth-mouse,
37
+ # nodriver) remain opt-in and are not exercised by the CI suite.
38
+ pip install -e ".[all]"
39
+ pip install pytest pytest-asyncio pytest-timeout
40
+
41
+ - name: Install patchright Chrome
42
+ run: |
43
+ patchright install chrome
44
+ patchright install-deps chrome || true
45
+
46
+ - name: Run tests under Xvfb
47
+ env:
48
+ PYTHONUNBUFFERED: "1"
49
+ run: |
50
+ xvfb-run -a -s "-screen 0 1920x1080x24" python -m pytest tests/ -v --tb=short --timeout=60
51
+
52
+ - name: MCP server smoke
53
+ run: |
54
+ xvfb-run -a -s "-screen 0 1920x1080x24" bash -c '
55
+ (echo "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"ci\",\"version\":\"1\"}}}";
56
+ sleep 0.3;
57
+ echo "{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}";
58
+ sleep 0.2;
59
+ echo "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\"}";
60
+ sleep 1) | timeout 10 vb mcp | python -c "
61
+ import json, sys
62
+ for line in sys.stdin:
63
+ try:
64
+ d = json.loads(line)
65
+ if d.get(\"id\") == 2:
66
+ tools = d.get(\"result\", {}).get(\"tools\", [])
67
+ print(f\"MCP tool count: {len(tools)}\")
68
+ assert len(tools) >= 60, f\"too few tools: {len(tools)}\"
69
+ except Exception:
70
+ pass
71
+ "
72
+ '
73
+
74
+ lint:
75
+ runs-on: ubuntu-latest
76
+ steps:
77
+ - uses: actions/checkout@v4
78
+ - uses: actions/setup-python@v5
79
+ with: { python-version: "3.13" }
80
+ - run: pip install ruff
81
+ - run: ruff check vibatchium/ tests/
@@ -0,0 +1,31 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ .venv/
6
+ venv/
7
+ .env
8
+ .envrc
9
+
10
+ # Patchium runtime
11
+ .cache/
12
+ *.sock
13
+ screenshot*.png
14
+ storage*.json
15
+
16
+ # OS / IDE
17
+ .DS_Store
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+
23
+ # Build
24
+ build/
25
+ dist/
26
+ .eggs/
27
+
28
+ # Test
29
+ .pytest_cache/
30
+ .coverage
31
+ htmlcov/
@@ -0,0 +1,17 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 ClavIclar
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.4
2
+ Name: vibatchium
3
+ Version: 0.5.0
4
+ Summary: Patchwright stealth + Vibium-style LLM-friendly CLI for agentic browser automation.
5
+ Project-URL: Homepage, https://github.com/trueoriginlabs/vibatchium
6
+ Project-URL: Issues, https://github.com/trueoriginlabs/vibatchium/issues
7
+ Project-URL: Source, https://github.com/trueoriginlabs/vibatchium
8
+ Author: monodev-eth
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: agent,ai,automation,browser,mcp,patchright,playwright,stealth
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
19
+ Classifier: Topic :: Software Development :: Testing
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: click>=8.1.7
22
+ Requires-Dist: mcp>=1.0.0
23
+ Requires-Dist: patchright>=1.59.0
24
+ Provides-Extra: all
25
+ Requires-Dist: aiohttp>=3.9; extra == 'all'
26
+ Requires-Dist: anthropic>=0.40; extra == 'all'
27
+ Requires-Dist: fastapi>=0.110; extra == 'all'
28
+ Requires-Dist: keyring>=24.0; extra == 'all'
29
+ Requires-Dist: pillow>=10.0; extra == 'all'
30
+ Requires-Dist: pynacl>=1.5; extra == 'all'
31
+ Requires-Dist: uvicorn[standard]>=0.27; extra == 'all'
32
+ Provides-Extra: annotate
33
+ Requires-Dist: pillow>=10.0; extra == 'annotate'
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
36
+ Requires-Dist: pytest-timeout>=2.3; extra == 'dev'
37
+ Requires-Dist: pytest>=8.0; extra == 'dev'
38
+ Requires-Dist: ruff>=0.6.0; extra == 'dev'
39
+ Provides-Extra: liveview
40
+ Requires-Dist: aiohttp>=3.9; extra == 'liveview'
41
+ Provides-Extra: llm
42
+ Requires-Dist: anthropic>=0.40; extra == 'llm'
43
+ Provides-Extra: nodriver
44
+ Requires-Dist: nodriver>=0.50.0; extra == 'nodriver'
45
+ Provides-Extra: rest
46
+ Requires-Dist: fastapi>=0.110; extra == 'rest'
47
+ Requires-Dist: uvicorn[standard]>=0.27; extra == 'rest'
48
+ Provides-Extra: secrets
49
+ Requires-Dist: keyring>=24.0; extra == 'secrets'
50
+ Requires-Dist: pynacl>=1.5; extra == 'secrets'
51
+ Description-Content-Type: text/markdown
52
+
53
+ # vibatchium
54
+
55
+ **Agent-piloted browser automation that clears Cloudflare.**
56
+ Patched Playwright + multi-session daemon + credential vault + vision clicking + prompt-injection safety. One MCP server, N parallel Chromes, persistent per-session profiles.
57
+
58
+ ```
59
+ pipx install git+https://github.com/trueoriginlabs/vibatchium
60
+ patchright install chrome
61
+ vb setup # auto-register with Codex / Claude Code / Cursor (idempotent)
62
+ ```
63
+
64
+ > **Coding agents (Codex / Cursor / Claude Code):** read [`AGENTS.md`](AGENTS.md) first — it has the one-call recipes (`explore`, `research`) and the env-discovery traps to skip.
65
+
66
+ ```
67
+ vb explore https://example.com # one-call: text + screenshot
68
+ vb research --target https://example.com \ # parallel fan-out, N intents
69
+ --intent "pricing model" --intent "customers" --intent "tech stack"
70
+ ```
71
+
72
+ **Status:** active development, alpha. PyPI version lags — install from source / git URL. 384 tests green. 31/31 on bot.sannysoft.com. Cleared HackerOne Cloudflare cold-launch. Apache-2.0 (GPL/AGPL only via opt-in extras).
73
+
74
+ ## Why vibatchium
75
+
76
+ | | Vibium | Patchwright | Browser-Use | vibatchium |
77
+ |---|---|---|---|---|
78
+ | LLM-friendly `@eN` refs + `map` / `diff map` | ✅ | ❌ | ❌ | ✅ |
79
+ | Cloudflare CDP-leak patches | ❌ | ✅ | ❌ | ✅ |
80
+ | **Multiple parallel browsers, one daemon** | ❌ | manual | ❌ | ✅ |
81
+ | Per-session persistent profile (cookies, login) | ✅ | manual | manual | ✅ |
82
+ | CDP-attach to manually-logged-in Chrome | ❌ | manual | ❌ | ✅ |
83
+ | **Encrypted credential vault** (passwords + TOTP) | ❌ | ❌ | ❌ | ✅ |
84
+ | **IMAP email-code polling** (2FA) | ❌ | ❌ | ❌ | ✅ |
85
+ | Per-session proxy + WebRTC leak guard | ❌ | manual | ❌ | ✅ |
86
+ | Vision-first clicking with spend cap | ❌ | ❌ | ✅ | ✅ |
87
+ | **Prompt-injection classifier on scraped content** | ❌ | ❌ | ❌ | ✅ (0% FP / 204 samples) |
88
+ | Live-view stream with takeover (WebSocket) | ❌ | ❌ | partial | ✅ |
89
+ | Bearer-token REST shim + caps gating | ❌ | ❌ | manual | ✅ |
90
+ | `research` command (parallel fan-out) | ❌ | ❌ | ❌ | ✅ |
91
+
92
+ ## Multi-session in 10 lines
93
+
94
+ ```
95
+ vb session new work
96
+ vb --session work start
97
+ vb --session work go https://github.com # log in by hand once
98
+ vb session new banking
99
+ vb --session banking start
100
+ vb --session banking go https://bank.example.com
101
+ vb --session work click @e3 & # truly parallel —
102
+ vb --session banking fill @e5 hi & # separate Chromes, no cookie bleed
103
+ wait
104
+ vb session list
105
+ ```
106
+
107
+ Active-session resolution: `--session FLAG` → `$VIBATCHIUM_SESSION` env → `~/.config/vibatchium/active-session` → `default`. Cap via `VIBATCHIUM_MAX_SESSIONS=4` (default 4).
108
+
109
+ ## Documentation
110
+
111
+ - [`AGENTS.md`](AGENTS.md) — coding-agent contract (Codex / Cursor / Claude Code)
112
+ - [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md) — per-verb reference (every CLI / MCP / REST verb)
113
+ - [`docs/OPERATIONS.md`](docs/OPERATIONS.md) — operator playbook: env vars, recipes, anti-patterns from real runs
114
+ - [`docs/STEALTH.md`](docs/STEALTH.md) — stealth posture, defender clearance, trade-offs
115
+
116
+ ## Server modes
117
+
118
+ | Mode | Surface | Auth |
119
+ |---|---|---|
120
+ | `vb mcp` | stdio JSON-RPC; `--caps=...` gates the bucket set | n/a (stdio) |
121
+ | `vb serve` | FastAPI on `127.0.0.1:8000`; every verb at `POST /v1/<verb>`; WebSocket live-view at `/v1/stream/<session>` | bearer token (`~/.cache/vibatchium/rest-token`, mode 0600) |
122
+
123
+ **REST capability gating**: `vb serve --caps=core,nav,input,vision` restricts the HTTP surface the same way `mcp --caps` does. Without it, REST grants local-code-equivalent access (eval + secret_* + file-writing verbs all exposed) — safe for localhost dev, **not** for hosted/multi-tenant.
124
+
125
+ ## Attach mode — the practical Cloudflare workaround
126
+
127
+ For DataDome / Kasada / hardened auth that walls cold-launch automation:
128
+
129
+ ```
130
+ google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/cdp-profile &
131
+ # log into the walled site by hand
132
+ vb attach http://localhost:9222
133
+ vb go https://target.example.com # now reads as your real browser
134
+ ```
135
+
136
+ Patchright's CDP-layer stealth still applies over `connect_over_cdp` — attach mode gets the same protocol-level patches as cold launch, plus your real-browser fingerprint and any cookies from the manual login.
137
+
138
+ ## Security model
139
+
140
+ Credentials never appear in logs, HAR captures, observe cache, or agent-visible response fields (grep-tested in CI). Vault uses XSalsa20-Poly1305 with key from OS keyring or `VIBATCHIUM_SECRETS_KEY`. All vibatchium-written files are 0600; directories 0700.
141
+
142
+ For the REST shim: without `--caps`, the bearer token grants every verb including `eval`, `secret_*`, and file-writing verbs. Local-code-equivalent — always pass `--caps=...` for hosted-mode. Live-view binds 127.0.0.1 only by default (`--insecure-public` to override).
143
+
144
+ ## Honest limits
145
+
146
+ - **5+ concurrent sessions = 1-2GB RAM.** Each persistent-context Chrome is ~200-400MB. Bump cap with `VIBATCHIUM_MAX_SESSIONS=8`.
147
+ - **Vision spend cap is process-wide.** N fan-out agents share one daily/lifetime budget.
148
+ - **Init scripts don't work on patchright backend.** `chrome.runtime` stays `undefined` — accepted trade for stealth wins ([details](docs/STEALTH.md)).
149
+ - **Login walls (X, LinkedIn) require attach mode.** Cold-launch fan-out can't defeat sites requiring authenticated sessions.
150
+ - **Single daemon = single point of failure.** No HA built in.
151
+ - **PyPI version (0.1.0) is stale.** Install from the git URL above for the current feature surface.
152
+
153
+ ## License
154
+
155
+ Apache-2.0 (core). Optional extras pull their own licenses: `nodriver` (AGPL-3.0), `stealth-mouse` / CDP-Patches (GPL-3.0). Never required for the base install.
@@ -0,0 +1,103 @@
1
+ # vibatchium
2
+
3
+ **Agent-piloted browser automation that clears Cloudflare.**
4
+ Patched Playwright + multi-session daemon + credential vault + vision clicking + prompt-injection safety. One MCP server, N parallel Chromes, persistent per-session profiles.
5
+
6
+ ```
7
+ pipx install git+https://github.com/trueoriginlabs/vibatchium
8
+ patchright install chrome
9
+ vb setup # auto-register with Codex / Claude Code / Cursor (idempotent)
10
+ ```
11
+
12
+ > **Coding agents (Codex / Cursor / Claude Code):** read [`AGENTS.md`](AGENTS.md) first — it has the one-call recipes (`explore`, `research`) and the env-discovery traps to skip.
13
+
14
+ ```
15
+ vb explore https://example.com # one-call: text + screenshot
16
+ vb research --target https://example.com \ # parallel fan-out, N intents
17
+ --intent "pricing model" --intent "customers" --intent "tech stack"
18
+ ```
19
+
20
+ **Status:** active development, alpha. PyPI version lags — install from source / git URL. 384 tests green. 31/31 on bot.sannysoft.com. Cleared HackerOne Cloudflare cold-launch. Apache-2.0 (GPL/AGPL only via opt-in extras).
21
+
22
+ ## Why vibatchium
23
+
24
+ | | Vibium | Patchwright | Browser-Use | vibatchium |
25
+ |---|---|---|---|---|
26
+ | LLM-friendly `@eN` refs + `map` / `diff map` | ✅ | ❌ | ❌ | ✅ |
27
+ | Cloudflare CDP-leak patches | ❌ | ✅ | ❌ | ✅ |
28
+ | **Multiple parallel browsers, one daemon** | ❌ | manual | ❌ | ✅ |
29
+ | Per-session persistent profile (cookies, login) | ✅ | manual | manual | ✅ |
30
+ | CDP-attach to manually-logged-in Chrome | ❌ | manual | ❌ | ✅ |
31
+ | **Encrypted credential vault** (passwords + TOTP) | ❌ | ❌ | ❌ | ✅ |
32
+ | **IMAP email-code polling** (2FA) | ❌ | ❌ | ❌ | ✅ |
33
+ | Per-session proxy + WebRTC leak guard | ❌ | manual | ❌ | ✅ |
34
+ | Vision-first clicking with spend cap | ❌ | ❌ | ✅ | ✅ |
35
+ | **Prompt-injection classifier on scraped content** | ❌ | ❌ | ❌ | ✅ (0% FP / 204 samples) |
36
+ | Live-view stream with takeover (WebSocket) | ❌ | ❌ | partial | ✅ |
37
+ | Bearer-token REST shim + caps gating | ❌ | ❌ | manual | ✅ |
38
+ | `research` command (parallel fan-out) | ❌ | ❌ | ❌ | ✅ |
39
+
40
+ ## Multi-session in 10 lines
41
+
42
+ ```
43
+ vb session new work
44
+ vb --session work start
45
+ vb --session work go https://github.com # log in by hand once
46
+ vb session new banking
47
+ vb --session banking start
48
+ vb --session banking go https://bank.example.com
49
+ vb --session work click @e3 & # truly parallel —
50
+ vb --session banking fill @e5 hi & # separate Chromes, no cookie bleed
51
+ wait
52
+ vb session list
53
+ ```
54
+
55
+ Active-session resolution: `--session FLAG` → `$VIBATCHIUM_SESSION` env → `~/.config/vibatchium/active-session` → `default`. Cap via `VIBATCHIUM_MAX_SESSIONS=4` (default 4).
56
+
57
+ ## Documentation
58
+
59
+ - [`AGENTS.md`](AGENTS.md) — coding-agent contract (Codex / Cursor / Claude Code)
60
+ - [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md) — per-verb reference (every CLI / MCP / REST verb)
61
+ - [`docs/OPERATIONS.md`](docs/OPERATIONS.md) — operator playbook: env vars, recipes, anti-patterns from real runs
62
+ - [`docs/STEALTH.md`](docs/STEALTH.md) — stealth posture, defender clearance, trade-offs
63
+
64
+ ## Server modes
65
+
66
+ | Mode | Surface | Auth |
67
+ |---|---|---|
68
+ | `vb mcp` | stdio JSON-RPC; `--caps=...` gates the bucket set | n/a (stdio) |
69
+ | `vb serve` | FastAPI on `127.0.0.1:8000`; every verb at `POST /v1/<verb>`; WebSocket live-view at `/v1/stream/<session>` | bearer token (`~/.cache/vibatchium/rest-token`, mode 0600) |
70
+
71
+ **REST capability gating**: `vb serve --caps=core,nav,input,vision` restricts the HTTP surface the same way `mcp --caps` does. Without it, REST grants local-code-equivalent access (eval + secret_* + file-writing verbs all exposed) — safe for localhost dev, **not** for hosted/multi-tenant.
72
+
73
+ ## Attach mode — the practical Cloudflare workaround
74
+
75
+ For DataDome / Kasada / hardened auth that walls cold-launch automation:
76
+
77
+ ```
78
+ google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/cdp-profile &
79
+ # log into the walled site by hand
80
+ vb attach http://localhost:9222
81
+ vb go https://target.example.com # now reads as your real browser
82
+ ```
83
+
84
+ Patchright's CDP-layer stealth still applies over `connect_over_cdp` — attach mode gets the same protocol-level patches as cold launch, plus your real-browser fingerprint and any cookies from the manual login.
85
+
86
+ ## Security model
87
+
88
+ Credentials never appear in logs, HAR captures, observe cache, or agent-visible response fields (grep-tested in CI). Vault uses XSalsa20-Poly1305 with key from OS keyring or `VIBATCHIUM_SECRETS_KEY`. All vibatchium-written files are 0600; directories 0700.
89
+
90
+ For the REST shim: without `--caps`, the bearer token grants every verb including `eval`, `secret_*`, and file-writing verbs. Local-code-equivalent — always pass `--caps=...` for hosted-mode. Live-view binds 127.0.0.1 only by default (`--insecure-public` to override).
91
+
92
+ ## Honest limits
93
+
94
+ - **5+ concurrent sessions = 1-2GB RAM.** Each persistent-context Chrome is ~200-400MB. Bump cap with `VIBATCHIUM_MAX_SESSIONS=8`.
95
+ - **Vision spend cap is process-wide.** N fan-out agents share one daily/lifetime budget.
96
+ - **Init scripts don't work on patchright backend.** `chrome.runtime` stays `undefined` — accepted trade for stealth wins ([details](docs/STEALTH.md)).
97
+ - **Login walls (X, LinkedIn) require attach mode.** Cold-launch fan-out can't defeat sites requiring authenticated sessions.
98
+ - **Single daemon = single point of failure.** No HA built in.
99
+ - **PyPI version (0.1.0) is stale.** Install from the git URL above for the current feature surface.
100
+
101
+ ## License
102
+
103
+ Apache-2.0 (core). Optional extras pull their own licenses: `nodriver` (AGPL-3.0), `stealth-mouse` / CDP-Patches (GPL-3.0). Never required for the base install.
@@ -0,0 +1,120 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "vibatchium"
7
+ version = "0.5.0"
8
+ description = "Patchwright stealth + Vibium-style LLM-friendly CLI for agentic browser automation."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = { text = "Apache-2.0" }
12
+ authors = [{ name = "monodev-eth" }]
13
+ keywords = ["browser", "automation", "ai", "agent", "patchright", "stealth", "playwright", "mcp"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: Apache Software License",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Topic :: Software Development :: Testing",
22
+ "Topic :: Internet :: WWW/HTTP :: Browsers",
23
+ ]
24
+ dependencies = [
25
+ "patchright>=1.59.0",
26
+ "click>=8.1.7",
27
+ "mcp>=1.0.0",
28
+ ]
29
+
30
+ [project.optional-dependencies]
31
+ # Pillow is only needed for `screenshot --annotate`.
32
+ annotate = ["pillow>=10.0"]
33
+ # Claude observe→act LLM backend (heuristic backend is always available).
34
+ llm = ["anthropic>=0.40"]
35
+ # Humanized mouse trajectories — defeats Brotector / DataDome aggressive.
36
+ # CDP-Patches is not on PyPI; the published wheel cannot list a git+https
37
+ # direct dependency. Users who want stealth-mouse install it separately:
38
+ # pip install vibatchium
39
+ # pip install git+https://github.com/Kaliiiiiiiiii-Vinyzu/CDP-Patches.git@main
40
+ # Wave 5.4: nodriver backend for the hardest Cloudflare gates. AGPL-3.0
41
+ # (copyleft); commercial integrators should consult licensing.
42
+ nodriver = ["nodriver>=0.50.0"]
43
+ # Wave 6.1a: live-view server (WebSocket frame stream + takeover). Pulls
44
+ # aiohttp for the HTTP+WS surface; ~5 MB install footprint.
45
+ liveview = ["aiohttp>=3.9"]
46
+ # Wave 6.3a: credential vault + TOTP. pynacl for XSalsa20-Poly1305 AEAD;
47
+ # keyring for OS-native key storage (gnome-keyring, macOS Keychain, etc.).
48
+ secrets = ["pynacl>=1.5", "keyring>=24.0"]
49
+ # Wave 6.4a: REST shim — exposes daemon verbs over HTTP for non-shell clients
50
+ # (Docker / hosted mode / language-agnostic agents). FastAPI + uvicorn.
51
+ rest = ["fastapi>=0.110", "uvicorn[standard]>=0.27"]
52
+ # Convenience meta-extras
53
+ # `all` = every advertised feature except GPL/AGPL extras (stealth-mouse, nodriver).
54
+ # Matches the README install guidance — keep these in sync.
55
+ all = [
56
+ "pillow>=10.0", # annotate
57
+ "anthropic>=0.40", # llm + vision
58
+ "aiohttp>=3.9", # liveview
59
+ "pynacl>=1.5", # secrets vault
60
+ "keyring>=24.0", # secrets vault key storage
61
+ "fastapi>=0.110", # rest shim
62
+ "uvicorn[standard]>=0.27", # rest shim
63
+ ]
64
+ dev = ["pytest>=8.0", "pytest-asyncio>=0.23", "pytest-timeout>=2.3", "ruff>=0.6.0"]
65
+
66
+ [project.scripts]
67
+ vb = "vibatchium.cli:main"
68
+
69
+ [project.urls]
70
+ Homepage = "https://github.com/trueoriginlabs/vibatchium"
71
+ Issues = "https://github.com/trueoriginlabs/vibatchium/issues"
72
+ Source = "https://github.com/trueoriginlabs/vibatchium"
73
+
74
+ [tool.hatch.build.targets.wheel]
75
+ packages = ["vibatchium"]
76
+
77
+ [tool.hatch.build.targets.sdist]
78
+ include = [
79
+ "/vibatchium",
80
+ "/README.md",
81
+ "/LICENSE",
82
+ "/pyproject.toml",
83
+ "/tests",
84
+ "/.github",
85
+ ]
86
+ exclude = [
87
+ "**/__pycache__",
88
+ "**/*.pyc",
89
+ "tests/**/*.png",
90
+ "tests/**/*.json",
91
+ ]
92
+
93
+ [tool.hatch.envs.default]
94
+ dependencies = [
95
+ "pytest>=8.0",
96
+ "pytest-asyncio>=0.23",
97
+ "pytest-timeout>=2.3",
98
+ ]
99
+
100
+ [tool.ruff]
101
+ line-length = 100
102
+ target-version = "py311"
103
+
104
+ [tool.ruff.lint]
105
+ select = ["E", "F", "W", "B", "UP"]
106
+ ignore = [
107
+ "E501", # line too long — keep readability
108
+ "B008", # function call in default arg — Click idiom
109
+ "E701", # multi-statement on one line (colon) — guard-clause idiom
110
+ "E702", # multi-statement on one line (semicolon) — compact assigns
111
+ "E731", # lambda assignment — accepted for tiny inline transformers
112
+ "E402", # module-level import not at top — needed for opt-in deferred imports
113
+ ]
114
+
115
+ [tool.ruff.lint.per-file-ignores]
116
+ "tests/*" = ["F841"] # unused locals in tests are fine (assertion of "doesn't raise")
117
+
118
+ [tool.pytest.ini_options]
119
+ asyncio_mode = "auto"
120
+ testpaths = ["tests"]
File without changes