@bitmagic/asset-core 0.2.7-dev.7 → 0.2.7-dev.9

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.
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ import type { AssetResultBase, GenerateDeps } from '../types.js';
3
+ /**
4
+ * A 3D prop as VOXELS, from a prompt — with no mesh in between.
5
+ *
6
+ * The sibling of `prop.ts`, and the same shape: it returns no world.json patches, because a
7
+ * generated thing is only half an asset until the engine has baked it, and baking happens in a
8
+ * browser on the caller's side of the seam. What differs is what the Forger is asked for.
9
+ *
10
+ * `prop.ts` asks for a GLB. For a voxel asset that mesh is discarded work: TRELLIS.2 is already a
11
+ * sparse voxel generator internally, and the polygon mesh is produced afterwards by a decimation,
12
+ * remesh and PBR bake that a voxelizer immediately throws away. `/ai/v1/forge-voxels` taps the
13
+ * voxel field directly, so what comes back is a sub-megabyte HFVX master rather than a 50-100 MB
14
+ * textured mesh. Measured on staging: 219 KB and ~8.5s warm, against minutes and megabytes.
15
+ *
16
+ * The host bakes the master with `CREATE_ASSET_FROM_VXL_MASTER` instead of
17
+ * `CREATE_ASSET_FROM_GLB_URL`; both are answered on the same reply channel, so only the request
18
+ * differs. `game-play-agent/src/mastra/utils/hq-asset-jobs.ts` already picks between those two
19
+ * shapes — the web lane's HQ job takes this same fork when a local forge produced a master.
20
+ *
21
+ * Billable on acceptance, exactly as `prop.ts` is: the vendor charges for the job it ran, whatever
22
+ * it answered with.
23
+ */
24
+ /**
25
+ * Grids the master packer accepts, and why this is an allowlist rather than a positive integer.
26
+ *
27
+ * The packer maps native coordinates into the target grid by integer division, so a grid that does
28
+ * not divide the native resolution pushes the top coordinate past the grid — and reports that as
29
+ * "axis mapping is wrong", which sends the reader hunting somewhere nothing is wrong. asset-forger
30
+ * validates this too; validating here as well keeps a bad request from costing a GPU minute.
31
+ *
32
+ * 0 means "keep TRELLIS's own resolution" — the master every later re-voxelization downsamples
33
+ * from, rather than a working asset.
34
+ */
35
+ export declare const propVoxelGrids: readonly [0, 32, 64, 128, 256, 512];
36
+ export declare const propVoxelParamsSchema: z.ZodObject<{
37
+ prompt: z.ZodString;
38
+ /**
39
+ * 128 matches what the web lane has always produced voxel assets at. A project should not get a
40
+ * different-looking asset depending on which lane asked for it.
41
+ */
42
+ grid: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<32>, z.ZodLiteral<64>, z.ZodLiteral<128>, z.ZodLiteral<256>, z.ZodLiteral<512>]>>>;
43
+ }, "strict", z.ZodTypeAny, {
44
+ prompt: string;
45
+ grid: 0 | 64 | 32 | 512 | 128 | 256;
46
+ }, {
47
+ prompt: string;
48
+ grid?: 0 | 64 | 32 | 512 | 128 | 256 | undefined;
49
+ }>;
50
+ export type PropVoxelParams = z.input<typeof propVoxelParamsSchema>;
51
+ export type PropVoxelResult = AssetResultBase & {
52
+ /** Where the HFVX voxel master landed. The host bakes this into a `.vxl`. */
53
+ masterUrl?: string;
54
+ /** TRELLIS's own resolution, which the master was downsampled from. */
55
+ resolution?: number;
56
+ voxelCount?: number;
57
+ billable?: boolean;
58
+ };
59
+ export declare function generatePropVoxels(params: PropVoxelParams, deps: GenerateDeps): Promise<PropVoxelResult>;
60
+ //# sourceMappingURL=prop-voxel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-voxel.d.ts","sourceRoot":"","sources":["../../src/generators/prop-voxel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIjE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;IAIhC;;;OAGG;;;;;;;;EAKM,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG;IAC9C,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAiBF,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,eAAe,CAAC,CAoD1B"}
@@ -0,0 +1,97 @@
1
+ import { z } from 'zod';
2
+ import { fail, ok } from '../result.js';
3
+ import { formatZodIssues } from '../validation.js';
4
+ /**
5
+ * A 3D prop as VOXELS, from a prompt — with no mesh in between.
6
+ *
7
+ * The sibling of `prop.ts`, and the same shape: it returns no world.json patches, because a
8
+ * generated thing is only half an asset until the engine has baked it, and baking happens in a
9
+ * browser on the caller's side of the seam. What differs is what the Forger is asked for.
10
+ *
11
+ * `prop.ts` asks for a GLB. For a voxel asset that mesh is discarded work: TRELLIS.2 is already a
12
+ * sparse voxel generator internally, and the polygon mesh is produced afterwards by a decimation,
13
+ * remesh and PBR bake that a voxelizer immediately throws away. `/ai/v1/forge-voxels` taps the
14
+ * voxel field directly, so what comes back is a sub-megabyte HFVX master rather than a 50-100 MB
15
+ * textured mesh. Measured on staging: 219 KB and ~8.5s warm, against minutes and megabytes.
16
+ *
17
+ * The host bakes the master with `CREATE_ASSET_FROM_VXL_MASTER` instead of
18
+ * `CREATE_ASSET_FROM_GLB_URL`; both are answered on the same reply channel, so only the request
19
+ * differs. `game-play-agent/src/mastra/utils/hq-asset-jobs.ts` already picks between those two
20
+ * shapes — the web lane's HQ job takes this same fork when a local forge produced a master.
21
+ *
22
+ * Billable on acceptance, exactly as `prop.ts` is: the vendor charges for the job it ran, whatever
23
+ * it answered with.
24
+ */
25
+ /**
26
+ * Grids the master packer accepts, and why this is an allowlist rather than a positive integer.
27
+ *
28
+ * The packer maps native coordinates into the target grid by integer division, so a grid that does
29
+ * not divide the native resolution pushes the top coordinate past the grid — and reports that as
30
+ * "axis mapping is wrong", which sends the reader hunting somewhere nothing is wrong. asset-forger
31
+ * validates this too; validating here as well keeps a bad request from costing a GPU minute.
32
+ *
33
+ * 0 means "keep TRELLIS's own resolution" — the master every later re-voxelization downsamples
34
+ * from, rather than a working asset.
35
+ */
36
+ export const propVoxelGrids = [0, 32, 64, 128, 256, 512];
37
+ export const propVoxelParamsSchema = z.object({
38
+ prompt: z.string()
39
+ .min(1)
40
+ .describe('What the object should be (e.g. "a weathered stone archway covered in moss")'),
41
+ /**
42
+ * 128 matches what the web lane has always produced voxel assets at. A project should not get a
43
+ * different-looking asset depending on which lane asked for it.
44
+ */
45
+ grid: z.union([
46
+ z.literal(0), z.literal(32), z.literal(64),
47
+ z.literal(128), z.literal(256), z.literal(512),
48
+ ]).optional().default(128),
49
+ }).strict();
50
+ /**
51
+ * The async job route, not the synchronous one. A cold GPU container compiles CUDA kernels and
52
+ * loads a 4B model before it can generate, so a first request runs to minutes — well past what a
53
+ * single HTTP request should hold open.
54
+ */
55
+ const ENDPOINT = '/ai/v1/forge-voxels/jobs';
56
+ export async function generatePropVoxels(params, deps) {
57
+ const { forger, logger, onProgress } = deps;
58
+ const parsed = propVoxelParamsSchema.safeParse(params);
59
+ if (!parsed.success) {
60
+ logger.warn({ err: parsed.error }, '[prop-voxel] Invalid parameters');
61
+ return fail(formatZodIssues(parsed.error));
62
+ }
63
+ const input = parsed.data;
64
+ if (!forger.hasCredentials()) {
65
+ logger.error('[prop-voxel] Missing Asset Forger credentials');
66
+ return fail(forger.getMissingCredentialsMessage());
67
+ }
68
+ onProgress(`Generating voxels for: ${input.prompt}`);
69
+ logger.info(`[prop-voxel] Starting forge-voxels for "${input.prompt}" at grid ${input.grid}`);
70
+ let response;
71
+ try {
72
+ response = await forger.postJobAndWait(ENDPOINT, { prompt: input.prompt, grid: input.grid }, 'prop-voxel');
73
+ }
74
+ catch (error) {
75
+ const message = error instanceof Error ? error.message : 'Unknown error occurred';
76
+ logger.error({ err: error }, '[prop-voxel] Error during generation');
77
+ return fail(message);
78
+ }
79
+ const masterUrl = response.data?.masterUrl;
80
+ if (!masterUrl) {
81
+ // Billable: the Forger accepted and ran the job, and was paid for it, whatever it answered.
82
+ return { ...fail('Asset Forger returned no master URL for the generated voxels'), billable: true };
83
+ }
84
+ const { resolution, voxelCount } = response.data ?? {};
85
+ logger.info(`[prop-voxel] Generated ${masterUrl} (${voxelCount ?? '?'} voxels)`);
86
+ return ok(`Voxels generated: ${masterUrl}`,
87
+ // Deliberately empty — see the file header. The asset does not exist until the host has baked
88
+ // this master, and writing a half-made entry would leave world.json describing an asset the
89
+ // engine cannot load.
90
+ [], {
91
+ masterUrl,
92
+ ...(resolution === undefined ? {} : { resolution }),
93
+ ...(voxelCount === undefined ? {} : { voxelCount }),
94
+ billable: true,
95
+ });
96
+ }
97
+ //# sourceMappingURL=prop-voxel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-voxel.js","sourceRoot":"","sources":["../../src/generators/prop-voxel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAElE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;SACf,GAAG,CAAC,CAAC,CAAC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S,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;QACnD,QAAQ,EAAE,IAAI;KACf,CACF,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export { generateCharacter, characterParamsSchema } from './generators/character
13
13
  export type { CharacterParams, CharacterResult } from './generators/character.js';
14
14
  export { generateProp, propParamsSchema } from './generators/prop.js';
15
15
  export type { PropParams, PropResult } from './generators/prop.js';
16
+ export { generatePropVoxels, propVoxelParamsSchema, propVoxelGrids } from './generators/prop-voxel.js';
17
+ export type { PropVoxelParams, PropVoxelResult } from './generators/prop-voxel.js';
16
18
  export { generateAnimationAsset, animationParamsSchema, getConfiguredAnimationModel, ANIMATION_MODEL_TEXT_TO_MOTION_3, ANIMATION_MODEL_TEXT_TO_MOTION_2, ANIMATION_MODEL_OLDER, } from './generators/animation.js';
17
19
  export type { AnimationParams, AnimationResult } from './generators/animation.js';
18
20
  export { fetchContentLength } from './http.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,UAAU,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,uBA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EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACvG,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAM1D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ export { generateSoundEffect, soundEffectParamsSchema } from './generators/sound
6
6
  export { generateImageAsset, imageAssetParamsSchema } from './generators/image.js';
7
7
  export { generateCharacter, characterParamsSchema } from './generators/character.js';
8
8
  export { generateProp, propParamsSchema } from './generators/prop.js';
9
+ export { generatePropVoxels, propVoxelParamsSchema, propVoxelGrids } from './generators/prop-voxel.js';
9
10
  export { generateAnimationAsset, animationParamsSchema, getConfiguredAnimationModel, ANIMATION_MODEL_TEXT_TO_MOTION_3, ANIMATION_MODEL_TEXT_TO_MOTION_2, ANIMATION_MODEL_OLDER, } from './generators/animation.js';
10
11
  export { fetchContentLength } from './http.js';
11
12
  export { PIXAR_VOXEL_STYLE, MAX_COVER_DESIGN_CHARS, buildCoverArtPrompt } from './cover-prompt.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EACL,iBAA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,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAG3B,oEAAoE;AACpE,gFAAgF;AAChF,gFAAgF;AAChF,oEAAoE;AACpE,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/asset-core",
3
- "version": "0.2.7-dev.7",
3
+ "version": "0.2.7-dev.9",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "author": "Bitmagic Oy",
6
6
  "type": "module",