@remixmate/cli 0.1.0 → 0.1.2

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.
Files changed (126) hide show
  1. package/README.md +100 -83
  2. package/README.zh-CN.md +183 -0
  3. package/dist/handlers/gen-digital-human.d.ts +12 -0
  4. package/dist/handlers/gen-digital-human.js +157 -0
  5. package/dist/handlers/gen-image.js +5 -41
  6. package/dist/handlers/gen-video.d.ts +18 -0
  7. package/dist/handlers/gen-video.js +153 -0
  8. package/dist/handlers/gen-voice.js +2 -12
  9. package/dist/handlers/index.js +4 -2
  10. package/dist/handlers/shared.d.ts +26 -0
  11. package/dist/handlers/shared.js +66 -0
  12. package/dist/http.d.ts +4 -2
  13. package/dist/http.js +5 -3
  14. package/dist/manifest.json +38 -24
  15. package/dist/registry.d.ts +5 -16
  16. package/dist/registry.js +11 -17
  17. package/dist/skill-schema.d.ts +65 -0
  18. package/dist/skill-schema.js +53 -0
  19. package/package.json +5 -4
  20. package/skills/export-jianying/scripts/gen_jianying_draft.py +4 -4
  21. package/skills/export-jianying/skill.json +1 -0
  22. package/skills/gen-digital-human/SKILL.md +23 -46
  23. package/skills/gen-digital-human/skill.json +4 -2
  24. package/skills/gen-digital-human/version.json +1 -1
  25. package/skills/gen-image/SKILL.md +2 -2
  26. package/skills/gen-image/skill.json +3 -1
  27. package/skills/gen-image/version.json +1 -1
  28. package/skills/gen-script/SKILL.md +13 -13
  29. package/skills/gen-script/scripts/gen_script.py +50 -12
  30. package/skills/gen-script/skill.json +3 -1
  31. package/skills/gen-video/SKILL.md +22 -33
  32. package/skills/gen-video/skill.json +4 -2
  33. package/skills/gen-video/version.json +1 -1
  34. package/skills/gen-voice/SKILL.md +1 -1
  35. package/skills/gen-voice/skill.json +1 -0
  36. package/skills/gen-voice/version.json +1 -1
  37. package/skills/prepare-video-assets/SKILL.md +2 -2
  38. package/skills/prepare-video-assets/skill.json +2 -1
  39. package/skills/render-video/scripts/render_video.py +8 -8
  40. package/skills/render-video/skill.json +1 -0
  41. package/skills/{template-bind → template-registry}/README.md +4 -4
  42. package/skills/{template-bind → template-registry}/SKILL.md +14 -12
  43. package/skills/template-registry/scripts/list_templates.py +214 -0
  44. package/skills/{template-bind → template-registry}/scripts/match_template.py +4 -3
  45. package/skills/{template-bind → template-registry}/scripts/registry_loader.py +1 -1
  46. package/skills/{template-bind → template-registry}/scripts/template_paths.py +7 -7
  47. package/skills/{template-bind → template-registry}/skill.json +8 -5
  48. package/skills/template-registry/version.json +7 -0
  49. package/skills/{template-bind → template-registry}/video_dsl/README.md +2 -2
  50. package/skills/{template-bind → template-registry}/video_dsl/runtime/__init__.py +1 -1
  51. package/skills/video-parser/SKILL.md +47 -160
  52. package/skills/video-parser/skill.json +4 -4
  53. package/skills/video-parser/version.json +1 -1
  54. package/skills/web-capture/SKILL.md +407 -116
  55. package/skills/web-capture/scripts/_media_screenshot/__init__.py +21 -0
  56. package/skills/web-capture/scripts/_media_screenshot/bootstrap.py +34 -0
  57. package/skills/web-capture/scripts/_media_screenshot/browser.py +86 -0
  58. package/skills/web-capture/scripts/_media_screenshot/cli_args.py +111 -0
  59. package/skills/web-capture/scripts/_media_screenshot/js/arrow.js +86 -0
  60. package/skills/web-capture/scripts/_media_screenshot/js/caption.js +27 -0
  61. package/skills/web-capture/scripts/_media_screenshot/js/clear_overlay.js +5 -0
  62. package/skills/web-capture/scripts/_media_screenshot/js/cursor_bootstrap.js +26 -0
  63. package/skills/web-capture/scripts/_media_screenshot/js/cursor_hide.js +6 -0
  64. package/skills/web-capture/scripts/_media_screenshot/js/cursor_move.js +12 -0
  65. package/skills/web-capture/scripts/_media_screenshot/js/cursor_ripple.js +25 -0
  66. package/skills/web-capture/scripts/_media_screenshot/js/element_zoom.js +72 -0
  67. package/skills/web-capture/scripts/_media_screenshot/js/element_zoom_restore.js +21 -0
  68. package/skills/web-capture/scripts/_media_screenshot/js/fade_out_overlays.js +10 -0
  69. package/skills/web-capture/scripts/_media_screenshot/js/focus.js +38 -0
  70. package/skills/web-capture/scripts/_media_screenshot/js/highlight.js +97 -0
  71. package/skills/web-capture/scripts/_media_screenshot/js/overlay_bootstrap.js +19 -0
  72. package/skills/web-capture/scripts/_media_screenshot/js/page_zoom_in.js +54 -0
  73. package/skills/web-capture/scripts/_media_screenshot/js/page_zoom_out.js +11 -0
  74. package/skills/web-capture/scripts/_media_screenshot/js/page_zoom_restore.js +13 -0
  75. package/skills/web-capture/scripts/_media_screenshot/js/redact.js +33 -0
  76. package/skills/web-capture/scripts/_media_screenshot/js/scroll.js +26 -0
  77. package/skills/web-capture/scripts/_media_screenshot/js/scroll_through.js +18 -0
  78. package/skills/web-capture/scripts/_media_screenshot/js/sequence.js +76 -0
  79. package/skills/web-capture/scripts/_media_screenshot/js/settled_check.js +15 -0
  80. package/skills/web-capture/scripts/_media_screenshot/js/title_card.js +71 -0
  81. package/skills/web-capture/scripts/_media_screenshot/js_loader.py +14 -0
  82. package/skills/web-capture/scripts/_media_screenshot/overlay.py +17 -0
  83. package/skills/web-capture/scripts/_media_screenshot/recording.py +100 -0
  84. package/skills/web-capture/scripts/_media_screenshot/scenes/__init__.py +39 -0
  85. package/skills/web-capture/scripts/_media_screenshot/scenes/arrow.py +50 -0
  86. package/skills/web-capture/scripts/_media_screenshot/scenes/caption.py +20 -0
  87. package/skills/web-capture/scripts/_media_screenshot/scenes/click.py +35 -0
  88. package/skills/web-capture/scripts/_media_screenshot/scenes/code_lines.py +54 -0
  89. package/skills/web-capture/scripts/_media_screenshot/scenes/focus.py +24 -0
  90. package/skills/web-capture/scripts/_media_screenshot/scenes/highlight.py +54 -0
  91. package/skills/web-capture/scripts/_media_screenshot/scenes/hover.py +28 -0
  92. package/skills/web-capture/scripts/_media_screenshot/scenes/redact.py +32 -0
  93. package/skills/web-capture/scripts/_media_screenshot/scenes/scroll.py +32 -0
  94. package/skills/web-capture/scripts/_media_screenshot/scenes/sequence.py +43 -0
  95. package/skills/web-capture/scripts/_media_screenshot/scenes/title_card.py +20 -0
  96. package/skills/web-capture/scripts/_media_screenshot/scenes/type.py +42 -0
  97. package/skills/web-capture/scripts/_media_screenshot/scenes/wait.py +9 -0
  98. package/skills/web-capture/scripts/_media_screenshot/scenes/zoom.py +72 -0
  99. package/skills/web-capture/scripts/_media_screenshot/screenshot.py +166 -0
  100. package/skills/web-capture/scripts/_media_screenshot/storyboard.py +88 -0
  101. package/skills/web-capture/scripts/_media_screenshot/template.py +119 -0
  102. package/skills/web-capture/scripts/_media_screenshot/trim.py +82 -0
  103. package/skills/web-capture/scripts/record.py +186 -0
  104. package/skills/web-capture/scripts/screenshot.py +94 -0
  105. package/skills/web-capture/skill.json +15 -14
  106. package/skills/web-capture/templates/github-code-tour.json +59 -0
  107. package/skills/web-capture/templates/github-readme-tour.json +77 -0
  108. package/skills/web-capture/templates/github-repo-intro.json +74 -0
  109. package/skills/web-capture/version.json +2 -2
  110. package/dist/handlers/template-bind.d.ts +0 -15
  111. package/dist/handlers/template-bind.js +0 -149
  112. package/skills/gen-digital-human/scripts/gen_digital_human_video.py +0 -574
  113. package/skills/gen-video/scripts/gen_video.py +0 -591
  114. package/skills/template-bind/version.json +0 -7
  115. package/skills/web-capture/scripts/web_capture.py +0 -461
  116. /package/skills/{template-bind → template-registry}/scripts/check_contracts.py +0 -0
  117. /package/skills/{template-bind → template-registry}/scripts/render_job_client.py +0 -0
  118. /package/skills/{template-bind → template-registry}/scripts/sync_registry.py +0 -0
  119. /package/skills/{template-bind → template-registry}/video_dsl/runtime/dsl_validator.py +0 -0
  120. /package/skills/{template-bind → template-registry}/video_dsl/runtime/prompt_enhancer.py +0 -0
  121. /package/skills/{template-bind → template-registry}/video_dsl/runtime/template_binder.py +0 -0
  122. /package/skills/{template-bind → template-registry}/video_dsl/runtime/timeline_compiler.py +0 -0
  123. /package/skills/{template-bind → template-registry}/video_dsl/schema/render-plan-v1alpha1.json +0 -0
  124. /package/skills/{template-bind → template-registry}/video_dsl/schema/template-binding-v1alpha1.json +0 -0
  125. /package/skills/{template-bind → template-registry}/video_dsl/schema/template-definition-v1alpha1.json +0 -0
  126. /package/skills/{template-bind → template-registry}/video_dsl/schema/video-dsl-v1alpha1.json +0 -0
@@ -0,0 +1,74 @@
1
+ {
2
+ "_meta": {
3
+ "description": "GitHub 仓库三连介绍:项目名红框高亮 → star 数字页面 zoom-in → README 内容滚动。",
4
+ "params": {
5
+ "repo_url": {
6
+ "required": true,
7
+ "description": "GitHub 仓库完整 URL,如 https://github.com/user/repo"
8
+ },
9
+ "project_label": {
10
+ "default": "项目名称",
11
+ "description": "场景 1 红框旁的标签文字"
12
+ },
13
+ "star_label": {
14
+ "default": "⭐ 这么多人 Star 关注!",
15
+ "description": "场景 2 zoom 时显示的标签文字"
16
+ },
17
+ "highlight_color": {
18
+ "default": "#ff3b30",
19
+ "description": "场景 1 红框颜色"
20
+ },
21
+ "zoom_color": {
22
+ "default": "#ff9500",
23
+ "description": "场景 2 标签颜色"
24
+ },
25
+ "zoom_scale": {
26
+ "default": "2.4",
27
+ "description": "场景 2 页面放大倍数"
28
+ },
29
+ "scroll_duration": {
30
+ "default": "10000",
31
+ "description": "场景 3 README 滚动时长(ms)"
32
+ }
33
+ }
34
+ },
35
+ "url": "{{repo_url}}",
36
+ "viewport": [1440, 900],
37
+ "waitForTimeout": 800,
38
+ "waitForReadySelectors": [
39
+ "article.markdown-body",
40
+ "#repo-stars-counter-star"
41
+ ],
42
+ "settleMs": 1200,
43
+ "transition": { "fadeOutMs": 320, "gapMs": 180 },
44
+ "scenes": [
45
+ {
46
+ "type": "highlight",
47
+ "selector": "strong[itemprop=\"name\"] a",
48
+ "color": "{{highlight_color}}",
49
+ "lineWidth": 5,
50
+ "padding": 10,
51
+ "label": "{{project_label}}",
52
+ "duration": 3000
53
+ },
54
+ {
55
+ "type": "zoom",
56
+ "target": "page",
57
+ "selector": "#repo-stars-counter-star",
58
+ "color": "{{zoom_color}}",
59
+ "scale": "{{zoom_scale}}",
60
+ "rampInMs": 900,
61
+ "holdMs": 2200,
62
+ "rampOutMs": 700,
63
+ "label": "{{star_label}}"
64
+ },
65
+ {
66
+ "type": "scroll",
67
+ "fromSelector": "article.markdown-body",
68
+ "step": 50,
69
+ "interval": 70,
70
+ "duration": "{{scroll_duration}}",
71
+ "holdAtEnd": 800
72
+ }
73
+ ]
74
+ }
@@ -2,6 +2,6 @@
2
2
  "skillName": "web-capture",
3
3
  "repoName": "agent-skill-media-maker",
4
4
  "skillId": "555",
5
- "version": "V2",
6
- "skillDescription": "网页捕获技能,驱动无头浏览器(Playwright)对网页进行截图或滚动录屏,产出 PNG / MP4 素材,供 screen-walkthrough 等模板消费。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 网页截图、网站截图、给某个 URL 截图、整页截图\n- 网页滚动录屏、把网页从上到下滑动录成视频、网页滚动视频\n- GitHub / 官网 / 产品页面的录屏素材、网页演示素材\n\n即使用户没有明确说「Playwright」或「浏览器」,只要他们想要把一个网页地址变成截图或滚动演示视频,也要使用本 skill。"
5
+ "version": "V3",
6
+ "skillDescription": "网页截屏 / 录屏 / 分镜视频技能,基于 Playwright Python,对任意 URL 落盘到本地。支持整页 / 元素 / 区域截屏、固定时长 / 条件触发 / 自动滚动录屏、分镜视频(高亮 / 聚焦 / 放大 / 滚动 / 虚拟光标点击 / 字幕 / 标题卡 / 箭头 / 编号序列 / 打码 / 代码行高亮)以及参数化模板。两个入口脚本:scripts/screenshot.py(截图)与 scripts/record.py(webm 录屏 / storyboard / 模板)。\n\n当用户提到网页截图、整页 / 长截图、元素 / 区域截屏、录屏、滚动录屏、分镜 / storyboard 视频、虚拟光标点击 / 输入 / 悬停演示、加箭头 / 字幕 / 标题卡 / 编号高亮、隐藏或打码敏感信息、代码行高亮、移动端模拟、带登录态截屏 / 录屏等需求时,立即使用本 skill。"
7
7
  }
@@ -1,15 +0,0 @@
1
- /**
2
- * template-bind handler — list available video templates.
3
- *
4
- * The DSL → TemplateBinding logic is intentionally NOT exposed via the CLI;
5
- * it stays inside `skills/template-bind/scripts/match_template.py` and is
6
- * imported in-process by `render-video`. The skill's only CLI surface is
7
- * `--list-templates`, which we re-implement in TS here.
8
- *
9
- * Registry resolution (mirrors skills/template-bind/scripts/registry_loader.py):
10
- * 1. VIDEO_TEMPLATE_REGISTRY — explicit local file
11
- * 2. VIDEO_TEMPLATE_REGISTRY_URL — HTTP API (POST by default, with X-Priv-Token)
12
- * 3. <repo>/template-library/packages/metadata/registry.json — monorepo dev fallback
13
- */
14
- import type { HandlerContext, HandlerInput } from './index.js';
15
- export declare function templateBind(input: HandlerInput, _ctx: HandlerContext): Promise<void>;
@@ -1,149 +0,0 @@
1
- /**
2
- * template-bind handler — list available video templates.
3
- *
4
- * The DSL → TemplateBinding logic is intentionally NOT exposed via the CLI;
5
- * it stays inside `skills/template-bind/scripts/match_template.py` and is
6
- * imported in-process by `render-video`. The skill's only CLI surface is
7
- * `--list-templates`, which we re-implement in TS here.
8
- *
9
- * Registry resolution (mirrors skills/template-bind/scripts/registry_loader.py):
10
- * 1. VIDEO_TEMPLATE_REGISTRY — explicit local file
11
- * 2. VIDEO_TEMPLATE_REGISTRY_URL — HTTP API (POST by default, with X-Priv-Token)
12
- * 3. <repo>/template-library/packages/metadata/registry.json — monorepo dev fallback
13
- */
14
- import { existsSync, readFileSync } from 'node:fs';
15
- import path from 'node:path';
16
- import { fileURLToPath } from 'node:url';
17
- import { SkillError } from '../http.js';
18
- const __filename = fileURLToPath(import.meta.url);
19
- function monorepoFallbackPath() {
20
- // <ab-skill>/dist/handlers/ → up 4 → repo root
21
- const here = path.dirname(__filename);
22
- return path.resolve(here, '..', '..', '..', '..', 'template-library', 'packages', 'metadata', 'registry.json');
23
- }
24
- function loadFromFile(filePath) {
25
- const raw = readFileSync(filePath, 'utf-8');
26
- return JSON.parse(raw);
27
- }
28
- async function loadFromHttp(url) {
29
- const method = (process.env.VIDEO_TEMPLATE_REGISTRY_HTTP_METHOD ?? 'POST').toUpperCase();
30
- const headers = { Accept: 'application/json' };
31
- if (method === 'POST')
32
- headers['Content-Type'] = 'application/json';
33
- const token = (process.env.PRIV_TOKEN ?? '').trim();
34
- if (token)
35
- headers['X-Priv-Token'] = token;
36
- const body = method === 'POST' ? '{}' : undefined;
37
- const resp = await fetch(url, { method, headers, body });
38
- if (!resp.ok) {
39
- throw new SkillError(`registry HTTP failed: ${resp.status} ${await resp.text()}`);
40
- }
41
- const parsed = (await resp.json());
42
- if ('code' in parsed && 'data' in parsed) {
43
- if (parsed.code !== 0 && parsed.code !== '0') {
44
- throw new SkillError(`registry HTTP business error: code=${parsed.code} msg=${parsed.msg ?? ''}`);
45
- }
46
- return parsed.data;
47
- }
48
- return parsed;
49
- }
50
- async function loadRegistry() {
51
- const explicit = (process.env.VIDEO_TEMPLATE_REGISTRY ?? '').trim();
52
- if (explicit) {
53
- process.stderr.write(`[template-bind] using explicit file: ${explicit}\n`);
54
- return loadFromFile(explicit);
55
- }
56
- const url = (process.env.VIDEO_TEMPLATE_REGISTRY_URL ?? '').trim();
57
- if (url) {
58
- process.stderr.write(`[template-bind] using HTTP registry: ${url}\n`);
59
- return loadFromHttp(url);
60
- }
61
- const fallback = monorepoFallbackPath();
62
- if (existsSync(fallback)) {
63
- process.stderr.write(`[template-bind] using monorepo registry (fallback): ${fallback}\n`);
64
- return loadFromFile(fallback);
65
- }
66
- throw new SkillError('template registry not found. Set VIDEO_TEMPLATE_REGISTRY (local file) or VIDEO_TEMPLATE_REGISTRY_URL (HTTP API).');
67
- }
68
- function statusOf(tpl) {
69
- const raw = (tpl.status ?? '').trim().toLowerCase();
70
- return raw || 'stable';
71
- }
72
- function isTruthyEnv(name) {
73
- const v = (process.env[name] ?? '').trim().toLowerCase();
74
- return v === '1' || v === 'true' || v === 'yes' || v === 'on';
75
- }
76
- function visibleStatuses() {
77
- const allowed = new Set(['stable']);
78
- if (isTruthyEnv('ENABLE_BETA_TEMPLATES'))
79
- allowed.add('beta');
80
- return allowed;
81
- }
82
- function matchesFilter(tpl, opts) {
83
- if (opts.tag) {
84
- const needle = opts.tag.toLowerCase();
85
- const tags = (tpl.styleTags ?? []).map((t) => String(t).toLowerCase());
86
- if (!tags.some((t) => t.includes(needle) || needle.includes(t)))
87
- return false;
88
- }
89
- if (opts.aspect) {
90
- const want = opts.aspect.toLowerCase();
91
- const ratios = (tpl.supportedAspectRatios ?? []).map((r) => String(r).toLowerCase());
92
- if (!ratios.includes(want))
93
- return false;
94
- }
95
- if (opts.language) {
96
- // Unknown language (absent/empty) is never excluded by a language filter.
97
- const langs = (tpl.contentLanguage ?? []).map((l) => String(l).toLowerCase());
98
- if (langs.length > 0 && !langs.includes(opts.language.toLowerCase()))
99
- return false;
100
- }
101
- return true;
102
- }
103
- export async function templateBind(input, _ctx) {
104
- // The skill currently exposes exactly one CLI verb. Treat missing flag as
105
- // list-templates too, matching match_template.py's "no args == list" behavior.
106
- const wantsList = input.list_templates === true || input.list_templates === 'true' || Object.keys(input).length === 0 ||
107
- typeof input.filter_tag === 'string' || typeof input.filter_aspect === 'string' ||
108
- typeof input.filter_language === 'string' ||
109
- input.include_beta === true || input.include_beta === 'true';
110
- if (!wantsList) {
111
- throw new SkillError('template-bind CLI only supports --list-templates [--filter-tag X] [--filter-aspect X] [--filter-language zh|en] [--include-beta]; binding logic is invoked in-process by render-video and is not exposed as a CLI verb.');
112
- }
113
- // P2.2: status gating mirrors registry_loader.py — only stable by default,
114
- // beta unlocked by env var or explicit --include-beta flag.
115
- const allowed = visibleStatuses();
116
- if (input.include_beta === true || input.include_beta === 'true')
117
- allowed.add('beta');
118
- const tagFilter = typeof input.filter_tag === 'string' ? input.filter_tag : undefined;
119
- const aspectFilter = typeof input.filter_aspect === 'string' ? input.filter_aspect : undefined;
120
- const languageFilter = typeof input.filter_language === 'string' ? input.filter_language : undefined;
121
- const registry = await loadRegistry();
122
- const all = registry.templates ?? [];
123
- const visible = all.filter((t) => allowed.has(statusOf(t)) && matchesFilter(t, { tag: tagFilter, aspect: aspectFilter, language: languageFilter }));
124
- if (visible.length === 0) {
125
- const hiddenCount = all.length - visible.length;
126
- process.stdout.write(`⚠️ No templates match the current filters (${hiddenCount} hidden by status/filter; check --include-beta or relax --filter-*).\n`);
127
- return;
128
- }
129
- process.stdout.write(`\n${'Template ID'.padEnd(22)} ${'Name'.padEnd(18)} ${'Aspect'.padEnd(12)} ${'Lang'.padEnd(8)} ${'Status'.padEnd(8)} Tags / LLM hint\n`);
130
- process.stdout.write(`${'-'.repeat(22)} ${'-'.repeat(18)} ${'-'.repeat(12)} ${'-'.repeat(8)} ${'-'.repeat(8)} ${'-'.repeat(60)}\n`);
131
- for (const tpl of visible) {
132
- const tid = (tpl.templateId ?? '').padEnd(22);
133
- const name = (tpl.name ?? '').padEnd(18);
134
- const ratios = (tpl.supportedAspectRatios ?? []).join(',').padEnd(12);
135
- const lang = ((tpl.contentLanguage ?? []).join(',') || '-').padEnd(8);
136
- const st = statusOf(tpl).padEnd(8);
137
- const tags = (tpl.styleTags ?? []).slice(0, 5).join(', ');
138
- process.stdout.write(`${tid} ${name} ${ratios} ${lang} ${st} ${tags}\n`);
139
- if (tpl.llmHint) {
140
- // Indent the hint so it visually belongs to the row above. Truncated to
141
- // keep `--list-templates` scannable at 100+ templates.
142
- const hint = tpl.llmHint.length > 200 ? tpl.llmHint.slice(0, 197) + '...' : tpl.llmHint;
143
- process.stdout.write(`${' '.repeat(22)} ↳ ${hint}\n`);
144
- }
145
- }
146
- const hidden = all.length - visible.length;
147
- const hiddenNote = hidden > 0 ? ` (${hidden} hidden by status/filter)` : '';
148
- process.stdout.write(`\n${visible.length} template(s) shown${hiddenNote}\n`);
149
- }