@hypersoniclabs/helix-cli 0.1.24 → 0.1.25-helix3.460

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 (38) hide show
  1. package/README.md +14 -5
  2. package/dist/assets.d.ts +1 -1
  3. package/dist/assets.js +5 -5
  4. package/dist/assets.js.map +1 -1
  5. package/dist/audioCommand.js +3 -3
  6. package/dist/audioCommand.js.map +1 -1
  7. package/dist/character/avatarPreflight.js +11 -2
  8. package/dist/character/avatarPreflight.js.map +1 -1
  9. package/dist/index.js +81 -20
  10. package/dist/index.js.map +1 -1
  11. package/dist/money.d.ts +1 -1
  12. package/dist/money.js +1 -1
  13. package/dist/tsconfig.build.tsbuildinfo +1 -1
  14. package/dist/vehicle/mintVehicle.d.ts +37 -15
  15. package/dist/vehicle/mintVehicle.js +139 -28
  16. package/dist/vehicle/mintVehicle.js.map +1 -1
  17. package/dist/vehicle/publish.d.ts +14 -0
  18. package/dist/vehicle/publish.js +28 -5
  19. package/dist/vehicle/publish.js.map +1 -1
  20. package/dist/vehicle/pull.d.ts +89 -0
  21. package/dist/vehicle/pull.js +274 -0
  22. package/dist/vehicle/pull.js.map +1 -0
  23. package/package.json +3 -3
  24. package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
  25. package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
  26. package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
  27. package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
  28. package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
  29. package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
  30. package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
  31. package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
  32. package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
  33. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
  34. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
  35. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
  36. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
  37. package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
  38. package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
package/dist/index.js CHANGED
@@ -1145,6 +1145,67 @@ vehicleCommand
1145
1145
  process.exitCode = 2;
1146
1146
  }
1147
1147
  });
1148
+ vehicleCommand
1149
+ .command('pull')
1150
+ .description('Rebuild a publishable COPY of a live vehicle: read the Item\'s sealed Vehicle Package Version and write '
1151
+ + 'vehicle-package.json (the exact sealed root), audio/<file> for every sound it pins, model.glb plus model-<renditionId>.glb for '
1152
+ + 'every served mesh rendition, a publish.json carrying the Item fields (the legacy "general" rating is written as "everyone"; a '
1153
+ + 'rating that is not one of everyone|teen|mature|adult needs --content-rating) and a pull.json recording where each byte came from. '
1154
+ + 'Nothing is uploaded and no ledger is written, so the copy mints a NEW Item instead of resuming against the live one: '
1155
+ + 'pull into a new directory, then `helix vehicle publish <dir>`. Exit 0 = pulled, 1 = nothing written, 2 = could not run')
1156
+ .argument('<item-id>', 'the published vehicle Item to copy')
1157
+ .argument('<dir>', 'a NEW directory to write the copy into (must not exist, or be empty)')
1158
+ .option('--package-version <semver>', 'pull this Version instead of the Item\'s current pin (a car\'s history is copyable too)')
1159
+ .option('--content-rating <rating>', 'the rating to write for the COPY: everyone, teen, mature or adult (default: the Item\'s own, mapped)')
1160
+ .option('--json', 'print the machine-readable result')
1161
+ .action(async (itemId, dir, opts) => {
1162
+ try {
1163
+ const pull = await Promise.resolve().then(() => __importStar(require('./vehicle/pull')));
1164
+ const { getItem, fetchPublicObject, isRecord } = await Promise.resolve().then(() => __importStar(require('./vehicle/platform')));
1165
+ const creds = requireAuth();
1166
+ const api = lib_1.HelixApi.forCredentials(creds);
1167
+ const apiUrl = creds.apiUrl.replace(/\/$/, '');
1168
+ const shaOf = (value) => /^[0-9a-f]{64}$/i.test(value) ? value.toLowerCase() : (/^cid:sha256:([0-9a-f]{64})$/i.exec(value)?.[1] ?? null);
1169
+ const result = await pull.pullVehicle({
1170
+ itemId, dir, packageVersion: opts.packageVersion, contentRating: opts.contentRating,
1171
+ onProgress: (m) => { if (!opts.json)
1172
+ console.log(`· ${m}`); },
1173
+ }, {
1174
+ readItem: (id) => getItem(api, id),
1175
+ readVersion: async (packageId, version) => {
1176
+ const tail = `packages/${packageId}/versions/${encodeURIComponent(version)}`;
1177
+ const unwrap = (body) => {
1178
+ const record = isRecord(body) ? body : {};
1179
+ const manifest = isRecord(record.manifest) ? record.manifest : record;
1180
+ return { ...(typeof record.manifestCid === 'string' ? { manifestCid: record.manifestCid } : {}), manifest };
1181
+ };
1182
+ try {
1183
+ return unwrap(await api.request('GET', `/api/v1/continuum/public/${tail}`));
1184
+ }
1185
+ catch (error) {
1186
+ // The public route serves a PUBLIC Package only; the authenticated one covers the creator's own and an admin.
1187
+ try {
1188
+ return unwrap(await api.request('GET', `/api/v1/continuum/${tail}`));
1189
+ }
1190
+ catch {
1191
+ throw error;
1192
+ }
1193
+ }
1194
+ },
1195
+ readObject: async (cidOrSha) => {
1196
+ const sha = shaOf(cidOrSha);
1197
+ if (!sha)
1198
+ throw new Error(`not a Continuum object reference: ${cidOrSha}`);
1199
+ return fetchPublicObject(apiUrl, sha);
1200
+ },
1201
+ });
1202
+ printVehicleJsonOr(opts.json, result, () => console.log(pull.formatVehiclePull(result)));
1203
+ }
1204
+ catch (error) {
1205
+ process.stderr.write(`${error instanceof lib_1.ApiError ? error.render() : `✖ ${error instanceof Error ? error.message : String(error)}`}\n`);
1206
+ process.exitCode = 1;
1207
+ }
1208
+ });
1148
1209
  vehicleAddOnCommand
1149
1210
  .command('publish')
1150
1211
  .description('Publish a vehicle add-on directory: the full `vehicle addon check` (drive effect measured), upload the model, seal a public addon '
@@ -3669,7 +3730,7 @@ assets
3669
3730
  });
3670
3731
  const assetsStart = assets
3671
3732
  .command('start')
3672
- .description('Start one generation job without waiting; prop/character use Dreamer, other supported kinds use the shared asset pipeline. For audio, --mode selects sound_effect (default), music, or text_to_speech.')
3733
+ .description('Start one generation job without waiting; prop/character use the Asset Generation job lane, other supported kinds use the standalone lane. For audio, --mode selects sound_effect (default), music, or text_to_speech.')
3673
3734
  .argument('<kind>', 'prop, character, image, material, audio, gaussian_splat, or animation (explicit unavailable stub)')
3674
3735
  // Optional at the parser level ON PURPOSE: text_to_speech takes its content from --text, and a
3675
3736
  // commander-level "missing required argument 'prompt'" would be actively misleading there.
@@ -3678,8 +3739,8 @@ const assetsStart = assets
3678
3739
  .option('--title <title>', 'asset title')
3679
3740
  .option('--additional-prompt <text>', 'additional generation guidance')
3680
3741
  .option('--target-polycount <n>', 'prop/character triangle target')
3681
- .option('--project-id <id>', 'Dreamer project id')
3682
- .option('--session-id <id>', 'Dreamer session id')
3742
+ .option('--project-id <id>', 'Dreamer project id (set only when Dreamer, the website agent, started the call)')
3743
+ .option('--session-id <id>', 'Dreamer session id (set only when Dreamer, the website agent, started the call)')
3683
3744
  .option('--loop', 'audio: request loopable output')
3684
3745
  .option('--duration-seconds <n>', 'audio duration')
3685
3746
  .option('--resolution <n>', 'material resolution: 1024 or 2048', '1024')
@@ -3887,7 +3948,7 @@ assets
3887
3948
  // does not continue anything. The job parks at `preview_ready` and waits for an explicit
3888
3949
  // `helix assets resume`, which nothing said, so a finished character sat there indefinitely.
3889
3950
  .description('Approve a job waiting at an approval gate. The concept gate continues on its own; the preview gate then waits for `helix assets resume`')
3890
- .argument('<job-id>', 'Dreamer job id')
3951
+ .argument('<job-id>', 'Asset Generation job id')
3891
3952
  .requiredOption('--gate <gate>', 'concept or preview')
3892
3953
  .option('--json', 'emit only the job JSON on stdout')
3893
3954
  .action(async (jobId, opts) => {
@@ -3917,7 +3978,7 @@ assets
3917
3978
  assets
3918
3979
  .command('revise')
3919
3980
  .description('Revise a job waiting at an approval gate, with new guidance. CHARGES a fresh regeneration — this is a spend, not a free retry. The only advance path when the server rejected its own concept.')
3920
- .argument('<job-id>', 'Dreamer job id')
3981
+ .argument('<job-id>', 'Asset Generation job id')
3921
3982
  .requiredOption('--gate <gate>', 'concept or preview')
3922
3983
  .option('--prompt <text>', 'what to change about the rejected output')
3923
3984
  .action(async (jobId, opts) => {
@@ -3937,7 +3998,7 @@ assets
3937
3998
  assets
3938
3999
  .command('retry')
3939
4000
  .description('Retry a FAILED job (no new guidance). Resumes from the stage that stopped — the mesh phase for a prop or character, the bundle/publish step for a material, image or texture')
3940
- .argument('<job-id>', 'Dreamer job id')
4001
+ .argument('<job-id>', 'Asset Generation job id')
3941
4002
  .action(async (jobId) => {
3942
4003
  const creds = requireAuth();
3943
4004
  try {
@@ -3952,7 +4013,7 @@ assets
3952
4013
  assets
3953
4014
  .command('abandon')
3954
4015
  .description('Explain how a stranded job releases its held LIX (no platform verb does this on demand)')
3955
- .argument('[job-id]', 'Dreamer job id')
4016
+ .argument('[job-id]', 'Asset Generation job id')
3956
4017
  .action(() => {
3957
4018
  // Calls NOTHING on purpose. POST /dreamer/jobs/:id/abandon was specified and built, then
3958
4019
  // withdrawn before deploying — releasing escrow is real money movement. Keeping a command that
@@ -3974,8 +4035,8 @@ assets
3974
4035
  assets
3975
4036
  .command('status')
3976
4037
  .description('Poll one generation job without starting or advancing a duplicate')
3977
- .argument('<job-id>', 'Dreamer job id')
3978
- .requiredOption('--pipeline <pipeline>', 'dreamer (prop/character) or asset')
4038
+ .argument('<job-id>', 'Asset Generation job id')
4039
+ .requiredOption('--pipeline <pipeline>', 'dreamer = prop/character job lane (legacy name), asset = standalone lane')
3979
4040
  .action(async (jobId, opts) => {
3980
4041
  if (!['dreamer', 'asset'].includes(opts.pipeline)) {
3981
4042
  fail('✖ --pipeline must be dreamer or asset');
@@ -4034,7 +4095,7 @@ assets
4034
4095
  });
4035
4096
  assets
4036
4097
  .command('generate')
4037
- .description('Generate and publish a new prop or character through Dreamer')
4098
+ .description('Generate and publish a new prop or character with Asset Generation')
4038
4099
  .argument('<kind>', 'prop or character')
4039
4100
  .argument('<prompt>', 'asset prompt')
4040
4101
  .option('--title <title>', 'asset title')
@@ -4110,8 +4171,8 @@ assets
4110
4171
  });
4111
4172
  assets
4112
4173
  .command('resume')
4113
- .description('Resume and publish an existing Dreamer asset job')
4114
- .argument('<job-id>', 'Dreamer job id')
4174
+ .description('Resume and publish an existing Asset Generation job')
4175
+ .argument('<job-id>', 'Asset Generation job id')
4115
4176
  .option('--visibility <visibility>', 'public, unlisted, or private (default: the visibility the job was generated with, else public)')
4116
4177
  .option('--timeout <ms>', 'how long to wait for the job to finish before giving up (client-side only — the job keeps running; default 1200000ms/20min)')
4117
4178
  .option('--poll-interval <ms>', 'how often to poll job status while waiting (default 2000ms)')
@@ -4143,12 +4204,12 @@ assets
4143
4204
  });
4144
4205
  assets
4145
4206
  .command('generate-image')
4146
- .description('Generate a standalone image through Dreamer')
4207
+ .description('Generate a standalone image with Asset Generation')
4147
4208
  .argument('<prompt>', 'image prompt')
4148
4209
  .option('--title <title>', 'asset title')
4149
4210
  .option('--additional-prompt <text>', 'additional generation guidance')
4150
- .option('--project-id <id>', 'Dreamer project id')
4151
- .option('--session-id <id>', 'Dreamer session id')
4211
+ .option('--project-id <id>', 'Dreamer project id (set only when Dreamer, the website agent, started the call)')
4212
+ .option('--session-id <id>', 'Dreamer session id (set only when Dreamer, the website agent, started the call)')
4152
4213
  .option('--visibility <public|private>', 'where the image lands in the Vault. Default: your account preference (public unless you opted out). ' +
4153
4214
  'Use `private` for the concept/reference sheet of a private avatar, so the sheet is not published.')
4154
4215
  .action(async (prompt, opts) => {
@@ -4180,8 +4241,8 @@ assets
4180
4241
  .argument('<prompt>', 'material prompt')
4181
4242
  .option('--title <title>', 'asset title')
4182
4243
  .option('--additional-prompt <text>', 'additional generation guidance')
4183
- .option('--project-id <id>', 'Dreamer project id')
4184
- .option('--session-id <id>', 'Dreamer session id')
4244
+ .option('--project-id <id>', 'Dreamer project id (set only when Dreamer, the website agent, started the call)')
4245
+ .option('--session-id <id>', 'Dreamer session id (set only when Dreamer, the website agent, started the call)')
4185
4246
  .option('--resolution <n>', 'map resolution: 1024 (web/mobile default) or 2048', '1024')
4186
4247
  .option('--repeat-per-meter <n>', 'physical texture scale expressed as tile repeats per metre')
4187
4248
  .action(async (prompt, opts) => {
@@ -4207,11 +4268,11 @@ assets
4207
4268
  });
4208
4269
  assets
4209
4270
  .command('generate-environment')
4210
- .description('Generate an experimental Gaussian-splat environment through Dreamer')
4271
+ .description('Generate an experimental Gaussian-splat environment with Asset Generation')
4211
4272
  .argument('<prompt>', 'generation prompt')
4212
4273
  .option('--additional-prompt <text>', 'additional generation guidance')
4213
- .option('--project-id <id>', 'Dreamer project id')
4214
- .option('--session-id <id>', 'Dreamer session id')
4274
+ .option('--project-id <id>', 'Dreamer project id (set only when Dreamer, the website agent, started the call)')
4275
+ .option('--session-id <id>', 'Dreamer session id (set only when Dreamer, the website agent, started the call)')
4215
4276
  .option('--title <title>', 'asset title')
4216
4277
  .option('--splat-scope <scope>', 'object or environment', 'environment')
4217
4278
  .action(async (prompt, opts) => {