claude-chrome-android 1.5.1 → 1.7.0
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.
- package/README.md +157 -0
- package/dist/claude-code-bridge.crx +0 -0
- package/dist/cli.js +1190 -428
- package/dist/edge-claude-ext/background.js +61 -6
- package/dist/edge-claude-ext/content.js +308 -5
- package/dist/edge-claude-ext/launcher.js +60 -79
- package/dist/edge-claude-ext/manifest.json +1 -1
- package/dist/edge-claude-ext/popup.html +13 -0
- package/dist/edge-claude-ext/popup.js +51 -47
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -77,6 +77,71 @@ It never silently installs base Edge (no Play/APKMirror API — you tap Install)
|
|
|
77
77
|
and never touches the signing keystore. Non-interactive launches (e.g. spawned
|
|
78
78
|
by `termux-url-opener`) skip the prompts and just print a one-line hint.
|
|
79
79
|
|
|
80
|
+
## Codex user configuration
|
|
81
|
+
|
|
82
|
+
Codex uses the existing stdio relay without running `--setup`. Configure
|
|
83
|
+
`~/.codex/config.toml` (absolute Termux paths avoid inherited PATH problems):
|
|
84
|
+
|
|
85
|
+
```toml
|
|
86
|
+
[mcp_servers.cfc-bridge]
|
|
87
|
+
command = "/data/data/com.termux/files/usr/bin/node"
|
|
88
|
+
args = ["/data/data/com.termux/files/home/git/termux-tools/bridge/dist/cli.js", "--mcp"]
|
|
89
|
+
startup_timeout_sec = 15
|
|
90
|
+
tool_timeout_sec = 60
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Verification on 2026-09-05: relay 1.5.1 initialized, advertised 18 tools, and
|
|
94
|
+
read `tabs_context_mcp` from the running bridge 1.12.1 with one extension client.
|
|
95
|
+
An initial browser request timed out; a subsequent end-to-end request succeeded.
|
|
96
|
+
Browser focus and tabs were not changed. CDP reported disconnected, so this
|
|
97
|
+
checks the extension relay, not every CDP-dependent tool.
|
|
98
|
+
|
|
99
|
+
<!-- TODO: Fix cmdSetup registration: it currently writes ~/.claude/settings.json,
|
|
100
|
+
which the project specification documents as the wrong MCP registration file.
|
|
101
|
+
Use the explicit Codex configuration above; do not run --setup for Codex. -->
|
|
102
|
+
|
|
103
|
+
### Rechecked with Codex 0.157.1 (2026-09-27)
|
|
104
|
+
|
|
105
|
+
The user configuration had changed to HTTP `http://127.0.0.1:18963/mcp`, but its
|
|
106
|
+
local daemon was down, so CFC tools were absent from the session. Started the
|
|
107
|
+
existing built daemon with Node and restored the stdio configuration above;
|
|
108
|
+
stdio discovery works without a connected browser. The existing HTTP transport
|
|
109
|
+
also passed initialization and advertised 18 tools when the daemon was running.
|
|
110
|
+
Both configured stdio servers then initialized successfully: CFC advertised 18
|
|
111
|
+
tools and PAL 9.8.2 advertised 18 tools; no provider inference was needed.
|
|
112
|
+
A read-only `tabs_context_mcp` call succeeded through the live Edge Canary
|
|
113
|
+
extension after an initial disconnect. Starting app focus was restored afterward.
|
|
114
|
+
The extension disconnected again when Edge stopped/backgrounded; open Edge for
|
|
115
|
+
browser calls. Restart Codex to load the changed MCP transport. Existing bridge
|
|
116
|
+
source/build edits were preserved and were not included in this documentation
|
|
117
|
+
commit. No new daemon boot service was installed.
|
|
118
|
+
|
|
119
|
+
<!-- TODO: Verify CFC daemon startup and extension connection across backgrounding
|
|
120
|
+
and device reboot; tool registration is verified, persistent availability is not. -->
|
|
121
|
+
|
|
122
|
+
## PAL alongside CFC (2026-09-05)
|
|
123
|
+
|
|
124
|
+
The sibling `../pal-mcp-server` clone already matched upstream HEAD `7afc7c1`
|
|
125
|
+
and latest release 9.8.2. Codex now launches its existing
|
|
126
|
+
`.pal_venv/bin/python` with the absolute `server.py` path, replacing the uvx Git
|
|
127
|
+
installation and invalid non-Termux PATH override. No system packages changed.
|
|
128
|
+
User credentials remain in private configuration, never in this repository.
|
|
129
|
+
|
|
130
|
+
PAL's existing model registries now include Astra (`gpt-6-astra`), Sol
|
|
131
|
+
(`gpt-5.6-sol`), Gemini Pro (`gemini-3.1-pro-preview`), Gemini Flash
|
|
132
|
+
(`gemini-3.8-flash`), and Fable (`anthropic/claude-fable-5.1`). Both Codex and
|
|
133
|
+
PAL's private `.env` select `astra` by default and restrict provider lists to
|
|
134
|
+
these five models. OpenAI uses Responses; Fable uses OpenRouter. Gemini aliases
|
|
135
|
+
are `pro3.1` and `flash3.8`; upstream historical aliases remain unchanged.
|
|
136
|
+
|
|
137
|
+
Both MCP servers initialized through their configured commands; PAL advertised
|
|
138
|
+
exactly five models and all five answered synthetic chat requests from an empty
|
|
139
|
+
temporary directory with no files, images, or conversation history attached.
|
|
140
|
+
Model metadata was loaded through PAL's typed registry classes. The existing
|
|
141
|
+
cryptography 46.0.5 wheel produces a platform warning from `pip check`, but its
|
|
142
|
+
native SHA-256 operation and the HTTPS model calls work. No runtime dependency
|
|
143
|
+
upgrade was needed. Test-only pytest packages were added to PAL's virtualenv.
|
|
144
|
+
|
|
80
145
|
## Important
|
|
81
146
|
|
|
82
147
|
The bridge **must be running before** starting a Claude Code session. MCP tools are registered at session startup — if the bridge is down, the tools won't appear.
|
|
@@ -94,9 +159,57 @@ The bridge serves the CRX at `http://127.0.0.1:18963/ext/crx` — open this URL
|
|
|
94
159
|
| `BRIDGE_TOKEN` | *(empty)* | Optional shared secret for auth |
|
|
95
160
|
| `BRIDGE_LOG_LEVEL` | `info` | debug, info, warn, error |
|
|
96
161
|
| `CDP_PORT` | `9223` | ADB forward port for Chrome DevTools Protocol |
|
|
162
|
+
| `BRIDGE_ADB_SERIAL` | *(this phone)* | adb serial of the device to automate. Unset, the bridge picks the attached device whose `boot_id` matches the phone it runs on, then the first one running Edge Canary |
|
|
163
|
+
| `BRIDGE_WAKE_FROZEN_TABS` | `1` | `0` makes tools fail fast on a tab Edge has frozen instead of briefly showing Edge to wake it |
|
|
164
|
+
|
|
165
|
+
## Working while Edge is in the background
|
|
166
|
+
|
|
167
|
+
Tools keep working when another app (Termux, a game, anything) is in front.
|
|
168
|
+
Android and Edge get in the way in three ways, and the bridge handles each:
|
|
169
|
+
|
|
170
|
+
1. **Android freezes Edge's tab processes** about 40–60 s after Edge leaves the
|
|
171
|
+
foreground. Before each tool the bridge exempts new ones with
|
|
172
|
+
`cmd activity unfreeze --sticky` over adb (once per process, at most every 10 s).
|
|
173
|
+
2. **Edge freezes some hidden pages itself**, often within a couple of minutes.
|
|
174
|
+
Such a page still answers synchronous `javascript_tool` code but runs no timers,
|
|
175
|
+
promises or extension page tools. The bridge checks the target page first and,
|
|
176
|
+
if it is frozen, wakes it: Edge shows for about a second, then the app you were
|
|
177
|
+
using comes back. It does not wake while the screen is off, the phone is
|
|
178
|
+
locked or a call is active, nor more than once every 5 s. In those cases (or
|
|
179
|
+
with `BRIDGE_WAKE_FROZEN_TABS=0`) page tools fail in about 2 s with the reason,
|
|
180
|
+
instead of timing out after 30 s.
|
|
181
|
+
3. **Hidden tabs are throttled**: timers fire about once a minute and
|
|
182
|
+
`requestAnimationFrame` never fires. Click and scroll results on a hidden tab
|
|
183
|
+
say so; re-read the page before relying on what the input changed.
|
|
184
|
+
|
|
185
|
+
Screenshots have to bring Edge forward to render a frame; the previously
|
|
186
|
+
focused app is restored afterwards. `GET /health` reports these layers under
|
|
187
|
+
`cdp.background` (renderers exempted, frozen pages found, wakes, skipped wakes
|
|
188
|
+
and the last reason).
|
|
97
189
|
|
|
98
190
|
## Changelog
|
|
99
191
|
|
|
192
|
+
### 1.7.0
|
|
193
|
+
|
|
194
|
+
- Tools work while Edge is not the foreground app: Edge's renderer processes are exempted from Android's cached-apps freezer; tabs Edge froze itself are detected and woken (screen on, unlocked, no call; refocuses the previous app), or fail in ~2 s with the reason (`BRIDGE_WAKE_FROZEN_TABS=0`)
|
|
195
|
+
- Tab ids always resolve to their own tab: an unknown URL is refreshed from the extension instead of falling back to the first page, and duplicate URLs prefer an unclaimed target
|
|
196
|
+
- Screenshots restore the previously focused app after `Page.bringToFront`; the adb screencap fallback refuses to capture another app
|
|
197
|
+
- adb device choice prefers the phone the bridge runs on (`boot_id` match) when several devices are attached
|
|
198
|
+
- Per-tool outcome and duration in the bridge log; background-layer counters in `/health`
|
|
199
|
+
- Extension 1.13.0: page requests no longer wait on a throttled timer, page-script waits fit inside the 30 s tool timeout, tab-less tools skip the per-tab queue, `navigate` reports a load that did not finish
|
|
200
|
+
|
|
201
|
+
### 1.6.0
|
|
202
|
+
|
|
203
|
+
### 1.6.0
|
|
204
|
+
|
|
205
|
+
- Direct Streamable-HTTP MCP transport on the bridge daemon (`POST /mcp`, stateless, origin/host checked, optional `BRIDGE_TOKEN` bearer auth) so Codex and other MCP clients connect without a per-session relay subprocess; the stdio relay (`--mcp`) answers `ping` and negotiates protocol version 2025-03-26
|
|
206
|
+
- Tool results from the extension are normalised to standard MCP content blocks (`{type:"image", mimeType, data}`), nested extension errors surface as `isError`, and the relay timeout outlasts the bridge's 30 s queue timeout so a late reply is never delivered to a different client
|
|
207
|
+
- Screenshots are scaled below 2000 px per axis and 4 MB before they leave the bridge
|
|
208
|
+
- Pressure, tilt and twist pen strokes via CDP `Input.dispatchMouseEvent` (`pen_stroke` tool); verified to deliver trusted PointerEvents on Edge Canary
|
|
209
|
+
- Extension 1.12.1: tap-to-remove element zapper with a Reveal action for blur/opacity paywalls, operad dashboard token on daemon bridge-launch calls, extension startup and share-fallback repairs
|
|
210
|
+
- `--setup-edge` pins a single ADB serial even when a stale offline device is listed
|
|
211
|
+
- Bridge sources are now typechecked (`npm run typecheck`, also in CI)
|
|
212
|
+
|
|
100
213
|
### 1.5.1
|
|
101
214
|
|
|
102
215
|
- Fix setup-edge probes failing with "more than one device/emulator" when multiple ADB devices are listed (e.g. a stale offline one): resolve and pin a single serial (`ADB_SERIAL`/`BRIDGE_ADB_SERIAL`, else the sole online device) on every adb call; status output shows the targeted serial
|
|
@@ -131,3 +244,47 @@ The bridge serves the CRX at `http://127.0.0.1:18963/ext/crx` — open this URL
|
|
|
131
244
|
## License
|
|
132
245
|
|
|
133
246
|
MIT
|
|
247
|
+
|
|
248
|
+
### Validation completion (2026-09-05)
|
|
249
|
+
|
|
250
|
+
PAL's final non-integration suite passed: **866 passed, 4 skipped, 16 deselected**
|
|
251
|
+
with two AsyncMock warnings. Scoped mypy passed the four updated test files.
|
|
252
|
+
The expanded Gemini catalog changes automatic fast/balanced selection to 3.8
|
|
253
|
+
Flash; test expectations were updated after the original-catalog comparison
|
|
254
|
+
passed all 61 tests in the affected files.
|
|
255
|
+
|
|
256
|
+
Gemini currently uses provider-default thinking. PAL's legacy numeric
|
|
257
|
+
thinking-budget controls are not enabled for these Gemini 3.x entries.
|
|
258
|
+
<!-- TODO: Add tested Gemini 3.x thinking-level mapping in PAL. -->
|
|
259
|
+
|
|
260
|
+
## Pressure-sensitive pen strokes
|
|
261
|
+
|
|
262
|
+
`pen_stroke` sends trusted Chromium pen events with per-sample pressure, tilt X/Y,
|
|
263
|
+
barrel rotation, and timing. Start the bridge with an explicit device:
|
|
264
|
+
|
|
265
|
+
```sh
|
|
266
|
+
BRIDGE_ADB_SERIAL=192.168.0.190:39351 node bridge/dist/cli.js
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Refresh `tabs_context_mcp` and pass a unique `tabId`, or supply an exact CDP page
|
|
270
|
+
`targetId`. Coordinates are viewport CSS pixels, not physical screen pixels.
|
|
271
|
+
|
|
272
|
+
```json
|
|
273
|
+
{"targetId":"CDP_PAGE_TARGET_ID","points":[
|
|
274
|
+
{"x":120,"y":180,"pressure":0.15,"tiltX":-30,"tiltY":15,"twist":20,"timeMs":0},
|
|
275
|
+
{"x":180,"y":190,"pressure":0.85,"tiltX":30,"tiltY":10,"twist":60,"timeMs":100}
|
|
276
|
+
]}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The same payload is accepted by `POST /pen-stroke` on the local bridge. When
|
|
280
|
+
`BRIDGE_TOKEN` is configured, send `Authorization: Bearer <token>`. The MCP relay
|
|
281
|
+
forwards its configured token automatically. Reconnect MCP clients to discover
|
|
282
|
+
the new tool; the browser extension does not need reinstalling.
|
|
283
|
+
|
|
284
|
+
Limits: 1–512 samples, pressure 0–1, tilt −90…90 degrees, twist 0–359 degrees,
|
|
285
|
+
nondecreasing `timeMs` up to 20,000. Omitted tilt/twist default to zero; omitted
|
|
286
|
+
times default to sample index × 8 ms. Strokes are validated before input, reject
|
|
287
|
+
overlapping pen requests, and attempt zero-pressure release after failures.
|
|
288
|
+
A failed stroke can be partially painted: inspect before retrying. Closed or
|
|
289
|
+
ambiguous targets fail; pen input never falls back to the first page or a mouse.
|
|
290
|
+
This is browser input, not Android-wide S Pen emulation.
|
|
Binary file
|