Files
gstack/test/helpers/aside-available.ts
T
SinaandClaude Fable 5.1 6cdf19337d feat(aside): browser-driver contract, cookbook, research and fallback resolvers
{{ASIDE_SETUP}} (readiness probe + ten rules for driving the user's real browser), {{ASIDE_COOKBOOK}} (script shapes verified live against Aside CLI 1.26: one flow per aside repl script, CDP console hook before navigation, evidence lines, session-directory artifact handoff, GSTACK_STEP_OK sentinel), {{ASIDE_RESEARCH}} (research through aside exec, WebSearch when Aside is absent, knowledge otherwise) and {{BROWSE_FALLBACK}} (the fifteen-row Aside-step to $B-command table plus the rules that differ, so every browsing skill keeps working on gstack's own headless browser). test/aside-driver.test.ts pins the sentences and asserts every browsing skill carries the Aside block followed by the fallback; test/helpers/aside-available.ts is the shared live-Aside probe.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-05 16:40:15 -04:00

19 lines
714 B
TypeScript

/**
* Runtime probe for the Aside AI browser — the primary browser; gstack's own
* headless browser is the fallback. E2E tests that need a live Aside call
* `asideAvailable()` and self-skip when it is false (CI runners have no
* Aside; the fallback path is exercised there instead). The probe is the
* one the skills run in BROWSER SETUP, shared via lib/aside-render.ts so a
* probe fix lands everywhere at once.
*/
import { probeAside } from '../../lib/aside-render';
let cached: boolean | null = null;
export function asideAvailable(): boolean {
if (cached !== null) return cached;
if (process.env.GSTACK_SKIP_ASIDE === '1') return (cached = false);
cached = probeAside().ok;
return cached;
}