@lingjingai/lj-awb-cli 0.5.23 → 0.5.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/lj-awb-cli",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "description": "Lingjing AWB CLI monorepo with shared core, standalone CLI, and agent skills",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-cli-bin",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
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.5.23"
16
+ "@lingjingai/awb-core": "0.5.25"
17
17
  }
18
18
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-core",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "description": "Shared core runtime for Lingjing AWB CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -660,13 +660,18 @@ export function registerAwbCommands(cli) {
660
660
 
661
661
  cli({
662
662
  name: 'create video-fee',
663
- description: commandHelp('计算生视频预计积分(--prompt / --resource / --resources-json 至少传一个)', {
664
- examples: ['lj-awb create video-fee --model-group-code <code> --prompt "雨夜奔跑" --duration 5 --quality 720 --ratio 9:16'],
663
+ description: commandHelp('计算生视频预计积分,支持 Seedance 2.5 样片和成片', {
664
+ examples: [
665
+ 'lj-awb create video-fee --model-group-code <code> --prompt "雨夜奔跑" --duration 5 --quality 720 --ratio 9:16',
666
+ 'lj-awb create video-fee --model-group-code Auto_JiMeng_Seedance_2_5_VideoCreate_Group --draft-task-id <taskId>',
667
+ ],
665
668
  hint: '估价前先确认 quality、duration、ratio 等会影响积分的关键参数。',
666
669
  }),
667
670
  args: [
668
671
  MODEL_GROUP_ARG,
669
672
  PROJECT_GROUP_ARG,
673
+ { name: 'draft', description: 'Seedance 2.5 生成 480p 样片' },
674
+ { name: 'draft-task-id', valueName: 'taskId', description: '用成功的绘梦样片任务生成 1080p 成片' },
670
675
  { name: 'prompt', valueName: 'text', description: '视频提示词;默认原样透传,不润色(和 --resource / --resources-json 至少传一个)' },
671
676
  { name: 'ratio', valueName: 'ratio', description: '视频比例' },
672
677
  { name: 'quality', valueName: 'quality', description: '清晰度,如 720' },
@@ -685,6 +690,8 @@ export function registerAwbCommands(cli) {
685
690
  name: 'create video',
686
691
  description: commandHelp('提交生视频任务;正式执行需要 --yes', {
687
692
  examples: [
693
+ 'lj-awb create video --model-group-code Auto_JiMeng_Seedance_2_5_VideoCreate_Group --draft --prompt "镜头缓慢推进" --resource image:reference=./shot.png --duration 5 --yes',
694
+ 'lj-awb create video --model-group-code Auto_JiMeng_Seedance_2_5_VideoCreate_Group --draft-task-id <taskId> --yes',
688
695
  'lj-awb create video --model-group-code <code> --prompt "雨夜奔跑" --dry-run',
689
696
  'lj-awb create video --model-group-code <code> --prompt "镜头推进" --resource image:first_frame=./actor.png --duration 5 --yes',
690
697
  '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',
@@ -695,6 +702,8 @@ export function registerAwbCommands(cli) {
695
702
  args: [
696
703
  MODEL_GROUP_ARG,
697
704
  PROJECT_GROUP_ARG,
705
+ { name: 'draft', description: 'Seedance 2.5 生成 480p 样片' },
706
+ { name: 'draft-task-id', valueName: 'taskId', description: '用成功的绘梦样片任务生成 1080p 成片' },
698
707
  { name: 'prompt', valueName: 'text', description: '视频提示词;默认原样透传,不润色(和 --resource / --resources-json 至少传一个)' },
699
708
  { name: 'ratio', valueName: 'ratio', description: '视频比例' },
700
709
  { name: 'quality', valueName: 'quality', description: '清晰度' },
@@ -1535,6 +1535,7 @@ export function shouldDefaultNeedAudioForVideoModel(model = {}, params = [], pro
1535
1535
  }
1536
1536
 
1537
1537
  async function fetchModelConstraintSchema(rawModel = {}, modelGroupCode) {
1538
+ if (Array.isArray(rawModel?.constraintSchema) && rawModel.constraintSchema.length) return rawModel.constraintSchema;
1538
1539
  const usage = trimToNull(rawModel?.usage);
1539
1540
  if (!usage) return [];
1540
1541
  const payload = await awbApi.fetchModelsByUsage(usage, { includeConstraintSchema: true }).catch(() => null);
@@ -2147,13 +2148,22 @@ async function loadModelOptionContext(modelGroupCode, options = {}) {
2147
2148
  }
2148
2149
 
2149
2150
  function restrictAutoAssetInputModes(modelGroupCode, inputModes) {
2150
- if (isAutoAssetSeedanceModel(modelGroupCode)) {
2151
+ if (isGoogleFlowVideoModel(modelGroupCode)) {
2152
+ const promptOnly = inputModes.find((mode) => mode.mode === 'prompt_only');
2153
+ if (promptOnly) {
2154
+ promptOnly.supported = true;
2155
+ delete promptOnly.unsupportedReason;
2156
+ }
2157
+ }
2158
+ if (isAutoAssetSeedanceModel(modelGroupCode) || isGoogleFlowVideoModel(modelGroupCode)) {
2151
2159
  for (const mode of inputModes) {
2152
2160
  if (mode.sourceKinds) mode.sourceKinds = mode.sourceKinds.filter((kind) => kind !== 'asset_id');
2153
2161
  if (mode.resourceSyntax) mode.resourceSyntax = mode.resourceSyntax.filter((example) => !example.includes('asset:'));
2154
2162
  if (mode.mode === 'subject_reference') {
2155
2163
  mode.supported = false;
2156
- mode.unsupportedReason = '自动加白模型只接受原素材,不接受主体或素材 ID。';
2164
+ mode.unsupportedReason = isGoogleFlowVideoModel(modelGroupCode)
2165
+ ? '此模型只接受原素材,不接受主体或素材 ID。'
2166
+ : '自动加白模型只接受原素材,不接受主体或素材 ID。';
2157
2167
  }
2158
2168
  }
2159
2169
  }
@@ -5240,6 +5250,10 @@ function isAutoAssetSeedanceModel(code) {
5240
5250
  return /^Auto_(JiMeng|BytePlus)_Seedance_(2|2_Fast|2_Mini|2_5)_VideoCreate_Group$/.test(code || '');
5241
5251
  }
5242
5252
 
5253
+ function isGoogleFlowVideoModel(code) {
5254
+ return code === 'Google_Flow_Omni_1_2_Flash_VideoCreate_Group';
5255
+ }
5256
+
5243
5257
  function needsAutoAssetVideoImageConversion(code) {
5244
5258
  return isAutoAssetSeedanceModel(code)
5245
5259
  || LEGACY_ASSET_REVIEW_MODELS.some((model) => model.modelGroupCode === code);
@@ -5248,6 +5262,44 @@ function needsAutoAssetVideoImageConversion(code) {
5248
5262
  async function buildVideoRequest(kwargs = {}, options = {}) {
5249
5263
  const dryRun = Boolean(options.dryRun);
5250
5264
  const model = resolveTaskModel('video', kwargs);
5265
+ const draft = toBool(kwargs.draft);
5266
+ const draftTaskId = trimToNull(kwargs.draftTaskId);
5267
+ if ((draft || kwargs.draftTaskId != null)
5268
+ && !/^(Auto_)?JiMeng_Seedance_2_5_VideoCreate_Group$/.test(model.modelGroupCode)) {
5269
+ throw argumentError('样片模式仅支持国内 Seedance 2.5');
5270
+ }
5271
+ if (kwargs.draftTaskId != null && !draftTaskId) {
5272
+ throw argumentError('--draft-task-id 不能为空');
5273
+ }
5274
+ const genericModelParams = await collectGenericModelParams(kwargs);
5275
+ if ('draft' in genericModelParams || 'draft_task_id' in genericModelParams) {
5276
+ throw argumentError('样片参数请使用 --draft 或 --draft-task-id');
5277
+ }
5278
+ if (draftTaskId) {
5279
+ const suppliedInputs = ['prompt', 'ratio', 'duration', 'needAudio', 'resource', 'resources', 'resourcesJson']
5280
+ .some((key) => kwargs[key] != null);
5281
+ if (draft || suppliedInputs || Object.keys(genericModelParams).length
5282
+ || (kwargs.quality != null && String(kwargs.quality) !== '1080')) {
5283
+ throw argumentError('转成片仅接受 --draft-task-id 和 1080p 画质');
5284
+ }
5285
+ const projectGroupNo = await resolveProjectGroupNo(kwargs.projectGroupNo, {
5286
+ allowNull: dryRun, noNetwork: dryRun, noSave: dryRun,
5287
+ });
5288
+ return {
5289
+ model, projectGroupNo, uploads: [], localFiles: [], resourceConversions: [],
5290
+ request: {
5291
+ requestSource: REQUEST_SOURCE_CLI,
5292
+ modelGroupCode: model.modelGroupCode,
5293
+ promptParams: { draft_task_id: draftTaskId, quality: '1080' },
5294
+ ...(projectGroupNo ? { projectGroupNo } : {}),
5295
+ },
5296
+ };
5297
+ }
5298
+ if (draft && ((kwargs.quality != null && String(kwargs.quality) !== '480')
5299
+ || (genericModelParams.quality != null && String(genericModelParams.quality) !== '480')
5300
+ || (genericModelParams.generate_num != null && Number(genericModelParams.generate_num) !== 1))) {
5301
+ throw argumentError('样片仅支持 480p 单条视频');
5302
+ }
5251
5303
  const validationResources = await resolveResources(kwargs, {
5252
5304
  dryRun: true,
5253
5305
  kind: 'video',
@@ -5257,12 +5309,19 @@ async function buildVideoRequest(kwargs = {}, options = {}) {
5257
5309
  && validationResources.resources.some((resource) => resource.source?.kind === 'asset_id')) {
5258
5310
  throw argumentError('自动加白模型不接受素材 ID', '请传本地文件、HTTP(S) 地址或平台文件路径,由服务端自动加白。');
5259
5311
  }
5312
+ if (isGoogleFlowVideoModel(model.modelGroupCode)) {
5313
+ if (validationResources.resources.some((resource) => resource.source?.kind === 'asset_id')) {
5314
+ throw argumentError('此模型不接受素材 ID', '请传本地图片/视频、HTTP(S) 地址或平台文件路径。');
5315
+ }
5316
+ if (validationResources.resources.some((resource) => !['image', 'video'].includes(resource.type) || resource.usage !== 'reference')) {
5317
+ throw argumentError('此模型仅支持图片或视频参考素材', '请使用 image:reference 或 video:reference,不支持首尾帧或参考音频。');
5318
+ }
5319
+ }
5260
5320
  const prompt = trimToNull(kwargs.prompt) ?? '';
5261
5321
  if (!prompt && !validationResources.resources.length) {
5262
5322
  throw argumentError('缺少视频生成输入', '至少传 --prompt 或 --resource。');
5263
5323
  }
5264
5324
  assertVideoReferenceKeysUsed(prompt, validationResources.resources);
5265
- const genericModelParams = await collectGenericModelParams(kwargs);
5266
5325
  const defaultParams = {
5267
5326
  ...genericModelParams,
5268
5327
  prompt,
@@ -5272,8 +5331,12 @@ async function buildVideoRequest(kwargs = {}, options = {}) {
5272
5331
  defaultParams.duration = parseIntegerParam(kwargs.duration, '--duration', 0);
5273
5332
  }
5274
5333
  if (kwargs.ratio != null && kwargs.ratio !== '') defaultParams.ratio = kwargs.ratio;
5275
- if (kwargs.quality != null && kwargs.quality !== '') defaultParams.quality = kwargs.quality;
5334
+ if (kwargs.quality != null && kwargs.quality !== '') {
5335
+ defaultParams.quality = isGoogleFlowVideoModel(model.modelGroupCode) && String(kwargs.quality).toLowerCase() === '4k'
5336
+ ? '4k' : kwargs.quality;
5337
+ }
5276
5338
  if (kwargs.needAudio != null && kwargs.needAudio !== '') defaultParams.need_audio = toBool(kwargs.needAudio);
5339
+ if (draft) defaultParams.quality = '480';
5277
5340
  let promptParams = normalizeUnifiedPromptParams(defaultParams);
5278
5341
  const validation = await validateCreateRequestAgainstModel('video', model.modelGroupCode, promptParams, validationResources.resourceDetails);
5279
5342
  if (shouldDefaultNeedAudioForVideoModel(validation.context.model, validation.params, promptParams)) {
@@ -5290,6 +5353,7 @@ async function buildVideoRequest(kwargs = {}, options = {}) {
5290
5353
  && needsAutoAssetVideoImageConversion(model.modelGroupCode),
5291
5354
  });
5292
5355
  const requestPromptParams = normalizeUnifiedPromptParams({ ...defaultParams, resources: resolvedResources.resources });
5356
+ if (draft) requestPromptParams.draft = true;
5293
5357
  const projectGroupNo = await resolveProjectGroupNo(kwargs.projectGroupNo, { allowNull: dryRun, noNetwork: dryRun, noSave: dryRun });
5294
5358
  return {
5295
5359
  model,
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: lj-awb
3
- version: 0.5.23
3
+ version: 0.5.25
4
4
  description: "灵境 AWB CLI skill。使用 `lj-awb` 命令调用动漫平台 / AWB 云端能力,覆盖认证、项目组、积分余额/明细/用量(含充值购买与兑换码兑换)、模型发现、上传、统一 create 创建域、任务查询、视频超分。用户说生图、生视频、生成音频、积分明细、积分流水、充值记录、消耗记录、主体、音色、素材加白、去字幕时使用。正式生成、切换项目组、清空认证、兑换码等写入或扣费动作前必须确认。"
5
5
  metadata:
6
6
  bootstrap:
7
7
  package: "@lingjingai/lj-awb-cli"
8
- version: "0.5.23"
8
+ version: "0.5.25"
9
9
  bin: "lj-awb"
10
10
  cliHelp: "lj-awb --help"
11
11
  ---
@@ -1 +1 @@
1
- 0.5.23
1
+ 0.5.25
@@ -1,6 +1,6 @@
1
1
  {
2
- "skillVersion": "0.5.23",
3
- "minCliVersion": "0.5.23",
2
+ "skillVersion": "0.5.25",
3
+ "minCliVersion": "0.5.25",
4
4
  "preferredCommand": "lj-awb",
5
- "updatedAt": "2026-10-28"
5
+ "updatedAt": "2026-11-24"
6
6
  }