export declare const VISUAL_QA_BUNDLE_SCHEMA: "helix.visual-qa.bundle@1"; /** What the item is, for choosing the render route, camera poses, asserts and the critic checklist. */ export type VisualQaCategory = 'vehicle' | 'vehicle-addon' | 'character-addon' | 'wearable' | 'avatar' | 'animation' | 'scene' | 'prop'; export type VisualQaSeverity = 'block' | 'warn'; /** One automatic, numeric check made against the live scene graph. */ export interface VisualQaAssert { /** Stable id, e.g. `vehicle.wheels.at_hubs`. The server's required list is keyed on these. */ id: string; pass: boolean; severity: VisualQaSeverity; /** One human sentence naming what was measured and why it passed/failed (shown on the contact sheet). */ detail: string; /** The raw numbers behind the verdict, so a reviewer can re-derive it. */ measured?: Record; /** Which host/base/add-on this assert is about, when the item is rendered on several. */ subject?: string; /** * Which model rendition was measured: the Package manifest variant id (`target-balanced`, `target-mobile-low` …). * Absent = the balanced/default variant (every harness before per-rendition measurement). */ rendition?: string; } /** One rendered frame. `file` is relative to the bundle directory; `data` is base64 JPEG when submitted inline. */ export interface VisualQaFrame { id: string; label: string; group: string; file: string; width: number; height: number; /** Which host/base/add-on the frame shows, when relevant. */ subject?: string; data?: string; } /** Identity of exactly what was rendered. A bundle is only valid for the version it names. */ export interface VisualQaItemIdentity { itemId: string; title: string; category: VisualQaCategory; itemType?: string | null; /** Continuum package version uuid the item pointed at when rendered (the gate key). */ packageVersionId: string | null; /** `sha256:` manifest CID of that version (cross-checked by the server). */ manifestCid: string | null; packageId?: string | null; packageVersion?: string | null; /** Vehicles only: `properties.vehiclePackageIdentity.checksumSha256`. */ vehicleChecksum?: string | null; } export interface VisualQaHarnessInfo { version: string; route: string; url: string; host: string; renderer: string | null; engineVersion: string | null; startedAt: string; durationMs: number; /** Every GLB/KTX2 URL the page fetched — identity proof that the item's own bytes were rendered. */ fetchedAssets: string[]; /** The exact browser build that drew the frames (absent on harnesses before 2026-10-03). A WebGPU render on a build * with a broken shader compiler judges the browser, not the item, so every run names its build. */ browser?: VisualQaBrowserInfo | null; } export interface VisualQaBrowserInfo { name: string; version: string | null; executablePath: string | null; channel: 'pinned-cft' | 'env-override' | 'explicit' | 'remote-cdp'; userAgent?: string | null; /** Startup WebGPU self-test (`v.xy.x` swizzle repro + control shader). */ webgpu?: { status: 'available' | 'none' | 'error' | 'skipped'; adapter?: string | null; selfTest: 'pass' | 'fail' | 'skipped'; detail?: string; ms?: number; }; } export interface VisualQaBundle { schema: typeof VISUAL_QA_BUNDLE_SCHEMA; item: VisualQaItemIdentity; harness: VisualQaHarnessInfo; frames: VisualQaFrame[]; asserts: VisualQaAssert[]; /** Category-specific raw measurements (wheel table, articulation sweep, bounds …). */ facts: Record; /** Hosts/bases the item was fitted to (add-ons, wearables) or add-ons fitted to it (vehicle runs). */ subjects?: Array<{ id: string; title: string; role: 'host' | 'base' | 'addon'; }>; /** Harness-side errors. Any entry makes the run fail closed. */ errors: string[]; } /** One check the vision critic answers. The server's copy of these lists is authoritative. */ export interface VisualQaCriticCheck { id: string; question: string; } /** Where the critic saw a defect. Required for every failing `vehicle.occupant.*` check; optional for the rest. */ export interface VisualQaCriticLocation { /** The seat key from the occupant frame id (`occupant..…`), or null when it is not about one seat. */ seat: string | null; bodyPart: 'head' | 'torso' | 'arm' | 'hand' | 'hip' | 'thigh' | 'knee' | 'leg' | 'foot' | 'other'; cabinPart: 'roof' | 'pillar' | 'door' | 'seat' | 'dash' | 'wheel' | 'pedals' | 'floor' | 'console' | 'other'; /** The id of the frame it was seen in. */ frame: string; } export interface VisualQaCriticCheckAnswer { id: string; verdict: 'pass' | 'fail' | 'cannot_judge'; reason: string; /** Where (failing occupant checks). Null or absent when the check passed or names no place. */ location?: VisualQaCriticLocation | null; /** * Avatars only (`avatar-severity@1`): every defect the critic saw on a FAILING check, each tagged with its class and * whether it blocks (`visual-qa.severity.ts`). Empty on a pass; absent on any other category and on older records. */ findings?: VisualQaCriticFinding[]; /** * Avatars only, on a failing check of the resolved (majority) answer: `warn` when the agreeing votes say every defect * is a generator limit (release privately with a warning), else `block`. Absent: `block` (fail closed). */ severity?: VisualQaDefectSeverity; } /** Does a defect stop an avatar (`block`) or ship privately with a warning (`warn`)? See `visual-qa.severity.ts`. */ export type VisualQaDefectSeverity = 'block' | 'warn'; /** One defect the critic saw on a failing avatar check. */ export interface VisualQaCriticFinding { /** The defect class (`AVATAR_DEFECT_CLASSES`): `hair_volume`, `limb_in_body`, … */ defect: string; /** The critic's own tag. The server never lets it downgrade a BLOCK class (`effectiveFindingSeverity`). */ severity: VisualQaDefectSeverity; /** One sentence: what and where. */ summary: string; } /** * One line of a verdict, machine-readable: a blocker (stops the item) or a warning (an avatar that still releases * privately). `id` is the measured assert id, `defect.` for a critic finding, or `harness.error` / * `critic.` when the run could not be judged. */ export interface VisualQaVerdictItem { id: string; summary: string; fixHint: string; source: 'measured' | 'critic' | 'harness'; /** The assert or critic check ids this line comes from. */ checks: string[]; } /** * A critic failure the server did NOT count as a failure: a location-gated check (`vehicle.occupant.no_clipping`) * fails only when at least two failing votes name the same (seat, bodyPart, cabinPart) and one of them names a frame * the bundle carries. Otherwise the failing votes are recorded here and shown on the contact sheet, never as a reason. */ export interface VisualQaCriticWarning { checkId: string; reason: string; /** Every valid vote that failed the check, in vote order (index into `votes`). */ failingVotes: Array<{ vote: number; reason: string; location: VisualQaCriticLocation | null; /** The named frame id is one the bundle carries. */ frameInBundle: boolean; }>; } export interface VisualQaCriticUsage { /** Fresh + cache-write + cache-read input tokens. */ inputTokens: number; outputTokens: number; costUsd: number | null; } /** * One critic answer on the same frames. A run records every vote it looked at, including calls that produced * no usable answer (`status` != `valid`) and, when an earlier harness run on the identical item, version and * frames was counted, that run's answer (`source: 'prior_run'`). */ export interface VisualQaCriticVote { source: 'call' | 'prior_run'; /** `valid` = a parsed answer to the schema; anything else never counts as a pass and never as a vote. */ status: 'valid' | 'error' | 'refused'; /** Why a vote is not valid. */ reason?: string; model: string | null; provider: 'anthropic' | 'openrouter' | null; checks: VisualQaCriticCheckAnswer[]; overall: 'pass' | 'fail' | null; summary: string; usage: VisualQaCriticUsage | null; durationMs: number | null; /** `prior_run` only. */ priorRunId?: string; } /** How often and why the critic was asked more than once for this run. */ export interface VisualQaCriticMajority { /** More than one valid vote was needed or recorded for the verdict. */ used: boolean; /** Why: `pass_unconfirmed`, `cannot_judge`, `overall_inconsistent`, `few_failing_checks`, `first_call_invalid`, `prior_run_disagrees`. */ triggers: string[]; /** Critic API calls this submit made (at most 3). */ callsMade: number; validVotes: number; } export interface VisualQaCriticVariance { /** Every valid vote gave the identical per-check verdicts and overall. */ unanimous: boolean; /** Check ids on which valid votes did not all agree. */ flippedChecks: string[]; } export interface VisualQaCriticResult { model: string; provider: 'anthropic' | 'openrouter'; /** With `votes`: the per-check MAJORITY of the valid votes. */ checks: VisualQaCriticCheckAnswer[]; /** With `votes`: derived from the majority checks, never taken from any one vote's own `overall`. */ overall: 'pass' | 'fail'; summary: string; /** Sum over every call this submit made. */ usage: VisualQaCriticUsage; durationMs: number; votes?: VisualQaCriticVote[]; majority?: VisualQaCriticMajority; variance?: VisualQaCriticVariance; /** Location-gated failures that did not meet the agreement rule (warnings, never reasons). */ warnings?: VisualQaCriticWarning[]; /** * The paired control an avatar was judged against (`visual-qa.avatar-control.ts`): the checked-in set id, the * reference bodies and the sha256 of every control frame shown. Absent when no control was shown. */ control?: { set: string; bases: string[]; frames: Array<{ id: string; sha256: string; }>; }; /** * The colour request an avatar's `avatar.textures` was judged in (`visual-qa.avatar-colour.ts`): its version and the * frame ids it was shown. Absent when the check was asked in the main request. */ colour?: { request: string; frames: string[]; }; /** * The Marketplace walk-preview request an avatar's `avatar.preview_walk` was judged in (`visual-qa.avatar-preview.ts`, * route `avatar@3`): its version and the avatar frame ids it was shown (control frames are in `control`). */ preview?: { request: string; frames: string[]; }; /** The effort an avatar's Marketplace walk-preview request ran at (`VISUAL_QA_AVATAR_PREVIEW_EFFORT`). */ previewEffort?: string; /** The block/warn rubric the avatar critic tagged its findings with (`AVATAR_SEVERITY_RUBRIC_VERSION`). */ severityRubric?: string; } /** * `warn` (avatars only): judged, nothing blocks, but generator-limit defects were found. Released PRIVATELY to its * owner with `warnings`; never counts as a pass for any public gate. */ export type VisualQaVerdict = 'pass' | 'warn' | 'fail' | 'error';