@assethub/cli 0.1.21 → 0.1.23
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 +22 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +5 -5
- package/dist/index.d.ts +23 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +202 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Command line interface for AssetHub.
|
|
4
4
|
|
|
5
|
+
## API discovery and Workspace Skills
|
|
6
|
+
|
|
7
|
+
Use `api search [query]` to discover the authenticated server catalog and
|
|
8
|
+
`api describe "METHOD /path"` to inspect an exact request contract. `api call`
|
|
9
|
+
accepts `--path-json`, `--query-json`, and `--input-json` (inline JSON or `@file`).
|
|
10
|
+
Mutations require an explicit stable `--operation-id <uuid>`. Preserve that UUID
|
|
11
|
+
and exact inputs; inspect any returned run ID before retrying uncertain work.
|
|
12
|
+
The server's workspace, gate, billing, and terminal-result rules still apply.
|
|
13
|
+
|
|
14
|
+
`skills list|get|learn|update|controls|prepare|proposal|accept` uses the existing
|
|
15
|
+
Workspace Skills API. Read `--help` for required revisions and JSON inputs.
|
|
16
|
+
For V3.7 Artist Skills analysis, `production analyze` accepts
|
|
17
|
+
`--skill-mode auto|manual|off` and up to three distinct `--skill-id <id>` values.
|
|
18
|
+
Manual selection requires IDs; off rejects them. The server resolves authorized
|
|
19
|
+
published skill revisions and keeps Internal gates and actor checks in force.
|
|
20
|
+
|
|
21
|
+
For complete-object graph models, add `--context <canvas-id> --context-version <n>`
|
|
22
|
+
to `production analyze` to apply that exact saved Must/Avoid guidance. Both flags
|
|
23
|
+
are required together; `--context` also selects the execution canvas and must
|
|
24
|
+
match `--canvas` when supplied. Stale revisions and unsupported engines fail
|
|
25
|
+
before generation. Guidance does not expand the model's supported part boundaries.
|
|
26
|
+
|
|
5
27
|
## Personal API keys
|
|
6
28
|
|
|
7
29
|
Log in once with a personal key, then select its workspace:
|
package/dist/execution.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EACjC,MAAM,sBAAsB,CAAA;AAG7B,QAAA,MAAM,UAAU,kJAQN,CAAA;AACV,KAAK,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAC5C,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,cAAc,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AACD,eAAO,MAAM,oBAAoB,GAAU,SAAS,cAAc;;;;;YAPxD,cAAc;cACZ,MAAM;SACX,MAAM;eACA,MAAM;gBACL,SAAS;aACZ,OAAO;EAoBjB,CAAA;AACD,KAAK,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAA;AAC/D,KAAK,WAAW,GACZ,sBAAsB,GACtB,qBAAqB,GACrB,IAAI,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,GAC5C,IAAI,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,GAC3C,wBAAwB,GACxB,wBAAwB,GACxB,2BAA2B,CAAA;AAU/B,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAChB,aAAa,MAAM,qBACyD,CAAA;AAC9E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;IACtC,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDF,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,cAAc,EACtB,OAAO,MAAM,EACb,UAAS;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAA;CAC7C,KACL,OAAO,CAAC,eAAe,CA2CzB,CAAA"}
|
package/dist/execution.js
CHANGED
|
@@ -138,22 +138,22 @@ const submitSaved = async (session, saved, retryDelayMs = 250) => {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
catch (error) {
|
|
141
|
-
if (error instanceof AssetHubApiError &&
|
|
142
|
-
error.code === 'EXECUTION_RECOVERY_REQUIRED' &&
|
|
143
|
-
error.runId) {
|
|
141
|
+
if (error instanceof AssetHubApiError && error.runId) {
|
|
144
142
|
saved.runId = error.runId;
|
|
145
143
|
activeExecution.runId = error.runId;
|
|
146
144
|
await writeState(operationPath(session.stateDir, saved.operationId), saved);
|
|
147
145
|
activeExecution.execution = await session.client.v2
|
|
148
146
|
.getRun(error.runId, { signal: AbortSignal.timeout(5_000) })
|
|
149
147
|
.catch(() => undefined);
|
|
150
|
-
|
|
148
|
+
if (error.code === 'EXECUTION_RECOVERY_REQUIRED') {
|
|
149
|
+
throw new CliExecutionError(error.message, 3, saved.operationId, activeExecution.execution, error.runId);
|
|
150
|
+
}
|
|
151
151
|
}
|
|
152
152
|
throw new CliExecutionError(error instanceof Error ? error.message : String(error), error instanceof AssetHubApiError &&
|
|
153
153
|
(error.status < 500 ||
|
|
154
154
|
['CANVAS_EXECUTION_UNAVAILABLE', 'EVALUATOR_UNAVAILABLE'].includes(error.code))
|
|
155
155
|
? 2
|
|
156
|
-
: 1, saved.operationId, activeExecution.execution);
|
|
156
|
+
: 1, saved.operationId, activeExecution.execution, activeExecution.runId);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
export const executeRecorded = async (session, operation, body, options = {}) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { type AnimationRetargetRequest, type Intervention, type RigRequest } from '@assethub/api-client';
|
|
2
|
+
import { type AnimationRetargetRequest, type Intervention, type RigRequest, createAssetHubClient } 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 [--query <text>] [--limit <1-100>] [--cursor <cursor>]\n assethub workspace 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 download --canvas <id> --out-dir <directory> [--mesh <mesh_asset_id>]\n assethub canvas nodes --canvas <id>\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 composer run --node <shape:id> --canvas <id> [--model <id>] [--mode quick|quality] [--operation-id <uuid>] [--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 generate --node <shape:id> --canvas <id> [--model-id <id>] [--params-json <json|@file>] [--operation-id <uuid>] [--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 --workspace <id> Select workspace scope for this command without changing saved selection.\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
|
+
type ResolvedAuth = {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
authentication?: 'personal';
|
|
8
|
+
workspaceId?: string;
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
profile: string;
|
|
11
|
+
source: 'flag' | 'env' | 'profile';
|
|
12
|
+
};
|
|
13
|
+
type CommandContext = {
|
|
14
|
+
client: ReturnType<typeof createAssetHubClient>;
|
|
15
|
+
flags: Flags;
|
|
16
|
+
auth: ResolvedAuth;
|
|
17
|
+
/**
|
|
18
|
+
* The raw argument slice, kept alongside the parsed flags because `Flags` is
|
|
19
|
+
* keyed by flag name and so cannot say which of two different flags came
|
|
20
|
+
* first. `production intervene` needs that order: an intervention batch's seq
|
|
21
|
+
* order in the log is the operator's own order of decisions.
|
|
22
|
+
*/
|
|
23
|
+
args: string[];
|
|
24
|
+
};
|
|
25
|
+
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 [--query <text>] [--limit <1-100>] [--cursor <cursor>]\n assethub workspace 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 download --canvas <id> --out-dir <directory> [--mesh <mesh_asset_id>]\n assethub canvas nodes --canvas <id>\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 api search [query]\n assethub api describe \"<METHOD /path>\"\n assethub api call \"<METHOD /path>\" [--path-json <json|@file>] [--query-json <json|@file>] [--input-json <json|@file|@->] [--operation-id <uuid>]\n assethub skills list [--cursor <cursor>]\n assethub skills get <skill-id> [--revision <n>]\n assethub skills learn --input-json <json|@file|@-> --operation-id <uuid>\n assethub skills update <skill-id> --input-json <json|@file|@->\n assethub skills controls <skill-id> --revision <n> --grant-revision <n> --mode automatic|manual|off [--share]\n assethub skills prepare --input-json <json|@file|@->\n assethub skills proposal <proposal-id>\n assethub skills accept <proposal-id> --input-json <json|@file|@->\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|codex] [--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 composer run --node <shape:id> --canvas <id> [--model <id>] [--mode quick|quality] [--operation-id <uuid>] [--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 generate --node <shape:id> --canvas <id> [--model-id <id>] [--params-json <json|@file>] [--operation-id <uuid>] [--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>] [--skill-mode auto|manual|off] [--skill-id <id>...] [--context <canvas-id> --context-version <n>] [--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 --workspace <id> Select workspace scope for this command without changing saved selection.\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";
|
|
26
|
+
export declare const commandSkills: (subcommand: string | undefined, positionals: string[], ctx: CommandContext) => Promise<void>;
|
|
6
27
|
/**
|
|
7
28
|
* The `animate retarget` request, built from flags alone.
|
|
8
29
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA4BA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA4BA,OAAO,EAQL,KAAK,wBAAwB,EAO7B,KAAK,YAAY,EAEjB,KAAK,UAAU,EAef,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAc7B,OAAO,EAAC,kBAAkB,EAA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M,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
|
@@ -15,7 +15,7 @@ import { basename, dirname, extname, join, resolve } from 'node:path';
|
|
|
15
15
|
import { argv, env, exit, stdin, stderr, stdout } from 'node:process';
|
|
16
16
|
import { fileURLToPath } from 'node:url';
|
|
17
17
|
import { promisify } from 'node:util';
|
|
18
|
-
import { AssetHubApiError, WorkspaceClientError, createWorkspaceClient, createAssetHubClient, } from '@assethub/api-client';
|
|
18
|
+
import { AssetHubApiError, callApiOperation, describeApiOperation, discoverApiOperations, searchApiOperations, WorkspaceClientError, createWorkspaceClient, createAssetHubClient, } from '@assethub/api-client';
|
|
19
19
|
import { resolveCanvasSelection, saveCanvasSelection } from './canvas.js';
|
|
20
20
|
import { activeExecution, childOperationId, CliExecutionError, executeRecorded, hasRecordedOperation, openExecutionSession, resumeRecorded, waitForExecution, } from './execution.js';
|
|
21
21
|
import { buildRunUploadPlan, formatBytes } from './runsUpload/buildRunUpload.js';
|
|
@@ -36,6 +36,7 @@ const artifactGraphPartExtractorApiValues = new Set([
|
|
|
36
36
|
'ah_agent_graph_v3_6_4',
|
|
37
37
|
'ah_agent_graph_v3_6_5',
|
|
38
38
|
'ah_agent_graph_pluffy_v3_1',
|
|
39
|
+
'ah_agent_graph_v3_7',
|
|
39
40
|
]);
|
|
40
41
|
const partExtractorOptions = [
|
|
41
42
|
{
|
|
@@ -78,6 +79,11 @@ const partExtractorOptions = [
|
|
|
78
79
|
apiValue: 'ah_agent_graph_pluffy_v3_1',
|
|
79
80
|
aliases: ['pluffy', 'pluffy v3.1', 'pluffy 3.1'],
|
|
80
81
|
},
|
|
82
|
+
{
|
|
83
|
+
publicName: 'V3.7 Artist Skills',
|
|
84
|
+
apiValue: 'ah_agent_graph_v3_7',
|
|
85
|
+
aliases: ['v3.7', '3.7'],
|
|
86
|
+
},
|
|
81
87
|
];
|
|
82
88
|
const partExtractorPublicNames = partExtractorOptions
|
|
83
89
|
.map(option => option.publicName)
|
|
@@ -135,9 +141,20 @@ Usage:
|
|
|
135
141
|
assethub files upload <file> --media-type image|mesh
|
|
136
142
|
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>]
|
|
137
143
|
assethub capabilities
|
|
144
|
+
assethub api search [query]
|
|
145
|
+
assethub api describe "<METHOD /path>"
|
|
146
|
+
assethub api call "<METHOD /path>" [--path-json <json|@file>] [--query-json <json|@file>] [--input-json <json|@file|@->] [--operation-id <uuid>]
|
|
147
|
+
assethub skills list [--cursor <cursor>]
|
|
148
|
+
assethub skills get <skill-id> [--revision <n>]
|
|
149
|
+
assethub skills learn --input-json <json|@file|@-> --operation-id <uuid>
|
|
150
|
+
assethub skills update <skill-id> --input-json <json|@file|@->
|
|
151
|
+
assethub skills controls <skill-id> --revision <n> --grant-revision <n> --mode automatic|manual|off [--share]
|
|
152
|
+
assethub skills prepare --input-json <json|@file|@->
|
|
153
|
+
assethub skills proposal <proposal-id>
|
|
154
|
+
assethub skills accept <proposal-id> --input-json <json|@file|@->
|
|
138
155
|
assethub composer models
|
|
139
156
|
assethub composer refine --list-modes
|
|
140
|
-
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>]
|
|
157
|
+
assethub composer refine --from-run <run-id> --instruction <text> [--mode standard|thorough|placement|workshop|blender|codex] [--max-rounds <n>] [--transforms-json <json|@file>] [--wait] [--download --out-dir <dir>]
|
|
141
158
|
assethub composer refine --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]
|
|
142
159
|
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]
|
|
143
160
|
assethub composer run --input-json <json|@file> [--canvas <id>] [--operation-id <uuid>] [--wait] [--download --out-dir <dir>]
|
|
@@ -172,7 +189,7 @@ Usage:
|
|
|
172
189
|
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>]
|
|
173
190
|
assethub jobs get <job-id> [--download --out-dir <dir>]
|
|
174
191
|
assethub jobs watch <job-id> [--interval-ms <ms>] [--timeout-ms <ms>] [--download --out-dir <dir>]
|
|
175
|
-
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>]
|
|
192
|
+
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>] [--skill-mode auto|manual|off] [--skill-id <id>...] [--context <canvas-id> --context-version <n>] [--wait] [--download --out-dir <dir>]
|
|
176
193
|
assethub production agents
|
|
177
194
|
assethub production automation --input-json <json|@file|@-> [--canvas <id>] [--operation-id <uuid>] [--wait]
|
|
178
195
|
assethub production status <order-id> [--wait] [--download --out-dir <dir>]
|
|
@@ -313,6 +330,30 @@ const resolvePartExtractorApiValue = (value) => {
|
|
|
313
330
|
return option.apiValue;
|
|
314
331
|
};
|
|
315
332
|
const resolvePartExtractorForAnalyze = (flags) => resolvePartExtractorApiValue(getPartExtractorFlag(flags) ?? defaultPartExtractorName);
|
|
333
|
+
const resolveProductionSkillSelection = (flags, agentVersion) => {
|
|
334
|
+
const mode = getFlag(flags, 'skill-mode');
|
|
335
|
+
const skillIds = getFlagValues(flags, 'skill-id').map(value => assertFlagHasValue(value, '--skill-id <id>'));
|
|
336
|
+
if (mode == null) {
|
|
337
|
+
if (skillIds.length > 0)
|
|
338
|
+
throw new Error('--skill-id requires --skill-mode');
|
|
339
|
+
return undefined;
|
|
340
|
+
}
|
|
341
|
+
if (mode !== 'auto' && mode !== 'manual' && mode !== 'off')
|
|
342
|
+
throw new Error('--skill-mode must be "auto", "manual", or "off"');
|
|
343
|
+
if (agentVersion !== 'ah_agent_graph_v3_7')
|
|
344
|
+
throw new Error('--skill-mode is supported only with V3.7 Artist Skills');
|
|
345
|
+
if (skillIds.length > 3)
|
|
346
|
+
throw new Error('--skill-id accepts at most 3 values');
|
|
347
|
+
if (new Set(skillIds).size !== skillIds.length)
|
|
348
|
+
throw new Error('--skill-id values must be unique');
|
|
349
|
+
if (skillIds.some(skillId => !/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(skillId)))
|
|
350
|
+
throw new Error('--skill-id contains an invalid workspace skill ID');
|
|
351
|
+
if (mode === 'manual' && skillIds.length === 0)
|
|
352
|
+
throw new Error('--skill-mode manual requires at least one --skill-id');
|
|
353
|
+
if (mode === 'off' && skillIds.length > 0)
|
|
354
|
+
throw new Error('--skill-mode off does not accept --skill-id');
|
|
355
|
+
return { mode, skillIds };
|
|
356
|
+
};
|
|
316
357
|
const publicPartExtractorName = (value) => {
|
|
317
358
|
if (value == null) {
|
|
318
359
|
return null;
|
|
@@ -1275,6 +1316,112 @@ const commandSource = async (subcommand, ctx) => {
|
|
|
1275
1316
|
}
|
|
1276
1317
|
print({ source, fileRef: source.fileRef, mediaType });
|
|
1277
1318
|
};
|
|
1319
|
+
const commandApi = async (subcommand, positionals, ctx) => {
|
|
1320
|
+
if (!['search', 'describe', 'call'].includes(subcommand ?? ''))
|
|
1321
|
+
throw new Error('Use api search|describe|call. Mutations require --operation-id.');
|
|
1322
|
+
const discovery = await discoverApiOperations(ctx.client);
|
|
1323
|
+
if (subcommand === 'search') {
|
|
1324
|
+
print({
|
|
1325
|
+
operations: searchApiOperations(discovery.catalog, positionals.slice(2).join(' ')),
|
|
1326
|
+
});
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
const operation = requirePositional(positionals, 2, 'operation');
|
|
1330
|
+
if (subcommand === 'describe') {
|
|
1331
|
+
const found = discovery.catalog.get(operation);
|
|
1332
|
+
if (!found)
|
|
1333
|
+
throw new Error('Unknown operation. Use api search first.');
|
|
1334
|
+
print(describeApiOperation(found, discovery.specs[found.path.startsWith('/api/v1/') ? 'v1' : 'v2']));
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1337
|
+
const pathJson = getFlag(ctx.flags, 'path-json');
|
|
1338
|
+
const queryJson = getFlag(ctx.flags, 'query-json');
|
|
1339
|
+
const bodyJson = getFlag(ctx.flags, 'input-json');
|
|
1340
|
+
const operationId = getFlag(ctx.flags, 'operation-id');
|
|
1341
|
+
activeExecution.operationId = operationId;
|
|
1342
|
+
try {
|
|
1343
|
+
print(await callApiOperation(ctx.client, discovery, {
|
|
1344
|
+
operation,
|
|
1345
|
+
operationId,
|
|
1346
|
+
path: pathJson
|
|
1347
|
+
? (await readJsonArgument(pathJson, '--path-json'))
|
|
1348
|
+
: undefined,
|
|
1349
|
+
query: queryJson
|
|
1350
|
+
? (await readJsonArgument(queryJson, '--query-json'))
|
|
1351
|
+
: undefined,
|
|
1352
|
+
body: bodyJson
|
|
1353
|
+
? await readJsonArgument(bodyJson, '--input-json')
|
|
1354
|
+
: undefined,
|
|
1355
|
+
}));
|
|
1356
|
+
}
|
|
1357
|
+
catch (error) {
|
|
1358
|
+
if (error instanceof AssetHubApiError && error.runId)
|
|
1359
|
+
activeExecution.runId = error.runId;
|
|
1360
|
+
throw error;
|
|
1361
|
+
}
|
|
1362
|
+
};
|
|
1363
|
+
export const commandSkills = async (subcommand, positionals, ctx) => {
|
|
1364
|
+
if (subcommand === 'list') {
|
|
1365
|
+
print(await ctx.client.v2.listWorkspaceSkills({
|
|
1366
|
+
cursor: getFlag(ctx.flags, 'cursor'),
|
|
1367
|
+
}));
|
|
1368
|
+
return;
|
|
1369
|
+
}
|
|
1370
|
+
if (subcommand === 'get') {
|
|
1371
|
+
print(await ctx.client.v2.getWorkspaceSkill(requirePositional(positionals, 2, 'skill-id'), {
|
|
1372
|
+
revision: hasFlag(ctx.flags, 'revision')
|
|
1373
|
+
? parsePositiveIntegerFlag(ctx.flags, 'revision', 1)
|
|
1374
|
+
: undefined,
|
|
1375
|
+
}));
|
|
1376
|
+
return;
|
|
1377
|
+
}
|
|
1378
|
+
if (subcommand === 'controls') {
|
|
1379
|
+
const mode = parseEnumFlag(ctx.flags, 'mode', [
|
|
1380
|
+
'automatic',
|
|
1381
|
+
'manual',
|
|
1382
|
+
'off',
|
|
1383
|
+
]);
|
|
1384
|
+
if (!mode)
|
|
1385
|
+
throw new Error('Missing required flag: --mode');
|
|
1386
|
+
requireFlag(ctx.flags, 'revision');
|
|
1387
|
+
requireFlag(ctx.flags, 'grant-revision');
|
|
1388
|
+
print(await ctx.client.v2.setWorkspaceSkillControls(requirePositional(positionals, 2, 'skill-id'), {
|
|
1389
|
+
expectedRevision: parsePositiveIntegerFlag(ctx.flags, 'revision', 1),
|
|
1390
|
+
expectedGrantRevision: parsePositiveIntegerFlag(ctx.flags, 'grant-revision', 1),
|
|
1391
|
+
mode,
|
|
1392
|
+
...(hasFlag(ctx.flags, 'share') ? { share: true } : {}),
|
|
1393
|
+
}));
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
if (subcommand === 'proposal') {
|
|
1397
|
+
print(await ctx.client.v2.getWorkspaceSkillProposal(requirePositional(positionals, 2, 'proposal-id')));
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
if (['learn', 'prepare'].includes(subcommand ?? '')) {
|
|
1401
|
+
const input = await readJsonArgument(requireFlag(ctx.flags, 'input-json'), '--input-json');
|
|
1402
|
+
const operationId = subcommand === 'learn'
|
|
1403
|
+
? requireFlag(ctx.flags, 'operation-id')
|
|
1404
|
+
: undefined;
|
|
1405
|
+
if (operationId != null &&
|
|
1406
|
+
!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(operationId))
|
|
1407
|
+
throw new Error('--operation-id must be a UUID; reuse the same ID and input after an uncertain response');
|
|
1408
|
+
if (operationId != null)
|
|
1409
|
+
activeExecution.operationId = operationId;
|
|
1410
|
+
print(subcommand === 'learn'
|
|
1411
|
+
? await ctx.client.v2.learnWorkspaceSkill(input, { idempotencyKey: operationId })
|
|
1412
|
+
: await ctx.client.v2.prepareWorkspaceSkillProposal(input));
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
if (['update', 'accept'].includes(subcommand ?? '')) {
|
|
1416
|
+
const id = requirePositional(positionals, 2, subcommand === 'update' ? 'skill-id' : 'proposal-id');
|
|
1417
|
+
const input = await readJsonArgument(requireFlag(ctx.flags, 'input-json'), '--input-json');
|
|
1418
|
+
print(subcommand === 'update'
|
|
1419
|
+
? await ctx.client.v2.updateWorkspaceSkill(id, input)
|
|
1420
|
+
: await ctx.client.v2.acceptWorkspaceSkillProposal(id, input));
|
|
1421
|
+
return;
|
|
1422
|
+
}
|
|
1423
|
+
throw new Error('Use skills list|get|learn|update|controls|prepare|proposal|accept');
|
|
1424
|
+
};
|
|
1278
1425
|
const commandModels = async (subcommand, positionals, ctx) => {
|
|
1279
1426
|
if (subcommand === 'list') {
|
|
1280
1427
|
const domain = getFlag(ctx.flags, 'domain');
|
|
@@ -1966,6 +2113,7 @@ const meshRefinementModes = [
|
|
|
1966
2113
|
'placement',
|
|
1967
2114
|
'workshop',
|
|
1968
2115
|
'blender',
|
|
2116
|
+
'codex',
|
|
1969
2117
|
];
|
|
1970
2118
|
const refinementTransforms = (value, flag) => {
|
|
1971
2119
|
if (value == null || typeof value !== 'object' || Array.isArray(value))
|
|
@@ -1997,6 +2145,10 @@ const refinementModeInfo = (capabilities, mode) => {
|
|
|
1997
2145
|
throw new Error(`Refinement mode ${mode} is unavailable${info.reason ? `: ${info.reason}` : ''}`);
|
|
1998
2146
|
return info;
|
|
1999
2147
|
};
|
|
2148
|
+
const refinementContinuationFields = [
|
|
2149
|
+
'geometryBackend', 'referenceMode', 'calibration', 'referenceViews',
|
|
2150
|
+
'geometrySources', 'reviewContext', 'background',
|
|
2151
|
+
];
|
|
2000
2152
|
/** Reuse the frozen sources and latest editable scene, never replay server-only receipt fields. */
|
|
2001
2153
|
const composerInputFromRun = (previous, operation) => {
|
|
2002
2154
|
const source = previous.resolvedInput ?? previous.input ?? previous.requestedInput ?? {};
|
|
@@ -2012,7 +2164,14 @@ const composerInputFromRun = (previous, operation) => {
|
|
|
2012
2164
|
'quickRunId',
|
|
2013
2165
|
'quickScene',
|
|
2014
2166
|
]
|
|
2015
|
-
: [
|
|
2167
|
+
: [
|
|
2168
|
+
'fullBodyImageAssetId',
|
|
2169
|
+
'agentRuntime',
|
|
2170
|
+
'mode',
|
|
2171
|
+
'instruction',
|
|
2172
|
+
'maxRounds',
|
|
2173
|
+
...refinementContinuationFields,
|
|
2174
|
+
];
|
|
2016
2175
|
const input = Object.fromEntries(fields
|
|
2017
2176
|
.filter(key => source[key] !== undefined)
|
|
2018
2177
|
.map(key => [key, source[key]]));
|
|
@@ -2036,6 +2195,13 @@ const composerInputFromRun = (previous, operation) => {
|
|
|
2036
2195
|
if (transforms != null)
|
|
2037
2196
|
input.transforms = transforms;
|
|
2038
2197
|
if (operation === 'mesh.refine') {
|
|
2198
|
+
for (const key of ['calibration', 'referenceViews', 'geometrySources']) {
|
|
2199
|
+
if (previous.refinement?.[key] != null)
|
|
2200
|
+
input[key] = previous.refinement[key];
|
|
2201
|
+
}
|
|
2202
|
+
const reviewContext = previous.refinement?.report?.reviewContext;
|
|
2203
|
+
if (reviewContext != null)
|
|
2204
|
+
input.reviewContext = reviewContext;
|
|
2039
2205
|
const referenceTransform = previous.composition?.referenceTransform ?? source.referenceTransform;
|
|
2040
2206
|
if (referenceTransform != null)
|
|
2041
2207
|
input.referenceTransform = referenceTransform;
|
|
@@ -2097,6 +2263,8 @@ const commandComposerRefine = async (ctx) => {
|
|
|
2097
2263
|
capabilities.defaultMode;
|
|
2098
2264
|
if (!meshRefinementModes.includes(mode))
|
|
2099
2265
|
throw new Error(`--mode must be one of: ${meshRefinementModes.join(', ')}`);
|
|
2266
|
+
if (mode !== 'codex' && (input.geometryBackend || input.referenceMode === 'all_angles' || input.background))
|
|
2267
|
+
throw new Error('Saved Blender-backend, all-angle or background settings require codex mode; use --input-json with settings matching the new mode');
|
|
2100
2268
|
const modeInfo = refinementModeInfo(capabilities, mode);
|
|
2101
2269
|
const maxRoundsFlag = getFlag(ctx.flags, 'max-rounds');
|
|
2102
2270
|
const inputMaxRounds = input.maxRounds;
|
|
@@ -2129,6 +2297,9 @@ const commandComposerRefine = async (ctx) => {
|
|
|
2129
2297
|
operation: 'mesh.refine',
|
|
2130
2298
|
});
|
|
2131
2299
|
const body = {
|
|
2300
|
+
...Object.fromEntries(refinementContinuationFields
|
|
2301
|
+
.filter(key => input[key] !== undefined)
|
|
2302
|
+
.map(key => [key, input[key]])),
|
|
2132
2303
|
parts: refinementParts,
|
|
2133
2304
|
fullBodyImageAssetId: input.fullBodyImageAssetId,
|
|
2134
2305
|
transforms,
|
|
@@ -2893,9 +3064,9 @@ const readOpsJsonFlag = async (flags) => {
|
|
|
2893
3064
|
}
|
|
2894
3065
|
return parsed;
|
|
2895
3066
|
};
|
|
2896
|
-
const productionSession = (ctx, operation) => openExecutionSession({
|
|
3067
|
+
const productionSession = (ctx, operation, canvasId = selectedCanvasId(ctx.flags)) => openExecutionSession({
|
|
2897
3068
|
...stateOptions(ctx),
|
|
2898
|
-
canvasId
|
|
3069
|
+
canvasId,
|
|
2899
3070
|
operation,
|
|
2900
3071
|
});
|
|
2901
3072
|
const commandProduction = async (subcommand, positionals, ctx) => {
|
|
@@ -2904,11 +3075,28 @@ const commandProduction = async (subcommand, positionals, ctx) => {
|
|
|
2904
3075
|
return;
|
|
2905
3076
|
}
|
|
2906
3077
|
if (subcommand === 'analyze') {
|
|
2907
|
-
const
|
|
3078
|
+
const agentVersion = resolvePartExtractorForAnalyze(ctx.flags);
|
|
3079
|
+
const skillSelection = resolveProductionSkillSelection(ctx.flags, agentVersion);
|
|
3080
|
+
const projectContext = hasFlag(ctx.flags, 'context') || hasFlag(ctx.flags, 'context-version')
|
|
3081
|
+
? {
|
|
3082
|
+
canvasId: Number(requireFlag(ctx.flags, 'context')),
|
|
3083
|
+
version: Number(requireFlag(ctx.flags, 'context-version')),
|
|
3084
|
+
}
|
|
3085
|
+
: undefined;
|
|
3086
|
+
if (projectContext) {
|
|
3087
|
+
if (Object.values(projectContext).some(value => !Number.isSafeInteger(value) || value <= 0))
|
|
3088
|
+
throw new Error('--context and --context-version must be positive integers');
|
|
3089
|
+
const canvasId = selectedCanvasId(ctx.flags);
|
|
3090
|
+
if (canvasId != null && canvasId !== projectContext.canvasId)
|
|
3091
|
+
throw new Error('--context must match --canvas');
|
|
3092
|
+
}
|
|
3093
|
+
const session = await productionSession(ctx, 'production.analyze', projectContext?.canvasId);
|
|
2908
3094
|
const analyzed = await executeRecorded(session, 'production.analyze', {
|
|
2909
3095
|
...(await resolveProductionAnalyzeSource(ctx)),
|
|
2910
|
-
agentVersion
|
|
3096
|
+
agentVersion,
|
|
2911
3097
|
name: getFlag(ctx.flags, 'name'),
|
|
3098
|
+
...(skillSelection == null ? {} : { skillSelection }),
|
|
3099
|
+
...(projectContext == null ? {} : { projectContext }),
|
|
2912
3100
|
}, executionOptions(ctx.flags));
|
|
2913
3101
|
await printRecorded(ctx, analyzed);
|
|
2914
3102
|
return;
|
|
@@ -3930,6 +4118,12 @@ const run = async () => {
|
|
|
3930
4118
|
}
|
|
3931
4119
|
const ctx = await createContext(parsed.flags, argv.slice(2));
|
|
3932
4120
|
switch (command) {
|
|
4121
|
+
case 'api':
|
|
4122
|
+
await commandApi(subcommand, parsed.positionals, ctx);
|
|
4123
|
+
return;
|
|
4124
|
+
case 'skills':
|
|
4125
|
+
await commandSkills(subcommand, parsed.positionals, ctx);
|
|
4126
|
+
return;
|
|
3933
4127
|
case 'composer':
|
|
3934
4128
|
await commandComposer(subcommand, ctx);
|
|
3935
4129
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assethub/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
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.11",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.30.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|