@aswless_854771076/ai_short_studio_cli 0.1.112 → 0.1.114
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 +2 -2
- package/dist/commands/task/wait.d.ts +1 -0
- package/dist/commands/task/wait.js +7 -1
- package/dist/domain/vvicat-api.d.ts +1 -0
- package/dist/domain/vvicat-api.js +2 -0
- package/package.json +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/async-pipeline.md +2 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/commands.md +1 -1
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ ai-short-studio task list --project "$PROJECT_ID" --status running --json
|
|
|
112
112
|
ai-short-studio task wait --task <task1> --task <task2> --concurrency 4 --timeout 600 --max-interval 15000 --json
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
`canvas node update` 的 `--set key=<JSON>`、`--unset key`、`--title`、`--x` 和 `--y` 只修改指定字段;旧 `--config` 仍兼容。`update-many` 在一次画布版本校验中原子更新多个节点。结构化生成资源仍必须使用 `edit-resource` 或 `edit-shot`,不能通过字段更新改写 artifact。批量执行与等待默认并发为 4、上限为 16。`task list` 默认返回精简状态,`--full` 才返回完整 payload/result
|
|
115
|
+
`canvas node update` 的 `--set key=<JSON>`、`--unset key`、`--title`、`--x` 和 `--y` 只修改指定字段;旧 `--config` 仍兼容。`update-many` 在一次画布版本校验中原子更新多个节点。结构化生成资源仍必须使用 `edit-resource` 或 `edit-shot`,不能通过字段更新改写 artifact。批量执行与等待默认并发为 4、上限为 16。`task list` 默认返回精简状态,`--full` 才返回完整 payload/result;精简状态包含 attempt、maxAttempts 和时间戳,`task wait` 默认 600 秒超时,并对无变化状态使用 1 秒到 15 秒指数退避;传 `--allow-timeout` 可在超时时返回当前任务快照,供调度器继续判断。Agent 应优先单进程批处理,避免为每个节点启动一个 CLI 进程。
|
|
116
116
|
|
|
117
117
|
使用 `canvas node edit-shot <nodeId> --project <projectId> --file shot.json` 编辑镜头。命令会追加并选中不可变的人工 DOCUMENT 版本,不允许修改 `shotKey`、`shotIndex` 或来源身份,旧版本继续可选。重复提交同一节点、同一基线与同一载荷,或当前选版内容已等于目标结果时,返回已有版本并标记 `idempotent: true`。画布版本冲突会刷新画布和当前选版后重试一次;资产版本竞争因事务已回滚,会刷新画布并保留原基线重试一次。身份错误不会重试。
|
|
118
118
|
|
|
@@ -136,7 +136,7 @@ CLI 通过 `/api/v1/bootstrap` 完成版本、连通性与 Supabase 公共配置
|
|
|
136
136
|
|
|
137
137
|
`canvas settings set` 支持项目级 `imageResolution`、`imageQuality`、`videoResolution`,未覆盖的图片、图片编辑和视频节点会继承这些默认值。候选值来自 `settings get` 对应字段的实时 `options`;节点仅在需要偏离项目默认时,按当前模型 `capabilities` 写入 `resolution`、`quality` 覆盖。
|
|
138
138
|
|
|
139
|
-
项目交付语言在创建时用 `ai-short-studio project create --language pt-BR` 固定,接受任意规范 BCP 47 标签;剧本、拆镜、台词、配音、画面文字和字幕都沿用该值。`canvas settings get` 只回读项目语言,画布设置接口不能清空或修改它。CLI `--locale` 只影响界面消息;文本与短剧节点按项目 `outputLanguage` 选择模板并追加强制语言合同。节点 `prompt` 作为附加指令执行,但不得覆盖主 schema
|
|
139
|
+
项目交付语言在创建时用 `ai-short-studio project create --language pt-BR` 固定,接受任意规范 BCP 47 标签;剧本、拆镜、台词、配音、画面文字和字幕都沿用该值。`canvas settings get` 只回读项目语言,画布设置接口不能清空或修改它。CLI `--locale` 只影响界面消息;文本与短剧节点按项目 `outputLanguage` 选择模板并追加强制语言合同。节点 `prompt` 作为附加指令执行,但不得覆盖主 schema、必填字段或语言合同。短剧结构化节点会校验核心 JSON 结构合同,散文、空键、空内容数组、缺少 scenes/content、关键顶层或嵌套核心字段不会落库;结构化短剧文本调用关闭 reasoning,使用模型允许的最大输出预算、120 秒超时和最多 3 次任务尝试。运行中的画布节点会显示阶段、进度和任务重试次数。数据库旧模板缺少 JSON 或关键 schema 字段时会告警并回退仓库模板。空白模型结果按 `EMPTY_RESPONSE` 失败重试,不生成空资产。交付时只下载每镜 selected 原始 MP4,按 `S001.mp4` 顺序命名,并用 manifest 记录镜号、节点、资产、版本和文件名;字幕单独交付,不烧录进原始视频。
|
|
140
140
|
|
|
141
141
|
百炼 CosyVoice 的 `tts` 节点通过实时 schema 提供音色、语言、格式、采样率、音量、语速、音调和声音指令。先用 `canvas settings get` 确认最终 `audioModel`,再从 `canvas node types` 返回的 `tts.configSchema` 选择字段和值;CLI 会在写入前校验必填字段、类型、整数、枚举和数值上下限。
|
|
142
142
|
|
|
@@ -9,6 +9,7 @@ export default class TaskWait extends BaseCommand {
|
|
|
9
9
|
interval: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
'max-interval': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'allow-timeout': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -10,6 +10,7 @@ export default class TaskWait extends BaseCommand {
|
|
|
10
10
|
interval: Flags.integer({ description: '初始轮询间隔(毫秒)', default: 1_000, min: 1, max: 60_000 }),
|
|
11
11
|
'max-interval': Flags.integer({ description: '无状态变化时的最大轮询间隔(毫秒)', default: 15_000, min: 1, max: 60_000 }),
|
|
12
12
|
timeout: Flags.integer({ description: '等待超时(秒)', default: 600, min: 1, max: 86_400 }),
|
|
13
|
+
'allow-timeout': Flags.boolean({ description: '超时后输出当前任务快照并正常退出', default: false }),
|
|
13
14
|
};
|
|
14
15
|
async run() {
|
|
15
16
|
const { args, flags } = await this.parse(TaskWait);
|
|
@@ -21,9 +22,14 @@ export default class TaskWait extends BaseCommand {
|
|
|
21
22
|
interval: flags.interval,
|
|
22
23
|
maxInterval: flags['max-interval'],
|
|
23
24
|
timeoutMs: flags.timeout * 1_000,
|
|
25
|
+
allowTimeout: flags['allow-timeout'],
|
|
24
26
|
}));
|
|
25
27
|
this.print(tasks.length === 1 ? tasks[0] : { tasks });
|
|
26
|
-
if (tasks.some((task) =>
|
|
28
|
+
if (tasks.some((task) => ['failed', 'canceled', 'dismissed'].includes(task.status))) {
|
|
27
29
|
this.error('部分任务未成功完成', { exit: 8 });
|
|
30
|
+
}
|
|
31
|
+
if (!flags['allow-timeout'] && tasks.some((task) => task.status !== 'completed')) {
|
|
32
|
+
this.error('部分任务未成功完成', { exit: 8 });
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
}
|
|
@@ -379,6 +379,8 @@ export class VvicatApi {
|
|
|
379
379
|
: initialInterval;
|
|
380
380
|
signature = nextSignature;
|
|
381
381
|
if (deadline !== null && Date.now() >= deadline) {
|
|
382
|
+
if (normalized.allowTimeout)
|
|
383
|
+
return task;
|
|
382
384
|
throw new Error(`TASK_WAIT_TIMEOUT:${taskId}:${task.status}`);
|
|
383
385
|
}
|
|
384
386
|
const remaining = deadline === null ? delay : Math.min(delay, Math.max(0, deadline - Date.now()));
|
package/package.json
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
只运行一个调度器。生成命令只负责提交,不携带 `--wait`;调度器以短轮询读取画布和任务终态,并维护每个节点的 `nodeId / inputFingerprint / taskId / status / attempt / selectedVersionId / downstreamSubmitted`。轮询间隔通常 3–10 秒;长时间无变化时退避到 15–30 秒,状态变化后恢复短轮询。
|
|
8
8
|
|
|
9
|
+
轮询使用一次 `task list --project …` 批量读取,不把 `task wait` 包在 shell 重试循环里。精简任务状态已经包含 `attempt / maxAttempts / queuedAt / startedAt / heartbeatAt`,用于区分排队、模型重试和心跳停滞。确需等待单个阻塞任务时使用 `task wait --allow-timeout --json`;超时返回当前任务快照并正常退出,再由调度器决定继续等待、取消或恢复,避免超时 stderr 被误当成空状态。
|
|
10
|
+
|
|
9
11
|
镜头状态机:
|
|
10
12
|
|
|
11
13
|
`storyboard-image ready → image running → image done → image audit → storyboard-video-prompt running → prompt done → prompt audit → video config gate → video running → video audit → edit ready`
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- 滚动提交与任务恢复策略:[async-pipeline.md](async-pipeline.md)
|
|
9
9
|
- 剪辑、字幕、声音和最终渲染:[editing-delivery.md](editing-delivery.md)
|
|
10
10
|
|
|
11
|
-
所有命令支持 `--base-url`、`--profile`、`--locale zh|en` 和 `--json`。`--locale` 只控制 CLI 消息,不控制剧本、拆镜、H3 人声或字幕语言。画布文本与短剧节点按项目 `outputLanguage` 选择提示词模板并追加强制语言合同;节点 `prompt` 只能作为附加指令,不得覆盖主 schema
|
|
11
|
+
所有命令支持 `--base-url`、`--profile`、`--locale zh|en` 和 `--json`。`--locale` 只控制 CLI 消息,不控制剧本、拆镜、H3 人声或字幕语言。画布文本与短剧节点按项目 `outputLanguage` 选择提示词模板并追加强制语言合同;节点 `prompt` 只能作为附加指令,不得覆盖主 schema 或语言合同。短剧结构化节点校验核心 JSON 结构合同,不得接受散文、空键、空内容数组、缺少 scenes/content、关键顶层或嵌套核心字段的结果;数据库旧模板缺少 JSON 或关键 schema 字段时会记录漂移并回退仓库模板。结构化短剧文本任务会关闭 reasoning、使用模型允许的最大输出预算、120 秒超时和最多 3 次任务尝试;返回空文本或缺少核心 schema 字段时按失败重试,不得落库空壳。运行中的画布节点会显示阶段、进度和任务尝试次数。`task list` 精简状态包含 attempt/maxAttempts 和任务时间戳;显式等待可用 `--allow-timeout` 在超时时返回当前任务快照。
|
|
12
12
|
|
|
13
13
|
## 跨流程硬规则
|
|
14
14
|
|