gstack/browse/src
Garry Tan 7f25d4786b
fix: verify tunnel is alive before returning URL to pair-agent
Root cause: when ngrok dies externally (pkill, crash, timeout), the server
still reports tunnelActive=true with a dead URL. pair-agent prints an
instruction block pointing at a dead tunnel. The remote agent gets
"endpoint offline" and the user has to manually restart everything.

Three-layer fix:
- Server /pair endpoint: probes tunnel URL before returning it. If dead,
  resets tunnelActive/tunnelUrl and returns null (triggers CLI restart).
- Server /tunnel/start: probes cached tunnel before returning already_active.
  If dead, falls through to restart ngrok automatically.
- CLI pair-agent: double-checks tunnel URL from server before printing
  instruction block. Falls through to auto-start on failure.

4 regression tests verify all three probe points + CLI verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 22:58:37 -07:00
..
activity.ts feat: tab enforcement + POST /pair endpoint + activity attribution 2026-04-04 23:18:27 -07:00
browser-manager.ts merge: resolve conflicts with main (adopt chrome-extension origin gating) 2026-04-04 23:20:15 -07:00
buffers.ts feat: Phase 3.5 — cookie import, QA testing, team retro (v0.3.1) (#29) 2026-03-13 00:31:41 -07:00
bun-polyfill.cjs fix: Windows support — Node.js server fallback for Playwright (#255) 2026-03-20 12:22:11 -07:00
cdp-inspector.ts feat: sidebar CSS inspector + per-tab agents (v0.13.9.0) (#650) 2026-03-30 12:51:05 -06:00
cli.ts fix: verify tunnel is alive before returning URL to pair-agent 2026-04-05 22:58:37 -07:00
commands.ts feat: centralize content wrapping in handleCommandInternal response path 2026-04-05 11:06:50 -07:00
config.ts fix: security wave 1 — 14 fixes for audit #783 (v0.15.7.0) (#810) 2026-04-04 22:12:04 -07:00
content-security.ts test: comprehensive content security tests (47 tests) 2026-04-05 11:25:19 -07:00
cookie-import-browser.ts feat: Wave 3 — community bug fixes & platform support (v0.11.6.0) (#359) 2026-03-23 22:15:23 -07:00
cookie-picker-routes.ts fix: security wave 1 — 14 fixes for audit #783 (v0.15.7.0) (#810) 2026-04-04 22:12:04 -07:00
cookie-picker-ui.ts feat: GStack Browser — double-click AI browser with anti-bot stealth (#695) 2026-04-04 10:17:05 -07:00
find-browse.ts feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
meta-commands.ts feat: snapshot split output format for scoped tokens 2026-04-05 11:23:14 -07:00
platform.ts fix: Windows support — Node.js server fallback for Playwright (#255) 2026-03-20 12:22:11 -07:00
read-commands.ts feat: sidebar CSS inspector + per-tab agents (v0.13.9.0) (#650) 2026-03-30 12:51:05 -06:00
server.ts fix: verify tunnel is alive before returning URL to pair-agent 2026-04-05 22:58:37 -07:00
sidebar-agent.ts fix: security wave 1 — 14 fixes for audit #783 (v0.15.7.0) (#810) 2026-04-04 22:12:04 -07:00
sidebar-utils.ts fix: sidebar agent uses real tab URL instead of stale Playwright URL (v0.12.6.0) (#544) 2026-03-26 22:07:03 -06:00
snapshot.ts feat: snapshot split output format for scoped tokens 2026-04-05 11:23:14 -07:00
token-registry.ts fix: CSO security fixes — token leak, domain bypass, input validation 2026-04-04 23:37:36 -07:00
url-validation.ts fix: security wave 1 — 14 fixes for audit #783 (v0.15.7.0) (#810) 2026-04-04 22:12:04 -07:00
welcome.html feat: GStack Browser — double-click AI browser with anti-bot stealth (#695) 2026-04-04 10:17:05 -07:00
write-commands.ts fix: security wave 1 — 14 fixes for audit #783 (v0.15.7.0) (#810) 2026-04-04 22:12:04 -07:00