gstack/bin
Garry Tan bdb6023713
fix(browse): sanitize lone Unicode surrogates at commandResult chokepoint + /batch envelope (#1440)
Page captures with mixed-script Unicode round-trip cleanly to the Claude API.
Two new utilities in browse/src/sanitize.ts: stripLoneSurrogates for raw UTF-16
strings, stripLoneSurrogateEscapes for \uXXXX JSON escape text. sanitizeBody
picks the right pass based on cr.json.

buildCommandResponse is extracted from handleCommand (now exported) and
applies sanitization before new Response(). /batch was bypassing this
chokepoint via direct JSON.stringify, so it sanitizes each cr.result before
pushing AND wraps the envelope with stripLoneSurrogateEscapes. Defense in
depth wraps at getCleanText, getCleanTextWithStripping, html, accessibility,
and snapshot.ts return points so downstream consumers (datamarking, envelope
wrapping) see sanitized text before the response is built.

25 new unit tests across sanitize.test.ts and build-command-response.test.ts.
content-security.test.ts updated to accept either pre- or post-sanitize form
of the snapshot scoped branch (source-level regression check).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 13:58:35 -07:00
..
chrome-cdp fix: security audit round 2 (v0.13.4.0) (#640) 2026-03-29 22:46:33 -06:00
dev-setup feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
dev-teardown feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
gstack-analytics feat: opt-in usage telemetry + community intelligence platform (v0.8.6) (#210) 2026-03-19 17:21:05 -07:00
gstack-artifacts-init fix(browse): sanitize lone Unicode surrogates at commandResult chokepoint + /batch envelope (#1440) 2026-05-14 13:58:35 -07:00
gstack-artifacts-url v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-brain-consumer v1.17.0.0: setup-gbrain wireup ships the gbrain federation surface (#1234) 2026-04-28 01:17:54 -07:00
gstack-brain-context-load.ts v1.26.0.0 feat: V1 transcript ingest + per-skill gbrain manifests + retrieval surface (#1298) 2026-05-02 08:40:30 -07:00
gstack-brain-enqueue v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-brain-reader feat(v1.9.0.0): gbrain-sync — cross-machine gstack memory (#1151) 2026-04-23 17:54:54 -07:00
gstack-brain-restore v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-brain-sync v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-brain-uninstall v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-builder-profile feat: gstack v1 — simpler prompts + real LOC receipts (v1.0.0.0) (#1039) 2026-04-18 15:05:42 +08:00
gstack-codex-probe codex + Apple Silicon hardening wave (v0.18.4.0) (#1056) 2026-04-18 12:30:54 +08:00
gstack-community-dashboard fix: Supabase telemetry security lockdown (v0.11.16.0) (#460) 2026-03-24 15:01:31 -07:00
gstack-config v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-developer-profile feat(v1.9.0.0): gbrain-sync — cross-machine gstack memory (#1151) 2026-04-23 17:54:54 -07:00
gstack-diff-scope feat: Review Army — parallel specialist reviewers for /review (v0.14.3.0) (#692) 2026-03-30 22:07:50 -06:00
gstack-extension feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
gstack-gbrain-detect v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-gbrain-install v1.12.2.0 fix: /setup-gbrain day-two fixes (MCP scope, version parse, gh repo create order, smoke test) (#1187) 2026-04-24 07:51:46 -07:00
gstack-gbrain-lib.sh v1.12.0.0 feat: /setup-gbrain — coding-agent onboarding for gbrain (#1183) 2026-04-24 01:38:21 -07:00
gstack-gbrain-mcp-verify v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-gbrain-repo-policy v1.12.0.0 feat: /setup-gbrain — coding-agent onboarding for gbrain (#1183) 2026-04-24 01:38:21 -07:00
gstack-gbrain-source-wireup v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-gbrain-supabase-provision v1.12.0.0 feat: /setup-gbrain — coding-agent onboarding for gbrain (#1183) 2026-04-24 01:38:21 -07:00
gstack-gbrain-supabase-verify v1.12.0.0 feat: /setup-gbrain — coding-agent onboarding for gbrain (#1183) 2026-04-24 01:38:21 -07:00
gstack-gbrain-sync.ts v1.33.0.0 feat: /sync-gbrain memory-stage batch-import refactor (D1-D8) + F6/F9 + signal cleanup (#1432) 2026-05-11 18:47:33 -07:00
gstack-global-discover.ts refactor: AI slop reduction with cross-model quality review (v0.16.3.0) (#941) 2026-04-10 17:13:15 -10:00
gstack-jsonl-merge v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-learnings-log v1.34.2.0 fix wave: /codex review on CLI 0.130+, /investigate learnings, /sync-gbrain on Supabase (3 community-reported bugs) (#1478) 2026-05-14 11:11:52 -04:00
gstack-learnings-search v1.33.1.0 fix(learnings): token-OR query + task-shaped retrieval in 3 long skills (#1442) 2026-05-11 19:34:33 -07:00
gstack-memory-ingest.ts v1.33.0.0 feat: /sync-gbrain memory-stage batch-import refactor (D1-D8) + F6/F9 + signal cleanup (#1432) 2026-05-11 18:47:33 -07:00
gstack-model-benchmark feat(v1.3.0.0): open agents learnings + cross-model benchmark skill (#1040) 2026-04-19 17:50:31 +08:00
gstack-next-version v1.11.0.0 feat(ship): workspace-aware version allocation (#1168) 2026-04-23 23:03:27 -07:00
gstack-open-url feat: community wave — 7 fixes, relink, sidebar Write, discoverability (v0.13.5.0) (#641) 2026-03-29 21:43:36 -06:00
gstack-patch-names fix: ship idempotency + skill prefix name patching (v0.14.3.0) (#693) 2026-03-30 22:25:46 -06:00
gstack-paths v1.24.0.0 feat: cross-platform hardening — curated Windows lane + Bun.which resolver + path-portability helper (#1252) 2026-05-01 07:21:28 -07:00
gstack-platform-detect feat: declarative multi-host platform + OpenCode, Slate, Cursor, OpenClaw (v0.15.5.0) (#793) 2026-04-04 15:32:20 -07:00
gstack-pr-title-rewrite.sh v1.23.0.0 feat: always prefix PR titles with v<VERSION> (#1284) 2026-05-01 07:06:37 -07:00
gstack-question-log feat(v1.9.0.0): gbrain-sync — cross-machine gstack memory (#1151) 2026-04-23 17:54:54 -07:00
gstack-question-preference feat: gstack v1 — simpler prompts + real LOC receipts (v1.0.0.0) (#1039) 2026-04-18 15:05:42 +08:00
gstack-relink fix: top-level skill dirs so Claude discovers unprefixed names (#761) 2026-04-02 18:34:00 -07:00
gstack-repo-mode feat: test coverage catalog — shared audit across plan/ship/review (v0.10.1.0) (#259) 2026-03-22 11:28:16 -07:00
gstack-review-log feat(v1.9.0.0): gbrain-sync — cross-machine gstack memory (#1151) 2026-04-23 17:54:54 -07:00
gstack-review-read fix: gstack-slug bash compatibility — source to eval (#354) 2026-03-22 21:02:01 -07:00
gstack-security-dashboard feat(security): ML prompt injection defense for sidebar (v1.4.0.0) (#1089) 2026-04-20 22:18:37 +08:00
gstack-session-update feat: team-friendly gstack install mode (v0.15.7.0) (#809) 2026-04-05 23:49:03 -07:00
gstack-settings-hook feat: Confusion Protocol, Hermes + GBrain hosts, brain-first resolver (v0.18.0.0) (#1005) 2026-04-16 10:41:38 -07:00
gstack-slug fix: gstack-slug produces deterministic slugs across sessions (#897) 2026-04-07 15:42:13 -10:00
gstack-specialist-stats feat: adaptive gating + cross-review dedup for review army (v0.15.2.0) (#760) 2026-04-04 22:46:21 -07:00
gstack-taste-update feat(v1.3.0.0): open agents learnings + cross-model benchmark skill (#1040) 2026-04-19 17:50:31 +08:00
gstack-team-init fix: security wave 3 — 12 fixes, 7 contributors (v0.16.4.0) (#988) 2026-04-13 07:49:37 -10:00
gstack-telemetry-log feat(security): ML prompt injection defense for sidebar (v1.4.0.0) (#1089) 2026-04-20 22:18:37 +08:00
gstack-telemetry-sync fix: community security wave — 8 PRs, 4 contributors (v0.15.13.0) (#847) 2026-04-06 00:47:04 -07:00
gstack-timeline-log v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-timeline-read feat: Session Intelligence Layer — /checkpoint + /health + context recovery (v0.15.0.0) (#733) 2026-04-01 00:50:42 -06:00
gstack-uninstall feat: team-friendly gstack install mode (v0.15.7.0) (#809) 2026-04-05 23:49:03 -07:00
gstack-update-check v1.34.1.0 fix: gstack-update-check resists stale GitHub raw CDN + adds semver-order guard (#1475) 2026-05-13 13:37:31 -04:00