/** * THE WEB CUSTOMIZER'S MESHLESS ADD-ON GUARD. ONE SOURCE, SHARED BYTE FOR BYTE. * * canonical helixgame.com lib/continuum/addon-definition-guard.ts * vendored helix-creator-cli src/vehicle/addonDefinitionGuard.ts * (`node scripts/sync-addon-definition-guard.mjs` copies it; `--check` fails on any drift) * * When an add-on Package seals no public web GLB, the customizer (lib/continuum/item-model.ts) treats it as * deliberately meshless ONLY if this guard passes; otherwise staging the part shows "could not be previewed" and * Save is disabled. The CLI runs the very same function in `helix vehicle addon check`, so "fits" there also * means "can be equipped and saved" here. Round 8 of the F40 gauntlet shipped four paid tune-only parts that * every pre-publish check called fit while this guard (then legacy-schema only) refused all four. * * Pure and dependency-free on purpose: no imports, so the file compiles unchanged in both repositories. Edit it * here, then re-sync the CLI copy; the vectors at the bottom run as conformance tests in both. */ /** The web runtime's GLB media type: a variant of this type is a browser mesh. */ export declare const ADDON_WEB_GLB_MEDIA_TYPE = "model/gltf-binary"; /** The pre-Package vehicle add-on root (the 993's tune-only parts): `{ schema, mesh, operations }`. */ export declare const LEGACY_VEHICLE_ADDON_SCHEMA = "helix.vehicle-addon/1"; /** The root `helix vehicle addon publish` seals: `{ schema, kind, hostKind, slotType, title, fits, ops, mesh, source }`. */ export declare const VEHICLE_ADDON_DEFINITION_SCHEMA = "helix.vehicle-addon-definition/1"; /** The manifest facts the guard reads: every variant's media type and the root object's role and media type. */ export interface MeshlessAddOnManifestFacts { variantMediaTypes: readonly string[]; root: { role: string; mediaType: string; }; } /** * The Package-level half: a meshless add-on carries no GLB variant at all (a GLB the web profile cannot use is a * visual add-on with no web rendition, not a meshless one) and its root is the JSON add-on definition. * Returns the customizer's exact error message, or null when the Package may be meshless. */ export declare function meshlessAddOnManifestError(facts: MeshlessAddOnManifestFacts): string | null; /** * The definition-level half, on the parsed root JSON. Accepts exactly two shapes: * - `helix.vehicle-addon/1` `mesh: null`, an `operations` array; * - `helix.vehicle-addon-definition/1` `mesh: null`, an `ops` array. * In both, no op may be a `mount` of anything but a sound: a mount is geometry, and there is no GLB to draw it. * Returns the customizer's exact error message, or null when the definition is a verified meshless add-on. */ export declare function meshlessAddOnDefinitionError(definition: unknown): string | null; /** * Conformance vectors. Both repositories run every vector against `meshlessAddOnDefinitionError` and require the * exact result, so a change to the guard that is not mirrored (or a vendored copy edited by hand) fails a test. */ export declare const MESHLESS_ADDON_DEFINITION_VECTORS: ReadonlyArray<{ name: string; definition: unknown; error: string | null; }>;