@remixmate/cli 0.9.18 → 0.9.20
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 +6 -6
- package/README.zh-CN.md +6 -6
- package/dist/handlers/gen-image.d.ts +2 -1
- package/dist/handlers/gen-image.js +4 -5
- package/dist/manifest.json +953 -18
- package/dist/project/host.d.ts +15 -1
- package/dist/project/host.js +47 -2
- package/dist/skill-schema.d.ts +31 -0
- package/dist/skill-schema.js +92 -0
- package/package.json +1 -1
- package/skills/export-jianying/skill.json +62 -10
- package/skills/gen-digital-human/skill.json +23 -0
- package/skills/gen-image/SKILL.md +9 -20
- package/skills/gen-image/skill.json +24 -4
- package/skills/gen-image/version.json +2 -2
- package/skills/gen-script/SKILL.md +25 -6
- package/skills/gen-script/scripts/gen_script.py +103 -5
- package/skills/gen-script/skill.json +95 -18
- package/skills/gen-video/SKILL.md +47 -50
- package/skills/gen-video/skill.json +26 -4
- package/skills/gen-video/version.json +2 -2
- package/skills/gen-voice/skill.json +14 -0
- package/skills/template-registry/scripts/match_template.py +14 -0
- package/skills/template-registry/video_dsl/schema/video-dsl-v1alpha1.json +11 -0
- package/skills/video-parser/skill.json +13 -0
- package/skills/web-record/skill.json +38 -0
- package/skills/web-screenshot/skill.json +21 -0
|
@@ -475,6 +475,51 @@ def _resolve_contract(template_config: dict | None) -> dict:
|
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
|
|
478
|
+
def _enforce_supported_duration(
|
|
479
|
+
dsl: dict, template_config: dict | None, template_id: str | None
|
|
480
|
+
) -> None:
|
|
481
|
+
"""校验成片总时长落在模板自己声明的 ``supportedDurations`` 区间内。
|
|
482
|
+
|
|
483
|
+
这条约束此前只在 template-library 的 CI(``check-dsl-examples.mjs``)对仓库里的
|
|
484
|
+
示例 DSL 生效,运行时链路(gen_script → prepare_video_assets → render_video)没有
|
|
485
|
+
任何一环校验它。于是 spotlight-card(``min: 10``)可以静默产出 5s 成片——模板自己
|
|
486
|
+
声明"我不是为 5s 设计的",却没人拦。这里在 DSL 出厂前补上同一道栅栏。
|
|
487
|
+
|
|
488
|
+
越界即报错退出,而不是静默出片:时长不足通常意味着内容(打字机文案 / 旁白 / 场景)
|
|
489
|
+
根本没填够,继续往下走只会烧掉渲染积分换一条废片。
|
|
490
|
+
"""
|
|
491
|
+
sd = (template_config or {}).get("supportedDurations")
|
|
492
|
+
if not isinstance(sd, dict):
|
|
493
|
+
return
|
|
494
|
+
|
|
495
|
+
total = sum(s.get("duration", 0) for s in dsl.get("scenes", []))
|
|
496
|
+
lo = sd.get("min")
|
|
497
|
+
hi = sd.get("max")
|
|
498
|
+
|
|
499
|
+
if isinstance(lo, (int, float)) and total < lo:
|
|
500
|
+
print(
|
|
501
|
+
f"❌ duration {total}s is below template '{template_id}' declared minimum {lo}s "
|
|
502
|
+
f"(supportedDurations: [{lo}, {hi}]).\n"
|
|
503
|
+
" The template declares it is not designed for clips this short; rendering "
|
|
504
|
+
"anyway burns credits on a degenerate video.\n"
|
|
505
|
+
" Fix: add content until the estimated duration reaches the minimum — more "
|
|
506
|
+
"--caption-lines for typewriter-driven templates, longer narration / more scenes "
|
|
507
|
+
"for narration-driven ones.",
|
|
508
|
+
file=sys.stderr,
|
|
509
|
+
)
|
|
510
|
+
sys.exit(1)
|
|
511
|
+
|
|
512
|
+
if isinstance(hi, (int, float)) and total > hi:
|
|
513
|
+
print(
|
|
514
|
+
f"❌ duration {total}s exceeds template '{template_id}' declared maximum {hi}s "
|
|
515
|
+
f"(supportedDurations: [{lo}, {hi}]).\n"
|
|
516
|
+
" Fix: shorten the content (fewer --caption-lines / scenes) or lower --duration, "
|
|
517
|
+
"or pick a template that supports longer videos.",
|
|
518
|
+
file=sys.stderr,
|
|
519
|
+
)
|
|
520
|
+
sys.exit(1)
|
|
521
|
+
|
|
522
|
+
|
|
478
523
|
def _plan_contract_scenes(
|
|
479
524
|
contract: dict, topic: str, duration: int, scene_count: int | None, language: str
|
|
480
525
|
) -> list:
|
|
@@ -586,6 +631,8 @@ def _build_carousel_caption_dsl(
|
|
|
586
631
|
resolution: str,
|
|
587
632
|
output_language: str,
|
|
588
633
|
resolved_voice_id: str,
|
|
634
|
+
font_id: str | None,
|
|
635
|
+
font_name: str | None,
|
|
589
636
|
narration_enabled: bool,
|
|
590
637
|
payload_defaults: dict,
|
|
591
638
|
duration_strategy: str | None,
|
|
@@ -732,6 +779,7 @@ def _build_carousel_caption_dsl(
|
|
|
732
779
|
# 并省略 global.narration,避免下游误判存在旁白。
|
|
733
780
|
"subtitle": {"enabled": narration_enabled, "style": "bottom"},
|
|
734
781
|
**({"narration": {"voiceId": resolved_voice_id, "speed": 1.0}} if narration_enabled else {}),
|
|
782
|
+
**({"font": {"fontId": font_id, **({"fontName": font_name} if font_name else {})}} if font_id else {}),
|
|
735
783
|
"bgm": {"enabled": True, "volume": 0.12},
|
|
736
784
|
},
|
|
737
785
|
"assets": assets,
|
|
@@ -779,6 +827,8 @@ def build_dsl(
|
|
|
779
827
|
ratio: str,
|
|
780
828
|
resolution: str,
|
|
781
829
|
voice_id: str,
|
|
830
|
+
font_id: str | None,
|
|
831
|
+
font_name: str | None,
|
|
782
832
|
scene_count: int | None,
|
|
783
833
|
allow_digital_human: bool,
|
|
784
834
|
allow_ai_video: bool,
|
|
@@ -861,7 +911,32 @@ def build_dsl(
|
|
|
861
911
|
file=sys.stderr,
|
|
862
912
|
)
|
|
863
913
|
sys.exit(1)
|
|
864
|
-
|
|
914
|
+
# 兜底校验 ②:durationStrategy=fit-caption 的模板(spotlight-card 类)由打字机
|
|
915
|
+
# 文案驱动节奏 —— caption 就是内容本体,不是可选装饰。caption_lines 为空时上面的
|
|
916
|
+
# "两者皆空" 检查放行,产出的却是「顶部标题 + 轮播、底部一个字都没有」的退化片:
|
|
917
|
+
# 估时掉到轮播地板值(2 张图 ≈ 5s),而调用方往往还在确认摘要里描述了一段
|
|
918
|
+
# 根本没进 DSL 的文案,用户在确认环节也看不出来。所以这里必须硬失败。
|
|
919
|
+
# 注意:只卡 fit-caption。carousel-caption 里 durationStrategy=fit-images 的
|
|
920
|
+
# 纯视觉模板(image-to-video 等)本来就允许无文案,不受影响。
|
|
921
|
+
if contract["duration_strategy"] == "fit-caption" and not (caption_lines or []):
|
|
922
|
+
print(
|
|
923
|
+
"❌ template "
|
|
924
|
+
f"'{template_id}' is typewriter-driven (capabilities.durationStrategy="
|
|
925
|
+
"fit-caption), but --caption-lines is empty.\n"
|
|
926
|
+
" For this template the bottom typewriter copy IS the content: it carries "
|
|
927
|
+
"the message and it decides the video length. With no lines the render "
|
|
928
|
+
"collapses to the carousel floor (~5s for 2 images) and shows no text at all.\n"
|
|
929
|
+
" Fix: pass one --caption-lines '<text>' per line. If the user did not "
|
|
930
|
+
"supply the copy, WRITE IT YOURSELF from the material you researched "
|
|
931
|
+
"(repo README, page screenshots, the user's topic) and pass it — do not leave "
|
|
932
|
+
"it empty, and do not describe lines you never passed.\n"
|
|
933
|
+
" gen_script.py --topic <topic> --template-id "
|
|
934
|
+
f"{template_id} --carousel-items <url> "
|
|
935
|
+
"--caption-lines '<line 1>' --caption-lines '<line 2>' ...",
|
|
936
|
+
file=sys.stderr,
|
|
937
|
+
)
|
|
938
|
+
sys.exit(1)
|
|
939
|
+
carousel_dsl = _build_carousel_caption_dsl(
|
|
865
940
|
template_id=template_id,
|
|
866
941
|
topic=topic,
|
|
867
942
|
headline=effective_headline,
|
|
@@ -875,10 +950,14 @@ def build_dsl(
|
|
|
875
950
|
resolution=resolution,
|
|
876
951
|
output_language=output_language,
|
|
877
952
|
resolved_voice_id=resolved_voice_id,
|
|
953
|
+
font_id=font_id,
|
|
954
|
+
font_name=font_name,
|
|
878
955
|
narration_enabled=needs_narration,
|
|
879
956
|
payload_defaults=contract["payload_defaults"],
|
|
880
957
|
duration_strategy=contract["duration_strategy"],
|
|
881
958
|
)
|
|
959
|
+
_enforce_supported_duration(carousel_dsl, template_config, template_id)
|
|
960
|
+
return carousel_dsl
|
|
882
961
|
|
|
883
962
|
# ── 其余模板:统一场景规划(arc 叙事弧 / single / fixed)+ 统一装配循环 ──────
|
|
884
963
|
scene_plans = _plan_contract_scenes(contract, topic, duration, scene_count, output_language)
|
|
@@ -940,14 +1019,16 @@ def build_dsl(
|
|
|
940
1019
|
})
|
|
941
1020
|
else:
|
|
942
1021
|
# 视频素材:复用 image prompt 生成器作为兜底,再追加 "视频/动态" 关键词
|
|
943
|
-
# 模型 / 时长 / 比例都遵循 gen-video 校验规则(Seedance 4-
|
|
1022
|
+
# 模型 / 时长 / 比例都遵循 gen-video 校验规则(Seedance 2.0:4-15s)
|
|
944
1023
|
image_result = generate_image_prompt(plan["purpose"], topic, style, narration_text=narration_text)
|
|
945
1024
|
video_prompt = image_result["prompt"]
|
|
946
|
-
#
|
|
947
|
-
video_duration = max(4, min(int(plan["duration"]),
|
|
1025
|
+
# 视频时长按 gen-video 的 4-15s 区间截断
|
|
1026
|
+
video_duration = max(4, min(int(plan["duration"]), 15))
|
|
948
1027
|
vid_payload = {
|
|
949
1028
|
"prompt": video_prompt,
|
|
950
|
-
|
|
1029
|
+
# 写别名而不是带日期的模型 ID:真源是 ab-api 的能力目录,
|
|
1030
|
+
# 版本号换代时这里不该跟着改(seedance → 当前的 Seedance 2.0)
|
|
1031
|
+
"model": os.environ.get("DEFAULT_VIDEO_MODEL", "seedance"),
|
|
951
1032
|
"ratio": ratio,
|
|
952
1033
|
"duration": video_duration,
|
|
953
1034
|
}
|
|
@@ -1092,6 +1173,7 @@ def build_dsl(
|
|
|
1092
1173
|
# global.narration,避免下游误判存在旁白。
|
|
1093
1174
|
"subtitle": {"enabled": needs_narration, "style": "bottom"},
|
|
1094
1175
|
**({"narration": {"voiceId": resolved_voice_id, "speed": 1.0}} if needs_narration else {}),
|
|
1176
|
+
**({"font": {"fontId": font_id, **({"fontName": font_name} if font_name else {})}} if font_id else {}),
|
|
1095
1177
|
"bgm": {"enabled": True, "volume": 0.12},
|
|
1096
1178
|
},
|
|
1097
1179
|
"assets": assets,
|
|
@@ -1102,6 +1184,8 @@ def build_dsl(
|
|
|
1102
1184
|
if template_id:
|
|
1103
1185
|
dsl["meta"]["templateId"] = template_id
|
|
1104
1186
|
|
|
1187
|
+
_enforce_supported_duration(dsl, template_config, template_id)
|
|
1188
|
+
|
|
1105
1189
|
return dsl
|
|
1106
1190
|
|
|
1107
1191
|
|
|
@@ -1128,6 +1212,18 @@ Examples:
|
|
|
1128
1212
|
parser.add_argument("--resolution", default="1080p", help="Resolution (default: 1080p)")
|
|
1129
1213
|
parser.add_argument("--scenes", type=int, default=None, help="Scene count (default: auto-planned)")
|
|
1130
1214
|
parser.add_argument("--voice-id", default=None, help="Narration voice id. When omitted, the resolver picks template.defaultVoiceId, then the language-keyed fallback (zh→Chinese (Mandarin)_Male_Announcer, en→TBD English voice). gen_voice --list-voices --local prints the language-tagged catalog.")
|
|
1215
|
+
parser.add_argument(
|
|
1216
|
+
"--font-id",
|
|
1217
|
+
default=None,
|
|
1218
|
+
help=(
|
|
1219
|
+
"Font family key from the font library (font.uniq_id, e.g. zzgf-xi-mai). "
|
|
1220
|
+
"Omit to follow the template's own font pairing. "
|
|
1221
|
+
"Pass the opaque key, NOT a CSS family name: the family name is a rendering "
|
|
1222
|
+
"detail resolved by ab-render; a mistyped family name silently falls back to "
|
|
1223
|
+
"the default font with no error."
|
|
1224
|
+
),
|
|
1225
|
+
)
|
|
1226
|
+
parser.add_argument("--font-name", default=None, help="Human-readable font name. Logged and stored for display only; never used for rendering.")
|
|
1131
1227
|
parser.add_argument("--allow-digital-human", action="store_true", help="Allow digital-human assets")
|
|
1132
1228
|
parser.add_argument("--allow-ai-video", action="store_true", help="Allow AI-generated video assets")
|
|
1133
1229
|
parser.add_argument("--template-id", default=None, help="Template id. The template owns outputLanguage and may declare a defaultVoiceId.")
|
|
@@ -1276,6 +1372,8 @@ Examples:
|
|
|
1276
1372
|
ratio=args.ratio,
|
|
1277
1373
|
resolution=args.resolution,
|
|
1278
1374
|
voice_id=args.voice_id,
|
|
1375
|
+
font_id=args.font_id,
|
|
1376
|
+
font_name=args.font_name,
|
|
1279
1377
|
scene_count=args.scenes,
|
|
1280
1378
|
allow_digital_human=args.allow_digital_human,
|
|
1281
1379
|
allow_ai_video=args.allow_ai_video,
|
|
@@ -6,39 +6,116 @@
|
|
|
6
6
|
"title": "Video Script Generation",
|
|
7
7
|
"description": "Video script generation: turn a topic into a structured Video DSL (JSON) that describes the full video — scene structure, asset requirements, and narrative flow.",
|
|
8
8
|
"auth": "none",
|
|
9
|
-
"envVars": [
|
|
9
|
+
"envVars": [
|
|
10
|
+
"DEFAULT_IMAGE_MODEL",
|
|
11
|
+
"DEFAULT_VIDEO_MODEL",
|
|
12
|
+
"STUB_IMAGE_URL",
|
|
13
|
+
"STUB_VIDEO_URL"
|
|
14
|
+
],
|
|
10
15
|
"scriptPath": "scripts/gen_script.py",
|
|
11
16
|
"parameters": {
|
|
12
17
|
"type": "object",
|
|
13
18
|
"properties": {
|
|
14
|
-
"topic": {
|
|
19
|
+
"topic": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Video topic (required)"
|
|
22
|
+
},
|
|
15
23
|
"platform": {
|
|
16
24
|
"type": "string",
|
|
17
|
-
"enum": [
|
|
25
|
+
"enum": [
|
|
26
|
+
"douyin",
|
|
27
|
+
"xiaohongshu",
|
|
28
|
+
"bilibili",
|
|
29
|
+
"wechat",
|
|
30
|
+
"youtube",
|
|
31
|
+
"generic"
|
|
32
|
+
],
|
|
18
33
|
"description": "Target platform"
|
|
19
34
|
},
|
|
20
|
-
"duration": {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
"duration": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"description": "Target duration in seconds"
|
|
38
|
+
},
|
|
39
|
+
"style": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Style tag"
|
|
42
|
+
},
|
|
43
|
+
"ratio": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Aspect ratio, e.g. 16:9 or 9:16"
|
|
46
|
+
},
|
|
47
|
+
"scenes": {
|
|
48
|
+
"type": "number",
|
|
49
|
+
"description": "Scene count"
|
|
50
|
+
},
|
|
51
|
+
"voice_id": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Narration voice id. Default depends on the bound template's outputLanguage; query gen_voice with list_voices=true to see available ids."
|
|
54
|
+
},
|
|
55
|
+
"template_id": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "Template id (e.g. html-slide). The template owns outputLanguage and may also declare a defaultVoiceId; both flow into the produced DSL."
|
|
58
|
+
},
|
|
59
|
+
"headline": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "On-screen headline (recommended 4-12 chars / ~3 words). Stored at meta.headline and pushed into every scene's textLayers[role=headline] so the template can render it as the top big-text. **Must** be set when the user explicitly provided a headline / main title; without it, headline falls back to the long-form topic and overflows the top text layer."
|
|
62
|
+
},
|
|
63
|
+
"subheadline": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "On-screen subheadline (project name / slogan / source, e.g. 'Pixelle-Video'). Stored at meta.subheadline and pushed into every scene's textLayers[role=subheadline] so the template can render it as the top small-text. **Must** be set when the user explicitly provided a subtitle / project name. Note: this is the on-screen subheadline, not the CC subtitle (global.subtitle) — they are independent."
|
|
66
|
+
},
|
|
28
67
|
"carousel_items": {
|
|
29
68
|
"type": "array",
|
|
30
|
-
"items": {
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
31
72
|
"description": "Media URLs for the template's image/video carousel (e.g. spotlight-card's middle carousel). When provided together with a template_id whose capabilities.payloadStyle=carousel-caption, these URLs are placed directly into customPayload.carousel.items as existing assets — NO AI image generation is triggered. **Must** pass when the user explicitly provides image/video URLs for carousel-style templates (spotlight-card, etc.). Each element is a full URL string."
|
|
32
73
|
},
|
|
33
74
|
"caption_lines": {
|
|
34
75
|
"type": "array",
|
|
35
|
-
"items": {
|
|
36
|
-
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"description": "Bottom typewriter text lines for templates that support a caption/typewriter area (e.g. spotlight-card). Each element is one line of text, max 10 lines. Supports **emphasis** syntax (rendered with accent color). **Must** pass when the user explicitly provides bullet-point text / bottom copy. **Also must pass — written by you — when the user did NOT provide any copy but the template is typewriter-driven** (capabilities.durationStrategy=fit-caption, e.g. spotlight-card): such templates have no narration, so these lines are both the video's content and the thing that decides its duration. Draft them from the material you researched (repo README, page screenshots, the topic). Leaving this empty for a fit-caption template is rejected: nothing auto-generates caption text, and an empty caption renders a titled carousel with no words at all."
|
|
80
|
+
},
|
|
81
|
+
"stub_image_url": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Test-mode image stub URL. Only pass when the user explicitly says things like 'just testing / don't actually generate / use a placeholder image / stub URL / save credits' AND provides a concrete URL. With this set, every image AssetRef in the produced DSL is written as source=existing, status=generated, url=<this URL> — no gen-image call. Do not pass otherwise; if the user expressed the intent without a URL, ask for one — do not invent one."
|
|
84
|
+
},
|
|
85
|
+
"stub_video_url": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Test-mode video stub URL. Only pass when the user explicitly says things like 'just testing / don't actually generate the video / placeholder clip / save credits' AND provides a concrete URL. With this set, every video AssetRef in the produced DSL is written as source=existing, status=generated, url=<this URL> — no gen-video call. Do not pass otherwise; if the user expressed the intent without a URL, ask for one — do not invent one."
|
|
37
88
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
89
|
+
"skip_asset_generation": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"description": "All-in-one switch for downstream agents (e.g. template-creator) that only want the DSL shape: every produced AssetRef is marked as already generated with placeholder URLs (image: https://placeholder.local/stub.png, video: stub.mp4, audio: stub.mp3). Implies the equivalent of --stub-image-url + --stub-video-url with sentinel defaults plus the same rewrite for gen-voice / gen-digital-human assets. Useful when the agent only needs to inspect DSL structure or feed it into try_render_local with all assets pre-stubbed."
|
|
92
|
+
}
|
|
41
93
|
},
|
|
42
|
-
"required": [
|
|
94
|
+
"required": [
|
|
95
|
+
"topic"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"ui": {
|
|
99
|
+
"primary": [
|
|
100
|
+
"topic",
|
|
101
|
+
"platform",
|
|
102
|
+
"duration"
|
|
103
|
+
],
|
|
104
|
+
"advanced": [
|
|
105
|
+
"style",
|
|
106
|
+
"ratio",
|
|
107
|
+
"scenes",
|
|
108
|
+
"voice_id",
|
|
109
|
+
"template_id",
|
|
110
|
+
"headline",
|
|
111
|
+
"subheadline",
|
|
112
|
+
"carousel_items",
|
|
113
|
+
"caption_lines"
|
|
114
|
+
],
|
|
115
|
+
"hidden": [
|
|
116
|
+
"stub_image_url",
|
|
117
|
+
"stub_video_url",
|
|
118
|
+
"skip_asset_generation"
|
|
119
|
+
]
|
|
43
120
|
}
|
|
44
121
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gen-video
|
|
3
3
|
description: |
|
|
4
|
-
AI video generation skill: produce a short clip from a text prompt. Backed by ab-api's `/model/genVideo` (Seedance
|
|
4
|
+
AI video generation skill: produce a short clip from a text prompt. Backed by ab-api's `/model/genVideo` (Seedance 2.0 family).
|
|
5
5
|
|
|
6
6
|
Use this skill immediately whenever the user asks for any of:
|
|
7
7
|
- Text-to-video, AI-generated clip, "make a short video of ..."
|
|
8
|
-
- Generate video with Doubao / Seedance
|
|
8
|
+
- Generate video with Doubao / Seedance
|
|
9
9
|
- Image-to-video, first-frame / last-frame, reference-image-to-video
|
|
10
10
|
|
|
11
11
|
Even without an explicit "use AI", any request that turns a description into a moving clip should route here.
|
|
12
12
|
triggers:
|
|
13
13
|
- Text-to-video, AI-generated clip, "make a short video of ..."
|
|
14
|
-
- Generate video with Doubao / Seedance
|
|
14
|
+
- Generate video with Doubao / Seedance
|
|
15
15
|
- Image-to-video, first-frame / last-frame, reference-image-to-video
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# AI Video Generation Skill
|
|
19
19
|
|
|
20
|
-
Wraps ab-api's `POST /model/genVideo` (the same endpoint the web "Lingchuang AI Video" tool uses), authenticated with the **Tianyan privateToken**, routed through LiteLLM to **Seedance
|
|
20
|
+
Wraps ab-api's `POST /model/genVideo` (the same endpoint the web "Lingchuang AI Video" tool uses), authenticated with the **Tianyan privateToken**, routed through LiteLLM to **Seedance 2.0**. Generation is async — the handler submits the task and polls `/model/getVideoStatus` until completion.
|
|
21
21
|
|
|
22
22
|
> This skill was migrated from a Python script to an remixmate CLI HTTP handler (`entry.type: http`). The agent invocation is unchanged (same tool name `gen_video`, same params as in `skill.json`); local repro goes through `remixmate gen-video ...`.
|
|
23
23
|
|
|
@@ -27,29 +27,34 @@ The authoritative roster — ids, aliases and per-model limits — lives in the
|
|
|
27
27
|
(`/model/capabilities`), which the CLI fetches at runtime. The table below mirrors it; when the
|
|
28
28
|
two disagree, the catalog wins.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| `
|
|
33
|
-
|
|
34
|
-
| `
|
|
30
|
+
All three are Seedance 2.0; they differ only in price tier and top resolution.
|
|
31
|
+
|
|
32
|
+
| LiteLLM `model` | Display name | Provider | Resolution | Notes |
|
|
33
|
+
|-----------------|--------------|----------|------------|-------|
|
|
34
|
+
| `doubao-seedance-2-0-mini-260615` | Seedance-2.0-mini | Volcano | `480p` `720p` | Default. Cheapest tier (~half the standard rate) |
|
|
35
|
+
| `doubao-seedance-2-0-fast-260128` | Seedance-2.0-fast | Volcano | `480p` `720p` | Mid tier |
|
|
36
|
+
| `doubao-seedance-2-0-260128` | Seedance-2.0 | Volcano | `480p` `720p` `1080p` | Highest quality; the only tier with 1080p |
|
|
35
37
|
|
|
36
38
|
**Model shortcuts** (`--model` / `-m` accepts these directly):
|
|
37
|
-
- `seedance
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
| **
|
|
49
|
-
| **
|
|
50
|
-
| **
|
|
51
|
-
| **
|
|
52
|
-
| **
|
|
39
|
+
- `seedance-mini` / `seedance-2.0-mini` → Seedance-2.0-mini
|
|
40
|
+
- `seedance-fast` / `seedance-2.0-fast` → Seedance-2.0-fast
|
|
41
|
+
- `seedance` / `seedance-2.0` → Seedance-2.0
|
|
42
|
+
|
|
43
|
+
Veo 3.1 / Veo 3.1 Fast are **not available** — there is no working Veo channel on the gateway,
|
|
44
|
+
so they are absent from the catalog and `--model veo` will fail.
|
|
45
|
+
|
|
46
|
+
### Parameter ranges (identical across the three tiers, except resolution)
|
|
47
|
+
|
|
48
|
+
| | Seedance 2.0 mini / fast / standard |
|
|
49
|
+
|--|--|
|
|
50
|
+
| **Aspect ratio** | `adaptive` `16:9` `4:3` `1:1` `3:4` `9:16` `21:9` |
|
|
51
|
+
| **Resolution** | `480p` `720p` (`1080p` on `seedance` only) |
|
|
52
|
+
| **Duration** | 4–15 seconds (continuous integers) |
|
|
53
|
+
| **First / last frame** | yes |
|
|
54
|
+
| **Reference images** | yes, up to 9 |
|
|
55
|
+
| **Generated audio** | yes |
|
|
56
|
+
| **Fixed camera** | yes |
|
|
57
|
+
| **Negative prompt** | ignored (Veo-only parameter) |
|
|
53
58
|
|
|
54
59
|
## Auth & environment
|
|
55
60
|
|
|
@@ -61,7 +66,7 @@ No skill-local env file — the executing process inherits the system environmen
|
|
|
61
66
|
| Env var | Description | Default |
|
|
62
67
|
|---------|-------------|---------|
|
|
63
68
|
| `PRIV_TOKEN` | Tianyan token; `--priv-token` overrides | none |
|
|
64
|
-
| `MM_VIDEO_MODEL` | Default model id | `
|
|
69
|
+
| `MM_VIDEO_MODEL` | Default model id or shortcut | catalog default (`seedance-mini`) |
|
|
65
70
|
| `MM_API_BASE_URL` | API root; `--api-base-url` overrides | `https://api.remixmate.com/api` |
|
|
66
71
|
| `AGENT_NAME` | Optional `x-invoke-agent` header | none |
|
|
67
72
|
|
|
@@ -71,7 +76,7 @@ No skill-local env file — the executing process inherits the system environmen
|
|
|
71
76
|
2. **Async job**: video generation is async; the handler polls until completion (typically 1–3 minutes) and emits `__progress__` lines.
|
|
72
77
|
3. **Surface results**: stdout prints the video URL on its own line; show it directly to the user (no download needed — the URL is cloud-persisted).
|
|
73
78
|
|
|
74
|
-
###
|
|
79
|
+
### Text-to-video (default model: Seedance-2.0-mini)
|
|
75
80
|
|
|
76
81
|
```bash
|
|
77
82
|
remixmate gen-video \
|
|
@@ -80,7 +85,7 @@ remixmate gen-video \
|
|
|
80
85
|
--ratio "16:9"
|
|
81
86
|
```
|
|
82
87
|
|
|
83
|
-
###
|
|
88
|
+
### First/last frame + audio
|
|
84
89
|
|
|
85
90
|
Frame images accept local file paths, HTTPS URLs, or data URIs (local files are base64-encoded into a data URI).
|
|
86
91
|
|
|
@@ -93,33 +98,25 @@ remixmate gen-video \
|
|
|
93
98
|
--generate-audio
|
|
94
99
|
```
|
|
95
100
|
|
|
96
|
-
###
|
|
101
|
+
### 1080p final cut
|
|
102
|
+
|
|
103
|
+
Only `seedance` (the standard tier) offers 1080p; it also costs roughly twice mini per second.
|
|
97
104
|
|
|
98
105
|
```bash
|
|
99
106
|
remixmate gen-video \
|
|
100
|
-
--model
|
|
107
|
+
--model seedance \
|
|
101
108
|
--prompt "<video description>" \
|
|
102
109
|
--duration 8 \
|
|
103
110
|
--ratio "16:9" \
|
|
104
|
-
--resolution
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Veo 3.1 Fast for rapid iteration
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
remixmate gen-video \
|
|
111
|
-
--model veo-fast \
|
|
112
|
-
--prompt "<video description>" \
|
|
113
|
-
--duration 6
|
|
111
|
+
--resolution 1080p
|
|
114
112
|
```
|
|
115
113
|
|
|
116
|
-
###
|
|
114
|
+
### With reference images
|
|
117
115
|
|
|
118
|
-
Pass `--reference` multiple times (
|
|
116
|
+
Pass `--reference` multiple times (up to 9).
|
|
119
117
|
|
|
120
118
|
```bash
|
|
121
119
|
remixmate gen-video \
|
|
122
|
-
--model veo \
|
|
123
120
|
--prompt "<video description>" \
|
|
124
121
|
--reference ./ref1.png \
|
|
125
122
|
--reference ./ref2.png \
|
|
@@ -131,16 +128,16 @@ remixmate gen-video \
|
|
|
131
128
|
| Flag | Description | Default |
|
|
132
129
|
|------|-------------|---------|
|
|
133
130
|
| `-p` / `--prompt` | Video description (combinable with first/last frame or references) | — |
|
|
134
|
-
| `-m` / `--model` | Model id or shortcut (`seedance` / `
|
|
135
|
-
| `-d` / `--duration` | Duration in seconds
|
|
136
|
-
| `-r` / `--ratio` | Aspect ratio
|
|
137
|
-
| `--resolution` | Resolution.
|
|
131
|
+
| `-m` / `--model` | Model id or shortcut (`seedance-mini` / `seedance-fast` / `seedance`) | see `MM_VIDEO_MODEL` |
|
|
132
|
+
| `-d` / `--duration` | Duration in seconds (4–15) | 5 |
|
|
133
|
+
| `-r` / `--ratio` | Aspect ratio; `adaptive` also accepted | `16:9` |
|
|
134
|
+
| `--resolution` | Resolution. `1080p` only on `seedance` | `720p` |
|
|
138
135
|
| `--first-frame` | First-frame image: local path, https URL, or data URI | none |
|
|
139
136
|
| `--last-frame` | Last-frame image | none |
|
|
140
|
-
| `--reference` | Reference image (repeatable
|
|
137
|
+
| `--reference` | Reference image (repeatable, max 9) | none |
|
|
141
138
|
| `--generate-audio` | Generate native audio | off |
|
|
142
|
-
| `--camera-fixed` | Fixed camera
|
|
143
|
-
| `--negative-prompt` | Negative prompt (
|
|
139
|
+
| `--camera-fixed` | Fixed camera | off |
|
|
140
|
+
| `--negative-prompt` | Negative prompt (Veo only; ignored by Seedance) | none |
|
|
144
141
|
| `--seed` | Random seed | none |
|
|
145
142
|
| `--person-generation` | Person policy: `allow_all` / `dont_allow` (Veo) | none |
|
|
146
143
|
| `--api-base-url` | Override API root | see above |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "atomic",
|
|
5
5
|
"category": "asset",
|
|
6
6
|
"title": "AI Video Generation",
|
|
7
|
-
"description": "AI video generation: produce a short video clip from a text prompt.
|
|
7
|
+
"description": "AI video generation: produce a short video clip from a text prompt. Three Seedance 2.0 tiers (mini / fast / standard), plus first/last frame and reference images.",
|
|
8
8
|
"auth": "required",
|
|
9
9
|
"joinsTake": true,
|
|
10
10
|
"envVars": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"model": {
|
|
28
28
|
"type": "string",
|
|
29
|
-
"description": "Model: 'seedance' (default;
|
|
29
|
+
"description": "Model: 'seedance-mini' (default; cheapest, 480p/720p), 'seedance-fast' (480p/720p), or 'seedance' (Seedance 2.0, adds 1080p). All are 4-15s and share the same features"
|
|
30
30
|
},
|
|
31
31
|
"duration": {
|
|
32
32
|
"type": "number",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"items": {
|
|
54
54
|
"type": "string"
|
|
55
55
|
},
|
|
56
|
-
"description": "Reference images: local file path, https URL, or data URI.
|
|
56
|
+
"description": "Reference images: local file path, https URL, or data URI. Up to 9; combinable with first_frame / last_frame."
|
|
57
57
|
},
|
|
58
58
|
"generate_audio": {
|
|
59
59
|
"type": "boolean",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"negative_prompt": {
|
|
67
67
|
"type": "string",
|
|
68
|
-
"description": "Content to steer away from (Veo)"
|
|
68
|
+
"description": "Content to steer away from. Veo only — Seedance ignores it (kept for when a Veo channel is available again)"
|
|
69
69
|
},
|
|
70
70
|
"seed": {
|
|
71
71
|
"type": "number",
|
|
@@ -87,5 +87,27 @@
|
|
|
87
87
|
"required": [
|
|
88
88
|
"prompt"
|
|
89
89
|
]
|
|
90
|
+
},
|
|
91
|
+
"ui": {
|
|
92
|
+
"primary": [
|
|
93
|
+
"prompt",
|
|
94
|
+
"model",
|
|
95
|
+
"duration",
|
|
96
|
+
"ratio"
|
|
97
|
+
],
|
|
98
|
+
"advanced": [
|
|
99
|
+
"resolution",
|
|
100
|
+
"first_frame",
|
|
101
|
+
"last_frame",
|
|
102
|
+
"reference",
|
|
103
|
+
"generate_audio",
|
|
104
|
+
"camera_fixed"
|
|
105
|
+
],
|
|
106
|
+
"hidden": [
|
|
107
|
+
"json_output",
|
|
108
|
+
"seed",
|
|
109
|
+
"negative_prompt",
|
|
110
|
+
"person_generation"
|
|
111
|
+
]
|
|
90
112
|
}
|
|
91
113
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"skillName": "gen-video",
|
|
3
3
|
"repoName": "agent-skill-media-maker",
|
|
4
4
|
"skillId": "339",
|
|
5
|
-
"version": "
|
|
6
|
-
"skillDescription": "AI video generation skill: produce a short clip from a text prompt. Backed by ab-api's `/model/genVideo` (Seedance
|
|
5
|
+
"version": "V9",
|
|
6
|
+
"skillDescription": "AI video generation skill: produce a short clip from a text prompt. Backed by ab-api's `/model/genVideo` (Seedance 2.0 family).\n\nUse this skill immediately whenever the user asks for any of:\n- Text-to-video, AI-generated clip, \"make a short video of ...\"\n- Generate video with Doubao / Seedance\n- Image-to-video, first-frame / last-frame, reference-image-to-video\n\nEven without an explicit \"use AI\", any request that turns a description into a moving clip should route here."
|
|
7
7
|
}
|
|
@@ -183,6 +183,16 @@ def build_binding(template: dict, dsl: dict) -> dict:
|
|
|
183
183
|
motion = template.get("defaultMotionPreset", "smooth")
|
|
184
184
|
colors = template.get("defaultColorScheme", [])
|
|
185
185
|
|
|
186
|
+
# 用户选中的字体(DSL 的 global.font)。这里只是把不透明 key 折进 typography,
|
|
187
|
+
# 真正的解析(uniqId → 排印家族名 + 字重文件)在 ab-render 侧完成。
|
|
188
|
+
#
|
|
189
|
+
# 优先级见 ab-platform/docs/font-selection-design.md §13.3:
|
|
190
|
+
# 用户选择 > variant.defaultFontId(预留档位,当前恒为空)
|
|
191
|
+
# > template.defaultTypography.bodyFont(现状裸 family 名)> 模板 theme 字栈
|
|
192
|
+
# 下面的 variant 合并在此之后执行,所以 fontId 单独在合并后再写回,
|
|
193
|
+
# 避免被 variant 的 defaultTypography 覆盖掉。
|
|
194
|
+
user_font_id = ((dsl.get("global", {}) or {}).get("font", {}) or {}).get("fontId")
|
|
195
|
+
|
|
186
196
|
# --- variant selection(确定性)---
|
|
187
197
|
# 优先级:
|
|
188
198
|
# 1) DSL 显式声明 — meta.templateVariant / meta.variant / renderHints.templateVariant
|
|
@@ -268,6 +278,10 @@ def build_binding(template: dict, dsl: dict) -> dict:
|
|
|
268
278
|
if vcolors:
|
|
269
279
|
colors = vcolors
|
|
270
280
|
|
|
281
|
+
# 用户的字体选择压过 variant 默认值(§13.3 的优先级第一档),所以写在合并之后。
|
|
282
|
+
if isinstance(user_font_id, str) and user_font_id.strip():
|
|
283
|
+
typography = {**typography, "fontId": user_font_id.strip()}
|
|
284
|
+
|
|
271
285
|
result = {
|
|
272
286
|
"version": "v1alpha1",
|
|
273
287
|
"templateId": template.get("templateId", ""),
|