@lingjingai/lj-awb-cli-pre 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -136,8 +136,8 @@ lj-awb artifact video import-storyboard --project-id <projectId> --input-file 3_
136
136
  正式写入、切换上下文、批量和扣费命令都支持安全确认:
137
137
 
138
138
  ```bash
139
- lj-awb image create ... --dry-run
140
- lj-awb image create ... --yes
139
+ lj-awb create image ... --dry-run
140
+ lj-awb create image ... --yes
141
141
  ```
142
142
 
143
143
  缺少 `--yes` 时,CLI 返回 `confirmation_required`,退出码为 `10`。`task wait` 超时返回 `task_still_running`,退出码为 `20`。
@@ -177,7 +177,7 @@ lj-awb model options --model-group-code <modelGroupCode>
177
177
  lj-awb model create-spec --model-group-code <modelGroupCode>
178
178
  ```
179
179
 
180
- `model input-guide` 返回跨模型统一参数、`resources` 字段和 `reference_key` 规则。`model options` 专门返回模型参数、资源媒体约束和条件约束,例如 `params[].values`、`params[].defaultValue`、`resources[].mediaType`、`resources[].usage`、`resources[].fileTypes`、`resources[].maxFiles`、`resources[].supportLastFrameOnly`、`resources[].minDurationMs/maxDurationMs`、`constraints[].target`、`constraints[].conditions`。`model create-spec` 专门返回如何创建任务,例如 `inputRequirement`、`supportedIntents`、`preflight` 和 `examples`。默认 text 已经覆盖常用决策字段;只有脚本严格解析或需要完整嵌套结构时才追加 `-f json`。Agent 应用 `options` 选参数值、校验素材并判断联动约束,再用 `create-spec` 组装 `image create` / `video create`,不要直接把平台旧参数传给 create。上传音频是 `resources` 素材输入,具体 `audio:reference` 写法看 `input-guide` / `create-spec`;是否需要输出音效才使用 `--need-audio true/false`。
180
+ `model input-guide` 返回跨模型统一参数、`resources` 字段和 `reference_key` 规则。`model options` 专门返回模型参数、资源媒体约束和条件约束,例如 `params[].values`、`params[].defaultValue`、`resources[].mediaType`、`resources[].usage`、`resources[].fileTypes`、`resources[].maxFiles`、`resources[].supportLastFrameOnly`、`resources[].minDurationMs/maxDurationMs`、`constraints[].target`、`constraints[].conditions`。`model create-spec` 专门返回如何创建任务,例如 `inputRequirement`、`supportedIntents`、`preflight` 和 `examples`。默认 text 已经覆盖常用决策字段;只有脚本严格解析或需要完整嵌套结构时才追加 `-f json`。Agent 应用 `options` 选参数值、校验素材并判断联动约束,再用 `create-spec` 组装 `create image` / `create video`,不要直接把平台旧参数传给 create。上传音频是 `resources` 素材输入,具体 `audio:reference` 写法看 `input-guide` / `create-spec`;是否需要输出音效才使用 `--need-audio true/false`。
181
181
 
182
182
  ## 示例:参考图生成视频
183
183
 
@@ -188,7 +188,7 @@ lj-awb model input-guide -f json
188
188
  lj-awb model options --model-group-code <modelGroupCode> -f json
189
189
  lj-awb model create-spec --model-group-code <modelGroupCode> -f json
190
190
 
191
- lj-awb video fee \
191
+ lj-awb create video-fee \
192
192
  --model-group-code <modelGroupCode> \
193
193
  --prompt "参考女主首帧,在雨夜街头奔跑,电影感运镜" \
194
194
  --resource image:first_frame=./actor.png \
@@ -197,7 +197,7 @@ lj-awb video fee \
197
197
  --duration 5 \
198
198
  --project-group-no <projectGroupNo>
199
199
 
200
- lj-awb video create \
200
+ lj-awb create video \
201
201
  --model-group-code <modelGroupCode> \
202
202
  --prompt "参考女主首帧,在雨夜街头奔跑,电影感运镜" \
203
203
  --resource image:first_frame=./actor.png \
@@ -218,7 +218,7 @@ lj-awb task wait \
218
218
  帧素材也可以直接使用平台资产 ID;是否可传尾帧以 `model options.resources[].usage` 是否包含 `last_frame` 为准:
219
219
 
220
220
  ```bash
221
- lj-awb video create \
221
+ lj-awb create video \
222
222
  --model-group-code <modelGroupCode> \
223
223
  --prompt "参考首帧生成一段镜头推进视频" \
224
224
  --resource image:first_frame=asset:<assetId> \
@@ -235,9 +235,9 @@ lj-awb video create \
235
235
  如果参考图会复用,推荐先发布主体资产:
236
236
 
237
237
  ```bash
238
- lj-awb subject publish --name 女主 --primary-file ./actor.png --yes
239
- lj-awb subject wait --element-id <elementId> --wait-seconds 300
240
- lj-awb video create \
238
+ lj-awb create subject --name 女主 --primary-file ./actor.png --yes
239
+ lj-awb create subject-wait --element-id <elementId> --wait-seconds 300
240
+ lj-awb create video \
241
241
  --model-group-code <modelGroupCode> \
242
242
  --prompt "<<<女主>>> 在雨夜街头奔跑,电影感运镜" \
243
243
  --resource subject:reference:女主=asset:<externalId> \
package/install.mjs CHANGED
@@ -34,6 +34,7 @@ const skillTargetDirs = explicitSkillTargetDir
34
34
  : [
35
35
  join(homedir(), '.cc-switch', 'skills', 'lj-awb'),
36
36
  join(codexHomeDir, 'skills', 'lj-awb'),
37
+ join(homedir(), '.claude', 'skills', 'lj-awb'),
37
38
  ];
38
39
 
39
40
  if (process.env.LINGJING_AWB_SKIP_SKILL_INSTALL === '1' || process.env.ANIME_SKIP_SKILL_INSTALL === '1') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/lj-awb-cli-pre",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Lingjing AWB CLI monorepo with shared core, standalone CLI, and agent skills (pre-release build pointing to https://animeworkbench-pre.lingjingai.cn)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,7 +22,7 @@
22
22
  "check:local": "node --check install.mjs && node --check packages/awb-core/src/common.js && node --check packages/awb-core/src/api.js && node --check packages/awb-core/src/artifact.js && node --check packages/awb-core/src/auth.js && node --check packages/awb-core/src/output.js && node --check packages/awb-core/src/services.js && node --check packages/awb-core/src/commands.js && node --check packages/awb-core/src/standalone.js && sh -n packages/awb-cli/bin/lj-awb && node --check packages/awb-cli/bin/lj-awb.js && node --check build/build.mjs && node --check build/_shared.mjs && node --check build/pre.mjs && node --check build/pre-publish.mjs && node --check build/prod.mjs && node --check scripts/run-openapi-cli-examples-real.mjs && node --check scripts/validate-cli-schema.mjs && node --check scripts/validate-cli-output-contract.mjs && node --check scripts/validate-cli-command-coverage.mjs && node scripts/validate-skill-meta.mjs && node scripts/validate-cli-schema.mjs && node scripts/validate-cli-command-coverage.mjs",
23
23
  "check:real": "node scripts/validate-cli-output-contract.mjs && node scripts/validate-openapi-cli-examples.mjs",
24
24
  "test:openapi-real": "node scripts/run-openapi-cli-examples-real.mjs",
25
- "smoke": "packages/awb-cli/bin/lj-awb --help && packages/awb-cli/bin/lj-awb auth status -f json && packages/awb-cli/bin/lj-awb system && packages/awb-cli/bin/lj-awb auth && packages/awb-cli/bin/lj-awb account && packages/awb-cli/bin/lj-awb project && packages/awb-cli/bin/lj-awb credits && packages/awb-cli/bin/lj-awb upload && packages/awb-cli/bin/lj-awb model && packages/awb-cli/bin/lj-awb image && packages/awb-cli/bin/lj-awb video && packages/awb-cli/bin/lj-awb task && packages/awb-cli/bin/lj-awb asset && packages/awb-cli/bin/lj-awb subject && packages/awb-cli/bin/lj-awb artifact && packages/awb-cli/bin/lj-awb schema -f json >/dev/null",
25
+ "smoke": "packages/awb-cli/bin/lj-awb --help && packages/awb-cli/bin/lj-awb auth status -f json && packages/awb-cli/bin/lj-awb system && packages/awb-cli/bin/lj-awb auth && packages/awb-cli/bin/lj-awb account && packages/awb-cli/bin/lj-awb project && packages/awb-cli/bin/lj-awb credits && packages/awb-cli/bin/lj-awb upload && packages/awb-cli/bin/lj-awb model && packages/awb-cli/bin/lj-awb create && packages/awb-cli/bin/lj-awb task && packages/awb-cli/bin/lj-awb artifact && packages/awb-cli/bin/lj-awb schema -f json >/dev/null",
26
26
  "postinstall": "node install.mjs",
27
27
  "version:sync": "node scripts/sync-versions.mjs"
28
28
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-cli-bin",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Standalone CLI for Lingjing AWB",
5
5
  "private": true,
6
6
  "license": "MIT",
@@ -13,6 +13,6 @@
13
13
  "README.md"
14
14
  ],
15
15
  "dependencies": {
16
- "@lingjingai/awb-core": "0.3.15"
16
+ "@lingjingai/awb-core": "0.3.16"
17
17
  }
18
18
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-core",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Shared core runtime for Lingjing AWB CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,12 +1,6 @@
1
1
  import { API_ORIGIN, LingjingAwbCliError } from './common.js';
2
2
  import { resolveAuthContext } from './auth.js';
3
3
 
4
- export const ASSET_EDIT_ORIGIN = (
5
- process.env.LINGJING_AWB_ASSET_EDIT_ORIGIN
6
- || process.env.ASSET_EDIT_ORIGIN
7
- || 'https://asset-edit.lingjingai.cn'
8
- ).replace(/\/+$/, '');
9
-
10
4
  function buildHeaders(authContext, extraHeaders = {}) {
11
5
  const contextHeaders = {};
12
6
  for (const [headerName, envNames] of Object.entries({
@@ -224,6 +218,14 @@ export async function fetchVideoTask(taskId) {
224
218
  });
225
219
  }
226
220
 
221
+ export async function fetchVideoSubtitleRemovalFee(payload = {}) {
222
+ return await apiFetch('/api/material/creation/videoSubtitleRemovalFeeCalc', { body: payload });
223
+ }
224
+
225
+ export async function createVideoSubtitleRemovalTask(payload = {}) {
226
+ return await apiFetch('/api/material/creation/videoSubtitleRemoval', { body: payload });
227
+ }
228
+
227
229
  export async function fetchTaskFeed(payload = {}) {
228
230
  return await apiFetch('/api/material/creation/task/feedPull', {
229
231
  query: payload,
@@ -283,67 +285,27 @@ export async function listElementsByName(elementName) {
283
285
  });
284
286
  }
285
287
 
286
- export async function assetEditFetch(pathname, options = {}) {
287
- const {
288
- method = 'GET',
289
- body,
288
+ export async function listVoices(query = {}) {
289
+ return await apiFetch('/api/material/creation/listVoices', {
290
+ method: 'GET',
290
291
  query,
291
- headers = {},
292
- } = options;
293
- const url = new URL(pathname, ASSET_EDIT_ORIGIN);
294
- for (const [key, value] of Object.entries(query || {})) {
295
- if (value === undefined || value === null || value === '') continue;
296
- url.searchParams.set(key, String(value));
297
- }
298
- let response;
299
- try {
300
- response = await fetch(url, {
301
- method,
302
- headers: {
303
- 'content-type': 'application/json',
304
- ...headers,
305
- },
306
- body: method.toUpperCase() === 'GET' || body === undefined ? undefined : stringifyJsonBody(body),
307
- });
308
- } catch (error) {
309
- throw new LingjingAwbCliError(`请求去字幕服务失败:${error.message}`, {
310
- type: 'network_error',
311
- exitCode: 30,
312
- details: { url: url.toString() },
313
- });
314
- }
315
- const rawText = await response.text();
316
- let payload = null;
317
- try {
318
- payload = rawText ? JSON.parse(rawText) : null;
319
- } catch {
320
- throw new LingjingAwbCliError('去字幕服务返回了无效 JSON', {
321
- type: 'invalid_json',
322
- exitCode: 30,
323
- details: { status: response.status, body: rawText.slice(0, 500) },
324
- });
325
- }
326
- if (!response.ok) {
327
- throw new LingjingAwbCliError(payload?.message || payload?.msg || `${response.status} ${response.statusText}`, {
328
- type: 'http_error',
329
- exitCode: 30,
330
- details: { status: response.status, payload },
331
- });
332
- }
333
- return payload && typeof payload === 'object' && 'data' in payload ? payload.data : payload;
292
+ });
334
293
  }
335
294
 
336
- export async function createSubtitleRemoveTask(payload = {}) {
337
- return await assetEditFetch('/api/watermark/tasks', {
338
- method: 'POST',
339
- body: payload,
340
- });
295
+ export async function createVoice(payload = {}) {
296
+ return await apiFetch('/api/material/creation/createVoice', { body: payload });
341
297
  }
342
298
 
343
- export async function fetchSubtitleTaskByPublicId(publicId) {
344
- return await assetEditFetch(`/api/watermark/tasks/${encodeURIComponent(publicId)}`);
299
+ export async function getVoiceByReqTaskId(reqTaskId) {
300
+ return await apiFetch('/api/material/creation/getVoiceByReqTaskId', {
301
+ method: 'GET',
302
+ query: { reqTaskId },
303
+ });
345
304
  }
346
305
 
347
- export async function fetchSubtitleTaskByRemoteId(remoteTaskId) {
348
- return await assetEditFetch(`/api/watermark/remote/${encodeURIComponent(remoteTaskId)}`);
306
+ export async function listVoicesByName(voiceName) {
307
+ return await apiFetch('/api/material/creation/listVoicesByName', {
308
+ method: 'GET',
309
+ query: { voiceName },
310
+ });
349
311
  }
@@ -32,6 +32,9 @@ import {
32
32
  subjectList,
33
33
  subjectPublish,
34
34
  subjectPublishBatch,
35
+ subjectVoiceCreate,
36
+ subjectVoiceList,
37
+ subjectVoiceWait,
35
38
  subjectWait,
36
39
  subtitleRemove,
37
40
  subtitleStatus,
@@ -419,7 +422,7 @@ export function registerAwbCommands(cli) {
419
422
  examples: [
420
423
  'lj-awb model create-spec --model-group-code <code>',
421
424
  ],
422
- hint: '创建前先用 model input-guide 理解统一参数,再用 model options 查具体枚举和素材限制,最后按 create-spec 组装 image create / video create。',
425
+ hint: '创建前先用 model input-guide 理解统一参数,再用 model options 查具体枚举和素材限制,最后按 create-spec 组装 create image / create video。',
423
426
  }),
424
427
  args: [
425
428
  MODEL_GROUP_ARG,
@@ -461,9 +464,9 @@ export function registerAwbCommands(cli) {
461
464
  });
462
465
 
463
466
  cli({
464
- name: 'image fee',
467
+ name: 'create image-fee',
465
468
  description: commandHelp('计算生图预计积分(必须有 --prompt;参考图通过 --resource 传入)', {
466
- examples: ['lj-awb image fee --model-group-code <code> --prompt "一只小狗" --ratio 9:16 --quality 2K'],
469
+ examples: ['lj-awb create image-fee --model-group-code <code> --prompt "一只小狗" --ratio 9:16 --quality 2K'],
467
470
  hint: '估价前先确认 quality、ratio、generate-num 等会影响积分的关键参数。',
468
471
  }),
469
472
  args: [
@@ -481,12 +484,12 @@ export function registerAwbCommands(cli) {
481
484
  });
482
485
 
483
486
  cli({
484
- name: 'image create',
487
+ name: 'create image',
485
488
  description: commandHelp('提交生图任务;正式执行需要 --yes', {
486
489
  examples: [
487
- 'lj-awb image create --model-group-code <code> --prompt "一只小狗" --dry-run',
488
- 'lj-awb image create --model-group-code <code> --prompt "参考图里的角色奔跑" --resource image:reference=./ref.png --project-group-no <no> --yes',
489
- 'lj-awb image create --model-group-code <code> --prompt "产品海报" --resources-json \'[{"type":"image","usage":"reference","source":{"kind":"url","value":"./product.jpg"}}]\' --dry-run',
490
+ 'lj-awb create image --model-group-code <code> --prompt "一只小狗" --dry-run',
491
+ 'lj-awb create image --model-group-code <code> --prompt "参考图里的角色奔跑" --resource image:reference=./ref.png --project-group-no <no> --yes',
492
+ 'lj-awb create image --model-group-code <code> --prompt "产品海报" --resources-json \'[{"type":"image","usage":"reference","source":{"kind":"url","value":"./product.jpg"}}]\' --dry-run',
490
493
  ],
491
494
  }),
492
495
  args: [
@@ -508,11 +511,11 @@ export function registerAwbCommands(cli) {
508
511
  });
509
512
 
510
513
  cli({
511
- name: 'image create-batch',
514
+ name: 'create image-batch',
512
515
  description: commandHelp('批量提交生图任务;输入支持 JSON / JSONL / 纯文本 prompt(每行一条)', {
513
516
  examples: [
514
- 'lj-awb image create-batch --input-file ./prompts.txt --model-group-code <code> --dry-run',
515
- 'lj-awb image create-batch --input-file ./image-input.jsonl --model-group-code <code> --concurrency 3 --yes',
517
+ 'lj-awb create image-batch --input-file ./prompts.txt --model-group-code <code> --dry-run',
518
+ 'lj-awb create image-batch --input-file ./image-input.jsonl --model-group-code <code> --concurrency 3 --yes',
516
519
  ],
517
520
  hint: 'JSON/JSONL 每项只写任务差异字段:prompt、ratio、quality、generate_num、resources、resource、customBizId。',
518
521
  }),
@@ -529,9 +532,9 @@ export function registerAwbCommands(cli) {
529
532
  });
530
533
 
531
534
  cli({
532
- name: 'image status',
535
+ name: 'task image-status',
533
536
  description: commandHelp('查询生图任务状态', {
534
- examples: ['lj-awb image status --task-id <id>'],
537
+ examples: ['lj-awb task image-status --task-id <id>'],
535
538
  }),
536
539
  args: [
537
540
  { name: 'task-id', valueName: 'id', description: '任务 ID' },
@@ -540,9 +543,9 @@ export function registerAwbCommands(cli) {
540
543
  });
541
544
 
542
545
  cli({
543
- name: 'video fee',
546
+ name: 'create video-fee',
544
547
  description: commandHelp('计算生视频预计积分(--prompt / --resource / --resources-json 至少传一个)', {
545
- examples: ['lj-awb video fee --model-group-code <code> --prompt "雨夜奔跑" --duration 5 --quality 720 --ratio 9:16'],
548
+ examples: ['lj-awb create video-fee --model-group-code <code> --prompt "雨夜奔跑" --duration 5 --quality 720 --ratio 9:16'],
546
549
  hint: '估价前先确认 quality、duration、ratio 等会影响积分的关键参数。',
547
550
  }),
548
551
  args: [
@@ -561,13 +564,13 @@ export function registerAwbCommands(cli) {
561
564
  });
562
565
 
563
566
  cli({
564
- name: 'video create',
567
+ name: 'create video',
565
568
  description: commandHelp('提交生视频任务;正式执行需要 --yes', {
566
569
  examples: [
567
- 'lj-awb video create --model-group-code <code> --prompt "雨夜奔跑" --dry-run',
568
- 'lj-awb video create --model-group-code <code> --prompt "镜头推进" --resource image:first_frame=./actor.png --duration 5 --yes',
569
- 'lj-awb video create --model-group-code <code> --prompt "首尾帧过渡" --duration 5 --resources-json \'[{"type":"image","usage":"first_frame","source":{"kind":"url","value":"./first.png"}},{"type":"image","usage":"last_frame","source":{"kind":"url","value":"./last.png"}}]\' --dry-run',
570
- 'lj-awb video create --model-group-code <code> --prompt "让 <<<hero>>> 跟随音乐节奏转身" --resource image:reference:hero=./actor.png --resource audio:reference=./music.mp3 --duration 5 --dry-run',
570
+ 'lj-awb create video --model-group-code <code> --prompt "雨夜奔跑" --dry-run',
571
+ 'lj-awb create video --model-group-code <code> --prompt "镜头推进" --resource image:first_frame=./actor.png --duration 5 --yes',
572
+ 'lj-awb create video --model-group-code <code> --prompt "首尾帧过渡" --duration 5 --resources-json \'[{"type":"image","usage":"first_frame","source":{"kind":"url","value":"./first.png"}},{"type":"image","usage":"last_frame","source":{"kind":"url","value":"./last.png"}}]\' --dry-run',
573
+ 'lj-awb create video --model-group-code <code> --prompt "让 <<<hero>>> 跟随音乐节奏转身" --resource image:reference:hero=./actor.png --resource audio:reference=./music.mp3 --duration 5 --dry-run',
571
574
  ],
572
575
  hint: '--prompt / --resource / --resources-json 至少传一个;fee / --dry-run 之前先确认 quality、duration、ratio 等关键参数。',
573
576
  }),
@@ -591,11 +594,11 @@ export function registerAwbCommands(cli) {
591
594
  });
592
595
 
593
596
  cli({
594
- name: 'video create-batch',
597
+ name: 'create video-batch',
595
598
  description: commandHelp('批量提交生视频任务;输入支持 JSON / JSONL / 纯文本 prompt(每行一条)', {
596
599
  examples: [
597
- 'lj-awb video create-batch --input-file ./prompts.txt --model-group-code <code> --dry-run',
598
- 'lj-awb video create-batch --input-file ./video-input.jsonl --model-group-code <code> --concurrency 2 --yes',
600
+ 'lj-awb create video-batch --input-file ./prompts.txt --model-group-code <code> --dry-run',
601
+ 'lj-awb create video-batch --input-file ./video-input.jsonl --model-group-code <code> --concurrency 2 --yes',
599
602
  ],
600
603
  hint: 'JSON/JSONL 每项只写任务差异字段:prompt、ratio、quality、duration、need_audio、resources、resource、customBizId。',
601
604
  }),
@@ -612,24 +615,24 @@ export function registerAwbCommands(cli) {
612
615
  });
613
616
 
614
617
  cli({
615
- name: 'video status',
618
+ name: 'task video-status',
616
619
  description: commandHelp('查询生视频任务状态', {
617
- examples: ['lj-awb video status --task-id <id>'],
620
+ examples: ['lj-awb task video-status --task-id <id>'],
618
621
  }),
619
622
  args: [{ name: 'task-id', valueName: 'id', description: '任务 ID' }],
620
623
  func: async (_ctx, kwargs) => taskStatus({ ...kwargs, taskType: 'VIDEO_GROUP' }),
621
624
  });
622
625
 
623
626
  cli({
624
- name: 'video subtitle-remove',
625
- description: commandHelp('提交视频去字幕 / 去水印任务', {
626
- examples: ['lj-awb video subtitle-remove --video-url "https://..." --dry-run'],
627
- hint: '该能力走 asset-edit.lingjingai.cn,适合 Seedance 原始结果后处理。',
627
+ name: 'create video-subtitle-removal',
628
+ description: commandHelp('基于 material 来源视频任务提交去字幕任务', {
629
+ examples: ['lj-awb create video-subtitle-removal --source-task-id <videoTaskId> --project-group-no <no> --dry-run'],
630
+ hint: '不再接收视频 URL;material 会根据来源任务读取原始视频、计费、落库和异步处理。',
628
631
  }),
629
632
  args: [
630
- { name: 'video-url', valueName: 'url', description: '待处理视频 URL' },
631
- { name: 'name', valueName: 'name', description: '可选任务名' },
632
- { name: 'callback-url', valueName: 'url', description: '可选回调 URL' },
633
+ { name: 'source-task-id', valueName: 'id', description: '来源视频任务 ID;必须是 material 中已成功的视频任务' },
634
+ PROJECT_GROUP_ARG,
635
+ TASK_RECORD_ARG,
633
636
  DRY_RUN_ARG,
634
637
  YES_ARG,
635
638
  ],
@@ -637,13 +640,13 @@ export function registerAwbCommands(cli) {
637
640
  });
638
641
 
639
642
  cli({
640
- name: 'video subtitle-status',
641
- description: commandHelp('查询去字幕 / 去水印任务状态', {
642
- examples: ['lj-awb video subtitle-status --remote-task-id <id>', 'lj-awb video subtitle-status --public-id <id>'],
643
+ name: 'task video-subtitle-status',
644
+ description: commandHelp('查询 material 去字幕任务状态', {
645
+ examples: ['lj-awb task video-subtitle-status --task-id <subtitleTaskId>'],
643
646
  }),
644
647
  args: [
645
- { name: 'remote-task-id', valueName: 'id', description: '远端任务 ID' },
646
- { name: 'public-id', valueName: 'id', description: '公开任务 ID' },
648
+ { name: 'task-id', valueName: 'id', description: 'material 去字幕任务 ID' },
649
+ PROJECT_GROUP_ARG,
647
650
  ],
648
651
  func: async (_ctx, kwargs) => subtitleStatus(kwargs),
649
652
  });
@@ -706,9 +709,9 @@ export function registerAwbCommands(cli) {
706
709
  });
707
710
 
708
711
  cli({
709
- name: 'asset match-actor',
712
+ name: 'create asset-match-actor',
710
713
  description: commandHelp('按描述和标签匹配平台素材库角色候选', {
711
- examples: ['lj-awb asset match-actor --description "十八岁少女,古风,清冷" --tags-json \'{"gender":"女"}\''],
714
+ examples: ['lj-awb create asset-match-actor --description "十八岁少女,古风,清冷" --tags-json \'{"gender":"女"}\''],
712
715
  }),
713
716
  args: [
714
717
  { name: 'description', valueName: 'text', description: '角色 / 状态描述' },
@@ -721,9 +724,9 @@ export function registerAwbCommands(cli) {
721
724
  });
722
725
 
723
726
  cli({
724
- name: 'asset groups',
727
+ name: 'create asset-groups',
725
728
  description: commandHelp('查询素材组', {
726
- examples: ['lj-awb asset groups --name "女主"'],
729
+ examples: ['lj-awb create asset-groups --name "女主"'],
727
730
  }),
728
731
  args: [
729
732
  { name: 'name', valueName: 'keyword', description: '素材组名称关键词' },
@@ -736,20 +739,20 @@ export function registerAwbCommands(cli) {
736
739
  });
737
740
 
738
741
  cli({
739
- name: 'asset group',
742
+ name: 'create asset-group-get',
740
743
  description: commandHelp('查看素材组详情', {
741
- examples: ['lj-awb asset group --group-id <id>'],
744
+ examples: ['lj-awb create asset-group-get --group-id <id>'],
742
745
  }),
743
746
  args: [{ name: 'group-id', valueName: 'id', description: '素材组 ID' }],
744
747
  func: async (_ctx, kwargs) => assetGroupGet(kwargs),
745
748
  });
746
749
 
747
750
  cli({
748
- name: 'asset group-create',
751
+ name: 'create asset-group',
749
752
  description: commandHelp('创建素材组(用于素材注册时作为命名空间)', {
750
753
  examples: [
751
- 'lj-awb asset group-create --name "女主素材组" --dry-run',
752
- 'lj-awb asset group-create --name "女主素材组" --description "用于第二集女主相关素材" --yes',
754
+ 'lj-awb create asset-group --name "女主素材组" --dry-run',
755
+ 'lj-awb create asset-group --name "女主素材组" --description "用于第二集女主相关素材" --yes',
753
756
  ],
754
757
  }),
755
758
  args: [
@@ -763,9 +766,9 @@ export function registerAwbCommands(cli) {
763
766
  });
764
767
 
765
768
  cli({
766
- name: 'asset group-update',
769
+ name: 'create asset-group-update',
767
770
  description: commandHelp('更新素材组名称 / 描述', {
768
- examples: ['lj-awb asset group-update --group-id <id> --name "新名称" --dry-run'],
771
+ examples: ['lj-awb create asset-group-update --group-id <id> --name "新名称" --dry-run'],
769
772
  }),
770
773
  args: [
771
774
  { name: 'group-id', valueName: 'id', description: '素材组 ID' },
@@ -779,9 +782,9 @@ export function registerAwbCommands(cli) {
779
782
  });
780
783
 
781
784
  cli({
782
- name: 'asset register',
785
+ name: 'create asset',
783
786
  description: commandHelp('把 COS 路径 / URL / 本地文件注册成平台素材', {
784
- examples: ['lj-awb asset register --group-id <id> --url "material/upload/a.png" --name "女主正面" --dry-run'],
787
+ examples: ['lj-awb create asset --group-id <id> --url "material/upload/a.png" --name "女主正面" --dry-run'],
785
788
  }),
786
789
  args: [
787
790
  { name: 'group-id', valueName: 'id', description: '素材组 ID' },
@@ -1253,9 +1256,9 @@ export function registerAwbCommands(cli) {
1253
1256
  }
1254
1257
 
1255
1258
  cli({
1256
- name: 'subject list',
1259
+ name: 'create subject-list',
1257
1260
  description: commandHelp('查询可用于视频主体参考的元素 / 主体', {
1258
- examples: ['lj-awb subject list --name "女主"'],
1261
+ examples: ['lj-awb create subject-list --name "女主"'],
1259
1262
  }),
1260
1263
  args: [
1261
1264
  { name: 'name', valueName: 'keyword', description: '主体名称关键词' },
@@ -1267,18 +1270,18 @@ export function registerAwbCommands(cli) {
1267
1270
  });
1268
1271
 
1269
1272
  cli({
1270
- name: 'subject publish',
1271
- description: commandHelp('创建平台主体 element,用于 KeLing / 可灵 视频主体参考', {
1273
+ name: 'create subject',
1274
+ description: commandHelp('创建平台主体 element,用于 KeLing / 可灵 和 Vidu 视频主体参考', {
1272
1275
  examples: [
1273
- 'lj-awb subject publish --name 女主 --resource primary:./three-view.png --dry-run',
1274
- 'lj-awb subject publish --name 女主 --resource primary:material/assets/a.png --resource face:./face.png --yes',
1276
+ 'lj-awb create subject --model-code tx --name 女主 --resource primary:./three-view.png --dry-run',
1277
+ 'lj-awb create subject --model-code vidu --name 女主 --resource primary:material/assets/a.png --resource face:./face.png --yes',
1275
1278
  ],
1276
- hint: '参考图 slot:primary | three-view | face | side | back。无 primary 时 three-view 自动升为主图;本地路径(./ 或绝对路径)会自动上传,含 :// 或 material/ 前缀的视为已上传 URL。',
1279
+ hint: '参考图 slot:primary | three-view | face | side | back。主体 modelCode:KeLing / 可灵 → tx,Vidu → vidu。无 primary 时 three-view 自动升为主图;本地路径(./ 或绝对路径)会自动上传,含 :// 或 material/ 前缀的视为已上传 URL。',
1277
1280
  }),
1278
1281
  args: [
1279
1282
  { name: 'name', valueName: 'name', description: '主体名称' },
1280
1283
  { name: 'description', valueName: 'text', description: '主体描述' },
1281
- { name: 'model-code', valueName: 'code', description: '主体创建模型编码,可选' },
1284
+ { name: 'model-code', valueName: 'code', description: '主体创建模型编码 tx / vidu;KeLing / 可灵用 tx,Vidu 用 vidu' },
1282
1285
  { name: 'reference-type', valueName: 'type', description: '参考类型,默认 image_refer' },
1283
1286
  { name: 'voice-id', valueName: 'id', description: '参考音色 ID,可选' },
1284
1287
  { name: 'tags-json', valueName: 'json', description: '标签数组,例如 [{"tagId":"o_102"}]' },
@@ -1290,27 +1293,77 @@ export function registerAwbCommands(cli) {
1290
1293
  });
1291
1294
 
1292
1295
  cli({
1293
- name: 'subject wait',
1296
+ name: 'create subject-wait',
1294
1297
  description: commandHelp('等待主体 externalId 回填,用于后续视频主体参考', {
1295
- examples: ['lj-awb subject wait --element-id <elementId> --wait-seconds 300'],
1298
+ examples: ['lj-awb create subject-wait --element-id <elementId> --wait-seconds 300'],
1296
1299
  }),
1297
1300
  args: [
1298
- { name: 'element-id', valueName: 'id', description: 'subject publish 返回的 elementId' },
1301
+ { name: 'element-id', valueName: 'id', description: 'create subject 返回的 elementId' },
1299
1302
  ...SUBJECT_WAIT_ARGS,
1300
1303
  ],
1301
1304
  func: async (_ctx, kwargs) => subjectWait(kwargs),
1302
1305
  });
1303
1306
 
1304
1307
  cli({
1305
- name: 'subject publish-batch',
1308
+ name: 'create subject-voice-list',
1309
+ description: commandHelp('查询主体创建可引用的自定义音色', {
1310
+ examples: ['lj-awb create subject-voice-list --name "女主"'],
1311
+ }),
1312
+ args: [
1313
+ { name: 'name', valueName: 'keyword', description: '音色名称关键词' },
1314
+ { name: 'page-number', valueName: 'n', description: '页码' },
1315
+ { name: 'page-size', valueName: 'n', description: '每页数量' },
1316
+ INCLUDE_RAW_ARG,
1317
+ ],
1318
+ func: async (_ctx, kwargs) => subjectVoiceList(kwargs),
1319
+ });
1320
+
1321
+ cli({
1322
+ name: 'create subject-voice',
1323
+ description: commandHelp('创建主体自定义音色,成功后 externalId 可作为 create subject --voice-id', {
1324
+ examples: [
1325
+ 'lj-awb create subject-voice --name 女主音色 --file ./voice.mp3 --dry-run',
1326
+ 'lj-awb create subject-voice --name 女主音色 --voice-url material/video-create/audio.mp3 --yes',
1327
+ ],
1328
+ hint: '音色来源三选一:--file 本地音频会先上传;--voice-url/--audio-url 使用已上传 material 路径,外部 HTTP URL 会先转存上传;--video-id 使用已有视频 ID。',
1329
+ }),
1330
+ args: [
1331
+ { name: 'name', valueName: 'name', description: '音色名称' },
1332
+ { name: 'file', valueName: 'path', description: '本地音频文件,创建前自动上传' },
1333
+ { name: 'voice-url', valueName: 'url', description: '已上传的 material 音频路径或 COS URL' },
1334
+ { name: 'audio-url', valueName: 'url', description: '同 --voice-url,兼容音频命名' },
1335
+ { name: 'video-id', valueName: 'id', description: '已有视频 ID;与 --file / --voice-url 二选一' },
1336
+ { name: 'req-task-id', valueName: 'id', description: '可选外部追踪 ID' },
1337
+ DRY_RUN_ARG,
1338
+ YES_ARG,
1339
+ ],
1340
+ func: async (_ctx, kwargs) => subjectVoiceCreate(kwargs),
1341
+ });
1342
+
1343
+ cli({
1344
+ name: 'create subject-voice-wait',
1345
+ description: commandHelp('等待主体音色 externalId 回填,用于 create subject --voice-id', {
1346
+ examples: ['lj-awb create subject-voice-wait --voice-record-id <voiceRecordId> --wait-seconds 300'],
1347
+ }),
1348
+ args: [
1349
+ { name: 'voice-record-id', valueName: 'id', description: 'create subject-voice 返回的 voiceRecordId' },
1350
+ { name: 'req-task-id', valueName: 'id', description: '兼容 material getVoiceByReqTaskId 的 reqTaskId' },
1351
+ ...SUBJECT_WAIT_ARGS,
1352
+ ],
1353
+ func: async (_ctx, kwargs) => subjectVoiceWait(kwargs),
1354
+ });
1355
+
1356
+ cli({
1357
+ name: 'create subject-batch',
1306
1358
  description: commandHelp('批量发布主体资产;输入支持 JSON 数组文件或 JSONL(每行一条)', {
1307
1359
  examples: [
1308
- 'lj-awb subject publish-batch --input-file ./subjects.jsonl --dry-run',
1309
- 'lj-awb subject publish-batch --input-file ./subjects.json --concurrency 2 --yes',
1360
+ 'lj-awb create subject-batch --model-code tx --input-file ./subjects.jsonl --dry-run',
1361
+ 'lj-awb create subject-batch --model-code vidu --input-file ./subjects.json --concurrency 2 --yes',
1310
1362
  ],
1311
1363
  }),
1312
1364
  args: [
1313
1365
  { name: 'input-file', valueName: 'path', description: '批量输入文件' },
1366
+ { name: 'model-code', valueName: 'code', description: '默认主体创建模型编码 tx / vidu;单条可覆盖' },
1314
1367
  { name: 'project-name', valueName: 'name', description: '默认项目名' },
1315
1368
  { name: 'concurrency', valueName: 'n', description: '并发数,默认 1' },
1316
1369
  DRY_RUN_ARG,