edge-agent-bridge 1.1.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.
- edge_agent_bridge-1.1.0/LICENSE +21 -0
- edge_agent_bridge-1.1.0/PKG-INFO +181 -0
- edge_agent_bridge-1.1.0/README.md +153 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/__init__.py +10 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/bridge.py +432 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/cli.py +1038 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/client.py +4 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/background.js +1371 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/content.js +128 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/icons/icon128.png +0 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/icons/icon16.png +0 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/icons/icon48.png +0 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/manifest.json +42 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/popup.html +107 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge/extension/popup.js +53 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge.egg-info/PKG-INFO +181 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge.egg-info/SOURCES.txt +22 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge.egg-info/dependency_links.txt +1 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge.egg-info/entry_points.txt +3 -0
- edge_agent_bridge-1.1.0/edge_agent_bridge.egg-info/top_level.txt +1 -0
- edge_agent_bridge-1.1.0/pyproject.toml +52 -0
- edge_agent_bridge-1.1.0/setup.cfg +4 -0
- edge_agent_bridge-1.1.0/tests/test_native_mouse.py +159 -0
- edge_agent_bridge-1.1.0/tests/test_realtime.py +109 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shanewas Ahmed
|
|
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.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: edge-agent-bridge
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Real-time AI agent bridge for Microsoft Edge using active browser sessions, CDP hardware events, and WebSockets.
|
|
5
|
+
Author-email: Shanewas Ahmed <shanewas.nabil@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/shanewas/edge-agent-bridge
|
|
8
|
+
Project-URL: Repository, https://github.com/shanewas/edge-agent-bridge
|
|
9
|
+
Project-URL: Issues, https://github.com/shanewas/edge-agent-bridge/issues
|
|
10
|
+
Project-URL: Funding, https://github.com/sponsors/shanewas
|
|
11
|
+
Keywords: edge,browser-automation,agent,cdp,websocket,ai-agents,real-time
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Classifier: Operating System :: POSIX
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Software Development :: Testing
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# Edge Agent Bridge
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/edge-agent-bridge/)
|
|
32
|
+
[](https://pypi.org/project/edge-agent-bridge/)
|
|
33
|
+
[](LICENSE)
|
|
34
|
+
[](https://github.com/sponsors/shanewas)
|
|
35
|
+
[](https://buymeacoffee.com/shanewas)
|
|
36
|
+
|
|
37
|
+
Control your real, active Microsoft Edge tabs directly from Python scripts and CLI commands.
|
|
38
|
+
|
|
39
|
+
Standard browser automation frameworks like Playwright, Puppeteer, and Selenium always spin up clean temporary profiles that don't have your logged-in cookies, which ends up triggering bot checks or breaking on company SSO portals. Edge Agent Bridge skips that headache by attaching straight to your running browser window, so you don't lose your active session, enterprise VPN, or saved logins. It dispatches hardware-level inputs through Chrome DevTools Protocol over a local RFC 6455 WebSocket.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Measured Benchmarks
|
|
44
|
+
|
|
45
|
+
Ran 50 sequential tab queries on Windows 11 to compare round-trip response times:
|
|
46
|
+
|
|
47
|
+
| Setup | P50 Latency | Minimum | Extra Dependencies | Session State |
|
|
48
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
49
|
+
| **Edge Agent Bridge (WebSocket)** | **12.4 ms** | **8.1 ms** | **None (Standard Library)** | Live Edge Tabs |
|
|
50
|
+
| **HTTP Long Polling** | 860 ms | 125 ms | None | Live Edge Tabs |
|
|
51
|
+
| **Playwright Browser Launch** | ~1,800 ms | ~1,200 ms | 5+ packages & binaries | Blank Incognito |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install edge-agent-bridge
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Runs on Python 3.8+ without installing external packages.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Fast Setup
|
|
66
|
+
|
|
67
|
+
1. Open `edge://extensions` in Microsoft Edge and toggle Developer mode on.
|
|
68
|
+
2. Run `edge-bridge extension open` in your terminal to reveal the extension folder.
|
|
69
|
+
3. In Edge, select "Load unpacked" and pick that folder.
|
|
70
|
+
4. Verify the connection by running:
|
|
71
|
+
```bash
|
|
72
|
+
edge-bridge status
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Python API
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from edge_agent_bridge import Edge
|
|
81
|
+
|
|
82
|
+
with Edge() as browser:
|
|
83
|
+
tab = browser.tab()
|
|
84
|
+
print("Active:", tab["tab"]["title"])
|
|
85
|
+
|
|
86
|
+
browser.nav("https://news.ycombinator.com")
|
|
87
|
+
browser.hover("past")
|
|
88
|
+
browser.click("comments")
|
|
89
|
+
browser.fill("Search:", "AI agents")
|
|
90
|
+
|
|
91
|
+
elements = browser.elements()
|
|
92
|
+
print(f"Found {len(elements)} targets")
|
|
93
|
+
|
|
94
|
+
browser.screenshot("hn.png")
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Command Line Interface
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Check daemon and socket state
|
|
103
|
+
edge-bridge status
|
|
104
|
+
|
|
105
|
+
# Query active tab
|
|
106
|
+
edge-bridge tab
|
|
107
|
+
|
|
108
|
+
# List open tabs or jump to specific ID
|
|
109
|
+
edge-bridge tabs
|
|
110
|
+
edge-bridge switch 1234
|
|
111
|
+
|
|
112
|
+
# Hover by visible text label or coordinates
|
|
113
|
+
edge-bridge hover "Settings"
|
|
114
|
+
edge-bridge hover --x 450 --y 320
|
|
115
|
+
|
|
116
|
+
# Hardware click with trusted events
|
|
117
|
+
edge-bridge click "Sign In"
|
|
118
|
+
edge-bridge click "#submit-button"
|
|
119
|
+
|
|
120
|
+
# Double click, right click, or drag and drop
|
|
121
|
+
edge-bridge dblclick "File_01.pdf"
|
|
122
|
+
edge-bridge rightclick "Folder A"
|
|
123
|
+
edge-bridge drag "Task 1" "Done Column"
|
|
124
|
+
|
|
125
|
+
# Fill inputs and dispatch keyboard keys
|
|
126
|
+
edge-bridge fill "Search query" "LangChain vs AutoGPT"
|
|
127
|
+
edge-bridge key Enter
|
|
128
|
+
edge-bridge key Ctrl+A
|
|
129
|
+
|
|
130
|
+
# Extract element text or take viewport snapshots
|
|
131
|
+
edge-bridge text "#results-count"
|
|
132
|
+
edge-bridge screenshot output.png
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Interactive REPL
|
|
138
|
+
|
|
139
|
+
If you're running repeated actions and want to skip Python startup overhead, launch the interactive shell:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
edge-bridge repl
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
=== Edge Bridge Real-Time Interactive REPL ===
|
|
147
|
+
edge> tab
|
|
148
|
+
[11.8ms] {"success": true, "tab": {"id": 1459, "title": "GitHub"}}
|
|
149
|
+
edge> click "Pull requests"
|
|
150
|
+
[14.2ms] {"success": true, "x": 380, "y": 96, "native": true}
|
|
151
|
+
edge> fill "Type / to search" "bugfix"
|
|
152
|
+
[18.9ms] {"success": true, "text": "bugfix", "native": true}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Security Model
|
|
158
|
+
|
|
159
|
+
- **Localhost only**: The daemon binds strictly to `127.0.0.1:18999` and refuses remote network traffic.
|
|
160
|
+
- **Origin check**: Any browser page attempting to open `ws://127.0.0.1:18999/ws` gets rejected with 403 Forbidden, meaning web pages you browse cannot hijack the bridge.
|
|
161
|
+
- **Zero telemetry**: Nothing leaves your computer.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Support & Sponsorship
|
|
166
|
+
|
|
167
|
+
Edge Agent Bridge is built by **Shanewas Ahmed**.
|
|
168
|
+
|
|
169
|
+
If this project saves you engineering hours or simplifies your agent workflows, consider supporting its development:
|
|
170
|
+
|
|
171
|
+
- **GitHub Sponsors**: [github.com/sponsors/shanewas](https://github.com/sponsors/shanewas)
|
|
172
|
+
- **Buy Me a Coffee**: [buymeacoffee.com/shanewas](https://buymeacoffee.com/shanewas)
|
|
173
|
+
- **Ko-fi**: [ko-fi.com/shanewas](https://ko-fi.com/shanewas)
|
|
174
|
+
|
|
175
|
+
Sponsorship helps fund keeping CDP handlers aligned with rapid Chromium engine updates and maintaining zero-dependency Python packages.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Edge Agent Bridge
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/edge-agent-bridge/)
|
|
4
|
+
[](https://pypi.org/project/edge-agent-bridge/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/sponsors/shanewas)
|
|
7
|
+
[](https://buymeacoffee.com/shanewas)
|
|
8
|
+
|
|
9
|
+
Control your real, active Microsoft Edge tabs directly from Python scripts and CLI commands.
|
|
10
|
+
|
|
11
|
+
Standard browser automation frameworks like Playwright, Puppeteer, and Selenium always spin up clean temporary profiles that don't have your logged-in cookies, which ends up triggering bot checks or breaking on company SSO portals. Edge Agent Bridge skips that headache by attaching straight to your running browser window, so you don't lose your active session, enterprise VPN, or saved logins. It dispatches hardware-level inputs through Chrome DevTools Protocol over a local RFC 6455 WebSocket.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Measured Benchmarks
|
|
16
|
+
|
|
17
|
+
Ran 50 sequential tab queries on Windows 11 to compare round-trip response times:
|
|
18
|
+
|
|
19
|
+
| Setup | P50 Latency | Minimum | Extra Dependencies | Session State |
|
|
20
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
21
|
+
| **Edge Agent Bridge (WebSocket)** | **12.4 ms** | **8.1 ms** | **None (Standard Library)** | Live Edge Tabs |
|
|
22
|
+
| **HTTP Long Polling** | 860 ms | 125 ms | None | Live Edge Tabs |
|
|
23
|
+
| **Playwright Browser Launch** | ~1,800 ms | ~1,200 ms | 5+ packages & binaries | Blank Incognito |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install edge-agent-bridge
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Runs on Python 3.8+ without installing external packages.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Fast Setup
|
|
38
|
+
|
|
39
|
+
1. Open `edge://extensions` in Microsoft Edge and toggle Developer mode on.
|
|
40
|
+
2. Run `edge-bridge extension open` in your terminal to reveal the extension folder.
|
|
41
|
+
3. In Edge, select "Load unpacked" and pick that folder.
|
|
42
|
+
4. Verify the connection by running:
|
|
43
|
+
```bash
|
|
44
|
+
edge-bridge status
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Python API
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from edge_agent_bridge import Edge
|
|
53
|
+
|
|
54
|
+
with Edge() as browser:
|
|
55
|
+
tab = browser.tab()
|
|
56
|
+
print("Active:", tab["tab"]["title"])
|
|
57
|
+
|
|
58
|
+
browser.nav("https://news.ycombinator.com")
|
|
59
|
+
browser.hover("past")
|
|
60
|
+
browser.click("comments")
|
|
61
|
+
browser.fill("Search:", "AI agents")
|
|
62
|
+
|
|
63
|
+
elements = browser.elements()
|
|
64
|
+
print(f"Found {len(elements)} targets")
|
|
65
|
+
|
|
66
|
+
browser.screenshot("hn.png")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Command Line Interface
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Check daemon and socket state
|
|
75
|
+
edge-bridge status
|
|
76
|
+
|
|
77
|
+
# Query active tab
|
|
78
|
+
edge-bridge tab
|
|
79
|
+
|
|
80
|
+
# List open tabs or jump to specific ID
|
|
81
|
+
edge-bridge tabs
|
|
82
|
+
edge-bridge switch 1234
|
|
83
|
+
|
|
84
|
+
# Hover by visible text label or coordinates
|
|
85
|
+
edge-bridge hover "Settings"
|
|
86
|
+
edge-bridge hover --x 450 --y 320
|
|
87
|
+
|
|
88
|
+
# Hardware click with trusted events
|
|
89
|
+
edge-bridge click "Sign In"
|
|
90
|
+
edge-bridge click "#submit-button"
|
|
91
|
+
|
|
92
|
+
# Double click, right click, or drag and drop
|
|
93
|
+
edge-bridge dblclick "File_01.pdf"
|
|
94
|
+
edge-bridge rightclick "Folder A"
|
|
95
|
+
edge-bridge drag "Task 1" "Done Column"
|
|
96
|
+
|
|
97
|
+
# Fill inputs and dispatch keyboard keys
|
|
98
|
+
edge-bridge fill "Search query" "LangChain vs AutoGPT"
|
|
99
|
+
edge-bridge key Enter
|
|
100
|
+
edge-bridge key Ctrl+A
|
|
101
|
+
|
|
102
|
+
# Extract element text or take viewport snapshots
|
|
103
|
+
edge-bridge text "#results-count"
|
|
104
|
+
edge-bridge screenshot output.png
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Interactive REPL
|
|
110
|
+
|
|
111
|
+
If you're running repeated actions and want to skip Python startup overhead, launch the interactive shell:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
edge-bridge repl
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
=== Edge Bridge Real-Time Interactive REPL ===
|
|
119
|
+
edge> tab
|
|
120
|
+
[11.8ms] {"success": true, "tab": {"id": 1459, "title": "GitHub"}}
|
|
121
|
+
edge> click "Pull requests"
|
|
122
|
+
[14.2ms] {"success": true, "x": 380, "y": 96, "native": true}
|
|
123
|
+
edge> fill "Type / to search" "bugfix"
|
|
124
|
+
[18.9ms] {"success": true, "text": "bugfix", "native": true}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Security Model
|
|
130
|
+
|
|
131
|
+
- **Localhost only**: The daemon binds strictly to `127.0.0.1:18999` and refuses remote network traffic.
|
|
132
|
+
- **Origin check**: Any browser page attempting to open `ws://127.0.0.1:18999/ws` gets rejected with 403 Forbidden, meaning web pages you browse cannot hijack the bridge.
|
|
133
|
+
- **Zero telemetry**: Nothing leaves your computer.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Support & Sponsorship
|
|
138
|
+
|
|
139
|
+
Edge Agent Bridge is built by **Shanewas Ahmed**.
|
|
140
|
+
|
|
141
|
+
If this project saves you engineering hours or simplifies your agent workflows, consider supporting its development:
|
|
142
|
+
|
|
143
|
+
- **GitHub Sponsors**: [github.com/sponsors/shanewas](https://github.com/sponsors/shanewas)
|
|
144
|
+
- **Buy Me a Coffee**: [buymeacoffee.com/shanewas](https://buymeacoffee.com/shanewas)
|
|
145
|
+
- **Ko-fi**: [ko-fi.com/shanewas](https://ko-fi.com/shanewas)
|
|
146
|
+
|
|
147
|
+
Sponsorship helps fund keeping CDP handlers aligned with rapid Chromium engine updates and maintaining zero-dependency Python packages.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Edge Agent Bridge
|
|
3
|
+
Real-time AI agent control for Microsoft Edge using active browser sessions,
|
|
4
|
+
CDP hardware events, and WebSockets.
|
|
5
|
+
"""
|
|
6
|
+
from .cli import Edge, EdgeClient, send_cmd, ensure_bridge_running
|
|
7
|
+
from .bridge import run_server
|
|
8
|
+
|
|
9
|
+
__version__ = "1.1.0"
|
|
10
|
+
__all__ = ["Edge", "EdgeClient", "send_cmd", "ensure_bridge_running", "run_server"]
|