@aswless_854771076/ai_short_studio_cli 0.1.162 → 0.1.163
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/dist/commands/canvas/document/save.js +1 -0
- package/dist/domain/canvas-document-contract.d.ts +3 -2
- package/dist/domain/canvas-document-contract.js +13 -0
- package/dist/domain/vvicat-api.js +1 -0
- package/package.json +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/agent-recovery.md +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/commands/canvas.md +10 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/short-drama/assets/generate-character-profiles.md +2 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/short-drama/module-map.json +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/short-drama/pipeline.md +2 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 画布文档的内容合同。
|
|
3
3
|
*
|
|
4
4
|
* `canvas workflow status` 只按 `document-key` 找到已保存版本,并核对 `--input` 快照是否
|
|
5
|
-
*
|
|
6
|
-
* Agent
|
|
5
|
+
* 过期;服务端也按同一登记合同检查正文结构。历史问题里
|
|
6
|
+
* Agent 曾先存只有 summary 的占位文档再继续生成资产,因此本地提前给出可修正的错误。
|
|
7
7
|
*
|
|
8
8
|
* 因此把"哪些文档必须包含哪些顶层字段"登记在随包 `module-map.json` 的 `documents`,由 CLI
|
|
9
9
|
* 在发出保存请求前本地核对。字段清单只从该文件读取一次;读取失败时放行并给出警告,避免
|
|
@@ -45,5 +45,6 @@ export declare function validateCanvasDocumentContent(input: {
|
|
|
45
45
|
schemaKey: string;
|
|
46
46
|
content: unknown;
|
|
47
47
|
allowPartial?: boolean;
|
|
48
|
+
inputCount?: number;
|
|
48
49
|
}): Promise<DocumentContentValidation>;
|
|
49
50
|
export {};
|
|
@@ -65,6 +65,19 @@ export function expectedSchemaKey(documentKey) {
|
|
|
65
65
|
return `canvas.${segment}.v1`;
|
|
66
66
|
}
|
|
67
67
|
export async function validateCanvasDocumentContent(input) {
|
|
68
|
+
// 审核的来源是 --input 快照,正文里的 source 字段不能替代它,草稿开关也不能绕过审核门禁。
|
|
69
|
+
if (input.schemaKey === 'canvas.review.v1') {
|
|
70
|
+
if (input.inputCount !== 1)
|
|
71
|
+
throw new Error('审核文档必须且只能指定一个 --input 上游节点;正文 source 字段不能代替 --input。');
|
|
72
|
+
const content = isPlainObject(input.content) ? input.content : {};
|
|
73
|
+
const issues = content.issues;
|
|
74
|
+
if (!['approved', 'rejected'].includes(String(content.decision)) || !Array.isArray(issues) || issues.length > 100
|
|
75
|
+
|| issues.some((issue) => !isPlainObject(issue) || !['P0', 'P1', 'P2'].includes(String(issue.severity))
|
|
76
|
+
|| typeof issue.description !== 'string' || !issue.description.trim())
|
|
77
|
+
|| (content.decision === 'approved' && issues.some((issue) => issue.severity === 'P0' || issue.severity === 'P1'))) {
|
|
78
|
+
throw new Error('审核正文必须包含 decision(approved/rejected)和 issues 数组;每项含 severity(P0/P1/P2)及非空 description,P0/P1 未清零不得 approved。');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
68
81
|
const warnings = [];
|
|
69
82
|
const map = await contracts();
|
|
70
83
|
if (!map) {
|
|
@@ -100,6 +100,7 @@ export class VvicatApi {
|
|
|
100
100
|
return this.client.request(`/api/projects/${projectId}`, { method: 'DELETE' });
|
|
101
101
|
}
|
|
102
102
|
async canvas(projectId) {
|
|
103
|
+
// CLI 按需查询资产,保留精简画布接口;网页的 view=bootstrap 会额外读取设置和引用资产。
|
|
103
104
|
const payload = await this.client.request(`/api/projects/${projectId}/canvas`);
|
|
104
105
|
return payload.data.canvas;
|
|
105
106
|
}
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
ai-short-studio canvas node diagnose "$NODE_ID" --project "$PROJECT_ID" --json
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
返回节点配置、实时输入端口、上游当前版本及正文、最近任务状态和 `recoveryActions
|
|
25
|
+
返回节点配置、实时输入端口、上游当前版本及正文、最近任务状态和 `recoveryActions`。专业拆镜还返回 `planningDraft`(草稿版本、状态、阻塞诊断及读取地址);`selectedVersion:null` 不代表没有草稿。自动规划在有界纠错后失败时,先读草稿并局部修正,再 dry-run、保存、复核与显式 promote;不要只改泛化提示词后再次整轮运行。草稿不存在时可按下文直接创建,不要求为取得草稿先执行模型任务。它是只读检查,不是执行成功或创作质量证明。按实时节点 schema 修正配置,按精确 edge ID 修正接线;字段修改使用 `canvas node update --set` 或 `--config`,批量修改使用 `update-many` 的 `set/unset`,不要传被忽略的 `config` 包装。配置被拒绝(服务端或调用方提示未知字段,例如把节点标题 `title` 写进 `config`)时,删除该字段并按实时 `configSchema.properties` 修正后重试;节点标题用 `canvas node update --title`,换名猜字段或重复提交同一无效字段都不算修复。
|
|
26
26
|
|
|
27
27
|
| 问题所在位置 | 恢复方法 |
|
|
28
28
|
| --- | --- |
|
|
@@ -129,3 +129,13 @@ handle 来自实时节点目录。只删除精确 edge ID;`--apply-ready` 只
|
|
|
129
129
|
## 节点选版与资产全局选版
|
|
130
130
|
|
|
131
131
|
`canvas asset select-version`(或 `asset select`)修改资产全局选版,不覆盖任何节点的 `selectedOutputVersionId`。网页“查看版本”和内置 `canvas_select_version` 只切换目标节点、保留兄弟节点与全局选版,并使下游过期;运行中节点不可切版。读取节点内容和编辑基线时优先使用节点固定版本。CLI 没有把全局选版命令自动转换为节点切版;需要更改固定版本时使用网页节点入口,不能用普通 config patch 写服务端选版字段。
|
|
132
|
+
|
|
133
|
+
### 审核文档与阶段缺失诊断
|
|
134
|
+
|
|
135
|
+
剧本审核使用 `--document-key script.review --schema-key canvas.review.v1`,必须且只能指定一个 `--input <被审核节点ID>`。正文为 `{"decision":"approved","issues":[]}` 或真实问题清单(每项含 `severity: P0|P1|P2` 与 `description`);不能靠正文里的 `source` 替代来源快照,有 P0/P1 时不能批准。审核结论必须来自实际检查,不能为解锁阶段伪造通过。
|
|
136
|
+
|
|
137
|
+
`canvas workflow status` 每个检查项的 `documentKeys` 列出可接受的稳定键。`missing` 时先读 `canvas documents`,按这些键修复已有文档;同一问题不通过循环试探键、重复创建空节点或反复执行生成节点处理。文档已就绪但同键阶段仍缺失时,记录 `moduleId/documentKey/nodeId/versionId` 并报告合同不一致,保留现有产物,不绕过阶段门禁。
|
|
138
|
+
|
|
139
|
+
阶段检查会同时核对随包 `module-map.json` 已登记文档的必需字段和非空字段。`incomplete-content` 表示当前版本只是草稿,读取正文后补齐并追加版本;下游引用此草稿也会失效。`duplicate-key` 表示同模块出现多份裸键、分集键或历史别名产物,先核对现有节点并保留明确的唯一依据,不通过继续创建测试节点修复。人物档案兼容历史 `generate-character-profiles` 键,新文档统一用 `character-profiles`;声音设计阶段识别 `audio-plan`。
|
|
140
|
+
|
|
141
|
+
网页初始化使用 `GET /api/projects/:projectId/canvas?view=bootstrap` 聚合快照;CLI 保持精简画布 GET,并通过现有 inspect/documents/asset 命令按需读取。助手重连保留会话和累计预算,不会重放制作指令;工具或活跃时间预算耗尽时应拆分任务,不能靠反复重连恢复额度。
|
|
@@ -5,3 +5,5 @@
|
|
|
5
5
|
先合并别名、第一人称映射和关系,禁止把仅被提及或不出镜的对象建成人物。`performance_bible`、`voice_identity` 只记录原文明示或跨场景重复的长期特征;一次性动作、情绪和特效不得固化。每个角色至少保留初始形象,只有换装、年龄或持续造型变化才新增版本。
|
|
6
6
|
|
|
7
7
|
输出必须符合 [人物档案 Schema](generate-character-profiles/character-profile-output.schema.json),且顶层只能有 `new_characters[]` 与 `updated_characters[]`。先生成人物档案文档;向用户展示新增、合并与冲突结果并确认后,才保存为项目文档版本。人物事实确认后交给 `generate-character-images`;用户未确认前不得生成图片。
|
|
8
|
+
|
|
9
|
+
保存合同固定为 `--document-key character-profiles --schema-key canvas.character-profiles.v1`,可以使用分集前缀(如 `ep-001.character-profiles`)。正文必须同时有 `new_characters` 与 `updated_characters` 数组;来源通过 `--input` 绑定已确认剧本。保存后回读文档与 `workflow` 的 `generate-character-profiles` 检查项,不通过猜文档键、建立测试节点或额外执行 character-design 来修复阶段识别。
|
|
@@ -529,6 +529,15 @@
|
|
|
529
529
|
"non_empty_fields": [
|
|
530
530
|
"shots"
|
|
531
531
|
]
|
|
532
|
+
},
|
|
533
|
+
"character-profiles": {
|
|
534
|
+
"module": "generate-character-profiles",
|
|
535
|
+
"template_stem": "agent_character_profile",
|
|
536
|
+
"stage": "asset-analysis",
|
|
537
|
+
"required_fields": [
|
|
538
|
+
"new_characters",
|
|
539
|
+
"updated_characters"
|
|
540
|
+
]
|
|
532
541
|
}
|
|
533
542
|
},
|
|
534
543
|
"provider_prompts": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
## 文档键与内容合同
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
阶段状态按 `document-key` 匹配文档,并核对登记合同的必需字段、非空字段及来源快照:不按节点标题、`schema-key` 或创建顺序判断,键写错时该阶段会一直显示 `missing`。以下键与必需顶层字段以 `module-map.json` 的 `documents` 为唯一机器事实;`canvas document save` 在发出请求前按同一合同核对正文,缺字段或非空字段为空时直接失败并指出要读的模板路径。
|
|
29
29
|
|
|
30
30
|
| 文档键 | 模块 | 说明 |
|
|
31
31
|
| --- | --- | --- |
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
| `outline` | `outline-drama-series` | 分集大纲,`episodes` 不得为空 |
|
|
35
35
|
| `script` | `write-drama-episode` | 单集剧本,保存时使用 `ep-001.script` 这类带分集前缀的键,`scenes` 不得为空 |
|
|
36
36
|
| `director-book` | `write-drama-director-book` | 导演本,逐场摄影与表演决定 |
|
|
37
|
+
| `character-profiles` | `generate-character-profiles` | 人物档案,`new_characters` 与 `updated_characters` 数组,不能通过额外生图代替 |
|
|
37
38
|
| `asset-plan` | `plan-drama-assets` | 资产计划,人物、场景、道具与未决问题 |
|
|
38
39
|
| `production-plan` | `plan-drama-production` | 逐镜制作计划,`shots` 不得为空 |
|
|
39
40
|
| `continuity-plan` | `plan-shot-continuity` | 跨镜连续性计划,`shots` 不得为空 |
|