@bitmagic/cli 0.1.64-dev.0 → 0.1.64-dev.10
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 +80 -5
- package/assets/blender-level/README.md +25 -0
- package/assets/blender-level/audit.py +232 -0
- package/assets/blender-level/bmlevel/__init__.py +294 -0
- package/assets/blender-level/bmlevel/core.py +438 -0
- package/assets/blender-level/bmlevel/scene_bpy.py +186 -0
- package/assets/blender-level/bmlevel/scene_null.py +44 -0
- package/assets/blender-level/example_level.py +80 -0
- package/assets/blender-level/find_blender.py +62 -0
- package/assets/blender-level/review.py +117 -0
- package/assets/blender-level/sync_world.py +85 -0
- package/assets/blender-level/tests/test_core.py +189 -0
- package/dist/assets/keep-glb.d.ts +20 -0
- package/dist/assets/keep-glb.js +45 -0
- package/dist/assets/keep-glb.js.map +1 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/assets.d.ts +3 -0
- package/dist/commands/assets.js +33 -3
- package/dist/commands/assets.js.map +1 -1
- package/dist/commands/cover.js +7 -1
- package/dist/commands/cover.js.map +1 -1
- package/dist/commands/forge.js +70 -11
- package/dist/commands/forge.js.map +1 -1
- package/dist/commands/generate.d.ts +93 -0
- package/dist/commands/generate.js +491 -18
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.js +33 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/judge.d.ts +0 -11
- package/dist/commands/judge.js +15 -2
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/levels.d.ts +1 -1
- package/dist/commands/levels.js +14 -3
- package/dist/commands/levels.js.map +1 -1
- package/dist/commands/reference.js +5 -1
- package/dist/commands/reference.js.map +1 -1
- package/dist/commands/reset-account.js +2 -11
- package/dist/commands/reset-account.js.map +1 -1
- package/dist/commands/tools.d.ts +1 -0
- package/dist/commands/tools.js +73 -0
- package/dist/commands/tools.js.map +1 -0
- package/dist/commands/trailer.js +18 -4
- package/dist/commands/trailer.js.map +1 -1
- package/dist/editor/asset-detail-panel.d.ts +8 -3
- package/dist/editor/asset-detail-panel.js +11 -1
- package/dist/editor/asset-detail-panel.js.map +1 -1
- package/dist/editor/hud-replay-page.js +317 -22
- package/dist/editor/hud-replay-page.js.map +1 -1
- package/dist/editor/shell-page.js +117 -7
- package/dist/editor/shell-page.js.map +1 -1
- package/dist/forge/apply-modifications.js +70 -2
- package/dist/forge/apply-modifications.js.map +1 -1
- package/dist/forge/progress.d.ts +10 -0
- package/dist/forge/progress.js +7 -6
- package/dist/forge/progress.js.map +1 -1
- package/dist/forge/run-pipeline.d.ts +8 -0
- package/dist/forge/run-pipeline.js +37 -2
- package/dist/forge/run-pipeline.js.map +1 -1
- package/dist/forge/stream.d.ts +7 -1
- package/dist/forge/stream.js +5 -2
- package/dist/forge/stream.js.map +1 -1
- package/dist/forge/two-d-gate.d.ts +72 -0
- package/dist/forge/two-d-gate.js +198 -0
- package/dist/forge/two-d-gate.js.map +1 -0
- package/dist/generate/animation-from-video.d.ts +11 -3
- package/dist/generate/animation-from-video.js +12 -2
- package/dist/generate/animation-from-video.js.map +1 -1
- package/dist/generate/model.d.ts +11 -0
- package/dist/generate/model.js +41 -1
- package/dist/generate/model.js.map +1 -1
- package/dist/generate/prop.d.ts +9 -0
- package/dist/generate/prop.js +59 -9
- package/dist/generate/prop.js.map +1 -1
- package/dist/generate/video-review.d.ts +28 -0
- package/dist/generate/video-review.js +120 -0
- package/dist/generate/video-review.js.map +1 -0
- package/dist/generate/video.d.ts +52 -0
- package/dist/generate/video.js +177 -0
- package/dist/generate/video.js.map +1 -0
- package/dist/project/art-style.d.ts +34 -0
- package/dist/project/art-style.js +63 -0
- package/dist/project/art-style.js.map +1 -0
- package/dist/project/jobs.d.ts +1 -1
- package/dist/project/jobs.js.map +1 -1
- package/dist/prompt.d.ts +9 -0
- package/dist/prompt.js +36 -0
- package/dist/prompt.js.map +1 -0
- package/dist/publish/bundle.d.ts +12 -0
- package/dist/publish/bundle.js +32 -0
- package/dist/publish/bundle.js.map +1 -1
- package/dist/render/qr-png.d.ts +6 -3
- package/dist/render/qr-png.js +8 -8
- package/dist/render/qr-png.js.map +1 -1
- package/dist/scaffold/blender-level-skill-files.d.ts +26 -0
- package/dist/scaffold/blender-level-skill-files.js +570 -0
- package/dist/scaffold/blender-level-skill-files.js.map +1 -0
- package/dist/scaffold/claude-settings.js +2 -0
- package/dist/scaffold/claude-settings.js.map +1 -1
- package/dist/scaffold/project-files.d.ts +2 -1
- package/dist/scaffold/project-files.js +135 -43
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/scaffold/project.d.ts +9 -0
- package/dist/scaffold/project.js +29 -3
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scaffold/reference-guidance.d.ts +1 -1
- package/dist/scaffold/reference-guidance.js +2 -1
- package/dist/scaffold/reference-guidance.js.map +1 -1
- package/dist/scaffold/skill-files.js +3 -1
- package/dist/scaffold/skill-files.js.map +1 -1
- package/dist/scaffold/unity-skill-files.js +1 -2
- package/dist/scaffold/unity-skill-files.js.map +1 -1
- package/dist/tools/bundles.d.ts +21 -0
- package/dist/tools/bundles.js +67 -0
- package/dist/tools/bundles.js.map +1 -0
- package/dist/trailer/ffmpeg.d.ts +10 -0
- package/dist/trailer/ffmpeg.js +51 -6
- package/dist/trailer/ffmpeg.js.map +1 -1
- package/dist/trailer/hud-raster.d.ts +12 -12
- package/dist/trailer/hud-raster.js +85 -32
- package/dist/trailer/hud-raster.js.map +1 -1
- package/dist/trailer/hud-state.d.ts +75 -4
- package/dist/trailer/hud-state.js +132 -17
- package/dist/trailer/hud-state.js.map +1 -1
- package/dist/trailer/io.d.ts +2 -0
- package/dist/trailer/io.js +6 -1
- package/dist/trailer/io.js.map +1 -1
- package/dist/trailer/link.d.ts +1 -0
- package/dist/trailer/link.js +15 -0
- package/dist/trailer/link.js.map +1 -0
- package/dist/trailer/make.d.ts +2 -0
- package/dist/trailer/make.js +1 -0
- package/dist/trailer/make.js.map +1 -1
- package/dist/trailer/merge.js +32 -11
- package/dist/trailer/merge.js.map +1 -1
- package/dist/trailer/music-beats.js +4 -39
- package/dist/trailer/music-beats.js.map +1 -1
- package/dist/trailer/render.d.ts +2 -0
- package/dist/trailer/render.js +94 -48
- package/dist/trailer/render.js.map +1 -1
- package/dist/trailer/timeline-types.d.ts +19 -0
- package/dist/trailer/timeline-types.js +42 -2
- package/dist/trailer/timeline-types.js.map +1 -1
- package/dist/trailer/title-raster.js +2 -1
- package/dist/trailer/title-raster.js.map +1 -1
- package/dist/trailer/titles.js +6 -1
- package/dist/trailer/titles.js.map +1 -1
- package/dist/trailer/video-chain.d.ts +96 -8
- package/dist/trailer/video-chain.js +183 -0
- package/dist/trailer/video-chain.js.map +1 -1
- package/dist/verify/browser.js +4 -1
- package/dist/verify/browser.js.map +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,9 @@ import { type PropVoxelizeResult } from '../generate/prop.js';
|
|
|
4
4
|
import { type VehicleInstallResult } from '../generate/vehicle.js';
|
|
5
5
|
import { type GenerateModelResult } from '../generate/model.js';
|
|
6
6
|
import { type AnimationFromVideoRun } from '../generate/animation-from-video.js';
|
|
7
|
+
import { type VideoRun } from '../generate/video.js';
|
|
7
8
|
import type { VoxelizeGlb } from '../assets/voxelize-glb.js';
|
|
9
|
+
import type { KeepGlb } from '../assets/keep-glb.js';
|
|
8
10
|
export interface SkyboxArgs {
|
|
9
11
|
description: string;
|
|
10
12
|
referenceImageUrl?: string;
|
|
@@ -60,6 +62,10 @@ export interface CharacterArgs {
|
|
|
60
62
|
headScale?: string;
|
|
61
63
|
/** citty's negative boolean: `--no-library` arrives as `false`; the flag has no positive form. */
|
|
62
64
|
library?: boolean;
|
|
65
|
+
/** Absent = the generator's default (true); the command fills it from the project's art style. */
|
|
66
|
+
voxelize?: boolean;
|
|
67
|
+
/** Asset Forger image-to-mesh model; absent = the Forger default. */
|
|
68
|
+
meshModel?: string;
|
|
63
69
|
}
|
|
64
70
|
export declare function buildCharacterBody(args: CharacterArgs): Record<string, unknown>;
|
|
65
71
|
export interface AnimationArgs {
|
|
@@ -101,7 +107,32 @@ export interface AnimationVideoArgs {
|
|
|
101
107
|
/** Any of the authored-spec flags, to refuse the two forms being mixed. */
|
|
102
108
|
spec?: string;
|
|
103
109
|
family?: string;
|
|
110
|
+
/** The prompt lane, to refuse a clip and a description being given at once. */
|
|
111
|
+
videoPrompt?: string;
|
|
104
112
|
}
|
|
113
|
+
export interface AnimationPromptArgs extends Omit<AnimationVideoArgs, 'video'> {
|
|
114
|
+
videoPrompt: string;
|
|
115
|
+
videoDuration?: number;
|
|
116
|
+
video?: string;
|
|
117
|
+
}
|
|
118
|
+
/** A `--video-prompt` run: everything `--video` carries, plus the clip to generate first. */
|
|
119
|
+
export interface AnimationFromPromptRun {
|
|
120
|
+
/** What the source clip should show, in the creator's words. */
|
|
121
|
+
description: string;
|
|
122
|
+
/** Source clip length in seconds; billed per second by the video leg. */
|
|
123
|
+
durationSeconds: number;
|
|
124
|
+
run: AnimationFromVideoRun;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* `--video-prompt` is `--video` with the clip generated instead of filmed, so it
|
|
128
|
+
* shares every downstream flag and refuses the same combinations. The extra
|
|
129
|
+
* refusal is the duration floor: `generate video` will happily make a 1 s clip,
|
|
130
|
+
* and Uthana will then reject it, which would bill the creator for footage that
|
|
131
|
+
* never had a chance.
|
|
132
|
+
*/
|
|
133
|
+
export declare function buildAnimationFromPromptRun(args: AnimationPromptArgs): AnimationFromPromptRun;
|
|
134
|
+
/** `--video` takes either a local file or an already-public clip URL. */
|
|
135
|
+
export declare function isHttpUrl(value: string): boolean;
|
|
105
136
|
/**
|
|
106
137
|
* `--video` is a different generator from the authored spec: the clip comes from a person, not
|
|
107
138
|
* a parameter file, so the two flag sets cannot be combined and the spec flags are refused here
|
|
@@ -111,6 +142,14 @@ export declare function buildAnimationVideoRun(args: AnimationVideoArgs): Animat
|
|
|
111
142
|
export interface GenerateRunDeps extends CommandRunDeps {
|
|
112
143
|
/** Test-only override for the headless bake, so the lane runs without Chrome. */
|
|
113
144
|
voxelize?: VoxelizeGlb;
|
|
145
|
+
/** Whether a person is at the keyboard; injected so the clip-review gate is testable. */
|
|
146
|
+
interactive?: () => boolean;
|
|
147
|
+
/** Reads one line of confirmation. Injected for the same reason. */
|
|
148
|
+
ask?: (question: string) => Promise<string>;
|
|
149
|
+
/** Draws the contact sheet in the terminal when it can. Returns whether it drew. */
|
|
150
|
+
renderImage?: (bytes: Buffer) => boolean;
|
|
151
|
+
/** Injected in tests so the kept-mesh lane (`--keep-glb` / low-poly projects) runs without a network. */
|
|
152
|
+
keepGlbUpload?: KeepGlb;
|
|
114
153
|
}
|
|
115
154
|
/**
|
|
116
155
|
* Runs one `bitmagic generate <subcommand>`: requests the asset, then applies the returned
|
|
@@ -221,6 +260,9 @@ export declare function runPropGeneration(options: {
|
|
|
221
260
|
voxelGrid?: number;
|
|
222
261
|
/** `--no-materials`: leave the asset matte rather than classifying it after the bake. */
|
|
223
262
|
materials?: boolean;
|
|
263
|
+
/** `--keep-glb` / `--voxelize`; absent follows game.json artStyle. */
|
|
264
|
+
keepGlb?: boolean;
|
|
265
|
+
voxelize?: boolean;
|
|
224
266
|
json: boolean;
|
|
225
267
|
deps?: GenerateRunDeps;
|
|
226
268
|
}): Promise<PropVoxelizeResult>;
|
|
@@ -270,6 +312,9 @@ export declare function runModelGeneration(options: {
|
|
|
270
312
|
voxelGrid?: number;
|
|
271
313
|
/** `--no-materials`: leave the asset matte rather than classifying it after the bake. */
|
|
272
314
|
materials?: boolean;
|
|
315
|
+
/** `--keep-glb` / `--voxelize`; absent follows game.json artStyle. */
|
|
316
|
+
keepGlb?: boolean;
|
|
317
|
+
voxelize?: boolean;
|
|
273
318
|
json: boolean;
|
|
274
319
|
deps?: GenerateRunDeps;
|
|
275
320
|
}): Promise<GenerateModelResult>;
|
|
@@ -279,4 +324,52 @@ export declare function runModelGeneration(options: {
|
|
|
279
324
|
* job record, so the dev view shows it beside every other generation.
|
|
280
325
|
*/
|
|
281
326
|
export declare function runAnimationFromVideo(run: AnimationFromVideoRun, json: boolean, deps?: GenerateRunDeps): Promise<void>;
|
|
327
|
+
/**
|
|
328
|
+
* Look at the generated clip before the capture leg spends on it.
|
|
329
|
+
*
|
|
330
|
+
* The clip costs a few sparks and the Uthana leg costs fifteen more, so the expensive half is the
|
|
331
|
+
* one worth gating. What decides "is this usable" is visible in stills — is it one person, are they
|
|
332
|
+
* whole and centred, did the model cut to a close-up halfway — so the contact sheet
|
|
333
|
+
* `generate video` already writes is enough to judge it, and the clip is a real asset by now, so a
|
|
334
|
+
* creator who wants to watch it move can do that in the dev view while this waits.
|
|
335
|
+
*
|
|
336
|
+
* Returns whether to go on. Everything except the question is best-effort: a missing ffmpeg or a
|
|
337
|
+
* failed download costs a note, never the generation that has already been paid for.
|
|
338
|
+
*/
|
|
339
|
+
export declare function confirmSourceClip(options: {
|
|
340
|
+
root: string;
|
|
341
|
+
assetId: string;
|
|
342
|
+
videoUrl: string;
|
|
343
|
+
durationSeconds: number;
|
|
344
|
+
/** `--yes`, or any lane with nobody to ask. Skips the question, never the frames. */
|
|
345
|
+
skipPrompt: boolean;
|
|
346
|
+
/** `--no-contact-sheet`: skip the download and the frames, keep the question. */
|
|
347
|
+
contactSheet: boolean;
|
|
348
|
+
deps: GenerateRunDeps;
|
|
349
|
+
}): Promise<boolean>;
|
|
350
|
+
/**
|
|
351
|
+
* The `--video-prompt` lane: text -> clip -> motion, the two existing job lanes run back to back.
|
|
352
|
+
*
|
|
353
|
+
* There is no chained endpoint behind this — asset-forger has one route that makes a video and
|
|
354
|
+
* another that reads one, and this is the seam between them. Both legs bill under their own
|
|
355
|
+
* existing key (`generate-video` per second, `generate-animation-from-video` flat), the way
|
|
356
|
+
* design-vehicle prices its chained image sub-generations rather than minting a composite.
|
|
357
|
+
*
|
|
358
|
+
* Both asset rows are kept. The clip is a real `type: 'video'` asset the creator can play back
|
|
359
|
+
* or reuse as a cutscene, and keeping it is also what makes a leg-2 failure recoverable: the
|
|
360
|
+
* footage is already paid for, so the error hands back a `--video <url>` retry instead of asking
|
|
361
|
+
* for the whole thing again.
|
|
362
|
+
*/
|
|
363
|
+
export declare function runAnimationFromPrompt(prompt: AnimationFromPromptRun, json: boolean, deps?: GenerateRunDeps, creatorPrompt?: string, options?: {
|
|
364
|
+
yes?: boolean;
|
|
365
|
+
contactSheet?: boolean;
|
|
366
|
+
}): Promise<void>;
|
|
367
|
+
/**
|
|
368
|
+
* Job-shaped rather than streamed (see generate/video.ts), so it cannot share `runAssetGeneration`;
|
|
369
|
+
* it does share the job record, so the dev view shows it beside every other generation.
|
|
370
|
+
*/
|
|
371
|
+
export declare function runVideoGeneration(run: VideoRun, json: boolean, options?: {
|
|
372
|
+
deps?: GenerateRunDeps;
|
|
373
|
+
contactSheet?: boolean;
|
|
374
|
+
}): Promise<void>;
|
|
282
375
|
export declare const generateCommand: import("citty").CommandDef<import("citty").ArgsDef>;
|