/** * B8 (PRODUCT-WORKS J6): the browser runtime crew's install-time editor conformance run needs. * * Garden's runner (`scripts/editor/conformance.py`) drives headless Chromium through the PYTHON * Playwright package. Nothing installs that package: a fresh daemon host met * `422 conformance_unavailable` ("no headless browser") on the first editor-plugin install, and the * operator had to `pip install playwright` by hand. The conformance run is crew's own gate (only * crew's run counts, DES-artifact-editor-plugins ยง12.1), so crew provisions its runtime: a private * virtualenv with a pinned Playwright, and Playwright's Chromium (a no-op when the shared browser * cache already holds it). It is made once, on the first install that needs it, and reused; * nothing is installed into the operator's own Python. * * It lives in the OS cache directory ({@link conformanceRuntimeRoot}), NOT the state home: every * top-level state-home entry must be registered with the engine's launch fence, and an * unregistered one refuses every governed launch. A cache is also what it is: deleting it costs * one re-provisioning. * * A host where that cannot be done (no Python with `venv`, no package index) still refuses the * install, fail closed, but says what crew tried, what failed and the one command that fixes it. */ import { execCapped } from '../core/exec.js'; /** The Playwright release crew provisions (the one garden's runner is exercised with on the rig). */ export declare const CONFORMANCE_PLAYWRIGHT_VERSION = "1.64.0"; /** Overrides {@link CONFORMANCE_PLAYWRIGHT_VERSION} (a pin, e.g. `1.65.0`). */ export declare const CONFORMANCE_PLAYWRIGHT_ENV = "WICKED_CONFORMANCE_PLAYWRIGHT"; /** Overrides {@link conformanceRuntimeRoot}: where the runtime is kept. */ export declare const CONFORMANCE_RUNTIME_DIR_ENV = "WICKED_CONFORMANCE_RUNTIME_DIR"; /** Written into a venv only once every provisioning step succeeded. */ export declare const PROVISIONED_MARKER = ".wicked-provisioned"; /** The OS cache directory's `wicked-crew/editor-conformance`, or the override. */ export declare function conformanceRuntimeRoot(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string): string; export type Provisioned = { ok: true; python: string; } | { ok: false; error: string; }; export type ConformanceProvisioner = () => Promise; /** The venv's interpreter, by platform. */ export declare function venvPython(venv: string, platform?: NodeJS.Platform): string; /** Whether a garden conformance report says the browser runtime is what is missing. */ export declare function needsBrowserRuntime(error: string | undefined): boolean; export interface ProvisionDeps { exec?: typeof execCapped; env?: NodeJS.ProcessEnv; platform?: NodeJS.Platform; } /** * The provisioner over `` (crew passes {@link conformanceRuntimeRoot}). Concurrent callers * share one provisioning; a finished one is marked and reused; a failed one leaves nothing behind * and is retried by the next install. */ export declare function conformanceProvisioner(root: () => string, deps?: ProvisionDeps): ConformanceProvisioner; //# sourceMappingURL=conformance-runtime.d.ts.map