@meshy-ai/cli 0.4.6 → 0.6.0
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 +7 -6
- package/dist/client/endpoints/balance.d.ts +4 -3
- package/dist/client/endpoints/balance.d.ts.map +1 -1
- package/dist/client/endpoints/balance.js +10 -12
- package/dist/client/endpoints/balance.js.map +1 -1
- package/dist/client/endpoints/base.d.ts +0 -2
- package/dist/client/endpoints/base.d.ts.map +1 -1
- package/dist/client/endpoints/base.js.map +1 -1
- package/dist/client/index.d.ts +0 -6
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -22
- package/dist/client/index.js.map +1 -1
- package/dist/client/resource-registry.d.ts +2 -9
- package/dist/client/resource-registry.d.ts.map +1 -1
- package/dist/client/resource-registry.js +5 -14
- package/dist/client/resource-registry.js.map +1 -1
- package/dist/client/transport.d.ts +1 -1
- package/dist/client/transport.d.ts.map +1 -1
- package/dist/client/types.d.ts +4 -26
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js +4 -31
- package/dist/client/types.js.map +1 -1
- package/dist/cmd/animation-catalog.js +4 -4
- package/dist/cmd/animation-catalog.js.map +1 -1
- package/dist/cmd/api.d.ts.map +1 -1
- package/dist/cmd/api.js +5 -5
- package/dist/cmd/api.js.map +1 -1
- package/dist/cmd/auth.d.ts.map +1 -1
- package/dist/cmd/auth.js +41 -25
- package/dist/cmd/auth.js.map +1 -1
- package/dist/cmd/auto-split.d.ts.map +1 -1
- package/dist/cmd/auto-split.js +0 -1
- package/dist/cmd/auto-split.js.map +1 -1
- package/dist/cmd/balance.d.ts.map +1 -1
- package/dist/cmd/balance.js +6 -6
- package/dist/cmd/balance.js.map +1 -1
- package/dist/cmd/creative-lab.d.ts +0 -2
- package/dist/cmd/creative-lab.d.ts.map +1 -1
- package/dist/cmd/creative-lab.js +0 -7
- package/dist/cmd/creative-lab.js.map +1 -1
- package/dist/cmd/delete.d.ts.map +1 -1
- package/dist/cmd/delete.js +4 -4
- package/dist/cmd/delete.js.map +1 -1
- package/dist/cmd/doctor.js +4 -4
- package/dist/cmd/doctor.js.map +1 -1
- package/dist/cmd/download.d.ts +1 -1
- package/dist/cmd/download.js +9 -9
- package/dist/cmd/download.js.map +1 -1
- package/dist/cmd/image-to-3d.d.ts +3 -3
- package/dist/cmd/image-to-3d.d.ts.map +1 -1
- package/dist/cmd/image-to-3d.js +16 -45
- package/dist/cmd/image-to-3d.js.map +1 -1
- package/dist/cmd/image-to-image.d.ts.map +1 -1
- package/dist/cmd/image-to-image.js +2 -1
- package/dist/cmd/image-to-image.js.map +1 -1
- package/dist/cmd/inspect.d.ts +12 -4
- package/dist/cmd/inspect.d.ts.map +1 -1
- package/dist/cmd/inspect.js +63 -39
- package/dist/cmd/inspect.js.map +1 -1
- package/dist/cmd/make.d.ts.map +1 -1
- package/dist/cmd/make.js +51 -112
- package/dist/cmd/make.js.map +1 -1
- package/dist/cmd/mesh.d.ts +3 -3
- package/dist/cmd/mesh.js +5 -5
- package/dist/cmd/mesh.js.map +1 -1
- package/dist/cmd/multi-image-to-3d.d.ts +2 -3
- package/dist/cmd/multi-image-to-3d.d.ts.map +1 -1
- package/dist/cmd/multi-image-to-3d.js +10 -28
- package/dist/cmd/multi-image-to-3d.js.map +1 -1
- package/dist/cmd/operations.js +6 -6
- package/dist/cmd/operations.js.map +1 -1
- package/dist/cmd/project.d.ts.map +1 -1
- package/dist/cmd/project.js +11 -13
- package/dist/cmd/project.js.map +1 -1
- package/dist/cmd/resources.d.ts +4 -4
- package/dist/cmd/resources.d.ts.map +1 -1
- package/dist/cmd/resources.js +6 -15
- package/dist/cmd/resources.js.map +1 -1
- package/dist/cmd/retexture.d.ts +2 -2
- package/dist/cmd/retexture.js +2 -2
- package/dist/cmd/showcases.d.ts.map +1 -1
- package/dist/cmd/showcases.js +4 -4
- package/dist/cmd/showcases.js.map +1 -1
- package/dist/cmd/slicer.js +4 -4
- package/dist/cmd/slicer.js.map +1 -1
- package/dist/cmd/text-to-3d.d.ts +1 -1
- package/dist/cmd/text-to-3d.js +1 -1
- package/dist/cmd/text-to-image.d.ts.map +1 -1
- package/dist/cmd/text-to-image.js +3 -2
- package/dist/cmd/text-to-image.js.map +1 -1
- package/dist/cmd/usage.js +4 -4
- package/dist/cmd/usage.js.map +1 -1
- package/dist/cmd/uv-unwrap.d.ts +0 -1
- package/dist/cmd/uv-unwrap.d.ts.map +1 -1
- package/dist/cmd/uv-unwrap.js +0 -2
- package/dist/cmd/uv-unwrap.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -53
- package/dist/index.js.map +1 -1
- package/dist/internal/artifacts.d.ts +18 -9
- package/dist/internal/artifacts.d.ts.map +1 -1
- package/dist/internal/artifacts.js +56 -30
- package/dist/internal/artifacts.js.map +1 -1
- package/dist/internal/command-helpers.d.ts +9 -16
- package/dist/internal/command-helpers.d.ts.map +1 -1
- package/dist/internal/command-helpers.js +14 -31
- package/dist/internal/command-helpers.js.map +1 -1
- package/dist/internal/config.d.ts +3 -3
- package/dist/internal/config.js +3 -3
- package/dist/internal/context.d.ts +3 -5
- package/dist/internal/context.d.ts.map +1 -1
- package/dist/internal/context.js +3 -3
- package/dist/internal/context.js.map +1 -1
- package/dist/internal/doctor.d.ts +0 -2
- package/dist/internal/doctor.d.ts.map +1 -1
- package/dist/internal/doctor.js +0 -4
- package/dist/internal/doctor.js.map +1 -1
- package/dist/internal/download.d.ts +34 -50
- package/dist/internal/download.d.ts.map +1 -1
- package/dist/internal/download.js +83 -331
- package/dist/internal/download.js.map +1 -1
- package/dist/internal/errors.d.ts +2 -20
- package/dist/internal/errors.d.ts.map +1 -1
- package/dist/internal/errors.js +9 -88
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/file-input.d.ts +0 -12
- package/dist/internal/file-input.d.ts.map +1 -1
- package/dist/internal/file-input.js +2 -49
- package/dist/internal/file-input.js.map +1 -1
- package/dist/internal/global-options.d.ts +4 -1
- package/dist/internal/global-options.d.ts.map +1 -1
- package/dist/internal/global-options.js +9 -2
- package/dist/internal/global-options.js.map +1 -1
- package/dist/internal/image-models.d.ts +7 -0
- package/dist/internal/image-models.d.ts.map +1 -1
- package/dist/internal/image-models.js +14 -0
- package/dist/internal/image-models.js.map +1 -1
- package/dist/internal/inspect.d.ts +31 -6
- package/dist/internal/inspect.d.ts.map +1 -1
- package/dist/internal/inspect.js +125 -12
- package/dist/internal/inspect.js.map +1 -1
- package/dist/internal/logger.d.ts +0 -1
- package/dist/internal/logger.d.ts.map +1 -1
- package/dist/internal/logger.js +0 -3
- package/dist/internal/logger.js.map +1 -1
- package/dist/internal/material-links.d.ts +0 -2
- package/dist/internal/material-links.d.ts.map +1 -1
- package/dist/internal/material-links.js +0 -4
- package/dist/internal/material-links.js.map +1 -1
- package/dist/internal/obj-transform.d.ts +1 -1
- package/dist/internal/obj-transform.js +1 -1
- package/dist/internal/output.d.ts +4 -13
- package/dist/internal/output.d.ts.map +1 -1
- package/dist/internal/output.js +5 -26
- package/dist/internal/output.js.map +1 -1
- package/dist/internal/paths.d.ts +2 -0
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +4 -0
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/pricing.d.ts +1 -1
- package/dist/internal/pricing.d.ts.map +1 -1
- package/dist/internal/pricing.js +1 -1
- package/dist/internal/pricing.js.map +1 -1
- package/dist/internal/project-store.d.ts +6 -13
- package/dist/internal/project-store.d.ts.map +1 -1
- package/dist/internal/project-store.js +23 -27
- package/dist/internal/project-store.js.map +1 -1
- package/dist/internal/result.d.ts +1 -2
- package/dist/internal/result.d.ts.map +1 -1
- package/dist/internal/result.js +1 -1
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/runtime.d.ts +3 -19
- package/dist/internal/runtime.d.ts.map +1 -1
- package/dist/internal/runtime.js +12 -35
- package/dist/internal/runtime.js.map +1 -1
- package/dist/internal/slicers.d.ts +7 -8
- package/dist/internal/slicers.d.ts.map +1 -1
- package/dist/internal/slicers.js +7 -8
- package/dist/internal/slicers.js.map +1 -1
- package/dist/internal/task-command.d.ts +18 -14
- package/dist/internal/task-command.d.ts.map +1 -1
- package/dist/internal/task-command.js +53 -201
- package/dist/internal/task-command.js.map +1 -1
- package/dist/internal/task-view.js +1 -1
- package/dist/internal/task-view.js.map +1 -1
- package/dist/internal/texturing.d.ts +17 -0
- package/dist/internal/texturing.d.ts.map +1 -0
- package/dist/internal/texturing.js +30 -0
- package/dist/internal/texturing.js.map +1 -0
- package/dist/internal/update-notifier.d.ts +5 -25
- package/dist/internal/update-notifier.d.ts.map +1 -1
- package/dist/internal/update-notifier.js +5 -58
- package/dist/internal/update-notifier.js.map +1 -1
- package/dist/internal/views.d.ts +8 -10
- package/dist/internal/views.d.ts.map +1 -1
- package/dist/internal/views.js +61 -29
- package/dist/internal/views.js.map +1 -1
- package/dist/root.d.ts +0 -5
- package/dist/root.d.ts.map +1 -1
- package/dist/root.js +6 -24
- package/dist/root.js.map +1 -1
- package/package.json +1 -1
- package/skills/meshy-cli/SKILL.md +53 -49
- package/dist/internal/report.d.ts +0 -40
- package/dist/internal/report.d.ts.map +0 -1
- package/dist/internal/report.js +0 -48
- package/dist/internal/report.js.map +0 -1
package/dist/cmd/mesh.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh.js","sourceRoot":"","sources":["../../src/cmd/mesh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,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AC;QAC5C,UAAU,GAAG,iBAAiB,CAAC,MAAM,EAAE,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC;IACxG,CAAC;SAAM,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;QACtC,UAAU,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC;IAClH,CAAC;IAED,oEAAoE;IACpE,mEAAmE;IACnE,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE;QAC1D,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,UAAU;QACV,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,MAAM,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC,CACF,CAAC;AAEJ,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC3C,WAAW,CAAC,0CAA0C,CAAC;KACvD,UAAU,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* No model flag (the Smart Topology models are not offered here): the API
|
|
5
5
|
* default "latest" is Meshy 7.1. geometry_resolution "2k" runs the Ultra pass (+5
|
|
6
6
|
* credits; the same geometry setting as the web app's Ultra 2K) and needs
|
|
7
|
-
* meshy-7.1 / latest
|
|
8
|
-
*
|
|
9
|
-
* exposed; ai_model and ultra_mode stay reachable through --data.
|
|
7
|
+
* meshy-7.1 / latest. "4k" is single-image only — the API refuses it here.
|
|
8
|
+
* ai_model stays reachable through --data.
|
|
10
9
|
*/
|
|
11
10
|
export declare const multiImageTo3dCommand: import("commander").Command;
|
|
12
11
|
//# sourceMappingURL=multi-image-to-3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-image-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/multi-image-to-3d.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"multi-image-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/multi-image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsGH,eAAO,MAAM,qBAAqB,6BAA6B,CAAC"}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* No model flag (the Smart Topology models are not offered here): the API
|
|
5
5
|
* default "latest" is Meshy 7.1. geometry_resolution "2k" runs the Ultra pass (+5
|
|
6
6
|
* credits; the same geometry setting as the web app's Ultra 2K) and needs
|
|
7
|
-
* meshy-7.1 / latest
|
|
8
|
-
*
|
|
9
|
-
* exposed; ai_model and ultra_mode stay reachable through --data.
|
|
7
|
+
* meshy-7.1 / latest. "4k" is single-image only — the API refuses it here.
|
|
8
|
+
* ai_model stays reachable through --data.
|
|
10
9
|
*/
|
|
11
10
|
import { Option } from "commander";
|
|
12
11
|
import { parseBool, parseCsv } from "../internal/flags.js";
|
|
13
12
|
import { UsageError } from "../internal/errors.js";
|
|
14
13
|
import { buildResourceCommand } from "../internal/task-command.js";
|
|
14
|
+
import { refuseTextureSettingsWithoutTexture, texturingDefaults } from "../internal/texturing.js";
|
|
15
15
|
const spec = {
|
|
16
16
|
name: "multi-image-to-3d",
|
|
17
17
|
description: "Generate a 3D model from 1-4 viewpoint images of a single object (Meshy 7.1 by default; " +
|
|
@@ -26,7 +26,7 @@ const spec = {
|
|
|
26
26
|
.option("--image-urls <csv>", "1-4 reference images as CSV, ideally front/side/back; each entry is a URL or local file path", parseCsv)
|
|
27
27
|
.option("--input-task-id <id>", "alternative to --image-urls: a SUCCEEDED text-to-image or image-to-image task (e.g. multi-view output) whose images become the source views")
|
|
28
28
|
.addOption(new Option("--geometry-resolution <res>", "geometry pass: standard (default) | 2k (the Ultra pass at 2048³, the web app's Ultra 2K setting; billed on top of the mesh)").choices(["standard", "2k"]))
|
|
29
|
-
.option("--should-texture <bool>", "generate textures (default: false
|
|
29
|
+
.option("--should-texture <bool>", "generate textures (default: true; false gives an untextured draft mesh — texture it later with retexture)", parseBool)
|
|
30
30
|
.option("--enable-pbr <bool>", "generate normal/metallic/roughness maps, plus an emission map on meshy-6 below 8k (default: true, so game-engine imports carry the full map set)", parseBool)
|
|
31
31
|
.option("--texture-prompt <text>", "text guidance for texturing (max 800 chars)")
|
|
32
32
|
.option("--texture-image-urls <csv>", "1-4 views of the same object to guide texturing, front first; URLs or local files; independent of --image-urls. Exclusive with --texture-prompt", parseCsv)
|
|
@@ -39,19 +39,6 @@ const spec = {
|
|
|
39
39
|
if (!opts.inputTaskId && (!urls || urls.length < 1 || urls.length > 4) && !opts.data) {
|
|
40
40
|
throw new UsageError("provide --image-urls (CSV of 1-4) or --input-task-id");
|
|
41
41
|
}
|
|
42
|
-
// The API rejects texture knobs on untextured runs; catch it before the wire.
|
|
43
|
-
if (opts.shouldTexture !== true && !opts.data) {
|
|
44
|
-
for (const [flag, value] of [
|
|
45
|
-
["--enable-pbr", opts.enablePbr],
|
|
46
|
-
["--texture-resolution", opts.textureResolution],
|
|
47
|
-
["--texture-prompt", opts.texturePrompt],
|
|
48
|
-
["--texture-image-urls", opts.textureImageUrls],
|
|
49
|
-
]) {
|
|
50
|
-
if (value !== undefined) {
|
|
51
|
-
throw new UsageError(`${flag} requires --should-texture true (the default output is an untextured draft mesh)`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
42
|
const textureViews = opts.textureImageUrls;
|
|
56
43
|
if (textureViews && (textureViews.length < 1 || textureViews.length > 4)) {
|
|
57
44
|
throw new UsageError("--texture-image-urls takes 1-4 images of the same object");
|
|
@@ -72,19 +59,14 @@ const spec = {
|
|
|
72
59
|
target_formats: opts.targetFormats,
|
|
73
60
|
};
|
|
74
61
|
},
|
|
75
|
-
toDefaults(opts) {
|
|
76
|
-
//
|
|
77
|
-
// is its own step; texture knobs ride only when texturing is on (the
|
|
78
|
-
// API rejects them otherwise), then game-ready values apply. No model
|
|
62
|
+
toDefaults(opts, data) {
|
|
63
|
+
// Textured like the API, as image-to-3d (see texturing.ts). No model
|
|
79
64
|
// choice and no geometry default: the server's standard pass applies,
|
|
80
65
|
// and Ultra (2k) rides only when asked for — it bills extra.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
texture_resolution: texturing ? "4k" : undefined,
|
|
86
|
-
target_formats: ["glb"],
|
|
87
|
-
};
|
|
66
|
+
return { ...texturingDefaults(opts, data), target_formats: ["glb"] };
|
|
67
|
+
},
|
|
68
|
+
validatePayload(payload) {
|
|
69
|
+
refuseTextureSettingsWithoutTexture(payload, ["enable_pbr", "texture_resolution", "texture_prompt", "texture_image_urls"]);
|
|
88
70
|
},
|
|
89
71
|
},
|
|
90
72
|
endpointOf: (c) => c.multiImageTo3d,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-image-to-3d.js","sourceRoot":"","sources":["../../src/cmd/multi-image-to-3d.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"multi-image-to-3d.js","sourceRoot":"","sources":["../../src/cmd/multi-image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,mCAAmC,EAAE,i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AC,CAAC,cAAc;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/cmd/operations.js
CHANGED
|
@@ -21,24 +21,24 @@ const listCommand = new Command("list")
|
|
|
21
21
|
.description("List the journaled create operations, oldest first")
|
|
22
22
|
.addOption(new Option("--state <state>", "only records in this state").choices(STATES))
|
|
23
23
|
.action(async (opts, thisCmd) => {
|
|
24
|
-
const opened = openCommand(thisCmd, "operations.list"
|
|
24
|
+
const opened = openCommand(thisCmd, "operations.list");
|
|
25
25
|
buildLocalRuntime(opened.flags);
|
|
26
26
|
const root = operationsRoot();
|
|
27
27
|
const operations = listOperations(root).filter((r) => !opts.state || r.state === opts.state);
|
|
28
|
-
await emitResult(opened,
|
|
28
|
+
await emitResult(opened, { root, operations });
|
|
29
29
|
});
|
|
30
30
|
const showCommand = new Command("show")
|
|
31
31
|
.description("Show one journaled operation")
|
|
32
32
|
.argument("<operation-id>")
|
|
33
33
|
.action(async (operationId, _opts, thisCmd) => {
|
|
34
|
-
const opened = openCommand(thisCmd, "operations.show"
|
|
34
|
+
const opened = openCommand(thisCmd, "operations.show");
|
|
35
35
|
buildLocalRuntime(opened.flags);
|
|
36
36
|
const root = operationsRoot();
|
|
37
37
|
const record = readOperation(root, operationId);
|
|
38
38
|
if (!record || record.operation_id !== operationId) {
|
|
39
39
|
throw new CliError({ code: "not_found", message: `no operation ${operationId} in ${root}`, recovery: { action: "none", automatic: false, command: "meshy operations list" } });
|
|
40
40
|
}
|
|
41
|
-
await emitResult(opened,
|
|
41
|
+
await emitResult(opened, { root, operation: record });
|
|
42
42
|
});
|
|
43
43
|
const resolveCommand = new Command("resolve")
|
|
44
44
|
.description("Close out a 'started' or 'unknown' operation after checking `<resource> list`: --task-id <id> when the task is there, --not-created when it is not (the same --operation-id then submits again)")
|
|
@@ -47,7 +47,7 @@ const resolveCommand = new Command("resolve")
|
|
|
47
47
|
.option("--not-created", "the server created no task; release the id so the same --operation-id submits again")
|
|
48
48
|
.option("--force", "resolve a 'started' operation even though the process that started it still appears to run")
|
|
49
49
|
.action(async (operationId, opts, thisCmd) => {
|
|
50
|
-
const opened = openCommand(thisCmd, "operations.resolve"
|
|
50
|
+
const opened = openCommand(thisCmd, "operations.resolve");
|
|
51
51
|
buildLocalRuntime(opened.flags);
|
|
52
52
|
if ((opts.taskId !== undefined) === Boolean(opts.notCreated)) {
|
|
53
53
|
throw new UsageError("pass exactly one of --task-id <id> or --not-created");
|
|
@@ -56,7 +56,7 @@ const resolveCommand = new Command("resolve")
|
|
|
56
56
|
if (opts.taskId !== undefined && !taskId)
|
|
57
57
|
throw new UsageError("--task-id needs a task id");
|
|
58
58
|
const res = resolveOperation(operationsRoot(), operationId, taskId ? { as: "created", taskId } : { as: "not_created" }, { force: opts.force });
|
|
59
|
-
await emitResult(opened, res
|
|
59
|
+
await emitResult(opened, res);
|
|
60
60
|
});
|
|
61
61
|
export const operationsCommand = new Command("operations")
|
|
62
62
|
.description("Local journal of create requests: list | show | resolve (no API key needed)")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/cmd/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAuB,MAAM,gCAAgC,CAAC;AACtI,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,GAAqB,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAEjG,MAAM,W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AC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/cmd/project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/cmd/project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6HpC,eAAO,MAAM,cAAc,SAME,CAAC"}
|
package/dist/cmd/project.js
CHANGED
|
@@ -38,14 +38,14 @@ const initCommand = new Command("init")
|
|
|
38
38
|
.option("--task-id <id>", "root task id when already known (can be added later with record)")
|
|
39
39
|
.option("--task-type <type>", "task type used for the folder slug when no name is given")
|
|
40
40
|
.action(async (opts, thisCmd) => {
|
|
41
|
-
const opened = openCommand(thisCmd, "project.init"
|
|
41
|
+
const opened = openCommand(thisCmd, "project.init");
|
|
42
42
|
buildLocalRuntime(opened.flags);
|
|
43
43
|
const root = confine(rootFrom(opts), opened.flags.workspaceRoot, "--root");
|
|
44
44
|
const res = initProject(root, { name: opts.name, taskId: opts.taskId ?? null, taskType: opts.taskType ?? null });
|
|
45
45
|
const warnings = [];
|
|
46
46
|
if (!res.index.updated)
|
|
47
47
|
warnings.push(warning("index_dirty", `metadata.json written but history.json was not updated: ${res.index.error}; run \`meshy project rebuild-index --root ${res.root}\``));
|
|
48
|
-
await emitResult(opened,
|
|
48
|
+
await emitResult(opened, { root: res.root, project_dir: res.project_dir, folder: res.folder, metadata: res.metadata, index: res.index }, { warnings });
|
|
49
49
|
});
|
|
50
50
|
const recordCommand = new Command("record")
|
|
51
51
|
.description("Record a task (and its files) in a project's metadata.json; (task_id, stage) is merged, not duplicated")
|
|
@@ -61,7 +61,7 @@ const recordCommand = new Command("record")
|
|
|
61
61
|
.option("--operation-id <id>", "journal operation id that created the task")
|
|
62
62
|
.option("--root <dir>", "output root holding history.json (default: the project's parent)")
|
|
63
63
|
.action(async (opts, thisCmd) => {
|
|
64
|
-
const opened = openCommand(thisCmd, "project.record"
|
|
64
|
+
const opened = openCommand(thisCmd, "project.record");
|
|
65
65
|
buildLocalRuntime(opened.flags);
|
|
66
66
|
const projectDir = confine(resolvePath(opts.project), opened.flags.workspaceRoot, "--project");
|
|
67
67
|
if (!existsSync(join(projectDir, "metadata.json"))) {
|
|
@@ -88,43 +88,41 @@ const recordCommand = new Command("record")
|
|
|
88
88
|
const missing = (opts.file ?? []).filter((f) => !existsSync(join(projectDir, f)));
|
|
89
89
|
if (missing.length)
|
|
90
90
|
warnings.push(warning("recorded_file_missing", `recorded file(s) not present in the project yet: ${missing.join(", ")}`));
|
|
91
|
-
if (res.migrated_from_legacy)
|
|
92
|
-
warnings.push(warning("metadata_migrated", "legacy metadata.json migrated to schema_version 2 (backup kept beside it)"));
|
|
93
91
|
if (!res.index.updated)
|
|
94
92
|
warnings.push(warning("index_dirty", `metadata.json committed but history.json was not updated: ${res.index.error}; run \`meshy project rebuild-index\``));
|
|
95
|
-
await emitResult(opened,
|
|
93
|
+
await emitResult(opened, { project_dir: res.project_dir, action: res.action, entry: res.entry, task_count: res.metadata.tasks.length, index: res.index }, { warnings });
|
|
96
94
|
});
|
|
97
95
|
const showCommand = new Command("show")
|
|
98
|
-
.description("Show a project's metadata.json
|
|
96
|
+
.description("Show a project's metadata.json and whether each recorded file is present")
|
|
99
97
|
.requiredOption("--project <dir>", "project directory")
|
|
100
98
|
.action(async (opts, thisCmd) => {
|
|
101
|
-
const opened = openCommand(thisCmd, "project.show"
|
|
99
|
+
const opened = openCommand(thisCmd, "project.show");
|
|
102
100
|
buildLocalRuntime(opened.flags);
|
|
103
101
|
const read = readProject(opts.project);
|
|
104
102
|
const files = read.metadata.tasks.flatMap((t) => t.files.map((f) => ({ task_id: t.task_id, stage: t.stage, file: f, present: existsSync(join(read.path, f)) })));
|
|
105
|
-
await emitResult(opened,
|
|
103
|
+
await emitResult(opened, { project_dir: read.path, metadata: read.metadata, files });
|
|
106
104
|
});
|
|
107
105
|
const listCommand = new Command("list")
|
|
108
106
|
.description("List projects from history.json and report folders missing from the index")
|
|
109
107
|
.option("--root <dir>", `output root (default: ./${DEFAULT_ROOT})`)
|
|
110
108
|
.action(async (opts, thisCmd) => {
|
|
111
|
-
const opened = openCommand(thisCmd, "project.list"
|
|
109
|
+
const opened = openCommand(thisCmd, "project.list");
|
|
112
110
|
buildLocalRuntime(opened.flags);
|
|
113
111
|
const res = listProjects(rootFrom(opts));
|
|
114
112
|
const warnings = [];
|
|
115
113
|
if (res.index_dirty)
|
|
116
114
|
warnings.push(warning("index_dirty", "history.json does not match the folders on disk; run `meshy project rebuild-index`"));
|
|
117
|
-
await emitResult(opened, res
|
|
115
|
+
await emitResult(opened, res, { warnings });
|
|
118
116
|
});
|
|
119
117
|
const rebuildCommand = new Command("rebuild-index")
|
|
120
118
|
.description("Regenerate history.json from the project folders (the previous index is backed up)")
|
|
121
119
|
.option("--root <dir>", `output root (default: ./${DEFAULT_ROOT})`)
|
|
122
120
|
.action(async (opts, thisCmd) => {
|
|
123
|
-
const opened = openCommand(thisCmd, "project.rebuild-index"
|
|
121
|
+
const opened = openCommand(thisCmd, "project.rebuild-index");
|
|
124
122
|
buildLocalRuntime(opened.flags);
|
|
125
123
|
const res = rebuildIndex(confine(rootFrom(opts), opened.flags.workspaceRoot, "--root"));
|
|
126
124
|
const warnings = res.skipped.map((s) => warning("project_skipped", `${s.folder}: ${s.reason}`));
|
|
127
|
-
await emitResult(opened, res,
|
|
125
|
+
await emitResult(opened, res, { warnings });
|
|
128
126
|
});
|
|
129
127
|
export const projectCommand = new Command("project")
|
|
130
128
|
.description("Local meshy_output project folders: init | record | show | list | rebuild-index (no API key needed)")
|
package/dist/cmd/project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/cmd/project.ts"],"names":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CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;IACxF,MAAM,QAAQ,GAAc,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3G,MAAM,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;KACjD,WAAW,CAAC,qGAAqG,CAAC;KAClH,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,cAAc,CAAC,CAAC"}
|
package/dist/cmd/resources.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* pays for the whole surface every time, so the root lists the one verb most
|
|
7
7
|
* callers need and points here for the rest.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* `result.items` carries `kind` (task | query | action | local), the command
|
|
10
|
+
* line, the endpoint and the supported verbs — all generated from the registry
|
|
11
|
+
* and filtered to what this build actually registers. RESOURCES below is the
|
|
12
|
+
* hand-written summary table the root help and tests cross-check against.
|
|
13
13
|
*/
|
|
14
14
|
import { Command } from "commander";
|
|
15
15
|
interface ResourceEntry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/cmd/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,eAAO,MAAM,SAAS,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/cmd/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,eAAO,MAAM,SAAS,EAAE,aAAa,EA8BpC,CAAC;AAmBF,eAAO,MAAM,gBAAgB,SAczB,CAAC"}
|
package/dist/cmd/resources.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* pays for the whole surface every time, so the root lists the one verb most
|
|
7
7
|
* callers need and points here for the rest.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* `result.items` carries `kind` (task | query | action | local), the command
|
|
10
|
+
* line, the endpoint and the supported verbs — all generated from the registry
|
|
11
|
+
* and filtered to what this build actually registers. RESOURCES below is the
|
|
12
|
+
* hand-written summary table the root help and tests cross-check against.
|
|
13
13
|
*/
|
|
14
14
|
import { Command } from "commander";
|
|
15
15
|
import { resourceIndex } from "../client/resource-registry.js";
|
|
@@ -34,7 +34,6 @@ export const RESOURCES = [
|
|
|
34
34
|
{ name: "repair-printability", summary: "fix non-watertight / non-manifold geometry" },
|
|
35
35
|
{ name: "balance", summary: "remaining credit balance" },
|
|
36
36
|
{ name: "delete", summary: "delete a task of any resource except Creative Lab (whose own delete verb cancels)" },
|
|
37
|
-
// Added in S1 (appended so 0.2.0 consumers keep their positions).
|
|
38
37
|
{ name: "uv-unwrap", summary: "generate fresh UVs for a GLB (≤40k faces) — a UV white model for external texturing" },
|
|
39
38
|
{ name: "creative-lab", summary: "photo → printable product: figure | vinyl-figure | brick-figure | lamp | keychain | fridge-magnet | keycap | fidget-pixel (prototype then build) | fidget-collapsible (one stage)" },
|
|
40
39
|
{ name: "animation-catalog", summary: "animation library (action ids for animate); free, server-side search" },
|
|
@@ -59,7 +58,6 @@ const VERBS = `Every task resource carries the same verbs:
|
|
|
59
58
|
|
|
60
59
|
\`create\` is sync by default — it blocks until the task is terminal. Pass
|
|
61
60
|
--async for the task id straight away, then \`wait\`/\`get\`/\`stream\` it later.
|
|
62
|
-
Add --output-schema v1 for the stable machine envelope.
|
|
63
61
|
|
|
64
62
|
Endpoints without a dedicated command are reachable through the passthrough:
|
|
65
63
|
|
|
@@ -69,19 +67,12 @@ export const resourcesCommand = new Command("resources")
|
|
|
69
67
|
.description("List the per-endpoint commands and the verbs they share")
|
|
70
68
|
.addHelpText("after", `\n${VERBS}\n`)
|
|
71
69
|
.action(async (_opts, thisCmd) => {
|
|
72
|
-
const opened = openCommand(thisCmd, "resources"
|
|
70
|
+
const opened = openCommand(thisCmd, "resources");
|
|
73
71
|
buildLocalRuntime(opened.flags);
|
|
74
72
|
const registered = new Set((thisCmd.parent?.commands ?? []).map((c) => c.name()));
|
|
75
73
|
const items = resourceIndex().filter((e) => registered.has(e.command.split(" ")[1] ?? ""));
|
|
76
|
-
const legacy = RESOURCES.filter((r) => registered.has(r.name));
|
|
77
|
-
if (opened.schema === "legacy" && opened.format === "pretty") {
|
|
78
|
-
const width = Math.max(...legacy.map((r) => r.name.length));
|
|
79
|
-
const lines = legacy.map((r) => ` ${r.name.padEnd(width)} ${r.summary}`);
|
|
80
|
-
process.stdout.write(`${lines.join("\n")}\n\n${VERBS}\n`);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
74
|
const byKind = (kind) => items.filter((e) => e.kind === kind).length;
|
|
84
|
-
await emitResult(opened,
|
|
75
|
+
await emitResult(opened, {
|
|
85
76
|
items,
|
|
86
77
|
counts: { task: byKind("task"), query: byKind("query"), action: byKind("action"), local: byKind("local") },
|
|
87
78
|
verbs_help: "meshy resources --help",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/cmd/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAA2B,MAAM,gCAAgC,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAO3D,oDAAoD;AACpD,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,sDAAsD,EAAE;IACvF,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,8DAA8D,EAAE;IAChG,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,yEAAyE,EAAE;IACjH,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,iCAAiC,EAAE;IAC9D,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAyB,EAAE;IACvD,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,iCAAiC,EAAE;IAC9D,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,qDAAqD,EAAE;IACnF,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,0CAA0C,EAAE;IACxE,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,qBAAqB,EAAE;IACrD,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,qBAAqB,EAAE;IACzD,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,sDAAsD,EAAE;IAC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MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAC1G,UAAU,EAAE,wBAAwB;KACrC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/cmd/retexture.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* literal: `multiview_image_urls requires ai_model meshy-7` is returned even
|
|
10
10
|
* for ai_model "latest" and for an omitted ai_model, so leaving the model to
|
|
11
11
|
* the server — what every other 3D command here does — is a guaranteed 400.
|
|
12
|
-
* (image-to-3d's comparable
|
|
13
|
-
* this command pins a version.) It is pinned in the defaults layer, so
|
|
12
|
+
* (image-to-3d's comparable geometry_resolution gate accepts both, which is
|
|
13
|
+
* why only this command pins a version.) It is pinned in the defaults layer, so
|
|
14
14
|
* `--data '{"ai_model":"..."}'` still wins if the gate ever loosens.
|
|
15
15
|
*/
|
|
16
16
|
import { type ResourceCommandSpec } from "../internal/task-command.js";
|
package/dist/cmd/retexture.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* literal: `multiview_image_urls requires ai_model meshy-7` is returned even
|
|
10
10
|
* for ai_model "latest" and for an omitted ai_model, so leaving the model to
|
|
11
11
|
* the server — what every other 3D command here does — is a guaranteed 400.
|
|
12
|
-
* (image-to-3d's comparable
|
|
13
|
-
* this command pins a version.) It is pinned in the defaults layer, so
|
|
12
|
+
* (image-to-3d's comparable geometry_resolution gate accepts both, which is
|
|
13
|
+
* why only this command pins a version.) It is pinned in the defaults layer, so
|
|
14
14
|
* `--data '{"ai_model":"..."}'` still wins if the gate ever loosens.
|
|
15
15
|
*/
|
|
16
16
|
import { Option } from "commander";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"showcases.d.ts","sourceRoot":"","sources":["../../src/cmd/showcases.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"showcases.d.ts","sourceRoot":"","sources":["../../src/cmd/showcases.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAsE5C,eAAO,MAAM,gBAAgB,SAEH,CAAC"}
|
package/dist/cmd/showcases.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Command, Option } from "commander";
|
|
9
9
|
import { SHOWCASE_FORMATS, SHOWCASE_SORT_BY, SHOWCASE_TYPES } from "../client/endpoints/showcases.js";
|
|
10
|
-
import { emitResult, openCommand,
|
|
10
|
+
import { emitResult, openCommand, rejectOutputFlag, saveRawJson } from "../internal/command-helpers.js";
|
|
11
11
|
import { abortSignal } from "../internal/context.js";
|
|
12
12
|
import { UsageError } from "../internal/errors.js";
|
|
13
13
|
import { parseInt10 } from "../internal/flags.js";
|
|
@@ -26,8 +26,8 @@ const listCommand = new Command("list")
|
|
|
26
26
|
.option("--include-raw", "include the untouched response under result.raw")
|
|
27
27
|
.option("--save-json <file>", "save the untouched response to this file (never overwrites)")
|
|
28
28
|
.action(async (opts, thisCmd) => {
|
|
29
|
-
const opened = openCommand(thisCmd, "showcases.list"
|
|
30
|
-
|
|
29
|
+
const opened = openCommand(thisCmd, "showcases.list");
|
|
30
|
+
rejectOutputFlag(opened, opts.saveJson);
|
|
31
31
|
if (opts.pageSize !== undefined && (opts.pageSize < 1 || opts.pageSize > 10)) {
|
|
32
32
|
throw new UsageError("--page-size must be between 1 and 10");
|
|
33
33
|
}
|
|
@@ -47,7 +47,7 @@ const listCommand = new Command("list")
|
|
|
47
47
|
const runtime = await buildRuntime(opened.flags);
|
|
48
48
|
const { items, raw } = await runtime.client.showcases.list(request, { signal: abortSignal() });
|
|
49
49
|
const saved = opts.saveJson ? saveRawJson(opts.saveJson, raw, { workspace: opened.flags.workspaceRoot }) : null;
|
|
50
|
-
await emitResult(opened,
|
|
50
|
+
await emitResult(opened, {
|
|
51
51
|
items,
|
|
52
52
|
count: items.length,
|
|
53
53
|
request,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"showcases.js","sourceRoot":"","sources":["../../src/cmd/showcases.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"showcases.js","sourceRoot":"","sources":["../../src/cmd/showcases.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAgB,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACpC,WAAW,CAAC,6EAA6E,CAAC;KAC1F,MAAM,CAAC,iBAAiB,EAAE,0CAA0C,CAAC;KACrE,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,UAAU,CAAC;KAC1D,SAAS,CAAC,IAAI,MAAM,CAAC,mBAAmB,EAAE,mCAAmC,C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a,EAAE,YAAY;KAC5B,CAAC;IACF,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;IAC/F,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAChH,MAAM,UAAU,CACd,MAAM,EACN;QACE,KAAK;QACL,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,OAAO;QACP,OAAO,EAAE,YAAY;QACrB,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,KAAK;QACjB,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,EACD,EAAE,QAAQ,EAAE,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;KACrD,WAAW,CAAC,sDAAsD,CAAC;KACnE,UAAU,CAAC,WAAW,CAAC,CAAC"}
|
package/dist/cmd/slicer.js
CHANGED
|
@@ -21,11 +21,11 @@ function rejectOutputFlag(opened) {
|
|
|
21
21
|
const detectCommand = new Command("detect")
|
|
22
22
|
.description(`Detect installed slicers (${SLICERS.map((s) => s.name).join(", ")}). Local only; an empty list is a successful result`)
|
|
23
23
|
.action(async (_opts, thisCmd) => {
|
|
24
|
-
const opened = openCommand(thisCmd, "slicer.detect"
|
|
24
|
+
const opened = openCommand(thisCmd, "slicer.detect");
|
|
25
25
|
rejectOutputFlag(opened);
|
|
26
26
|
buildLocalRuntime(opened.flags);
|
|
27
27
|
const detection = detectSlicers();
|
|
28
|
-
await emitResult(opened, detection
|
|
28
|
+
await emitResult(opened, detection);
|
|
29
29
|
});
|
|
30
30
|
const openCmd = new Command("open")
|
|
31
31
|
.description("Open a model file in a detected slicer. Launches the detected executable (macOS: open -a <bundle>) with the " +
|
|
@@ -33,11 +33,11 @@ const openCmd = new Command("open")
|
|
|
33
33
|
.requiredOption("--slicer <name>", "registered slicer name or id (see: meshy slicer detect)")
|
|
34
34
|
.requiredOption("--file <path>", `model file to open (${[...LAUNCHABLE_EXTENSIONS].join(", ")})`)
|
|
35
35
|
.action(async (opts, thisCmd) => {
|
|
36
|
-
const opened = openCommand(thisCmd, "slicer.open"
|
|
36
|
+
const opened = openCommand(thisCmd, "slicer.open");
|
|
37
37
|
rejectOutputFlag(opened);
|
|
38
38
|
buildLocalRuntime(opened.flags);
|
|
39
39
|
const launch = await openInSlicer(opts.file, opts.slicer);
|
|
40
|
-
await emitResult(opened, launch
|
|
40
|
+
await emitResult(opened, launch);
|
|
41
41
|
});
|
|
42
42
|
export const slicerCommand = new Command("slicer")
|
|
43
43
|
.description("Detect installed slicers and open models in them (no API key required)")
|
package/dist/cmd/slicer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slicer.js","sourceRoot":"","sources":["../../src/cmd/slicer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAsB,MAAM,gCAAgC,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAErG,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,CAAC;KACzB,UAAU,CAAC,OAAO,CAAC,CAAC"}
|
package/dist/cmd/text-to-3d.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The flag surface is deliberately minimal: topology and polycount are
|
|
8
8
|
* remesh's job (except smart topology's native polycount), resizing is
|
|
9
|
-
* resize's job, deprecated
|
|
9
|
+
* resize's job, parameters the API deprecated (symmetry_mode, lowpoly, ultra_mode)
|
|
10
10
|
* are gone, and the mode picks the model: standard runs the server default
|
|
11
11
|
* "latest" (Meshy 7.1), smart-topology runs meshy-t2.5, or meshy-t2 with
|
|
12
12
|
* --ai-model. The `--data` escape hatch still reaches anything the API accepts.
|
package/dist/cmd/text-to-3d.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The flag surface is deliberately minimal: topology and polycount are
|
|
8
8
|
* remesh's job (except smart topology's native polycount), resizing is
|
|
9
|
-
* resize's job, deprecated
|
|
9
|
+
* resize's job, parameters the API deprecated (symmetry_mode, lowpoly, ultra_mode)
|
|
10
10
|
* are gone, and the mode picks the model: standard runs the server default
|
|
11
11
|
* "latest" (Meshy 7.1), smart-topology runs meshy-t2.5, or meshy-t2 with
|
|
12
12
|
* --ai-model. The `--data` escape hatch still reaches anything the API accepts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-to-image.d.ts","sourceRoot":"","sources":["../../src/cmd/text-to-image.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"text-to-image.d.ts","sourceRoot":"","sources":["../../src/cmd/text-to-image.ts"],"names":[],"mappings":"AAAA;;GAEG;AAsEH,eAAO,MAAM,kBAAkB,6BAA6B,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Option } from "commander";
|
|
5
5
|
import { parseBool } from "../internal/flags.js";
|
|
6
6
|
import { UsageError } from "../internal/errors.js";
|
|
7
|
-
import { ASPECT_RATIOS, ASPECT_RATIO_HELP, DEFAULT_IMAGE_MODEL, IMAGE_MODELS, IMAGE_MODEL_HELP, checkImageCombo, } from "../internal/image-models.js";
|
|
7
|
+
import { ASPECT_RATIOS, ASPECT_RATIO_HELP, DEFAULT_IMAGE_MODEL, IMAGE_MODELS, IMAGE_MODEL_HELP, checkImageCombo, poseAspectRatioWarnings, } from "../internal/image-models.js";
|
|
8
8
|
import { buildResourceCommand } from "../internal/task-command.js";
|
|
9
9
|
const spec = {
|
|
10
10
|
name: "text-to-image",
|
|
@@ -17,7 +17,7 @@ const spec = {
|
|
|
17
17
|
.addOption(new Option("--ai-model <model>", IMAGE_MODEL_HELP).choices([...IMAGE_MODELS]))
|
|
18
18
|
.option("--prompt <text>", "required — image description; be descriptive for best results")
|
|
19
19
|
.option("--generate-multi-view <bool>", "generate multi-angle views of the subject (feeds multi-image-to-3d); mutually exclusive with --aspect-ratio", parseBool)
|
|
20
|
-
.addOption(new Option("--pose-mode <pose>", "a-pose | t-pose character pose preset").choices([
|
|
20
|
+
.addOption(new Option("--pose-mode <pose>", "a-pose | t-pose character pose preset (nano-banana models render it at 3:4, whatever --aspect-ratio says)").choices([
|
|
21
21
|
"a-pose",
|
|
22
22
|
"t-pose",
|
|
23
23
|
]))
|
|
@@ -48,6 +48,7 @@ const spec = {
|
|
|
48
48
|
toDefaults() {
|
|
49
49
|
return { ai_model: DEFAULT_IMAGE_MODEL };
|
|
50
50
|
},
|
|
51
|
+
warnPayload: poseAspectRatioWarnings,
|
|
51
52
|
},
|
|
52
53
|
endpointOf: (c) => c.textToImage,
|
|
53
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-to-image.js","sourceRoot":"","sources":["../../src/cmd/text-to-image.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE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