@xiaohhhh1/canvas-agent 0.4.58 → 0.4.59

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.
@@ -2,9 +2,9 @@
2
2
  export declare const FLOW_C_SCRIPT_CHUNK_MAX = 30;
3
3
  export declare const FLOW_C_SCRIPT_CHUNK_SIZES: readonly [10, 5, 1];
4
4
  /**
5
- * 长视频每条都包含总脚本和 2/3 套完整分镜,不能沿用短脚本的 30 条输出量。
6
- * 小段回传既能更早显示进度,也避免单个 Codex turn 因输出过大而被中断。
5
+ * 20 秒在移除中心可确定性补齐的重复视觉/质量字段后,先安全尝试每回合 2 条;
6
+ * 任何结构或截断失败会降级到 1 条。30 秒输出仍更大,继续保持单条。
7
7
  */
8
- export declare function flowCScriptChunkSizes(durationSeconds: 10 | 20 | 30): readonly [10, 5, 1] | readonly [1];
9
- /** 将当前缺失 ordinal 切成可独立持久化的子批;长视频绝不恢复 30 条大回合。 */
8
+ export declare function flowCScriptChunkSizes(durationSeconds: 10 | 20 | 30): readonly [10, 5, 1] | readonly [2, 1] | readonly [1];
9
+ /** 将当前缺失 ordinal 切成受控子批;长视频绝不恢复 30 条大回合。 */
10
10
  export declare function flowCScriptChunks(durationSeconds: 10 | 20 | 30, ordinals: number[], size?: number): number[][];
@@ -2,17 +2,17 @@
2
2
  export const FLOW_C_SCRIPT_CHUNK_MAX = 30;
3
3
  export const FLOW_C_SCRIPT_CHUNK_SIZES = [10, 5, 1];
4
4
  /**
5
- * 长视频每条都包含总脚本和 2/3 套完整分镜,不能沿用短脚本的 30 条输出量。
6
- * 小段回传既能更早显示进度,也避免单个 Codex turn 因输出过大而被中断。
5
+ * 20 秒在移除中心可确定性补齐的重复视觉/质量字段后,先安全尝试每回合 2 条;
6
+ * 任何结构或截断失败会降级到 1 条。30 秒输出仍更大,继续保持单条。
7
7
  */
8
8
  export function flowCScriptChunkSizes(durationSeconds) {
9
9
  if (durationSeconds === 20)
10
- return [1];
10
+ return [2, 1];
11
11
  if (durationSeconds === 30)
12
12
  return [1];
13
13
  return FLOW_C_SCRIPT_CHUNK_SIZES;
14
14
  }
15
- /** 将当前缺失 ordinal 切成可独立持久化的子批;长视频绝不恢复 30 条大回合。 */
15
+ /** 将当前缺失 ordinal 切成受控子批;长视频绝不恢复 30 条大回合。 */
16
16
  export function flowCScriptChunks(durationSeconds, ordinals, size = flowCScriptChunkSizes(durationSeconds)[0]) {
17
17
  const chunks = [];
18
18
  for (let index = 0; index < ordinals.length; index += size)
@@ -649,7 +649,7 @@ ${durationRules}
649
649
  3. 每段永远是独立 0–10 秒,含 1–8 个按剧情需要决定的 shots、准确 voiceover、onScreenText、evidence、soundBgm、emotionalNote 与 endingState;模型不要输出 continuity 或 continuityMode。
650
650
  4. shot.visual 要直接写出主体位置、景别、光线、材质、动作峰值和当地自然环境,并保留真实皮肤、细发、布料/商品微纹理和实景混合光;禁止塑料蜡感、静态举产品、品牌广告片、电视购物或伪造工厂/销量/来源。
651
651
  5. 20/30 秒的后一段剧情承接前段 endingState,但每段仍只使用自己的局部 0–10 秒执行内容。
652
- 6. creativePlan 只补充脚本执行字段;Agent 会把选中卡的结构化裂变、文化、安全和 fingerprint 字段确定性并回,模型不要重复这些字段。
652
+ 6. creativePlan 只写 format、visualHook、conflict、escalation/turn、productIntervention、visibleProof、callbackMotivation 与 differentiationKey。Agent 会把选中卡的构图、材质、光线、文化、真实性边界和 fingerprint 确定性并回,中心会程序化计算质量门;模型不要重复这些字段。
653
653
  固定使用 GPT-5.6 Terra 高推理。storyboardLayoutVersion=${layoutVersion} 仅由中心管理。只返回当前结构化 jobs,不调用工具、不创建任何图片或视频任务。`;
654
654
  }
655
655
  export function creativeCandidatePrompt(id, task, ordinals) {
@@ -26,37 +26,16 @@ function creativePlanSchema() {
26
26
  const properties = {
27
27
  format: text,
28
28
  visualHook: text,
29
- firstFrameFocus: text,
30
- visualContrast: text,
31
- sensoryTexture: text,
32
- motionPeak: text,
33
- compositionLighting: text,
34
- localNativeDetail: text,
35
- antiFlatness: text,
36
29
  conflict: text,
37
30
  escalation: nullableText,
38
31
  turn: nullableText,
39
32
  productIntervention: text,
40
33
  visibleProof: text,
41
34
  callbackMotivation: text,
42
- truthBoundary: text,
43
35
  differentiationKey: text,
44
- styleCardSummary: nullableText,
45
36
  };
46
37
  return object(properties);
47
38
  }
48
- function qualityGateSchema() {
49
- return object({
50
- hook: text,
51
- conflict: text,
52
- escalationOrTurn: text,
53
- productIntervention: text,
54
- visibleProof: text,
55
- callbackMotivation: text,
56
- truthBoundary: text,
57
- batchDifferentiation: text,
58
- });
59
- }
60
39
  function segmentSchema() {
61
40
  return object({
62
41
  voiceCue: text,
@@ -86,7 +65,6 @@ export function flowCScriptOutputSchema(durationSeconds, count) {
86
65
  sellingFormId: text,
87
66
  creativePlan: creativePlanSchema(),
88
67
  voiceProfile: voiceProfileSchema(),
89
- qualityGate: qualityGateSchema(),
90
68
  openingState: openingStateSchema(),
91
69
  };
92
70
  if (durationSeconds === 10)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaohhhh1/canvas-agent",
3
- "version": "0.4.58",
3
+ "version": "0.4.59",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",