@helix3/helix-cli 0.1.18-helix3.359 → 0.1.18-helix3.361

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 CHANGED
@@ -46,6 +46,7 @@ The token is stored in `~/.helix/credentials.json` (mode `600`). It's sent as
46
46
  | `helix publish [dir] [--thumbnail <file>] [--upload-source] [--source-dir <path>]` | Validate → resolve/create the world → upload files → finalize → set the cover image → print the play URL. `--upload-source` additionally sends the project's source through a separate private channel so the world can be edited on the website later — **off by default**. |
47
47
  | `helix list` | List your worlds. |
48
48
  | `helix vehicle validate <vehicle-package.json> [--glb <model.glb>] [--json]` | One-second local gate for a hand-authored Universal Vehicle, run before `item publish`. Checks the package against the engine's own validator (vendored, pinned to an engine commit), the engine publish gate, the backend pin requirements, `groundToBodyOrigin` vs `wheelRadius + staticRideHeight`, and the `componentBuild` digest; with `--glb` also resolves the four wheel nodes, checks each wheel node's origin is at its hub (`WHEEL_PIVOT_NOT_AT_HUB`), the +X-left / +Z-forward frame, the vehicle publish budgets and the articulation nodes. Exit `0` no errors, `1` errors, `2` unreadable input. See [Vehicle validate](#vehicle-validate). |
49
+ | `helix vehicle preview <dir-or-package.json> [--glb <model.glb>] [--out <dir>] [--proxy-item <id>] [--json]` | Render a vehicle that is **not published yet** headless in the real runtime (hosted test grounds, Try Now through a published proxy vehicle whose car is swapped for your package + GLB, served from disk; nothing uploaded or recorded) and measure it: body-origin height against the declared `groundToBodyOrigin` (the number that locks at first mint), wheels on their hubs, arch clearance, rolling radius vs `wheelRadius`, steering, doors, seats. Prints a numeric summary with PASS/FAIL per check and writes frames, a contact sheet, `bundle.json` and `preview.json`. Exit `0` pass, `1` fail, `2` could not measure. See [docs/vehicle-preview.md](docs/vehicle-preview.md). |
49
50
  | `helix vehicle publish <dir> [--dry-run] [--item <id> --package-version <v> --reason <text>] [--json]` | One command from a vehicle package directory to a sealed, pinned, read-back-verified vehicle item: validate → upload each local WAV and write its verified public URL → mint → seal + pin the `vehicle` Package → read back. Resumable (ledger in `<dir>/.helix-publish`). See [Vehicle publish](#vehicle-publish). |
50
51
  | `helix vehicle audio-check <dir\|package.json\|item-id> [--json]` | Proves every sound the runtime will select resolves, is PCM WAV and is audible (pre-publish on local files, or read-back on a published item). |
51
52
  | `helix vehicle addon check <dir> [--grant] [--json]` / `helix vehicle addon publish <dir> [--no-grant] [--dry-run]` | Add-on fit gate (contract, `helixMeshFrame` anchoring, host hubs, hide targets + grants, the backend's `validate-fit` dry run) and the end-to-end add-on publish (grant → upload → seal + pin the `addon` Package → read back). |
package/dist/index.js CHANGED
@@ -617,6 +617,53 @@ vehicleCommand
617
617
  if (!result.ok)
618
618
  process.exitCode = 1;
619
619
  });
620
+ vehicleCommand
621
+ .command('preview')
622
+ .description('Render a vehicle that is not published yet in the real HELIX runtime (headless) and measure it: ride height against groundToBodyOrigin, '
623
+ + 'wheels on their hubs, arch clearance, rolling radius, steering, doors, seats. Run it BEFORE the first mint, which locks groundToBodyOrigin. '
624
+ + 'Nothing is uploaded or recorded. Exit 0 = every blocking check passed, 1 = a check failed, 2 = could not measure')
625
+ .argument('<dir-or-package.json>', 'a directory holding vehicle-package.json + model.glb (the layout `vehicle publish` reads), or the package JSON itself')
626
+ .option('--glb <model.glb>', 'the model (default: model.glb, or the one .glb, beside the package)')
627
+ .option('--out <dir>', 'frames, contact-sheet.jpg, bundle.json and preview.json go here (default: <dir>/.helix-preview)')
628
+ .option('--proxy-item <id>', 'a published vehicle the QA account can Try Now; the runtime loads it and the candidate replaces its car')
629
+ .option('--occupants', 'also seat an avatar in every seat and judge the cabin (slow)')
630
+ .option('--storage-state <file>', 'Playwright storageState of a signed-in QA account (default: sign in with `helix login`, or $HELIX_VQA_STORAGE_STATE)')
631
+ .option('--chrome <path>', 'Chromium executable (default: Playwright Chromium / Chrome for Testing, headless; the macOS system Chrome is refused)')
632
+ .option('--api-url <url>', 'platform API base URL')
633
+ .option('--web-url <url>', 'website base URL (default: the site that serves --api-url)')
634
+ .option('--json', 'print the machine-readable summary (also written to <out>/preview.json)')
635
+ .action(async (target, opts) => {
636
+ try {
637
+ const { PreviewInputError, renderPreviewText, runVehiclePreview } = await Promise.resolve().then(() => __importStar(require('./vehicle/preview')));
638
+ const creds = (0, config_1.loadCredentials)();
639
+ const apiBase = opts.apiUrl ?? creds?.apiUrl ?? config_1.DEFAULT_API_URL;
640
+ const webBase = opts.webUrl ?? process.env.HELIX_WEB_URL ?? (0, config_1.webUrlForApi)(apiBase) ?? config_1.DEFAULT_WEB_URL;
641
+ let summary;
642
+ try {
643
+ summary = await runVehiclePreview({
644
+ target, glb: opts.glb, out: opts.out, proxyItem: opts.proxyItem, occupants: opts.occupants, apiBase, webBase,
645
+ token: creds?.token ?? null, storageState: opts.storageState ?? process.env.HELIX_VQA_STORAGE_STATE, chrome: opts.chrome, quiet: opts.json,
646
+ });
647
+ }
648
+ catch (error) {
649
+ if (error instanceof PreviewInputError) {
650
+ process.stderr.write(`✖ ${error.message}\n`);
651
+ process.exitCode = 2;
652
+ return;
653
+ }
654
+ throw error;
655
+ }
656
+ if (opts.json)
657
+ console.log(JSON.stringify(summary, null, 2));
658
+ else
659
+ console.log(renderPreviewText(summary));
660
+ process.exitCode = summary.exitCode;
661
+ }
662
+ catch (error) {
663
+ process.stderr.write(`✖ vehicle preview could not run: ${error instanceof Error ? (error.stack ?? error.message) : String(error)}\n`);
664
+ process.exitCode = 2;
665
+ }
666
+ });
620
667
  // ── vehicle publish / audio / add-on tooling (src/vehicle/{publish,audio,addon}.ts) ───────────────────────────────
621
668
  function vehicleContinuumDeps() {
622
669
  const creds = requireAuth();