/** * Refuse a `helix-humanoid@1` character GLB whose bones are not in the canonical rest FRAMES. * * ── THE DEFECT (live, found 2026-10-02 by the whole-catalogue visual-QA sweep) ─────────────────────── * Cyberpunk Female Base 1.0.4–1.0.7 shipped with every bone frame turned 180 degrees about the vertical axis. * The source faced -Z, the importer (`fitSkeletonToWarrior`) embedded the canonical skeleton at the source's joint * positions (so left-side bones sat on the -X side of the root frame) and the author turned the whole thing round * with a `cyberpunk_forward_frame` wrapper node (q 0,1,0,0) above skeleton AND mesh. A wrapper like that keeps * every WORLD POSITION right, so it renders correctly at rest, in every thumbnail and in every T-pose proof — and * leaves every bone FRAME 180 degrees off canonical. The clips are absolute canonical local rotations * (`retargetLocomotion.ts`: "Canonical rotations are absolute local poses"), so idle folded both hands behind the * back and the walk/run swung the arms and legs the wrong way round. Every skinned add-on bound to that base inherits * the rig, so none of them could be fitted or posed correctly either. * * ── WHY EVERY EXISTING GATE PASSED IT ────────────────────────────────────────────────────────────── * Same story as `normalMapGuard.ts`: skeleton checks compare joint NAMES, ORDER and rest POSITIONS. None compared * a rest ORIENTATION to anything. * * ── THE TEST ─────────────────────────────────────────────────────────────────────────────────────── * Every conformed `helix-humanoid@1` body measured on 2026-10-02 (17 live characters, Base Male/Female, Sims 4, * Kemonomimi, Unitree G1, Brass Keeper...) has its trunk, neck, head, leg and foot frames within 35 degrees of the * canonical rest world frame, and its arm chain (aimed at the source's own arm pose) within 65. The flipped * Cyberpunk base is at 171-180 on every one of them. Anything past `REST_FRAME_MAX_DEVIATION_DEG` is a turned or * rolled skeleton, never a pose difference. Only a rig that actually carries the canonical joint names is judged; * a rig with none of them is somebody else's skeleton and is left alone. * * Escape hatch: `HELIX_ALLOW_NONCANONICAL_REST_FRAMES=1`. */ import type { Document } from '@gltf-transform/core'; export declare const REST_FRAME_MAX_DEVIATION_DEG = 100; /** The bones every humanoid body must have in the canonical orientation: trunk, head, legs, feet and the arm chain. */ export declare const REST_FRAME_CHECKED_JOINTS: readonly string[]; export interface RestFrameFinding { joint: string; degrees: number; } export interface RestFrameReport { /** Joints actually compared (those present in both the GLB and the canonical skeleton). */ checked: number; findings: RestFrameFinding[]; } /** Compare the first skin's joint WORLD frames (wrapper nodes included: they are part of what the engine draws) to canonical. */ export declare function inspectRestFrames(document: Document): RestFrameReport; export declare function describeRestFrameFindings(findings: readonly RestFrameFinding[]): string; /** Throws with an itemized report when the rig is a canonical humanoid that is turned or rolled away from the canonical frames. */ export declare function assertRestFramesAreCanonical(document: Document, name?: string): RestFrameReport; export declare function assertGlbRestFramesAreCanonical(glb: Uint8Array, name?: string): Promise; /** Shared by publish and publish --dry-run, so the gate before the fee is the gate at it. Character BASES only: an add-on carries a part skeleton judged by its host. */ export declare function assertPublishRestFrames(opts: { kind: string; mesh?: string; }, meshBytes: Uint8Array | null | undefined): Promise;