ai-browser-bridge 0.3.0 → 0.5.1
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 +38 -25
- package/README.he.md +42 -25
- package/README.md +39 -12
- package/README.zh.md +38 -25
- package/dist/bridge.js +7367 -7238
- package/dist/bridge.js.map +1 -1
- package/package.json +7 -12
package/README.es.md
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/hero.png" alt="
|
|
2
|
+
<img src="assets/hero.png" alt="ai-browser-bridge — controla ChatGPT, Gemini, Claude, DeepSeek, Grok, Perplexity y Flow desde tu terminal mediante Chrome" width="640" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# ai-browser-bridge
|
|
6
6
|
|
|
7
7
|
[English](README.md) · [עברית](README.he.md) · **Español** · [中文](README.zh.md)
|
|
8
8
|
|
|
9
9
|

|
|
10
|
-

|
|
11
11
|

|
|
12
12
|

|
|
13
13
|

|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
> Controla
|
|
17
|
+
> Controla conversaciones reales de ChatGPT o Gemini desde tu terminal y ofrece a ChatGPT un conjunto reducido de herramientas locales del repositorio vía MCP — sin entregarle nunca una shell.
|
|
18
18
|
|
|
19
19
|
## Por qué existe
|
|
20
20
|
|
|
21
21
|
ChatGPT rinde mejor en el navegador: el estado real de la cuenta, el selector de modelos, la edición de mensajes, la regeneración y el historial de conversación se mantienen intactos. Programar rinde mejor en la terminal, donde archivos, pruebas, diffs y parches se inspeccionan y modifican directamente.
|
|
22
22
|
|
|
23
|
-
`
|
|
23
|
+
`ai-browser-bridge` conecta esas dos superficies. Un prompt en la terminal controla tu sesión existente del proveedor en el navegador, y ChatGPT puede acceder al repositorio actual mediante un pequeño conjunto de **herramientas MCP validadas** — `grep`, `read`, `apply_patch`, `run_tests`, `git_diff` — en lugar de acceso directo a la shell. Tú permaneces en un único flujo de terminal; el proveedor conserva su interfaz real.
|
|
24
24
|
|
|
25
25
|
## Características
|
|
26
26
|
|
|
27
|
-
- **
|
|
27
|
+
- **Nueve proveedores, un comando** — ChatGPT, Gemini, Claude, DeepSeek, Grok, Perplexity, Duck.ai, Arena y Google Flow. Selecciona uno con `--provider` o consulta varios en paralelo.
|
|
28
|
+
- **Diseñado para agentes** — `bridge ask … --json` ofrece una interfaz no interactiva estable, y `bridge serve` expone herramientas MCP salientes.
|
|
28
29
|
- **Herramientas locales en sandbox vía MCP** — cada operación de archivo se valida contra la raíz del repositorio seleccionado; sin shell arbitraria, solo comandos de prueba en lista blanca.
|
|
29
30
|
- **Acciones del navegador como comandos** — `/resume`, `/new`, `/model`, `/rewind`, `/stop`, `/context`, `/diff`, `/compact` y más.
|
|
30
|
-
- **Sesiones y
|
|
31
|
+
- **Sesiones, transcripciones y descargas en la raíz del repositorio** — las ejecuciones persistentes usan siempre `<repo>/.bridge/`, incluso cuando se inician desde un subdirectorio.
|
|
31
32
|
- **Controles de seguridad** — modos de permiso (`read-only` / `ask` / `auto`) y checkpoints automáticos de archivos alrededor de cada parche.
|
|
32
33
|
- **Convenciones del proyecto** — comandos personalizados además de `AGENTS.md` / `CLAUDE.md` se envían a ChatGPT en las ejecuciones de `/task`.
|
|
33
34
|
- **Un editor real** — historial de prompts, búsqueda inversa, cola de prompts y autocompletado de menciones `@file`.
|
|
@@ -54,8 +55,8 @@ Cuatro capas, cada una con un solo trabajo:
|
|
|
54
55
|
| Capa | Tecnología | Responsabilidad |
|
|
55
56
|
|------|------------|-----------------|
|
|
56
57
|
| **CLI** | Ink / React | Interfaz de terminal: panel de mensajes, barra de estado, menciones `@file`, comandos `/`. |
|
|
57
|
-
| **Navegador** | Playwright + Chrome DevTools Protocol |
|
|
58
|
-
| **Servidor MCP** | MCP SDK + Effect Schema | Expone
|
|
58
|
+
| **Navegador** | Playwright + Chrome DevTools Protocol | Se conecta a Chrome mediante el puerto de depuración y reutiliza un único perfil compartido. Los adaptadores viven en `src/features/providers/`. |
|
|
59
|
+
| **Servidor MCP** | MCP SDK + Effect Schema | Expone herramientas locales validadas y aisladas a ChatGPT, Claude y Grok. |
|
|
59
60
|
| **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
61
|
|
|
61
62
|
**¿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.)
|
|
@@ -65,36 +66,48 @@ Cuatro capas, cada una con un solo trabajo:
|
|
|
65
66
|
**Requisitos previos**
|
|
66
67
|
|
|
67
68
|
- **macOS** — Chrome se inicia desde `/Applications/Google Chrome.app`, y los ayudantes de portapapeles/procesos usan `pbcopy`/`lsof`.
|
|
68
|
-
- **Node.js ≥
|
|
69
|
-
- **Google Chrome** — el bridge
|
|
70
|
-
- **`cloudflared`** *(opcional)* —
|
|
69
|
+
- **Node.js ≥ 22** y **pnpm** (el repo fija `pnpm@10.14.0`).
|
|
70
|
+
- **Google Chrome o Chrome for Testing** — el bridge reutiliza un perfil global compartido en `~/.ai-browser-bridge/chrome-profile`.
|
|
71
|
+
- **`cloudflared`** *(opcional)* — necesario para que ChatGPT, Claude o Grok llamen a herramientas locales. Sin él la TUI sigue funcionando. Instala con `brew install cloudflared`.
|
|
71
72
|
|
|
72
73
|
**Instalar y construir**
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
|
-
git clone https://github.com/YosefHayim/
|
|
76
|
-
cd
|
|
76
|
+
git clone https://github.com/YosefHayim/ai-browser-bridge.git
|
|
77
|
+
cd ai-browser-bridge
|
|
77
78
|
pnpm install
|
|
78
79
|
pnpm build
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
**Inicia
|
|
82
|
+
**Inicia Chrome una vez y luego ejecuta**
|
|
82
83
|
|
|
83
84
|
```bash
|
|
84
|
-
# Abre el perfil
|
|
85
|
-
node dist/bridge.js
|
|
85
|
+
# Abre el perfil compartido de Chrome del bridge; inicia sesión si hace falta
|
|
86
|
+
node dist/bridge.js chrome start
|
|
86
87
|
|
|
87
88
|
# Lanza la interfaz de terminal sobre el repositorio donde ChatGPT trabajará
|
|
88
89
|
node dist/bridge.js --repo /path/to/your/project
|
|
89
90
|
```
|
|
90
91
|
|
|
91
|
-
¿Prefieres un comando `bridge` global? Ejecuta `pnpm link --global` tras construir, y usa `bridge`, `bridge
|
|
92
|
+
¿Prefieres un comando `bridge` global? Ejecuta `pnpm link --global` tras construir, y usa `bridge`, `bridge chrome start`, `bridge ask "…"`, etc.
|
|
93
|
+
|
|
94
|
+
## Agentes y proveedores
|
|
95
|
+
|
|
96
|
+
`bridge ask` puede consultar un proveedor o distribuir la misma pregunta entre varios. Las respuestas se devuelven por proveedor y los fallos parciales no descartan los resultados correctos.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
bridge ask --provider claude --json "resume este repositorio"
|
|
100
|
+
bridge ask --provider claude,deepseek,grok --json "compara estos enfoques"
|
|
101
|
+
bridge serve
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`bridge serve` ofrece `ask` y `search_conversations` por MCP stdio. ChatGPT, Claude y Grok pueden usar el conector MCP entrante; Gemini, DeepSeek, Perplexity, Duck.ai y Arena funcionan como chats web, y Flow funciona como superficie de generación de vídeo.
|
|
92
105
|
|
|
93
106
|
## Dónde se guarda el estado
|
|
94
107
|
|
|
95
|
-
Todo el estado del bridge para un proyecto se escribe
|
|
108
|
+
Todo el estado del bridge para un proyecto se escribe bajo `<repo>/.bridge/` en la raíz canónica del árbol de trabajo Git. Iniciar el bridge desde un subdirectorio sigue usando esa única raíz; un directorio explícito que no pertenece a Git sigue siendo su propia raíz. El bridge no crea ni administra `.bridge/.gitignore`; esa política pertenece al repositorio de destino.
|
|
96
109
|
|
|
97
|
-
> La configuración escrita por el usuario y destinada a aplicarse a **todos** los repositorios
|
|
110
|
+
> La configuración escrita por el usuario y destinada a aplicarse a **todos** los repositorios vive en tu directorio home: comandos personalizados en `~/.ai-browser-bridge/commands/*.md` y hooks de usuario en `~/.ai-browser-bridge/hooks.json`.
|
|
98
111
|
|
|
99
112
|
## Permisos y checkpoints
|
|
100
113
|
|
|
@@ -111,10 +124,10 @@ Todo el estado del bridge para un proyecto se escribe **dentro de ese proyecto**
|
|
|
111
124
|
```bash
|
|
112
125
|
pnpm test # vitest run
|
|
113
126
|
pnpm typecheck # tsc --noEmit
|
|
114
|
-
pnpm verify:push # typecheck +
|
|
127
|
+
pnpm verify:push # Biome + typecheck + tests + build + controles estructurales
|
|
115
128
|
```
|
|
116
129
|
|
|
117
|
-
La cobertura se centra en las rutas sensibles a la seguridad — validación de sandbox, resolución de
|
|
130
|
+
La cobertura se centra en las rutas sensibles a la seguridad — validación de sandbox, resolución de la raíz canónica del repositorio, los almacenes de sesiones/checkpoints, permisos y conteo de contexto.
|
|
118
131
|
|
|
119
132
|
## Soporte de Google Flow
|
|
120
133
|
|
|
@@ -130,7 +143,7 @@ Más allá de generar, el bridge controla el **ciclo de vida de recursos** compl
|
|
|
130
143
|
|
|
131
144
|
```bash
|
|
132
145
|
bridge flow clips # lista los clips del proyecto actual (id + URL descargable)
|
|
133
|
-
bridge flow download # descarga
|
|
146
|
+
bridge flow download # descarga los mp4 en <repo>/.bridge/downloads/flow
|
|
134
147
|
bridge flow reuse --id <clipId> # vuelve a añadir un clip al prompt como entrada ("Add to prompt")
|
|
135
148
|
bridge flow extend --id <clipId> # añade un clip a una escena ("Add to scene" de Flow)
|
|
136
149
|
bridge flow rename --id <clipId> --name "hero shot"
|
|
@@ -162,12 +175,12 @@ Los agentes sin acceso a shell obtienen el mismo ciclo de vida como **herramient
|
|
|
162
175
|
|
|
163
176
|
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
177
|
|
|
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
|
|
178
|
+
**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 scripts/dev/captureProviderSelectors.mjs`, luego actualiza [`src/config.ts`](src/config.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
179
|
|
|
167
180
|
## Limitaciones
|
|
168
181
|
|
|
169
182
|
- **Solo macOS** por ahora (ruta de Chrome fija y ayudantes `pbcopy`/`lsof`).
|
|
170
|
-
- Los selectores
|
|
183
|
+
- Los selectores de los proveedores pueden romperse cuando cambian sus interfaces web; los arreglos están localizados en sus adaptadores.
|
|
171
184
|
- El uso de contexto es una **estimación** — el navegador no expone el conteo exacto de tokens del servidor.
|
|
172
185
|
- El túnel de Cloudflare requiere `cloudflared` instalado.
|
|
173
186
|
- Local-first por diseño; no es un servicio multiusuario alojado.
|
package/README.he.md
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/hero.png" alt="
|
|
2
|
+
<img src="assets/hero.png" alt="ai-browser-bridge — drive ChatGPT, Gemini, Claude, DeepSeek, Grok, Perplexity, and Flow from your terminal through Chrome" width="640" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# ai-browser-bridge
|
|
6
6
|
|
|
7
7
|
[English](README.md) · **עברית** · [Español](README.es.md) · [中文](README.zh.md)
|
|
8
8
|
|
|
9
9
|

|
|
10
|
-

|
|
11
11
|

|
|
12
12
|

|
|
13
13
|

|
|
14
14
|
|
|
15
15
|
<div dir="rtl">
|
|
16
16
|
|
|
17
|
-
> הפעילו
|
|
17
|
+
> הפעילו שיחות ChatGPT או Gemini אמיתיות מהדפדפן ישירות מהטרמינל, ותנו ל-ChatGPT גישה מצומצמת ומבוקרת לכלי הריפו המקומי דרך MCP — בלי למסור לו גישת shell.
|
|
18
18
|
|
|
19
19
|
## למה זה קיים
|
|
20
20
|
|
|
21
21
|
ChatGPT נמצא בשיאו בדפדפן — מצב החשבון האמיתי, בורר המודלים, עריכת הודעות, רגנרציה והיסטוריית השיחה נשמרים במלואם. פיתוח קוד נמצא בשיאו בטרמינל, שם בודקים ומשנים קבצים, טסטים, diffs ו-patches ישירות.
|
|
22
22
|
|
|
23
|
-
`
|
|
23
|
+
`ai-browser-bridge` מחבר בין שני המשטחים האלה. שורת פקודה בטרמינל מפעילה את שיחת הספק הקיימת בדפדפן, ו-ChatGPT יכול לגשת לריפו הנוכחי דרך מספר מצומצם של **כלי MCP מאומתים** — `grep`, `read`, `apply_patch`, `run_tests`, `git_diff` — במקום גישת shell חופשית. אתם נשארים בתהליך עבודה אחד בטרמינל; לספק נשאר ה-UI האמיתי שלו.
|
|
24
24
|
|
|
25
25
|
## יכולות
|
|
26
26
|
|
|
27
|
-
-
|
|
27
|
+
- **תשעה ספקים, פקודה אחת** — ChatGPT, Gemini, Claude, DeepSeek, Grok, Perplexity, Duck.ai, Arena ו-Google Flow. בוחרים ספק עם `--provider` או שולחים לכמה ספקים במקביל.
|
|
28
|
+
- **בנוי לסוכנים** — `bridge ask … --json` מספק ממשק לא-אינטראקטיבי יציב, ו-`bridge serve` חושף כלי MCP יוצאים.
|
|
28
29
|
- **כלים מקומיים ב-sandbox דרך MCP** — כל פעולת קובץ מאומתת מול שורש הריפו הנבחר; אין shell חופשי, רק פקודות טסט מאושרות מראש.
|
|
29
30
|
- **פעולות דפדפן כפקודות** — `/resume`, `/new`, `/model`, `/rewind`, `/stop`, `/context`, `/diff`, `/compact` ועוד.
|
|
30
|
-
-
|
|
31
|
+
- **סשנים, תמלולים והורדות בשורש הריפו** — הרצות מתמשכות משתמשות תמיד ב-`<repo>/.bridge/`, גם כשהן מופעלות מתיקיית משנה.
|
|
31
32
|
- **בקרות בטיחות** — מצבי הרשאה (`read-only` / `ask` / `auto`) ו-checkpoints אוטומטיים של קבצים סביב כל patch.
|
|
32
33
|
- **מוסכמות פרויקט** — פקודות מותאמות אישית וגם `AGENTS.md` / `CLAUDE.md` מוזנים ל-ChatGPT בהרצות `/task`.
|
|
33
34
|
- **קומפוזר אמיתי** — היסטוריית פרומפטים, חיפוש לאחור, תור פרומפטים, והשלמה אוטומטית לאזכורי `@file`.
|
|
@@ -58,8 +59,8 @@
|
|
|
58
59
|
| שכבה | טכנולוגיה | אחריות |
|
|
59
60
|
|------|-----------|--------|
|
|
60
61
|
| **CLI** | Ink / React | ממשק טרמינל: חלונית הודעות, שורת סטטוס, אזכורי `@file`, פקודות `/`. |
|
|
61
|
-
| **דפדפן** | Playwright + Chrome DevTools Protocol |
|
|
62
|
-
| **שרת MCP** | MCP SDK + Effect Schema | חושף
|
|
62
|
+
| **דפדפן** | Playwright + Chrome DevTools Protocol | מתחבר ל-Chrome דרך פורט הדיבוג ומשתמש בפרופיל bridge משותף יחיד. מתאמי הספקים נמצאים ב-`src/features/providers/`. |
|
|
63
|
+
| **שרת MCP** | MCP SDK + Effect Schema | חושף כלים מקומיים מאומתים ומוגני-sandbox ל-ChatGPT, Claude ו-Grok. |
|
|
63
64
|
| **מנהרה** | Cloudflare Tunnel (`cloudflared`) | מעניק לשרת ה-MCP המקומי כתובת HTTPS ציבורית זמנית שה-connector של ChatGPT יכול להגיע אליה — ללא פריסה. |
|
|
64
65
|
|
|
65
66
|
**למה בכלל מנהרה?** ה-connector של ChatGPT קורא לכלים דרך HTTPS, אבל שרת הכלים רץ על המחשב שלכם. במקום לפרוס משהו, ה-bridge מקים מנהרת Cloudflare זמנית (`*.trycloudflare.com`) מול הפורט המקומי ומסנכרן את כתובת ה-`…/mcp` הזו אל אפליקציית ChatGPT בעת ההפעלה. (ngrok היה פותר את אותה בעיית נגישות; נבחר `cloudflared` של Cloudflare מכיוון שמנהרות ה-quick שלו אינן דורשות חשבון או טוקן.)
|
|
@@ -69,30 +70,30 @@
|
|
|
69
70
|
**דרישות מקדימות**
|
|
70
71
|
|
|
71
72
|
- **macOS** — Chrome מופעל מ-`/Applications/Google Chrome.app`, ועוזרי הלוח/תהליכים משתמשים ב-`pbcopy`/`lsof`.
|
|
72
|
-
- **Node.js ≥
|
|
73
|
-
- **Google Chrome** — ה-bridge
|
|
74
|
-
- **`cloudflared`** *(אופציונלי)* — נדרש
|
|
73
|
+
- **Node.js ≥ 22** ו-**pnpm** (הריפו מקבע `pnpm@10.14.0`).
|
|
74
|
+
- **Google Chrome או Chrome for Testing** — ה-bridge משתמש בפרופיל גלובלי משותף ב-`~/.ai-browser-bridge/chrome-profile`.
|
|
75
|
+
- **`cloudflared`** *(אופציונלי)* — נדרש כדי ש-ChatGPT, Claude או Grok יקראו לכלים מקומיים. בלעדיו ה-TUI עדיין רץ. התקנה: `brew install cloudflared`.
|
|
75
76
|
|
|
76
77
|
**התקנה ובנייה**
|
|
77
78
|
|
|
78
79
|
</div>
|
|
79
80
|
|
|
80
81
|
```bash
|
|
81
|
-
git clone https://github.com/YosefHayim/
|
|
82
|
-
cd
|
|
82
|
+
git clone https://github.com/YosefHayim/ai-browser-bridge.git
|
|
83
|
+
cd ai-browser-bridge
|
|
83
84
|
pnpm install
|
|
84
85
|
pnpm build
|
|
85
86
|
```
|
|
86
87
|
|
|
87
88
|
<div dir="rtl">
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
**הפעילו את Chrome פעם אחת, ואז הריצו**
|
|
90
91
|
|
|
91
92
|
</div>
|
|
92
93
|
|
|
93
94
|
```bash
|
|
94
|
-
# פתיחת פרופיל ה-Chrome
|
|
95
|
-
node dist/bridge.js
|
|
95
|
+
# פתיחת פרופיל ה-Chrome המשותף של ה-bridge; התחברו אם צריך
|
|
96
|
+
node dist/bridge.js chrome start
|
|
96
97
|
|
|
97
98
|
# הפעלת ממשק הטרמינל מול הריפו שבו ChatGPT יעבוד
|
|
98
99
|
node dist/bridge.js --repo /path/to/your/project
|
|
@@ -100,13 +101,29 @@ node dist/bridge.js --repo /path/to/your/project
|
|
|
100
101
|
|
|
101
102
|
<div dir="rtl">
|
|
102
103
|
|
|
103
|
-
מעדיפים פקודת `bridge` גלובלית? הריצו `pnpm link --global` אחרי הבנייה, ואז השתמשו ב-`bridge`, `bridge
|
|
104
|
+
מעדיפים פקודת `bridge` גלובלית? הריצו `pnpm link --global` אחרי הבנייה, ואז השתמשו ב-`bridge`, `bridge chrome start`, `bridge ask "…"` וכו'.
|
|
105
|
+
|
|
106
|
+
## סוכנים וספקים
|
|
107
|
+
|
|
108
|
+
`bridge ask` יכול לפנות לספק יחיד או לשלוח את אותה שאלה לכמה ספקים. התשובות מוחזרות לפי ספק, וכשל חלקי אינו מוחק תוצאות תקינות.
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
bridge ask --provider claude --json "summarize this repo"
|
|
114
|
+
bridge ask --provider claude,deepseek,grok --json "compare these approaches"
|
|
115
|
+
bridge serve
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
<div dir="rtl">
|
|
119
|
+
|
|
120
|
+
`bridge serve` חושף את `ask` ואת `search_conversations` דרך MCP stdio. ChatGPT, Claude ו-Grok יכולים להשתמש ב-connector נכנס; Gemini, DeepSeek, Perplexity, Duck.ai ו-Arena פועלים כשיחות web, ו-Flow פועל כממשק יצירת וידאו.
|
|
104
121
|
|
|
105
122
|
## איפה נשמר המצב (state)
|
|
106
123
|
|
|
107
|
-
כל מצב ה-bridge של פרויקט נכתב
|
|
124
|
+
כל מצב ה-bridge של פרויקט נכתב תחת `<repo>/.bridge/` בשורש הקנוני של עץ העבודה של Git. גם הפעלה מתיקיית משנה משתמשת באותו שורש יחיד; תיקייה מפורשת שאינה חלק מ-Git נשארת השורש של עצמה. ה-bridge אינו יוצר או מנהל `.bridge/.gitignore`; מדיניות ההתעלמות שייכת לריפו היעד.
|
|
108
125
|
|
|
109
|
-
> תצורה שנכתבת על ידי המשתמש ומיועדת לחול על **כל** הריפואים נשמרת
|
|
126
|
+
> תצורה שנכתבת על ידי המשתמש ומיועדת לחול על **כל** הריפואים נשמרת בתיקיית הבית: פקודות מותאמות ב-`~/.ai-browser-bridge/commands/*.md` ו-hooks ברמת המשתמש ב-`~/.ai-browser-bridge/hooks.json`.
|
|
110
127
|
|
|
111
128
|
## הרשאות ו-checkpoints
|
|
112
129
|
|
|
@@ -129,12 +146,12 @@ node dist/bridge.js --repo /path/to/your/project
|
|
|
129
146
|
```bash
|
|
130
147
|
pnpm test # vitest run
|
|
131
148
|
pnpm typecheck # tsc --noEmit
|
|
132
|
-
pnpm verify:push # typecheck +
|
|
149
|
+
pnpm verify:push # Biome + typecheck + tests + build + בדיקות מבנה
|
|
133
150
|
```
|
|
134
151
|
|
|
135
152
|
<div dir="rtl">
|
|
136
153
|
|
|
137
|
-
הכיסוי מתמקד בנתיבים רגישי-בטיחות — אימות sandbox,
|
|
154
|
+
הכיסוי מתמקד בנתיבים רגישי-בטיחות — אימות sandbox, זיהוי השורש הקנוני של הריפו, מאגרי הסשנים/checkpoints, הרשאות וספירת הקשר.
|
|
138
155
|
|
|
139
156
|
## תמיכה ב-Google Flow
|
|
140
157
|
|
|
@@ -156,7 +173,7 @@ bridge ask --provider flow "same scene, dawn light" --attach ref1.png ref2.png
|
|
|
156
173
|
|
|
157
174
|
```bash
|
|
158
175
|
bridge flow clips # הצגת הקליפים בפרויקט הנוכחי (id + כתובת ניתנת-להורדה)
|
|
159
|
-
bridge flow download # הורדת
|
|
176
|
+
bridge flow download # הורדת הקליפים אל <repo>/.bridge/downloads/flow
|
|
160
177
|
bridge flow reuse --id <clipId> # הוספת קליפ בחזרה לפרומפט כקלט ("Add to prompt")
|
|
161
178
|
bridge flow extend --id <clipId> # הוספת קליפ לסצנה ("Add to scene" של Flow)
|
|
162
179
|
bridge flow rename --id <clipId> --name "hero shot"
|
|
@@ -190,12 +207,12 @@ bridge flow project-delete --yes # מחיקה לצמיתות של הפר
|
|
|
190
207
|
|
|
191
208
|
Flow דורש תוכנית **Google AI Pro/Ultra**. מכיוון שרינדור ב-Veo אורך דקות, `--provider flow` ממתין לתשובה הרבה יותר זמן מספקי הצ'אט.
|
|
192
209
|
|
|
193
|
-
**תחזוקת סלקטורים:** הסלקטורים של Flow **אומתו בזמן אמת (LIVE-VERIFIED)** מול עורך פרויקט מחובר. אם Google משנה את ה-UI, בצעו לכידה מחדש עם `node
|
|
210
|
+
**תחזוקת סלקטורים:** הסלקטורים של Flow **אומתו בזמן אמת (LIVE-VERIFIED)** מול עורך פרויקט מחובר. אם Google משנה את ה-UI, בצעו לכידה מחדש עם `node scripts/dev/captureProviderSelectors.mjs`, ואז עדכנו את [`src/config.ts`](src/config.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
211
|
|
|
195
212
|
## מגבלות
|
|
196
213
|
|
|
197
214
|
- **macOS בלבד** כיום (נתיב Chrome קשיח ועוזרי `pbcopy`/`lsof`).
|
|
198
|
-
- סלקטורים של
|
|
215
|
+
- סלקטורים של ספקים עלולים להישבר כשממשקי הווב משתנים; התיקונים ממוקדים במתאמים שלהם.
|
|
199
216
|
- ניצול ההקשר הוא **הערכה** — הדפדפן אינו חושף ספירת טוקנים מדויקת מצד השרת.
|
|
200
217
|
- מנהרת Cloudflare דורשת `cloudflared` מותקן.
|
|
201
218
|
- מקומי-תחילה מעיצובו; אינו שירות רב-משתמשים מאוחסן.
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
**English** · [עברית](README.he.md) · [Español](README.es.md) · [中文](README.zh.md)
|
|
10
10
|
|
|
11
11
|

|
|
12
|
-

|
|
13
13
|

|
|
14
14
|

|
|
15
15
|

|
|
@@ -29,7 +29,7 @@ ChatGPT is at its best in the browser — real account state, the model picker,
|
|
|
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.
|
|
32
|
-
- **Repo-
|
|
32
|
+
- **Repo-root sessions, transcripts, and downloads** — TUI and tool-enabled runs persist under the Git working-tree root's `<repo>/.bridge/`, even when launched from a nested directory; plain `bridge ask` stays stateless and only reuses the shared Chrome profile.
|
|
33
33
|
- **Safety controls** — permission modes (`read-only` / `ask` / `auto`) and automatic file checkpoints around every patch.
|
|
34
34
|
- **Project conventions** — custom commands plus `AGENTS.md` / `CLAUDE.md` are fed to ChatGPT for `/task` runs.
|
|
35
35
|
- **A real composer** — prompt history, reverse search, queued prompts, and `@file` mention autocomplete.
|
|
@@ -67,7 +67,7 @@ Four layers, each with one job:
|
|
|
67
67
|
**Prerequisites**
|
|
68
68
|
|
|
69
69
|
- **macOS** — Chrome is launched with the macOS `open` command, and clipboard/process helpers use `pbcopy`/`lsof`.
|
|
70
|
-
- **Node.js ≥
|
|
70
|
+
- **Node.js ≥ 22** and **pnpm** (the repo pins `pnpm@10.14.0`).
|
|
71
71
|
- **Google Chrome or Chrome for Testing** — the bridge drives one shared bridge profile through a debug port. Sign in once in that bridge-launched window; every repo reuses it.
|
|
72
72
|
- **`cloudflared`** *(optional; ChatGPT, Claude, Grok)* — only needed for those providers to call local MCP tools. Without it the TUI still runs. Install with `brew install cloudflared`.
|
|
73
73
|
|
|
@@ -140,12 +140,40 @@ node dist/bridge.js ask "hello" --provider gemini --repo /path/to/project
|
|
|
140
140
|
|
|
141
141
|
```text
|
|
142
142
|
refactor the CLI input flow in @src/features/terminal/tui/App.tsx
|
|
143
|
-
compare @src/features/store/
|
|
143
|
+
compare @src/features/store/fileMentions.ts with @src/features/store/fileMentions.test.ts
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
Paths that escape the repo root are skipped; files over 100 KB are summarized rather than inlined.
|
|
147
147
|
|
|
148
|
-
**Conversation search** — `bridge chat search "query" --json`
|
|
148
|
+
**Conversation search** — `bridge chat search "query" --json` opens ChatGPT's Search UI,
|
|
149
|
+
selects Chats, and returns matching Conversations across titles and message content. It scrolls
|
|
150
|
+
the result overlay up to `--limit`; add `--open` to navigate the browser to the best match.
|
|
151
|
+
|
|
152
|
+
**Rate-safe Project organization** — prepare one ordered plan with Conversations for any number
|
|
153
|
+
of Projects (Conversation ids are preferred because they can be verified exactly):
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
[
|
|
157
|
+
{ "conversation": "11111111-1111-4111-8111-111111111111", "project": "Yoga App" },
|
|
158
|
+
{ "conversation": "22222222-2222-4222-8222-222222222222", "project": "Invoices & Purchases" }
|
|
159
|
+
]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Then validate it and start the autonomous queue:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
bridge chat organize --plan @organization-plan.json --dry-run
|
|
166
|
+
bridge chat organize --plan @organization-plan.json --interval 10-20 --cooldown 300
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The queue verifies every move from ChatGPT's loaded Project label, with the destination Project page
|
|
170
|
+
as a fallback. It spaces UI operations by a fixed `--interval 30` or randomized range such as
|
|
171
|
+
`--interval 10-20`, and acknowledges ChatGPT's “Too many requests” modal before waiting for
|
|
172
|
+
`--cooldown`; rate-limit cooldowns do not consume retry attempts. Progress is persisted under
|
|
173
|
+
`.bridge/chat-organization-queues/`; rerunning the same plan resumes pending work without repeating
|
|
174
|
+
completed moves. Use `--restart` only when you intentionally want to replay the full plan, and
|
|
175
|
+
`--max-attempts` to change the default of three attempts per Conversation. `--json` keeps the final
|
|
176
|
+
summary on stdout and writes progress to stderr.
|
|
149
177
|
|
|
150
178
|
## Agents & fan-out
|
|
151
179
|
|
|
@@ -186,11 +214,10 @@ The `ask` tool takes `{ prompt, providers?, timeoutSeconds? }` and returns each
|
|
|
186
214
|
|
|
187
215
|
## Where state lives
|
|
188
216
|
|
|
189
|
-
Persistent bridge state
|
|
217
|
+
Persistent bridge state is written under the canonical Git working-tree root's `<repo>/.bridge/`. The bridge resolves both `--repo` and the launch directory to that root, so nested launches cannot create competing state or download folders. An explicit non-Git directory remains its own root.
|
|
190
218
|
|
|
191
219
|
```text
|
|
192
220
|
<repo>/.bridge/
|
|
193
|
-
├── .gitignore # a single "*", written automatically — see below
|
|
194
221
|
├── config.json # per-repo settings (includes `provider`: chatgpt | gemini)
|
|
195
222
|
├── sessions/<id>/ # metadata.json + append-only events.jsonl transcript
|
|
196
223
|
├── logs/<date>.jsonl # prompts, replies, and MCP tool-call summaries
|
|
@@ -202,7 +229,7 @@ Persistent bridge state for a project is written **inside that project**, under
|
|
|
202
229
|
|
|
203
230
|
Plain `bridge ask` and `bridge chrome start` do not create repo-local state; they only reuse the shared Chrome profile. The bridge creates `<repo>/.bridge/` for persistent TUI sessions, tool-enabled asks (`bridge ask --tools`), checkpoints, exports, screenshots, or default attachment downloads.
|
|
204
231
|
|
|
205
|
-
|
|
232
|
+
The bridge does not create or manage `.bridge/.gitignore`; ignore policy belongs to the target repository. Chrome cookies for bridge-driven sessions stay in the shared bridge profile under `~/.ai-browser-bridge/chrome-profile`, not under `.bridge/`.
|
|
206
233
|
|
|
207
234
|
> User-authored config meant to apply across **all** repos lives in your home directory: custom commands in `~/.ai-browser-bridge/commands/*.md` and user-level hooks in `~/.ai-browser-bridge/hooks.json`.
|
|
208
235
|
|
|
@@ -225,10 +252,10 @@ The package was renamed to **`ai-browser-bridge`**. Global user config moved fro
|
|
|
225
252
|
```bash
|
|
226
253
|
pnpm test # vitest run
|
|
227
254
|
pnpm typecheck # tsc --noEmit
|
|
228
|
-
pnpm verify:push #
|
|
255
|
+
pnpm verify:push # Biome + style mirror + typecheck + test + build + boundary/compatibility checks
|
|
229
256
|
```
|
|
230
257
|
|
|
231
|
-
Coverage focuses on the safety-sensitive paths — sandbox validation, repo-
|
|
258
|
+
Coverage focuses on the safety-sensitive paths — sandbox validation, canonical repo-root resolution, session/checkpoint stores, permissions, and context counting.
|
|
232
259
|
|
|
233
260
|
## Gemini web support
|
|
234
261
|
|
|
@@ -292,7 +319,7 @@ Beyond generating, the bridge drives Flow's full **asset lifecycle** through `br
|
|
|
292
319
|
|
|
293
320
|
```bash
|
|
294
321
|
bridge flow clips # list clips in the current project (id + fetchable URL)
|
|
295
|
-
bridge flow download # download every clip's mp4 to
|
|
322
|
+
bridge flow download # download every clip's mp4 to <repo>/.bridge/downloads/flow
|
|
296
323
|
bridge flow reuse --id <clipId> # add a clip back to the prompt as input ("Add to prompt")
|
|
297
324
|
bridge flow extend --id <clipId> # add a clip to a scene (Flow's "Add to scene")
|
|
298
325
|
bridge flow rename --id <clipId> --name "hero shot"
|
|
@@ -324,7 +351,7 @@ Agents without shell access get the same lifecycle as **`flow_*` MCP tools** ove
|
|
|
324
351
|
|
|
325
352
|
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.
|
|
326
353
|
|
|
327
|
-
**Selector maintenance:** Flow's selectors were **LIVE-VERIFIED** against a signed-in project editor. If Google changes the UI, recapture with `node
|
|
354
|
+
**Selector maintenance:** Flow's selectors were **LIVE-VERIFIED** against a signed-in project editor. If Google changes the UI, recapture with `node scripts/dev/captureProviderSelectors.mjs`, then update [`src/config.ts`](src/config.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).
|
|
328
355
|
|
|
329
356
|
## Limitations
|
|
330
357
|
|