@lingjingai/lj-awb-cli 0.5.19 → 0.5.21

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.19",
3
+ "version": "0.5.21",
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.19",
3
+ "version": "0.5.21",
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.19"
16
+ "@lingjingai/awb-core": "0.5.21"
17
17
  }
18
18
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-core",
3
- "version": "0.5.19",
3
+ "version": "0.5.21",
4
4
  "description": "Shared core runtime for Lingjing AWB CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -343,6 +343,7 @@ export async function fetchTaskInfo(taskId) {
343
343
  return await apiFetch('/api/material/creation/task/info', {
344
344
  method: 'GET',
345
345
  query: { taskId },
346
+ timeoutMs: 60_000,
346
347
  });
347
348
  }
348
349
 
@@ -1133,7 +1133,7 @@ export async function creditsUsageSummary(kwargs = {}) {
1133
1133
  };
1134
1134
  }
1135
1135
 
1136
- function modelListMetadata(kind, paramKeys = [], rulesByKey = new Map()) {
1136
+ function modelListMetadata(kind, paramKeys = [], rulesByKey = new Map(), modelGroupCode = null) {
1137
1137
  const keys = new Set(paramKeys);
1138
1138
  if (kind === 'audio') {
1139
1139
  return {
@@ -1145,7 +1145,7 @@ function modelListMetadata(kind, paramKeys = [], rulesByKey = new Map()) {
1145
1145
  }
1146
1146
  const imageReferenceParams = ['cref', 'sref', 'iref', 'resources'].filter((key) => keys.has(key));
1147
1147
  const videoResourceParams = ['frames', 'multi_param', 'multi_prompt'].filter((key) => keys.has(key));
1148
- const inputModes = createSpecSupportedIntents(createSpecInputModes(kind, keys, rulesByKey), kind)
1148
+ const inputModes = createSpecSupportedIntents(restrictAutoAssetInputModes(modelGroupCode, createSpecInputModes(kind, keys, rulesByKey)), kind)
1149
1149
  .map((item) => item.mode);
1150
1150
  const controls = [];
1151
1151
  if (keys.has('ratio')) controls.push('ratio');
@@ -1205,7 +1205,7 @@ function normalizeModelRows(payload, kind, options = {}) {
1205
1205
  ...rawText.matchAll(/"paramKey"\s*:\s*"([^"]+)"/g),
1206
1206
  ].map((match) => match[1]));
1207
1207
  const rulesByKey = new Map(rawOptions.map((option) => [option.paramKey, option.rules]).filter(([key, rules]) => key && rules));
1208
- const metadata = modelListMetadata(kind, paramKeys, rulesByKey);
1208
+ const metadata = modelListMetadata(kind, paramKeys, rulesByKey, modelGroupCode);
1209
1209
  const row = compactRecord({
1210
1210
  modelGroupCode,
1211
1211
  displayName: item?.modelName ?? item?.name ?? item?.label ?? null,
@@ -2120,7 +2120,7 @@ async function loadModelOptionContext(modelGroupCode, options = {}) {
2120
2120
  const optionKeys = new Set(mergedOptions.map((item) => item.paramKey).filter(Boolean));
2121
2121
  const taskKind = inferTaskKind(rawModel, optionKeys);
2122
2122
  const rulesByKey = new Map(mergedOptions.map((item) => [item.paramKey, item.rules]).filter(([key, rules]) => key && rules));
2123
- const inputModes = createSpecInputModes(taskKind, optionKeys, rulesByKey);
2123
+ const inputModes = restrictAutoAssetInputModes(modelGroupCode, createSpecInputModes(taskKind, optionKeys, rulesByKey));
2124
2124
  const createParams = mergedOptions.map((option) => createParamForModelOption(option, taskKind));
2125
2125
  const constraintSchema = options.includeConstraintSchema
2126
2126
  ? await fetchModelConstraintSchema(rawModel, modelGroupCode)
@@ -2143,6 +2143,20 @@ async function loadModelOptionContext(modelGroupCode, options = {}) {
2143
2143
  };
2144
2144
  }
2145
2145
 
2146
+ function restrictAutoAssetInputModes(modelGroupCode, inputModes) {
2147
+ if (isAutoAssetSeedanceModel(modelGroupCode)) {
2148
+ for (const mode of inputModes) {
2149
+ if (mode.sourceKinds) mode.sourceKinds = mode.sourceKinds.filter((kind) => kind !== 'asset_id');
2150
+ if (mode.resourceSyntax) mode.resourceSyntax = mode.resourceSyntax.filter((example) => !example.includes('asset:'));
2151
+ if (mode.mode === 'subject_reference') {
2152
+ mode.supported = false;
2153
+ mode.unsupportedReason = '自动加白模型只接受原素材,不接受主体或素材 ID。';
2154
+ }
2155
+ }
2156
+ }
2157
+ return inputModes;
2158
+ }
2159
+
2146
2160
  function optionAllowedValues(option = {}) {
2147
2161
  if (!Array.isArray(option.optionList)) return [];
2148
2162
  return option.optionList
@@ -5158,6 +5172,10 @@ export async function imageCreate(kwargs = {}) {
5158
5172
  };
5159
5173
  }
5160
5174
 
5175
+ function isAutoAssetSeedanceModel(code) {
5176
+ return /^Auto_(JiMeng|BytePlus)_Seedance_(2|2_Fast|2_Mini|2_5)_VideoCreate_Group$/.test(code || '');
5177
+ }
5178
+
5161
5179
  async function buildVideoRequest(kwargs = {}, options = {}) {
5162
5180
  const dryRun = Boolean(options.dryRun);
5163
5181
  const model = resolveTaskModel('video', kwargs);
@@ -5166,6 +5184,10 @@ async function buildVideoRequest(kwargs = {}, options = {}) {
5166
5184
  kind: 'video',
5167
5185
  sceneType: TASK_UPLOAD_SCENE.VIDEO_CREATE,
5168
5186
  });
5187
+ if (isAutoAssetSeedanceModel(model.modelGroupCode)
5188
+ && validationResources.resources.some((resource) => resource.source?.kind === 'asset_id')) {
5189
+ throw argumentError('自动加白模型不接受素材 ID', '请传本地文件、HTTP(S) 地址或平台文件路径,由服务端自动加白。');
5190
+ }
5169
5191
  const prompt = trimToNull(kwargs.prompt) ?? '';
5170
5192
  if (!prompt && !validationResources.resources.length) {
5171
5193
  throw argumentError('缺少视频生成输入', '至少传 --prompt 或 --resource。');
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: lj-awb
3
- version: 0.5.19
3
+ version: 0.5.21
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.19"
8
+ version: "0.5.21"
9
9
  bin: "lj-awb"
10
10
  cliHelp: "lj-awb --help"
11
11
  ---
@@ -1 +1 @@
1
- 0.5.19
1
+ 0.5.21
@@ -1,6 +1,6 @@
1
1
  {
2
- "skillVersion": "0.5.19",
3
- "minCliVersion": "0.5.19",
2
+ "skillVersion": "0.5.21",
3
+ "minCliVersion": "0.5.21",
4
4
  "preferredCommand": "lj-awb",
5
- "updatedAt": "2026-10-09"
5
+ "updatedAt": "2026-10-20"
6
6
  }