import { type GlbSummary } from "../glb"; /** * WHAT THE PLATFORM WILL SAY ABOUT THIS AVATAR, SAID HERE INSTEAD. * * Package publication uploads the GLB byte-for-byte and the backend verifies it on arrival. That is the correct * division of labour — the server must never trust a client's word about the file — but it means every * rejection costs an upload, and the creator learns their character is a material over the cap after the round * trip rather than before it. The failures are all statically checkable from the file, so this checks them. * * The numbers are the BACKEND's own defaults (`AVATAR_MAX_*` in its config), duplicated deliberately and * labelled as such: a client-side preflight that guesses looser limits than the server is worse than no * preflight, because it produces confident green output for a file that will be refused. When the server's * numbers move, these move with them — and being wrong here costs a round trip, exactly what it costs today. * * The manifest checks are the other half, and they have no server counterpart at all. A character can pass * every numeric limit and still arrive with no physics, no face and no first-person head declaration, which is * a silently diminished avatar rather than a rejected one — the worst failure mode this pipeline has, and the * one it has already shipped twice. */ /** The backend's `AVATAR_MAX_*` defaults. Mirrored, not derived: this process cannot see that config. */ export declare const AVATAR_LIMITS: { readonly maxTriangles: 60000; readonly maxTextureEdge: 2048; readonly maxFileBytes: number; readonly maxMaterials: 8; }; /** * The backend's `AVATAR_MAX_BONES`: distinct joint names in the skeleton, counted once however many LOD skins repeat them. * helix-humanoid@1 is 68 core joints; the rest is spring-chain joints. Generated avatars hold themselves to 128. */ export declare const AVATAR_MAX_BONES = 256; /** The wearable ceilings, roughly a third of an avatar's, because several are worn at once. */ export declare const WEARABLE_LIMITS: { readonly maxTriangles: 20000; readonly maxTextureEdge: 2048; readonly maxFileBytes: number; readonly maxMaterials: 4; }; /** The backend's `VEHICLE_MAX_*` defaults. A vehicle is not furniture and is not judged as such. */ export declare const VEHICLE_LIMITS: { readonly maxTriangles: 90000; readonly maxTextureEdge: 2048; readonly maxFileBytes: number; readonly maxMaterials: 48; }; /** The backend's `WEAPON_MAX_*` defaults. Held at arm's length in first person; not furniture either. */ export declare const WEAPON_LIMITS: { readonly maxTriangles: 30000; readonly maxTextureEdge: 2048; readonly maxFileBytes: number; readonly maxMaterials: 12; }; /** The backend's `HOME_ITEM_MAX_*` defaults. */ export declare const HOME_ITEM_LIMITS: { readonly maxTriangles: 15000; readonly maxTextureEdge: 2048; readonly maxFileBytes: number; readonly maxMaterials: 6; }; /** Kinds this preflight can judge. A kind absent here is left entirely to the server. */ export type PreflightKind = 'avatar' | 'wearable' | 'add_on' | 'home_item' | 'vehicle' | 'weapon'; /** * THE DRAW-CALL WALL, PER KIND — the backend's `*_MAX_DRAW_CALLS` defaults. * * A draw call is one glTF mesh primitive, counted once per node that places it. * It is NOT the material count, which is only a lower bound: the published * reference vehicle bound 43 materials across 188 primitives and so cleared a * 48-material ceiling by 11 while submitting 188 batches. * * Design targets, which this does not enforce but the report prints, are half * of each: character 6, wearable 2, add-on 4, item 8, vehicle 12, weapon 4. */ export declare const DRAW_CALL_LIMITS: Record; export type PreflightSeverity = 'error' | 'warning'; export interface PreflightFinding { severity: PreflightSeverity; /** Stable code so a caller can filter without matching prose. */ code: string; message: string; } export interface AvatarPreflightResult { ok: boolean; findings: PreflightFinding[]; summary: GlbSummary; /** What the character declares beyond geometry, for the report. */ manifests: { dynamics: number | null; faceChannels: number | null; firstPersonHide: number | null; }; } export declare function preflightAvatar(buffer: Buffer, kind?: PreflightKind, /** A NEW character add-on's slot type: narrows the add-on ceiling to that slot's server-side tier * (`slotBudgets.ts`, generated from the backend's own table). */ characterSlotType?: string): AvatarPreflightResult; /** One line per finding, plus the capability line, for the CLI's own output. */ export declare function formatPreflight(result: AvatarPreflightResult): string;