makaron-cli 0.17.18 → 0.17.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +16 -0
- package/bin/makaron.mjs +116 -16
- package/package.json +1 -1
- package/skills/makaron/SKILL.md +16 -0
package/README.md
CHANGED
|
@@ -458,6 +458,8 @@ npx makaron-cli video status <taskId>
|
|
|
458
458
|
npx makaron-cli video retake --video input.mp4 --start 2 --end 5 --prompt "Make the umbrella red" --project <id> --model seedance-2.5 --wait --json
|
|
459
459
|
```
|
|
460
460
|
|
|
461
|
+
Seedance 2.5 Flash Retake: explicitly select `--model seedance-2.5-flash`; source >=4s, selection 0.1–15s, with at least 4s editing context. `--video-resolution 480p|720p` (default 720p); original audio is retained unless `--audio-mode generated` is explicit. No native exact final/middle-frame locks. The edited range is assembled back into the original duration; outside footage stays in place. Keep the request ID and poll the same root task.
|
|
462
|
+
|
|
461
463
|
Video segment editing also works directly from natural-language chat, without a GUI selection:
|
|
462
464
|
|
|
463
465
|
```bash
|
|
@@ -475,6 +477,8 @@ npx makaron-cli chat --project <id|auto> --video input.mp4 -b "make it funny"
|
|
|
475
477
|
|
|
476
478
|
Kling 4.0: use `--video-model kling-4` for native text-to-video or image/video feature references, integer 3–30s at 720p (default) or 1080p. Up to 10 images and 5 videos; source videos must each be 3s or longer, total at most 30s, 720–2160px per side, 24–60fps and at most 200MB each. `--video-operation edit` requires exactly one source video and preserves its canvas/audio. Explicit keyframe I2V, extension and replacement-audio controls are not exposed. Retake defaults to `kling-4` at 720p, original audio only, source at least 3s, no final/middle frame control. Kling 4.0 Flash (`kling-4-flash`) is the default when `--video-model` is omitted (omitting it with `--duration` above 20 uses `seedance-2.5`): the faster variant with the same inputs, edit route and Retake rules, but integer 3–20s at 720p only, scripts at most 2500 characters, and source/reference videos at most 20s total. Never silently substitute one Kling 4 variant for the other.
|
|
477
479
|
|
|
480
|
+
Seedance 2.5 Flash: explicitly select `--video-model seedance-2.5-flash`; generation is integer 4–30s at480p/720p (default720p). Up to10images,5videos(each2–30s,total≤30s),5audios(total≤30s). Images are feature references by default; `--image-workflow image-to-video` locks1–2 first/last frames with no video/audio inputs. Use `--video-operation generate` for video references or `edit` for exactly one4–30s source; edit and first/last frames follow source canvas. Edit follows source duration: omit duration, never -1. Native synchronized audio is included. No extend, draft, MOV, web-search, relaxed content filter or native1080p/4K. Set `--request-id <uuid>` before the first submission and reuse it with identical arguments to recover the original task without another charge. Keep the returned task ID and poll it; never silently substitute Eco or another model. Apply the additive media-pricing setup before submitting on a new database.
|
|
481
|
+
|
|
478
482
|
Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to the selected model limit), `--video <file|url>` and `--audio <file|url>` (repeatable where supported), `--voice <xai-preset-id>` (repeatable, Grok only), `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--video-model seedance-fast|seedance-mini|seedance|seedance-2.5|wan-3.0|wan-3.0-prime|kling-4|grok|google-omni|minimax-h3|minimax-h3-max|fal-h3-max|sync-lipsync-v3`, `--video-resolution auto|480p|720p|768p|1080p|2k|4k`. Default model is FAL H3 Max (`fal-h3-max`) at 768p (480p/1080p optional): native text-to-video or image/video/audio reference-to-video, integer 5-15s, up to 9 images + 3 videos + 3 audios (12 total). SeeDance accepts native text-to-video with no image and integer output duration 4-15s (default 5s); every Seedance image input is submitted through reference-to-video, including one image. `seedance-mini` supports 480p/720p and is best for cheaper drafts/multi-size tests. Wan 3.0 and Wan 3.0 Prime both expose 480p/720p/1080p/2K/4K; 2K/4K automatically use the matching FlashVSR endpoint. MiniMax H3 accepts native text-to-video, 4-15s output, public 768p/2k resolution, and up to 9 image, up to 3 video, and up to 3 audio feature references through Makaron Agent/chat; a single image keeps the `reference_image` role. `sync-lipsync-v3` requires exactly one video plus one MP3/WAV and preserves that replacement audio while aligning the mouth. H3 defaults to 768p; request 2k explicitly for maximum/final quality. Kling 4.0 supports integer 3-30s in one call. Grok generation uses `grok-imagine-video-1.5`: text-only generation supports 480p/720p/1080p, while any 1-7 image or preset voice input uses reference-to-video and is capped at 720p. Grok edit/extend uses `grok-imagine-video` internally under the same `grok` selector. Gemini Omni 1.2 supports 3-15s fast image/video generation and editing with native generated audio and multi-speaker dialogue; every image-only generation request uses `reference_to_video`, including a single image, with up to 6 images when no video reference is provided.
|
|
479
483
|
|
|
480
484
|
fal H3 Turbo: use `--video-model minimax-h3-max` for faster-than-real-time generation. It supports exactly 5/10/15 seconds at 480p/768p and defaults to native 768p, with no image for T2V or exactly one `--image` for I2V. It does not accept reference video/audio or multiple images.
|
|
@@ -751,3 +755,15 @@ makaron chat --image mascot.png "Use GPT Image 2.6 Flare to make a looping GIF o
|
|
|
751
755
|
The provider schema also advertises xhigh/max reasoning, but the live 2.6 endpoint rejected both during acceptance. They are not exposed as working Makaron tiers. Exact active 2.6 pricing rows are required before submission; final cost uses that task's fal billable USD units.
|
|
752
756
|
|
|
753
757
|
Seedream 5.5 (`--image-model seedream-5.5`) uses EvoLink, accepts at most 10 ordered inputs (base included), `--image-resolution 1K|1.5K|2K`, and `--output-format png|jpeg` (default PNG). `--background transparent` requires native PNG alpha. Quality/reasoning/GIF/SVG controls are unsupported. It never participates in Auto or switches providers after failure. Direct `makaron edit --image/--ref` uploads local originals automatically; direct MCP callers must supply public HTTPS PNG/JPEG/WebP originals. Accepted task receipts are saved to the user workspace before polling. The server must configure `EVOLINK_API_KEY` and an exact active `seedream-5.5` pricing row before use.
|
|
758
|
+
|
|
759
|
+
### Image layer decomposition
|
|
760
|
+
|
|
761
|
+
```bash
|
|
762
|
+
makaron chat --project auto --image poster.png "拆成图层,文字可以编辑,返回 Makaron 编辑链接"
|
|
763
|
+
makaron layerize --image poster.png --max-outputs 8 --quality 1K --editable-text --json
|
|
764
|
+
makaron layerize status <jobId> --project <projectId> --json
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
Both paths return a Makaron `projectUrl`. Open it to edit the standard design in the GUI: move/scale image layers, reorder or delete/restore layers, and edit recognized text. Default raster layers preserve the decomposed appearance; `--editable-text` replaces recognized text with ordinary editable design text using approximate fonts. Decorative text can remain raster. The original image and PNG layers remain in the project/workspace. No new GUI renderer is required.
|
|
768
|
+
|
|
769
|
+
`--project` reuses a project; otherwise the direct command creates a private project. `--max-outputs` is 2–100 including the background (default 8); quality is `auto|1K|1.5K|2K` (default `1K` for faster decomposition). One quality setting applies to the whole task; per-layer resolution controls are unavailable. Use an explicit higher tier or `auto` when preserving source resolution is required. The actual output count and pixel tiers determine one task charge. Failed or uncertain submissions are never replayed automatically; retain the printed job ID and query status. Repeated status reads preserve saved GUI edits and do not debit again. When the layers are ready, the edit link opens the resulting snapshot.
|
package/bin/makaron.mjs
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import fs from 'fs';
|
|
15
|
+
import { randomUUID } from 'node:crypto';
|
|
15
16
|
import path from 'path';
|
|
16
17
|
import { createInterface } from 'readline';
|
|
17
18
|
import { execFileSync } from 'child_process';
|
|
@@ -403,7 +404,7 @@ function normalizeRunResponse(data) {
|
|
|
403
404
|
const projectId = data.projectId || data.project_id;
|
|
404
405
|
if (projectId) {
|
|
405
406
|
data.projectId = projectId;
|
|
406
|
-
data.projectUrl = `${APP_URL}/projects/${projectId}`;
|
|
407
|
+
data.projectUrl = data.project_url || `${APP_URL}/projects/${projectId}`;
|
|
407
408
|
}
|
|
408
409
|
return data;
|
|
409
410
|
}
|
|
@@ -914,7 +915,7 @@ async function pollRun(baseUrl, headers, runId, opts = {}) {
|
|
|
914
915
|
}
|
|
915
916
|
if (data.result.error) process.stderr.write(`❌ ${data.result.error}\n`);
|
|
916
917
|
}
|
|
917
|
-
process.stderr.write(`🔗 ${
|
|
918
|
+
process.stderr.write(`🔗 ${data.projectUrl}\n`);
|
|
918
919
|
printRunUsage(data.usage);
|
|
919
920
|
}
|
|
920
921
|
|
|
@@ -2139,7 +2140,7 @@ Inputs:
|
|
|
2139
2140
|
--voice <preset-id> Grok preset voice. Repeatable, up to 3.
|
|
2140
2141
|
|
|
2141
2142
|
Generation options:
|
|
2142
|
-
--video-model <id> seedance-fast, seedance-mini, seedance, seedance-2.5,
|
|
2143
|
+
--video-model <id> seedance-fast, seedance-mini, seedance, seedance-2.5-flash, seedance-2.5,
|
|
2143
2144
|
wan-3.0, wan-3.0-prime, kling-4, kling-4-flash, grok, google-omni,
|
|
2144
2145
|
minimax-h3, minimax-h3-max, fal-h3-max, or sync-lipsync-v3.
|
|
2145
2146
|
--duration <seconds> Output duration supported by the selected model.
|
|
@@ -2169,6 +2170,9 @@ Recent model choices:
|
|
|
2169
2170
|
5/10/15s; native 768p default or 480p; no video/audio/multi-image references.
|
|
2170
2171
|
wan-3.0-prime Faster Wan 3.0 tier; 2-30s; 480p through 4k; multimodal refs.
|
|
2171
2172
|
wan-3.0 Wan standard tier with the same public duration/resolution range.
|
|
2173
|
+
seedance-2.5-flash 4-30s; 480p/720p;10 images/5 videos/5 audios; edit follows source.
|
|
2174
|
+
--image-workflow <id> Flash: reference-to-video (default) or image-to-video (1-2 first/last frames).
|
|
2175
|
+
--request-id <uuid> Reuse this ID with identical arguments to recover the original billed task.
|
|
2172
2176
|
seedance-2.5 Defaults to Eco; 4-30s; 1080p default, 720p/2k/4k; multimodal refs.
|
|
2173
2177
|
seedance-2.5-eco 480p generation → ByteDance Fast; 1080p default, 2k/4k.
|
|
2174
2178
|
minimax-h3 4-15s; 768p default or 2k; image/video/audio feature refs.
|
|
@@ -2208,6 +2212,80 @@ Run "makaron video create --help" for every model, option, example, and limit.
|
|
|
2208
2212
|
`);
|
|
2209
2213
|
}
|
|
2210
2214
|
|
|
2215
|
+
function printLayerizeHelp() {
|
|
2216
|
+
console.log(`Usage: makaron layerize --image <file|https-url> [--project <id>] [--json]
|
|
2217
|
+
makaron layerize status <jobId> --project <id> [--json]
|
|
2218
|
+
|
|
2219
|
+
--max-outputs <2..100> Maximum images including background (default 8)
|
|
2220
|
+
--quality <id> auto, 1K, 1.5K, 2K (default 1K)
|
|
2221
|
+
--editable-text Convert recognized text to editable design text; fonts may differ
|
|
2222
|
+
--prompt <text> Elements or regions to separate
|
|
2223
|
+
--request-id <uuid> Reuse the original request after interruption
|
|
2224
|
+
--no-wait Return the job and Makaron editing URL immediately
|
|
2225
|
+
|
|
2226
|
+
Returns a normal Makaron design. Open projectUrl to move/scale, reorder, delete/restore layers or edit
|
|
2227
|
+
recognized text. Charges actual output images once; query the same job to recover.
|
|
2228
|
+
Chat alternative: makaron chat --project auto --image poster.png "拆成图层,文字可编辑"
|
|
2229
|
+
`);
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
async function runLayerize(args) {
|
|
2233
|
+
const { baseUrl, headers } = getAuth();
|
|
2234
|
+
const options = {};
|
|
2235
|
+
const flags = new Set(['--json', '--editable-text', '--no-wait']);
|
|
2236
|
+
const valued = new Set(['--image', '--project', '--max-outputs', '--quality', '--prompt', '--request-id']);
|
|
2237
|
+
const statusOnly = args[1] === 'status';
|
|
2238
|
+
for (let i = statusOnly ? 3 : 1; i < args.length; i++) {
|
|
2239
|
+
const arg = args[i];
|
|
2240
|
+
if (flags.has(arg)) options[arg] = true;
|
|
2241
|
+
else if (valued.has(arg) && args[i + 1] && !args[i + 1].startsWith('--')) options[arg] = args[++i];
|
|
2242
|
+
else throw new Error(`Unknown or incomplete layerize option: ${arg}`);
|
|
2243
|
+
}
|
|
2244
|
+
const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
2245
|
+
let projectId = options['--project'];
|
|
2246
|
+
const jobId = statusOnly ? args[2] : options['--request-id'] || randomUUID();
|
|
2247
|
+
const n = Number(options['--max-outputs'] || 8), quality = options['--quality'] || '1K';
|
|
2248
|
+
if (!uuid.test(jobId || '') || (projectId && !uuid.test(projectId))) throw new Error('Use valid project/request UUIDs.');
|
|
2249
|
+
if (!statusOnly && (!options['--image'] || !Number.isSafeInteger(n) || n < 2 || n > 100 || !['auto', '1K', '1.5K', '2K'].includes(quality))) throw new Error('Provide --image and valid layerize options; see layerize --help.');
|
|
2250
|
+
if (statusOnly && !projectId) throw new Error('status requires --project <id>.');
|
|
2251
|
+
const request = async (route, body) => {
|
|
2252
|
+
const response = await fetch(`${baseUrl}${route}`, { headers: { ...headers, 'Content-Type': 'application/json' }, ...(body ? { method: 'POST', body: JSON.stringify(body) } : {}) });
|
|
2253
|
+
const data = await response.json();
|
|
2254
|
+
if (!response.ok) throw new Error(data.error || `Layerize HTTP ${response.status}`);
|
|
2255
|
+
return data;
|
|
2256
|
+
};
|
|
2257
|
+
let result;
|
|
2258
|
+
if (!statusOnly) {
|
|
2259
|
+
if (!projectId) {
|
|
2260
|
+
projectId = (await request('/api/projects/create', { title: 'Layerized image' })).projectId;
|
|
2261
|
+
const privacy = await fetch(`${baseUrl}/api/projects/${projectId}/share`, { method: 'PATCH', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ is_public: false }) });
|
|
2262
|
+
if (!privacy.ok || (await request(`/api/projects/${projectId}/share`)).is_public !== false) throw new Error('Could not confirm private project; no decomposition was submitted.');
|
|
2263
|
+
}
|
|
2264
|
+
let imageUrl = options['--image'];
|
|
2265
|
+
if (!isHttpUrl(imageUrl)) [imageUrl] = await uploadImageFilesViaSignedUrl(baseUrl, headers, projectId, [imageUrl]);
|
|
2266
|
+
if (!imageUrl.startsWith('https://')) throw new Error('Layerize requires an uploaded HTTPS original.');
|
|
2267
|
+
// Attach the source once, only for a new job. A resumed request uses status instead.
|
|
2268
|
+
if (!options['--request-id']) await request('/api/projects/create', { _addToProject: projectId, imageUrls: [imageUrl] });
|
|
2269
|
+
process.stderr.write(`Layerize job: ${jobId}\nProject: ${projectId}\nRecovery: makaron layerize status ${jobId} --project ${projectId}\n`);
|
|
2270
|
+
// A paid submission is deliberately never retried on a transport error.
|
|
2271
|
+
result = await request('/api/layerize', { projectId, requestId: jobId, imageUrl, maxOutputs: n, quality, prompt: options['--prompt'], editableText: options['--editable-text'] === true });
|
|
2272
|
+
} else result = await request(`/api/layerize?projectId=${projectId}&jobId=${jobId}`);
|
|
2273
|
+
process.stderr.write(`Edit in Makaron: ${result.projectUrl}\n`);
|
|
2274
|
+
const deadline = Date.now() + 8 * 60_000;
|
|
2275
|
+
while (!options['--no-wait'] && ['preparing', 'processing'].includes(result.status) && Date.now() < deadline) {
|
|
2276
|
+
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
2277
|
+
result = await request(`/api/layerize?projectId=${projectId}&jobId=${jobId}`);
|
|
2278
|
+
}
|
|
2279
|
+
if (options['--json']) console.log(JSON.stringify(result));
|
|
2280
|
+
else {
|
|
2281
|
+
console.log(`${result.status === 'completed' ? 'Layers ready. Edit in Makaron' : result.status}: ${result.projectUrl}`);
|
|
2282
|
+
if (result.status !== 'completed') console.log(`Job: ${result.jobId}`);
|
|
2283
|
+
if (result.message) console.log(result.message);
|
|
2284
|
+
if (result.status !== 'completed') console.log(`Resume: makaron layerize status ${jobId} --project ${projectId}`);
|
|
2285
|
+
}
|
|
2286
|
+
if (['failed', 'uncertain'].includes(result.status)) process.exitCode = 1;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2211
2289
|
function printRootHelp() {
|
|
2212
2290
|
console.log(`Makaron CLI — Talk to Makaron Agent from the terminal
|
|
2213
2291
|
|
|
@@ -2230,6 +2308,9 @@ Commands:
|
|
|
2230
2308
|
create --image-url <url> Create project from URL
|
|
2231
2309
|
create --title "name" Create empty project (text-to-image)
|
|
2232
2310
|
|
|
2311
|
+
layerize --image <file|url> Split into editable design layers; returns Makaron edit URL
|
|
2312
|
+
layerize status <jobId> --project <id> Recover the same layer task
|
|
2313
|
+
|
|
2233
2314
|
chat --project <id> "message" Chat (non-blocking, polls for result)
|
|
2234
2315
|
chat --project <id> --image <file> Attach an image or visual reference
|
|
2235
2316
|
chat --project <id> --skill <id> Use a built-in or marketplace skill
|
|
@@ -2322,6 +2403,7 @@ function setupMakaron(values = []) {
|
|
|
2322
2403
|
}
|
|
2323
2404
|
|
|
2324
2405
|
function printHelp(topic, subtopic) {
|
|
2406
|
+
if (topic === 'layerize') { printLayerizeHelp(); return; }
|
|
2325
2407
|
if (topic === 'login') {
|
|
2326
2408
|
console.log('Usage: makaron login');
|
|
2327
2409
|
} else if (topic === 'create') {
|
|
@@ -2410,7 +2492,7 @@ Not sure which built-in skill to use? Start with:
|
|
|
2410
2492
|
} else if (topic === 'video') {
|
|
2411
2493
|
if (subtopic === 'script') console.log('Usage: makaron video script --image <file> [--image <file>] [--lang en|zh] "direction"');
|
|
2412
2494
|
else if (subtopic === 'create') printVideoCreateHelp();
|
|
2413
|
-
else if (subtopic === 'retake') console.log('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.');
|
|
2495
|
+
else if (subtopic === 'retake') console.log('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|seedance-2.5-flash|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated] [--video-resolution <resolution>]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.');
|
|
2414
2496
|
else if (subtopic === 'status') console.log('Usage: makaron video status <taskId> | --snapshot <snapshotId> [--wait]');
|
|
2415
2497
|
else printVideoHelp();
|
|
2416
2498
|
} else if (topic === 'music') {
|
|
@@ -2552,6 +2634,8 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
2552
2634
|
process.exit(1);
|
|
2553
2635
|
}
|
|
2554
2636
|
await createProject(baseUrl, headers, opts);
|
|
2637
|
+
} else if (command === 'layerize') {
|
|
2638
|
+
try { await runLayerize(args); } catch (error) { console.error(error.message + '\nRetain the printed job ID; query status before any new submission.'); process.exitCode = 1; }
|
|
2555
2639
|
} else if (command === 'chat') {
|
|
2556
2640
|
if (args.includes('--help') || args.includes('-h')) {
|
|
2557
2641
|
printChatHelp();
|
|
@@ -3352,14 +3436,16 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3352
3436
|
else if ((flag === '--model' || flag === '--video-model') && args[i + 1]) params.model = args[++i];
|
|
3353
3437
|
else if (flag === '--project' && args[i + 1]) params.project_id = args[++i];
|
|
3354
3438
|
else if (flag === '--request-id' && args[i + 1]) params.request_id = args[++i];
|
|
3355
|
-
else
|
|
3439
|
+
else if (flag === '--video-resolution' && args[i + 1]) params.video_resolution = args[++i];
|
|
3440
|
+
else { console.error('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|seedance-2.5-flash|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated] [--video-resolution <resolution>]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.'); process.exit(1); }
|
|
3356
3441
|
}
|
|
3357
3442
|
if (!params.video_url || !params.prompt || !Number.isFinite(params.start) || !Number.isFinite(params.end)
|
|
3358
3443
|
|| params.start < 0 || params.end - params.start < .1 || params.end - params.start > 15
|
|
3359
3444
|
|| (params.audio_mode && !['original','generated'].includes(params.audio_mode))
|
|
3360
|
-
|| !['seedance-2.5-eco', 'seedance-2.5', 'fal-h3-max', 'kling-4', 'kling-4-flash', 'wan-3.0', 'wan-3.0-prime', 'grok', 'google-omni', 'minimax-h3'].includes(params.model)) {
|
|
3445
|
+
|| !['seedance-2.5-eco', 'seedance-2.5', 'seedance-2.5-flash', 'fal-h3-max', 'kling-4', 'kling-4-flash', 'wan-3.0', 'wan-3.0-prime', 'grok', 'google-omni', 'minimax-h3'].includes(params.model)) {
|
|
3361
3446
|
console.error('Retake needs one video, a prompt, a valid 0.1–15 second interval, and a supported model.'); process.exit(1);
|
|
3362
3447
|
}
|
|
3448
|
+
if (params.video_resolution && (!['480p','720p','768p','1080p'].includes(params.video_resolution) || (params.model === 'seedance-2.5-flash' && !['480p','720p'].includes(params.video_resolution)))) { console.error('Choose a supported Retake resolution; Flash supports 480p/720p only.'); process.exit(1); }
|
|
3363
3449
|
if (!isHttpUrl(params.video_url)) {
|
|
3364
3450
|
if (!params.project_id) { console.error('Local video upload requires --project <id>.'); process.exit(1); }
|
|
3365
3451
|
const valid = validateVideoFileForAnalysis(params.video_url);
|
|
@@ -3383,9 +3469,9 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3383
3469
|
const videos = [];
|
|
3384
3470
|
const audios = [];
|
|
3385
3471
|
const referenceVoices = [];
|
|
3386
|
-
let script = '', duration = undefined, aspectRatio = undefined, videoModel = undefined, videoResolution = undefined, wait = false;
|
|
3472
|
+
let script = '', duration = undefined, aspectRatio = undefined, videoModel = undefined, videoResolution = undefined, imageWorkflow = undefined, wait = false;
|
|
3387
3473
|
let keepOriginalSound = false, videoOperation = undefined, extendDirection = undefined, outputFormat = undefined;
|
|
3388
|
-
let generateAudio = undefined, contentFilter = undefined, webSearch = false;
|
|
3474
|
+
let generateAudio = undefined, contentFilter = undefined, webSearch = false, billingRequestId = undefined;
|
|
3389
3475
|
for (let i = 2; i < args.length; i++) {
|
|
3390
3476
|
if (args[i] === '--image' && args[i + 1]) images.push(args[++i]);
|
|
3391
3477
|
else if (args[i] === '--video' && args[i + 1]) videos.push(args[++i]);
|
|
@@ -3403,6 +3489,8 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3403
3489
|
else if (args[i] === '--video-resolution' && args[i + 1]) videoResolution = args[++i];
|
|
3404
3490
|
else if (args[i] === '--resolution' && args[i + 1]) videoResolution = args[++i];
|
|
3405
3491
|
else if (args[i] === '--keep-original-sound') keepOriginalSound = true;
|
|
3492
|
+
else if (args[i] === '--image-workflow' && args[i + 1]) imageWorkflow = args[++i];
|
|
3493
|
+
else if (args[i] === '--request-id' && args[i + 1]) billingRequestId = args[++i];
|
|
3406
3494
|
else if (args[i] === '--video-operation' && args[i + 1]) videoOperation = args[++i];
|
|
3407
3495
|
else if (args[i] === '--extend-direction' && args[i + 1]) extendDirection = args[++i];
|
|
3408
3496
|
else if (args[i] === '--output-format' && args[i + 1]) outputFormat = args[++i];
|
|
@@ -3427,9 +3515,13 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3427
3515
|
: ['kling4-flash', 'kling-4.0-flash', 'kling 4.0 flash', 'kling 4 flash'].includes(String(videoModel).toLowerCase()) ? 'kling-4-flash'
|
|
3428
3516
|
: ['omni', 'gemini-omni', 'gemini-omni-1.2', 'gemini-omni-1.2-flash', 'omni-1.2', 'gemini omni', 'gemini omni 1.2'].includes(String(videoModel).toLowerCase()) ? 'google-omni'
|
|
3429
3517
|
: (videoModel || (duration != null && duration > 20 ? 'seedance-2.5' : 'kling-4-flash'));
|
|
3518
|
+
if (billingRequestId && !/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(billingRequestId)) {
|
|
3519
|
+
console.error('--request-id must be a UUID. Reuse it only for the identical submission.'); process.exit(1);
|
|
3520
|
+
}
|
|
3521
|
+
const isFlash = selectedVideoModel === 'seedance-2.5-flash';
|
|
3430
3522
|
const isSeedance25 = ['seedance-2.5', 'seedance-2.5-eco'].includes(selectedVideoModel);
|
|
3431
3523
|
const isWan30 = selectedVideoModel === 'wan-3.0' || selectedVideoModel === 'wan-3.0-prime';
|
|
3432
|
-
const isSeedanceModel = selectedVideoModel === 'seedance-fast' || selectedVideoModel === 'seedance-mini' || selectedVideoModel === 'seedance' || isSeedance25;
|
|
3524
|
+
const isSeedanceModel = selectedVideoModel === 'seedance-fast' || selectedVideoModel === 'seedance-mini' || selectedVideoModel === 'seedance' || isSeedance25 || isFlash;
|
|
3433
3525
|
const isMinimaxH3 = selectedVideoModel === 'minimax-h3';
|
|
3434
3526
|
const isFalH3Max = selectedVideoModel === 'minimax-h3-max';
|
|
3435
3527
|
const isFalReference = selectedVideoModel === 'fal-h3-max';
|
|
@@ -3452,6 +3544,12 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3452
3544
|
if (isKling4 && script.length > 2500) { console.error(`${kling4Label} scripts are limited to 2500 characters (this one has ${script.length}). Shorten the script, or choose another model with --video-model.`); process.exit(1); }
|
|
3453
3545
|
if (isFalReference && (images.length > 9 || videos.length > 3 || audios.length > 3 || images.length + videos.length + audios.length > 12)) { console.error('FAL H3 Max accepts at most 9 images, 3 videos, 3 audios, 12 total.'); process.exit(1); }
|
|
3454
3546
|
if (isFalReference && duration != null && (!Number.isInteger(duration) || duration < 5 || duration > 15)) { console.error('FAL H3 Max output duration must be an integer from 5 to 15 seconds.'); process.exit(1); }
|
|
3547
|
+
if (isFlash && (images.length > 10 || videos.length > 5 || audios.length > 5)) { console.error('Seedance 2.5 Flash accepts at most 10 images,5 videos and5 audios.'); process.exit(1); }
|
|
3548
|
+
if (isFlash && duration != null && (!Number.isInteger(duration) || duration < 4 || duration > 30)) { console.error('Seedance 2.5 Flash duration must be an integer 4–30 seconds.'); process.exit(1); }
|
|
3549
|
+
if (isFlash && videoResolution && !['auto', '480p', '720p'].includes(videoResolution)) { console.error('Seedance 2.5 Flash supports only 480p/720p.'); process.exit(1); }
|
|
3550
|
+
if (isFlash && (videoOperation === 'extend' || extendDirection || outputFormat === 'mov' || webSearch || contentFilter === false)) { console.error('Flash has no extend, draft, MOV, web search or relaxed-filter mode.'); process.exit(1); }
|
|
3551
|
+
if (imageWorkflow && (!isFlash || !['reference-to-video', 'image-to-video'].includes(imageWorkflow))) { console.error('--image-workflow is supported for Flash reference-to-video or image-to-video only.'); process.exit(1); }
|
|
3552
|
+
if (isFlash && imageWorkflow === 'image-to-video' && (!images.length || images.length > 2 || videos.length || audios.length)) { console.error('Flash first/last frames need1–2 images only.'); process.exit(1); }
|
|
3455
3553
|
if (isSeedance25 && images.length > 30) { console.error('Seedance 2.5 supports at most 30 image references.'); process.exit(1); }
|
|
3456
3554
|
if (isSeedance25 && videos.length > 10) { console.error('Seedance 2.5 supports at most 10 video references.'); process.exit(1); }
|
|
3457
3555
|
if (isSeedance25 && audios.length > 10) { console.error('Seedance 2.5 supports at most 10 audio references.'); process.exit(1); }
|
|
@@ -3484,12 +3582,12 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3484
3582
|
process.exit(1);
|
|
3485
3583
|
}
|
|
3486
3584
|
|
|
3487
|
-
const inferredOperation = videoOperation || ((isSeedance25 || isGrok) && videos.length ? 'edit' : 'generate');
|
|
3488
|
-
let providerMaxDuration = isSeedance25 ? SEEDANCE25_MAX_VIDEO_REFERENCE_DURATION : MAX_VIDEO_PROVIDER_REFERENCE_DURATION;
|
|
3585
|
+
const inferredOperation = videoOperation || ((isSeedance25 || isFlash || isGrok) && videos.length ? 'edit' : 'generate');
|
|
3586
|
+
let providerMaxDuration = isSeedance25 || isFlash ? SEEDANCE25_MAX_VIDEO_REFERENCE_DURATION : MAX_VIDEO_PROVIDER_REFERENCE_DURATION;
|
|
3489
3587
|
if (isGrok) providerMaxDuration = inferredOperation === 'edit' ? 8.7 : 15;
|
|
3490
3588
|
if (isSyncLipsync) providerMaxDuration = 60;
|
|
3491
3589
|
if (isKling4) providerMaxDuration = kling4MaxSeconds;
|
|
3492
|
-
const providerMaxPixels = isSyncLipsync || isMinimaxH3 || isWan30 || isKling4 ? Infinity : isSeedance25 ? SEEDANCE25_MAX_VIDEO_FRAME_PIXELS : MAX_VIDEO_FRAME_PIXELS;
|
|
3590
|
+
const providerMaxPixels = isSyncLipsync || isMinimaxH3 || isWan30 || isKling4 ? Infinity : isSeedance25 || isFlash ? SEEDANCE25_MAX_VIDEO_FRAME_PIXELS : MAX_VIDEO_FRAME_PIXELS;
|
|
3493
3591
|
const localImages = images.filter(image => !isHttpUrl(image));
|
|
3494
3592
|
if (localImages.length) {
|
|
3495
3593
|
const uploadedImages = await uploadImageFilesViaSignedUrl(baseUrl, headers, undefined, localImages);
|
|
@@ -3504,7 +3602,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3504
3602
|
maxDuration: providerMaxDuration,
|
|
3505
3603
|
durationTolerance: MAX_VIDEO_PROVIDER_REFERENCE_DURATION_TOLERANCE,
|
|
3506
3604
|
maxFramePixels: providerMaxPixels,
|
|
3507
|
-
maxFileSize: isWan30 ? MULEROUTER_WAN_MAX_VIDEO_FILE_SIZE : isSeedance25 || isSyncLipsync || isKling4 ? 200 * 1024 * 1024 : MAX_VIDEO_PROVIDER_REFERENCE_FILE_SIZE,
|
|
3605
|
+
maxFileSize: isWan30 ? MULEROUTER_WAN_MAX_VIDEO_FILE_SIZE : isSeedance25 || isFlash || isSyncLipsync || isKling4 ? 200 * 1024 * 1024 : MAX_VIDEO_PROVIDER_REFERENCE_FILE_SIZE,
|
|
3508
3606
|
...(isKling4 ? {
|
|
3509
3607
|
allowedExtensions: ['mp4', 'mov'], minSide: 720, maxSide: 2160,
|
|
3510
3608
|
} : isGrok ? {
|
|
@@ -3540,7 +3638,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3540
3638
|
const audioUrls = [];
|
|
3541
3639
|
for (const audio of audios) {
|
|
3542
3640
|
if (isHttpUrl(audio)) { audioUrls.push(audio); continue; }
|
|
3543
|
-
const valid = validateAudioReferenceFile(audio, { maxDuration: isSyncLipsync ? 60 : isSeedance25 ? 30 : MAX_AUDIO_REFERENCE_DURATION });
|
|
3641
|
+
const valid = validateAudioReferenceFile(audio, { maxDuration: isSyncLipsync ? 60 : isSeedance25 || isFlash ? 30 : MAX_AUDIO_REFERENCE_DURATION });
|
|
3544
3642
|
if (!valid.ok) { console.error(`❌ ${valid.error}`); process.exit(1); }
|
|
3545
3643
|
process.stderr.write(`🎵 Uploading ${path.basename(audio)}...\n`);
|
|
3546
3644
|
const uploaded = await uploadFileViaSignedUrl(baseUrl, headers, undefined, audio, valid.mime, { uploadKind: 'audio' });
|
|
@@ -3552,7 +3650,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3552
3650
|
const resolvedOperation = inferredOperation;
|
|
3553
3651
|
const vArgs = isSyncLipsync
|
|
3554
3652
|
? { script, images, videoUrls, audioUrls, videoModel: selectedVideoModel, videoResolution }
|
|
3555
|
-
: isSeedance25 || isWan30 || isGrok
|
|
3653
|
+
: isSeedance25 || isFlash || isWan30 || isGrok
|
|
3556
3654
|
? { script, images, videoUrls, audioUrls, referenceVoiceIds: referenceVoices, videoModel: selectedVideoModel, videoResolution, operation: resolvedOperation, extendDirection, outputFormat, generateAudio, contentFilter, webSearch }
|
|
3557
3655
|
: isMinimaxH3 || isFalReference
|
|
3558
3656
|
? { script, images, videoUrls, audioUrls, videoModel: selectedVideoModel, videoResolution }
|
|
@@ -3561,12 +3659,14 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
|
|
|
3561
3659
|
: videoUrls[0]
|
|
3562
3660
|
? { videoUrl: videoUrls[0], editPrompt: script, images, videoModel: selectedVideoModel, videoResolution, referType: isSeedanceModel ? 'feature' : 'base' }
|
|
3563
3661
|
: { script, images, videoModel: selectedVideoModel, videoResolution };
|
|
3662
|
+
if (imageWorkflow) vArgs.imageWorkflow = imageWorkflow;
|
|
3663
|
+
if (billingRequestId) vArgs.billingRequestId = billingRequestId;
|
|
3564
3664
|
if (inputVideoMeta?.duration) vArgs.referenceVideoDuration = inputVideoMeta.duration;
|
|
3565
3665
|
const effectiveDuration = resolvedOperation === 'edit' ? undefined : duration || (inputVideoMeta?.duration ? Math.min(providerMaxDuration, Math.round(inputVideoMeta.duration)) : undefined);
|
|
3566
3666
|
if (effectiveDuration) vArgs.duration = effectiveDuration;
|
|
3567
3667
|
if (aspectRatio) vArgs.aspectRatio = aspectRatio;
|
|
3568
3668
|
if (keepOriginalSound && videoUrls.length && !isSeedance25) vArgs.keepOriginalSound = true;
|
|
3569
|
-
const result = await callMcpTool(baseUrl, headers, videoUrls.length && !isSeedance25 && !isWan30 && !isGrok && !isMinimaxH3 && !isFalReference && !isSyncLipsync ? 'makaron_edit_video' : 'makaron_create_video', vArgs);
|
|
3669
|
+
const result = await callMcpTool(baseUrl, headers, videoUrls.length && !isSeedance25 && !isFlash && !isWan30 && !isGrok && !isMinimaxH3 && !isFalReference && !isSyncLipsync ? 'makaron_edit_video' : 'makaron_create_video', vArgs);
|
|
3570
3670
|
const text = result?.content?.find(c => c.type === 'text')?.text;
|
|
3571
3671
|
if (text) {
|
|
3572
3672
|
console.log(text);
|
package/package.json
CHANGED
package/skills/makaron/SKILL.md
CHANGED
|
@@ -389,6 +389,8 @@ Segment edits have two intents: modify changes the inside of the existing sequen
|
|
|
389
389
|
|
|
390
390
|
Chat segment inspection also reads source speech through ASR, reusing cached transcripts. It returns selected speech with source/output timecodes separately from adjacent speech, so the edit can follow the retained narration. Original audio is the default; Chat may select `audio_mode: generated` for requested new sound inside the selection. ASR does not guarantee music-beat or lip synchronization, and unavailable/untimed speech is reported rather than assigned invented timings. Direct `video retake` uses the caller's completed prompt and does not perform Agent interpretation or ASR planning.
|
|
391
391
|
|
|
392
|
+
Seedance 2.5 Flash Retake: explicitly select `--model seedance-2.5-flash`; source >=4s, selection 0.1–15s, with at least 4s editing context. `--video-resolution 480p|720p` (default 720p); original audio is retained unless `--audio-mode generated` is explicit. No native exact final/middle-frame locks. The edited range is assembled back into the original duration; outside footage stays in place. Keep the request ID and poll the same root task.
|
|
393
|
+
|
|
392
394
|
`video retake` uses original-source seconds, accepts a 0.1–15s range in a source up to 120s, and automatically replaces only that range while preserving duration. Audio defaults to original; `--audio-mode generated` uses synchronized new audio inside the selection and source audio outside. Models: `grok` (native edit, source >=1s, selection <=8.5s, max 720p, source video only), `google-omni` (native edit, source >=3s, selection <=15s), `minimax-h3` (reference-guided rebuilding, source >=2s), `wan-3.0` / `wan-3.0-prime` (reference-guided rebuilding, source >=1s, no native endpoint locks), `kling-4` (default, source >=3s, original audio only), `fal-h3-max`, `seedance-2.5-eco` (preferred Seedance option), and explicitly selected native `seedance-2.5`. For sources shorter than 3 seconds, explicitly select a compatible model: H3 for sources >=2s or Seedance for shorter sources. Generated audio requires an explicitly selected compatible model. Grok/Omni/MiniMax have no exact final/middle/corrected-frame controls in Retake. Local files require `--project`. Keep the root taskId and request ID; resume polling or replay the same request ID instead of paying for another generation.
|
|
393
395
|
|
|
394
396
|
`video create` returns a provider task id and does not create or update a Makaron project timeline. For project/timeline video editing, use:
|
|
@@ -405,6 +407,8 @@ Provider integration contract: every image passed to video generation is a featu
|
|
|
405
407
|
|
|
406
408
|
fal H3 Turbo uses the `minimax-h3-max` selector, supports exactly 5/10/15 seconds at 480p/768p, and defaults to native 768p for faster-than-real-time T2V or one-start-image I2V.
|
|
407
409
|
|
|
410
|
+
Seedance 2.5 Flash: explicitly select `--video-model seedance-2.5-flash`; generation is integer 4–30s at480p/720p (default720p). Up to10images,5videos(each2–30s,total≤30s),5audios(total≤30s). Images are feature references by default; `--image-workflow image-to-video` locks1–2 first/last frames with no video/audio inputs. Use `--video-operation generate` for video references or `edit` for exactly one4–30s source; edit and first/last frames follow source canvas. Edit follows source duration: omit duration, never -1. Native synchronized audio is included. No extend, draft, MOV, web-search, relaxed content filter or native1080p/4K. Keep the returned task ID and poll it; never silently substitute Eco or another model. This candidate needs its additive media-pricing migration before live product billing can submit.
|
|
411
|
+
|
|
408
412
|
Seedance 2.5 uses `--video-model seedance-2.5` or `seedance-2.5-eco` for 4-30s videos: generate at 480p, then automatically upscale to 720p, 1080p (default), 2K or 4K in one task. This is upscaled output. Use `seedance-2.5-native` explicitly for unenhanced native output at 480p (default) or 720p; the native Evolink route does not expose 4K. All Seedance 2.5 routes accept up to 30 images + 10 videos + 10 audios, repeatable local/URL references, `--video-operation generate|edit|extend`, `--extend-direction`, and `--web-search`. Eco delivers MP4; native also supports `--output-format mov`. Use `makaron chat` to enhance an existing video without regeneration, or MCP `makaron_upscale_video` with one video URL and `resolution=720p|1080p|2k|4k` (up to 60s).
|
|
409
413
|
|
|
410
414
|
Wan 3.0 exposes two model choices: `--video-model wan-3.0` and the faster `--video-model wan-3.0-prime`. Both support 2-30s generation, native audio, up to 10 images + 5 videos + 5 audios, and 480p/720p/1080p/2K/4K. Pass `--video-resolution 2k|4k` to select the matching FlashVSR/Pro endpoint automatically; Pro is not a separate model selector. Use generation mode with feature references; typed edit/extend and the relaxed content-filter flag are not supported.
|
|
@@ -572,3 +576,15 @@ The legacy `openai` image-model parameter now resolves to GPT Image 2.6 Flare.
|
|
|
572
576
|
Naming Seedance 2.5 in chat defaults to Seedance 2.5 Eco. Use `seedance-2.5-native` only when explicitly requesting native generation; Eco supports 720p/1080p/2K/4K final delivery.
|
|
573
577
|
|
|
574
578
|
Seedream 5.5 (`--image-model seedream-5.5`) uses EvoLink, accepts at most 10 ordered inputs (base included), `--image-resolution 1K|1.5K|2K`, and `--output-format png|jpeg` (default PNG). `--background transparent` requires native PNG alpha. Quality/reasoning/GIF/SVG controls are unsupported. It never participates in Auto or switches providers after failure. Direct `makaron edit --image/--ref` uploads local originals automatically; direct MCP callers must supply public HTTPS PNG/JPEG/WebP originals. Accepted task receipts are saved to the user workspace before polling. The server must configure `EVOLINK_API_KEY` and an exact active `seedream-5.5` pricing row before use.
|
|
579
|
+
|
|
580
|
+
### Image layer decomposition
|
|
581
|
+
|
|
582
|
+
```bash
|
|
583
|
+
makaron chat --project auto --image poster.png "拆成图层,文字可以编辑,返回 Makaron 编辑链接"
|
|
584
|
+
makaron layerize --image poster.png --max-outputs 8 --quality 1K --editable-text --json
|
|
585
|
+
makaron layerize status <jobId> --project <projectId> --json
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
Both paths return a Makaron `projectUrl`. Open it to edit the standard design in the GUI: move/scale image layers, reorder or delete/restore layers, and edit recognized text. Default raster layers preserve the decomposed appearance; `--editable-text` replaces recognized text with ordinary editable design text using approximate fonts. Decorative text can remain raster. The original image and PNG layers remain in the project/workspace. No new GUI renderer is required.
|
|
589
|
+
|
|
590
|
+
`--project` reuses a project; otherwise the direct command creates a private project. `--max-outputs` is 2–100 including the background (default 8); quality is `auto|1K|1.5K|2K` (default `1K` for faster decomposition). One quality setting applies to the whole task; per-layer resolution controls are unavailable. Use an explicit higher tier or `auto` when preserving source resolution is required. The actual output count and pixel tiers determine one task charge. Failed or uncertain submissions are never replayed automatically; retain the printed job ID and query status. Repeated status reads preserve saved GUI edits and do not debit again. When the layers are ready, the edit link opens the resulting snapshot.
|