@hypersoniclabs/helix-cli 0.1.24-helix3.446 → 0.1.24-helix3.449

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/character/nativeAvatarAuthoring.d.ts +63 -0
  2. package/dist/character/nativeAvatarAuthoring.js +132 -0
  3. package/dist/character/nativeAvatarAuthoring.js.map +1 -0
  4. package/dist/continuum/nativeAvatarCompanion.d.ts +50 -0
  5. package/dist/continuum/nativeAvatarCompanion.js +178 -0
  6. package/dist/continuum/nativeAvatarCompanion.js.map +1 -0
  7. package/dist/lib.d.ts +4 -0
  8. package/dist/lib.js +18 -7
  9. package/dist/lib.js.map +1 -1
  10. package/dist/publications.js +1 -3
  11. package/dist/publications.js.map +1 -1
  12. package/dist/tsconfig.build.tsbuildinfo +1 -1
  13. package/dist/visualQa/vehicleInspection.js +5 -2
  14. package/dist/visualQa/vehicleInspection.js.map +1 -1
  15. package/package.json +3 -3
  16. package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
  17. package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
  18. package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
  19. package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
  20. package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
  21. package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
  22. package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
  23. package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
  24. package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
  25. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
  26. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
  27. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
  28. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
  29. package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
  30. package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
  31. package/vendor/native-avatar-authoring.cjs +851 -0
  32. package/vendor/native-avatar-authoring.source-pin.json +46 -0
@@ -0,0 +1,63 @@
1
+ import type { ContinuumObjectReference, ContinuumPackageVersionReference } from '@hypersoniclabs/helix-manifest';
2
+ export type NativeAvatarUse = 'body' | 'wardrobe' | 'fallback' | 'locomotion' | 'emote';
3
+ export interface NativeAvatarImageDeclaration {
4
+ imageIndex: number;
5
+ bufferView: number;
6
+ byteLength: number;
7
+ sha256: string;
8
+ width: number;
9
+ height: number;
10
+ levelCount: number;
11
+ mediaType: 'image/ktx2' | 'image/png' | 'image/webp' | 'image/jpeg';
12
+ }
13
+ export interface NativeAvatarDocumentDeclaration {
14
+ encodedByteLength: number;
15
+ sha256: string;
16
+ decoderScratchBytes: null;
17
+ sceneCount: number;
18
+ bufferByteLength: number;
19
+ images: readonly NativeAvatarImageDeclaration[];
20
+ kinds: readonly NativeAvatarUse[];
21
+ residentBytes: Readonly<Record<string, number>>;
22
+ }
23
+ export interface NativeAvatarMetadataDeclaration {
24
+ encodedByteLength: number;
25
+ sha256: string;
26
+ parseScratchBytes: number;
27
+ }
28
+ export interface NativeAvatarSealedResource {
29
+ packagePin: ContinuumPackageVersionReference;
30
+ object: ContinuumObjectReference;
31
+ /** Real, authorized transport selected by the caller; never emitted as immutable authority. */
32
+ selectedUrl: string;
33
+ encoded: Uint8Array;
34
+ }
35
+ export interface NativeAvatarSealedModel extends NativeAvatarSealedResource {
36
+ kinds: readonly NativeAvatarUse[];
37
+ }
38
+ export interface NativeAvatarAuthoringResult {
39
+ producer: {
40
+ engineCommit: string;
41
+ bundleSha256: string;
42
+ };
43
+ maxTextureSizes: readonly number[];
44
+ models: Array<{
45
+ packagePin: ContinuumPackageVersionReference;
46
+ object: ContinuumObjectReference;
47
+ descriptor: NativeAvatarDocumentDeclaration;
48
+ }>;
49
+ metadata: Array<{
50
+ packagePin: ContinuumPackageVersionReference;
51
+ object: ContinuumObjectReference;
52
+ descriptor: NativeAvatarMetadataDeclaration;
53
+ }>;
54
+ scratchContract: 'finite-admission-required';
55
+ }
56
+ /** Authoring only: enumerate every embedded image from the final encoded GLB, including all LOD scenes. */
57
+ export declare function censusNativeAvatarImages(encoded: Uint8Array): Promise<NativeAvatarImageDeclaration[]>;
58
+ /** Produces managed declarations, not an authorization receipt. Backend must verify closure/access before calling. */
59
+ export declare function produceNativeAvatarCidDescriptors(input: {
60
+ models: readonly NativeAvatarSealedModel[];
61
+ metadata: readonly NativeAvatarSealedResource[];
62
+ maxTextureSizes: readonly number[];
63
+ }): Promise<NativeAvatarAuthoringResult>;
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.censusNativeAvatarImages = censusNativeAvatarImages;
7
+ exports.produceNativeAvatarCidDescriptors = produceNativeAvatarCidDescriptors;
8
+ const node_crypto_1 = require("node:crypto");
9
+ const promises_1 = require("node:fs/promises");
10
+ const node_path_1 = require("node:path");
11
+ const sharp_1 = __importDefault(require("sharp"));
12
+ const ktx_parse_1 = require("ktx-parse");
13
+ const digest = (bytes) => (0, node_crypto_1.createHash)('sha256').update(bytes).digest('hex');
14
+ const copyBuffer = (bytes) => Uint8Array.from(bytes).buffer;
15
+ const exactInteger = (value, label) => {
16
+ if (!Number.isSafeInteger(value) || value < 1)
17
+ throw new TypeError(`Invalid ${label}`);
18
+ return value;
19
+ };
20
+ /** Authoring only: enumerate every embedded image from the final encoded GLB, including all LOD scenes. */
21
+ async function censusNativeAvatarImages(encoded) {
22
+ const view = new DataView(encoded.buffer, encoded.byteOffset, encoded.byteLength);
23
+ if (encoded.byteLength < 28 || view.getUint32(0, true) !== 0x46546c67 || view.getUint32(4, true) !== 2 ||
24
+ view.getUint32(8, true) !== encoded.byteLength || view.getUint32(16, true) !== 0x4e4f534a)
25
+ throw new TypeError('Expected exact GLB2 bytes');
26
+ const jsonLength = view.getUint32(12, true), binaryHeader = 20 + jsonLength;
27
+ if (jsonLength % 4 || binaryHeader + 8 > encoded.byteLength || view.getUint32(binaryHeader + 4, true) !== 0x004e4942 ||
28
+ binaryHeader + 8 + view.getUint32(binaryHeader, true) !== encoded.byteLength)
29
+ throw new TypeError('Invalid GLB chunk closure');
30
+ const json = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(encoded.subarray(20, binaryHeader)));
31
+ if (!Array.isArray(json.buffers) || json.buffers.length !== 1 || json.buffers[0].uri !== undefined ||
32
+ !Number.isSafeInteger(json.buffers[0].byteLength) || json.buffers[0].byteLength < 0 || json.buffers[0].byteLength > view.getUint32(binaryHeader, true)) {
33
+ throw new TypeError('Native avatar authoring requires one embedded buffer');
34
+ }
35
+ const images = json.images ?? [], views = json.bufferViews ?? [];
36
+ if (!Array.isArray(images) || !Array.isArray(views))
37
+ throw new TypeError('Invalid GLB image census');
38
+ const result = [];
39
+ for (const [imageIndex, image] of images.entries()) {
40
+ if (!image || image.uri !== undefined || !Number.isSafeInteger(image.bufferView) || image.bufferView < 0 ||
41
+ !['image/ktx2', 'image/png', 'image/webp', 'image/jpeg'].includes(image.mimeType))
42
+ throw new TypeError('Every image must be an embedded supported image');
43
+ const binding = views[image.bufferView];
44
+ if (!binding || binding.buffer !== 0)
45
+ throw new TypeError('Image bufferView must bind the embedded buffer');
46
+ const length = exactInteger(binding.byteLength, 'image byte length'), offset = binding.byteOffset ?? 0;
47
+ if (!Number.isSafeInteger(offset) || offset < 0 || offset + length > json.buffers[0].byteLength)
48
+ throw new TypeError('Image exceeds embedded buffer');
49
+ const bytes = encoded.subarray(binaryHeader + 8 + offset, binaryHeader + 8 + offset + length);
50
+ let width, height, levelCount;
51
+ if (image.mimeType === 'image/ktx2') {
52
+ const ktx = (0, ktx_parse_1.read)(bytes);
53
+ if (ktx.pixelDepth > 1 || ktx.layerCount > 1 || ktx.faceCount !== 1)
54
+ throw new TypeError('Native avatar images must be two-dimensional');
55
+ width = ktx.pixelWidth;
56
+ height = ktx.pixelHeight;
57
+ levelCount = ktx.levels.length;
58
+ }
59
+ else {
60
+ const meta = await (0, sharp_1.default)(bytes).metadata();
61
+ const expected = { 'image/png': 'png', 'image/jpeg': 'jpeg', 'image/webp': 'webp' }[image.mimeType];
62
+ if (meta.format !== expected || (meta.pages ?? 1) !== 1)
63
+ throw new TypeError('Image MIME or frame count differs from sealed bytes');
64
+ width = exactInteger(meta.width, 'image width');
65
+ height = exactInteger(meta.height, 'image height');
66
+ levelCount = 1;
67
+ }
68
+ result.push({ imageIndex, bufferView: image.bufferView, byteLength: length, sha256: digest(bytes),
69
+ width: exactInteger(width, 'image width'), height: exactInteger(height, 'image height'),
70
+ levelCount: exactInteger(levelCount, 'image levels'), mediaType: image.mimeType });
71
+ }
72
+ return result;
73
+ }
74
+ function sealed(resource) {
75
+ const { object, packagePin } = resource;
76
+ if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(packagePin.packageId) ||
77
+ typeof packagePin.version !== 'string' || !packagePin.version.length || packagePin.version.length > 64 || !/^cid:sha256:[a-f0-9]{64}$/.test(packagePin.manifestCid) ||
78
+ object.cid !== `cid:sha256:${digest(resource.encoded)}` || object.bytes !== resource.encoded.byteLength || !object.role) {
79
+ throw new TypeError('Native avatar resource differs from its immutable object or Package pin');
80
+ }
81
+ }
82
+ /** Produces managed declarations, not an authorization receipt. Backend must verify closure/access before calling. */
83
+ async function produceNativeAvatarCidDescriptors(input) {
84
+ const root = (0, node_path_1.join)(__dirname, '..', '..', 'vendor');
85
+ const [bundle, pinBytes] = await Promise.all([(0, promises_1.readFile)((0, node_path_1.join)(root, 'native-avatar-authoring.cjs')), (0, promises_1.readFile)((0, node_path_1.join)(root, 'native-avatar-authoring.source-pin.json'))]);
86
+ const pin = JSON.parse(pinBytes.toString('utf8'));
87
+ if (digest(bundle) !== pin.bundleSha256 || !/^[a-f0-9]{40}$/.test(pin.engineCommit))
88
+ throw new Error('Native avatar authoring bundle does not match its engine source pin');
89
+ for (const resource of [...input.models, ...input.metadata])
90
+ sealed(resource);
91
+ if (input.models.some(model => model.object.mediaType !== 'model/gltf-binary') || input.metadata.some(row => row.object.mediaType !== 'application/json' && !row.object.mediaType.endsWith('+json;version=1'))) {
92
+ throw new TypeError('Native avatar selected object MIME does not match its resource kind');
93
+ }
94
+ const urlIdentities = new Map();
95
+ for (const resource of [...input.models, ...input.metadata]) {
96
+ const url = new URL(resource.selectedUrl);
97
+ if (!['http:', 'https:'].includes(url.protocol) || url.username || url.password || url.hash || url.href !== resource.selectedUrl)
98
+ throw new TypeError('Expected a real canonical authorized transport URL');
99
+ const old = urlIdentities.get(resource.selectedUrl);
100
+ if (old && old !== resource.object.cid)
101
+ throw new TypeError('Selected transport URL names conflicting immutable resource bytes');
102
+ urlIdentities.set(resource.selectedUrl, resource.object.cid);
103
+ }
104
+ const modelByCid = new Map();
105
+ for (const model of input.models) {
106
+ const old = modelByCid.get(model.object.cid);
107
+ modelByCid.set(model.object.cid, { ...(old ?? model), kinds: [...new Set([...(old?.kinds ?? []), ...model.kinds])].sort() });
108
+ }
109
+ const metadataByCid = new Map();
110
+ for (const row of input.metadata) {
111
+ if (modelByCid.has(row.object.cid))
112
+ throw new TypeError('One immutable resource cannot be both model and metadata');
113
+ if (!metadataByCid.has(row.object.cid))
114
+ metadataByCid.set(row.object.cid, row);
115
+ }
116
+ // The engine authoring adapter is URL-keyed. Feed each immutable byte identity once with
117
+ // compatible use kinds combined, using one of its actual authorized transports. Emit every
118
+ // original Package binding below; changing URL transport choices cannot change declarations.
119
+ const models = await Promise.all([...modelByCid.values()].map(async (model) => ({ url: model.selectedUrl, encoded: copyBuffer(model.encoded),
120
+ sha256: model.object.cid.slice('cid:sha256:'.length), encodedByteLength: model.object.bytes,
121
+ images: await censusNativeAvatarImages(model.encoded), kinds: [...model.kinds] })));
122
+ const metadata = [...metadataByCid.values()].map(row => ({ url: row.selectedUrl, encoded: copyBuffer(row.encoded),
123
+ sha256: row.object.cid.slice('cid:sha256:'.length), encodedByteLength: row.object.bytes }));
124
+ // Generated CommonJS uses this package's normal module lifetime; no foreign ESM VM callback.
125
+ const { produceNativeAvatarDescriptors } = require((0, node_path_1.join)(root, 'native-avatar-authoring.cjs'));
126
+ const packet = await produceNativeAvatarDescriptors({ models, metadata, maxTextureSizes: [...input.maxTextureSizes] });
127
+ return { producer: { engineCommit: pin.engineCommit, bundleSha256: pin.bundleSha256 }, maxTextureSizes: [...input.maxTextureSizes],
128
+ models: input.models.map(row => ({ packagePin: structuredClone(row.packagePin), object: structuredClone(row.object), descriptor: packet.descriptors.get(modelByCid.get(row.object.cid).selectedUrl) })),
129
+ metadata: input.metadata.map(row => ({ packagePin: structuredClone(row.packagePin), object: structuredClone(row.object), descriptor: packet.jsonDescriptors.get(metadataByCid.get(row.object.cid).selectedUrl) })),
130
+ scratchContract: 'finite-admission-required' };
131
+ }
132
+ //# sourceMappingURL=nativeAvatarAuthoring.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeAvatarAuthoring.js","sourceRoot":"","sources":["../../src/character/nativeAvatarAuthoring.ts"],"names":[],"mappings":";;;;;AA4CA,4DAuCC;AAYD,8EA4CC;AA3ID,6CAAyC;AACzC,+CAA4C;AAC5C,yCAAiC;AACjC,kDAA0B;AAC1B,yCAA4C;AAgC5C,MAAM,MAAM,GAAG,CAAC,KAAiB,EAAE,EAAE,CAAC,IAAA,wBAAU,EAAC,Q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AAE,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC;QAChI,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACxM,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACnN,eAAe,EAAE,2BAA2B,EAAE,CAAC;AACnD,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { type ContinuumObjectReference, type ContinuumPackageVersion, type ContinuumPackageVersionReference } from '@hypersoniclabs/helix-manifest';
2
+ import { type NativeAvatarAuthoringResult, type NativeAvatarSealedResource, type NativeAvatarUse } from '../character/nativeAvatarAuthoring';
3
+ import type { ContinuumPublicationIntent } from './types';
4
+ export declare const NATIVE_AVATAR_SELECTION_SCHEMA: "helix.native-avatar-selection/1";
5
+ export declare const NATIVE_AVATAR_SELECTION_MEDIA_TYPE = "application/vnd.helix.native-avatar-selection+json;version=1";
6
+ export declare const NATIVE_AVATAR_SELECTION_ROLE = "native-avatar-selection";
7
+ export interface NativeAvatarSelectedObject {
8
+ packagePin: ContinuumPackageVersionReference;
9
+ object: ContinuumObjectReference;
10
+ }
11
+ export interface NativeAvatarSelection {
12
+ schema: typeof NATIVE_AVATAR_SELECTION_SCHEMA;
13
+ maxTextureSizes: readonly number[];
14
+ models: Array<NativeAvatarSelectedObject & {
15
+ kinds: readonly NativeAvatarUse[];
16
+ }>;
17
+ metadata: NativeAvatarSelectedObject[];
18
+ }
19
+ export interface NativeAvatarCompanion extends NativeAvatarAuthoringResult {
20
+ schema: 'helix.native-avatar-cid-descriptors/1';
21
+ selectionPackagePin: ContinuumPackageVersionReference;
22
+ selectionObject: ContinuumObjectReference;
23
+ sourceClosure: ContinuumPackageVersionReference[];
24
+ accounting: 'production-managed-resources; ancillary consumers reserve separately; opaque driver/process allocation unmeasured';
25
+ }
26
+ /** Strict CID-first wire contract. Local filenames and transport credentials never enter this document. */
27
+ export declare function normalizeNativeAvatarSelection(value: unknown): NativeAvatarSelection;
28
+ /** Author a new ordinary selection Package. Existing sealed source manifests/pins remain unchanged. */
29
+ export declare function createNativeAvatarSelectionPackage(input: {
30
+ selection: NativeAvatarSelection;
31
+ packages: readonly ContinuumPackageVersion[];
32
+ visibility?: 'private' | 'public';
33
+ }): ContinuumPublicationIntent;
34
+ /** Add the exact ledger dependency to a NEW Build version, not a sealed old version or its source Item pins. */
35
+ export declare function attachNativeAvatarSelectionToBuild(input: {
36
+ build: ContinuumPackageVersion;
37
+ packageId: string;
38
+ version: string;
39
+ selectionPackage: ContinuumPackageVersion;
40
+ packages: readonly ContinuumPackageVersion[];
41
+ }): ContinuumPackageVersion;
42
+ /** Pure compiler adaptor. The backend independently authorizes and re-reads every sealed source object. */
43
+ export declare function compileNativeAvatarCompanion(input: {
44
+ selectionBytes: Uint8Array;
45
+ selectionObject: ContinuumObjectReference;
46
+ selectionPackagePin: ContinuumPackageVersionReference;
47
+ sourceClosure: readonly ContinuumPackageVersionReference[];
48
+ packages: readonly ContinuumPackageVersion[];
49
+ resources: readonly NativeAvatarSealedResource[];
50
+ }): Promise<NativeAvatarCompanion>;
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NATIVE_AVATAR_SELECTION_ROLE = exports.NATIVE_AVATAR_SELECTION_MEDIA_TYPE = exports.NATIVE_AVATAR_SELECTION_SCHEMA = void 0;
4
+ exports.normalizeNativeAvatarSelection = normalizeNativeAvatarSelection;
5
+ exports.createNativeAvatarSelectionPackage = createNativeAvatarSelectionPackage;
6
+ exports.attachNativeAvatarSelectionToBuild = attachNativeAvatarSelectionToBuild;
7
+ exports.compileNativeAvatarCompanion = compileNativeAvatarCompanion;
8
+ const node_crypto_1 = require("node:crypto");
9
+ const helix_manifest_1 = require("@hypersoniclabs/helix-manifest");
10
+ const nativeAvatarAuthoring_1 = require("../character/nativeAvatarAuthoring");
11
+ const identity_1 = require("./identity");
12
+ const workflow_1 = require("./workflow");
13
+ exports.NATIVE_AVATAR_SELECTION_SCHEMA = 'helix.native-avatar-selection/1';
14
+ exports.NATIVE_AVATAR_SELECTION_MEDIA_TYPE = 'application/vnd.helix.native-avatar-selection+json;version=1';
15
+ exports.NATIVE_AVATAR_SELECTION_ROLE = 'native-avatar-selection';
16
+ const pinKey = (pin) => `${pin.packageId}@${pin.version}:${pin.manifestCid}`;
17
+ const rowKey = (row) => `${pinKey(row.packagePin)}:${row.object.cid}`;
18
+ const same = (a, b) => Buffer.from((0, helix_manifest_1.canonicalJsonBytes)(a)).equals(Buffer.from((0, helix_manifest_1.canonicalJsonBytes)(b)));
19
+ const reference = (pkg) => ({ packageId: pkg.package.id, version: pkg.version, manifestCid: (0, helix_manifest_1.continuumPackageVersionCid)(pkg) });
20
+ function exactKeys(value, keys) {
21
+ if (!value || typeof value !== 'object' || Array.isArray(value) || Object.keys(value).length !== keys.length || keys.some(key => !Object.hasOwn(value, key))) {
22
+ throw new TypeError('Native avatar selection has undeclared or missing fields');
23
+ }
24
+ }
25
+ /** Strict CID-first wire contract. Local filenames and transport credentials never enter this document. */
26
+ function normalizeNativeAvatarSelection(value) {
27
+ const input = JSON.parse(Buffer.from((0, helix_manifest_1.canonicalJsonBytes)(value)).toString('utf8'));
28
+ exactKeys(input, ['schema', 'maxTextureSizes', 'models', 'metadata']);
29
+ if (input.schema !== exports.NATIVE_AVATAR_SELECTION_SCHEMA || !Array.isArray(input.models) || !Array.isArray(input.metadata) ||
30
+ !Array.isArray(input.maxTextureSizes) || !input.maxTextureSizes.length || input.maxTextureSizes.some((size) => !Number.isSafeInteger(size) || size < 1)) {
31
+ throw new TypeError('Invalid native avatar selection schema or renderer limits');
32
+ }
33
+ if (!input.models.length && !input.metadata.length)
34
+ throw new TypeError('Native avatar selection is empty');
35
+ const seen = new Set();
36
+ for (const [rows, isModel] of [[input.models, true], [input.metadata, false]])
37
+ for (const row of rows) {
38
+ exactKeys(row, isModel ? ['packagePin', 'object', 'kinds'] : ['packagePin', 'object']);
39
+ exactKeys(row.packagePin, ['packageId', 'version', 'manifestCid']);
40
+ exactKeys(row.object, ['cid', 'bytes', 'mediaType', 'role']);
41
+ if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(row.packagePin.packageId) ||
42
+ typeof row.packagePin.version !== 'string' || !row.packagePin.version.length || row.packagePin.version.length > 64 || !/^cid:sha256:[a-f0-9]{64}$/.test(row.packagePin.manifestCid) ||
43
+ !/^cid:sha256:[a-f0-9]{64}$/.test(row.object.cid) || !Number.isSafeInteger(row.object.bytes) || row.object.bytes < 1 ||
44
+ typeof row.object.mediaType !== 'string' || typeof row.object.role !== 'string' || !row.object.role)
45
+ throw new TypeError('Native avatar selection needs exact object and Package references');
46
+ if (isModel && (!Array.isArray(row.kinds) || !row.kinds.length || row.kinds.some((kind) => !['body', 'wardrobe', 'fallback', 'locomotion', 'emote'].includes(kind))))
47
+ throw new TypeError('Invalid native avatar model use kinds');
48
+ if (isModel)
49
+ row.kinds = [...new Set(row.kinds)].sort();
50
+ const key = rowKey(row);
51
+ if (seen.has(key))
52
+ throw new TypeError('Duplicate native avatar selected resource');
53
+ seen.add(key);
54
+ }
55
+ return { schema: exports.NATIVE_AVATAR_SELECTION_SCHEMA, maxTextureSizes: [...new Set(input.maxTextureSizes)].sort((a, b) => a - b),
56
+ models: input.models.sort((a, b) => rowKey(a).localeCompare(rowKey(b))),
57
+ metadata: input.metadata.sort((a, b) => rowKey(a).localeCompare(rowKey(b))) };
58
+ }
59
+ function exactPackages(packages) {
60
+ const graph = (0, helix_manifest_1.validateContinuumGraph)({ packages, listings: [], worldReleases: [] });
61
+ if (!graph.valid)
62
+ throw new TypeError(graph.errors.join('; '));
63
+ return new Map(graph.graph.packages.map(pkg => [pinKey(reference(pkg)), pkg]));
64
+ }
65
+ function requireSelectedObjects(selection, packages) {
66
+ for (const row of [...selection.models, ...selection.metadata]) {
67
+ const pkg = packages.get(pinKey(row.packagePin));
68
+ if (!pkg)
69
+ throw new TypeError('Native avatar selected Package pin is absent or changed');
70
+ const declared = [pkg.root, ...pkg.variants.map(variant => variant.object)];
71
+ if (!declared.some(object => same(object, row.object)))
72
+ throw new TypeError('Native avatar selected object is not declared by its named Package root or variant');
73
+ }
74
+ }
75
+ function ownedReferences(pkg) {
76
+ if (pkg.unrealWorld)
77
+ throw new TypeError('Native avatar selection cannot substitute for cooked World role closure');
78
+ return [pkg.root, ...pkg.variants.map(variant => variant.object), ...(pkg.source ? [pkg.source] : []),
79
+ ...(pkg.material ? (0, helix_manifest_1.continuumMaterialObjectReferences)(pkg.material) : []), ...(pkg.scene ? [pkg.scene.document, ...pkg.scene.objects] : []),
80
+ ...(pkg.runtimeModule ? [pkg.runtimeModule.publisherAttestation, pkg.runtimeModule.sourceAttestation] : [])];
81
+ }
82
+ function objectTotal(packages, extra = []) {
83
+ const byCid = new Map();
84
+ for (const object of [...packages.flatMap(ownedReferences), ...extra]) {
85
+ const old = byCid.get(object.cid);
86
+ if (old && (old.bytes !== object.bytes || old.mediaType !== object.mediaType))
87
+ throw new TypeError('Conflicting native avatar closure object identity');
88
+ byCid.set(object.cid, object);
89
+ }
90
+ return { objectCount: byCid.size, totalBytes: [...byCid.values()].reduce((sum, object) => sum + object.bytes, 0) };
91
+ }
92
+ function dependencyClosure(pins, all) {
93
+ const closure = new Map();
94
+ const visit = (pin) => {
95
+ if (closure.has(pinKey(pin)))
96
+ return;
97
+ const pkg = all.get(pinKey(pin));
98
+ if (!pkg)
99
+ throw new TypeError('Native avatar selected dependency is absent');
100
+ closure.set(pinKey(pin), pkg);
101
+ pkg.dependencies.forEach(dependency => visit(dependency.package));
102
+ };
103
+ pins.forEach(visit);
104
+ return [...closure.values()];
105
+ }
106
+ /** Author a new ordinary selection Package. Existing sealed source manifests/pins remain unchanged. */
107
+ function createNativeAvatarSelectionPackage(input) {
108
+ const selection = normalizeNativeAvatarSelection(input.selection), all = exactPackages(input.packages);
109
+ requireSelectedObjects(selection, all);
110
+ const selectedPins = new Map([...selection.models, ...selection.metadata].map(row => [pinKey(row.packagePin), row.packagePin]));
111
+ const closure = dependencyClosure([...selectedPins.values()], all);
112
+ const bytes = (0, helix_manifest_1.canonicalJsonBytes)(selection), cid = (0, helix_manifest_1.cidFromBytes)(bytes);
113
+ const object = { cid, bytes: bytes.byteLength, mediaType: exports.NATIVE_AVATAR_SELECTION_MEDIA_TYPE, role: exports.NATIVE_AVATAR_SELECTION_ROLE };
114
+ const packageId = (0, identity_1.deterministicContinuumUuid)(`${exports.NATIVE_AVATAR_SELECTION_SCHEMA}\0${cid}`);
115
+ const packageVersion = { schema: 'helix.continuum.package-version/1', package: { id: packageId, type: 'asset' }, version: '1.0.0',
116
+ root: object, variants: [], dependencies: [...selectedPins.values()].sort((a, b) => pinKey(a).localeCompare(pinKey(b))).map((pin, index) => ({ slot: `selected-${index}`, package: structuredClone(pin), required: true })),
117
+ compatibility: { contract: exports.NATIVE_AVATAR_SELECTION_SCHEMA, requires: [], provides: [exports.NATIVE_AVATAR_SELECTION_SCHEMA] },
118
+ provenance: { kind: 'authored', source: 'native-avatar-selection' }, expectedClosure: objectTotal(closure, [object]) };
119
+ const result = { projectId: `native-avatar-selection:${packageId}`, sourceDigest: (0, node_crypto_1.createHash)('sha256').update(bytes).digest('hex'),
120
+ package: { schema: 'helix.continuum.package/1', id: packageId, type: 'asset', name: 'Native Avatar Selection' },
121
+ packagePublication: { visibility: input.visibility ?? 'private' }, packageVersion,
122
+ objects: [{ reference: object, source: { kind: 'inline', bytes, filename: 'native-avatar-selection.json', audience: input.visibility ?? 'private' } }], listings: [] };
123
+ (0, workflow_1.preflightContinuumPublicationIntent)(result);
124
+ const graph = (0, helix_manifest_1.validateContinuumGraph)({ packages: [...closure, packageVersion], listings: [], worldReleases: [] });
125
+ if (!graph.valid)
126
+ throw new TypeError(graph.errors.join('; '));
127
+ return result;
128
+ }
129
+ /** Add the exact ledger dependency to a NEW Build version, not a sealed old version or its source Item pins. */
130
+ function attachNativeAvatarSelectionToBuild(input) {
131
+ if (!input.build.build || input.build.package.type !== 'build' || (input.packageId === input.build.package.id && input.version === input.build.version))
132
+ throw new TypeError('Native avatar selection requires a new character Build Package Version');
133
+ if (input.build.build.kind !== 'character' || input.selectionPackage.root.role !== exports.NATIVE_AVATAR_SELECTION_ROLE || input.selectionPackage.root.mediaType !== exports.NATIVE_AVATAR_SELECTION_MEDIA_TYPE)
134
+ throw new TypeError('Expected a character Build and normal selection Package');
135
+ if (input.build.dependencies.some(dependency => dependency.slot === exports.NATIVE_AVATAR_SELECTION_ROLE))
136
+ throw new TypeError('Build already declares a native avatar selection');
137
+ const next = { ...structuredClone(input.build), package: { id: input.packageId, type: 'build' }, version: input.version,
138
+ dependencies: [...structuredClone(input.build.dependencies), { slot: exports.NATIVE_AVATAR_SELECTION_ROLE, package: reference(input.selectionPackage), required: true }] };
139
+ const all = exactPackages([...input.packages.filter(pkg => pinKey(reference(pkg)) !== pinKey(reference(input.selectionPackage))), input.selectionPackage]);
140
+ const sources = dependencyClosure(next.dependencies.map(dependency => dependency.package), all);
141
+ next.expectedClosure = objectTotal(sources, ownedReferences(next));
142
+ const graph = (0, helix_manifest_1.validateContinuumGraph)({ packages: [...sources, next], listings: [], worldReleases: [] });
143
+ if (!graph.valid)
144
+ throw new TypeError(graph.errors.join('; '));
145
+ return next;
146
+ }
147
+ /** Pure compiler adaptor. The backend independently authorizes and re-reads every sealed source object. */
148
+ async function compileNativeAvatarCompanion(input) {
149
+ if ((0, helix_manifest_1.cidFromBytes)(input.selectionBytes) !== input.selectionObject.cid || input.selectionBytes.byteLength !== input.selectionObject.bytes ||
150
+ input.selectionObject.role !== exports.NATIVE_AVATAR_SELECTION_ROLE || input.selectionObject.mediaType !== exports.NATIVE_AVATAR_SELECTION_MEDIA_TYPE)
151
+ throw new TypeError('Native avatar selection object identity changed');
152
+ const selection = normalizeNativeAvatarSelection(JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(input.selectionBytes)));
153
+ const packages = exactPackages(input.packages);
154
+ const sourceClosure = [...input.sourceClosure].map(pin => structuredClone(pin)).sort((a, b) => pinKey(a).localeCompare(pinKey(b)));
155
+ if (sourceClosure.length !== packages.size || new Set(sourceClosure.map(pinKey)).size !== packages.size || sourceClosure.some(pin => !packages.has(pinKey(pin))))
156
+ throw new TypeError('Native avatar compiler source closure differs from exact manifests');
157
+ const selectionPackage = packages.get(pinKey(input.selectionPackagePin));
158
+ if (!selectionPackage || selectionPackage.package.type !== 'asset' || !same(selectionPackage.root, input.selectionObject))
159
+ throw new TypeError('Selection object is not the declared exact selection Package root');
160
+ requireSelectedObjects(selection, packages);
161
+ for (const row of [...selection.models, ...selection.metadata]) {
162
+ if (!selectionPackage.dependencies.some(dependency => dependency.required && same(dependency.package, row.packagePin))) {
163
+ throw new TypeError('Selection Package must bind every selected Package as a required immutable dependency');
164
+ }
165
+ }
166
+ const selected = [...selection.models, ...selection.metadata], resources = new Map(input.resources.map(row => [rowKey(row), row]));
167
+ if (resources.size !== input.resources.length || resources.size !== selected.length || selected.some(row => !resources.has(rowKey(row))))
168
+ throw new TypeError('Native avatar verified resource coverage differs from selection');
169
+ for (const row of selected)
170
+ if (!same(resources.get(rowKey(row)).object, row.object))
171
+ throw new TypeError('Native avatar verified resource declaration differs');
172
+ const result = await (0, nativeAvatarAuthoring_1.produceNativeAvatarCidDescriptors)({ maxTextureSizes: selection.maxTextureSizes,
173
+ models: selection.models.map(row => ({ ...resources.get(rowKey(row)), kinds: row.kinds })), metadata: selection.metadata.map(row => resources.get(rowKey(row))) });
174
+ return { schema: 'helix.native-avatar-cid-descriptors/1', selectionObject: structuredClone(input.selectionObject),
175
+ selectionPackagePin: structuredClone(input.selectionPackagePin), sourceClosure, ...result,
176
+ accounting: 'production-managed-resources; ancillary consumers reserve separately; opaque driver/process allocation unmeasured' };
177
+ }
178
+ //# sourceMappingURL=nativeAvatarCompanion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeAvatarCompanion.js","sourceRoot":"","sources":["../../src/continuum/nativeAvatarCompanion.ts"],"names":[],"mappings":";;;AAqCA,wEAwBC;AA0CD,gFAoBC;AAGD,gFAYC;AAGD,oEAyBC;AAtKD,6CAAyC;AACzC,mEAE6I;AAC7I,8EAAgL;AAChL,yCAAwD;AACxD,yCAAiE;AAGpD,QAAA,8BAA8B,GAAG,iCAA0C,CAAC;AAC5E,QAAA,kCAAkC,GAAG,8DAA8D,CAAC;AACpG,QAAA,4BAA4B,GAAG,yBAAyB,CAAC;AAetE,MAAM,MAAM,GAAG,CAAC,GAAqC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;AAC/G,MAAM,MAAM,GAAG,CAAC,GAA+B,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAClG,MAAM,IAAI,GAAG,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE,CAAC,MAAM,C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AE,GAAG,MAAM;QACzF,UAAU,EAAE,mHAAmH,EAAE,CAAC;AACtI,CAAC"}
package/dist/lib.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { capturePublishThumbnail } from './screenshot/publishThumbnail';
2
2
  export { WORLD_THUMBNAIL_PUBLICATION_VERSION } from './screenshot/publishThumbnail';
3
+ export { censusNativeAvatarImages, produceNativeAvatarCidDescriptors } from './character/nativeAvatarAuthoring';
4
+ export type { NativeAvatarUse, NativeAvatarImageDeclaration, NativeAvatarDocumentDeclaration, NativeAvatarMetadataDeclaration, NativeAvatarSealedResource, NativeAvatarSealedModel, NativeAvatarAuthoringResult } from './character/nativeAvatarAuthoring';
5
+ export { NATIVE_AVATAR_SELECTION_SCHEMA, NATIVE_AVATAR_SELECTION_MEDIA_TYPE, NATIVE_AVATAR_SELECTION_ROLE, normalizeNativeAvatarSelection, createNativeAvatarSelectionPackage, attachNativeAvatarSelectionToBuild, compileNativeAvatarCompanion } from './continuum/nativeAvatarCompanion';
6
+ export type { NativeAvatarSelectedObject, NativeAvatarSelection, NativeAvatarCompanion } from './continuum/nativeAvatarCompanion';
3
7
  import { HelixApi, uploadToTicket } from './api';
4
8
  export { createPlacementRequest, validatePlacementRequest, placementRequestBundleFile, writePlacementRequest, PLACEMENT_REQUEST_FILENAME } from './placementRequest';
5
9
  import { loadVendoredValidator } from './ability';
package/dist/lib.js CHANGED
@@ -38,13 +38,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
38
38
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
39
39
  };
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.compileSceneElements = exports.cs2 = exports.terrain = exports.labelModuleValidationErrors = exports.updateInteractable = exports.subtractInteractableContribution = exports.parseInteractablePosition = exports.namespaceInteractableFragment = exports.moduleInteractableFragment = exports.instanceOrdinalOf = exports.interactableModuleId = exports.composeInteractableManifest = exports.composeInteractableModuleManifest = exports.addInteractable = exports.frozenBuildArtifactKey = exports.freezeBuildDraft = exports.createPrivateBuildDraft = exports.PRIVATE_BUILD_DRAFT_SCHEMA = exports.checkPackageBundle = exports.MULTIPLAYER_CONFIG_FILENAME = exports.multiplayerConfigBundleFile = exports.PLATFORM_THREE_VERSION = exports.tiledTerrainBakedLightingWarning = exports.checkBundle = exports.validateDeviceProject = exports.testDeviceProject = exports.readDeviceGlbNodeNames = exports.createDeviceProject = exports.DEVICE_FILENAME = exports.placementsContinuum = exports.placementsBundle = exports.inspectPlacementsBake = exports.readPlacementsBake = exports.attachTreeImpostors = exports.bakeTreeImpostors = exports.bakePlacements = exports.publicRequester = exports.formatPublishedVerdict = exports.formatHostAddOns = exports.checkPublishedAddOn = exports.checkHostAddOns = exports.uploadToTicket = exports.HelixApi = exports.ApiError = exports.PLACEMENT_REQUEST_FILENAME = exports.writePlacementRequest = exports.placementRequestBundleFile = exports.validatePlacementRequest = exports.createPlacementRequest = exports.WORLD_THUMBNAIL_PUBLICATION_VERSION = void 0;
42
- exports.buildItemDistribution = exports.ITEM_EDITION_MODES = exports.ITEM_DISTRIBUTION_CHANNELS = exports.DISTRIBUTION_KEY_PATTERN = exports.renderCcSlotTable = exports.renderCcGenderList = exports.parseTags = exports.parseGenders = exports.parseJsonOrFile = exports.parseJsonObjectOrFile = exports.parseJsonArrayOrFile = exports.normalizeItemKind = exports.meshContentTypeFromExtension = exports.CLIP_SET_SLOT_TYPES = exports.isCcWearableSlot = exports.isCcGender = exports.ccSlotIsRequiredForKind = exports.ccSlotIsAllowedForKind = exports.ccGendersAreRequiredForKind = exports.ccGendersAreAllowedForKind = exports.CC_WEARABLE_SLOT_GROUPS = exports.CC_WEARABLE_SLOTS = exports.CC_GENDERS = exports.assertLooksLikeGlb = exports.assertCcSlot = exports.assertCcGenders = exports.SOURCE_MAX_BYTES = exports.SOURCE_HARD_EXCLUDES = exports.SOURCE_CONTENT_TYPE = exports.SOURCE_ARCHIVE_FILENAME = exports.parseGitignore = exports.isSourceExcluded = exports.formatArchiveSize = exports.createSourceArchive = exports.collectSourceFiles = exports.formatScenePerformanceReport = exports.analyzeScenePerformance = exports.importSourceSceneMap = exports.SOURCE_SCENE_IMPORT_BUDGETS = exports.NATIVE_SCENE_CONVERSION_CONFIDENCE = exports.matchCanonicalMaterial = exports.createSharedMaterialBinding = exports.buildMaterialPackageRecipe = exports.buildMaterialBulkRecipe = exports.MATERIAL_REVIEW_CONFIDENCE = exports.MATERIAL_AUTO_REPLACE_CONFIDENCE = exports.HELIX_OFFICIAL_MATERIAL_SUBSET = exports.compileContinuumScenePackage = exports.CONTINUUM_SCENE_DOCUMENT_MEDIA_TYPE = exports.compileSceneElementsBundle = void 0;
43
- exports.assessThreeCurrency = exports.assessPlatformDelivery = exports.assessInteractables = exports.enginePinOverrideLogPath = exports.detectExactEnginePins = exports.ALLOW_EXACT_ENGINE_PIN_FLAG = exports.WORLD_MANIFEST_LOCATIONS = exports.MODULES_DIR = exports.LOCKFILE = exports.INSTALLED_INDEX = exports.installWorld = exports.resolvePins = exports.validateAssetPackConstraints = exports.normalizePinRange = exports.loadInstalledIndexValidator = exports.loadVendoredValidator = exports.installLocalAbility = exports.checkAbilityBundle = exports.productTypeGrantsItem = exports.isProductKey = exports.buildProductUpdate = exports.buildProductRegistration = exports.WORLD_PRODUCT_TYPES = exports.PRODUCT_TITLE_MAX = exports.PRODUCT_KEY_PATTERN = exports.PRODUCT_KEY_MAX = exports.PRODUCT_DESCRIPTION_MAX = exports.MAX_PASS_DURATION_SECONDS = exports.MAX_GRANT_ITEM_QUANTITY = exports.MAX_GRANT_EFFECTS = exports.MAX_GRANT_CURRENCY_AMOUNT = exports.GRANT_CODE_PATTERN = exports.GRANT_CODE_MAX = exports.resolveUnlockMode = exports.isAchievementKey = exports.iconContentTypeFromExtension = exports.formatAchievementCriteria = exports.buildAchievementUpdate = exports.buildAchievementRegistration = exports.buildAchievementCriteria = exports.DATA_STORE_CRITERIA_KEY_TEMPLATES = exports.ACHIEVEMENT_UNLOCK_MODES = exports.ACHIEVEMENT_TROPHY_MAX_BYTES = exports.ACHIEVEMENT_KEY_PATTERN = exports.ACHIEVEMENT_ICON_MAX_BYTES = exports.ACHIEVEMENT_CRITERIA_SIGNALS = exports.ACHIEVEMENT_CRITERIA_OPS = exports.ACHIEVEMENT_CRITERIA_METRICS = exports.editionFields = exports.buildItemDistributionUpdate = void 0;
44
- exports.getVaultAsset = exports.getStandaloneAssetGenerationJob = exports.getDreamerAssetGenerationJob = exports.generateStandaloneAsset = exports.generateImage = exports.generateAudio = exports.generateAndPublishAssetFromReference = exports.generateAndPublishAsset = exports.formatStrandedJob = exports.extensionFor = exports.describeGateAdvance = exports.approveDreamerGate = exports.DEFAULT_MOUNT_PREFIX = exports.formatSubPathResult = exports.verifySubPath = exports.roundLix = exports.receiptLix = exports.formatWaitState = exports.formatReceipt = exports.formatLix = exports.formatQuote = exports.formatBalance = exports.normalizeQuote = exports.quoteGeneration = exports.formatJobs = exports.listJobs = exports.getLixBalance = exports.TICK_NODE_CEILING = exports.renderRealizabilityRefusal = exports.registryRealizabilityDeps = exports.checkRealizability = exports.initAbilityTemplate = exports.slugify = exports.initTemplate = exports.defaultClientTokenName = exports.browserLogin = exports.jwtExpiresAtIso = exports.clearCredentials = exports.saveCredentials = exports.loadCredentials = exports.HELIX_SCOPE = exports.HELIX_ENV = exports.DEFAULT_WEB_URL = exports.DEFAULT_API_URL = exports.credsEnvMismatchWarning = exports.apiUrlMatchesEnv = exports.ADVISORY_SYSTEMS = exports.assessWorldCurrency = exports.assessWeaponPins = exports.assessVaultAssets = void 0;
45
- exports.formatWorldInspection = exports.sortFindings = exports.analyzeWorld = exports.validateUnrealProject = exports.packageUnrealProject = exports.initUnrealManifest = exports.HELIX_UNREAL_ENGINE_VERSION = exports.HELIX_UNREAL_CONTRACT_VERSION = exports.formatUnrealValidationReport = exports.uploadArtifact = exports.resolveWorldId = exports.renderPublishFailure = exports.publishUnrealBuild = exports.assertReceipt = exports.assertCreateResponseMatchesPlan = exports.assertClientDeliveryMatchesPlan = exports.verifyUnrealCandidate = exports.UnrealCandidateError = exports.planSharedRuntimePublish = exports.defaultIdempotencyKey = exports.candidateArtifactDigest = exports.auditCookScope = exports.clearMaterialPinCache = exports.platformMaterialTag = exports.parseVaultMaterialSearch = exports.parseContinuumCurrentVersion = exports.materialContinuumIdentity = exports.matchMaterialResolution = exports.materialResolutionOptions = exports.materialDefaultResolutionKey = exports.DEFAULT_RESOLUTION_KEY = exports.VAULT_ASSET_KINDS = exports.UnavailableCapabilityError = exports.updateVaultAssetMetadata = exports.startStandaloneAssetGeneration = exports.startDreamerAssetGenerationFromReference = exports.startDreamerAssetGeneration = exports.searchVaultAssets = exports.StrandedJobError = exports.saveGeneratedAsset = exports.reviseDreamerGate = exports.retryDreamerJob = exports.resumeAndPublishAsset = exports.resolveMaterial = exports.MATERIAL_RENDITION_SELECTIONS = exports.listMaterials = exports.listDreamerVoices = exports.installVaultAsset = exports.getVaultAssetVersions = exports.getVaultAssetUsage = void 0;
46
- exports.bakeSharedHlodAtlas = exports.planSharedHlodAtlas = exports.approximateHlodGeometry = exports.bakeHlodSurface = exports.HLOD_BAKER_VERSION = exports.DEFAULT_HLOD_LAYER = exports.planSceneHlod = exports.tagSceneHlod = exports.inspectSceneHlod = exports.bakeSceneHlod = exports.attachFoliageLods = exports.bakeFoliageLods = exports.MAX_ITEM_THUMBNAIL_BYTES = exports.renderItemThumbnailResult = exports.describeThumbnailError = exports.setItemThumbnail = exports.refreshItemThumbnail = exports.DOCTOR_REPORT_SCHEMA = exports.findUProject = exports.locateEditorCmd = exports.runUnrealDoctor = exports.TOOLCHAIN_PACKAGES = exports.productsWorldPath = exports.CREATOR_WORLDS_PATH = exports.PRODUCTS_PATH = exports.ITEM_DISTRIBUTIONS_CREATOR_PATH = exports.ITEM_DISTRIBUTIONS_PATH = exports.achievementsWorldPath = exports.ITEMS_FROM_PACKAGE_PATH = exports.PUBLICATIONS_UPLOAD_PATH = exports.publishOwnedItemFromPackage = exports.makeItemFromPackage = exports.publishGlb = exports.SERVER_CREATION_PERMISSIONS = exports.WORLD_DESCRIPTION_MAX = exports.WORLD_METRICS_UNSUPPORTED = exports.BASELINE_FILENAME = exports.anchorOf = exports.parseBaseline = exports.buildBaseline = exports.applyBaseline = exports.canonicalizeSnapshot = exports.detectNpcWiring = exports.detectInspectWiring = exports.resolveFocus = exports.formatWorldFocus = exports.analyzeZones = exports.formatWorldDiff = exports.diffWorldSnapshots = exports.DEFAULT_REPORT = void 0;
47
- exports.DEFAULT_HLOD_REFINEMENT_SETTINGS = exports.bakeSceneHlodRefinements = exports.DEFAULT_COMPLETE_HLOD_SETTINGS = exports.bakeCompleteSceneHlod = exports.writeSharedHlodMaterialGlb = exports.writeHlodCellGlb = void 0;
41
+ exports.instanceOrdinalOf = exports.interactableModuleId = exports.composeInteractableManifest = exports.composeInteractableModuleManifest = exports.addInteractable = exports.frozenBuildArtifactKey = exports.freezeBuildDraft = exports.createPrivateBuildDraft = exports.PRIVATE_BUILD_DRAFT_SCHEMA = exports.checkPackageBundle = exports.MULTIPLAYER_CONFIG_FILENAME = exports.multiplayerConfigBundleFile = exports.PLATFORM_THREE_VERSION = exports.tiledTerrainBakedLightingWarning = exports.checkBundle = exports.validateDeviceProject = exports.testDeviceProject = exports.readDeviceGlbNodeNames = exports.createDeviceProject = exports.DEVICE_FILENAME = exports.placementsContinuum = exports.placementsBundle = exports.inspectPlacementsBake = exports.readPlacementsBake = exports.attachTreeImpostors = exports.bakeTreeImpostors = exports.bakePlacements = exports.publicRequester = exports.formatPublishedVerdict = exports.formatHostAddOns = exports.checkPublishedAddOn = exports.checkHostAddOns = exports.uploadToTicket = exports.HelixApi = exports.ApiError = exports.PLACEMENT_REQUEST_FILENAME = exports.writePlacementRequest = exports.placementRequestBundleFile = exports.validatePlacementRequest = exports.createPlacementRequest = exports.compileNativeAvatarCompanion = exports.attachNativeAvatarSelectionToBuild = exports.createNativeAvatarSelectionPackage = exports.normalizeNativeAvatarSelection = exports.NATIVE_AVATAR_SELECTION_ROLE = exports.NATIVE_AVATAR_SELECTION_MEDIA_TYPE = exports.NATIVE_AVATAR_SELECTION_SCHEMA = exports.produceNativeAvatarCidDescriptors = exports.censusNativeAvatarImages = exports.WORLD_THUMBNAIL_PUBLICATION_VERSION = void 0;
42
+ exports.parseJsonObjectOrFile = exports.parseJsonArrayOrFile = exports.normalizeItemKind = exports.meshContentTypeFromExtension = exports.CLIP_SET_SLOT_TYPES = exports.isCcWearableSlot = exports.isCcGender = exports.ccSlotIsRequiredForKind = exports.ccSlotIsAllowedForKind = exports.ccGendersAreRequiredForKind = exports.ccGendersAreAllowedForKind = exports.CC_WEARABLE_SLOT_GROUPS = exports.CC_WEARABLE_SLOTS = exports.CC_GENDERS = exports.assertLooksLikeGlb = exports.assertCcSlot = exports.assertCcGenders = exports.SOURCE_MAX_BYTES = exports.SOURCE_HARD_EXCLUDES = exports.SOURCE_CONTENT_TYPE = exports.SOURCE_ARCHIVE_FILENAME = exports.parseGitignore = exports.isSourceExcluded = exports.formatArchiveSize = exports.createSourceArchive = exports.collectSourceFiles = exports.formatScenePerformanceReport = exports.analyzeScenePerformance = exports.importSourceSceneMap = exports.SOURCE_SCENE_IMPORT_BUDGETS = exports.NATIVE_SCENE_CONVERSION_CONFIDENCE = exports.matchCanonicalMaterial = exports.createSharedMaterialBinding = exports.buildMaterialPackageRecipe = exports.buildMaterialBulkRecipe = exports.MATERIAL_REVIEW_CONFIDENCE = exports.MATERIAL_AUTO_REPLACE_CONFIDENCE = exports.HELIX_OFFICIAL_MATERIAL_SUBSET = exports.compileContinuumScenePackage = exports.CONTINUUM_SCENE_DOCUMENT_MEDIA_TYPE = exports.compileSceneElementsBundle = exports.compileSceneElements = exports.cs2 = exports.terrain = exports.labelModuleValidationErrors = exports.updateInteractable = exports.subtractInteractableContribution = exports.parseInteractablePosition = exports.namespaceInteractableFragment = exports.moduleInteractableFragment = void 0;
43
+ exports.INSTALLED_INDEX = exports.installWorld = exports.resolvePins = exports.validateAssetPackConstraints = exports.normalizePinRange = exports.loadInstalledIndexValidator = exports.loadVendoredValidator = exports.installLocalAbility = exports.checkAbilityBundle = exports.productTypeGrantsItem = exports.isProductKey = exports.buildProductUpdate = exports.buildProductRegistration = exports.WORLD_PRODUCT_TYPES = exports.PRODUCT_TITLE_MAX = exports.PRODUCT_KEY_PATTERN = exports.PRODUCT_KEY_MAX = exports.PRODUCT_DESCRIPTION_MAX = exports.MAX_PASS_DURATION_SECONDS = exports.MAX_GRANT_ITEM_QUANTITY = exports.MAX_GRANT_EFFECTS = exports.MAX_GRANT_CURRENCY_AMOUNT = exports.GRANT_CODE_PATTERN = exports.GRANT_CODE_MAX = exports.resolveUnlockMode = exports.isAchievementKey = exports.iconContentTypeFromExtension = exports.formatAchievementCriteria = exports.buildAchievementUpdate = exports.buildAchievementRegistration = exports.buildAchievementCriteria = exports.DATA_STORE_CRITERIA_KEY_TEMPLATES = exports.ACHIEVEMENT_UNLOCK_MODES = exports.ACHIEVEMENT_TROPHY_MAX_BYTES = exports.ACHIEVEMENT_KEY_PATTERN = exports.ACHIEVEMENT_ICON_MAX_BYTES = exports.ACHIEVEMENT_CRITERIA_SIGNALS = exports.ACHIEVEMENT_CRITERIA_OPS = exports.ACHIEVEMENT_CRITERIA_METRICS = exports.editionFields = exports.buildItemDistributionUpdate = exports.buildItemDistribution = exports.ITEM_EDITION_MODES = exports.ITEM_DISTRIBUTION_CHANNELS = exports.DISTRIBUTION_KEY_PATTERN = exports.renderCcSlotTable = exports.renderCcGenderList = exports.parseTags = exports.parseGenders = exports.parseJsonOrFile = void 0;
44
+ exports.extensionFor = exports.describeGateAdvance = exports.approveDreamerGate = exports.DEFAULT_MOUNT_PREFIX = exports.formatSubPathResult = exports.verifySubPath = exports.roundLix = exports.receiptLix = exports.formatWaitState = exports.formatReceipt = exports.formatLix = exports.formatQuote = exports.formatBalance = exports.normalizeQuote = exports.quoteGeneration = exports.formatJobs = exports.listJobs = exports.getLixBalance = exports.TICK_NODE_CEILING = exports.renderRealizabilityRefusal = exports.registryRealizabilityDeps = exports.checkRealizability = exports.initAbilityTemplate = exports.slugify = exports.initTemplate = exports.defaultClientTokenName = exports.browserLogin = exports.jwtExpiresAtIso = exports.clearCredentials = exports.saveCredentials = exports.loadCredentials = exports.HELIX_SCOPE = exports.HELIX_ENV = exports.DEFAULT_WEB_URL = exports.DEFAULT_API_URL = exports.credsEnvMismatchWarning = exports.apiUrlMatchesEnv = exports.ADVISORY_SYSTEMS = exports.assessWorldCurrency = exports.assessWeaponPins = exports.assessVaultAssets = exports.assessThreeCurrency = exports.assessPlatformDelivery = exports.assessInteractables = exports.enginePinOverrideLogPath = exports.detectExactEnginePins = exports.ALLOW_EXACT_ENGINE_PIN_FLAG = exports.WORLD_MANIFEST_LOCATIONS = exports.MODULES_DIR = exports.LOCKFILE = void 0;
45
+ exports.uploadArtifact = exports.resolveWorldId = exports.renderPublishFailure = exports.publishUnrealBuild = exports.assertReceipt = exports.assertCreateResponseMatchesPlan = exports.assertClientDeliveryMatchesPlan = exports.verifyUnrealCandidate = exports.UnrealCandidateError = exports.planSharedRuntimePublish = exports.defaultIdempotencyKey = exports.candidateArtifactDigest = exports.auditCookScope = exports.clearMaterialPinCache = exports.platformMaterialTag = exports.parseVaultMaterialSearch = exports.parseContinuumCurrentVersion = exports.materialContinuumIdentity = exports.matchMaterialResolution = exports.materialResolutionOptions = exports.materialDefaultResolutionKey = exports.DEFAULT_RESOLUTION_KEY = exports.VAULT_ASSET_KINDS = exports.UnavailableCapabilityError = exports.updateVaultAssetMetadata = exports.startStandaloneAssetGeneration = exports.startDreamerAssetGenerationFromReference = exports.startDreamerAssetGeneration = exports.searchVaultAssets = exports.StrandedJobError = exports.saveGeneratedAsset = exports.reviseDreamerGate = exports.retryDreamerJob = exports.resumeAndPublishAsset = exports.resolveMaterial = exports.MATERIAL_RENDITION_SELECTIONS = exports.listMaterials = exports.listDreamerVoices = exports.installVaultAsset = exports.getVaultAssetVersions = exports.getVaultAssetUsage = exports.getVaultAsset = exports.getStandaloneAssetGenerationJob = exports.getDreamerAssetGenerationJob = exports.generateStandaloneAsset = exports.generateImage = exports.generateAudio = exports.generateAndPublishAssetFromReference = exports.generateAndPublishAsset = exports.formatStrandedJob = void 0;
46
+ exports.bakeSceneHlod = exports.attachFoliageLods = exports.bakeFoliageLods = exports.MAX_ITEM_THUMBNAIL_BYTES = exports.renderItemThumbnailResult = exports.describeThumbnailError = exports.setItemThumbnail = exports.refreshItemThumbnail = exports.DOCTOR_REPORT_SCHEMA = exports.findUProject = exports.locateEditorCmd = exports.runUnrealDoctor = exports.TOOLCHAIN_PACKAGES = exports.productsWorldPath = exports.CREATOR_WORLDS_PATH = exports.PRODUCTS_PATH = exports.ITEM_DISTRIBUTIONS_CREATOR_PATH = exports.ITEM_DISTRIBUTIONS_PATH = exports.achievementsWorldPath = exports.ITEMS_FROM_PACKAGE_PATH = exports.PUBLICATIONS_UPLOAD_PATH = exports.publishOwnedItemFromPackage = exports.makeItemFromPackage = exports.publishGlb = exports.SERVER_CREATION_PERMISSIONS = exports.WORLD_DESCRIPTION_MAX = exports.WORLD_METRICS_UNSUPPORTED = exports.BASELINE_FILENAME = exports.anchorOf = exports.parseBaseline = exports.buildBaseline = exports.applyBaseline = exports.canonicalizeSnapshot = exports.detectNpcWiring = exports.detectInspectWiring = exports.resolveFocus = exports.formatWorldFocus = exports.analyzeZones = exports.formatWorldDiff = exports.diffWorldSnapshots = exports.DEFAULT_REPORT = exports.formatWorldInspection = exports.sortFindings = exports.analyzeWorld = exports.validateUnrealProject = exports.packageUnrealProject = exports.initUnrealManifest = exports.HELIX_UNREAL_ENGINE_VERSION = exports.HELIX_UNREAL_CONTRACT_VERSION = exports.formatUnrealValidationReport = void 0;
47
+ exports.DEFAULT_HLOD_REFINEMENT_SETTINGS = exports.bakeSceneHlodRefinements = exports.DEFAULT_COMPLETE_HLOD_SETTINGS = exports.bakeCompleteSceneHlod = exports.writeSharedHlodMaterialGlb = exports.writeHlodCellGlb = exports.bakeSharedHlodAtlas = exports.planSharedHlodAtlas = exports.approximateHlodGeometry = exports.bakeHlodSurface = exports.HLOD_BAKER_VERSION = exports.DEFAULT_HLOD_LAYER = exports.planSceneHlod = exports.tagSceneHlod = exports.inspectSceneHlod = void 0;
48
48
  exports.importCharacter = importCharacter;
49
49
  exports.retargetAnimation = retargetAnimation;
50
50
  exports.captureScreenshots = captureScreenshots;
@@ -107,6 +107,17 @@ const helix_manifest_1 = require("@hypersoniclabs/helix-manifest");
107
107
  const publishThumbnail_1 = require("./screenshot/publishThumbnail");
108
108
  var publishThumbnail_2 = require("./screenshot/publishThumbnail");
109
109
  Object.defineProperty(exports, "WORLD_THUMBNAIL_PUBLICATION_VERSION", { enumerable: true, get: function () { return publishThumbnail_2.WORLD_THUMBNAIL_PUBLICATION_VERSION; } });
110
+ var nativeAvatarAuthoring_1 = require("./character/nativeAvatarAuthoring");
111
+ Object.defineProperty(exports, "censusNativeAvatarImages", { enumerable: true, get: function () { return nativeAvatarAuthoring_1.censusNativeAvatarImages; } });
112
+ Object.defineProperty(exports, "produceNativeAvatarCidDescriptors", { enumerable: true, get: function () { return nativeAvatarAuthoring_1.produceNativeAvatarCidDescriptors; } });
113
+ var nativeAvatarCompanion_1 = require("./continuum/nativeAvatarCompanion");
114
+ Object.defineProperty(exports, "NATIVE_AVATAR_SELECTION_SCHEMA", { enumerable: true, get: function () { return nativeAvatarCompanion_1.NATIVE_AVATAR_SELECTION_SCHEMA; } });
115
+ Object.defineProperty(exports, "NATIVE_AVATAR_SELECTION_MEDIA_TYPE", { enumerable: true, get: function () { return nativeAvatarCompanion_1.NATIVE_AVATAR_SELECTION_MEDIA_TYPE; } });
116
+ Object.defineProperty(exports, "NATIVE_AVATAR_SELECTION_ROLE", { enumerable: true, get: function () { return nativeAvatarCompanion_1.NATIVE_AVATAR_SELECTION_ROLE; } });
117
+ Object.defineProperty(exports, "normalizeNativeAvatarSelection", { enumerable: true, get: function () { return nativeAvatarCompanion_1.normalizeNativeAvatarSelection; } });
118
+ Object.defineProperty(exports, "createNativeAvatarSelectionPackage", { enumerable: true, get: function () { return nativeAvatarCompanion_1.createNativeAvatarSelectionPackage; } });
119
+ Object.defineProperty(exports, "attachNativeAvatarSelectionToBuild", { enumerable: true, get: function () { return nativeAvatarCompanion_1.attachNativeAvatarSelectionToBuild; } });
120
+ Object.defineProperty(exports, "compileNativeAvatarCompanion", { enumerable: true, get: function () { return nativeAvatarCompanion_1.compileNativeAvatarCompanion; } });
110
121
  const node_fs_1 = require("node:fs");
111
122
  const node_crypto_1 = require("node:crypto");
112
123
  const node_os_1 = require("node:os");