@assethub/cli 0.1.14 → 0.1.16
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 +33 -8
- package/dist/execution.d.ts +3 -3
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +166 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ with `--graph`. Mesh IDs returned by search can be passed to `composer run`.
|
|
|
57
57
|
|
|
58
58
|
## Agent generation with canvas history
|
|
59
59
|
|
|
60
|
-
Canvas execution is available to
|
|
60
|
+
Canvas execution is available to authenticated users with access to the selected workspace. Run `assethub capabilities`
|
|
61
61
|
first. Image, mesh, parts split, and production analyze/execute/automation refuse to dispatch if canvas history is unavailable.
|
|
62
62
|
The current public API remains compatible with clients that omit `executionContext`.
|
|
63
63
|
|
|
@@ -141,7 +141,7 @@ Existing parts commands use the same canvas and durable operation storage:
|
|
|
141
141
|
assethub parts split --source-id "$IMAGE_ASSET_ID" --canvas "$CANVAS_ID" --part-extractor V1.5 --wait
|
|
142
142
|
# Select only the parts to execute; --all-ready selects all ready tasks.
|
|
143
143
|
assethub parts split --source-id "$IMAGE_ASSET_ID" --canvas "$CANVAS_ID" --part-extractor V1.5 --all-ready --wait
|
|
144
|
-
# Internal V3.6.1
|
|
144
|
+
# Internal V3.6.1 and V3.6.3 run the complete graph split through one analyze receipt.
|
|
145
145
|
assethub production agents
|
|
146
146
|
assethub parts split --source-id "$IMAGE_ASSET_ID" --canvas "$CANVAS_ID" --part-extractor V3.6.1 --all-ready --wait
|
|
147
147
|
assethub production automation --canvas "$CANVAS_ID" --input-json @batch.json --wait
|
|
@@ -149,7 +149,8 @@ assethub production automation --canvas "$CANVAS_ID" --input-json @batch.json --
|
|
|
149
149
|
|
|
150
150
|
`parts split` keeps separate analysis and selected-part execution phases. Each phase
|
|
151
151
|
has its own saved operation ID, with the execution linked to the analysis run.
|
|
152
|
-
For Internal `V3.6.1` (`V3.6.1 Primary Images First`)
|
|
152
|
+
For Internal `V3.6.1` (`V3.6.1 Primary Images First`) and `V3.6.3`
|
|
153
|
+
(`V3.6.3 Fast Analysis`, CLI 0.1.16+), analysis runs the complete
|
|
153
154
|
Artifact Graph split. `--all-ready` waits for that one receipt and does not start a
|
|
154
155
|
second production execution. Resume an interrupted graph split with
|
|
155
156
|
`runs resume <operation-id>`; `--task-id`, `--mission-id`,
|
|
@@ -419,8 +420,11 @@ Image generation uses the `v2` endpoint with mandatory canvas history.
|
|
|
419
420
|
`--api-version v1` is rejected; run `assethub capabilities` to check availability.
|
|
420
421
|
|
|
421
422
|
Part extraction uses the same names shown in the AssetHub product: `V1.5`,
|
|
422
|
-
`V2.0 alpha`, `V2.1 alpha`, and the Internal-only `V3.6.1`
|
|
423
|
-
`V3.6.1 Primary Images First
|
|
423
|
+
`V2.0 alpha`, `V2.1 alpha`, and the Internal-only aliases `V3.6.1`
|
|
424
|
+
(`V3.6.1 Primary Images First`) and `V3.6.3` (`V3.6.3 Fast Analysis`).
|
|
425
|
+
Run `production agents` to check availability and `supportedOnGraphEndpoint`
|
|
426
|
+
before selecting a graph version. These aliases do not change the default.
|
|
427
|
+
Retired names are no longer accepted by the CLI.
|
|
424
428
|
Internal agent IDs are intentionally not part of the CLI interface.
|
|
425
429
|
|
|
426
430
|
The CLI only uses AssetHub's public API surface and is designed so this package
|
|
@@ -441,6 +445,9 @@ assethub canvas use <canvas-id>
|
|
|
441
445
|
assethub composer models
|
|
442
446
|
assethub composer run --part <mesh-id> --part <mesh-id> --reference <image-id> --wait
|
|
443
447
|
assethub composer run --from-run <run-id> --transforms-json @transforms.json --wait
|
|
448
|
+
assethub composer refine --list-modes
|
|
449
|
+
assethub composer refine --from-run <run-id> --instruction "align the feet" \
|
|
450
|
+
--mode placement --max-rounds 2 --wait --download --out-dir ./refined
|
|
444
451
|
```
|
|
445
452
|
|
|
446
453
|
Selection reuses a valid API key for that workspace or creates one when permitted.
|
|
@@ -451,6 +458,23 @@ expired proof by logging in again. Explicit `--profile` uses its saved proof and
|
|
|
451
458
|
ignores environment credentials; an explicit `--api-key` can supply the workspace
|
|
452
459
|
key. Generation uses normal workspace credits.
|
|
453
460
|
|
|
461
|
+
`composer refine --from-run` accepts a `mesh.compose` or prior `mesh.refine` run
|
|
462
|
+
and uses that receipt's final `composition.transforms` and any replacement
|
|
463
|
+
`composition.parts` on the same canvas, preserving `parentRunId` lineage. If the
|
|
464
|
+
receipt has no actual transforms, provide `--transforms-json`; the CLI refuses to
|
|
465
|
+
silently restart from the original requested input. New requests can use
|
|
466
|
+
`--input-json` or `--part`/`--reference` with `--transforms-json`. Mode availability
|
|
467
|
+
and each mode's `--max-rounds` policy come from `composer refine --list-modes`.
|
|
468
|
+
Incomplete native results remain `needs_review` and return exit code 3, so inspect
|
|
469
|
+
the execution and its new geometry asset IDs before continuing.
|
|
470
|
+
|
|
471
|
+
Native refinement `completed` or `reviewed` means execution finished; it is not
|
|
472
|
+
creator approval. Read `execution.refinement.report` and inspect the actual
|
|
473
|
+
`execution.composition` and downloaded meshes. Structured unresolved issues or
|
|
474
|
+
incomplete refinement can return `needs_review` (exit 3). Review narrative issues
|
|
475
|
+
even on completed runs, using overlays and oblique/side views before claiming
|
|
476
|
+
visual improvement.
|
|
477
|
+
|
|
454
478
|
Existing Production outputs can be inspected and downloaded without regenerating:
|
|
455
479
|
|
|
456
480
|
```sh
|
|
@@ -459,9 +483,10 @@ assethub graph export --canvas <canvas-id> --out ./graph.json
|
|
|
459
483
|
assethub graph lineage --canvas <canvas-id> --artifact <asset-id> --direction ancestors
|
|
460
484
|
```
|
|
461
485
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
486
|
+
Graph commands with `--canvas` cover recorded CLI/API executions and evaluations.
|
|
487
|
+
A canvas with only older UI activity can return an empty graph. Use `graph list`
|
|
488
|
+
and `graph show --graph <id>` for historical graphs, or `mesh list` to search
|
|
489
|
+
the workspace mesh library.
|
|
465
490
|
|
|
466
491
|
## Inspect available MCP operations
|
|
467
492
|
|
package/dist/execution.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AssetHubClient, type CanvasExecution, type ExecutionContext, type ImageGenerationRequest, type MeshGenerationRequest, type MeshComposeRequest, type ProductionAnalyzeRequest, type ProductionExecuteRequest, type ProductionAutomationRequest } from '@assethub/api-client';
|
|
2
|
-
declare const operations: readonly ["image.generate", "mesh.generate", "mesh.compose", "production.analyze", "production.execute", "production.automation"];
|
|
1
|
+
import { type AssetHubClient, type CanvasExecution, type ExecutionContext, type ImageGenerationRequest, type MeshGenerationRequest, type MeshComposeRequest, type MeshRefineRequest, type ProductionAnalyzeRequest, type ProductionExecuteRequest, type ProductionAutomationRequest } from '@assethub/api-client';
|
|
2
|
+
declare const operations: readonly ["image.generate", "mesh.generate", "mesh.compose", "mesh.refine", "production.analyze", "production.execute", "production.automation"];
|
|
3
3
|
type Operation = (typeof operations)[number];
|
|
4
4
|
type SessionOptions = {
|
|
5
5
|
client: AssetHubClient;
|
|
@@ -22,7 +22,7 @@ export declare const openExecutionSession: (options: SessionOptions) => Promise<
|
|
|
22
22
|
create?: boolean;
|
|
23
23
|
}>;
|
|
24
24
|
type Session = Awaited<ReturnType<typeof openExecutionSession>>;
|
|
25
|
-
type RequestBody = ImageGenerationRequest | MeshGenerationRequest | Omit<MeshComposeRequest, 'executionContext'> | ProductionAnalyzeRequest | ProductionExecuteRequest | ProductionAutomationRequest;
|
|
25
|
+
type RequestBody = ImageGenerationRequest | MeshGenerationRequest | Omit<MeshComposeRequest, 'executionContext'> | Omit<MeshRefineRequest, 'executionContext'> | ProductionAnalyzeRequest | ProductionExecuteRequest | ProductionAutomationRequest;
|
|
26
26
|
export declare const hasRecordedOperation: (stateDir: string, operationId: string) => Promise<boolean>;
|
|
27
27
|
type SubmitOptions = {
|
|
28
28
|
operationId?: string;
|
package/dist/execution.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EACjC,MAAM,sBAAsB,CAAA;AAG7B,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"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"}
|
package/dist/execution.js
CHANGED
|
@@ -8,6 +8,7 @@ const operations = [
|
|
|
8
8
|
'image.generate',
|
|
9
9
|
'mesh.generate',
|
|
10
10
|
'mesh.compose',
|
|
11
|
+
'mesh.refine',
|
|
11
12
|
'production.analyze',
|
|
12
13
|
'production.execute',
|
|
13
14
|
'production.automation',
|
|
@@ -83,7 +84,8 @@ const submitSaved = async (session, saved, retryDelayMs = 250) => {
|
|
|
83
84
|
activeExecution.execution = execution;
|
|
84
85
|
// An unacknowledged Composer receipt can precede a failed Trigger POST.
|
|
85
86
|
// Resume repeats its saved body/key; the server uses the same native key.
|
|
86
|
-
if (!(saved.operation === 'mesh.compose'
|
|
87
|
+
if (!((saved.operation === 'mesh.compose' ||
|
|
88
|
+
saved.operation === 'mesh.refine') &&
|
|
87
89
|
execution.status === 'queued' &&
|
|
88
90
|
execution.history.status === 'pending'))
|
|
89
91
|
return { execution };
|
|
@@ -99,6 +101,8 @@ const submitSaved = async (session, saved, retryDelayMs = 250) => {
|
|
|
99
101
|
return session.client.v2.generateMesh(saved.body, options);
|
|
100
102
|
case 'mesh.compose':
|
|
101
103
|
return session.client.v2.composeMesh(saved.body, options);
|
|
104
|
+
case 'mesh.refine':
|
|
105
|
+
return session.client.v2.refineMesh(saved.body, options);
|
|
102
106
|
case 'production.analyze':
|
|
103
107
|
return session.client.v1.analyzeProduction(saved.body, options);
|
|
104
108
|
case 'production.execute':
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type AnimationRetargetRequest, type Intervention, type RigRequest } from '@assethub/api-client';
|
|
3
3
|
import { buildRunUploadPlan } from './runsUpload/buildRunUpload.js';
|
|
4
4
|
type Flags = Record<string, string | boolean | string[]>;
|
|
5
|
-
export declare const usage = "AssetHub CLI\n\nCLI and MCP are available to all AssetHub users. Workspace permissions and feature availability apply.\n\nUsage:\n assethub --version\n assethub doctor [--mcp] [--profile <name>] [--timeout-ms <n>]\n assethub mcp tools [tool-name] [--account] [--profile <name>] [--timeout-ms <n>]\n assethub mcp config --client cursor|codex [--account] [--base-url <url>]\n assethub auth login --api-key <key> [--base-url <url>] [--profile <name>]\n assethub auth login --api-key-stdin [--base-url <url>] [--profile <name>]\n assethub auth login --access-token-stdin [--base-url <url>] [--profile <name>]\n assethub auth status [--profile <name>]\n assethub auth logout [--profile <name>]\n assethub workspace list|get\n assethub workspace create --name <name> [--operation-id <uuid>]\n assethub workspace use <workspace-id>\n assethub workspace members [--workspace <id>]\n assethub workspace invite --email <email> [--role user|admin] [--resend] [--workspace <id>]\n assethub workspace set-role <user-id> --role user|admin [--workspace <id>]\n assethub workspace remove-member <user-id> [--workspace <id>]\n assethub workspace prepare|sync|analyze|verify --internal --manifest <json> --state <json>\n assethub workspace self-check --internal\n assethub workspace context put --internal --org <uuid> --actor <uuid> --canvas <id> --file <json> [--if-version <n>] [--order <uuid>]\n assethub workspace context get --internal --org <uuid> --actor <uuid> --canvas <id> [--out <json>] [--order <uuid>]\n assethub project ingest <source-dir> --out-dir <directory> [--exclude-dir <relative-path>...]\n assethub language text|vision --input-json @<json> --operation-id <uuid> [--out <json>]\n assethub canvas import --canvas <id> --file <image> [--name <name>]\n assethub canvas context get --canvas <id> [--out <json>]\n assethub canvas context put --canvas <id> --file <json> [--if-version <n>]\n assethub canvas layout --canvas <id> --input-json @<json>\n assethub canvas compare --canvas <id> --source-id <asset-id> --asset-id <asset-id> --out <html>\n assethub moodboard create --input-json @<json> [--operation-id <uuid>]\n assethub moodboard list|get|update|archive [<board-id>] [--input-json @<json>]\n assethub moodboard analyze <board-id> [--revision <uuid>] [--wait]\n assethub image generate --canvas <id> --context <id> [--context-version <n>] [--context-source <key>] [--moodboard-revision <uuid>] --prompt <text> --wait\n assethub models list [--domain <domain>] [--ids-only] [--limit <n>]\n assethub models get <model-id>\n assethub files import <url> --media-type image|mesh\n assethub files upload <file> --media-type image|mesh\n assethub source create (--file <path> | --source-url <url> | --source-id <id> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) --media-type image|mesh [--file-name <name>] [--content-type <type>]\n assethub capabilities\n assethub composer models\n assethub composer run --part <mesh-asset-id> [--part <mesh-asset-id>...] --reference <image-asset-id> [--model <id>] [--mode quick|quality] [--transforms-json <json|@file>] [--canvas <id>] [--wait]\n assethub composer run --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]\n assethub composer run --from-run <run-id> [--transforms-json <json|@file>] [--mode quick|quality] [--wait]\n assethub canvas create [--name <name>] [--operation-id <uuid>]\n assethub canvas list [--cursor <cursor>] [--limit <n>]\n assethub canvas get|use|open [<id>]\n assethub runs list [--canvas <id>] [--cursor <cursor>] [--limit <n>]\n assethub runs get|watch <run-id> [--timeout-ms <n>]\n assethub runs resume <operation-id> [--wait]\n assethub graph list [--cursor <cursor>] [--limit <n>]\n assethub graph show|export [--canvas <id> | --graph <id>] [--source generated|upload] [--artifact <node-id>] [--out <path>] [--allow-truncated]\n assethub graph lineage --artifact <node-id> [--canvas <id> | --graph <id>] [--source generated|upload] [--direction ancestors|descendants|both] [--depth <n>] [--out <path>]\n assethub evaluate list\n assethub evaluations submit --artifact <asset-id> --report <json|file|@file|@-> [--agent <name>] [--canvas <id>] [--reference <asset-id>...] [--run <run-id>] [--operation-id <uuid>] [--require-pass]\n assethub evaluations list [--canvas <id>] [--artifact <asset-id>]\n assethub evaluations get <evaluation-id>\n assethub image generate --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--agent <name>] [--derived-from-run <run-id>] [--from-node <graphId/nodeId> --graph-revision <rev>] [--wait]\n assethub mesh generate --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--agent <name>] [--derived-from-run <run-id>] [--from-node <graphId/nodeId> --graph-revision <rev>] [--wait]\n assethub mesh list [--query <text>] [--cursor <cursor>] [--limit <n>]\n assethub mesh get <mesh-asset-id>\n assethub mesh download <mesh-asset-id> --out-dir <directory>\n assethub image generate --prompt <text> [--file <path> | --source-url <url> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard] [--file-name <name>] [--content-type <type>] [--model-id <id>] [--batch-size <n>] [--wait] [--download --out-dir <dir>] [--canvas <id>] [--operation-id <uuid>] [--api-version v2]\n assethub image generate --prompt <text> --source-resource-id <id> --api-version v2 [--model-id <id>] [--batch-size <n>] [--wait]\n assethub mesh generate (--file <path> | --source-url <url> | --source-resource-id <id> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) [--file-name <name>] [--content-type <type>] [--model-id <id>] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub mesh retopo (--source-resource-id <id> | --source-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) --model-id <id> [--file-name <name>] [--content-type <type>] [--wait] [--download --out-dir <dir>]\n assethub rig check (--file <path> | --source-url <url> | --source-resource-id <id> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub rig create (--file <path> | --source-url <url> | --source-resource-id <id> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) [--model v1.0-20240301|v2.5-20260210] [--rig-type biped|quadruped|hexapod|octopod|avian|serpentine|aquatic] [--spec tripo|mixamo] [--out-format glb|fbx] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub animate presets [--model v1.0-20240301|v2.5-20260210] [--rig-type <type>]\n assethub animate retarget --resource-id <id> --animation <preset-id> [--animation <preset-id>... up to 5 total] [--out-format glb|fbx] [--bake-animation true|false] [--export-with-geometry true|false] [--animate-in-place true|false] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub jobs get <job-id> [--download --out-dir <dir>]\n assethub jobs watch <job-id> [--interval-ms <ms>] [--timeout-ms <ms>] [--download --out-dir <dir>]\n assethub production analyze (--file <path> | --source-url <url> | --source-id <id> | --image-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) [--file-name <name>] [--content-type <type>] [--part-extractor <name>] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub production agents\n assethub production automation --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--wait]\n assethub production status <order-id> [--wait] [--download --out-dir <dir>]\n assethub production execute --order-id <id> --mission-id <id> --task-id <id> [--task-id <id>...] [--part-extractor <name>] [--part-extraction-mode fast|high_quality] [--wait] [--download --out-dir <dir>]\n assethub production run --order-id <id> --mission-id <id> [--run-mode full_auto|approval] [--task-id <id>...] [--part-extractor <name>] [--part-extraction-mode fast|high_quality] [--allowed-model-id <id>...] [--max-iterations <n>] [--max-cost-credits <n>] [--wait] [--download --out-dir <dir>]\n assethub production watch <order-id> [--interval-ms <ms>] [--timeout-ms <ms>] [--download --out-dir <dir>]\n assethub production intervene <order-id> (--exclude <target-id> | --include <target-id> | --add-part <name> | --rename <target-id>=<name> | --reject <target-id>[=<reason>] | --regenerate <target-id>=<mode> | --set-param <key>=<value> | --ops-json <json|@file|@->)... [--idempotency-key <key>]\n assethub production interventions <order-id>\n assethub runs upload <path> [--graph-id <id>] [--stream-id <id>] [--rev <n>] [--description <text>] [--tag <tag>...] [--skip-register] [--dry-run]\n assethub parts split (--file <path> | --source-url <url> | --source-id <id> | --image-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard | --order-id <id>) [--file-name <name>] [--content-type <type>] [--part-extractor <name>] [--wait] [--task-id <id>...] [--mission-id <id>] [--all-ready] [--download --out-dir <dir>]\n assethub parts compare (--file <path> | --source-url <url> | --source-id <id> | --image-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) [--file-name <name>] [--content-type <type>] [--preprocess-prompt <text>] [--preprocess-model-id <id>] [--fail-on-preprocess-error] [--part-extractor <name>] [--wait] [--task-id <id>...] [--mission-id <id>] [--all-ready] [--download --out-dir <dir>]\n assethub autopilot [<image>] --demo [--yolo] [--json] [--max-regen <n>] [--stall-rounds <n>] [--tie-epsilon <x>] [--multiview 2-view|4-view|6-view] [--ab-mode serial|cross] [--credit-budget <n>]\n\nGlobal options:\n --api-key <key> Overrides saved auth and ASSETHUB_API_KEY.\n --base-url <url> Override the selected API origin. Default: https://app.assethub.io.\n --profile <name> Select this saved profile ahead of environment credentials and origin.\n --config <path> Auth config path. Defaults to ~/.assethub/config.json.\n --version Show installed package version.\n --help Show help.\n\nExamples:\n ASSETHUB_API_KEY=ah_live_xxx assethub models list\n assethub auth login --api-key-stdin\n assethub models list --ids-only\n assethub files upload ./input.png --media-type image\n assethub source create --file ./input.png --media-type image\n pbpaste | assethub source create --stdin-data-uri --media-type image\n assethub source create --clipboard --media-type image --file-name clipboard.png\n printf '{\"image_url\":{\"url\":\"data:image/png;base64,...\"}}' | assethub parts split --stdin-json --part-extractor \"V1.5\" --wait\n base64 -i ./input.png | assethub parts split --stdin-base64 --file-name input.png --content-type image/png --part-extractor \"V1.5\" --wait\n cat ./input.png | assethub parts split --stdin --file-name input.png --part-extractor \"V1.5\" --wait\n assethub image generate --prompt \"stylized prop concept\" --wait\n assethub mesh generate --file ./input.png --wait\n assethub animate presets --rig-type biped\n assethub rig create --source-resource-id mesh_x --rig-type biped --wait\n assethub animate retarget --resource-id rig_x --animation preset:idle --wait\n assethub production analyze --file ./input.png --part-extractor \"V1.5\" --wait\n assethub production run --order-id ord_x --mission-id ms_x --run-mode full_auto --max-cost-credits 200 --wait\n assethub production watch ord_x\n assethub production intervene ord_x --exclude 7 --rename 3=\"left wing\" --idempotency-key review-2026-07-29\n assethub production interventions ord_x\n assethub runs upload ./out/pluffy-run-2026-07-30 --dry-run\n assethub runs upload ./out/pluffy-run-2026-07-30 --tag pluffy --description \"V3 humanoid, 18 parts\"\n assethub parts split --file ./input.png --part-extractor \"V1.5\" --wait --all-ready\n assethub parts compare --file ./input.png --preprocess-prompt \"clean white background, centered product photo\" --part-extractor \"V1.5\" --wait --all-ready\n";
|
|
5
|
+
export declare const usage = "AssetHub CLI\n\nCLI and MCP are available to all AssetHub users. Workspace permissions and feature availability apply.\n\nUsage:\n assethub --version\n assethub doctor [--mcp] [--profile <name>] [--timeout-ms <n>]\n assethub mcp tools [tool-name] [--account] [--profile <name>] [--timeout-ms <n>]\n assethub mcp config --client cursor|codex [--account] [--base-url <url>]\n assethub auth login --api-key <key> [--base-url <url>] [--profile <name>]\n assethub auth login --api-key-stdin [--base-url <url>] [--profile <name>]\n assethub auth login --access-token-stdin [--base-url <url>] [--profile <name>]\n assethub auth status [--profile <name>]\n assethub auth logout [--profile <name>]\n assethub workspace list|get\n assethub workspace create --name <name> [--operation-id <uuid>]\n assethub workspace use <workspace-id>\n assethub workspace members [--workspace <id>]\n assethub workspace invite --email <email> [--role user|admin] [--resend] [--workspace <id>]\n assethub workspace set-role <user-id> --role user|admin [--workspace <id>]\n assethub workspace remove-member <user-id> [--workspace <id>]\n assethub workspace prepare|sync|analyze|verify --internal --manifest <json> --state <json>\n assethub workspace self-check --internal\n assethub workspace context put --internal --org <uuid> --actor <uuid> --canvas <id> --file <json> [--if-version <n>] [--order <uuid>]\n assethub workspace context get --internal --org <uuid> --actor <uuid> --canvas <id> [--out <json>] [--order <uuid>]\n assethub project ingest <source-dir> --out-dir <directory> [--exclude-dir <relative-path>...]\n assethub language text|vision --input-json @<json> --operation-id <uuid> [--out <json>]\n assethub canvas import --canvas <id> --file <image> [--name <name>]\n assethub canvas context get --canvas <id> [--out <json>]\n assethub canvas context put --canvas <id> --file <json> [--if-version <n>]\n assethub canvas layout --canvas <id> --input-json @<json>\n assethub canvas compare --canvas <id> --source-id <asset-id> --asset-id <asset-id> --out <html>\n assethub moodboard create --input-json @<json> [--operation-id <uuid>]\n assethub moodboard list|get|update|archive [<board-id>] [--input-json @<json>]\n assethub moodboard analyze <board-id> [--revision <uuid>] [--wait]\n assethub image generate --canvas <id> --context <id> [--context-version <n>] [--context-source <key>] [--moodboard-revision <uuid>] --prompt <text> --wait\n assethub models list [--domain <domain>] [--ids-only] [--limit <n>]\n assethub models get <model-id>\n assethub files import <url> --media-type image|mesh\n assethub files upload <file> --media-type image|mesh\n assethub source create (--file <path> | --source-url <url> | --source-id <id> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) --media-type image|mesh [--file-name <name>] [--content-type <type>]\n assethub capabilities\n assethub composer models\n assethub composer refine --list-modes\n assethub composer refine --from-run <run-id> --instruction <text> [--mode standard|thorough|placement|workshop|blender] [--max-rounds <n>] [--transforms-json <json|@file>] [--wait] [--download --out-dir <dir>]\n assethub composer refine --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]\n assethub composer run --part <mesh-asset-id> [--part <mesh-asset-id>...] --reference <image-asset-id> [--model <id>] [--mode quick|quality] [--transforms-json <json|@file>] [--canvas <id>] [--wait]\n assethub composer run --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]\n assethub composer run --from-run <run-id> [--transforms-json <json|@file>] [--mode quick|quality] [--wait]\n assethub canvas create [--name <name>] [--operation-id <uuid>]\n assethub canvas list [--cursor <cursor>] [--limit <n>]\n assethub canvas get|use|open [<id>]\n assethub runs list [--canvas <id>] [--cursor <cursor>] [--limit <n>]\n assethub runs get|watch <run-id> [--timeout-ms <n>]\n assethub runs resume <operation-id> [--wait]\n assethub graph list [--cursor <cursor>] [--limit <n>]\n assethub graph show|export [--canvas <id> | --graph <id>] [--source generated|upload] [--artifact <node-id>] [--out <path>] [--allow-truncated]\n assethub graph lineage --artifact <node-id> [--canvas <id> | --graph <id>] [--source generated|upload] [--direction ancestors|descendants|both] [--depth <n>] [--out <path>]\n assethub evaluate list\n assethub evaluations submit --artifact <asset-id> --report <json|file|@file|@-> [--agent <name>] [--canvas <id>] [--reference <asset-id>...] [--run <run-id>] [--operation-id <uuid>] [--require-pass]\n assethub evaluations list [--canvas <id>] [--artifact <asset-id>]\n assethub evaluations get <evaluation-id>\n assethub image generate --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--agent <name>] [--derived-from-run <run-id>] [--from-node <graphId/nodeId> --graph-revision <rev>] [--wait]\n assethub mesh generate --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--agent <name>] [--derived-from-run <run-id>] [--from-node <graphId/nodeId> --graph-revision <rev>] [--wait]\n assethub mesh list [--query <text>] [--cursor <cursor>] [--limit <n>]\n assethub mesh get <mesh-asset-id>\n assethub mesh download <mesh-asset-id> --out-dir <directory>\n assethub image generate --prompt <text> [--file <path> | --source-url <url> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard] [--file-name <name>] [--content-type <type>] [--model-id <id>] [--batch-size <n>] [--wait] [--download --out-dir <dir>] [--canvas <id>] [--operation-id <uuid>] [--api-version v2]\n assethub image generate --prompt <text> --source-resource-id <id> --api-version v2 [--model-id <id>] [--batch-size <n>] [--wait]\n assethub mesh generate (--file <path> | --source-url <url> | --source-resource-id <id> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) [--file-name <name>] [--content-type <type>] [--model-id <id>] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub mesh retopo (--source-resource-id <id> | --source-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) --model-id <id> [--file-name <name>] [--content-type <type>] [--wait] [--download --out-dir <dir>]\n assethub rig check (--file <path> | --source-url <url> | --source-resource-id <id> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub rig create (--file <path> | --source-url <url> | --source-resource-id <id> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri>) [--model v1.0-20240301|v2.5-20260210] [--rig-type biped|quadruped|hexapod|octopod|avian|serpentine|aquatic] [--spec tripo|mixamo] [--out-format glb|fbx] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub animate presets [--model v1.0-20240301|v2.5-20260210] [--rig-type <type>]\n assethub animate retarget --resource-id <id> --animation <preset-id> [--animation <preset-id>... up to 5 total] [--out-format glb|fbx] [--bake-animation true|false] [--export-with-geometry true|false] [--animate-in-place true|false] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub jobs get <job-id> [--download --out-dir <dir>]\n assethub jobs watch <job-id> [--interval-ms <ms>] [--timeout-ms <ms>] [--download --out-dir <dir>]\n assethub production analyze (--file <path> | --source-url <url> | --source-id <id> | --image-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) [--file-name <name>] [--content-type <type>] [--part-extractor <name>] [--name <name>] [--wait] [--download --out-dir <dir>]\n assethub production agents\n assethub production automation --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--wait]\n assethub production status <order-id> [--wait] [--download --out-dir <dir>]\n assethub production execute --order-id <id> --mission-id <id> --task-id <id> [--task-id <id>...] [--part-extractor <name>] [--part-extraction-mode fast|high_quality] [--wait] [--download --out-dir <dir>]\n assethub production run --order-id <id> --mission-id <id> [--run-mode full_auto|approval] [--task-id <id>...] [--part-extractor <name>] [--part-extraction-mode fast|high_quality] [--allowed-model-id <id>...] [--max-iterations <n>] [--max-cost-credits <n>] [--wait] [--download --out-dir <dir>]\n assethub production watch <order-id> [--interval-ms <ms>] [--timeout-ms <ms>] [--download --out-dir <dir>]\n assethub production intervene <order-id> (--exclude <target-id> | --include <target-id> | --add-part <name> | --rename <target-id>=<name> | --reject <target-id>[=<reason>] | --regenerate <target-id>=<mode> | --set-param <key>=<value> | --ops-json <json|@file|@->)... [--idempotency-key <key>]\n assethub production interventions <order-id>\n assethub runs upload <path> [--graph-id <id>] [--stream-id <id>] [--rev <n>] [--description <text>] [--tag <tag>...] [--skip-register] [--dry-run]\n assethub parts split (--file <path> | --source-url <url> | --source-id <id> | --image-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard | --order-id <id>) [--file-name <name>] [--content-type <type>] [--part-extractor <name>] [--wait] [--task-id <id>...] [--mission-id <id>] [--all-ready] [--download --out-dir <dir>]\n assethub parts compare (--file <path> | --source-url <url> | --source-id <id> | --image-url <url> | --file-ref-json <json> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) [--file-name <name>] [--content-type <type>] [--preprocess-prompt <text>] [--preprocess-model-id <id>] [--fail-on-preprocess-error] [--part-extractor <name>] [--wait] [--task-id <id>...] [--mission-id <id>] [--all-ready] [--download --out-dir <dir>]\n assethub autopilot [<image>] --demo [--yolo] [--json] [--max-regen <n>] [--stall-rounds <n>] [--tie-epsilon <x>] [--multiview 2-view|4-view|6-view] [--ab-mode serial|cross] [--credit-budget <n>]\n\nGlobal options:\n --api-key <key> Overrides saved auth and ASSETHUB_API_KEY.\n --base-url <url> Override the selected API origin. Default: https://app.assethub.io.\n --profile <name> Select this saved profile ahead of environment credentials and origin.\n --config <path> Auth config path. Defaults to ~/.assethub/config.json.\n --version Show installed package version.\n --help Show help.\n\nExamples:\n ASSETHUB_API_KEY=ah_live_xxx assethub models list\n assethub auth login --api-key-stdin\n assethub models list --ids-only\n assethub files upload ./input.png --media-type image\n assethub source create --file ./input.png --media-type image\n pbpaste | assethub source create --stdin-data-uri --media-type image\n assethub source create --clipboard --media-type image --file-name clipboard.png\n printf '{\"image_url\":{\"url\":\"data:image/png;base64,...\"}}' | assethub parts split --stdin-json --part-extractor \"V1.5\" --wait\n base64 -i ./input.png | assethub parts split --stdin-base64 --file-name input.png --content-type image/png --part-extractor \"V1.5\" --wait\n cat ./input.png | assethub parts split --stdin --file-name input.png --part-extractor \"V1.5\" --wait\n assethub image generate --prompt \"stylized prop concept\" --wait\n assethub mesh generate --file ./input.png --wait\n assethub animate presets --rig-type biped\n assethub rig create --source-resource-id mesh_x --rig-type biped --wait\n assethub animate retarget --resource-id rig_x --animation preset:idle --wait\n assethub production analyze --file ./input.png --part-extractor \"V1.5\" --wait\n assethub production run --order-id ord_x --mission-id ms_x --run-mode full_auto --max-cost-credits 200 --wait\n assethub production watch ord_x\n assethub production intervene ord_x --exclude 7 --rename 3=\"left wing\" --idempotency-key review-2026-07-29\n assethub production interventions ord_x\n assethub runs upload ./out/pluffy-run-2026-07-30 --dry-run\n assethub runs upload ./out/pluffy-run-2026-07-30 --tag pluffy --description \"V3 humanoid, 18 parts\"\n assethub parts split --file ./input.png --part-extractor \"V1.5\" --wait --all-ready\n assethub parts compare --file ./input.png --preprocess-prompt \"clean white background, centered product photo\" --part-extractor \"V1.5\" --wait --all-ready\n";
|
|
6
6
|
/**
|
|
7
7
|
* The `animate retarget` request, built from flags alone.
|
|
8
8
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAsBA,OAAO,EAIL,KAAK,wBAAwB,EAO7B,KAAK,YAAY,EAEjB,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAsBA,OAAO,EAIL,KAAK,wBAAwB,EAO7B,KAAK,YAAY,EAEjB,KAAK,UAAU,EAgBhB,MAAM,sBAAsB,CAAA;AAa7B,OAAO,EAAC,kBAAkB,EAAc,MAAM,gCAAgC,CAAA;AAI9E,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,CAAA;AAoIxD,eAAO,MAAM,KAAK,4zZA4HjB,CAAA;AAq1ED;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,GACxC,OAAO,KAAK,KACX,wBA0BF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,KACX,IAAI,CAAC,UAAU,EAAE,QAAQ,CAM1B,CAAA;AA6fF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,SAAS,MAAM,EAAE,KACtB,YAAY,EAuGd,CAAA;AAmqCD,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,EAAE,EACrB,OAAO,KAAK,KACX,cAoBF,CAAA;AAED,KAAK,iBAAiB,GAAG,IAAI,CAC3B,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,EAC5C,SAAS,GACT,UAAU,GACV,KAAK,GACL,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,CACb,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,WAAW,MAAM,EACjB,MAAM,iBAAiB;;;;;;;;;;;;;;CAUvB,CAAA;AAEF,eAAO,MAAM,sBAAsB,GACjC,SAAS,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAC7C,MAAM,iBAAiB,EACvB,SAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAYf,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ const defaultImageModelId = 'imageGen.nanoBanana2.openrouter';
|
|
|
28
28
|
const defaultMeshModelId = 'meshGen.hunyuan31';
|
|
29
29
|
const defaultProfileName = 'default';
|
|
30
30
|
const defaultPartExtractorName = 'V1.5';
|
|
31
|
-
const
|
|
31
|
+
const isArtifactGraphPartExtractor = (value) => value === 'ah_agent_graph_v3_6_1' || value === 'ah_agent_graph_v3_6_3';
|
|
32
32
|
const partExtractorOptions = [
|
|
33
33
|
{
|
|
34
34
|
publicName: 'V1.5',
|
|
@@ -47,9 +47,14 @@ const partExtractorOptions = [
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
publicName: 'V3.6.1',
|
|
50
|
-
apiValue:
|
|
50
|
+
apiValue: 'ah_agent_graph_v3_6_1',
|
|
51
51
|
aliases: ['v3.6.1', '3.6.1', 'v3.6.1 primary images first'],
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
publicName: 'V3.6.3',
|
|
55
|
+
apiValue: 'ah_agent_graph_v3_6_3',
|
|
56
|
+
aliases: ['v3.6.3', '3.6.3', 'v3.6.3 fast analysis'],
|
|
57
|
+
},
|
|
53
58
|
];
|
|
54
59
|
const partExtractorPublicNames = partExtractorOptions
|
|
55
60
|
.map(option => option.publicName)
|
|
@@ -105,6 +110,9 @@ Usage:
|
|
|
105
110
|
assethub source create (--file <path> | --source-url <url> | --source-id <id> | --stdin | --stdin-base64 | --stdin-data-uri | --stdin-json | --source-json <json|@file|@-> | --data-uri <uri> | --clipboard) --media-type image|mesh [--file-name <name>] [--content-type <type>]
|
|
106
111
|
assethub capabilities
|
|
107
112
|
assethub composer models
|
|
113
|
+
assethub composer refine --list-modes
|
|
114
|
+
assethub composer refine --from-run <run-id> --instruction <text> [--mode standard|thorough|placement|workshop|blender] [--max-rounds <n>] [--transforms-json <json|@file>] [--wait] [--download --out-dir <dir>]
|
|
115
|
+
assethub composer refine --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]
|
|
108
116
|
assethub composer run --part <mesh-asset-id> [--part <mesh-asset-id>...] --reference <image-asset-id> [--model <id>] [--mode quick|quality] [--transforms-json <json|@file>] [--canvas <id>] [--wait]
|
|
109
117
|
assethub composer run --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]
|
|
110
118
|
assethub composer run --from-run <run-id> [--transforms-json <json|@file>] [--mode quick|quality] [--wait]
|
|
@@ -1690,11 +1698,162 @@ const commandImage = async (subcommand, ctx) => {
|
|
|
1690
1698
|
input.sources = await Promise.all(input.sources.map(source => recordedSource(ctx, source)));
|
|
1691
1699
|
await printRecorded(ctx, await executeRecorded(session, 'image.generate', input, { ...executionOptions(ctx.flags), graphSource: graphInput?.graphSource }));
|
|
1692
1700
|
};
|
|
1701
|
+
const meshRefinementModes = [
|
|
1702
|
+
'standard',
|
|
1703
|
+
'thorough',
|
|
1704
|
+
'placement',
|
|
1705
|
+
'workshop',
|
|
1706
|
+
'blender',
|
|
1707
|
+
];
|
|
1708
|
+
const refinementTransforms = (value, flag) => {
|
|
1709
|
+
if (value == null || typeof value !== 'object' || Array.isArray(value))
|
|
1710
|
+
throw new Error(`${flag} must be an object keyed by part asset ID`);
|
|
1711
|
+
const result = {};
|
|
1712
|
+
for (const [assetId, transform] of Object.entries(value)) {
|
|
1713
|
+
if (!Array.isArray(transform) ||
|
|
1714
|
+
transform.length !== 10 ||
|
|
1715
|
+
transform.some(entry => typeof entry !== 'number' || !Number.isFinite(entry)))
|
|
1716
|
+
throw new Error(`${flag} must contain ten finite numbers for ${assetId}`);
|
|
1717
|
+
result[assetId] = transform;
|
|
1718
|
+
}
|
|
1719
|
+
if (Object.keys(result).length === 0)
|
|
1720
|
+
throw new Error(`${flag} must contain at least one part transform`);
|
|
1721
|
+
return result;
|
|
1722
|
+
};
|
|
1723
|
+
const refinementTransform = (value, flag) => {
|
|
1724
|
+
if (!Array.isArray(value) ||
|
|
1725
|
+
value.length !== 10 ||
|
|
1726
|
+
value.some(entry => typeof entry !== 'number' || !Number.isFinite(entry)))
|
|
1727
|
+
throw new Error(`${flag} must contain ten finite numbers`);
|
|
1728
|
+
return value;
|
|
1729
|
+
};
|
|
1730
|
+
const refinementModeInfo = (capabilities, mode) => {
|
|
1731
|
+
const info = capabilities.modes.find(item => item.id === mode);
|
|
1732
|
+
if (!info)
|
|
1733
|
+
throw new Error(`Unknown refinement mode: ${mode}`);
|
|
1734
|
+
if (!info.available)
|
|
1735
|
+
throw new Error(`Refinement mode ${mode} is unavailable${info.reason ? `: ${info.reason}` : ''}`);
|
|
1736
|
+
return info;
|
|
1737
|
+
};
|
|
1738
|
+
const commandComposerRefine = async (ctx) => {
|
|
1739
|
+
const capabilities = await ctx.client.v2.getMeshRefinementModes();
|
|
1740
|
+
if (hasFlag(ctx.flags, 'list-modes')) {
|
|
1741
|
+
print(capabilities);
|
|
1742
|
+
return;
|
|
1743
|
+
}
|
|
1744
|
+
const fromRun = getFlag(ctx.flags, 'from-run');
|
|
1745
|
+
const json = getFlag(ctx.flags, 'input-json');
|
|
1746
|
+
const parts = getFlagValues(ctx.flags, 'part');
|
|
1747
|
+
const reference = getFlag(ctx.flags, 'reference');
|
|
1748
|
+
if ((fromRun && (json || parts.length || reference)) ||
|
|
1749
|
+
(json && (parts.length || reference)))
|
|
1750
|
+
throw new Error('Choose --from-run, --input-json, or --part with --reference');
|
|
1751
|
+
const previous = fromRun ? await ctx.client.v2.getRun(fromRun) : undefined;
|
|
1752
|
+
if (previous &&
|
|
1753
|
+
previous.operation !== 'mesh.compose' &&
|
|
1754
|
+
previous.operation !== 'mesh.refine')
|
|
1755
|
+
throw new Error('--from-run must identify a mesh.compose or mesh.refine execution');
|
|
1756
|
+
if (previous && ['queued', 'running'].includes(previous.status))
|
|
1757
|
+
throw new Error('--from-run must identify a finished mesh.compose or mesh.refine checkpoint');
|
|
1758
|
+
const input = json
|
|
1759
|
+
? await readJsonArgument(json, '--input-json')
|
|
1760
|
+
: previous
|
|
1761
|
+
? {
|
|
1762
|
+
...(previous.requestedInput ?? previous.input),
|
|
1763
|
+
...(previous.operation === 'mesh.refine' &&
|
|
1764
|
+
(previous.requestedInput?.mode ?? previous.input.mode)
|
|
1765
|
+
? { mode: previous.requestedInput?.mode ?? previous.input.mode }
|
|
1766
|
+
: { mode: undefined }),
|
|
1767
|
+
parts: previous.composition?.parts ??
|
|
1768
|
+
previous.requestedInput?.parts ??
|
|
1769
|
+
previous.input.parts,
|
|
1770
|
+
transforms: previous.composition?.transforms,
|
|
1771
|
+
referenceTransform: previous.composition?.referenceTransform ??
|
|
1772
|
+
previous.requestedInput?.referenceTransform ??
|
|
1773
|
+
previous.input.referenceTransform,
|
|
1774
|
+
}
|
|
1775
|
+
: {
|
|
1776
|
+
parts: parts.map(assetId => ({
|
|
1777
|
+
assetId: assertFlagHasValue(assetId, '--part <asset-id>'),
|
|
1778
|
+
})),
|
|
1779
|
+
fullBodyImageAssetId: requireFlag(ctx.flags, 'reference'),
|
|
1780
|
+
};
|
|
1781
|
+
delete input.executionContext;
|
|
1782
|
+
if (!Array.isArray(input.parts) || input.parts.length === 0)
|
|
1783
|
+
throw new Error('Composer refinement requires parts[]');
|
|
1784
|
+
const refinementParts = input.parts.map((part, index) => {
|
|
1785
|
+
if (!part ||
|
|
1786
|
+
typeof part !== 'object' ||
|
|
1787
|
+
typeof part.assetId !== 'string' ||
|
|
1788
|
+
!part.assetId)
|
|
1789
|
+
throw new Error(`Composer refinement part ${index + 1} requires assetId`);
|
|
1790
|
+
return part;
|
|
1791
|
+
});
|
|
1792
|
+
if (typeof input.fullBodyImageAssetId !== 'string' ||
|
|
1793
|
+
input.fullBodyImageAssetId.length === 0)
|
|
1794
|
+
throw new Error('Composer refinement requires fullBodyImageAssetId');
|
|
1795
|
+
const instruction = getFlag(ctx.flags, 'instruction') ?? input.instruction;
|
|
1796
|
+
if (typeof instruction !== 'string' || !instruction.trim())
|
|
1797
|
+
throw new Error('Composer refinement requires --instruction');
|
|
1798
|
+
const mode = parseEnumFlag(ctx.flags, 'mode', meshRefinementModes) ??
|
|
1799
|
+
input.mode ??
|
|
1800
|
+
capabilities.defaultMode;
|
|
1801
|
+
if (!meshRefinementModes.includes(mode))
|
|
1802
|
+
throw new Error(`--mode must be one of: ${meshRefinementModes.join(', ')}`);
|
|
1803
|
+
const modeInfo = refinementModeInfo(capabilities, mode);
|
|
1804
|
+
const maxRoundsFlag = getFlag(ctx.flags, 'max-rounds');
|
|
1805
|
+
const inputMaxRounds = input.maxRounds;
|
|
1806
|
+
if (inputMaxRounds != null &&
|
|
1807
|
+
(typeof inputMaxRounds !== 'number' ||
|
|
1808
|
+
!Number.isInteger(inputMaxRounds) ||
|
|
1809
|
+
inputMaxRounds <= 0))
|
|
1810
|
+
throw new Error('maxRounds must be a positive integer');
|
|
1811
|
+
const maxRounds = maxRoundsFlag == null
|
|
1812
|
+
? inputMaxRounds
|
|
1813
|
+
: parsePositiveIntegerFlag(ctx.flags, 'max-rounds', 1);
|
|
1814
|
+
if (maxRounds != null && (!Number.isInteger(maxRounds) || maxRounds <= 0))
|
|
1815
|
+
throw new Error('--max-rounds must be a positive integer');
|
|
1816
|
+
if (maxRounds != null && maxRounds > modeInfo.maxRounds)
|
|
1817
|
+
throw new Error(`--max-rounds must be at most ${modeInfo.maxRounds} for ${mode}`);
|
|
1818
|
+
const transformsFlag = getFlag(ctx.flags, 'transforms-json');
|
|
1819
|
+
const transforms = transformsFlag
|
|
1820
|
+
? refinementTransforms(await readJsonArgument(transformsFlag, '--transforms-json'), '--transforms-json')
|
|
1821
|
+
: refinementTransforms(input.transforms, 'refinement transforms');
|
|
1822
|
+
const referenceTransform = input.referenceTransform == null
|
|
1823
|
+
? undefined
|
|
1824
|
+
: refinementTransform(input.referenceTransform, 'referenceTransform');
|
|
1825
|
+
const explicitCanvas = selectedCanvasId(ctx.flags);
|
|
1826
|
+
const canvasId = explicitCanvas ?? previous?.canvas.id;
|
|
1827
|
+
if (previous && canvasId !== previous.canvas.id)
|
|
1828
|
+
throw new Error('Refinement must use the original canvas to retain lineage');
|
|
1829
|
+
const session = await openExecutionSession({
|
|
1830
|
+
...stateOptions(ctx),
|
|
1831
|
+
canvasId,
|
|
1832
|
+
operation: 'mesh.refine',
|
|
1833
|
+
});
|
|
1834
|
+
const body = {
|
|
1835
|
+
parts: refinementParts,
|
|
1836
|
+
fullBodyImageAssetId: input.fullBodyImageAssetId,
|
|
1837
|
+
transforms,
|
|
1838
|
+
...(referenceTransform ? { referenceTransform } : {}),
|
|
1839
|
+
mode,
|
|
1840
|
+
instruction,
|
|
1841
|
+
...(maxRounds != null ? { maxRounds } : {}),
|
|
1842
|
+
};
|
|
1843
|
+
await printRecorded(ctx, await executeRecorded(session, 'mesh.refine', body, {
|
|
1844
|
+
...executionOptions(ctx.flags),
|
|
1845
|
+
...(previous ? { parentRunId: previous.runId } : {}),
|
|
1846
|
+
}));
|
|
1847
|
+
};
|
|
1693
1848
|
const commandComposer = async (subcommand, ctx) => {
|
|
1694
1849
|
if (subcommand === 'models') {
|
|
1695
1850
|
print(await ctx.client.v2.getMeshComposers());
|
|
1696
1851
|
return;
|
|
1697
1852
|
}
|
|
1853
|
+
if (subcommand === 'refine') {
|
|
1854
|
+
await commandComposerRefine(ctx);
|
|
1855
|
+
return;
|
|
1856
|
+
}
|
|
1698
1857
|
if (subcommand !== 'run')
|
|
1699
1858
|
throw new Error('Use composer models|run');
|
|
1700
1859
|
const fromRun = getFlag(ctx.flags, 'from-run');
|
|
@@ -2592,7 +2751,7 @@ const isArtifactGraphPartSplit = (value, execution) => (value != null &&
|
|
|
2592
2751
|
typeof value === 'object' &&
|
|
2593
2752
|
'engine' in value &&
|
|
2594
2753
|
value.engine === 'artifact-graph') ||
|
|
2595
|
-
execution.resolvedInput?.agentVersion
|
|
2754
|
+
isArtifactGraphPartExtractor(execution.resolvedInput?.agentVersion);
|
|
2596
2755
|
const commandParts = async (subcommand, ctx) => {
|
|
2597
2756
|
const runPartSplit = async (source, operationId = getFlag(ctx.flags, 'operation-id') ?? randomUUID()) => {
|
|
2598
2757
|
let orderId = source == null ? getFlag(ctx.flags, 'order-id') : undefined;
|
|
@@ -2603,13 +2762,14 @@ const commandParts = async (subcommand, ctx) => {
|
|
|
2603
2762
|
const requestedAgentVersion = orderId == null || partExtractorFlag != null
|
|
2604
2763
|
? resolvePartExtractorApiValue(partExtractorFlag ?? defaultPartExtractorName)
|
|
2605
2764
|
: undefined;
|
|
2606
|
-
if (requestedAgentVersion
|
|
2765
|
+
if (isArtifactGraphPartExtractor(requestedAgentVersion)) {
|
|
2766
|
+
const name = partExtractorPublicNameByApiValue.get(requestedAgentVersion);
|
|
2607
2767
|
for (const flag of ['task-id', 'mission-id', 'part-extraction-mode']) {
|
|
2608
2768
|
if (hasFlag(ctx.flags, flag))
|
|
2609
|
-
throw new Error(`--${flag} is not supported with
|
|
2769
|
+
throw new Error(`--${flag} is not supported with ${name}`);
|
|
2610
2770
|
}
|
|
2611
2771
|
if (orderId != null)
|
|
2612
|
-
throw new Error(
|
|
2772
|
+
throw new Error(`--order-id is not supported with ${name}; use runs resume <operation-id> to resume a graph split`);
|
|
2613
2773
|
}
|
|
2614
2774
|
const session = await productionSession(ctx, orderId == null ? 'production.analyze' : 'production.execute');
|
|
2615
2775
|
let execution;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assethub/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Command line interface for AssetHub.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@assethub/api-client": "^0.1.
|
|
33
|
+
"@assethub/api-client": "^0.1.8",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.30.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|