mirror of https://github.com/garrytan/gstack.git
Adds the foundation layer for Puppeteer-parity features: - TabSession.loadedHtml + setTabContent/getLoadedHtml/clearLoadedHtml — enables load-html content to survive context recreation (viewport --scale) via in-memory replay. ASCII lifecycle diagram in the source explains the clear-before-navigation contract. - COMMAND_ALIASES + canonicalizeCommand() helper — single source of truth for name aliases (setcontent / set-content / setContent → load-html), consumed by server dispatch and chain prevalidation. - buildUnknownCommandError() pure function — rich error messages with Levenshtein-based "Did you mean" suggestions (distance ≤ 2, input length ≥ 4 to skip 2-letter noise) and NEW_IN_VERSION upgrade hints. - load-html registered in WRITE_COMMANDS + SCOPE_WRITE so scoped write tokens can use it. - screenshot and viewport descriptions updated for upcoming flags. - New browse/test/dx-polish.test.ts (15 tests): alias canonicalization, Levenshtein threshold + alphabetical tiebreak, short-input guard, NEW_IN_VERSION upgrade hint, alias + scope integration invariants. No consumers yet — pure additive foundation. Safe to bisect on its own. |
||
|---|---|---|
| .. | ||
| activity.ts | ||
| audit.ts | ||
| browser-manager.ts | ||
| buffers.ts | ||
| bun-polyfill.cjs | ||
| cdp-inspector.ts | ||
| cli.ts | ||
| commands.ts | ||
| config.ts | ||
| content-security.ts | ||
| cookie-import-browser.ts | ||
| cookie-picker-routes.ts | ||
| cookie-picker-ui.ts | ||
| error-handling.ts | ||
| find-browse.ts | ||
| media-extract.ts | ||
| meta-commands.ts | ||
| network-capture.ts | ||
| path-security.ts | ||
| platform.ts | ||
| read-commands.ts | ||
| server.ts | ||
| sidebar-agent.ts | ||
| sidebar-utils.ts | ||
| snapshot.ts | ||
| tab-session.ts | ||
| token-registry.ts | ||
| url-validation.ts | ||
| welcome.html | ||
| write-commands.ts | ||