@remixmate/cli 0.9.14 → 0.9.16

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 (36) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/billing.d.ts +44 -0
  4. package/dist/billing.js +76 -0
  5. package/dist/capabilities.d.ts +5 -1
  6. package/dist/cli.js +0 -0
  7. package/dist/http.d.ts +3 -0
  8. package/dist/http.js +4 -0
  9. package/dist/manifest.json +13 -13
  10. package/dist/runner.js +9 -0
  11. package/package.json +1 -1
  12. package/skills/export-jianying/version.json +1 -1
  13. package/skills/gen-digital-human/SKILL.md +12 -0
  14. package/skills/gen-digital-human/skill.json +9 -3
  15. package/skills/gen-digital-human/version.json +1 -1
  16. package/skills/gen-image/SKILL.md +51 -17
  17. package/skills/gen-image/skill.json +11 -3
  18. package/skills/gen-image/version.json +1 -1
  19. package/skills/gen-script/SKILL.md +17 -21
  20. package/skills/gen-script/version.json +1 -1
  21. package/skills/gen-video/SKILL.md +17 -3
  22. package/skills/gen-video/skill.json +10 -2
  23. package/skills/gen-video/version.json +1 -1
  24. package/skills/gen-voice/SKILL.md +13 -1
  25. package/skills/gen-voice/version.json +1 -1
  26. package/skills/prepare-video-assets/SKILL.md +12 -0
  27. package/skills/prepare-video-assets/version.json +1 -1
  28. package/skills/render-video/SKILL.md +12 -0
  29. package/skills/render-video/scripts/render_video.py +63 -0
  30. package/skills/render-video/version.json +1 -1
  31. package/skills/template-registry/scripts/render_job_client.py +27 -0
  32. package/skills/template-registry/version.json +1 -1
  33. package/skills/video-parser/version.json +1 -1
  34. package/skills/web-record/SKILL.md +131 -133
  35. package/skills/web-screenshot/SKILL.md +93 -96
  36. package/skills/web-screenshot/version.json +1 -1
package/README.md CHANGED
@@ -296,7 +296,7 @@ remixmate template-registry --list-templates
296
296
  ### Quick start
297
297
 
298
298
  ```
299
- @skills/gen-image/SKILL.md Generate an image of a panda, 9:16, using gemini 3.1, Chinese-painting style + follow this doc strictly
299
+ @skills/gen-image/SKILL.md Generate an image of a panda, 9:16, using gemini, Chinese-painting style + follow this doc strictly
300
300
  @skills/gen-video/SKILL.md Generate a video of a panda running in a bamboo forest, 9:16, 6 seconds, using veo + follow this doc strictly
301
301
  @skills/gen-voice/SKILL.md Generate a voiceover introducing panda habits, around 100 words + follow this doc strictly
302
302
  @skills/gen-digital-human/SKILL.md Get the digital human list + follow this doc strictly
package/README.zh-CN.md CHANGED
@@ -232,7 +232,7 @@ remixmate template-registry --list-templates
232
232
  ### 快速体验
233
233
 
234
234
  ```
235
- @skills/gen-image/SKILL.md 生成一张熊猫的图片,9:16,调用gemini 3.1,国画风 + 严格按该文档执行
235
+ @skills/gen-image/SKILL.md 生成一张熊猫的图片,9:16,调用gemini,国画风 + 严格按该文档执行
236
236
  @skills/gen-video/SKILL.md 生成一段熊猫在竹林奔跑的视频,9:16,长度6秒,调用veo + 严格按该文档执行
237
237
  @skills/gen-voice/SKILL.md 生成一段语音,介绍熊猫的习性,大概100字左右 + 严格按该文档执行
238
238
  @skills/gen-digital-human/SKILL.md 获取数字人列表 + 严格按该文档执行
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Billing capture — makes credit consumption visible to whoever ran the skill.
3
+ *
4
+ * Credits are deducted server-side and used to be invisible here: a run printed
5
+ * its image/video URL and nothing else, so the first time a user noticed the
6
+ * credit system at all was the `insufficient_credits` error after the balance
7
+ * had already run out. ab-api now attaches a `billing` object to the envelope of
8
+ * every response that charged something (see core.Success / credits_billing.go);
9
+ * this module accumulates those across all the calls a single skill run makes —
10
+ * a gen-image run polls, a gen-video run polls, and each may charge once — and
11
+ * renders one footer at the end.
12
+ *
13
+ * Two outputs, two audiences, both on stdout:
14
+ * - a human-readable footer, which is what the agent relays to the user.
15
+ * - one `__progress__` line (phase `billing`) — the existing machine protocol,
16
+ * already parsed by ab-agent's executor and skipped by the line-scanning
17
+ * parsers in render_video.py, so a nested pipeline caller can aggregate a
18
+ * whole run's spend without a new stdout contract.
19
+ *
20
+ * Both go to stdout rather than stderr (where the auth footer lives) because
21
+ * ab-agent hands the LLM `result.stdout || result.stderr` (mcp-tools.ts) — a
22
+ * stderr-only footer would be invisible in the hosted agent, visible only when
23
+ * a local host like codex shows both streams. Adding stdout lines is safe:
24
+ * emitProgress already writes NDJSON there, so no consumer can be treating
25
+ * stdout as a single JSON document.
26
+ */
27
+ export interface BillingItem {
28
+ credits: number;
29
+ bizType?: string;
30
+ detail?: string;
31
+ }
32
+ /** The `billing` object ab-api attaches to a charged response. */
33
+ export interface Billing {
34
+ credits: number;
35
+ balance: number;
36
+ items?: BillingItem[];
37
+ }
38
+ /** Accumulate one response's billing object; no-ops on responses that charged nothing. */
39
+ export declare function recordBilling(billing: Billing | undefined | null): void;
40
+ /** Everything charged so far in this process, or null when nothing was. */
41
+ export declare function billingSummary(): Billing | null;
42
+ export declare function emitBillingFooter(): void;
43
+ /** Test seam — resets the accumulator between runs in-process. */
44
+ export declare function resetBilling(): void;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Billing capture — makes credit consumption visible to whoever ran the skill.
3
+ *
4
+ * Credits are deducted server-side and used to be invisible here: a run printed
5
+ * its image/video URL and nothing else, so the first time a user noticed the
6
+ * credit system at all was the `insufficient_credits` error after the balance
7
+ * had already run out. ab-api now attaches a `billing` object to the envelope of
8
+ * every response that charged something (see core.Success / credits_billing.go);
9
+ * this module accumulates those across all the calls a single skill run makes —
10
+ * a gen-image run polls, a gen-video run polls, and each may charge once — and
11
+ * renders one footer at the end.
12
+ *
13
+ * Two outputs, two audiences, both on stdout:
14
+ * - a human-readable footer, which is what the agent relays to the user.
15
+ * - one `__progress__` line (phase `billing`) — the existing machine protocol,
16
+ * already parsed by ab-agent's executor and skipped by the line-scanning
17
+ * parsers in render_video.py, so a nested pipeline caller can aggregate a
18
+ * whole run's spend without a new stdout contract.
19
+ *
20
+ * Both go to stdout rather than stderr (where the auth footer lives) because
21
+ * ab-agent hands the LLM `result.stdout || result.stderr` (mcp-tools.ts) — a
22
+ * stderr-only footer would be invisible in the hosted agent, visible only when
23
+ * a local host like codex shows both streams. Adding stdout lines is safe:
24
+ * emitProgress already writes NDJSON there, so no consumer can be treating
25
+ * stdout as a single JSON document.
26
+ */
27
+ import { emitProgress } from './progress.js';
28
+ let creditsCharged = 0;
29
+ let latestBalance = null;
30
+ const chargedItems = [];
31
+ /** Accumulate one response's billing object; no-ops on responses that charged nothing. */
32
+ export function recordBilling(billing) {
33
+ if (!billing || typeof billing.credits !== 'number' || billing.credits <= 0)
34
+ return;
35
+ creditsCharged += billing.credits;
36
+ if (typeof billing.balance === 'number')
37
+ latestBalance = billing.balance;
38
+ for (const item of billing.items ?? []) {
39
+ if (item && typeof item.credits === 'number' && item.credits > 0)
40
+ chargedItems.push(item);
41
+ }
42
+ }
43
+ /** Everything charged so far in this process, or null when nothing was. */
44
+ export function billingSummary() {
45
+ if (creditsCharged <= 0)
46
+ return null;
47
+ return { credits: creditsCharged, balance: latestBalance ?? 0, items: [...chargedItems] };
48
+ }
49
+ /**
50
+ * Emit the footer for what this process charged. Safe to call on the error path
51
+ * too: a run can fail after a successful (already billed) generation step, and
52
+ * that spend still needs to be reported.
53
+ *
54
+ * Idempotent — only the first call prints, so a handler and the dispatcher can
55
+ * both reach for it without doubling the number the user sees.
56
+ */
57
+ let emitted = false;
58
+ export function emitBillingFooter() {
59
+ if (emitted)
60
+ return;
61
+ const summary = billingSummary();
62
+ if (!summary)
63
+ return;
64
+ emitted = true;
65
+ emitProgress({ phase: 'billing', credits: summary.credits, balance: summary.balance, items: summary.items });
66
+ const balance = summary.balance.toLocaleString('en-US');
67
+ const credits = summary.credits.toLocaleString('en-US');
68
+ process.stdout.write(`\n💳 Charged ${credits} credits · balance ${balance}\n`);
69
+ }
70
+ /** Test seam — resets the accumulator between runs in-process. */
71
+ export function resetBilling() {
72
+ creditsCharged = 0;
73
+ latestBalance = null;
74
+ chargedItems.length = 0;
75
+ emitted = false;
76
+ }
@@ -19,8 +19,12 @@ export interface ModelConstraints {
19
19
  durationDefault?: number;
20
20
  refImageMax?: number;
21
21
  sizes?: string[];
22
- /** aspect-ratio → [width, height] pixel preset (Seedream). */
22
+ /** aspect-ratio → [width, height] pixel preset (Seedream). Per model: the same
23
+ * ratio maps to different pixels on different Seedream variants. */
23
24
  sizePresets?: Record<string, [number, number]>;
25
+ /** total-pixel bounds (width × height); the backend rescales sizes outside them. */
26
+ pixelMin?: number;
27
+ pixelMax?: number;
24
28
  }
25
29
  export interface ModelDescriptor {
26
30
  id: string;
package/dist/cli.js CHANGED
File without changes
package/dist/http.d.ts CHANGED
@@ -18,6 +18,7 @@
18
18
  * 3. process.env.MM_BACKEND_API_URL — ab-agent's convention (back-compat)
19
19
  * 4. https://api.remixmate.com/api — production default (zero-config)
20
20
  */
21
+ import { type Billing } from './billing.js';
21
22
  export { SkillError, EXIT } from './errors.js';
22
23
  /**
23
24
  * Resolve the ab-api base URL the same way for authenticated and device-flow calls.
@@ -49,6 +50,8 @@ export interface MmResponse<T = unknown> {
49
50
  code: number;
50
51
  msg?: string;
51
52
  data?: T;
53
+ /** Present only on responses that charged credits — see billing.ts. */
54
+ billing?: Billing;
52
55
  }
53
56
  /**
54
57
  * POST JSON to ab-api and return the parsed business payload.
package/dist/http.js CHANGED
@@ -18,6 +18,7 @@
18
18
  * 3. process.env.MM_BACKEND_API_URL — ab-agent's convention (back-compat)
19
19
  * 4. https://api.remixmate.com/api — production default (zero-config)
20
20
  */
21
+ import { recordBilling } from './billing.js';
21
22
  import { resolvePrivToken, NOT_AUTHENTICATED_HINT } from './auth/resolve.js';
22
23
  import { attemptAutoLogin } from './auth/auto-login.js';
23
24
  import { EXIT, SkillError } from './errors.js';
@@ -120,6 +121,9 @@ export async function mmPost(ctx, pathOrUrl, body, opts = {}) {
120
121
  catch {
121
122
  throw new SkillError(`❌ failed to parse response, body is not JSON: ${text.slice(0, 200)}`);
122
123
  }
124
+ // Before the code check: a charged response is always code=0 today, but a
125
+ // partial-failure envelope that still billed must not lose its billing line.
126
+ recordBilling(parsed.billing);
123
127
  if (parsed.code !== 0) {
124
128
  // ab-api reports auth failures in the envelope (HTTP 200 + code=401), so the
125
129
  // business-code path needs the same 401 → "re-authorize" mapping as above.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.9.14",
4
- "generatedAt": "2026-08-12T07:37:21.011Z",
3
+ "version": "0.9.16",
4
+ "generatedAt": "2026-08-18T05:34:36.073Z",
5
5
  "skills": [
6
6
  {
7
7
  "id": "export-jianying",
@@ -54,7 +54,7 @@
54
54
  "tier": "atomic",
55
55
  "category": "asset",
56
56
  "title": "AI Image Generation",
57
- "summary": "AI image generation: produce an image from a text prompt. Supports Seedream and Gemini models, plus image-to-image with reference images.",
57
+ "summary": "AI image generation: produce an image from a text prompt. Supports the Seedream family (including a high-fidelity 'pro' variant) and Gemini, plus image-to-image with reference images.",
58
58
  "triggers": [
59
59
  "AI image generation, text-to-image, \"draw me ...\", \"generate an image of ...\"",
60
60
  "Image-to-image, reference image, style transfer, image variation",
@@ -247,11 +247,11 @@
247
247
  "title": "Web Page Recording",
248
248
  "summary": "Drive a headless browser (Playwright Python) to RECORD any URL to a video, then (by default) transcode to mp4, grab a cover frame, upload to VOD and return a playable CDN URL. Modes: fixed-duration recording, condition-triggered stop (element appears / disappears), auto-scroll from top to bottom, custom storyboards, and parameterized templates. Storyboard scenes: highlight / focus / zoom / scroll / virtual-cursor click / type / hover / caption / title-card / arrow / numbered sequence / redact / code-line highlight. For still images (png/jpg) use the web_screenshot tool instead. Use this tool whenever the user wants a video / recording / screencast of a web page: record a page, scroll-through video, page-from-top-to-bottom clip, demo of clicks/typing/hover, storyboard / multi-scene intro video, or a template-based clip.",
249
249
  "triggers": [
250
- "录屏、网页录制、录制视频、录一段操作、生成 webmscreencast",
251
- "滚动录屏、页面从头划到尾的视频",
252
- "多场景视频、分镜视频、storyboard、按时间线编排",
253
- "演示点击 / 输入 / 悬停(虚拟鼠标 + 涟漪 / 打字机 / 触发 tooltip)",
254
- "模板视频一行出片、按顺序编号高亮多个区域并录制"
250
+ "Screen recording, record a web page, record a video, capture an interaction, produce a webm, screencast",
251
+ "Scroll recording, a video that pans the page from top to bottom",
252
+ "Multi-scene video, storyboard video, timeline-sequenced clips",
253
+ "Animated demos of clicks / typing / hover (virtual cursor + ripple / typewriter / triggering tooltips)",
254
+ "One-command template clips, numbering and highlighting several regions in sequence and recording it"
255
255
  ],
256
256
  "entry": {
257
257
  "type": "python",
@@ -275,11 +275,11 @@
275
275
  "title": "Web Page Screenshot",
276
276
  "summary": "Drive a headless browser (Playwright Python) to capture any URL to a local STILL IMAGE (png/jpg): full-page / viewport / element / region screenshots, with device emulation, waiting, hide/mask/redact, and static annotations (highlight / arrow / caption / numbered sequence / redact). Images only — for video / recording / scroll-through / storyboard clips (webm) use the web_record tool instead.",
277
277
  "triggers": [
278
- "网页截图、网页截屏、整页截图、长截图、full page screenshot",
279
- "截某个元素 / 区域、局部截屏、focus 某个区域",
280
- "截图前隐藏元素 / 涂盖打码、给静态截图加注释(红框 / 箭头 / 标签)",
281
- "高亮某文件的 L5-L20 代码行并截图",
282
- "移动端 / 设备模拟截图、带 cookie / 登录态截图"
278
+ "Web page screenshot, screen capture, full-page screenshot, long screenshot",
279
+ "Capture a specific element / region, partial screenshot, focus on an area",
280
+ "Hide or mask elements before capturing, annotate a still screenshot (highlight box / arrow / label)",
281
+ "Highlight lines L5-L20 of a file and screenshot it",
282
+ "Mobile / device-emulated screenshot, capture with cookies / a logged-in session"
283
283
  ],
284
284
  "entry": {
285
285
  "type": "python",
package/dist/runner.js CHANGED
@@ -15,6 +15,7 @@ import { findSkill, SKILLS_DIR } from './registry.js';
15
15
  import { HANDLERS } from './handlers/index.js';
16
16
  import { EXIT, SkillError } from './errors.js';
17
17
  import { authChildEnv, ensureAuth } from './auth/ensure.js';
18
+ import { emitBillingFooter } from './billing.js';
18
19
  /** Read the token override accepted by both the TS handlers and the Python skills. */
19
20
  function tokenFlag(args) {
20
21
  const value = args.token ?? args.priv_token;
@@ -34,6 +35,8 @@ export async function runSkill(skillName, opts) {
34
35
  });
35
36
  switch (skill.entry.type) {
36
37
  case 'python':
38
+ // Python children talk to ab-api themselves and print their own billing
39
+ // footer; nothing was charged through this process.
37
40
  return await runPython(skill, opts.rawArgs, auth);
38
41
  case 'http':
39
42
  case 'builtin':
@@ -48,6 +51,12 @@ export async function runSkill(skillName, opts) {
48
51
  process.stderr.write(`❌ unexpected error: ${err.message}\n`);
49
52
  return EXIT.ERROR;
50
53
  }
54
+ finally {
55
+ // In `finally` because a run can fail *after* a billed step (e.g. the image
56
+ // generated and was charged, then the upload timed out) — spend gets
57
+ // reported either way. No-ops when nothing was charged.
58
+ emitBillingFooter();
59
+ }
51
60
  }
52
61
  async function runPython(skill, rawArgs, auth) {
53
62
  if (!skill.scriptAbsolutePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remixmate/cli",
3
- "version": "0.9.14",
3
+ "version": "0.9.16",
4
4
  "description": "AI media generation skills for Claude Code / Codex — 12 skills covering image, video, voice, digital human, web screenshot, web recording, script, template registry, rendering, Jianying export, and video deconstruction.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3,5 +3,5 @@
3
3
  "repoName": "agent-skill-media-maker",
4
4
  "skillId": "554",
5
5
  "version": "V3",
6
- "skillDescription": "剪映草稿生成技能,将素材URL打包为剪映可导入的草稿ZIP,支持从 RenderPlan 自动转换(调用 ab-api /file/generateJianYing)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 导出剪映、剪映草稿、打包剪映、导入剪映\n- 将素材导出为剪映格式、生成剪映工程\n- 把视频/图片/音频打包成剪映草稿\n- RenderPlan 导出剪映草稿\n\n即使用户没有明确说「剪映」,只要他们想要将素材打包为可在剪映中编辑的草稿格式,也要使用本 skill"
6
+ "skillDescription": "Jianying (CapCut) draft-generation skill. Packages asset URLs into a draft ZIP that Jianying can import; supports automatic conversion from a RenderPlan (calls ab-api /file/generateJianYing).\n\nUse this skill as soon as the user mentions any of these intents:\n- Export to Jianying, Jianying draft, package for Jianying, import into Jianying\n- Export materials to the Jianying format, generate a Jianying project\n- Bundle video / image / audio into a Jianying draft\n- Export a Jianying draft from a RenderPlan\n\nEven when the user does not say \"Jianying\" explicitly, use this skill whenever they want to package materials into a draft that can be edited in Jianying."
7
7
  }
@@ -175,6 +175,18 @@ remixmate gen-digital-human --check-status --generation-id 123
175
175
  - Keep individual jobs under ~500 characters.
176
176
  - Tone and style of the script affect the perceived voice.
177
177
 
178
+ ## Credits
179
+
180
+ Every run charges credits. The CLI prints a footer on stdout when it does:
181
+
182
+ ```
183
+ 💳 Charged 31 credits · balance 1,240
184
+ ```
185
+
186
+ Relay it to the user whenever it appears — it is the only signal they get about what a
187
+ generation cost, and the balance is the only warning before a run fails with
188
+ `insufficient_credits`. Do not drop it from your summary.
189
+
178
190
  ## Error handling
179
191
 
180
192
  - **401** / **token missing** (non-OpenClaw): set `PRIV_TOKEN`.
@@ -12,13 +12,19 @@
12
12
  "type": "object",
13
13
  "properties": {
14
14
  "list_avatars": { "type": "boolean", "description": "List available digital-human avatars" },
15
- "source": { "type": "string", "enum": ["jimeng", "hifly"], "description": "Filter by source" },
15
+ "mine": { "type": "boolean", "description": "With list_avatars=true: list the caller's own custom avatars instead of the public catalog. Custom avatars do not appear without this." },
16
+ "name": { "type": "string", "description": "With list_avatars=true: fuzzy-filter avatars by name" },
17
+ "source": { "type": "string", "enum": ["jimeng", "hifly"], "description": "Provider: jimeng is image-driven, hifly is video-driven. Usually inferred from the avatar; pass it explicitly when the avatar declares no source." },
16
18
  "gender": { "type": "string", "enum": ["male", "female"], "description": "Filter by gender" },
17
19
  "avatar_id": { "type": "number", "description": "Avatar id" },
18
20
  "text": { "type": "string", "description": "Narration text (TTS mode)" },
19
21
  "audio_url": { "type": "string", "description": "Audio URL (audio-driven mode)" },
20
- "voice_id": { "type": "string", "description": "Voice id" },
21
- "aspect_ratio": { "type": "string", "description": "Aspect ratio" },
22
+ "voice_id": { "type": "string", "description": "Voice id (TTS mode). Shares the Minimax catalog with gen-voice — call gen_voice with list_voices=true to see available ids rather than inventing one." },
23
+ "voice_name": { "type": "string", "description": "Voice display name, recorded alongside voice_id for bookkeeping. Does not affect synthesis." },
24
+ "aspect_ratio": { "type": "string", "description": "Aspect ratio: 9:16 / 16:9 / 3:4 / 1:1. Defaults to the avatar's own ratio." },
25
+ "prompt": { "type": "string", "description": "Action prompt describing how the avatar should perform, e.g. 'more hand gestures'" },
26
+ "check_status": { "type": "boolean", "description": "Status-check mode: poll an earlier job instead of starting a new one. Requires generation_id. Use this when a generate call timed out." },
27
+ "generation_id": { "type": "number", "description": "Job id to poll (required when check_status=true)" },
22
28
  "json_output": { "type": "boolean", "description": "Emit a JSON result (generate: { url, generationId }; list: { avatars }; check-status: { status, url }) instead of human-readable output" }
23
29
  },
24
30
  "required": []
@@ -3,5 +3,5 @@
3
3
  "repoName": "agent-skill-media-maker",
4
4
  "skillId": "336",
5
5
  "version": "V8",
6
- "skillDescription": "数字人口播视频技能,支持查询形象、TTS 口播、音频驱动口播和查询生成状态(调用 ab-api 数字人接口,即梦 / 飞影)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 数字人、数字人视频、数字人口播、生成数字人视频\n- 用户提供已有音频 URL(MP3 等)、用外链音频驱动数字人口型\n- AI 主播、虚拟主播、虚拟人物视频、口播视频\n- 让数字人说话、让虚拟人说一段话、让 AI 人物播报\n- 查看/列出数字人形象、有哪些数字人可以用\n- 使用即梦/飞影数字人\n\n即使用户没有明确说「使用 AI」,只要他们想要让一个虚拟人物朗读/播报一段文字并生成视频,也要使用本 skill。"
6
+ "skillDescription": "Digital-human (talking-head) skill: list available avatars, run TTS-based or audio-driven lip-sync, and check the status of pending jobs. Backed by ab-api's digital-human endpoints (Jimeng / HiFly providers).\n\nUse this skill immediately whenever the user asks for any of:\n- Digital human, talking-head video, AI presenter, virtual host\n- \"Make a talking-head video out of this script / this audio file\"\n- List or browse digital-human avatars\n- Use Jimeng or HiFly to drive an avatar\n\nEven without an explicit \"use AI\", any request that turns text or audio into a synthesized presenter video should route here."
7
7
  }
@@ -23,21 +23,28 @@ Wraps ab-api's `POST /model/genImg` (the same endpoint the web studio uses), aut
23
23
 
24
24
  ## Models and sizes
25
25
 
26
- Aligned with the gen-image handler's model presets and the backend `ModelGenImgDTO`:
27
-
28
- | LiteLLM `model` | Display name | Provider |
29
- |-----------------|--------------|----------|
30
- | `doubao/doubao-seedream-4-5-251128` | Seedream 4.5 | Volcano |
31
- | `doubao/doubao-seedream-5-0-260128` | Seedream 5.0 Lite | Volcano |
32
- | `gemini-3-pro-image` | Gemini 3 Pro | Google |
33
- | `gemini-3.1-flash-image-preview` | Gemini 3.1 Flash | Google |
34
-
35
- - **Seedream**: `--size` is an aspect ratio (e.g. `1:1`, `9:16`) or `WxH`; the backend may auto-upscale the 4.5 model to meet a minimum pixel count.
36
- - **Gemini**: `--size` is a backend-allowed aspect ratio (e.g. `1:1`, `16:9`); add `--resolution`: `1K` / `2K` / `4K` (default `1K`).
26
+ Pass `--model` a short name. The authoritative roster ids, aliases, per-model limits —
27
+ lives in the backend catalog (`/model/capabilities`), which the CLI fetches at runtime;
28
+ the names below are the stable aliases to use.
29
+
30
+ | `--model` | What it is | Reference images |
31
+ |-----------|------------|------------------|
32
+ | `seedream` | Default. General-purpose, highest output resolution. | up to 14 |
33
+ | `seedream-pro` | High-fidelity variant: better placement/element control, more faithful text rendering. Costs more per image. | up to 10 |
34
+ | `gemini` | Gemini 3 Pro. | up to 4 |
35
+
36
+ - **Seedream**: `--size` is an aspect ratio (e.g. `1:1`, `9:16`) or `WxH`. The backend maps the
37
+ ratio to that model's own pixel preset and rescales out-of-range sizes, so prefer a ratio
38
+ over explicit pixels.
39
+ - **`seedream-pro`** additionally supports `3:2` / `2:3` / `21:9`, and caps output at ~2K
40
+ (about 4.6 MP). Asking it for 4K pixels gets scaled down, not rejected — use `seedream`
41
+ when you need a genuinely larger image.
42
+ - **Gemini**: `--size` is a backend-allowed aspect ratio (e.g. `1:1`, `16:9`); add
43
+ `--resolution`: `1K` / `2K` / `4K` (default `1K`). `--resolution` is ignored by Seedream.
37
44
 
38
45
  ## Auth & environment
39
46
 
40
- No skill-local env file — the executing process inherits the system environment. Examples say `python`; on macOS you may need `python3`.
47
+ No skill-local env file — the executing process inherits the system environment.
41
48
 
42
49
  - **Enterprise OpenClaw**: auth is already injected, **no need** for `PRIV_TOKEN` / `--priv-token`.
43
50
  - **Other environments**: configure the token. Without a token, non-interactive runs fail; interactive ones may prompt.
@@ -45,7 +52,7 @@ No skill-local env file — the executing process inherits the system environmen
45
52
  | Env var | Description | Default |
46
53
  |---------|-------------|---------|
47
54
  | `PRIV_TOKEN` | Tianyan token; `--priv-token` overrides | none |
48
- | `MM_IMAGE_MODEL` | Default model id | `doubao/doubao-seedream-4-5-251128` |
55
+ | `MM_IMAGE_MODEL` | Default model, as a `--model` value | backend default (`seedream`) |
49
56
  | `MM_API_BASE_URL` | API root; `--api-base-url` overrides | `https://api.remixmate.com/api` |
50
57
  | `AGENT_NAME` | Optional `x-invoke-agent` header | none |
51
58
 
@@ -67,17 +74,30 @@ remixmate gen-image \
67
74
  ```bash
68
75
  remixmate gen-image \
69
76
  --prompt "<image description>" \
70
- --model gemini-3-pro-image \
77
+ --model gemini \
71
78
  --size "16:9" \
72
79
  --resolution "2K"
73
80
  ```
74
81
 
82
+ ```bash
83
+ # High-fidelity: precise placement, legible on-image text
84
+ remixmate gen-image \
85
+ --prompt "<image description>" \
86
+ --model seedream-pro \
87
+ --size "16:9"
88
+ ```
89
+
75
90
  ### Image-to-image (reference image)
76
91
 
77
92
  Reference images accept local file paths, HTTPS URLs, or data URIs. Pass `--reference` multiple times for multiple references.
78
93
 
79
- - **Seedream**: up to **14** reference images, `--image-strength` controls reference influence.
80
- - **Gemini**: up to **4** reference images.
94
+ - **`seedream`**: up to **14** reference images, `--image-strength` controls reference influence.
95
+ - **`seedream-pro`**: up to **10** reference images. Best choice when the edit has to land in a
96
+ specific spot — describe the target region in the prompt (e.g. "in the marked area at the
97
+ bottom left") and it holds position far better than `seedream`.
98
+ - **`gemini`**: up to **4** reference images.
99
+
100
+ Over-the-limit runs fail fast in the CLI, before spending credits.
81
101
 
82
102
  ```bash
83
103
  # URL reference
@@ -109,7 +129,7 @@ remixmate gen-image \
109
129
  | Flag | Description | Default |
110
130
  |------|-------------|---------|
111
131
  | `-p` / `--prompt` | Description (required) | — |
112
- | `-m` / `--model` | Model id | see `MM_IMAGE_MODEL` |
132
+ | `-m` / `--model` | `seedream` / `seedream-pro` / `gemini` | see `MM_IMAGE_MODEL` |
113
133
  | `-s` / `--size` | Seedream: ratio or WxH; Gemini: ratio | `1:1` |
114
134
  | `--resolution` | Gemini only: `1K` / `2K` / `4K` | `1K` |
115
135
  | `-n` | Number of images, 1–4 | `1` |
@@ -122,6 +142,20 @@ remixmate gen-image \
122
142
  | `--api-base-url` | Override API root | see above |
123
143
  | `--priv-token` | Override token | see above |
124
144
 
145
+ ## Credits
146
+
147
+ Every run charges credits, per image and **per model** — `seedream-pro` costs noticeably more
148
+ per image than `seedream`, so don't reach for it by default. The CLI prints a footer on stdout
149
+ when it charges:
150
+
151
+ ```
152
+ 💳 Charged 31 credits · balance 1,240
153
+ ```
154
+
155
+ Relay it to the user whenever it appears — it is the only signal they get about what a
156
+ generation cost, and the balance is the only warning before a run fails with
157
+ `insufficient_credits`. Do not drop it from your summary.
158
+
125
159
  ## Error handling
126
160
 
127
161
  - **401** / **token missing** (non-OpenClaw): set `PRIV_TOKEN`.
@@ -4,7 +4,7 @@
4
4
  "tier": "atomic",
5
5
  "category": "asset",
6
6
  "title": "AI Image Generation",
7
- "description": "AI image generation: produce an image from a text prompt. Supports Seedream and Gemini models, plus image-to-image with reference images.",
7
+ "description": "AI image generation: produce an image from a text prompt. Supports the Seedream family (including a high-fidelity 'pro' variant) and Gemini, plus image-to-image with reference images.",
8
8
  "auth": "required",
9
9
  "envVars": ["PRIV_TOKEN", "MM_API_BASE_URL", "AGENT_NAME", "MM_IMAGE_MODEL"],
10
10
  "entry": { "type": "http", "handler": "gen-image" },
@@ -12,12 +12,20 @@
12
12
  "type": "object",
13
13
  "properties": {
14
14
  "prompt": { "type": "string", "description": "Image description (required)" },
15
- "model": { "type": "string", "description": "Model id" },
15
+ "model": { "type": "string", "description": "Model: 'seedream' (default), 'seedream-pro' (high fidelity, precise placement and on-image text; costs more per image), or 'gemini'" },
16
16
  "size": { "type": "string", "description": "Aspect ratio or WxH, e.g. 1:1, 9:16" },
17
17
  "resolution": { "type": "string", "enum": ["1K", "2K", "4K"], "description": "Output resolution (Gemini only)" },
18
18
  "n": { "type": "number", "description": "Number of images, 1-4" },
19
- "reference": { "type": "string", "description": "Reference image path or URL" },
19
+ "reference": {
20
+ "type": "array",
21
+ "items": { "type": "string" },
22
+ "description": "Reference images for image-to-image: local file path, https URL, or data URI. Pass multiple to blend several references (seedream: max 14, seedream-pro: max 10, gemini: max 4 — over the limit fails before spending credits)."
23
+ },
24
+ "image_strength": { "type": "number", "description": "How strongly the reference images influence the result, 0-1 (Seedream family only). Omit to use the backend default." },
25
+ "guidance_scale": { "type": "number", "description": "Prompt-adherence strength, where supported. Omit to use the backend default." },
20
26
  "negative_prompt": { "type": "string", "description": "Negative prompt — content to avoid" },
27
+ "seed": { "type": "number", "description": "Random seed. Pass the same seed with the same prompt and model to make a run reproducible." },
28
+ "watermark": { "type": "boolean", "description": "Add a watermark to the output. Only true has an effect; there is no opt-out override of the backend default." },
21
29
  "json_output": { "type": "boolean", "description": "Emit a JSON result ({ urls: [...] }) instead of human-readable output" }
22
30
  },
23
31
  "required": ["prompt"]
@@ -3,5 +3,5 @@
3
3
  "repoName": "agent-skill-media-maker",
4
4
  "skillId": "337",
5
5
  "version": "V9",
6
- "skillDescription": "AI 生图技能,根据文字描述生成图片,也支持参考图进行图生图(调用 ab-api /model/genImg,支持 Seedream Gemini)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- AI 生图、AI 画图、文生图、文字生成图片、生成图像、帮我画、生成一张图\n- 图生图、以图生图、参考图、风格迁移、图片变体\n- 使用 doubao / 豆包 / seedream、Gemini 等生成图片\n- 用户提供图片提示词并希望生成图片\n\n即使用户没有明确说「使用 AI」,只要他们想要根据描述生成图片,也要使用本 skill。"
6
+ "skillDescription": "AI image generation skill: produce an image from a text prompt, or do image-to-image with reference images. Backed by ab-api's `/model/genImg` (Seedream and Gemini families).\n\nUse this skill immediately whenever the user asks for any of:\n- AI image generation, text-to-image, \"draw me ...\", \"generate an image of ...\"\n- Image-to-image, reference image, style transfer, image variation\n- Generate an image with Doubao / Seedream / Gemini\n- Provide a prompt and ask for an image\n\nEven without an explicit \"use AI\", any request that turns a description into an image should route here."
7
7
  }
@@ -293,26 +293,28 @@ Apply the following principles when producing the DSL:
293
293
  "text": "Alibaba's open-source AI video-editing project\nalready has 4.3k stars on GitHub"
294
294
  ```
295
295
  instead of one continuous paragraph.
296
- 4. **Moderate scene count**: 30-second videos work well with 4–6 scenes, 60-second videos with 6–10.
297
- 5. **Leave room for templates**: pick generic layouts; do not assume a specific template implementation.
298
- 6. **Image model allowlist**: every `type: image` + `source: gen-image` `AssetRef`'s `payload.model` **must** be one of the values in the table below. **Never** use display names, short forms, or made-up ids (e.g. `seedream`, `gemini-flash`, etc.).
296
+ 5. **Moderate scene count**: 30-second videos work well with 4–6 scenes, 60-second videos with 6–10.
297
+ 6. **Leave room for templates**: pick generic layouts; do not assume a specific template implementation.
298
+ 7. **Image model allowlist**: every `type: image` + `source: gen-image` `AssetRef`'s `payload.model` **must** be one of the values in the table below. **Never** use display names, short forms, or made-up ids (e.g. `seedream`, `gemini-flash`, etc.).
299
299
 
300
300
  ### Allowlist `model` values aligned with gen-image
301
301
 
302
- Mirrors the `gen-image` skill and `GEN_IMG_MODEL_PRESETS` in `gen_image.py`. **Only** the following four values are allowed (copy verbatim, including prefix and version):
302
+ The roster is owned by the backend catalog (`/model/capabilities`), which `gen-image` resolves at
303
+ runtime. A DSL is persisted and replayed later, so write the **full id** — copy verbatim, including
304
+ prefix and version — not a short alias:
303
305
 
304
- | LiteLLM `model` | Display name | Provider |
305
- |-----------------|--------------|----------|
306
- | `doubao/doubao-seedream-4-5-251128` | Seedream 4.5 | Volcano |
307
- | `doubao/doubao-seedream-5-0-260128` | Seedream 5.0 Lite | Volcano |
308
- | `gemini-3-pro-image` | Gemini 3 Pro | Google |
309
- | `gemini-3.1-flash-image-preview` | Gemini 3.1 Flash | Google |
306
+ | `payload.model` | Display name | Provider | Notes |
307
+ |-----------------|--------------|----------|-------|
308
+ | `doubao/doubao-seedream-5-0-260128` | Seedream 5.0 Lite | Volcano | Default. Highest output resolution, up to 14 reference images. |
309
+ | `doubao/doubao-seedream-5-0-pro-260628` | Seedream 5.0 Pro | Volcano | High fidelity: precise element placement, faithful on-image text. Up to 10 reference images, caps out around 2K. Costs noticeably more per image. |
310
+ | `gemini-3-pro` | Gemini 3 Pro | Google | Up to 4 reference images. |
310
311
 
311
312
  **Agent behavior (avoid accidentally rewriting `model`)**:
312
313
 
313
- - `gen_script.py` already writes a valid `payload.model` (currently `gemini-3.1-flash-image-preview` by default). When the user only asks to refine narration, change `payload.prompt`, add or remove scenes, etc. and does **not** ask to change the image model, the agent **must keep** each image asset's original `payload.model` — do not replace it under the guise of "polishing the script".
314
- - **Only when the user explicitly asks to change the image model** (e.g. switches to Seedream or a different Gemini), update the corresponding image `AssetRef`'s `payload.model` to the matching row id from the table. Writing a display name into JSON is wrong.
315
- - When creating a new image `AssetRef`, pick one of the values above for `payload.model`; default to `gemini-3.1-flash-image-preview` to match the script, or to whichever value the user specified.
314
+ - `gen_script.py` already writes a valid `payload.model` (`doubao/doubao-seedream-5-0-260128` unless `DEFAULT_IMAGE_MODEL` overrides it). When the user only asks to refine narration, change `payload.prompt`, add or remove scenes, etc. and does **not** ask to change the image model, the agent **must keep** each image asset's original `payload.model` — do not replace it under the guise of "polishing the script".
315
+ - **Only when the user explicitly asks to change the image model** (e.g. switches to the Pro variant or to Gemini), update the corresponding image `AssetRef`'s `payload.model` to the matching row id from the table. Writing a display name or an alias into JSON is wrong.
316
+ - When creating a new image `AssetRef`, pick one of the values above for `payload.model`; default to `doubao/doubao-seedream-5-0-260128` to match the script, or to whichever value the user specified.
317
+ - If a run fails with an unknown-model error, the catalog has moved on from this table — check `/model/capabilities` rather than guessing a version string.
316
318
 
317
319
  ## Error handling
318
320
 
@@ -325,11 +327,5 @@ Mirrors the `gen-image` skill and `GEN_IMG_MODEL_PRESETS` in `gen_image.py`. **O
325
327
  | File | Purpose |
326
328
  |------|---------|
327
329
  | `gen_script.py` | Core script — produces the Video DSL JSON from a topic. |
328
- | `dsl.json` | DSL example produced from the generic template (debug reference). |
329
- | `script.json` | Intermediate script-generation result (example). |
330
- | `html_slide.json` | DSL example for the html-slide template. |
331
- | `knowledge_card_dsl.json` | DSL example for the knowledge-card scene. |
332
- | `knowledge_card_script.json` | Intermediate knowledge-card script result. |
333
- | `script_knowledge_card.json` | Full knowledge-card script example. |
334
-
335
- These JSON files are reference data for development / debugging; they do not participate in runtime logic. The authoritative DSL examples live under `template-registry/video_dsl/schema/examples/`.
330
+
331
+ The authoritative DSL examples live under `template-registry/video_dsl/schema/examples/`; list them with `template_registry list_examples=true`.
@@ -3,5 +3,5 @@
3
3
  "repoName": "agent-skill-media-maker",
4
4
  "skillId": "474",
5
5
  "version": "V11",
6
- "skillDescription": "视频脚本生成技能,将用户主题转化为结构化 Video DSLJSON),描述视频的完整结构、素材需求与叙事逻辑。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 帮我写视频脚本、生成视频脚本、视频策划、写分镜脚本\n- 做一个短视频、帮我规划视频内容、生成视频 DSL\n- 把主题转成视频结构、视频内容规划\n\n即使用户没有明确说「生成 DSL」,只要他们想要把一个主题变成视频内容结构,也要使用本 skill。"
6
+ "skillDescription": "Video-script generation skill. Turns a user-supplied topic into a structured Video DSL (JSON) that describes the full video — scene structure, asset requirements, and narrative flow.\n\nUse this skill as soon as the user mentions any of these intents:\n- Write a video script, generate a video script, plan a video, write storyboards\n- Create a short video, plan video content, generate a Video DSL\n- Turn a topic into a video structure / video content plan\n\nEven when the user does not say \"generate the DSL\", use this skill whenever they want to turn a topic into a structured video plan.\n\n⚠️ Stop-and-confirm gate: after this skill returns a DSL, show the full script and wait for the user's explicit confirmation. Never call `prepare_video_assets` in the same turn."
7
7
  }