How We Built an Authenticated Local Loopback Bridge for Browser AI Chats
Описание и применение
Создан локальный мост, который безопасно передает контекст репозитория в AI‑чат, устраняя необходимость загрузки ZIP‑файлов.
Задача
Keeping AI models informed of repository state via web interfaces requires uploading messy zips or manual copy‑pasting of many files.
Результат
The bridge pre‑warms repository context in 340 ms and serves it securely over 127.0.0.1:4545, enabling instant AI prompt injection without exposing local files.
Рабочий процесс
- Start the bridge in the project directory with
tokencap serve --daemon - Read the output URL and pairing token
- Open ChatGPT or Claude in Chrome
- Open the TokenCap Companion popup
- Type the task (e.g., "refactor billing controller")
- Click "Inject Into Chat" to send context to the model
Доказательства
Browser extensions cannot access local disk storage. To pass structured repository context without compromising security, we defined Bridge Contract v1:
Start the bridge in your project directory: tokencap serve --daemon
Bridge context pre-warmed in 340ms. Serving intelligence for: /Users/dev/projects/my-api
- Дата записи: 2026-10-01T20:10:49.081Z