@assethub/cli 0.1.17 → 0.1.19

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 CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  Command line interface for AssetHub.
4
4
 
5
+ ## Personal API keys
6
+
7
+ Log in once with a personal key (`ah_pat_`), then select its workspace:
8
+
9
+ ```sh
10
+ assethub auth login --api-key-stdin --profile personal
11
+ assethub workspace list --query Studio --limit 25
12
+ assethub workspace use <workspace-id>
13
+ assethub capabilities
14
+ assethub mesh list --workspace <other-workspace-id>
15
+ ```
16
+
17
+ Login verifies account identity through workspace discovery, including when
18
+ `--skip-verify` is supplied. `workspace use` validates access and saves the workspace
19
+ in the same profile with the same key. It does not issue keys or change browser
20
+ sessions. Pass `--cursor <nextCursor>` for another workspace list page.
21
+
22
+ `--workspace` overrides the saved selection for one command, including diagnostics,
23
+ MCP discovery, history, and run recovery. Recovery still rejects an operation saved
24
+ in another workspace. Personal profiles take precedence over environment API
25
+ credentials and origins; explicit `--api-key` uses the supplied key and requires
26
+ `--workspace` for scoped API commands. Saved personal credentials cannot be sent
27
+ to another origin through `--base-url` alone.
28
+
29
+ Keys are limited by their workspace and read/write scopes and current account
30
+ permissions. Account, member, and API-key administration require user-session
31
+ authentication. Existing workspace keys and user-token login remain supported.
32
+
5
33
  ## Connection diagnostics and MCP
6
34
 
7
35
  ```sh
@@ -15,19 +43,22 @@ assethub mcp config --client codex
15
43
  MCP initialization and tool discovery, without invoking any tool or generating
16
44
  assets. It returns JSON and exit 0 when checks pass, or exit 2 with a diagnostic
17
45
  and next step when a check fails. The default total timeout is 15 seconds; change
18
- it with `--timeout-ms`. Hosted MCP accepts a workspace API key from any AssetHub
19
- user; account operations use a separate user access token.
46
+ it with `--timeout-ms`. Hosted MCP accepts workspace and personal API keys; personal keys also require
47
+ a selected workspace. Account operations use a separate user access token.
20
48
 
21
49
  `mcp config` outputs a Cursor JSON object or Codex TOML section to merge into
22
- existing user settings. It does not write files or read your saved API key.
50
+ existing user settings. It reads saved profile selection and does not write files
51
+ or include your saved API key in the output.
23
52
  The generated settings read `ASSETHUB_API_KEY` from the AI client's environment.
24
- Use the same workspace key as your CLI profile. For a different API origin, pass
53
+ Use the same key as your CLI profile. Personal profiles include the selected
54
+ `X-AssetHub-Workspace` header; `--workspace` overrides it in the generated settings.
55
+ For a different API origin, pass
25
56
  `--base-url https://your-host/prefix` (HTTP is accepted only for localhost).
26
57
 
27
58
  Explicit `--profile` uses that profile's key and origin, ahead of environment
28
59
  variables, including user tokens and workspace MFA proofs. A missing profile fails.
29
- Without an explicit profile, a workspace selected with `workspace use` takes
30
- precedence over environment API credentials; otherwise the environment key
60
+ Without an explicit profile, a personal profile or a workspace selected with
61
+ `workspace use` takes precedence over environment API credentials; otherwise the environment key
31
62
  precedes the saved default. `--api-key` and `--base-url` remain
32
63
  explicit overrides. `auth logout` removes the selected saved profile (or the
33
64
  saved default); environment credentials remain under your shell’s control.
@@ -91,6 +122,35 @@ state directory private. `--operation-id <uuid>` supplies an operation identity;
91
122
  retries and `runs resume <operation-id>` reuse its identical body and key. A new
92
123
  candidate needs a new operation ID. `runs watch <run-id>` only reads status.
93
124
 
125
+ Internal preview: continue mesh generation and composition on native canvas nodes without uploading
126
+ their source images or parts again:
127
+
128
+ ```sh
129
+ assethub canvas nodes --canvas 42
130
+ assethub mesh generate --canvas 42 --node shape:production --wait
131
+ assethub composer run --canvas 42 --node shape:production --wait
132
+ ```
133
+
134
+ Use the exact `nodeId` returned by discovery. `--node` resolves saved inputs and
135
+ settings on the server and writes results to that node's UI history. Mesh nodes
136
+ accept optional `--model-id` and `--params-json` overrides; composition accepts
137
+ `--model` and `--mode`. Explicit source/part/reference flags and `--input-json`
138
+ cannot accompany `--node`. The existing `--from-node` flag reads Artifact Graph
139
+ lineage and does not select a UI node.
140
+
141
+ For a Production3D node, mesh generation submits its eligible saved child nodes,
142
+ skipping parts already complete or generating. Each child has its own receipt.
143
+ The batch operation ID is printed before submission and its target list is saved
144
+ under `state/node-batches`. Resume a partial batch with `runs resume <operation-id>`
145
+ or repeat the command with the same `--operation-id`; this reuses the original
146
+ targets and request keys even if the canvas changes. Composer accepts either the
147
+ Production3D node or its Part Composer node and reuses the linked parts/reference.
148
+ CLI-created graph Productions are discoverable before a browser opens the canvas.
149
+ Composer uses its saved Quick, Quick + Agent, Agent only or Turntable setting.
150
+ Agent completion returns an editable scene as `needs_review`; it does not export
151
+ a new combined mesh until the user reviews and exports it.
152
+ Native node actions require the server's `api_canvas_native_nodes` feature gate.
153
+
94
154
  stdout contains final JSON; stderr contains progress. Exceptions: `--version` prints the version, and `mcp config` prints the requested configuration. Exit codes are 0 for accepted/
95
155
  completed, 1 for terminal failure/partial, 2 for input/auth/capability/budget errors,
96
156
  3 for timeout/history pending/needs review, and 130 for Ctrl-C. Timeout and Ctrl-C
@@ -542,3 +602,30 @@ variables to your MCP client and reconnect. This server uses
542
602
  `https://app.assethub.io/api/workspaces/mcp` and exposes `workspace_list`,
543
603
  `workspace_members_list`, `workspace_member_invite`, `workspace_member_set_role`,
544
604
  and `workspace_member_remove`. Keep the existing API-key MCP server for generation.
605
+
606
+ ## Download a canvas handoff
607
+
608
+ ```sh
609
+ assethub canvas download --canvas 42 --out-dir ./client-handoff
610
+ assethub canvas download --canvas 42 --mesh mesh_123 --out-dir ./mesh-handoff
611
+ ```
612
+
613
+ This staged feature uses the selected workspace API key. A canvas invitation does
614
+ not grant API-key or workspace access. Use an empty output directory. The bundle
615
+ contains image files, final mesh files, `manifest.json`, `index.html`, and
616
+ `history.md`. Open `index.html` locally to review images and recorded steps.
617
+
618
+ The export follows the actual recorded mesh inputs and image-edit ancestors,
619
+ including intermediate assets removed from the canvas. Current canvas connections
620
+ are not generation evidence. UI `mesh_generation` / `projected_image_gen`, API
621
+ execution receipts, and associated Production / Artifact Graph records are read
622
+ without dispatching new work. Prompts and models appear when recorded. Missing
623
+ or ambiguous history is reported explicitly; this is the available recorded
624
+ history, not a reconstruction of unrecorded editing gestures.
625
+
626
+ Downloads stream to temporary files and are renamed only after completion. The
627
+ manifest records local paths, byte counts and SHA-256 hashes; signed URL tokens
628
+ and API credentials are not saved. Download failures retain the successful files
629
+ and manifest and exit 1. Truncated exports exit 3. Individual files are limited to
630
+ 1 GiB, and bounded server traversal reports any omitted history. History warnings
631
+ can remain even when all available files download successfully.
package/dist/canvas.d.ts CHANGED
@@ -15,7 +15,9 @@ type CanvasClient = {
15
15
  getCanvas: (id: number) => Promise<Canvas>;
16
16
  };
17
17
  };
18
- export declare const writeState: (path: string, value: unknown) => Promise<void>;
18
+ export declare const writeState: (path: string, value: unknown, options?: {
19
+ exclusive?: boolean;
20
+ }) => Promise<void>;
19
21
  export declare const readState: (path: string) => Promise<unknown | undefined>;
20
22
  export declare const saveCanvasSelection: (scope: CanvasScope, canvasId: number) => Promise<void>;
21
23
  export declare const resolveCanvasSelection: (options: CanvasScope & {
@@ -1 +1 @@
1
- {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../src/canvas.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAA;AAEhD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE;QACF,YAAY,EAAE,CACZ,IAAI,EAAE;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,EACpB,OAAO,EAAE;YAAC,cAAc,EAAE,MAAM,CAAA;SAAC,KAC9B,OAAO,CAAC,MAAM,CAAC,CAAA;QACpB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;KAC3C,CAAA;CACF,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,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AO,GAAG,SAAS,CAazE,CAAA;AAiBD,eAAO,MAAM,mBAAmB,GAC9B,OAAO,WAAW,EAClB,UAAU,MAAM,KACf,OAAO,CAAC,IAAI,CAOd,CAAA;AAED,eAAO,MAAM,sBAAsB,GACjC,SAAS,WAAW,GAAG;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KACA,OAAO,CAAC,MAAM,CA8ChB,CAAA"}
package/dist/canvas.js CHANGED
@@ -1,12 +1,15 @@
1
1
  import { createHash, randomUUID } from 'node:crypto';
2
- import { mkdir, readFile, realpath, rename, unlink, writeFile, } from 'node:fs/promises';
2
+ import { link, mkdir, readFile, realpath, rename, unlink, writeFile, } from 'node:fs/promises';
3
3
  import { basename, dirname, join } from 'node:path';
4
- export const writeState = async (path, value) => {
4
+ export const writeState = async (path, value, options = {}) => {
5
5
  await mkdir(dirname(path), { recursive: true, mode: 0o700 });
6
6
  const temporary = `${path}.${randomUUID()}.tmp`;
7
7
  try {
8
8
  await writeFile(temporary, JSON.stringify(value), { mode: 0o600, flag: 'wx' });
9
- await rename(temporary, path);
9
+ if (options.exclusive)
10
+ await link(temporary, path);
11
+ else
12
+ await rename(temporary, path);
10
13
  }
11
14
  finally {
12
15
  await unlink(temporary).catch(error => {
@@ -0,0 +1,28 @@
1
+ import type { CanvasExport } from '@assethub/api-client';
2
+ /** Signed file URLs are used without API credentials and never written into the bundle. */
3
+ export declare const downloadCanvas: (input: {
4
+ client: {
5
+ v2: {
6
+ exportCanvas: (id: number, options?: {
7
+ mesh?: string;
8
+ }) => Promise<CanvasExport>;
9
+ };
10
+ };
11
+ canvasId: number;
12
+ mesh?: string;
13
+ outDir: string;
14
+ progress?: (message: string) => void;
15
+ }) => Promise<{
16
+ outDir: string;
17
+ manifestPath: string;
18
+ htmlPath: string;
19
+ historyPath: string;
20
+ downloaded: number;
21
+ failed: number;
22
+ steps: number;
23
+ warnings: string[];
24
+ missingEvidence: string[];
25
+ truncated: boolean;
26
+ exitCode: number;
27
+ }>;
28
+ //# sourceMappingURL=canvasDownload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvasDownload.d.ts","sourceRoot":"","sources":["../src/canvasDownload.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,YAAY,EAAoB,MAAM,sBAAsB,CAAA;AAmBzE,2FAA2F;AAC3F,eAAO,MAAM,cAAc,GAAU,OAAO;IAC1C,MAAM,EAAE;QACN,EAAE,EAAE;YACF,YAAY,EAAE,CACZ,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE;gBAAC,IAAI,CAAC,EAAE,MAAM,CAAA;aAAC,KACtB,OAAO,CAAC,YAAY,CAAC,CAAA;SAC3B,CAAA;KACF,CAAA;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACrC;;;;;;;;;;;;EA8LA,CAAA"}
@@ -0,0 +1,184 @@
1
+ import { createHash, randomUUID } from 'node:crypto';
2
+ import { createWriteStream } from 'node:fs';
3
+ import { mkdir, readdir, rename, unlink, writeFile } from 'node:fs/promises';
4
+ import { join, resolve } from 'node:path';
5
+ import { Readable, Transform } from 'node:stream';
6
+ import { pipeline } from 'node:stream/promises';
7
+ const html = (value) => value.replace(/[&<>"']/g, character => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[character]);
8
+ const markdown = (value) => value.replace(/[\\`*_{}\[\]()#+.!|<>-]/g, '\\$&').replace(/\r?\n/g, ' ');
9
+ /** Signed file URLs are used without API credentials and never written into the bundle. */
10
+ export const downloadCanvas = async (input) => {
11
+ const outDir = resolve(input.outDir);
12
+ await mkdir(outDir, { recursive: true, mode: 0o700 });
13
+ if ((await readdir(outDir)).length)
14
+ throw new Error('Canvas download requires an empty output directory');
15
+ const exported = await input.client.v2.exportCanvas(input.canvasId, {
16
+ mesh: input.mesh,
17
+ });
18
+ if (exported.schemaVersion !== 'assethub.canvas-export.v1' ||
19
+ exported.canvas.id !== input.canvasId)
20
+ throw new Error('Invalid canvas export response');
21
+ await mkdir(join(outDir, 'files'), { mode: 0o700 });
22
+ const files = [];
23
+ for (const [index, asset] of exported.assets.entries()) {
24
+ const { url, ...safeAsset } = asset;
25
+ const file = { ...safeAsset };
26
+ files.push(file);
27
+ input.progress?.(`Downloading ${index + 1}/${exported.assets.length}`);
28
+ const temporary = join(outDir, 'files', `.${randomUUID()}.tmp`);
29
+ try {
30
+ if (!url)
31
+ throw new Error('No downloadable file URL is available');
32
+ const parsed = new URL(url);
33
+ if (!['http:', 'https:'].includes(parsed.protocol) ||
34
+ parsed.username ||
35
+ parsed.password)
36
+ throw new Error('Invalid download URL');
37
+ const response = await fetch(url, {
38
+ signal: AbortSignal.timeout(120_000),
39
+ redirect: 'error',
40
+ });
41
+ if (!response.ok)
42
+ throw new Error(`HTTP ${response.status}`);
43
+ if (!response.body)
44
+ throw new Error('Empty file response');
45
+ const contentType = response.headers
46
+ .get('content-type')
47
+ ?.split(';')[0]
48
+ ?.trim();
49
+ const imageTypes = {
50
+ 'image/png': 'png',
51
+ 'image/jpeg': 'jpg',
52
+ 'image/webp': 'webp',
53
+ 'image/gif': 'gif',
54
+ 'image/avif': 'avif',
55
+ };
56
+ let extension;
57
+ if (asset.mediaType === 'image') {
58
+ const ext = contentType && imageTypes[contentType];
59
+ if (!ext)
60
+ throw new Error('Expected a raster image file');
61
+ extension = ext;
62
+ }
63
+ else {
64
+ if (contentType === 'text/html' || contentType === 'image/svg+xml')
65
+ throw new Error('Expected a mesh file');
66
+ extension = ['glb', 'gltf', 'fbx', 'obj', 'stl', 'ply', 'zip'].includes(asset.format ?? '')
67
+ ? asset.format
68
+ : 'glb';
69
+ }
70
+ const stem = asset.name
71
+ .replace(/[^a-zA-Z0-9_-]+/g, '-')
72
+ .replace(/^-+|-+$/g, '')
73
+ .slice(0, 50) || asset.mediaType;
74
+ const name = `${String(index + 1).padStart(3, '0')}-${stem}-${createHash('sha256').update(asset.id).digest('hex').slice(0, 10)}.${extension}`;
75
+ const hash = createHash('sha256');
76
+ let bytes = 0;
77
+ const meter = new Transform({
78
+ transform(chunk, _encoding, callback) {
79
+ bytes += chunk.length;
80
+ if (bytes > 1024 * 1024 * 1024)
81
+ return callback(new Error('File exceeds 1 GiB'));
82
+ hash.update(chunk);
83
+ callback(null, chunk);
84
+ },
85
+ });
86
+ await pipeline(Readable.fromWeb(response.body), meter, createWriteStream(temporary, { flags: 'wx', mode: 0o600 }));
87
+ if (bytes === 0)
88
+ throw new Error('Empty file response');
89
+ await rename(temporary, join(outDir, 'files', name));
90
+ Object.assign(file, {
91
+ path: `files/${name}`,
92
+ bytes,
93
+ sha256: hash.digest('hex'),
94
+ });
95
+ }
96
+ catch (error) {
97
+ // Network errors may contain signed URLs. Only our bounded known messages
98
+ // are retained, never provider error bodies or raw fetch exceptions.
99
+ const message = error instanceof Error ? error.message : '';
100
+ file.error =
101
+ /^(HTTP \d{3}|No downloadable file URL is available|Invalid download URL|Empty file response|Expected a raster image file|Expected a mesh file|File exceeds 1 GiB)$/.test(message)
102
+ ? message
103
+ : 'File download failed';
104
+ }
105
+ finally {
106
+ await unlink(temporary).catch(error => {
107
+ if (error.code !== 'ENOENT')
108
+ throw error;
109
+ });
110
+ }
111
+ }
112
+ const byId = new Map(files.map(file => [file.id, file]));
113
+ const showAsset = (id) => {
114
+ const file = byId.get(id);
115
+ return file?.path
116
+ ? `<a href="${html(file.path)}">${html(file.name)}</a>`
117
+ : html(file?.name ?? id);
118
+ };
119
+ const warnings = [
120
+ ...exported.warnings,
121
+ ...(exported.truncated
122
+ ? ['The export was truncated; some assets or history are missing.']
123
+ : []),
124
+ ];
125
+ const manifest = { ...exported, assets: files, warnings };
126
+ const sections = exported.steps
127
+ .map(step => `<section><h2>${html(step.operation)}</h2><p>${html([step.createdAt, step.model, step.source].filter(Boolean).join(' · '))}</p>${step.prompt ? `<pre>${html(step.prompt)}</pre>` : ''}<p>Inputs: ${step.inputs.map(ref => `${showAsset(ref.id)} (${html(ref.role)}; ${html(ref.evidence)})`).join(', ') || 'No recorded inputs'}</p><p>Outputs: ${step.outputs.map(showAsset).join(', ') || 'History step'}</p>${step.warnings.map(warning => `<p>${html(warning)}</p>`).join('')}</section>`)
128
+ .join('');
129
+ const document = `<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"><title>${html(exported.canvas.name)}</title><style>body{font:16px system-ui;max-width:1000px;margin:32px auto;padding:0 20px;color:#202126}a{color:#2455ac}pre{white-space:pre-wrap;overflow-wrap:anywhere}section{border-top:1px solid #ccc;padding:16px 0}.images{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px}img{width:100%;height:220px;object-fit:contain}figure{margin:0}figcaption{overflow-wrap:anywhere}</style><h1>${html(exported.canvas.name)}</h1><p>Canvas ${exported.canvas.id}. Actual generation inputs and available recorded history. Canvas connections are not evidence of generation inputs.</p>${warnings.map(warning => `<p>${html(warning)}</p>`).join('')}<h2>Files</h2><div class="images">${files.map(file => `<figure>${file.mediaType === 'image' && file.path ? `<img loading="lazy" src="${html(file.path)}" alt="${html(file.name)}">` : ''}<figcaption>${showAsset(file.id)} · ${html(file.role)}${file.error ? ` · ${html(file.error)}` : ''}</figcaption></figure>`).join('')}</div><h2>History</h2>${sections}</html>`;
130
+ const mdAsset = (id) => {
131
+ const file = byId.get(id);
132
+ return file?.path
133
+ ? `[${markdown(file.name)}](${file.path})`
134
+ : markdown(file?.name ?? id);
135
+ };
136
+ const history = [
137
+ `# ${markdown(exported.canvas.name)}`,
138
+ '',
139
+ `Canvas ${exported.canvas.id}. Actual generation inputs and available history; canvas connections are not generation evidence.`,
140
+ '',
141
+ ...warnings.map(warning => `- ${markdown(warning)}`),
142
+ '',
143
+ '## Files',
144
+ '',
145
+ ...files.map(file => `- ${mdAsset(file.id)} (${file.role})${file.error ? `: ${markdown(file.error)}` : ''}`),
146
+ '',
147
+ ...exported.steps.flatMap(step => [
148
+ `## ${markdown(step.operation)}`,
149
+ '',
150
+ markdown([step.createdAt, step.model, step.source].filter(Boolean).join(' · ')),
151
+ '',
152
+ ...(step.prompt ? [`Prompt: ${markdown(step.prompt)}`, ''] : []),
153
+ `Inputs: ${step.inputs.map(ref => `${mdAsset(ref.id)} (${markdown(ref.role)}; ${markdown(ref.evidence)})`).join(', ') || 'No recorded inputs'}`,
154
+ '',
155
+ `Outputs: ${step.outputs.map(mdAsset).join(', ') || 'History step'}`,
156
+ '',
157
+ ...step.warnings.map(warning => `- ${markdown(warning)}`),
158
+ '',
159
+ ]),
160
+ ].join('\n');
161
+ await writeFile(join(outDir, 'manifest.json'), JSON.stringify(manifest, null, 2) + '\n', { mode: 0o600, flag: 'wx' });
162
+ await writeFile(join(outDir, 'index.html'), document, {
163
+ mode: 0o600,
164
+ flag: 'wx',
165
+ });
166
+ await writeFile(join(outDir, 'history.md'), history, {
167
+ mode: 0o600,
168
+ flag: 'wx',
169
+ });
170
+ const failed = files.filter(file => file.error).length;
171
+ return {
172
+ outDir,
173
+ manifestPath: join(outDir, 'manifest.json'),
174
+ htmlPath: join(outDir, 'index.html'),
175
+ historyPath: join(outDir, 'history.md'),
176
+ downloaded: files.length - failed,
177
+ failed,
178
+ steps: exported.steps.length,
179
+ warnings,
180
+ missingEvidence: exported.steps.flatMap(step => step.warnings),
181
+ truncated: exported.truncated,
182
+ exitCode: failed ? 1 : exported.truncated ? 3 : 0,
183
+ };
184
+ };
@@ -31,6 +31,7 @@ type SubmitOptions = {
31
31
  parentRunId?: string;
32
32
  source?: ExecutionContext['source'];
33
33
  graphSource?: ExecutionContext['graphSource'];
34
+ canvasNode?: ExecutionContext['canvasNode'];
34
35
  };
35
36
  export declare class CliExecutionError extends Error {
36
37
  readonly exitCode: number;
@@ -42,9 +43,11 @@ export declare class CliExecutionError extends Error {
42
43
  /** Kept only for SIGINT reporting; interrupting the client never cancels server work. */
43
44
  export declare const activeExecution: {
44
45
  operationId?: string;
46
+ batchOperationId?: string;
45
47
  runId?: string;
46
48
  execution?: CanvasExecution;
47
49
  };
50
+ export declare const childOperationId: (parent: string, step: string) => string;
48
51
  export declare const executeRecorded: (session: Session, operation: Operation, body: RequestBody, options?: SubmitOptions) => Promise<{
49
52
  execution: CanvasExecution;
50
53
  jobId: string;
@@ -108,7 +111,11 @@ export declare const resumeRecorded: (options: Omit<SessionOptions, "canvasId" |
108
111
  operationId: string;
109
112
  retryDelayMs?: number;
110
113
  expectedCanvasId?: number;
114
+ expectedCanvasNodeId?: string;
115
+ expectedOperation?: Operation;
111
116
  expectedBody?: Record<string, unknown>;
117
+ /** Selected flags for existing non-native Production continuation. */
118
+ expectedBodySubset?: Record<string, unknown>;
112
119
  }) => Promise<{
113
120
  execution: CanvasExecution;
114
121
  jobId: string;
@@ -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,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,MA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tC,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
@@ -1,6 +1,7 @@
1
- import { randomUUID } from 'node:crypto';
2
- import { mkdir, writeFile } from 'node:fs/promises';
3
- import { dirname, join } from 'node:path';
1
+ import { createHash, randomUUID } from 'node:crypto';
2
+ import { stat } from 'node:fs/promises';
3
+ import { isDeepStrictEqual } from 'node:util';
4
+ import { join } from 'node:path';
4
5
  import { setTimeout as delay } from 'node:timers/promises';
5
6
  import { AssetHubApiError, } from '@assethub/api-client';
6
7
  import { readState, resolveCanvasSelection, writeState } from './canvas.js';
@@ -44,6 +45,12 @@ export class CliExecutionError extends Error {
44
45
  }
45
46
  /** Kept only for SIGINT reporting; interrupting the client never cancels server work. */
46
47
  export const activeExecution = {};
48
+ export const childOperationId = (parent, step) => {
49
+ const hash = createHash('sha256')
50
+ .update(JSON.stringify([parent, step]))
51
+ .digest('hex');
52
+ return `${hash.slice(0, 8)}-${hash.slice(8, 12)}-4${hash.slice(13, 16)}-8${hash.slice(17, 20)}-${hash.slice(20, 32)}`;
53
+ };
47
54
  const operationPath = (stateDir, id) => {
48
55
  if (!/^[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(id))
49
56
  throw new Error('Operation ID must be a UUID');
@@ -154,6 +161,13 @@ export const executeRecorded = async (session, operation, body, options = {}) =>
154
161
  throw new CliExecutionError(`Canvas execution history unavailable: ${operation}`, 2);
155
162
  const operationId = options.operationId ?? randomUUID();
156
163
  const path = operationPath(session.stateDir, operationId);
164
+ const batchReserved = await stat(join(session.stateDir, 'node-batches', `${operationId}.json`)).then(() => true, error => {
165
+ if (error.code === 'ENOENT')
166
+ return false;
167
+ throw error;
168
+ });
169
+ if (batchReserved)
170
+ throw new CliExecutionError('Operation ID belongs to a different node batch; use runs resume or a new operation ID', 2, operationId);
157
171
  const saved = JSON.parse(JSON.stringify({
158
172
  operation,
159
173
  operationId,
@@ -168,13 +182,13 @@ export const executeRecorded = async (session, operation, body, options = {}) =>
168
182
  agent: options.agent,
169
183
  parentRunId: options.parentRunId,
170
184
  graphSource: options.graphSource,
185
+ canvasNode: options.canvasNode,
171
186
  },
172
187
  },
173
188
  }));
174
- await mkdir(dirname(path), { recursive: true, mode: 0o700 });
175
189
  try {
176
190
  // Exclusive creation prevents concurrent use of one key with different inputs.
177
- await writeFile(path, JSON.stringify(saved), { mode: 0o600, flag: 'wx' });
191
+ await writeState(path, saved, { exclusive: true });
178
192
  }
179
193
  catch (error) {
180
194
  if (!error ||
@@ -197,11 +211,23 @@ export const resumeRecorded = async (options) => {
197
211
  throw new Error('Saved operation not found');
198
212
  if (saved.baseUrl !== options.client.baseUrl)
199
213
  throw new Error('Saved operation belongs to a different API origin');
214
+ if (options.expectedOperation !== undefined &&
215
+ saved.operation !== options.expectedOperation)
216
+ throw new Error('Saved operation has a different operation type');
217
+ if (options.expectedCanvasNodeId !== undefined &&
218
+ saved.body.executionContext.canvasNode?.nodeId !==
219
+ options.expectedCanvasNodeId)
220
+ throw new Error('Saved operation belongs to a different canvas node');
200
221
  if (options.expectedCanvasId !== undefined &&
201
222
  saved.body.executionContext.canvasId !== options.expectedCanvasId)
202
223
  throw new Error('Saved operation belongs to a different canvas');
203
- for (const [key, value] of Object.entries(options.expectedBody ?? {})) {
204
- if (JSON.stringify(saved.body[key]) !== JSON.stringify(value))
224
+ if (options.expectedBody !== undefined ||
225
+ options.expectedBodySubset !== undefined) {
226
+ const { executionContext: _savedContext, ...savedBody } = saved.body;
227
+ const { executionContext: _expectedContext, ...expectedBody } = options.expectedBody ?? {};
228
+ if ((options.expectedBody !== undefined &&
229
+ !isDeepStrictEqual(savedBody, expectedBody)) ||
230
+ Object.entries(options.expectedBodySubset ?? {}).some(([key, value]) => !isDeepStrictEqual(savedBody[key], value)))
205
231
  throw new CliExecutionError('Operation ID already belongs to different inputs; use runs resume or a new operation ID', 2, saved.operationId);
206
232
  }
207
233
  const session = await openExecutionSession({
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 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";
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";
6
6
  /**
7
7
  * The `animate retarget` request, built from flags alone.
8
8
  *
@@ -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,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;AA4IxD,eAAO,MAAM,KAAK,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