@helix3/helix-cli 0.1.13-helix3.124 → 0.1.13-helix3.126
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.
- package/README.md +11 -0
- package/dist/bundle.d.ts +3 -1
- package/dist/bundle.js +9 -14
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +75 -1
- package/dist/index.js.map +1 -1
- package/dist/install.js +1 -1
- package/dist/install.js.map +1 -1
- package/dist/interactable.d.ts +59 -0
- package/dist/interactable.js +738 -0
- package/dist/interactable.js.map +1 -0
- package/dist/lib.d.ts +32 -2
- package/dist/lib.js +48 -12
- package/dist/lib.js.map +1 -1
- package/dist/package.js +64 -7
- package/dist/package.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -133,6 +133,10 @@ reach an already-published world without creator edits or republishing. Exact
|
|
|
133
133
|
versions such as `0.2.43` map directly to the immutable catalog URL and remain
|
|
134
134
|
pinned. A custom Vite config is never rewritten: install reports
|
|
135
135
|
`legacy-bundled` until the creator explicitly externalizes `@helix/*`.
|
|
136
|
+
`helix validate`, `helix publish`, and the publish API refuse that legacy mode,
|
|
137
|
+
so every newly accepted system-bearing web World is either safely compatible or
|
|
138
|
+
explicitly pinned. `latest` and `*` are not accepted publish ranges because they
|
|
139
|
+
can cross a compatibility boundary.
|
|
136
140
|
|
|
137
141
|
That update contract is deliberately narrower than "the SDK updates itself":
|
|
138
142
|
|
|
@@ -151,6 +155,13 @@ previous compatible resolver response during a transient outage; the descriptor'
|
|
|
151
155
|
`lastKnownGood` field is provenance metadata, not an executable in-world fallback.
|
|
152
156
|
Without a cached resolver response, a cold resolver failure fails closed.
|
|
153
157
|
|
|
158
|
+
Native features remain individually overridable without pinning the whole
|
|
159
|
+
character runtime. `CharacterMultiplayer.create` accepts `emotes: false` to
|
|
160
|
+
disable carried emotes, `emoteWheel: false` to keep emotes but draw a custom
|
|
161
|
+
picker, and `localControl: false` when the World owns its own camera/input.
|
|
162
|
+
Camera behavior can also be configured through the character camera config.
|
|
163
|
+
Every other compatible native fix continues to update normally.
|
|
164
|
+
|
|
154
165
|
The runtime descriptor is mandatory for bundles that declare systems. It makes
|
|
155
166
|
the delivery boundary inspectable by the CLI, MCP, backend, and fleet census;
|
|
156
167
|
it does not execute code or silently rewrite an old minified bundle.
|
package/dist/bundle.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export declare function streamablePayload(files: BundleFile[]): {
|
|
|
16
16
|
files: BundleFile[];
|
|
17
17
|
bytes: number;
|
|
18
18
|
};
|
|
19
|
-
export declare function checkBundle(root: string
|
|
19
|
+
export declare function checkBundle(root: string, options?: {
|
|
20
|
+
compatibleResolverOrigin?: string;
|
|
21
|
+
}): BundleCheck;
|
|
20
22
|
export declare const MULTIPLAYER_CONFIG_FILENAME = "multiplayer.json";
|
|
21
23
|
export declare function multiplayerConfigBundleFile(root: string, manifest: NormalizedHelixManifest): BundleFile | null;
|
package/dist/bundle.js
CHANGED
|
@@ -50,11 +50,10 @@ function walk(dir, root, out) {
|
|
|
50
50
|
// keeps a minified bundle that never imported it from tripping the rule.
|
|
51
51
|
const DEV_SHELL_SPECIFIER = 'helix-sdk/dev-shell';
|
|
52
52
|
const RUNTIME_DESCRIPTOR_FILENAME = 'helix.runtime.json';
|
|
53
|
-
const RUNTIME_DELIVERY_MODES = new Set(['compatible', 'pinned', 'mixed', 'legacy-bundled']);
|
|
54
53
|
// Local validation with the exact same rules the server enforces at publish — shared via
|
|
55
54
|
// @hypersoniclabs/helix-manifest, so "validate passed but publish failed" can't happen for contract
|
|
56
55
|
// reasons. ONE rule is CLI-only: the dev-simulator scan below, also the first rule here reading CONTENT.
|
|
57
|
-
function checkBundle(root) {
|
|
56
|
+
function checkBundle(root, options = {}) {
|
|
58
57
|
const errors = [];
|
|
59
58
|
const warnings = [];
|
|
60
59
|
const files = [];
|
|
@@ -111,18 +110,14 @@ function checkBundle(root) {
|
|
|
111
110
|
else {
|
|
112
111
|
try {
|
|
113
112
|
const descriptor = JSON.parse((0, node_fs_1.readFileSync)(descriptorFile.absolutePath, 'utf8'));
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
if (descriptor.delivery === 'legacy-bundled')
|
|
124
|
-
warnings.push(`${RUNTIME_DESCRIPTOR_FILENAME} marks this build legacy-bundled; compatible platform updates require an explicit @helix/* external rule before republishing`);
|
|
125
|
-
}
|
|
113
|
+
const htmlFile = files.find((file) => file.path === manifest.entry);
|
|
114
|
+
const html = htmlFile ? (0, node_fs_1.readFileSync)(htmlFile.absolutePath, 'utf8') : '';
|
|
115
|
+
errors.push(...(0, helix_manifest_1.validatePlatformRuntimeDelivery)({
|
|
116
|
+
descriptor,
|
|
117
|
+
manifestSystems,
|
|
118
|
+
entryHtml: html,
|
|
119
|
+
compatibleResolverOrigin: options.compatibleResolverOrigin,
|
|
120
|
+
}).errors);
|
|
126
121
|
}
|
|
127
122
|
catch {
|
|
128
123
|
errors.push(`${RUNTIME_DESCRIPTOR_FILENAME} is not valid JSON`);
|
package/dist/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":";;;AA4CA,8CAaC;AA0BD,kCAiHC;AAYD,kEASC;AAzND,qCAA8D;AAC9D,yCAA2C;AAC3C,mEAWwC;AAcxC,oGAAoG;AACpG,iGAAiG;AACjG,iGAAiG;AACjG,SAAS;AACT,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,mGAAmG;AACnG,mGAAmG;AACnG,4EAA4E;AAC5E,EAAE;AACF,oGAAoG;AACpG,kGAAkG;AAClG,WAA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;KACR,CAAC;AACJ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -264,7 +264,9 @@ program
|
|
|
264
264
|
.description('Validate a world bundle locally (same rules the server enforces)')
|
|
265
265
|
.argument('[directory]', 'bundle directory', '.')
|
|
266
266
|
.action((directory) => {
|
|
267
|
-
const result = (0, bundle_1.checkBundle)((0, node_path_1.resolve)(directory)
|
|
267
|
+
const result = (0, bundle_1.checkBundle)((0, node_path_1.resolve)(directory), {
|
|
268
|
+
compatibleResolverOrigin: config_1.DEFAULT_API_URL,
|
|
269
|
+
});
|
|
268
270
|
if (result.errors.length) {
|
|
269
271
|
fail(`✖ ${result.errors.length} problem(s):\n${result.errors
|
|
270
272
|
.map((e) => ` - ${e}`)
|
|
@@ -492,6 +494,78 @@ program
|
|
|
492
494
|
: `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
493
495
|
}
|
|
494
496
|
});
|
|
497
|
+
program
|
|
498
|
+
.command('publish-interactable')
|
|
499
|
+
.description('Publish a validator-gated interactable bundle and link its official free Marketplace item')
|
|
500
|
+
.argument('[directory]', 'interactable bundle directory (the built dist/)', '.')
|
|
501
|
+
.action(async (directory) => {
|
|
502
|
+
const creds = requireAuth();
|
|
503
|
+
try {
|
|
504
|
+
const result = await (0, lib_1.publishInteractable)((0, node_path_1.resolve)(directory), creds, (message) => console.log(message));
|
|
505
|
+
console.log(`✔ Published interactable ${result.slug}@${result.version} (revision ${result.revision})`);
|
|
506
|
+
console.log(` checksum: ${result.checksumSha256}`);
|
|
507
|
+
console.log(` item: ${result.item.id}`);
|
|
508
|
+
console.log(` distribution:${result.distribution.id}`);
|
|
509
|
+
}
|
|
510
|
+
catch (err) {
|
|
511
|
+
fail(err instanceof lib_1.ApiError
|
|
512
|
+
? err.render()
|
|
513
|
+
: `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
program
|
|
517
|
+
.command('add-interactable')
|
|
518
|
+
.description('Resolve a Marketplace interactable, verify and vendor its bundle, then generate client/server glue')
|
|
519
|
+
.argument('<slug-or-item-id>', 'Marketplace item slug or UUID')
|
|
520
|
+
.option('-C, --world <dir>', 'world project directory', '.')
|
|
521
|
+
.option('--position <x,y,z>', 'placement origin in metres', '0,0,0')
|
|
522
|
+
.option('--yaw <degrees>', 'placement yaw in degrees', '0')
|
|
523
|
+
.option('--scale <n>', 'uniform placement scale', '1')
|
|
524
|
+
.action(async (ref, opts) => {
|
|
525
|
+
try {
|
|
526
|
+
const yawDeg = Number(opts.yaw);
|
|
527
|
+
const scale = Number(opts.scale);
|
|
528
|
+
if (!Number.isFinite(yawDeg))
|
|
529
|
+
fail(`✖ --yaw must be a number, got '${opts.yaw}'`);
|
|
530
|
+
if (!Number.isFinite(scale) || scale <= 0) {
|
|
531
|
+
fail(`✖ --scale must be a number > 0, got '${opts.scale}'`);
|
|
532
|
+
}
|
|
533
|
+
const credentials = (0, config_1.loadCredentials)() ?? undefined;
|
|
534
|
+
const result = await (0, lib_1.addInteractable)((0, node_path_1.resolve)(opts.world), ref, {
|
|
535
|
+
credentials,
|
|
536
|
+
placement: {
|
|
537
|
+
position: (0, lib_1.parseInteractablePosition)(opts.position),
|
|
538
|
+
yawDeg,
|
|
539
|
+
scale,
|
|
540
|
+
},
|
|
541
|
+
onProgress: (message) => console.log(message),
|
|
542
|
+
});
|
|
543
|
+
console.log(`${result.noOp ? '✔ Already installed' : '✔ Added'} ${result.id}@${result.version} as ${result.namespace}`);
|
|
544
|
+
console.log(` bundle: ${result.destination}`);
|
|
545
|
+
console.log(` client: ${result.clientGluePath}`);
|
|
546
|
+
console.log(` server: ${result.manifestPath}`);
|
|
547
|
+
console.log(' composition caps:');
|
|
548
|
+
for (const name of [
|
|
549
|
+
'rules',
|
|
550
|
+
'roomVars',
|
|
551
|
+
'playerVars',
|
|
552
|
+
'timers',
|
|
553
|
+
'phases',
|
|
554
|
+
'zones',
|
|
555
|
+
'events',
|
|
556
|
+
'actions',
|
|
557
|
+
]) {
|
|
558
|
+
console.log(` ${name}: ${result.caps[name]}/${result.caps.limits[name]} (${result.caps.percentages[name]}%)`);
|
|
559
|
+
}
|
|
560
|
+
for (const warning of result.warnings)
|
|
561
|
+
console.warn(` ! ${warning}`);
|
|
562
|
+
}
|
|
563
|
+
catch (err) {
|
|
564
|
+
fail(err instanceof lib_1.ApiError
|
|
565
|
+
? err.render()
|
|
566
|
+
: `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
567
|
+
}
|
|
568
|
+
});
|
|
495
569
|
// --- helix item ------------------------------------------------------------
|
|
496
570
|
// Universal items (wearables, avatars, home items) uploaded straight from a DCC
|
|
497
571
|
// export — the surface Helix Studio drives. Publishing an item is not
|