import type { Frame, Page } from 'playwright'; import type { RenderRoute } from './harness'; import type { VisualQaAssert } from './types'; import { type Box3 } from './vehicleClearance'; import { VEHICLE_QA_THRESHOLDS as T, rideHeight, type BodyPoints, type BodyTriangles, type Vec3, type WheelRow } from './vehicleMath'; export declare const VEHICLE_ROUTE_REVISION = "vehicle@2"; export interface Pull { wheels: Array<{ id: string; node: string | null; mount: Vec3; restLength: number | null; travel: number | null; radius: number; axle?: number | null; steered: number; powered: number; compression: number | null; grounded: boolean | null; steerAngleRad: number | null; contactPoint: Vec3 | null; axleNode: Vec3 | null; nodePos: Vec3 | null; meshes: string[]; points: number[]; }>; body: BodyPoints & { names: string[]; points: number[]; mesh: number[]; }; bodyTris: BodyTriangles & { tris: number[]; mesh: number[]; }; /** Per wheel, compression over a window after the pull (median is what is judged). */ compressionWindow?: Array<{ n: number; min: number | null; median: number | null; max: number | null; }>; strays: Array<{ mesh: string; centre: Vec3 | null; }>; /** The v2 land solver's tyre per axle, when the car runs on it (radius only). */ tyreByAxle?: Array<{ radius: number | null; }> | null; excludedHardware: string[]; bodyMeshes: number; bodyVerts: number; batches: Array<{ name: string; instances: number; }>; proxies: number; state: Record; } /** * THE OCCUPANT MUST BE THE SAME PERSON ON EVERY RUN. The test-grounds page seats the local player as a World GUEST, and a guest's * starter look is a hash pick (`defaultGuestLoadout`: sha256 of the guest subject, minted fresh for each browser) among the * kit's variants: Base Male in the original outfit, Base Male in the newest one (cap, zip hoodie, dropped jeans: the look the * Base Male card shows), or Base Female with a ponytail. Re-running one unchanged F355 package gave head_in_wings PASS with the * newest male (18,974 skin points) and FAIL "back 46 mm INTO the seat" with the female (23,084) minutes apart, at the same * cabin fit; the original male seats yet another way (24,981 points, hips 3 mm higher). The route that answers the page with * the platform default avatar (`avatar/equipped/me`, above) is never asked on that path. So the guest route is read, and a load * that did not seat the platform default look is thrown away and loaded again with a new guest, which costs ~12 s because it * is caught before the car is touched. `HELIX_VQA_OCCUPANT_TRIES` bounds it (default 14: one chance in three, so 0.3 % to miss). */ export declare class OccupantNotReference extends Error { readonly seen: string; readonly want: string; constructor(seen: string, want: string); } /** Base Male in the newest starter outfit: the platform default look (helix3 kit, `GUEST_KIT_VARIANTS`, the last Base Male variant). */ export declare const REFERENCE_OCCUPANT_OUTFIT: readonly string[]; /** The body and the worn items a guest-avatar answer dresses: the saved loadout's, else the composition's base (items unknown), else the item itself. */ export declare function guestAvatarLook(answer: unknown): { body: string; items: string[] | null; } | null; /** Is this look the reference: the platform default body, and, when the answer names its items, the newest male outfit. */ export declare function isReferenceLook(look: { body: string; items: string[] | null; }, wantBody: string, wantOutfit?: readonly string[]): boolean; /** In-bundle clipping evidence frames per pass (rendition): the worst clashes only, each one a different place. */ export declare const EVIDENCE_MAX = 3; /** A wheel whose drawn geometry fails at_hubs or arch_clearance on its own (the same per-wheel criteria they judge). */ export declare function wheelFailsGeometry(r: WheelRow, t?: typeof T): boolean; export declare const renderVehicle: RenderRoute; /** Every assert of a pass carries the rendition it was measured on (none when the package declares no renditions). */ export declare function tagRendition(asserts: VisualQaAssert[], rendition: string | null): VisualQaAssert[]; /** The asserts measured on the drawn model (what a rendition can change); the rest are physics or input. */ export declare const PER_RENDITION_ASSERT: RegExp; /** Where a rendition's sealed bytes live: its `mesh.visual.renditions[].artifactRef` (checked against the CID), else the * Continuum public object of that CID. */ export declare function artifactUrl(root: Record | null, id: string, cid: string, apiBase: string): string; export interface RenditionPlanRow { id: string; role: string; cid: string; tier: string | null; } /** * The model renditions a vehicle package declares (manifest variants with a `vehicle.model.web.*` role). The default is * the one the gate's model CID names (target-balanced); every other one is rendered through the tier that selects it, * the tier with the richest interior when several do (a `minimal` tier hides the cabin). */ /** The sealed root's and the candidate vehicle package's renditions vs the Version's GLB variants (`vehicle/renditionManifest.ts`). */ export declare function unsealedRenditionErrors(variants: Array<{ id: string; role: string; cid: string; }>, root: Record | null, candidatePackage: Record | null, version: string | null): string[]; export declare function renditionPlan(variants: Array<{ id: string; role: string; cid: string; }>, defaultCid: string | null, root: Record | null): { default: RenditionPlanRow | null; others: RenditionPlanRow[]; declared: RenditionPlanRow[]; errors: string[]; }; /** Wait for the world frame to present the vehicle, bailing early when the shell refuses the trial. */ export declare function waitPresented(page: Page, timeoutMs: number, fault?: () => string | null): Promise<{ frame: Frame | null; reason: string; }>; /** Wheel table from a pull: drawn geometry, physics hub, arch + penetration, ride height. */ export declare function buildWheelRows(pull: Pull): { rows: WheelRow[]; duplicates: Array<{ mesh: string; nearWheel: string; distM: number; }>; ride: ReturnType; plane: [number, number, number]; }; /** * Clear distance from the car's bumper (front for dir +1, rear for -1) along its own heading to the first scenery box, * sampled from five points across the bumper face at two heights. Infinity when the grounds report nothing there. */ export declare function bumperClearance(sc: { boxes: Box3[]; bodyToWorld: number[]; }, bounds: { min: Vec3; max: Vec3; }, dirSign: 1 | -1): { distanceM: number; box: string | null; skipped: number; }; /** * The drive. Plans against the test grounds' own scenery so it never ends against a wall (F40 round 1: it did, and every * body-frame exterior camera after it was then inside the wall): it measures the clear room behind and ahead, backs up * no further than that room allows, releases the throttle early enough to settle, coast and still stop `marginM` short * of what is ahead, samples the spin once launch wheelspin has died away and only over the free part of the coast, and * finally drives back to where it started (closed loop on position, bounded time), so the occupant phase has the space * the car was spawned in. Stops use the foot brake (the opposite pedal, as a player does) with the handbrake. */ /** A spin failure that says the coast was not SAMPLED well (too few frames, too sparse, too short, the car met something at once), as opposed to a measured wheel that does not follow the road. */ export declare function spinFailureIsSamplingOnly(reason: string | null): boolean;