ai-browser-bridge 0.2.0 → 0.3.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.es.md CHANGED
@@ -55,7 +55,7 @@ Cuatro capas, cada una con un solo trabajo:
55
55
  |------|------------|-----------------|
56
56
  | **CLI** | Ink / React | Interfaz de terminal: panel de mensajes, barra de estado, menciones `@file`, comandos `/`. |
57
57
  | **Navegador** | Playwright + Chrome DevTools Protocol | Controla la pestaña real de ChatGPT y captura respuestas. Los selectores están aislados en `src/browser/chatgpt-page.ts` para que los cambios de UI sean fáciles de arreglar. |
58
- | **Servidor MCP** | MCP SDK + Zod | Expone las herramientas locales del repositorio a ChatGPT como handlers validados por esquema y en sandbox. |
58
+ | **Servidor MCP** | MCP SDK + Effect Schema | Expone las herramientas locales del repositorio a ChatGPT como handlers validados por esquema y en sandbox. |
59
59
  | **Túnel** | Cloudflare Tunnel (`cloudflared`) | Da al servidor MCP local una URL HTTPS pública temporal que el conector de ChatGPT puede alcanzar — sin despliegue. |
60
60
 
61
61
  **¿Por qué un túnel?** El conector MCP de ChatGPT llama a las herramientas por HTTPS, pero el servidor de herramientas se ejecuta en tu máquina. En lugar de desplegar nada, el bridge levanta un túnel efímero de Cloudflare (`*.trycloudflare.com`) frente al puerto local y sincroniza esa URL `…/mcp` con la app de ChatGPT al iniciar. (ngrok resolvería el mismo problema de alcance; se usa `cloudflared` de Cloudflare porque sus túneles rápidos no requieren cuenta ni token.)
@@ -162,7 +162,7 @@ Los agentes sin acceso a shell obtienen el mismo ciclo de vida como **herramient
162
162
 
163
163
  Flow requiere un plan **Google AI Pro/Ultra**. Como los renders de Veo tardan minutos, `--provider flow` espera una respuesta mucho más tiempo que los proveedores de chat.
164
164
 
165
- **Mantenimiento de selectores:** los selectores de Flow fueron **verificados en vivo (LIVE-VERIFIED)** contra un editor de proyecto con sesión iniciada. Si Google cambia la UI, vuelve a capturarlos con `node src/scripts/dev/captureProviderSelectors.mjs`, luego actualiza [`src/config/providersConfig.ts`](src/config/providersConfig.ts); la generación vive en [`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts) y el CRUD de recursos en [`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts).
165
+ **Mantenimiento de selectores:** los selectores de Flow fueron **verificados en vivo (LIVE-VERIFIED)** contra un editor de proyecto con sesión iniciada. Si Google cambia la UI, vuelve a capturarlos con `node src/scripts/maintain/captureProviderSelectors.mjs`, luego actualiza [`src/config/index.ts`](src/config/index.ts); la generación vive en [`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts) y el CRUD de recursos en [`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts).
166
166
 
167
167
  ## Limitaciones
168
168
 
package/README.he.md CHANGED
@@ -59,7 +59,7 @@
59
59
  |------|-----------|--------|
60
60
  | **CLI** | Ink / React | ממשק טרמינל: חלונית הודעות, שורת סטטוס, אזכורי `@file`, פקודות `/`. |
61
61
  | **דפדפן** | Playwright + Chrome DevTools Protocol | מפעיל את לשונית ה-ChatGPT האמיתית ולוכד תשובות. הסלקטורים מבודדים ב-`src/browser/chatgpt-page.ts` כך ששינויי UI קלים לתיקון. |
62
- | **שרת MCP** | MCP SDK + Zod | חושף את כלי הריפו המקומיים ל-ChatGPT כ-handlers מאומתי-סכמה ומוגני-sandbox. |
62
+ | **שרת MCP** | MCP SDK + Effect Schema | חושף את כלי הריפו המקומיים ל-ChatGPT כ-handlers מאומתי-סכמה ומוגני-sandbox. |
63
63
  | **מנהרה** | Cloudflare Tunnel (`cloudflared`) | מעניק לשרת ה-MCP המקומי כתובת HTTPS ציבורית זמנית שה-connector של ChatGPT יכול להגיע אליה — ללא פריסה. |
64
64
 
65
65
  **למה בכלל מנהרה?** ה-connector של ChatGPT קורא לכלים דרך HTTPS, אבל שרת הכלים רץ על המחשב שלכם. במקום לפרוס משהו, ה-bridge מקים מנהרת Cloudflare זמנית (`*.trycloudflare.com`) מול הפורט המקומי ומסנכרן את כתובת ה-`…/mcp` הזו אל אפליקציית ChatGPT בעת ההפעלה. (‏ngrok היה פותר את אותה בעיית נגישות; נבחר `cloudflared` של Cloudflare מכיוון שמנהרות ה-quick שלו אינן דורשות חשבון או טוקן.)
@@ -190,7 +190,7 @@ bridge flow project-delete --yes # מחיקה לצמיתות של הפר
190
190
 
191
191
  ‏Flow דורש תוכנית **Google AI Pro/Ultra**. מכיוון שרינדור ב-Veo אורך דקות, `--provider flow` ממתין לתשובה הרבה יותר זמן מספקי הצ'אט.
192
192
 
193
- **תחזוקת סלקטורים:** הסלקטורים של Flow **אומתו בזמן אמת (LIVE-VERIFIED)** מול עורך פרויקט מחובר. אם Google משנה את ה-UI, בצעו לכידה מחדש עם `node src/scripts/dev/captureProviderSelectors.mjs`, ואז עדכנו את [`src/config/providersConfig.ts`](src/config/providersConfig.ts); היצירה נמצאת ב-[`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts) וה-CRUD של הנכסים ב-[`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts).
193
+ **תחזוקת סלקטורים:** הסלקטורים של Flow **אומתו בזמן אמת (LIVE-VERIFIED)** מול עורך פרויקט מחובר. אם Google משנה את ה-UI, בצעו לכידה מחדש עם `node src/scripts/maintain/captureProviderSelectors.mjs`, ואז עדכנו את [`src/config/index.ts`](src/config/index.ts); היצירה נמצאת ב-[`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts) וה-CRUD של הנכסים ב-[`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts).
194
194
 
195
195
  ## מגבלות
196
196
 
package/README.md CHANGED
@@ -25,7 +25,7 @@ ChatGPT is at its best in the browser — real account state, the model picker,
25
25
  ## Features
26
26
 
27
27
  - **Terminal-driven ChatGPT** — send prompts and stream replies without leaving the shell; the real browser conversation stays the source of truth.
28
- - **Seven providers, one command** — `chatgpt`, `gemini`, `claude`, `deepseek`, `grok`, `perplexity`, plus `flow` (Google's Veo video studio — a generation surface, not a chat). Pick one with `--provider`, or **fan out** across several (`--provider claude,deepseek,grok`) and get every reply keyed by provider in one call.
28
+ - **Nine providers, one command** — `chatgpt`, `gemini`, `claude`, `deepseek`, `grok`, `perplexity`, `duck` ([Duck.ai](https://duck.ai/chat)), `arena` ([Arena](https://arena.ai/code/direct) — Direct/Battle/Agent/Side-by-Side + model picker), plus `flow` (Google's Veo video studio — a generation surface, not a chat). Pick one with `--provider`, or **fan out** across several (`--provider claude,deepseek,duck`) and get every reply keyed by provider in one call.
29
29
  - **Built for agents** — a stable non-interactive `bridge ask … --json` contract (never hangs in a pipe) plus an outbound MCP `ask` tool, so any agent can drive a web chat.
30
30
  - **Sandboxed local tools over MCP** — every file operation is validated against the selected repo root; no arbitrary shell, allowlisted test commands only.
31
31
  - **Browser actions as commands** — `/resume`, `/new`, `/model`, `/rewind`, `/stop`, `/context`, `/diff`, `/compact`, and more.
@@ -57,7 +57,7 @@ Four layers, each with one job:
57
57
  |-------|------|----------------|
58
58
  | **CLI** | Ink / React | Terminal UI: message pane, status line, `@file` mentions, `/commands`. |
59
59
  | **Browser** | Playwright + Chrome DevTools Protocol | Attaches to Chrome on the debug port and reuses one shared bridge Chrome profile. Lifecycle/status/cache code lives in `src/features/browser/`; provider selectors live under `src/features/providers/<name>/`. |
60
- | **MCP server** | MCP SDK + Zod | Exposes the local repo tools to ChatGPT, Claude, and Grok as schema-validated, sandboxed handlers. |
60
+ | **MCP server** | MCP SDK + Effect Schema | Exposes the local repo tools to ChatGPT, Claude, and Grok as schema-validated, sandboxed handlers. |
61
61
  | **Tunnel** | Cloudflare Tunnel (`cloudflared`) | Gives the local MCP server a temporary public HTTPS URL that provider connectors can reach — no deployment required. |
62
62
 
63
63
  **Why a tunnel at all?** Provider MCP connectors call tools over HTTPS, but the tool server runs on your machine. Rather than deploy anything, the bridge spins up an ephemeral Cloudflare Tunnel (`*.trycloudflare.com`) in front of the local port and syncs that Streamable HTTP `…/mcp` URL into the provider app on startup. (ngrok would solve the same reachability problem; Cloudflare's `cloudflared` is used because its quick tunnels need no account or auth token. Grok's UI may show an `/sse` example — the bridge registers `/mcp` because cloudflared quick tunnels do not support SSE.)
@@ -257,6 +257,27 @@ For full MCP on Gemini, use the official [Gemini API Remote MCP](https://ai.goog
257
257
 
258
258
  **Selector maintenance:** when Google changes the Gemini web UI, fix selectors only in [`src/features/providers/gemini/geminiPage.ts`](src/features/providers/gemini/geminiPage.ts).
259
259
 
260
+ ## Arena.ai support
261
+
262
+ The bridge drives **[Arena](https://arena.ai/code/direct)** (LMSYS) with a dedicated adapter for the mode menu and model picker:
263
+
264
+ | Mode | `--model` token | URL |
265
+ |------|-----------------|-----|
266
+ | **Direct** (default) | `direct` | `/code/direct` — one model |
267
+ | **Battle Mode** | `battle` | `/code` — Option A/B (dual reply when both finish) |
268
+ | **Agent Mode** | `agent` | `/agent` — agent shell (best-effort) |
269
+ | **Side by Side** | `side` / `sbs` | `/text/side-by-side` — pick two models |
270
+
271
+ ```bash
272
+ bridge chrome start --provider arena
273
+ bridge ask --provider arena "build a todo app" # Direct + Max
274
+ bridge ask --provider arena --model glm-5.1 "reply with pong" # pick a model
275
+ bridge ask --provider arena --model battle "compare two approaches" # dual Option A/B
276
+ bridge ask --provider arena --model direct/gemini-3-flash "hello" # mode + model
277
+ ```
278
+
279
+ Model search matches the in-UI picker (Search models + Text/Code/Image/Search tabs). Battle turns on Code Arena can take minutes (full site builds) — raise `--timeout` if needed. No MCP connector on Arena.
280
+
260
281
  ## Google Flow support
261
282
 
262
283
  The bridge can also drive **[Google Labs Flow](https://labs.google/fx/tools/flow)** — Google's Veo-powered AI video studio — with the same Playwright/CDP pattern. Flow is different in kind from the chat providers: it is a **generation** surface, so a "reply" is a rendered **clip** and attachments are **ingredients** (reference images).
@@ -303,7 +324,7 @@ Agents without shell access get the same lifecycle as **`flow_*` MCP tools** ove
303
324
 
304
325
  Flow requires a **Google AI Pro/Ultra** plan. Because Veo renders take minutes, `--provider flow` waits far longer for a response than the chat providers do.
305
326
 
306
- **Selector maintenance:** Flow's selectors were **LIVE-VERIFIED** against a signed-in project editor. If Google changes the UI, recapture with `node src/scripts/dev/captureProviderSelectors.mjs`, then update [`src/config/providersConfig.ts`](src/config/providersConfig.ts); generation lives in [`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts) and asset CRUD in [`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts).
327
+ **Selector maintenance:** Flow's selectors were **LIVE-VERIFIED** against a signed-in project editor. If Google changes the UI, recapture with `node src/scripts/maintain/captureProviderSelectors.mjs`, then update [`src/config/index.ts`](src/config/index.ts); generation lives in [`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts) and asset CRUD in [`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts).
307
328
 
308
329
  ## Limitations
309
330
 
package/README.zh.md CHANGED
@@ -55,7 +55,7 @@ ChatGPT 在浏览器中表现最佳——真实的账户状态、模型选择器
55
55
  |----|------|------|
56
56
  | **CLI** | Ink / React | 终端界面:消息面板、状态栏、`@file` 提及、`/` 命令。 |
57
57
  | **浏览器** | Playwright + Chrome DevTools Protocol | 驱动真实的 ChatGPT 标签页并捕获响应。选择器隔离在 `src/browser/chatgpt-page.ts`,便于在 UI 变动时修复。 |
58
- | **MCP 服务器** | MCP SDK + Zod | 将本地仓库工具以经过 schema 校验且沙箱化的处理器形式暴露给 ChatGPT。 |
58
+ | **MCP 服务器** | MCP SDK + Effect Schema | 将本地仓库工具以经过 schema 校验且沙箱化的处理器形式暴露给 ChatGPT。 |
59
59
  | **隧道** | Cloudflare Tunnel (`cloudflared`) | 为本地 MCP 服务器提供一个临时的公共 HTTPS 地址,供 ChatGPT 连接器访问——无需部署。 |
60
60
 
61
61
  **为什么需要隧道?** ChatGPT 的 MCP 连接器通过 HTTPS 调用工具,但工具服务器运行在你的机器上。与其部署任何东西,bridge 在本地端口前面启动一个临时的 Cloudflare 隧道(`*.trycloudflare.com`),并在启动时把该 `…/mcp` 地址同步到 ChatGPT 应用中。(ngrok 也能解决同样的可达性问题;这里使用 Cloudflare 的 `cloudflared`,因为它的快速隧道无需账户或令牌。)
@@ -162,7 +162,7 @@ bridge flow project-delete --yes # 永久删除当前项目
162
162
 
163
163
  Flow 需要 **Google AI Pro/Ultra** 套餐。由于 Veo 渲染需要数分钟,`--provider flow` 等待响应的时间远比聊天类提供商更长。
164
164
 
165
- **选择器维护:** Flow 的选择器已针对已登录的项目编辑器**实时验证(LIVE-VERIFIED)**。如果 Google 更改了 UI,请使用 `node src/scripts/dev/captureProviderSelectors.mjs` 重新捕获,然后更新 [`src/config/providersConfig.ts`](src/config/providersConfig.ts);生成逻辑位于 [`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts),素材 CRUD 位于 [`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts)。
165
+ **选择器维护:** Flow 的选择器已针对已登录的项目编辑器**实时验证(LIVE-VERIFIED)**。如果 Google 更改了 UI,请使用 `node src/scripts/maintain/captureProviderSelectors.mjs` 重新捕获,然后更新 [`src/config/index.ts`](src/config/index.ts);生成逻辑位于 [`src/features/providers/flow/flowPage.ts`](src/features/providers/flow/flowPage.ts),素材 CRUD 位于 [`src/features/providers/flow/flowAssets.ts`](src/features/providers/flow/flowAssets.ts)。
166
166
 
167
167
  ## 限制
168
168