@aswless_854771076/ai_short_studio_cli 0.1.25 → 0.1.26
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
|
@@ -85,6 +85,10 @@ CLI 通过 `/api/v1/bootstrap` 完成版本、连通性与 Supabase 公共配置
|
|
|
85
85
|
|
|
86
86
|
`canvas settings set` 支持项目级 `imageResolution`、`imageQuality`、`videoResolution`,未覆盖的图片、图片编辑和视频节点会继承这些默认值。候选值来自 `settings get` 对应字段的实时 `options`;节点仅在需要偏离项目默认时,按当前模型 `capabilities` 写入 `resolution`、`quality` 覆盖。
|
|
87
87
|
|
|
88
|
+
百炼 CosyVoice 的 `tts` 节点通过实时 schema 提供音色、语言、格式、采样率、音量、语速、音调和声音指令。先用 `canvas settings get` 确认最终 `audioModel`,再从 `canvas node types` 返回的 `tts.configSchema` 选择字段和值;CLI 会在写入前校验类型、整数、枚举和数值上下限。
|
|
89
|
+
|
|
90
|
+
声音克隆使用实时目录中的 `voice-clone` 节点:参考音频连接 `audio`,成功后将 `voice` 输出连接到 `tts.voice`,无需手工复制音色 ID。
|
|
91
|
+
|
|
88
92
|
运行 `ai-short-studio <topic> --help` 查看精确参数。可执行命令使用完整产品名 `ai-short-studio`,同时避免与其他 CLI 冲突。所有结构化响应保持 JSON;API 错误也返回稳定的 `error.code`、`status`、`retryable` 和 `details`。
|
|
89
93
|
|
|
90
94
|
退出码:`0` 成功,`3` 未认证,`4` 不存在,`5` 禁止或冲突,`6` 参数错误,`7` 其他错误。
|
|
@@ -10,10 +10,23 @@ function validateConfigSchema(nodeType, config) {
|
|
|
10
10
|
if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {
|
|
11
11
|
throw new Error(`节点 ${nodeType.kind} 的 ${key} 不在实时 schema 中`);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
const fieldSchema = schema;
|
|
14
|
+
if (fieldSchema.type === 'string' && typeof value !== 'string') {
|
|
14
15
|
throw new Error(`节点 ${nodeType.kind} 的 ${key} 必须是字符串`);
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
if ((fieldSchema.type === 'number' || fieldSchema.type === 'integer') && (typeof value !== 'number' || !Number.isFinite(value))) {
|
|
18
|
+
throw new Error(`节点 ${nodeType.kind} 的 ${key} 必须是数字`);
|
|
19
|
+
}
|
|
20
|
+
if (fieldSchema.type === 'integer' && !Number.isInteger(value)) {
|
|
21
|
+
throw new Error(`节点 ${nodeType.kind} 的 ${key} 必须是整数`);
|
|
22
|
+
}
|
|
23
|
+
if (typeof value === 'number' && typeof fieldSchema.minimum === 'number' && value < fieldSchema.minimum) {
|
|
24
|
+
throw new Error(`节点 ${nodeType.kind} 的 ${key} 不能小于 ${fieldSchema.minimum}`);
|
|
25
|
+
}
|
|
26
|
+
if (typeof value === 'number' && typeof fieldSchema.maximum === 'number' && value > fieldSchema.maximum) {
|
|
27
|
+
throw new Error(`节点 ${nodeType.kind} 的 ${key} 不能大于 ${fieldSchema.maximum}`);
|
|
28
|
+
}
|
|
29
|
+
const allowed = fieldSchema.enum;
|
|
17
30
|
if (Array.isArray(allowed) && !allowed.some((candidate) => Object.is(candidate, value))) {
|
|
18
31
|
throw new Error(`节点 ${nodeType.kind} 的 ${key} 不在实时 schema 允许范围内`);
|
|
19
32
|
}
|
package/package.json
CHANGED
|
@@ -41,6 +41,10 @@ description: Use when an agent needs to inspect or operate VVICAT infinite-canva
|
|
|
41
41
|
7. 配置门禁固定用一次 `canvas settings set` 写入确认字段;通过门禁后的节点与连线写入,仍需在每次写入前重新读取画布版本,优先用专用 node/edge 命令,批量图变更才用低层 `canvas apply`。每次执行都读取真实任务 ID 并 `task wait`,不用固定 sleep。
|
|
42
42
|
8. 交付前确认 selected version 与下载目录,记录项目、节点、任务和资产 ID、失败项与未决项。临时项目在所有结束路径删除;既有项目绝不擅自删除。
|
|
43
43
|
|
|
44
|
+
需要生成语音时,先从 `canvas settings get` 确认最终 `audioModel`,再读取实时 `tts.configSchema`。当有效模型为百炼 CosyVoice 时,必须让用户确认兼容且非空的 `voice`,并只按实时 schema 写入 `languageHints`、`format`、`sampleRate`、`volume`、`cosyRate`、`pitch` 和 `instruction`;`rate` 仅用于非 CosyVoice 模型。CLI 会校验字符串、数字、整数、枚举和数值上下限,不得用 schema 外字段或越界值绕过确认。
|
|
45
|
+
|
|
46
|
+
需要克隆声音时,按实时 schema 创建 `voice-clone`,将已确认的音频节点连接到 `audio`,确认 `prefix`、`targetModel`、`languageHints`、`maxPromptAudioLength` 和 `enablePreprocess` 后运行。成功后刷新画布,把克隆节点的 `voice` 输出连接到 `tts.voice`;不得猜测或手填任务尚未返回的音色 ID。
|
|
47
|
+
|
|
44
48
|
Meme 推荐链路为 `text.text → meme-scene-analysis.story`,运行后把自动生成的计划资源连接到 `meme-material-search.plan`,再把素材包资源连接到 `cat-meme-video.materials`;原故事仍连接 `cat-meme-video.story`,计划资源可同时连接 `cat-meme-video.plan`。每一步完成后刷新画布,使用服务端自动创建的资源节点,不能伪造或重复创建资源。`cat-meme-video` 的 `config` 需按实时 schema 确认 `aspectRatio`(`1:1`、`9:16` 或 `16:9`)与 `resolution`(`720p` 或 `1080p`);它们是节点输出参数,不替代项目配置门禁。
|
|
45
49
|
|
|
46
50
|
详细命令按需读取 [references/commands.md](references/commands.md),或运行 `ai-short-studio <topic> --help`。
|