import { type HelixSceneV2 } from '@hypersoniclabs/helix-manifest'; import { type ProxyReduction } from './proxy'; import type { Bounds, CompiledSceneArtifact, SourceConversionReceipt, Vec3 } from './types'; /** * The World-build endpoint's multipart limits, taken from the shared contract * rather than re-typed here: a package can sit under the aggregate cap and * still be refused for a single oversized resource, so both are checked before * anything is uploaded, and a copied number would let the CLI reject packages * the server accepts (or worse, the reverse). */ export declare const SCENE_V2_PACKAGE_MAX_BYTES: number; export declare const SCENE_V2_RESOURCE_MAX_BYTES: number; /** One member of the bundle is the scene document itself; the rest are resources. */ export declare const SCENE_V2_RESOURCE_MAX_FILES: number; export declare function createSceneV2Package(input: { outputDir: string; title: string; sourceId: string; /** * Optional: a proxy is only supplied when it measurably beat the detail (see * proxy.ts). Absent, the node declares a single-level `only-available` LOD and * the collider falls back to the detail GLB rather than dangling. */ proxy?: CompiledSceneArtifact; detail: CompiledSceneArtifact; bounds: Bounds; receipt: SourceConversionReceipt; }): Promise<{ scenePath: string; receiptPath: string; resourcePaths: string[]; totalBytes: number; scene: HelixSceneV2; }>; /** * A short write is the realistic partial-failure mode and it does not throw: * `writeFile` resolving says nothing about how many bytes reached the disk. * Refuse to promote a staged member whose on-disk size disagrees with what the * receipt and Scene document already claim about it. */ export declare function assertStagedPackageMembers(stagingDir: string, members: ReadonlyArray): Promise; export declare function assertEmptySceneOutput(outputDir: string): Promise; /** * A Scene v2 package built from N individually placed asset instances instead * of one baked environment mesh. * * Every placed instance becomes its own node carrying its own detail/proxy LOD * pair and its own real transform, so the runtime streams, swaps and culls it * independently. Identical meshes compile once and share their resources by * content-hash dedup. Instances cluster into ground-plane grid cells inside * 'distance'-mode stream groups (planStreamLayout), collision rides one proxy * set per group so streamed content carries its own colliders, and the profile * memory budget covers the validator's residency union honestly. */ export type MultiAssetPlacementInput = { name: string; transform: { position: Vec3; rotation: [number, number, number, number]; scale: Vec3; }; /** World-space bounds after the transform, used for cells, LOD ranges and spawn. */ worldBounds: Bounds; /** Content-hash key into `resources` for this instance's detail GLB. */ detailResourceKey: string; /** Content-hash key into `resources` for this instance's proxy/collider GLB. */ proxyResourceKey: string; }; export type MultiAssetSpawn = { position: Vec3; groundY: number; rejectedCandidates: number; }; export declare function createSceneV2MultiAssetPackage(input: { outputDir: string; title: string; sourceId: string; receipt: SourceConversionReceipt; placements: ReadonlyArray; /** * One entry per UNIQUE mesh, keyed by content-hash resource key. `proxy` is * absent for every mesh whose proxy did not measurably beat its detail (see * proxy.ts): those meshes declare a single-level LOD and cost ONE file, not two. */ resources: ReadonlyMap; cellSizeM?: number; /** * This package is destined for `world scene-source vault-pin`, so the * multipart file-count guard is deferred to publish, where the bundle list is * real (and empty). See the guard below. */ vaultPinned?: boolean; /** * Per-mesh proxy before/after, recorded in the compile receipt. The measurement * that decided each keep/drop is evidence, not a debug print: a proxy that * silently failed to reduce is exactly the defect this ledger exists to expose. */ proxyReductions?: readonly ProxyReduction[]; /** Cross-asset probe result; falls back to the top of the placement bounds when absent. */ spawn?: MultiAssetSpawn; }): Promise<{ scenePath: string; receiptPath: string; resourcePaths: string[]; totalBytes: number; scene: HelixSceneV2; }>;