@remixmate/cli 0.1.0 → 0.1.1
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 +100 -83
- package/README.zh-CN.md +183 -0
- package/dist/handlers/gen-digital-human.d.ts +12 -0
- package/dist/handlers/gen-digital-human.js +157 -0
- package/dist/handlers/gen-image.js +5 -41
- package/dist/handlers/gen-video.d.ts +18 -0
- package/dist/handlers/gen-video.js +153 -0
- package/dist/handlers/gen-voice.js +2 -12
- package/dist/handlers/index.js +4 -2
- package/dist/handlers/shared.d.ts +26 -0
- package/dist/handlers/shared.js +66 -0
- package/dist/http.d.ts +4 -2
- package/dist/http.js +5 -3
- package/dist/manifest.json +27 -24
- package/dist/registry.d.ts +5 -16
- package/dist/registry.js +11 -17
- package/dist/skill-schema.d.ts +47 -0
- package/dist/skill-schema.js +49 -0
- package/package.json +5 -4
- package/skills/export-jianying/scripts/gen_jianying_draft.py +4 -4
- package/skills/gen-digital-human/SKILL.md +23 -46
- package/skills/gen-digital-human/skill.json +3 -2
- package/skills/gen-digital-human/version.json +1 -1
- package/skills/gen-image/SKILL.md +2 -2
- package/skills/gen-image/skill.json +2 -1
- package/skills/gen-image/version.json +1 -1
- package/skills/gen-script/SKILL.md +13 -13
- package/skills/gen-script/scripts/gen_script.py +11 -12
- package/skills/gen-video/SKILL.md +22 -33
- package/skills/gen-video/skill.json +3 -2
- package/skills/gen-video/version.json +1 -1
- package/skills/gen-voice/SKILL.md +1 -1
- package/skills/gen-voice/version.json +1 -1
- package/skills/prepare-video-assets/SKILL.md +2 -2
- package/skills/prepare-video-assets/skill.json +1 -1
- package/skills/render-video/scripts/render_video.py +8 -8
- package/skills/{template-bind → template-registry}/README.md +4 -4
- package/skills/{template-bind → template-registry}/SKILL.md +14 -12
- package/skills/template-registry/scripts/list_templates.py +129 -0
- package/skills/{template-bind → template-registry}/scripts/match_template.py +4 -3
- package/skills/{template-bind → template-registry}/scripts/registry_loader.py +1 -1
- package/skills/{template-bind → template-registry}/scripts/template_paths.py +7 -7
- package/skills/{template-bind → template-registry}/skill.json +6 -5
- package/skills/template-registry/version.json +7 -0
- package/skills/{template-bind → template-registry}/video_dsl/README.md +2 -2
- package/skills/{template-bind → template-registry}/video_dsl/runtime/__init__.py +1 -1
- package/skills/video-parser/SKILL.md +47 -160
- package/skills/video-parser/skill.json +3 -4
- package/skills/video-parser/version.json +1 -1
- package/skills/web-capture/SKILL.md +407 -116
- package/skills/web-capture/scripts/_media_screenshot/__init__.py +21 -0
- package/skills/web-capture/scripts/_media_screenshot/bootstrap.py +34 -0
- package/skills/web-capture/scripts/_media_screenshot/browser.py +86 -0
- package/skills/web-capture/scripts/_media_screenshot/cli_args.py +111 -0
- package/skills/web-capture/scripts/_media_screenshot/js/arrow.js +86 -0
- package/skills/web-capture/scripts/_media_screenshot/js/caption.js +27 -0
- package/skills/web-capture/scripts/_media_screenshot/js/clear_overlay.js +5 -0
- package/skills/web-capture/scripts/_media_screenshot/js/cursor_bootstrap.js +26 -0
- package/skills/web-capture/scripts/_media_screenshot/js/cursor_hide.js +6 -0
- package/skills/web-capture/scripts/_media_screenshot/js/cursor_move.js +12 -0
- package/skills/web-capture/scripts/_media_screenshot/js/cursor_ripple.js +25 -0
- package/skills/web-capture/scripts/_media_screenshot/js/element_zoom.js +72 -0
- package/skills/web-capture/scripts/_media_screenshot/js/element_zoom_restore.js +21 -0
- package/skills/web-capture/scripts/_media_screenshot/js/fade_out_overlays.js +10 -0
- package/skills/web-capture/scripts/_media_screenshot/js/focus.js +38 -0
- package/skills/web-capture/scripts/_media_screenshot/js/highlight.js +97 -0
- package/skills/web-capture/scripts/_media_screenshot/js/overlay_bootstrap.js +19 -0
- package/skills/web-capture/scripts/_media_screenshot/js/page_zoom_in.js +54 -0
- package/skills/web-capture/scripts/_media_screenshot/js/page_zoom_out.js +11 -0
- package/skills/web-capture/scripts/_media_screenshot/js/page_zoom_restore.js +13 -0
- package/skills/web-capture/scripts/_media_screenshot/js/redact.js +33 -0
- package/skills/web-capture/scripts/_media_screenshot/js/scroll.js +26 -0
- package/skills/web-capture/scripts/_media_screenshot/js/scroll_through.js +18 -0
- package/skills/web-capture/scripts/_media_screenshot/js/sequence.js +76 -0
- package/skills/web-capture/scripts/_media_screenshot/js/settled_check.js +15 -0
- package/skills/web-capture/scripts/_media_screenshot/js/title_card.js +71 -0
- package/skills/web-capture/scripts/_media_screenshot/js_loader.py +14 -0
- package/skills/web-capture/scripts/_media_screenshot/overlay.py +17 -0
- package/skills/web-capture/scripts/_media_screenshot/recording.py +100 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/__init__.py +39 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/arrow.py +50 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/caption.py +20 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/click.py +35 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/code_lines.py +54 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/focus.py +24 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/highlight.py +54 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/hover.py +28 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/redact.py +32 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/scroll.py +32 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/sequence.py +43 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/title_card.py +20 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/type.py +42 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/wait.py +9 -0
- package/skills/web-capture/scripts/_media_screenshot/scenes/zoom.py +72 -0
- package/skills/web-capture/scripts/_media_screenshot/screenshot.py +166 -0
- package/skills/web-capture/scripts/_media_screenshot/storyboard.py +88 -0
- package/skills/web-capture/scripts/_media_screenshot/template.py +119 -0
- package/skills/web-capture/scripts/_media_screenshot/trim.py +82 -0
- package/skills/web-capture/scripts/record.py +186 -0
- package/skills/web-capture/scripts/screenshot.py +94 -0
- package/skills/web-capture/skill.json +14 -14
- package/skills/web-capture/templates/github-code-tour.json +59 -0
- package/skills/web-capture/templates/github-readme-tour.json +77 -0
- package/skills/web-capture/templates/github-repo-intro.json +74 -0
- package/skills/web-capture/version.json +2 -2
- package/dist/handlers/template-bind.d.ts +0 -15
- package/dist/handlers/template-bind.js +0 -149
- package/skills/gen-digital-human/scripts/gen_digital_human_video.py +0 -574
- package/skills/gen-video/scripts/gen_video.py +0 -591
- package/skills/template-bind/version.json +0 -7
- package/skills/web-capture/scripts/web_capture.py +0 -461
- /package/skills/{template-bind → template-registry}/scripts/check_contracts.py +0 -0
- /package/skills/{template-bind → template-registry}/scripts/render_job_client.py +0 -0
- /package/skills/{template-bind → template-registry}/scripts/sync_registry.py +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/runtime/dsl_validator.py +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/runtime/prompt_enhancer.py +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/runtime/template_binder.py +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/runtime/timeline_compiler.py +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/schema/render-plan-v1alpha1.json +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/schema/template-binding-v1alpha1.json +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/schema/template-definition-v1alpha1.json +0 -0
- /package/skills/{template-bind → template-registry}/video_dsl/schema/video-dsl-v1alpha1.json +0 -0
|
@@ -17,11 +17,13 @@ triggers:
|
|
|
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** or **Veo**.
|
|
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** or **Veo**. Generation is async — the handler submits the task and polls `/model/getVideoStatus` until completion.
|
|
21
|
+
|
|
22
|
+
> This skill was migrated from a Python script to an ab-skill 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 `ab-skill gen-video ...`.
|
|
21
23
|
|
|
22
24
|
## Models
|
|
23
25
|
|
|
24
|
-
Aligned with
|
|
26
|
+
Aligned with the handler's `MODEL_ALIASES` and the frontend `AI_VIDEO_MODELS`:
|
|
25
27
|
|
|
26
28
|
| LiteLLM `model` | Display name | Provider | Duration | Notes |
|
|
27
29
|
|-----------------|--------------|----------|----------|-------|
|
|
@@ -49,29 +51,28 @@ Aligned with `gen_video.py`'s `GEN_VIDEO_MODEL_PRESETS` and the frontend `AI_VID
|
|
|
49
51
|
|
|
50
52
|
## Auth & environment
|
|
51
53
|
|
|
52
|
-
No skill-local env file — the executing process inherits the system environment.
|
|
54
|
+
No skill-local env file — the executing process inherits the system environment.
|
|
53
55
|
|
|
54
56
|
- **Enterprise OpenClaw**: auth is already injected, **no need** for `PRIV_TOKEN` / `--priv-token`.
|
|
55
|
-
- **Other environments**: configure the token. Without a token, non-interactive runs fail
|
|
57
|
+
- **Other environments**: configure the token. Without a token, non-interactive runs fail.
|
|
56
58
|
|
|
57
59
|
| Env var | Description | Default |
|
|
58
60
|
|---------|-------------|---------|
|
|
59
61
|
| `PRIV_TOKEN` | Tianyan token; `--priv-token` overrides | none |
|
|
60
62
|
| `MM_VIDEO_MODEL` | Default model id | `doubao-seedance-1-5-pro-251215` |
|
|
61
|
-
| `MM_API_BASE_URL` | API root |
|
|
63
|
+
| `MM_API_BASE_URL` | API root; `--api-base-url` overrides | `http://localhost:2999/api` |
|
|
62
64
|
| `AGENT_NAME` | Optional `x-invoke-agent` header | none |
|
|
63
65
|
|
|
64
66
|
## Operations
|
|
65
67
|
|
|
66
|
-
1. **
|
|
67
|
-
2. **
|
|
68
|
-
3.
|
|
69
|
-
4. **Async job**: video generation is async; the script polls until completion (typically 1–3 minutes).
|
|
68
|
+
1. **Prompt**: include camera language ("aerial shot", "slow motion", "push-in") and dynamic descriptions for better results. Chinese or English both work. For pure image-to-video, an empty prompt with first/last frame is allowed.
|
|
69
|
+
2. **Async job**: video generation is async; the handler polls until completion (typically 1–3 minutes) and emits `__progress__` lines.
|
|
70
|
+
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).
|
|
70
71
|
|
|
71
72
|
### Seedance text-to-video (default model)
|
|
72
73
|
|
|
73
74
|
```bash
|
|
74
|
-
|
|
75
|
+
ab-skill gen-video \
|
|
75
76
|
--prompt "<video description>" \
|
|
76
77
|
--duration 5 \
|
|
77
78
|
--ratio "16:9"
|
|
@@ -79,8 +80,10 @@ python3 <SkillDir>/scripts/gen_video.py \
|
|
|
79
80
|
|
|
80
81
|
### Seedance first/last frame + audio
|
|
81
82
|
|
|
83
|
+
Frame images accept local file paths, HTTPS URLs, or data URIs (local files are base64-encoded into a data URI).
|
|
84
|
+
|
|
82
85
|
```bash
|
|
83
|
-
|
|
86
|
+
ab-skill gen-video \
|
|
84
87
|
--prompt "<transition description>" \
|
|
85
88
|
--first-frame ./start.png \
|
|
86
89
|
--last-frame ./end.png \
|
|
@@ -91,7 +94,7 @@ python3 <SkillDir>/scripts/gen_video.py \
|
|
|
91
94
|
### Veo 3.1 high-resolution
|
|
92
95
|
|
|
93
96
|
```bash
|
|
94
|
-
|
|
97
|
+
ab-skill gen-video \
|
|
95
98
|
--model veo \
|
|
96
99
|
--prompt "<video description>" \
|
|
97
100
|
--duration 8 \
|
|
@@ -102,7 +105,7 @@ python3 <SkillDir>/scripts/gen_video.py \
|
|
|
102
105
|
### Veo 3.1 Fast for rapid iteration
|
|
103
106
|
|
|
104
107
|
```bash
|
|
105
|
-
|
|
108
|
+
ab-skill gen-video \
|
|
106
109
|
--model veo-fast \
|
|
107
110
|
--prompt "<video description>" \
|
|
108
111
|
--duration 6
|
|
@@ -110,8 +113,10 @@ python3 <SkillDir>/scripts/gen_video.py \
|
|
|
110
113
|
|
|
111
114
|
### Veo with reference images
|
|
112
115
|
|
|
116
|
+
Pass `--reference` multiple times (Veo only, up to 3).
|
|
117
|
+
|
|
113
118
|
```bash
|
|
114
|
-
|
|
119
|
+
ab-skill gen-video \
|
|
115
120
|
--model veo \
|
|
116
121
|
--prompt "<video description>" \
|
|
117
122
|
--reference ./ref1.png \
|
|
@@ -119,19 +124,6 @@ python3 <SkillDir>/scripts/gen_video.py \
|
|
|
119
124
|
--duration 8
|
|
120
125
|
```
|
|
121
126
|
|
|
122
|
-
### Download to disk
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
python3 <SkillDir>/scripts/gen_video.py \
|
|
126
|
-
--prompt "<video description>" \
|
|
127
|
-
--download \
|
|
128
|
-
--output "output_video.mp4"
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
5. **Surface results**: without `--download`, print the video URL; with `--download`, mention the local path.
|
|
132
|
-
|
|
133
|
-
For the full flag list: `python3 <SkillDir>/scripts/gen_video.py --help`.
|
|
134
|
-
|
|
135
127
|
## Common CLI flags
|
|
136
128
|
|
|
137
129
|
| Flag | Description | Default |
|
|
@@ -149,11 +141,8 @@ For the full flag list: `python3 <SkillDir>/scripts/gen_video.py --help`.
|
|
|
149
141
|
| `--negative-prompt` | Negative prompt (mainly Veo) | none |
|
|
150
142
|
| `--seed` | Random seed | none |
|
|
151
143
|
| `--person-generation` | Person policy: `allow_all` / `dont_allow` (Veo) | none |
|
|
152
|
-
| `--
|
|
153
|
-
|
|
|
154
|
-
| `--poll-interval` | Polling interval (seconds) | `10` |
|
|
155
|
-
| `--max-wait` | Max wait time (seconds) | `300` |
|
|
156
|
-
| `--private-token` | Override token | see above |
|
|
144
|
+
| `--api-base-url` | Override API root | see above |
|
|
145
|
+
| `--priv-token` | Override token | see above |
|
|
157
146
|
|
|
158
147
|
## Prompt tips
|
|
159
148
|
|
|
@@ -166,5 +155,5 @@ For the full flag list: `python3 <SkillDir>/scripts/gen_video.py --help`.
|
|
|
166
155
|
- **401** / **token missing** (non-OpenClaw): set `PRIV_TOKEN`.
|
|
167
156
|
- **Business `code != 0`**: read `msg` on stderr.
|
|
168
157
|
- **429**: rate-limited; retry later.
|
|
169
|
-
- **Generation timeout**:
|
|
158
|
+
- **Generation timeout**: the handler caps polling at ~5 minutes; retry later if it times out.
|
|
170
159
|
- **Network**: verify connectivity and `MM_API_BASE_URL`.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"title": "AI Video Generation",
|
|
6
6
|
"description": "AI video generation: produce a short video clip from a text prompt. Supports Seedance and Veo models, plus first/last frame and reference images.",
|
|
7
7
|
"envVars": ["PRIV_TOKEN", "MM_API_BASE_URL", "AGENT_NAME", "MM_VIDEO_MODEL"],
|
|
8
|
-
"
|
|
8
|
+
"entry": { "type": "http", "handler": "gen-video" },
|
|
9
9
|
"parameters": {
|
|
10
10
|
"type": "object",
|
|
11
11
|
"properties": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"first_frame": { "type": "string", "description": "First-frame image path or URL" },
|
|
18
18
|
"last_frame": { "type": "string", "description": "Last-frame image path or URL" },
|
|
19
19
|
"reference": { "type": "string", "description": "Reference image (Veo only)" },
|
|
20
|
-
"generate_audio": { "type": "boolean", "description": "Generate native audio" }
|
|
20
|
+
"generate_audio": { "type": "boolean", "description": "Generate native audio" },
|
|
21
|
+
"json_output": { "type": "boolean", "description": "Emit a JSON result ({ url }) instead of human-readable output" }
|
|
21
22
|
},
|
|
22
23
|
"required": ["prompt"]
|
|
23
24
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"skillName": "gen-video",
|
|
3
3
|
"repoName": "agent-skill-media-maker",
|
|
4
4
|
"skillId": "339",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "V7",
|
|
6
6
|
"skillDescription": "AI 生视频技能,根据文字描述生成素材视频(调用 ab-api /model/genVideo,支持 Seedance 与 Veo)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- AI 生视频、文生视频、文字生成视频、生成一段视频、AI 制作视频\n- 使用 doubao / 豆包 / seedance、Veo、Google 等生成视频\n- 用户提供视频提示词并希望生成视频\n- 图生视频、首帧生成视频、参考图生成视频\n\n即使用户没有明确说「使用 AI」,只要他们想要根据描述生成视频,也要使用本 skill。"
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ There is no skill-local env file — the executing process inherits the system e
|
|
|
29
29
|
| Env var | Description | Default |
|
|
30
30
|
|---------|-------------|---------|
|
|
31
31
|
| `PRIV_TOKEN` | Tianyan token; `--priv-token` overrides | none |
|
|
32
|
-
| `MM_API_BASE_URL` | API root |
|
|
32
|
+
| `MM_API_BASE_URL` | API root; `--api-base-url` overrides | `http://localhost:2999/api` |
|
|
33
33
|
| `AGENT_NAME` | Optional `x-invoke-agent` header | none |
|
|
34
34
|
|
|
35
35
|
## Operations
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"skillName": "gen-voice",
|
|
3
3
|
"repoName": "agent-skill-media-maker",
|
|
4
4
|
"skillId": "338",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "V6",
|
|
6
6
|
"skillDescription": "语音合成(TTS)技能,将文字转为语音音频(调用 ab-api /tool/minimaxT2aV2,基于 Minimax TTS)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- AI 配音、语音合成、文字转语音、TTS、文本转音频、生成语音\n- 使用 minimax 语音合成\n- 用户想要将一段文字朗读出来、生成音频\n\n即使用户没有明确说「使用 AI」,只要他们想要将文字转为语音,也要使用本 skill。"
|
|
7
7
|
}
|
|
@@ -79,7 +79,7 @@ python3 <SkillDir>/scripts/prepare_video_assets.py \
|
|
|
79
79
|
--template-id html-slide
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
`--template-id` automatically calls template-
|
|
82
|
+
`--template-id` automatically calls template-registry internally; or pass `--binding my-video.binding.json` if you have a pre-generated binding.
|
|
83
83
|
|
|
84
84
|
## Image-URL handling (agent rules)
|
|
85
85
|
|
|
@@ -189,4 +189,4 @@ The Asset Resolver handles each `AssetRef` in this order:
|
|
|
189
189
|
## See also
|
|
190
190
|
|
|
191
191
|
- **`render_video`** — the Phase 3 skill that consumes this skill's `job_id` and produces the final video.
|
|
192
|
-
- **`template-
|
|
192
|
+
- **`template-registry`** — Lists available templates. Called internally by this skill when `--template-id` is provided.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"dsl_json": { "type": "string", "description": "DSL JSON as an inline string (preferred — no disk write needed; required for multi-user concurrent flows). Pass the full DSL JSON, or — when a gen_script skeleton is cached in the session — a minimal JSON with only scenes[].audio.narration.text overrides (the agent layer merges narration onto the cached skeleton)." },
|
|
13
13
|
"dsl": { "type": "string", "description": "DSL file path (legacy fallback; prefer dsl_json inline)." },
|
|
14
|
-
"template_id": { "type": "string", "description": "Template id. When provided, the script invokes template-
|
|
14
|
+
"template_id": { "type": "string", "description": "Template id. When provided, the script invokes template-registry internally; no separate binding step is needed." },
|
|
15
15
|
"binding_json": { "type": "string", "description": "TemplateBinding JSON as an inline string (alternative to template_id; no file needed)." },
|
|
16
16
|
"binding": { "type": "string", "description": "TemplateBinding file path (optional; auto-generated when template_id is provided)." },
|
|
17
17
|
"save_job": { "type": "boolean", "description": "Persist the RenderPlan to the database (default true). On success the stdout contains '📦 render job jobId: N'. Auto-degrades to false when PRIV_TOKEN is missing, falling back to file mode. Pass false to opt out explicitly." },
|
|
@@ -38,17 +38,17 @@ from datetime import datetime, timezone
|
|
|
38
38
|
from typing import Optional
|
|
39
39
|
|
|
40
40
|
# ── Cross-skill dependency ────────────────────────────────────────────────
|
|
41
|
-
# Reach into `skills/template-
|
|
41
|
+
# Reach into `skills/template-registry/` — that directory is the de-facto home
|
|
42
42
|
# for shared Python code in ab-skill (timeline-compilation, registry loader,
|
|
43
|
-
# render-job HTTP client, etc.). Naming it `_SHARED_LIB_DIR`
|
|
44
|
-
#
|
|
45
|
-
#
|
|
43
|
+
# render-job HTTP client, etc.). Naming it `_SHARED_LIB_DIR` reflects its
|
|
44
|
+
# actual role: it hosts much more than template lookup (see AGENTS.md
|
|
45
|
+
# "skills/template-registry/scripts/" note).
|
|
46
46
|
#
|
|
47
47
|
# If signatures of the functions below change, also update:
|
|
48
|
-
# - skills/template-
|
|
48
|
+
# - skills/template-registry/video_dsl/runtime/timeline_compiler.py (the source)
|
|
49
49
|
# - any other caller discoverable via `grep -r "split_subtitle\|segment_narration"`
|
|
50
50
|
# ───────────────────────────────────────────────────────────────────────────
|
|
51
|
-
_SHARED_LIB_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "template-
|
|
51
|
+
_SHARED_LIB_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "template-registry")
|
|
52
52
|
# Single sys.path setup for both cross-skill import surfaces of the shared lib:
|
|
53
53
|
# - <shared> for `video_dsl.runtime.*`
|
|
54
54
|
# - <shared>/scripts for `registry_loader`, `match_template`,
|
|
@@ -1779,7 +1779,7 @@ def auto_bind_template(dsl: dict, template_id: str) -> dict:
|
|
|
1779
1779
|
"""Auto-generate TemplateBinding from DSL + template-id by importing
|
|
1780
1780
|
match_template.py's binding logic. Eliminates the need for a separate
|
|
1781
1781
|
match_template.py invocation step."""
|
|
1782
|
-
# template-
|
|
1782
|
+
# template-registry/scripts is on sys.path via the module-top setup.
|
|
1783
1783
|
try:
|
|
1784
1784
|
import match_template
|
|
1785
1785
|
except ImportError as e:
|
|
@@ -1885,7 +1885,7 @@ Examples:
|
|
|
1885
1885
|
if not private_token:
|
|
1886
1886
|
LogPrint("❌ --job-id mode requires PRIV_TOKEN or --priv-token", file=sys.stderr)
|
|
1887
1887
|
sys.exit(1)
|
|
1888
|
-
# render_job_client lives in skills/template-
|
|
1888
|
+
# render_job_client lives in skills/template-registry/scripts/ (the shared
|
|
1889
1889
|
# location for cross-skill helpers); it is already on sys.path via the
|
|
1890
1890
|
# module-top setup.
|
|
1891
1891
|
from render_job_client import get_plan as rjc_get_plan
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# template-
|
|
1
|
+
# template-registry
|
|
2
2
|
|
|
3
3
|
CLI 暴露面是「列出可用模板」(`--list-templates`)。把 Video DSL 场景绑到具体模板 / 生成 TemplateBinding 的 Python 逻辑由本 skill 提供为**库**(`scripts/match_template.py`),被 `render-video` / `prepare-video-assets` 通过 `sys.path` 内联 import,**没有独立 CLI**。
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ ab-api 响应包装格式 `{code, msg, data}` 由 `registry_loader._fetch_http`
|
|
|
20
20
|
|
|
21
21
|
## 新增模板工作流
|
|
22
22
|
|
|
23
|
-
新增模板**不需要改 ab-skill / template-
|
|
23
|
+
新增模板**不需要改 ab-skill / template-registry 代码**:
|
|
24
24
|
|
|
25
25
|
1. 在 template-library 仓库定义新模板(`template.json` + 组件代码)。
|
|
26
26
|
2. template-library CI 校验 schema + 契约。
|
|
@@ -50,13 +50,13 @@ python3 <SkillDir>/scripts/check_contracts.py
|
|
|
50
50
|
| 模块 | 谁在用 | 作用 |
|
|
51
51
|
|---|---|---|
|
|
52
52
|
| `template_paths.py` | registry_loader / template_binder / gen-script / check_contracts | 统一计算 monorepo / template-library 路径,代替 4 个 caller 各自数 `..` |
|
|
53
|
-
| `registry_loader.py` | template-
|
|
53
|
+
| `registry_loader.py` | template-registry / match_template / render-video / gen-script / dsl_validator | 加载 registry(HTTP + cache + file) |
|
|
54
54
|
| `match_template.py` | render-video(`auto_bind_template`) | DSL → TemplateBinding 算法 |
|
|
55
55
|
| `render_job_client.py` | render-video / export-jianying | ab-api renderJob HTTP 客户端 |
|
|
56
56
|
| `check_contracts.py` | 维护脚本 | template-library ↔ remotion-renderer 契约校验 |
|
|
57
57
|
| `sync_registry.py` | 维护脚本 | 把 registry 摘要落盘供 LLM prompt 使用 |
|
|
58
58
|
|
|
59
|
-
sibling skill 通过 `sys.path.insert(0, "<…>/template-
|
|
59
|
+
sibling skill 通过 `sys.path.insert(0, "<…>/template-registry/scripts")` 然后直接 `import` 模块名,模式见 `render_video.py` 顶部的"Single sys.path setup"段。
|
|
60
60
|
|
|
61
61
|
## 详细使用说明
|
|
62
62
|
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: template-
|
|
2
|
+
name: template-registry
|
|
3
3
|
description: |
|
|
4
|
-
Video-template registry
|
|
4
|
+
Video-template registry skill. Stores every video-template definition and lists the available templates (templateId / name / aspect ratio / style tags).
|
|
5
5
|
|
|
6
6
|
Use this skill as soon as the user mentions any of these intents:
|
|
7
7
|
- View available templates / list every template
|
|
8
|
-
- Bind a template to a DSL (a template-id must be supplied)
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Note: DSL→TemplateBinding is no longer a separate exposed step — once prepare_video_assets receives a template_id it builds the binding internally.
|
|
11
10
|
triggers:
|
|
12
11
|
- View available templates / list every template
|
|
13
|
-
- Bind a template to a DSL (a template-id must be supplied)
|
|
14
|
-
- Agent has a Video DSL and needs a TemplateBinding
|
|
15
12
|
---
|
|
16
13
|
|
|
17
14
|
# Video Template Registry & Binding Skill
|
|
@@ -28,7 +25,7 @@ Stores every video-template definition, loads a template by **template-id**, and
|
|
|
28
25
|
|
|
29
26
|
Template metadata lives in the standalone **template-library** monorepo and ships via the `@ab-templates/metadata` package.
|
|
30
27
|
|
|
31
|
-
template-
|
|
28
|
+
template-registry reads `template-library/packages/metadata/registry.json` to load every template definition (with the full slotMapping, compositions, etc.).
|
|
32
29
|
|
|
33
30
|
```
|
|
34
31
|
template-library/packages/
|
|
@@ -76,11 +73,11 @@ Resolution order (see `scripts/registry_loader.py` for the canonical implementat
|
|
|
76
73
|
|
|
77
74
|
## Steps
|
|
78
75
|
|
|
79
|
-
> This skill is
|
|
76
|
+
> This skill is a Python skill of the ab-skill CLI (`entry.type: python` → `scripts/list_templates.py`). The agent tool name `template_registry` is the only entry; locally reproduce via `ab-skill template-registry --list-templates`. The list command delegates to `scripts/registry_loader.py` — the same loader (with caching + stable/beta gating) that `render-video` and `gen-script` import in-process, so there is a single registry-reading implementation.
|
|
80
77
|
>
|
|
81
|
-
> The Python binding logic that maps DSL → TemplateBinding lives in `scripts/match_template.py` but is **
|
|
78
|
+
> The Python binding logic that maps DSL → TemplateBinding lives in `scripts/match_template.py` but is **not exposed as a CLI** — it is only consumed as a Python library by `render-video`'s `render_video.py` via `import match_template`.
|
|
82
79
|
|
|
83
|
-
1. **List available templates**: run `ab-skill template-
|
|
80
|
+
1. **List available templates**: run `ab-skill template-registry --list-templates` to view the templates in the registry along with their supported aspect ratios / style tags, and decide which `templateId` to pick.
|
|
84
81
|
2. **Write the DSL**: when generating the Video DSL, put the chosen `templateId` into `meta.templateId` (the canonical location). Use `meta.templateVariant` / `renderHints.templateVariant` to explicitly select a variant. The legacy `renderHints.templatePreference[0]` is still tolerated by `match_template.py` and `dsl_validator._pick_template_id` during transition, but new authors should write `meta.templateId`.
|
|
85
82
|
3. **Produce the TemplateBinding**: there is no standalone CLI for DSL → TemplateBinding; `prepare_video_assets` calls `match_template.build_binding(template, dsl)` inline during the asset-resolution pipeline and embeds the binding into the RenderPlan it hands to the renderer — no separate `*.binding.json` file is written.
|
|
86
83
|
|
|
@@ -89,7 +86,7 @@ Resolution order (see `scripts/registry_loader.py` for the canonical implementat
|
|
|
89
86
|
### List available templates
|
|
90
87
|
|
|
91
88
|
```bash
|
|
92
|
-
ab-skill template-
|
|
89
|
+
ab-skill template-registry --list-templates
|
|
93
90
|
```
|
|
94
91
|
|
|
95
92
|
### Sync the registry cache (optional, used for offline / LLM prompt)
|
|
@@ -123,7 +120,12 @@ print(json.dumps(binding, ensure_ascii=False, indent=2))
|
|
|
123
120
|
|
|
124
121
|
| Flag | Description | Default |
|
|
125
122
|
|------|-------------|---------|
|
|
126
|
-
| `--list-templates` | List every available template
|
|
123
|
+
| `--list-templates` | List every available template (currently the only CLI verb). | — |
|
|
124
|
+
| `--filter-tag` | Keep only templates whose `styleTags` match this substring (case-insensitive). | none |
|
|
125
|
+
| `--filter-aspect` | Keep only templates declaring this aspect ratio (e.g. `9:16`). | none |
|
|
126
|
+
| `--filter-language` | Keep only templates whose `contentLanguage` includes this code (`zh`/`en`); language-agnostic templates always show. | none |
|
|
127
|
+
| `--include-beta` | Also show `status: beta` templates (same effect as `ENABLE_BETA_TEMPLATES=1`). | off |
|
|
128
|
+
| `--json-output` | Emit `{ "templates": [...] }` instead of the table. | off |
|
|
127
129
|
|
|
128
130
|
## Props extraction rules
|
|
129
131
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
template-registry CLI — list available video templates.
|
|
4
|
+
|
|
5
|
+
Single source of truth: registry loading, caching and stable/beta status
|
|
6
|
+
gating all live in ``registry_loader.py`` (the same module ``render-video``
|
|
7
|
+
and ``gen-script`` import in-process). This entry point only adds the CLI
|
|
8
|
+
surface — flag parsing, tag/aspect/language filtering, and table/JSON
|
|
9
|
+
rendering — that used to be re-implemented in TypeScript
|
|
10
|
+
(``src/handlers/template-bind.ts``). Deleting that handler removes the
|
|
11
|
+
TS↔Python duplication; this is now the only place the list verb is realized.
|
|
12
|
+
|
|
13
|
+
The DSL → TemplateBinding logic stays in ``match_template.py`` and is invoked
|
|
14
|
+
in-process by ``render-video``; it is intentionally NOT exposed as a CLI verb.
|
|
15
|
+
|
|
16
|
+
Flags:
|
|
17
|
+
--list-templates (accepted; listing is the only verb)
|
|
18
|
+
--filter-tag <substr> keep templates whose styleTags match
|
|
19
|
+
--filter-aspect <ratio> keep templates supporting this aspect ratio
|
|
20
|
+
--filter-language <zh|en|...> keep templates tagged with this content lang
|
|
21
|
+
(templates with no contentLanguage are kept)
|
|
22
|
+
--include-beta also show beta templates (else stable-only)
|
|
23
|
+
--json-output emit {"templates": [...]} instead of a table
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from __future__ import annotations
|
|
27
|
+
|
|
28
|
+
import argparse
|
|
29
|
+
import json
|
|
30
|
+
import os
|
|
31
|
+
import sys
|
|
32
|
+
|
|
33
|
+
# When run as `python3 <skillDir>/scripts/list_templates.py`, this script's own
|
|
34
|
+
# directory is sys.path[0], so the sibling shared modules import directly.
|
|
35
|
+
from registry_loader import list_templates as load_visible_templates # noqa: E402
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _matches(tpl: dict, tag: str | None, aspect: str | None, language: str | None) -> bool:
|
|
39
|
+
if tag:
|
|
40
|
+
needle = tag.lower()
|
|
41
|
+
tags = [str(t).lower() for t in (tpl.get("styleTags") or [])]
|
|
42
|
+
if not any(needle in t or t in needle for t in tags):
|
|
43
|
+
return False
|
|
44
|
+
if aspect:
|
|
45
|
+
want = aspect.lower()
|
|
46
|
+
ratios = [str(r).lower() for r in (tpl.get("supportedAspectRatios") or [])]
|
|
47
|
+
if want not in ratios:
|
|
48
|
+
return False
|
|
49
|
+
if language:
|
|
50
|
+
# Unknown language (absent/empty) is never excluded by a language filter.
|
|
51
|
+
langs = [str(l).lower() for l in (tpl.get("contentLanguage") or [])]
|
|
52
|
+
if langs and language.lower() not in langs:
|
|
53
|
+
return False
|
|
54
|
+
return True
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _status_of(tpl: dict) -> str:
|
|
58
|
+
raw = tpl.get("status")
|
|
59
|
+
if isinstance(raw, str) and raw.strip():
|
|
60
|
+
return raw.strip().lower()
|
|
61
|
+
return "stable"
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def main() -> None:
|
|
65
|
+
ap = argparse.ArgumentParser(
|
|
66
|
+
description="List available video templates from the registry.",
|
|
67
|
+
)
|
|
68
|
+
ap.add_argument("--list-templates", action="store_true",
|
|
69
|
+
help="List every available template (the only CLI verb).")
|
|
70
|
+
ap.add_argument("--filter-tag", help="Keep templates whose styleTags match this substring.")
|
|
71
|
+
ap.add_argument("--filter-aspect", help="Keep templates supporting this aspect ratio (e.g. 9:16).")
|
|
72
|
+
ap.add_argument("--filter-language", help="Keep templates tagged with this content language (zh|en|...).")
|
|
73
|
+
ap.add_argument("--include-beta", action="store_true", help="Also show beta templates (default: stable only).")
|
|
74
|
+
ap.add_argument("--json-output", action="store_true", help='Emit {"templates": [...]} JSON instead of a table.')
|
|
75
|
+
args = ap.parse_args()
|
|
76
|
+
|
|
77
|
+
# --include-beta flips registry_loader's documented status gate via env, so
|
|
78
|
+
# the CLI and in-process callers share one gating implementation.
|
|
79
|
+
if args.include_beta:
|
|
80
|
+
os.environ["ENABLE_BETA_TEMPLATES"] = "1"
|
|
81
|
+
|
|
82
|
+
try:
|
|
83
|
+
templates = load_visible_templates()
|
|
84
|
+
except RuntimeError as exc:
|
|
85
|
+
print(f"❌ {exc}", file=sys.stderr)
|
|
86
|
+
sys.exit(1)
|
|
87
|
+
|
|
88
|
+
visible = [
|
|
89
|
+
t for t in templates
|
|
90
|
+
if _matches(t, args.filter_tag, args.filter_aspect, args.filter_language)
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
if args.json_output:
|
|
94
|
+
print(json.dumps({"templates": visible}, ensure_ascii=False))
|
|
95
|
+
return
|
|
96
|
+
|
|
97
|
+
if not visible:
|
|
98
|
+
print(
|
|
99
|
+
"⚠️ No templates match the current filters "
|
|
100
|
+
"(check --include-beta or relax --filter-*).",
|
|
101
|
+
)
|
|
102
|
+
return
|
|
103
|
+
|
|
104
|
+
header = (
|
|
105
|
+
f"\n{'Template ID':<22} {'Name':<18} {'Aspect':<12} "
|
|
106
|
+
f"{'Lang':<8} {'Status':<8} Tags / LLM hint"
|
|
107
|
+
)
|
|
108
|
+
print(header)
|
|
109
|
+
print(
|
|
110
|
+
f"{'-' * 22} {'-' * 18} {'-' * 12} {'-' * 8} {'-' * 8} {'-' * 60}"
|
|
111
|
+
)
|
|
112
|
+
for tpl in visible:
|
|
113
|
+
tid = str(tpl.get("templateId", ""))[:22].ljust(22)
|
|
114
|
+
name = str(tpl.get("name", ""))[:18].ljust(18)
|
|
115
|
+
ratios = ",".join(tpl.get("supportedAspectRatios") or [])[:12].ljust(12)
|
|
116
|
+
lang = (",".join(tpl.get("contentLanguage") or []) or "-")[:8].ljust(8)
|
|
117
|
+
status = _status_of(tpl).ljust(8)
|
|
118
|
+
tags = ", ".join((tpl.get("styleTags") or [])[:5])
|
|
119
|
+
print(f"{tid} {name} {ratios} {lang} {status} {tags}")
|
|
120
|
+
hint = tpl.get("llmHint")
|
|
121
|
+
if hint:
|
|
122
|
+
hint = hint if len(hint) <= 200 else hint[:197] + "..."
|
|
123
|
+
print(f"{' ' * 22} ↳ {hint}")
|
|
124
|
+
|
|
125
|
+
print(f"\n{len(visible)} template(s) shown")
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
if __name__ == "__main__":
|
|
129
|
+
main()
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""
|
|
2
|
-
template-
|
|
2
|
+
template-registry 库模块 — DSL → TemplateBinding 的纯函数实现。
|
|
3
3
|
|
|
4
4
|
仅作为 Python library 被 render-video 的 render_video.py / gen-script 的
|
|
5
5
|
gen_script.py 通过 `sys.path.insert` 后 `import match_template` 引入;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
对外不暴露 binding CLI。template-registry skill 的 `--list-templates` 入口由
|
|
7
|
+
sibling 的 `list_templates.py` 实现(它复用 registry_loader 的统一加载 +
|
|
8
|
+
状态门控),两者共享同一份 registry 读取逻辑,无 TS 侧重复实现。
|
|
8
9
|
|
|
9
10
|
提供的公共接口:
|
|
10
11
|
load_registry() → list[dict] 模板列表
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
模板 registry 加载器 - 统一抽象本地文件 / HTTP API 两种数据源。
|
|
4
4
|
|
|
5
5
|
为什么独立成一个模块:
|
|
6
|
-
template-
|
|
6
|
+
template-registry、render-video 等多个 skill 都要读 registry,集中在一处便于:
|
|
7
7
|
- 缓存策略一致(HTTP 拉取 5 分钟 TTL + ETag 复用)
|
|
8
8
|
- 解析顺序一致(环境变量 → 本地文件 → monorepo 回退)
|
|
9
9
|
- 错误降级一致(HTTP 故障时复用上一次缓存)
|
|
@@ -6,9 +6,9 @@ Before this file landed, every caller that needed to reach into the
|
|
|
6
6
|
monorepo's ``template-library/`` from inside ``apps/ab-skill/`` had to count
|
|
7
7
|
``..`` segments by hand. The depth differs per call site:
|
|
8
8
|
|
|
9
|
-
skills/template-
|
|
10
|
-
skills/template-
|
|
11
|
-
skills/template-
|
|
9
|
+
skills/template-registry/scripts/registry_loader.py → 5 × ".."
|
|
10
|
+
skills/template-registry/scripts/check_contracts.py → 3 × ".."
|
|
11
|
+
skills/template-registry/video_dsl/runtime/template_binder → 6 × ".."
|
|
12
12
|
skills/gen-script/scripts/gen_script.py → 5 × ".."
|
|
13
13
|
skills/render-video/scripts/render_video.py → 4 × ".."
|
|
14
14
|
|
|
@@ -17,9 +17,9 @@ move silently breaks one site without touching the others. This module
|
|
|
17
17
|
computes the monorepo root **once** from its own location and exposes
|
|
18
18
|
helpers so callers no longer count.
|
|
19
19
|
|
|
20
|
-
All sibling skills
|
|
21
|
-
``
|
|
22
|
-
|
|
20
|
+
All sibling skills (including the ``list_templates.py`` CLI entry, via
|
|
21
|
+
``registry_loader``) go through these helpers, so the monorepo-root
|
|
22
|
+
computation lives in exactly one place.
|
|
23
23
|
"""
|
|
24
24
|
from __future__ import annotations
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ from typing import Optional
|
|
|
29
29
|
__all__ = ["monorepo_root", "monorepo_registry_path", "monorepo_template_src_dir"]
|
|
30
30
|
|
|
31
31
|
# This file lives at:
|
|
32
|
-
# <repo>/apps/ab-skill/skills/template-
|
|
32
|
+
# <repo>/apps/ab-skill/skills/template-registry/scripts/template_paths.py
|
|
33
33
|
# So the monorepo root is 5 levels up.
|
|
34
34
|
_HERE = os.path.dirname(os.path.abspath(__file__))
|
|
35
35
|
_REPO_ROOT = os.path.normpath(os.path.join(_HERE, "..", "..", "..", "..", ".."))
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "template-
|
|
3
|
-
"toolName": "
|
|
2
|
+
"name": "template-registry",
|
|
3
|
+
"toolName": "template_registry",
|
|
4
4
|
"tier": "orchestration",
|
|
5
|
-
"title": "Template Registry
|
|
5
|
+
"title": "Video Template Registry",
|
|
6
6
|
"description": "List all available video templates (templateId / name / aspect ratio / style tags). Template-to-DSL binding is no longer exposed as a separate step — once prepare_video_assets receives a template_id it runs the full DSL→RenderPlan pipeline internally.",
|
|
7
7
|
"envVars": ["PRIV_TOKEN", "VIDEO_TEMPLATE_REGISTRY", "VIDEO_TEMPLATE_REGISTRY_URL", "VIDEO_TEMPLATE_REGISTRY_HTTP_METHOD"],
|
|
8
|
-
"entry": { "type": "
|
|
8
|
+
"entry": { "type": "python", "scriptPath": "scripts/list_templates.py" },
|
|
9
9
|
"parameters": {
|
|
10
10
|
"type": "object",
|
|
11
11
|
"properties": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"filter_tag": { "type": "string", "description": "Show only templates whose styleTags contain (or are contained in) this string. Case-insensitive. E.g. 'tech' / '科普' / 'walkthrough'." },
|
|
14
14
|
"filter_aspect": { "type": "string", "description": "Show only templates that declare this aspect ratio. E.g. '9:16' / '16:9' / '1:1'." },
|
|
15
15
|
"filter_language": { "type": "string", "description": "Show only templates whose contentLanguage includes this code ('zh' or 'en'). Templates with no declared language are always shown (treated as language-agnostic)." },
|
|
16
|
-
"include_beta": { "type": "boolean", "description": "Also list templates with status='beta'. Default off (only 'stable' shows). The ENABLE_BETA_TEMPLATES env var has the same effect process-wide." }
|
|
16
|
+
"include_beta": { "type": "boolean", "description": "Also list templates with status='beta'. Default off (only 'stable' shows). The ENABLE_BETA_TEMPLATES env var has the same effect process-wide." },
|
|
17
|
+
"json_output": { "type": "boolean", "description": "Emit a JSON result ({ templates: [...] }) instead of the human-readable table." }
|
|
17
18
|
},
|
|
18
19
|
"required": []
|
|
19
20
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skillName": "template-registry",
|
|
3
|
+
"repoName": "agent-skill-media-maker",
|
|
4
|
+
"skillId": "475",
|
|
5
|
+
"version": "V12",
|
|
6
|
+
"skillDescription": "视频模板仓库(列表查询)。存储所有视频模板定义,对外只暴露「列出可用模板」一个能力;DSL→TemplateBinding 的绑定逻辑已内嵌进 prepare-video-assets,不再作为独立步骤暴露。同时是跨 skill 共享 Python 库(registry_loader / match_template / template_paths / video_dsl 等)的存放位置。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 查看可用模板、列出所有模板"
|
|
7
|
+
}
|
|
@@ -47,7 +47,7 @@ video_dsl/
|
|
|
47
47
|
```
|
|
48
48
|
主题 → [gen-script] → Video DSL
|
|
49
49
|
↓
|
|
50
|
-
[template-
|
|
50
|
+
[template-registry] → TemplateBinding
|
|
51
51
|
↓
|
|
52
52
|
[render-video] → RenderPlan → MP4 / 剪映草稿
|
|
53
53
|
```
|
|
@@ -67,7 +67,7 @@ video_dsl/
|
|
|
67
67
|
| 模块 | 职责 | 被谁调用 |
|
|
68
68
|
|------|------|----------|
|
|
69
69
|
| `dsl_validator.py` | DSL JSON Schema 校验与参数标准化 | gen-script、render-video |
|
|
70
|
-
| `template_binder.py` | 将 DSL scene 映射到模板 slot,生成 TemplateBinding(从 @ab-templates/metadata 读取模板定义) | template-
|
|
70
|
+
| `template_binder.py` | 将 DSL scene 映射到模板 slot,生成 TemplateBinding(从 @ab-templates/metadata 读取模板定义) | template-registry |
|
|
71
71
|
| `timeline_compiler.py` | 帧号计算、字幕切片(`split_subtitle`)、旁白分段(`segment_narration`) | render-video(跨 skill import) |
|
|
72
72
|
| `asset_adapter.py` | 素材格式适配 | render-video |
|
|
73
73
|
| `prompt_enhancer.py` | 图片 prompt 增强 | render-video |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Package marker for ``video_dsl.runtime`` — kept intentionally empty.
|
|
2
2
|
|
|
3
3
|
This file exists so ``from video_dsl.runtime.<mod> import …`` resolves when
|
|
4
|
-
``skills/template-
|
|
4
|
+
``skills/template-registry/`` is on sys.path (the pattern used by render-video
|
|
5
5
|
and gen-script). Public modules:
|
|
6
6
|
|
|
7
7
|
- timeline_compiler : DSL → Remotion frame-axis timeline + subtitle splits
|