@xiaohhhh1/canvas-agent 0.4.70 → 0.4.72
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.
|
@@ -54,7 +54,8 @@ type ReferenceStyleCard = {
|
|
|
54
54
|
categories?: unknown;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
type StoryboardLayoutVersion = "director-table-scripted-v1" | "hybrid-three-anchor-v1" | "legacy-five-row-v1";
|
|
57
|
+
type StoryboardLayoutVersion = "director-table-scripted-v1" | "visual-storyboard-adaptive-v1" | "hybrid-three-anchor-v1" | "legacy-five-row-v1";
|
|
58
|
+
type FlowCProductionMode = "storyboard" | "visual-storyboard" | "first-frame-chain";
|
|
58
59
|
type ProductInput = {
|
|
59
60
|
productIndex: number;
|
|
60
61
|
title: string;
|
|
@@ -122,6 +123,8 @@ type ScriptTask = {
|
|
|
122
123
|
script_output_contract_version?: string;
|
|
123
124
|
storyboard_layout_version?: StoryboardLayoutVersion;
|
|
124
125
|
storyboardLayoutVersion?: StoryboardLayoutVersion;
|
|
126
|
+
production_mode?: FlowCProductionMode;
|
|
127
|
+
productionMode?: FlowCProductionMode;
|
|
125
128
|
reference_style_card?: ReferenceStyleCard;
|
|
126
129
|
referenceStyleCard?: ReferenceStyleCard;
|
|
127
130
|
product_inputs?: ProductInput[];
|
package/dist/workflow/manager.js
CHANGED
|
@@ -938,7 +938,6 @@ async function productImageAttachment(url, productIndex, imageIndex) {
|
|
|
938
938
|
}
|
|
939
939
|
export function scriptChunkPrompt(id, task, ordinals, rewriteAttempt = 0) {
|
|
940
940
|
const duration = Number(task.duration_seconds || 10);
|
|
941
|
-
const layoutVersion = task.storyboard_layout_version || task.storyboardLayoutVersion || "director-table-scripted-v1";
|
|
942
941
|
const products = relevantProductInputs(task, ordinals);
|
|
943
942
|
const productFacts = scriptPromptProductFacts(products, task.product_execution_profiles || []);
|
|
944
943
|
const selected = selectedCandidatesForOrdinals(task, ordinals);
|
|
@@ -959,15 +958,15 @@ ${compactJson(selectedBlueprintPromptPayload([...selected.values()], duration),
|
|
|
959
958
|
${rewriteInstruction}
|
|
960
959
|
${durationRules}
|
|
961
960
|
写作要求:
|
|
962
|
-
1. visualHook、conflict、escalation/turn、productIntervention、visibleProof、purchaseReason、callbackMotivation 与所有 shots 必须执行选中卡的 visualPremise、firstFrame、spectacleEscalation、productProofAction、purchaseReason、truthBoundary 以及七项视觉执行字段;保留所选蓝图的因果时间线、节拍比例、镜头/剪辑节奏、动作压力、证明方式和购买逻辑,只替换当前商品、人物、场景与当地口播槽位,不得稀释构图或换成普通模板。爆款来源的旧商品身份/动作必须替换;形式卡只提供抽象创意结构,绝不能反向改变现有首帧、分段、Omni或参考图制作方式。若 productAdaptation.templateMatch.actionCompatibility 的 openingAction、proofAction 或 spectacleAction 为 false,对应 productAdaptation 的 firstFrame、productProofAction 或 spectacleEscalation
|
|
961
|
+
1. visualHook、conflict、escalation/turn、productIntervention、visibleProof、purchaseReason、callbackMotivation 与所有 shots 必须执行选中卡的 visualPremise、firstFrame、spectacleEscalation、productProofAction、purchaseReason、truthBoundary 以及七项视觉执行字段;保留所选蓝图的因果时间线、节拍比例、镜头/剪辑节奏、动作压力、证明方式和购买逻辑,只替换当前商品、人物、场景与当地口播槽位,不得稀释构图或换成普通模板。爆款来源的旧商品身份/动作必须替换;形式卡只提供抽象创意结构,绝不能反向改变现有首帧、分段、Omni或参考图制作方式。若 productAdaptation.templateMatch.actionCompatibility 的 openingAction、proofAction 或 spectacleAction 为 false,对应 productAdaptation 的 firstFrame、productProofAction 或 spectacleEscalation 对商品动作内容具有绝对优先级,必须删除其旧商品动作,不得折中混用。productProofAction 必须同时写清一个真实动作及其镜头内可见结果;purchaseReason 只解释该结果为何值得目标用户购买,不能变成泛泛 CTA。
|
|
963
962
|
2. 严格执行 executionBlueprints 中的 sourceDurationSeconds → targetDurationSeconds 和 retimingMode:expand 只增加有用的证明停留、使用语境与购买理由,compress 只压缩重复、冗余铺垫和转场,same 保持原节拍比例;三种模式都必须保留 Hook、证明和购买因果,禁止整体拉伸、截断或机械加速。
|
|
964
|
-
3. 每条生成一份稳定 voiceProfile;每段只写简短 voiceCue
|
|
963
|
+
3. 每条生成一份稳定 voiceProfile;每段只写简短 voiceCue。口播必须使用${targetVoiceLanguage},并执行 creatorVoiceStyle/ctaStyle;未提供 creatorVoiceStyle 时使用当地 TikTok 带货创作者真实会说的口吻。不是逐字翻译,整条内容按 Hook → Body/visible proof → Close 组织,短句口语化且与当前镜头可见动作同步,结尾只给一个简短自然 CTA。只使用少量可信的 localSceneProfile/audienceContext 日常细节;presenterContext 没填写时使用普通创作者,不得把国家代码、语言或地区自动等同于人物族群。商品事实没有提供时不得编造价格、折扣、销量、库存或稀缺性。商品标题只用于理解商品类型与事实,所有输出不得主动写出或念出品牌名、品牌广告语、包装文案,也不得要求模型把品牌字样变得更清晰;商品外观与已有标识的位置、比例、颜色和版式只服从第1张产品参考图。TikTok/TikTok Shop 只用于定义这条写作规则,不得把平台名写入 voiceover、onScreenText、visual、soundBgm、emotionalNote、openingState、endingState 或任何会进入故事板/视频的导演字段。导演说明统一用简洁制作英文;这里只做写作指令,不做语言检测字段。
|
|
965
964
|
4. 每段永远是独立 0–10 秒,含 1–8 个按剧情需要决定的 shots、准确 voiceover、onScreenText、evidence、soundBgm、emotionalNote 与 endingState;模型不要输出 continuity 或 continuityMode。
|
|
966
965
|
5. shot.visual 要直接写出主体位置、景别、光线、材质、动作峰值和当地自然环境,并保留真实皮肤、细发、布料/商品微纹理和实景混合光;禁止塑料蜡感、静态举产品、品牌广告片、电视购物或伪造工厂/销量/来源。
|
|
967
966
|
6. 20/30 秒的后一段剧情承接前段 endingState,但每段仍只使用自己的局部 0–10 秒执行内容。
|
|
968
967
|
7. 不要输出 creativePlan、executionBindings 或 masterScript;这些字段由 Agent 从选中蓝图确定性回填/合成,避免重复 token 和脆弱的文字绑定校验。若 selectionMode=user-framework,用户原框架的开头、事件顺序、核心剧情和结尾仍是最高权威。
|
|
969
|
-
8. 商品身份以按顺序提供的原商品图为最高权威:第1张是主SKU身份图,当前商品标题和大概类目只补充商品用途与事实,后续图片只是同一SKU
|
|
970
|
-
固定使用 GPT-5.6 Terra
|
|
968
|
+
8. 商品身份以按顺序提供的原商品图为最高权威:第1张是主SKU身份图,当前商品标题和大概类目只补充商品用途与事实,后续图片只是同一SKU补充视角。任何爆款源商品、首帧、故事板或上一段尾帧都不得改变商品颜色、款式、结构、比例、材质、包装、标识位置、部件、配件和实际套装数量;修正身份时不得降低动作、运镜、节奏、景深、真实感或画质。商品本体或包装表面的印花、图案、微纹理、已印文字/字符、图标、色块、行距、相对位置和朝向全部视为不可编辑的原图纹理;不得在 shot.visual、onScreenText、voiceover、evidence、openingState、endingState 或任何导演字段中要求重写、翻译、替换、删改、重排、镜像这些表面内容,也不得要求生成“另一段清晰可读文案”。新增屏幕字只能是与商品像素分离的场景叠加字幕,绝不能印到商品或包装上。旋转、翻转、弯折或开合商品时,完整表面纹理必须随实体整体运动,不能漂移、翻面后复写或重新生成。若 executionBlueprint 或 productAdaptation 与本规则冲突,只保留其钩子、动作因果和镜头节奏,改写构图、机位或表演,绝不改商品表面。
|
|
969
|
+
固定使用 GPT-5.6 Terra 中等推理。媒体制作方式与分镜布局由中心在脚本完成后管理,不得影响这里的创意、镜头、口播或结构化脚本。只返回当前结构化 jobs,不调用工具、不创建任何图片或视频任务。`;
|
|
971
970
|
}
|
|
972
971
|
export function creativeCandidatePrompt(id, task, ordinals) {
|
|
973
972
|
const products = relevantProductInputs(task, ordinals);
|
|
@@ -77,7 +77,7 @@ function boundedList(maxItems, maxLength) {
|
|
|
77
77
|
return { type: "array", minItems: 0, maxItems, items: boundedText(maxLength) };
|
|
78
78
|
}
|
|
79
79
|
function boundedEnumList(values, maxItems) {
|
|
80
|
-
return { type: "array", minItems: 0, maxItems,
|
|
80
|
+
return { type: "array", minItems: 0, maxItems, items: { type: "string", enum: [...values] } };
|
|
81
81
|
}
|
|
82
82
|
function productProfileSchema(contractVersion) {
|
|
83
83
|
const legacy = {
|
|
@@ -69,6 +69,8 @@ export function assertStrictResponseSchema(schemaValue, path = "$") {
|
|
|
69
69
|
const schema = recordOf(schemaValue);
|
|
70
70
|
if (!schema)
|
|
71
71
|
throw new Error(`Strict response schema at ${path} must be an object`);
|
|
72
|
+
if ("uniqueItems" in schema)
|
|
73
|
+
throw new Error(`Strict response schema at ${path} must not use unsupported uniqueItems`);
|
|
72
74
|
if (schema.type === "object") {
|
|
73
75
|
const properties = recordOf(schema.properties);
|
|
74
76
|
if (!properties)
|