@remixmate/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +166 -0
- package/dist/argv.d.ts +15 -0
- package/dist/argv.js +51 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.js +83 -0
- package/dist/handlers/gen-image.d.ts +13 -0
- package/dist/handlers/gen-image.js +161 -0
- package/dist/handlers/gen-voice.d.ts +16 -0
- package/dist/handlers/gen-voice.js +110 -0
- package/dist/handlers/index.d.ts +13 -0
- package/dist/handlers/index.js +14 -0
- package/dist/handlers/template-bind.d.ts +15 -0
- package/dist/handlers/template-bind.js +149 -0
- package/dist/http.d.ts +52 -0
- package/dist/http.js +110 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +8 -0
- package/dist/manifest.json +260 -0
- package/dist/progress.d.ts +23 -0
- package/dist/progress.js +15 -0
- package/dist/registry.d.ts +33 -0
- package/dist/registry.js +72 -0
- package/dist/runner.d.ts +17 -0
- package/dist/runner.js +63 -0
- package/package.json +54 -0
- package/skills/export-jianying/SKILL.md +251 -0
- package/skills/export-jianying/scripts/gen_jianying_draft.py +1099 -0
- package/skills/export-jianying/skill.json +24 -0
- package/skills/export-jianying/version.json +7 -0
- package/skills/gen-digital-human/SKILL.md +211 -0
- package/skills/gen-digital-human/scripts/gen_digital_human_video.py +574 -0
- package/skills/gen-digital-human/skill.json +23 -0
- package/skills/gen-digital-human/version.json +7 -0
- package/skills/gen-image/SKILL.md +130 -0
- package/skills/gen-image/skill.json +22 -0
- package/skills/gen-image/version.json +7 -0
- package/skills/gen-script/SKILL.md +283 -0
- package/skills/gen-script/scripts/gen_script.py +1208 -0
- package/skills/gen-script/skill.json +41 -0
- package/skills/gen-script/version.json +7 -0
- package/skills/gen-video/SKILL.md +170 -0
- package/skills/gen-video/scripts/gen_video.py +591 -0
- package/skills/gen-video/skill.json +24 -0
- package/skills/gen-video/version.json +7 -0
- package/skills/gen-voice/SKILL.md +104 -0
- package/skills/gen-voice/skill.json +21 -0
- package/skills/gen-voice/version.json +7 -0
- package/skills/prepare-video-assets/SKILL.md +192 -0
- package/skills/prepare-video-assets/scripts/prepare_video_assets.py +57 -0
- package/skills/prepare-video-assets/skill.json +23 -0
- package/skills/prepare-video-assets/version.json +7 -0
- package/skills/render-video/SKILL.md +187 -0
- package/skills/render-video/scripts/_chrome_vendor.py +305 -0
- package/skills/render-video/scripts/_video_probe.py +174 -0
- package/skills/render-video/scripts/_vod_polling.py +86 -0
- package/skills/render-video/scripts/remote_renderer_client.py +236 -0
- package/skills/render-video/scripts/render_video.py +2288 -0
- package/skills/render-video/scripts/upload_video.py +193 -0
- package/skills/render-video/skill.json +21 -0
- package/skills/render-video/version.json +7 -0
- package/skills/template-bind/README.md +63 -0
- package/skills/template-bind/SKILL.md +234 -0
- package/skills/template-bind/scripts/check_contracts.py +196 -0
- package/skills/template-bind/scripts/match_template.py +215 -0
- package/skills/template-bind/scripts/registry_loader.py +379 -0
- package/skills/template-bind/scripts/render_job_client.py +162 -0
- package/skills/template-bind/scripts/sync_registry.py +44 -0
- package/skills/template-bind/scripts/template_paths.py +72 -0
- package/skills/template-bind/skill.json +20 -0
- package/skills/template-bind/version.json +7 -0
- package/skills/template-bind/video_dsl/README.md +97 -0
- package/skills/template-bind/video_dsl/runtime/__init__.py +11 -0
- package/skills/template-bind/video_dsl/runtime/dsl_validator.py +495 -0
- package/skills/template-bind/video_dsl/runtime/prompt_enhancer.py +274 -0
- package/skills/template-bind/video_dsl/runtime/template_binder.py +87 -0
- package/skills/template-bind/video_dsl/runtime/timeline_compiler.py +312 -0
- package/skills/template-bind/video_dsl/schema/render-plan-v1alpha1.json +193 -0
- package/skills/template-bind/video_dsl/schema/template-binding-v1alpha1.json +122 -0
- package/skills/template-bind/video_dsl/schema/template-definition-v1alpha1.json +247 -0
- package/skills/template-bind/video_dsl/schema/video-dsl-v1alpha1.json +378 -0
- package/skills/video-parser/SKILL.md +238 -0
- package/skills/video-parser/scripts/analyze_video.py +1038 -0
- package/skills/video-parser/scripts/deconstruct_video.py +602 -0
- package/skills/video-parser/scripts/parse_via_render.py +148 -0
- package/skills/video-parser/skill.json +21 -0
- package/skills/video-parser/version.json +7 -0
- package/skills/web-capture/SKILL.md +183 -0
- package/skills/web-capture/scripts/web_capture.py +461 -0
- package/skills/web-capture/skill.json +29 -0
- package/skills/web-capture/version.json +7 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "video.dsl/render-plan/v1alpha1",
|
|
4
|
+
"title": "Render Plan v1alpha1",
|
|
5
|
+
"description": "DSL 与 Remotion 实现之间的防腐层中间态,包含完整时间线、已解析资产和渲染参数。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "dslVersion", "timeline", "renderConfig"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "v1alpha1"
|
|
12
|
+
},
|
|
13
|
+
"dslVersion": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"createdAt": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "date-time"
|
|
19
|
+
},
|
|
20
|
+
"status": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["planning", "resolving-assets", "assets-ready", "compiling", "rendering", "completed", "failed"],
|
|
23
|
+
"default": "planning"
|
|
24
|
+
},
|
|
25
|
+
"resolvedAssets": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "$ref": "#/definitions/ResolvedAsset" },
|
|
28
|
+
"description": "所有已解析/已生成的素材"
|
|
29
|
+
},
|
|
30
|
+
"timeline": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": { "$ref": "#/definitions/TimelineEntry" },
|
|
33
|
+
"description": "展开后的时间线条目"
|
|
34
|
+
},
|
|
35
|
+
"renderConfig": {
|
|
36
|
+
"$ref": "#/definitions/RenderConfig"
|
|
37
|
+
},
|
|
38
|
+
"remotionProps": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "编译后直接传给 Remotion 的顶层 props",
|
|
41
|
+
"additionalProperties": true
|
|
42
|
+
},
|
|
43
|
+
"errors": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"phase": { "type": "string" },
|
|
49
|
+
"message": { "type": "string" },
|
|
50
|
+
"sceneId": { "type": "string" },
|
|
51
|
+
"assetId": { "type": "string" },
|
|
52
|
+
"timestamp": { "type": "string", "format": "date-time" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"logs": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"phase": { "type": "string" },
|
|
62
|
+
"message": { "type": "string" },
|
|
63
|
+
"timestamp": { "type": "string", "format": "date-time" }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"definitions": {
|
|
69
|
+
"ResolvedAsset": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["assetId", "type", "status"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"assetId": { "type": "string" },
|
|
74
|
+
"type": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["image", "video", "audio", "avatar", "subtitle", "bgm"]
|
|
77
|
+
},
|
|
78
|
+
"source": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["existing", "gen-image", "gen-video", "gen-voice", "gen-digital-human"]
|
|
81
|
+
},
|
|
82
|
+
"status": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": ["pending", "generating", "generated", "failed", "skipped"]
|
|
85
|
+
},
|
|
86
|
+
"url": { "type": "string" },
|
|
87
|
+
"localPath": { "type": "string" },
|
|
88
|
+
"duration": { "type": "number" },
|
|
89
|
+
"width": { "type": "integer" },
|
|
90
|
+
"height": { "type": "integer" },
|
|
91
|
+
"mimeType": { "type": "string" },
|
|
92
|
+
"fileSize": { "type": "integer" },
|
|
93
|
+
"generatedBy": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"skill": { "type": "string" },
|
|
97
|
+
"model": { "type": "string" },
|
|
98
|
+
"params": { "type": "object", "additionalProperties": true },
|
|
99
|
+
"startedAt": { "type": "string", "format": "date-time" },
|
|
100
|
+
"completedAt": { "type": "string", "format": "date-time" }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"retryCount": { "type": "integer", "default": 0 },
|
|
104
|
+
"maxRetries": { "type": "integer", "default": 3 }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"TimelineEntry": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["sceneId", "startFrame", "endFrame", "durationFrames"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"sceneId": { "type": "string" },
|
|
112
|
+
"startFrame": { "type": "integer" },
|
|
113
|
+
"endFrame": { "type": "integer" },
|
|
114
|
+
"durationFrames": { "type": "integer" },
|
|
115
|
+
"startTime": { "type": "number", "description": "开始时间(秒)" },
|
|
116
|
+
"endTime": { "type": "number", "description": "结束时间(秒)" },
|
|
117
|
+
"compositionId": { "type": "string" },
|
|
118
|
+
"props": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": true,
|
|
121
|
+
"description": "该场景对应的 Remotion props"
|
|
122
|
+
},
|
|
123
|
+
"layers": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"items": { "$ref": "#/definitions/Layer" }
|
|
126
|
+
},
|
|
127
|
+
"subtitleSegments": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"text": { "type": "string" },
|
|
133
|
+
"startFrame": { "type": "integer" },
|
|
134
|
+
"endFrame": { "type": "integer" }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"transition": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"type": { "type": "string" },
|
|
142
|
+
"durationFrames": { "type": "integer" }
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"Layer": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"required": ["layerId", "type"],
|
|
150
|
+
"properties": {
|
|
151
|
+
"layerId": { "type": "string" },
|
|
152
|
+
"type": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"enum": ["visual", "audio", "text", "overlay"]
|
|
155
|
+
},
|
|
156
|
+
"assetId": { "type": "string" },
|
|
157
|
+
"zIndex": { "type": "integer" },
|
|
158
|
+
"startFrame": { "type": "integer" },
|
|
159
|
+
"endFrame": { "type": "integer" },
|
|
160
|
+
"position": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"properties": {
|
|
163
|
+
"x": { "type": "number" },
|
|
164
|
+
"y": { "type": "number" }
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"size": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"width": { "type": "number" },
|
|
171
|
+
"height": { "type": "number" }
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"opacity": { "type": "number", "default": 1 },
|
|
175
|
+
"animation": { "type": "object", "additionalProperties": true }
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"RenderConfig": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"required": ["width", "height", "fps", "totalFrames"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"width": { "type": "integer" },
|
|
183
|
+
"height": { "type": "integer" },
|
|
184
|
+
"fps": { "type": "integer" },
|
|
185
|
+
"totalFrames": { "type": "integer" },
|
|
186
|
+
"totalDuration": { "type": "number", "description": "总时长(秒)" },
|
|
187
|
+
"codec": { "type": "string", "default": "h264" },
|
|
188
|
+
"crf": { "type": "integer", "default": 18 },
|
|
189
|
+
"outputFormat": { "type": "string", "enum": ["mp4", "webm"], "default": "mp4" }
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "video.dsl/template-binding/v1alpha1",
|
|
4
|
+
"title": "Template Binding v1alpha1",
|
|
5
|
+
"description": "将 Video DSL 中的 scene 绑定到模板的具体 slot,产出可供渲染的绑定结果。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "dslVersion", "templateId", "bindings"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "v1alpha1"
|
|
12
|
+
},
|
|
13
|
+
"dslVersion": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "对应的 Video DSL 版本"
|
|
16
|
+
},
|
|
17
|
+
"templateId": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "选中的模板 ID"
|
|
20
|
+
},
|
|
21
|
+
"templateName": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"matchScore": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"minimum": 0,
|
|
27
|
+
"maximum": 1,
|
|
28
|
+
"description": "模板匹配得分 0-1"
|
|
29
|
+
},
|
|
30
|
+
"matchReason": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "匹配理由说明"
|
|
33
|
+
},
|
|
34
|
+
"alternatives": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"templateId": { "type": "string" },
|
|
40
|
+
"templateName": { "type": "string" },
|
|
41
|
+
"matchScore": { "type": "number" },
|
|
42
|
+
"matchReason": { "type": "string" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"description": "备选模板列表"
|
|
46
|
+
},
|
|
47
|
+
"globalOverrides": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"description": "模板级全局覆写",
|
|
50
|
+
"properties": {
|
|
51
|
+
"typography": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"titleFont": { "type": "string" },
|
|
55
|
+
"bodyFont": { "type": "string" },
|
|
56
|
+
"titleSize": { "type": "integer" },
|
|
57
|
+
"bodySize": { "type": "integer" },
|
|
58
|
+
"primaryColor": { "type": "string" },
|
|
59
|
+
"secondaryColor": { "type": "string" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"motionPreset": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"enum": ["minimal", "smooth", "energetic", "cinematic"],
|
|
65
|
+
"default": "smooth"
|
|
66
|
+
},
|
|
67
|
+
"colorScheme": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"bindings": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": { "$ref": "#/definitions/SceneBinding" },
|
|
76
|
+
"minItems": 1
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"definitions": {
|
|
80
|
+
"SceneBinding": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["sceneId", "slotId", "compositionId"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"sceneId": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "对应 DSL scene.id"
|
|
87
|
+
},
|
|
88
|
+
"slotId": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"description": "模板中的 slot 标识"
|
|
91
|
+
},
|
|
92
|
+
"compositionId": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "Remotion Composition ID"
|
|
95
|
+
},
|
|
96
|
+
"layoutVariant": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "该场景在模板中的布局变体"
|
|
99
|
+
},
|
|
100
|
+
"props": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "传给 Remotion Composition 的场景级 props",
|
|
103
|
+
"additionalProperties": true
|
|
104
|
+
},
|
|
105
|
+
"transitionIn": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"type": { "type": "string" },
|
|
109
|
+
"durationFrames": { "type": "integer" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"transitionOut": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"type": { "type": "string" },
|
|
116
|
+
"durationFrames": { "type": "integer" }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "video.dsl/template-definition/v1alpha1",
|
|
4
|
+
"title": "Template Definition v1alpha1",
|
|
5
|
+
"description": "视频模板定义规范,描述模板的匹配条件、slot 绑定规则、默认样式和扩展配置。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["templateId", "name", "version", "slotMapping", "remotionEntry"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"templateId": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
12
|
+
"description": "模板唯一标识,kebab-case"
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "模板显示名称"
|
|
17
|
+
},
|
|
18
|
+
"description": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "模板用途说明"
|
|
21
|
+
},
|
|
22
|
+
"version": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
25
|
+
"description": "语义化版本号"
|
|
26
|
+
},
|
|
27
|
+
"supportedAspectRatios": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"]
|
|
32
|
+
},
|
|
33
|
+
"minItems": 1,
|
|
34
|
+
"description": "支持的宽高比列表"
|
|
35
|
+
},
|
|
36
|
+
"supportedDurations": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"min": { "type": "number", "minimum": 0, "description": "最短时长(秒)" },
|
|
40
|
+
"max": { "type": "number", "minimum": 1, "description": "最长时长(秒)" }
|
|
41
|
+
},
|
|
42
|
+
"required": ["min", "max"]
|
|
43
|
+
},
|
|
44
|
+
"styleTags": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": { "type": "string" },
|
|
47
|
+
"description": "风格标签,用于匹配 DSL meta.style"
|
|
48
|
+
},
|
|
49
|
+
"scenePatterns": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": ["opening", "intro", "point", "example", "explanation", "transition", "highlight", "cta", "ending", "default"]
|
|
54
|
+
},
|
|
55
|
+
"description": "模板支持的场景 purpose 类型"
|
|
56
|
+
},
|
|
57
|
+
"assetRequirements": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"enum": ["image", "video", "audio", "avatar", "subtitle", "bgm"]
|
|
62
|
+
},
|
|
63
|
+
"description": "模板需要的素材类型"
|
|
64
|
+
},
|
|
65
|
+
"slotMapping": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"description": "purpose → slot 绑定规则映射,必须包含 default。值可以是完整 SlotDefinition 或 {\"$ref\": \"<purpose>\"} 别名引用另一个 purpose 的定义。",
|
|
68
|
+
"additionalProperties": {
|
|
69
|
+
"oneOf": [
|
|
70
|
+
{ "$ref": "#/definitions/SlotDefinition" },
|
|
71
|
+
{ "$ref": "#/definitions/SlotRef" }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"required": ["default"]
|
|
75
|
+
},
|
|
76
|
+
"defaultTypography": { "$ref": "#/definitions/Typography" },
|
|
77
|
+
"defaultMotionPreset": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"enum": ["minimal", "smooth", "energetic", "cinematic"],
|
|
80
|
+
"default": "smooth"
|
|
81
|
+
},
|
|
82
|
+
"defaultColorScheme": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": { "type": "string" },
|
|
85
|
+
"description": "默认配色方案 HEX 值列表"
|
|
86
|
+
},
|
|
87
|
+
"remotionEntry": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"description": "按宽高比映射 Remotion 根 Composition ID",
|
|
90
|
+
"additionalProperties": { "type": "string" }
|
|
91
|
+
},
|
|
92
|
+
"themeConfig": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"description": "模板专属主题配置,透传给 Remotion Composition",
|
|
95
|
+
"additionalProperties": true
|
|
96
|
+
},
|
|
97
|
+
"imageStyleGuide": {
|
|
98
|
+
"$ref": "#/definitions/ImageStyleGuide",
|
|
99
|
+
"description": "图片生成视觉风格指南,用于增强自动生成的 image prompt"
|
|
100
|
+
},
|
|
101
|
+
"constraints": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"description": "模板级约束条件",
|
|
104
|
+
"additionalProperties": true
|
|
105
|
+
},
|
|
106
|
+
"extensions": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"description": "模板专属扩展类型声明(如 slideBlockTypes)",
|
|
109
|
+
"additionalProperties": true
|
|
110
|
+
},
|
|
111
|
+
"compositionMap": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"description": "(已废弃)旧版 purpose → compositionId 映射,请迁移到 slotMapping",
|
|
114
|
+
"additionalProperties": { "type": "string" }
|
|
115
|
+
},
|
|
116
|
+
"slotSchema": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"description": "(已废弃)旧版 slot 描述,请迁移到 slotMapping",
|
|
119
|
+
"additionalProperties": true
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"definitions": {
|
|
123
|
+
"SlotRef": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"description": "引用另一个 purpose 的 SlotDefinition,消除重复定义",
|
|
126
|
+
"required": ["$ref"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"$ref": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "目标 purpose 名称,如 \"point\" 或 \"cta\""
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
},
|
|
135
|
+
"SlotDefinition": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": ["slotId", "compositionId"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"slotId": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "模板 slot 标识"
|
|
142
|
+
},
|
|
143
|
+
"compositionId": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "对应 Remotion Composition ID"
|
|
146
|
+
},
|
|
147
|
+
"description": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"propExtractors": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"description": "props 提取规则:propName → 提取配置",
|
|
153
|
+
"additionalProperties": { "$ref": "#/definitions/PropExtractor" }
|
|
154
|
+
},
|
|
155
|
+
"requiredProps": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": { "type": "string" },
|
|
158
|
+
"description": "必需的 props"
|
|
159
|
+
},
|
|
160
|
+
"optionalProps": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": { "type": "string" },
|
|
163
|
+
"description": "可选的 props"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"PropExtractor": {
|
|
168
|
+
"oneOf": [
|
|
169
|
+
{
|
|
170
|
+
"type": "object",
|
|
171
|
+
"description": "从 textLayers 按 role 提取",
|
|
172
|
+
"required": ["from", "role"],
|
|
173
|
+
"properties": {
|
|
174
|
+
"from": { "type": "string", "const": "textLayers" },
|
|
175
|
+
"role": { "type": "string" }
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"type": "object",
|
|
180
|
+
"description": "从 scene 按点分路径提取",
|
|
181
|
+
"required": ["from"],
|
|
182
|
+
"properties": {
|
|
183
|
+
"from": { "type": "string", "description": "点分路径,如 visuals.background.assetRef" }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"Typography": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"properties": {
|
|
191
|
+
"titleFont": { "type": "string" },
|
|
192
|
+
"bodyFont": { "type": "string" },
|
|
193
|
+
"titleSize": { "type": "integer" },
|
|
194
|
+
"bodySize": { "type": "integer" },
|
|
195
|
+
"primaryColor": { "type": "string" },
|
|
196
|
+
"secondaryColor": { "type": "string" }
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"ImageStyleGuide": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"description": "图片生成视觉风格指南",
|
|
202
|
+
"properties": {
|
|
203
|
+
"baseStyle": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "基础视觉风格描述,追加到所有 prompt 末尾"
|
|
206
|
+
},
|
|
207
|
+
"colorDirective": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "色彩方向指令(文字描述,非 HEX)"
|
|
210
|
+
},
|
|
211
|
+
"negativePrompt": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "全局负向提示词,描述不希望出现的元素"
|
|
214
|
+
},
|
|
215
|
+
"guidanceScale": {
|
|
216
|
+
"type": "number",
|
|
217
|
+
"description": "推荐引导系数(如 7.5),控制生成图片对 prompt 的遵循程度"
|
|
218
|
+
},
|
|
219
|
+
"purposeOverrides": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"description": "按场景 purpose 覆盖的风格配置",
|
|
222
|
+
"additionalProperties": {
|
|
223
|
+
"$ref": "#/definitions/PurposeStyleOverride"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"PurposeStyleOverride": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"description": "针对特定 purpose 的风格覆盖",
|
|
231
|
+
"properties": {
|
|
232
|
+
"promptTemplate": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"description": "prompt 模板,支持 {narration_summary} {topic} {style_suffix} {scene_title} 变量"
|
|
235
|
+
},
|
|
236
|
+
"styleModifier": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"description": "追加的风格修饰符"
|
|
239
|
+
},
|
|
240
|
+
"negativePrompt": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "覆盖全局的负向提示词"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|