gstack/docs
Garry Tan a2751b7cf2
fix(browse): extension token bootstrap moves to pinned-origin POST; /health carries no token
GET /health is now liveness/status only in every mode — both token
carve-outs (headed-mode disjunct AND chrome-extension:// Origin
disjunct) are removed. Token bootstrap is POST /extension-token on the
local listener: the Origin header must be exactly
chrome-extension://<GSTACK_EXTENSION_ID> and the Host header's hostname
must parse to 127.0.0.1 or localhost (parsed via new URL, never literal
equality — Host arrives as '127.0.0.1:34567'). Wrong origin/host → 403
with no detail. The tunnel surface 404s the endpoint (not in
TUNNEL_PATHS, verified by test).

The extension ID is pinned by a new "key" field (RSA public key) in
extension/manifest.json; browse/scripts/extension-id.ts reproduces the
ID derivation (first 16 bytes of SHA-256 of the DER public key, hex
mapped 0-9a-f → a-p). The private key is not committed anywhere —
unpacked/baked-in loads only need the public key.

Extension side: background.js bootstraps and refreshes the token via
POST /extension-token (403 → disconnected state); sidepanel.js direct
connect path does the same; sidepanel-terminal.js's dead /health token
fallback (read AUTH_TOKEN/authToken keys the server never sent,
hardcoded port) is replaced with the window.gstackAuthToken path.

MIGRATION NOTE: the manifest key pins the extension ID, so existing
installs' side-panel local state (saved port, snoozes) resets once —
explained in-product via a one-time notice (flag
gstack_id_migrated_v162). After upgrading the server, restart the
browser so the old service worker stops polling for a token GET /health
no longer serves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit e9a0b6847a2d17fe6656a4686b4efd0c8380eb09)
2026-08-12 15:31:49 -07:00
..
designs fix(browse): extension token bootstrap moves to pinned-origin POST; /health carries no token 2026-08-12 15:31:49 -07:00
evals v1.6.4.0: cut Haiku classifier FP from 44% to 23%, gate now enforced (#1135) 2026-04-23 10:23:40 -07:00
images feat: Completeness Principle — Boil the Lake (v0.6.1) (#140) 2026-03-17 16:34:08 -05:00
spikes v1.61.0.0 fix wave: guards failing open / silent failures (9 fixes, 4 community PRs absorbed) (#2472) 2026-08-08 09:28:45 -07:00
ADDING_A_HOST.md feat: declarative multi-host platform + OpenCode, Slate, Cursor, OpenClaw (v0.15.5.0) (#793) 2026-04-04 15:32:20 -07:00
ON_THE_LOC_CONTROVERSY.md feat: gstack v1 — simpler prompts + real LOC receipts (v1.0.0.0) (#1039) 2026-04-18 15:05:42 +08:00
OPENCLAW.md feat: native OpenClaw skills + ClaHub publishing (v0.15.10.0) (#832) 2026-04-05 10:07:03 -07:00
REMOTE_BROWSER_ACCESS.md fix(browse): extension token bootstrap moves to pinned-origin POST; /health carries no token 2026-08-12 15:31:49 -07:00
askuserquestion-cjk.md v1.56.0.0 Token-reduction Phase B + AUQ paranoid safety net (#1849) 2026-06-04 11:14:43 -07:00
askuserquestion-split.md v1.48.0.0 feat: AskUserQuestion split rule + runtime AUTO_DECIDE carve-out (#1740) 2026-05-26 23:43:07 -07:00
domain-skills.md v1.20.0.0 feat: browser-skills runtime + gbrain-support carryover (#1233) 2026-04-28 20:08:04 -07:00
explanation-diataxis-in-gstack.md v1.35.0.0 feat: add /document-generate skill + enhance /document-release with Diataxis coverage map (#1477) 2026-05-14 11:35:32 -04:00
gbrain-sync-errors.md v1.38.0.0 fix wave: Windows install hardening + Unicode sanitization at server egress (4 community PRs) (#1505) 2026-05-14 21:19:58 -07:00
gbrain-sync.md v1.38.0.0 fix wave: Windows install hardening + Unicode sanitization at server egress (4 community PRs) (#1505) 2026-05-14 21:19:58 -07:00
gbrain-write-surfaces.md v1.52.1.0 feat: brain-aware planning — 5 skills read structured gbrain context before asking (#1742) 2026-05-29 08:35:00 -07:00
howto-diagrams-and-formats.md v1.58.0.0 feat: diagram + multi-format document engine (mermaid, excalidraw, single-file HTML, DOCX) (#1990) 2026-06-12 15:38:53 -07:00
howto-document-a-shipped-feature.md v1.35.0.0 feat: add /document-generate skill + enhance /document-release with Diataxis coverage map (#1477) 2026-05-14 11:35:32 -04:00
howto-ios-testing-with-gstack.md docs(ios-qa): document regeneration and device verification flow 2026-07-14 16:35:30 -07:00
skills.md v1.62.0.0 feat: plan-mode auto-select at the review scope gate (#2533) 2026-08-12 11:12:28 -07:00
tutorial-document-generate.md v1.35.0.0 feat: add /document-generate skill + enhance /document-release with Diataxis coverage map (#1477) 2026-05-14 11:35:32 -04:00