Spaces:
Runtime error
Runtime error
Commit History
-
Add complete API reference docs
Akash Yadavfb8468e -
Add OpenAI-compatible endpoint to Gemini server (/v1/chat/completions with streaming)
Akash Yadave61cceb
-
Add GitHub Actions: build & push Docker image to Docker Hub
akashyadav758 +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>da8a1c1 -
Wipe Chrome session-restore state on boot (stop stale tab resurrection)
akashyadav758 +1: Claude Opus 4.8 (1M context)The persisted profile saves last-open tabs; on boot Chrome restored them, resurrecting the removed Flow tab regardless of the launch URL. Delete Sessions/ and Current/Last Tabs+Session so Chrome opens only the launch URL. Cookies/logins are in separate files and untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>b0a3b97 -
Remove Flow agent from stack (extension, server, gateway, monitor tab)
akashyadav758 +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>23a7459 -
Open monitor UI on private Space (owner was locked out of own live view)
akashyadav758 +1: Claude Opus 4.7 (1M context)Gating / and /api/* on the API key locked the Space owner out: a private HF Space serves its subdomain behind HF auth, and the browser can't attach ?key= there, so the UI returned 401. The Space being private already restricts who can reach it to the owner, so the UI (/, /api/*, /chrome.log) is open again. Only the programmatic AI gateway (/gpt /gemini /flow) and /logs stay key-gated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>6d42e1f -
Fix gateway auth on private Space: check ?key=/cookie before Authorization
akashyadav758 +1: Claude Opus 4.7 (1M context)A private HF Space reserves the Authorization: Bearer header for its own HF token, which collided with the gateway reading the API_KEY from the same header (deadlock: send HF token -> "unauthorized"; send API_KEY -> HF 404). Reorder authOK() to read ?key= and the apikey cookie first, falling back to Authorization only when both are absent. Backward-compatible for public Spaces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>23bf5e5 -
Harden monitor (gate all routes), swap ChatGPT backend to free-Chatgpt-api, clean repo
akashyadav758 +1: Claude Opus 4.8 (1M context)- Security: gate /, /api/*, /chrome.log behind API_KEY (Bearer / ?key= / apikey cookie). Previously these were public — anyone could view+drive the logged-in ChatGPT/Gemini/Google sessions. This was the likely "abusive" flag cause. - ChatGPT backend: replace chatgpt-free-api with the free-Chatgpt-api rewrite (drop-in: same 127.0.0.1:9225, same /api/chat + /v1/chat/completions). Update Dockerfile COPY paths. - Cleanup: drop leftover per-service Dockerfiles, redundant sub-READMEs, dev-only docs/test scripts, the prebuilt linux binary, and cdp_* debug scripts. - Docs: fix references, mark all routes key-gated, note the Space is now private. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>5c7f4b5 -
Fix flaky extension SW boot: set XDG_RUNTIME_DIR before Chrome launch
akashyadav758 +1: Claude Opus 4.8 (1M context)Headless Chrome logged "XDG_RUNTIME_DIR is invalid or not set" and the three MV3 extension service workers intermittently failed to spawn (DidStartWorkerFail: 5), so /gpt /gemini /flow never connected. Create and export a valid per-user runtime dir before launching Chrome. Purely additive. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>90bcc1f -
Fix dropped full_conversation replies: don't early-return on rawText
akashyadav758 +1: Claude Opus 4.8 (1M context)The extension's full_conversation reply always carries `rawText` in its result. handleExtensionMessage returned early when RawSSEOutputPath was unset, so the reply never reached pending[msg.ID] and every browser-mode chat timed out (240s) with an empty response. Now the raw-SSE dump is purely optional and dispatch always continues to the pending channel. Also sync the validated gpt-extension/background.js into the Docker build source so HF builds the working extension. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1618d7c -
Fix: extension SW DidStartWorkerFail + hanging /gpt API — drop renderer-capping Chrome flags
akashyadav758 +1: Claude Opus 4.8 (1M context)Remove --renderer-process-limit=1, --process-per-site and --no-zygote from the headless Chrome launch. Each of the 3 extensions runs an MV3 service worker (its own renderer) and the chat flow injects via chrome.scripting.executeScript; capping renderers to 1 starved them, so the GPT extension failed to start (DidStartWorkerFail) and never connected, and when it did start executeScript hung — making /gpt (and /gemini /flow) hang forever despite the browser UI chatting fine. HF cpu-basic has 16 GB (usage ~1-2 GB) so the memory flags weren't needed. Bump V8 heap 256->512MB. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>9d8e1f7 -
Add API-key-gated /logs/{chatgpt,gemini,flow,monitor} endpoint for diagnostics
akashyadav758 +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>888149c -
Add HOWTOUSE.md and docs/ for fast, error-free new setup
akashyadav758 +1: Claude Opus 4.8 (1M context)HOWTOUSE.md: per-service API endpoints + correct payloads + curl examples (key as placeholder, never the real value). docs/: architecture, persistence, api-gateway, deployment, troubleshooting — documents everything added on top of the base image so a fresh HF or Docker deploy doesn't hit the errors we already solved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>8ea09fa -
Gitignore the gateway api-key local note
akashyadav758 +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>4a66c44 -
Run all 3 backend servers in-container behind a single API-key gateway
akashyadav758 +1: Claude Opus 4.8 (1M context)The HF Space previously ran only Chrome + extensions + monitor; the ChatGPT/ Gemini/Flow API servers existed only in docker-compose (self-host). Because the extensions dial their servers on hardcoded 127.0.0.1:9225/9226/9227, the servers must share Chrome's localhost — a separate Space can't reach them. So: - Dockerfile builds the chatgpt (Go) + gemini (Go) binaries and installs the flow (Python/FastAPI) deps into the chrome image. - start_hf.sh launches all three on localhost alongside Chrome. - monitor/main.go doubles as a reverse-proxy gateway on :3001, routing /gpt /gemini /flow to 127.0.0.1:9225/8000/8101, gated by an API_KEY bearer token (fail-closed). - docker-compose.yml collapses to the single chrome service (servers are now baked in; separate containers would collide on the same ports). - Add cryptography to flow requirements (lazy-imported in cli/api.py). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>3666689
-
Point Flow tab to https://labs.google/fx
akashyadav758 +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>dff55ff -
Add SETUP.md: short Docker self-host + Hugging Face/Neon deploy guide
akashyadav758 +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>bcacea2 -
Document Postgres persistence, selfapi space name, and UA/Cloudflare fix in README
akashyadav758 +1: Claude Opus 4.8 (1M context)Add a Persistence section with the Neon DATABASE_URL setup guide, a self-hosting section for docker-compose, a UA-must-match-OS note, fix the stale chrome -> selfapi space name/URLs and title, and update the boot sequence + troubleshooting to match the current start_hf.sh. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>7869843 -
Use Linux UA (was macOS) so Cloudflare doesn't flag headless mismatch
akashyadav758 +1: Claude Opus 4.8 (1M context)Browser ran on Linux but advertised a macOS User-Agent, an inconsistency Cloudflare Turnstile flags -> infinite verify loop on the ChatGPT site. Switch all UAs to a Linux Chrome string and align the ChatGPT backend to Chrome 145 to match the in-browser Chrome for Testing build, so the cf_clearance cookie (bound to UA) stays valid across browser and backend. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>645c976 -
Persist Chrome profile via Docker volume for self-hosting
akashyadav758 +1: Claude Opus 4.8 (1M context)On a self-hosted box the profile (cookies/logins) survives restarts with a plain named volume mounted at /home/chrome/data — no Postgres needed. This is the self-host equivalent of the HF Postgres-snapshot path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>321bbb7 -
Persist Chrome profile across restarts via Postgres snapshot
akashyadav758 +1: Claude Opus 4.8 (1M context)Hugging Face Spaces have an ephemeral filesystem, so the Chrome user-data dir (cookies / logins) is wiped on every restart and rebuild. Snapshot it into Postgres (Neon) instead: - profilesync: a small Go tool that tar+gzips /home/chrome/data into a Postgres bytea blob (backup) and extracts it back (restore). Cache/junk dirs are excluded so the blob stays small. Connection comes from the DATABASE_URL env var — the credential is never hardcoded. - Dockerfile: build the profilesync binary and ship it in /opt/profilesync. - start_hf.sh: restore the profile on boot, back it up on shutdown (after Chrome closes its files) and every 5 min as a safety net. All guarded by DATABASE_URL, so the Space still runs fine without the secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>69c2cb9 -
Dockerize stack, strip watermarking, add navigator monitor
akashyadav758 +1: Claude Opus 4.8 (1M context)Compose the headless-Chrome monitor with the three backend servers and make the live monitor a full in-browser navigator. Infra: - Add docker-compose.yml wiring chrome + chatgpt + gemini + flow on a shared loopback (network_mode: service:chrome); only chrome publishes. - Add Dockerfiles for chatgpt-free-api and flow-agent. - flow: run the FastAPI API on 8101 so it no longer collides with the ExtensionBridge HTTP callback on 8100 (was crash-looping). - Update extension cookie-WS ports: gemini 9226, flow 9227. Cleanup: - Remove watermark code from flow-agent (omniflash/watermark.py) and gemini (gemini/watermark.go); drop ffmpeg usage. Monitor navigator: - Tabs are now discovered live from CDP (known services first) instead of being hardcoded. - Add address bar + back/forward/reload and new/close-tab, backed by new /api/navigate, /api/reload, /api/back, /api/forward, /api/newtab and /api/closetab endpoints. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.co…c6e6dac -
Use Chrome for Testing so --load-extension works again
akashyadav758 +1: Claude Opus 4.8 (1M context)Branded google-chrome-stable (Chrome 145) silently ignores --load-extension since the 2025 Chrome RFC removed it from branded builds, so all 3 unpacked extensions failed to load (empty chrome://extensions list, no error in log). Install Chrome for Testing 145.0.7632.117 (unbranded, same version line where --load-extension still works) and launch it instead of google-chrome-stable. Everything else (monitor-server, socat CDP proxy on 9222, navigate.py, flags) is unchanged. Verified locally: all 3 extension service workers register. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>8bb42ac -
Fix extension COPY paths in Dockerfile and rename extension dirs
akashyadav758 +1: Claude Opus 4.8 (1M context)The gemini and flow extension directories were renamed on disk (extension -> gemini-extension / Flow-extension) but the Dockerfile still COPYd the old paths, so the HF Space build failed to load them. Align the committed dir names with the Dockerfile and ignore hf-token. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>4216716 -
Exclude _metadata from unpacked flow-extension in Dockerfile
akashyadav7586935e47 -
Inject extensions.ui.developer_mode preference on startup
akashyadav7583662a46 -
Start Chrome directly on chrome://extensions/ with append redirects
akashyadav758269a450 -
Add disable-extensions-except flag and enable unbuffered python logs
akashyadav758a32b2d7 -
Redirect python script output to chrome.log
akashyadav75815782b6 -
Fix race condition in python navigation script
akashyadav7588cb8b03 -
Redirect chrome logs to chrome.log and fix extension ownership
akashyadav758dc356d0 -
Auto-navigate to chrome://extensions/ using python script after startup
akashyadav758e52c917 -
Update startup URL to chrome://extensions as requested
akashyadav758414954f -
Revert startup URL to Gemini
akashyadav7582cb2d7c -
Update startup URL to chrome://extensions
akashyadav758fa6120b -
Add and load all three extensions in Chrome on Hugging Face Spaces
akashyadav7586ada2bc -
Deploy user-based Chrome on Hugging Face using custom non-root start script
akashyadav7582a601f2 -
initial commit
Verified signature7bca58d