@helix3/helix-cli 0.1.23-helix3.424 → 0.1.23-helix3.425

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 (42) hide show
  1. package/dist/index.js +69 -4
  2. package/dist/index.js.map +1 -1
  3. package/dist/tsconfig.build.tsbuildinfo +1 -1
  4. package/dist/vehicle/inspectionSheets.d.ts +42 -0
  5. package/dist/vehicle/inspectionSheets.js +173 -0
  6. package/dist/vehicle/inspectionSheets.js.map +1 -0
  7. package/dist/vehicle/preview.d.ts +17 -1
  8. package/dist/vehicle/preview.js +47 -6
  9. package/dist/vehicle/preview.js.map +1 -1
  10. package/dist/vehicle/recheckListed.d.ts +87 -0
  11. package/dist/vehicle/recheckListed.js +200 -0
  12. package/dist/vehicle/recheckListed.js.map +1 -0
  13. package/dist/visualQa/vehicle.js +35 -2
  14. package/dist/visualQa/vehicle.js.map +1 -1
  15. package/dist/visualQa/vehicleGrip.d.ts +156 -0
  16. package/dist/visualQa/vehicleGrip.js +439 -0
  17. package/dist/visualQa/vehicleGrip.js.map +1 -0
  18. package/dist/visualQa/vehicleInspection.d.ts +30 -0
  19. package/dist/visualQa/vehicleInspection.js +189 -0
  20. package/dist/visualQa/vehicleInspection.js.map +1 -0
  21. package/dist/visualQa/vehicleOccupants.d.ts +13 -0
  22. package/dist/visualQa/vehicleOccupants.js +386 -263
  23. package/dist/visualQa/vehicleOccupants.js.map +1 -1
  24. package/dist/visualQa/vehicleProbe.d.ts +1 -1
  25. package/dist/visualQa/vehicleProbe.js +84 -0
  26. package/dist/visualQa/vehicleProbe.js.map +1 -1
  27. package/package.json +1 -1
  28. package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
  29. package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
  30. package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
  31. package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
  32. package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
  33. package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
  34. package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
  35. package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
  36. package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
  37. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
  38. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
  39. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
  40. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
  41. package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
  42. package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
package/dist/index.js CHANGED
@@ -647,7 +647,11 @@ vehicleCommand
647
647
  .command('preview')
648
648
  .description('Render a vehicle that is not published yet in the real HELIX runtime (headless) and measure it: ride height against groundToBodyOrigin, '
649
649
  + 'wheels on their hubs, arch clearance, rolling radius, steering, doors, seats. Run it BEFORE the first mint, which locks groundToBodyOrigin. '
650
- + 'Every car preview also writes the fixed appearance poses (poses/pose.front|side|rear|top|front34|rear34|cockpit.jpg and poses.jpg) to compare with reference photos. '
650
+ + 'Every car preview also writes the fixed appearance poses (poses/pose.front|side|rear|top|front34|rear34|cockpit.jpg and poses.jpg) to compare with reference photos, '
651
+ + 'and the GAUNTLET INSPECTION SET as small contact sheets under <out>/inspection/ (8 angles day and night, each lamp lit, every wheel, every panel open, '
652
+ + 'EVERY seat occupied from first person, side glass, over the shoulder and windscreen, the driver steering left/centre/right, and still-hands frames), '
653
+ + 'with blocking occupant asserts (posture, hands on the rim while steering and following it, 9 and 3, still fingers and hands). Read every sheet. '
654
+ + '--item <id> with no car directory and no --addon inspects a PUBLISHED car as the runtime serves it (re-checking a listed car against the current gates). '
651
655
  + 'With --addon <dir> it previews unpublished vehicle ADD-ONS instead: each add-on directory (the layout `vehicle addon check|publish` reads) is fitted '
652
656
  + 'to the candidate car, or to a published car (--item <id>, no car directory) by the engine\'s own fold, and the DRAWN geometry is measured in world space '
653
657
  + 'against its anchor (wheels within 1 cm of each hub, socket-framed parts on their socket, host-framed parts at their authored position, inside the car, '
@@ -660,7 +664,9 @@ vehicleCommand
660
664
  .option('--tolerance-cm <cm>', 'with --addon: how far a drawn part may sit from its anchor (default: wheels 1 cm, socket-framed and host-framed parts 3 cm)', (v) => Number(v))
661
665
  .option('--out <dir>', 'frames, contact-sheet.jpg, bundle.json and preview.json go here (default: <dir>/.helix-preview)')
662
666
  .option('--proxy-item <id>', 'a published vehicle the QA account can Try Now; the runtime loads it and the candidate replaces its car (and its slot board is what --addon fits to)')
663
- .option('--occupants', 'also seat an avatar in every seat, judge the cabin, and report where the runtime\'s cabin fit put each seat vs where it was authored (slow)')
667
+ .option('--occupants', 'kept for old scripts: occupants are ON by default (every seat occupied, posture, hands while steering, still fingers, cabin fit)')
668
+ .option('--no-occupants', 'skip seating occupants (a quick iteration run only: an inspection without every seat occupied is not a gate result)')
669
+ .option('--no-inspection', 'skip the gauntlet inspection set (8 angles day and night, each lamp lit) and its contact sheets (iteration only)')
664
670
  .option('--reference-paint <#rrggbb>', 'the reference body paint colour, the median of the body-paint pixels in the reference photos: renders the body paint alone from six cameras in the Try Now daylight (the world\'s own sun, exposure, tone mapping and lights) and fails on hue, saturation, lightness or highlight wash. White/silver/grey/black are judged on tint and lightness instead of hue')
665
671
  .option('--paint-tolerance <deg>', 'maximum circular hue distance (degrees) the rendered body may sit from a chromatic --reference-paint (default 12)', (v) => Number(v))
666
672
  .option('--reference-wheel <image>', 'a close-up photo of the real wheel, face-on or nearly: renders the candidate\'s front-left wheel square-on and fails vehicle.wheels.design.* on spoke count and centre cap (a different finish fails, a neighbouring one warns). The photo\'s wheel is read from the image centre unless --reference-wheel-crop says where it is')
@@ -683,7 +689,7 @@ vehicleCommand
683
689
  try {
684
690
  summary = await runVehiclePreview({
685
691
  target, addOns: opts.addon, item: opts.item, toleranceCm: Number.isFinite(opts.toleranceCm) ? opts.toleranceCm : undefined,
686
- glb: opts.glb, out: opts.out, proxyItem: opts.proxyItem, occupants: opts.occupants, apiBase, webBase,
692
+ glb: opts.glb, out: opts.out, proxyItem: opts.proxyItem, occupants: opts.occupants, inspection: opts.inspection, apiBase, webBase,
687
693
  referencePaint: opts.referencePaint, paintToleranceDeg: Number.isFinite(opts.paintTolerance) ? opts.paintTolerance : undefined,
688
694
  referenceWheel: opts.referenceWheel ? {
689
695
  image: opts.referenceWheel,
@@ -714,6 +720,45 @@ vehicleCommand
714
720
  process.exitCode = 2;
715
721
  }
716
722
  });
723
+ vehicleCommand
724
+ .command('recheck-listed')
725
+ .description('Re-judge LISTED vehicles against today\'s gates. A listed car is never re-judged when a gate is added, so its visual-QA record can predate '
726
+ + 'the gate that would fail it (the F40 was listed before the posture and hands-while-steering asserts existed). For each car this reads the '
727
+ + 'passing record of its current version and names every current blocking gate it never ran (STALE) or failed (FAIL). With --rerun it renders '
728
+ + 'each car again now (`vehicle preview --item`: every seat occupied, the full inspection set and its contact sheets) and reports that verdict. '
729
+ + 'Agents updating a car must run this on it. Exit 0 = every car current and (with --rerun) passing, 1 = a car needs action, 2 = could not run')
730
+ .argument('[itemIds...]', 'vehicle item ids (default: every listed vehicle in the marketplace catalogue, or one creator\'s with --creator)')
731
+ .option('--creator <userId>', 'only this creator\'s listed vehicles')
732
+ .option('--rerun', 'render each car again now with today\'s gates (several minutes per car, one browser at a time)')
733
+ .option('--out <dir>', 'with --rerun: where each car\'s inspection goes (default ./.helix-recheck)')
734
+ .option('--storage-state <file>', 'Playwright storageState of a signed-in QA account (default: sign in with `helix login`)')
735
+ .option('--chrome <path>', 'Chromium executable (headless)')
736
+ .option('--api-url <url>', 'platform API base URL')
737
+ .option('--web-url <url>', 'website base URL')
738
+ .option('--json', 'print the rows as JSON')
739
+ .action(async (itemIds, opts) => {
740
+ try {
741
+ const { recheckListed, renderRecheckText } = await Promise.resolve().then(() => __importStar(require('./vehicle/recheckListed')));
742
+ const creds = (0, config_1.loadCredentials)();
743
+ const apiBase = opts.apiUrl ?? creds?.apiUrl ?? config_1.DEFAULT_API_URL;
744
+ const webBase = opts.webUrl ?? process.env.HELIX_WEB_URL ?? (0, config_1.webUrlForApi)(apiBase) ?? config_1.DEFAULT_WEB_URL;
745
+ const rows = await recheckListed({
746
+ apiBase, webBase, items: itemIds, creatorId: opts.creator, rerun: opts.rerun, out: (0, node_path_1.resolve)(opts.out ?? '.helix-recheck'),
747
+ token: creds?.token ?? null, storageState: opts.storageState ?? process.env.HELIX_VQA_STORAGE_STATE, chrome: opts.chrome,
748
+ log: (m) => { if (!opts.json)
749
+ process.stderr.write(`[recheck] ${m}\n`); },
750
+ });
751
+ if (opts.json)
752
+ console.log(JSON.stringify(rows, null, 2));
753
+ else
754
+ console.log(renderRecheckText(rows));
755
+ process.exitCode = rows.some((r) => r.status !== 'current' || (r.rerun && r.rerun.exitCode !== 0)) ? 1 : 0;
756
+ }
757
+ catch (error) {
758
+ process.stderr.write(`✖ vehicle recheck-listed could not run: ${error instanceof Error ? error.message : String(error)}\n`);
759
+ process.exitCode = 2;
760
+ }
761
+ });
717
762
  // ── vehicle source validation / audio / add-on tooling ───────────────────────────────────────────────────────────
718
763
  function vehicleContinuumDeps() {
719
764
  const creds = requireAuth();
@@ -2373,6 +2418,7 @@ itemDistribution
2373
2418
  .option('--ends-at <iso>', 'end time')
2374
2419
  .option('--intent-id <uuid>', 'idempotency key; derived from the request when omitted, so an identical re-run returns the same route instead of a duplicate')
2375
2420
  .option('--dry-run', 'validate and print the request; no network')
2421
+ .option('--allow-stale-visual-qa <reason>', 'human override: list a VEHICLE whose visual-QA record does not cover today\'s gates (logged to ~/.helix/listing-gate-overrides.jsonl)')
2376
2422
  .option('--json', 'machine-readable output')
2377
2423
  .action(async (itemId, opts) => {
2378
2424
  const input = {
@@ -2397,7 +2443,26 @@ itemDistribution
2397
2443
  console.log(`✔ Dry run — nothing sent.\n POST ${out.endpoint}\n ${JSON.stringify(fields)}`);
2398
2444
  return;
2399
2445
  }
2400
- const created = await (0, lib_1.createItemDistribution)(input, requireAuth());
2446
+ const auth = requireAuth();
2447
+ // A VEHICLE is listed only on a visual-QA record that ran, and passed, every blocking gate that exists today (the F40
2448
+ // was listed on a record that predated the posture and hands asserts). See vehicle/recheckListed.ts.
2449
+ const { vehicleListingGate, listingRefusal } = await Promise.resolve().then(() => __importStar(require('./vehicle/recheckListed')));
2450
+ const gate = await vehicleListingGate(auth.apiUrl ?? config_1.DEFAULT_API_URL, itemId);
2451
+ if (gate && gate.status !== 'current') {
2452
+ const reason = (opts.allowStaleVisualQa ?? '').trim();
2453
+ if (!reason) {
2454
+ fail(listingRefusal(gate));
2455
+ return;
2456
+ }
2457
+ process.stderr.write(`⚠ listing ${gate.title} on a ${gate.status.toUpperCase()} visual-QA record by human override: ${reason}\n`);
2458
+ try {
2459
+ const { appendFileSync } = await Promise.resolve().then(() => __importStar(require('node:fs')));
2460
+ const { CONFIG_DIR } = await Promise.resolve().then(() => __importStar(require('./config')));
2461
+ appendFileSync((0, node_path_1.join)(CONFIG_DIR, 'listing-gate-overrides.jsonl'), `${JSON.stringify({ at: new Date().toISOString(), itemId, status: gate.status, stale: gate.stale, failed: gate.failed, reason })}\n`);
2462
+ }
2463
+ catch { /* the warning above is the record */ }
2464
+ }
2465
+ const created = await (0, lib_1.createItemDistribution)(input, auth);
2401
2466
  if (opts.json)
2402
2467
  console.log(JSON.stringify(created, null, 2));
2403
2468
  else