@bonginkan/maria 4.3.15 → 4.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/READY.manifest.json +1 -1
- package/dist/bin/maria.cjs +147 -61
- package/dist/bin/maria.cjs.map +1 -1
- package/dist/cli.cjs +147 -61
- package/dist/cli.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/express-server.cjs +255 -59
- package/dist/server/express-server.js +255 -59
- package/dist/server-express.cjs +255 -59
- package/dist/server-express.cjs.map +1 -1
- package/package.json +2 -2
- package/src/slash-commands/READY.manifest.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MARIA - AI Development Platform v4.3.
|
|
1
|
+
# MARIA - AI Development Platform v4.3.17
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@bonginkan/maria)
|
|
4
4
|
[](LICENSE)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
> **Enterprise-grade AI development platform with 100% command availability and comprehensive fallback support**
|
|
12
12
|
|
|
13
|
-
## 🚀 What's New in v4.3.
|
|
13
|
+
## 🚀 What's New in v4.3.17 (September 16, 2025)
|
|
14
14
|
|
|
15
15
|
### 🎯 Interactive Improvements & Choice Memory
|
|
16
16
|
- **Choice Memory System**: Smart persistence of user selections across sessions
|
|
@@ -96,7 +96,7 @@ maria /video "ocean waves crashing" --duration 10 --fps 30 --apply
|
|
|
96
96
|
maria /video "time-lapse clouds" --res 1920x1080 --format webm --apply
|
|
97
97
|
|
|
98
98
|
# Plan-only to preview parameters
|
|
99
|
-
maria /video "animation test" --duration
|
|
99
|
+
maria /video "animation test" --duration 8 --plan-only
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
### 🏗️ Build Status - All Systems Operational ✅
|
|
@@ -922,7 +922,7 @@ await secureWorkflow.executeWithAuth(workflowDefinition, securityContext);
|
|
|
922
922
|
### Quick Installation
|
|
923
923
|
```bash
|
|
924
924
|
# Install globally (recommended)
|
|
925
|
-
npm install -g @bonginkan/maria@4.3.
|
|
925
|
+
npm install -g @bonginkan/maria@4.3.17
|
|
926
926
|
|
|
927
927
|
# Verify installation
|
|
928
928
|
maria --version # Should show v4.3.9
|
|
@@ -1126,7 +1126,7 @@ MARIA CODE is distributed under a comprehensive licensing system designed for in
|
|
|
1126
1126
|
|
|
1127
1127
|
*MARIA v4.1.4 represents the pinnacle of multimodal AI development platform evolution - combining revolutionary voice-to-code capabilities, advanced memory systems, and comprehensive command ecosystems with enterprise-grade security and performance. This release establishes MARIA as the definitive choice for developers and Fortune 500 enterprises seeking intelligent, multimodal development experiences with GraphRAG intelligence, multilingual support, and zero-anxiety coding workflows.*
|
|
1128
1128
|
|
|
1129
|
-
**Transform your development experience today**: `npm install -g @bonginkan/maria@4.3.
|
|
1129
|
+
**Transform your development experience today**: `npm install -g @bonginkan/maria@4.3.17`
|
|
1130
1130
|
|
|
1131
1131
|
🌐 **Official Website**: [https://maria-code.ai](https://maria-code.ai)
|
|
1132
1132
|
💬 **Community**: [https://discord.gg/SMSmSGcEQy](https://discord.gg/SMSmSGcEQy)
|
package/dist/READY.manifest.json
CHANGED
package/dist/bin/maria.cjs
CHANGED
|
@@ -26038,8 +26038,8 @@ var require_package = __commonJS({
|
|
|
26038
26038
|
"package.json"(exports, module) {
|
|
26039
26039
|
module.exports = {
|
|
26040
26040
|
name: "@bonginkan/maria",
|
|
26041
|
-
version: "4.3.
|
|
26042
|
-
description: "\u{1F680} MARIA v4.3.
|
|
26041
|
+
version: "4.3.17",
|
|
26042
|
+
description: "\u{1F680} MARIA v4.3.17 - Enterprise AI Development Platform with identity system and character voice implementation. Features 74 production-ready commands with comprehensive fallback implementation, local LLM support, and zero external dependencies. Includes natural language coding, AI safety evaluation, intelligent evolution system, episodic memory with PII masking, and real-time monitoring dashboard. Built with TypeScript AST-powered code generation, OAuth2.0 + PKCE authentication, quantum-resistant cryptography, and enterprise-grade performance.",
|
|
26043
26043
|
keywords: [
|
|
26044
26044
|
"ai",
|
|
26045
26045
|
"cli",
|
|
@@ -28071,7 +28071,7 @@ var init_AuthenticationManager = __esm({
|
|
|
28071
28071
|
const response = await fetch(`${this.apiBase}/api/user/profile`, {
|
|
28072
28072
|
headers: {
|
|
28073
28073
|
"Authorization": `Bearer ${tokens2.accessToken}`,
|
|
28074
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.
|
|
28074
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.17"}`
|
|
28075
28075
|
}
|
|
28076
28076
|
});
|
|
28077
28077
|
if (response.status === 401) {
|
|
@@ -28703,7 +28703,7 @@ async function callApi(path60, init3 = {}) {
|
|
|
28703
28703
|
"Authorization": `Bearer ${token}`,
|
|
28704
28704
|
"X-Device-Id": getDeviceId(),
|
|
28705
28705
|
"X-Session-Id": getSessionId() || "",
|
|
28706
|
-
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.
|
|
28706
|
+
"User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.17"}`,
|
|
28707
28707
|
"Content-Type": init3.headers?.["Content-Type"] || "application/json"
|
|
28708
28708
|
});
|
|
28709
28709
|
const doFetch = async (token) => {
|
|
@@ -47436,7 +47436,7 @@ function normalizeVideoArgs(raw, root) {
|
|
|
47436
47436
|
if (!prompt) throw new Error("prompt required");
|
|
47437
47437
|
const out = {
|
|
47438
47438
|
prompt,
|
|
47439
|
-
duration:
|
|
47439
|
+
duration: 8,
|
|
47440
47440
|
fps: 24,
|
|
47441
47441
|
size: [1280, 720],
|
|
47442
47442
|
format: "mp4",
|
|
@@ -47567,6 +47567,15 @@ async function hasCaseInsensitiveCollision(dirFull, targetFile) {
|
|
|
47567
47567
|
async function atomicRename(stage, dest) {
|
|
47568
47568
|
try {
|
|
47569
47569
|
await fsp__namespace.rename(stage, dest);
|
|
47570
|
+
try {
|
|
47571
|
+
const fd = await fsp__namespace.open(dest, "r");
|
|
47572
|
+
try {
|
|
47573
|
+
await fd.sync();
|
|
47574
|
+
} finally {
|
|
47575
|
+
await fd.close();
|
|
47576
|
+
}
|
|
47577
|
+
} catch {
|
|
47578
|
+
}
|
|
47570
47579
|
} catch (e2) {
|
|
47571
47580
|
if (e2 && e2.code === "EXDEV") {
|
|
47572
47581
|
await fsp__namespace.copyFile(stage, dest);
|
|
@@ -47584,7 +47593,7 @@ async function atomicRename(stage, dest) {
|
|
|
47584
47593
|
}
|
|
47585
47594
|
async function saveArtifacts(ctx2, items, manifest) {
|
|
47586
47595
|
const root = ctx2.root;
|
|
47587
|
-
const base = ctx2.baseDir
|
|
47596
|
+
const base = typeof ctx2.baseDir === "string" ? ctx2.baseDir : "";
|
|
47588
47597
|
const trace = ctx2.trace || Math.random().toString(36).slice(2, 10).toUpperCase();
|
|
47589
47598
|
const stage = stageDir(root, trace);
|
|
47590
47599
|
ensureDirSync(stage);
|
|
@@ -47592,7 +47601,7 @@ async function saveArtifacts(ctx2, items, manifest) {
|
|
|
47592
47601
|
const dateSeg = datePath(/* @__PURE__ */ new Date());
|
|
47593
47602
|
const reqHash = manifest.request && manifest.request.promptHash || "sha256:unknown";
|
|
47594
47603
|
const slug = hashPrefix(reqHash, 6);
|
|
47595
|
-
const outDirSeg = `${base}
|
|
47604
|
+
const outDirSeg = ctx2.flat ? base || "" : `${base ? base + "/" : ""}${dateSeg}/${slug}`;
|
|
47596
47605
|
const outDir = safeJoin(root, outDirSeg).full;
|
|
47597
47606
|
ensureDirSync(outDir);
|
|
47598
47607
|
const saved = [];
|
|
@@ -47602,7 +47611,8 @@ async function saveArtifacts(ctx2, items, manifest) {
|
|
|
47602
47611
|
const ext2 = it.ext.startsWith(".") ? it.ext : `.${it.ext}`;
|
|
47603
47612
|
const baseName = it.logicalName ? `${it.logicalName}` : `${contentHash}`;
|
|
47604
47613
|
const fname = `${baseName}${ext2}`;
|
|
47605
|
-
const
|
|
47614
|
+
const relPath = outDirSeg ? `${outDirSeg}/${fname}` : `${fname}`;
|
|
47615
|
+
const dest = safeJoin(root, relPath);
|
|
47606
47616
|
validateWinPathEdge(dest.full);
|
|
47607
47617
|
if (await hasCaseInsensitiveCollision(path11__namespace.dirname(dest.full), path11__namespace.basename(dest.full))) {
|
|
47608
47618
|
throw new Error("case-insensitive filename collision");
|
|
@@ -47620,25 +47630,31 @@ async function saveArtifacts(ctx2, items, manifest) {
|
|
|
47620
47630
|
}
|
|
47621
47631
|
await fsp__namespace.writeFile(stg, it.bytes);
|
|
47622
47632
|
await atomicRename(stg, dest.full);
|
|
47623
|
-
|
|
47633
|
+
const relPosix = dest.rel.replace(/\\/g, "/");
|
|
47634
|
+
saved.push(relPosix);
|
|
47624
47635
|
}
|
|
47625
|
-
|
|
47626
|
-
|
|
47627
|
-
|
|
47628
|
-
|
|
47629
|
-
|
|
47630
|
-
|
|
47631
|
-
|
|
47632
|
-
|
|
47633
|
-
|
|
47634
|
-
|
|
47635
|
-
|
|
47636
|
-
|
|
47637
|
-
|
|
47636
|
+
if (!ctx2.skipManifest) {
|
|
47637
|
+
const manifestObj = {
|
|
47638
|
+
manifestVersion: 1,
|
|
47639
|
+
...manifest,
|
|
47640
|
+
createdAt: manifest.createdAt || (/* @__PURE__ */ new Date()).toISOString(),
|
|
47641
|
+
artifacts: manifest.artifacts && manifest.artifacts.length > 0 ? manifest.artifacts : saved.map((file) => ({ file, hash: `sha256:${path11__namespace.basename(file).split(".")[0]}` }))
|
|
47642
|
+
};
|
|
47643
|
+
const manifestPathRel = `${outDirSeg ? outDirSeg + "/" : ""}manifest.json`;
|
|
47644
|
+
const manifestStage = path11__namespace.join(stage, "manifest.json.part");
|
|
47645
|
+
const manifestFull = safeJoin(root, manifestPathRel).full;
|
|
47646
|
+
await fsp__namespace.writeFile(manifestStage, JSON.stringify(manifestObj, null, 2), "utf8");
|
|
47647
|
+
try {
|
|
47648
|
+
console.log(`[store] manifest -> ${manifestPathRel}`);
|
|
47649
|
+
} catch {
|
|
47650
|
+
}
|
|
47651
|
+
await atomicRename(manifestStage, manifestFull);
|
|
47652
|
+
await fsp__namespace.rm(stage, { recursive: true, force: true });
|
|
47653
|
+
return { files: saved, manifestPath: manifestPathRel.replace(/\\/g, "/") };
|
|
47654
|
+
} else {
|
|
47655
|
+
await fsp__namespace.rm(stage, { recursive: true, force: true });
|
|
47656
|
+
return { files: saved, manifestPath: "" };
|
|
47638
47657
|
}
|
|
47639
|
-
await atomicRename(manifestStage, manifestFull);
|
|
47640
|
-
await fsp__namespace.rm(stage, { recursive: true, force: true });
|
|
47641
|
-
return { files: saved, manifestPath: manifestPathRel };
|
|
47642
47658
|
} catch (e2) {
|
|
47643
47659
|
await fsp__namespace.rm(stage, { recursive: true, force: true });
|
|
47644
47660
|
throw e2;
|
|
@@ -47746,6 +47762,13 @@ var init_gemini_media = __esm({
|
|
|
47746
47762
|
`GeminiMediaProvider.generateImage request failed: model=${modelName}; prompt="${promptPreview}"; error=${errMsg}`
|
|
47747
47763
|
);
|
|
47748
47764
|
}
|
|
47765
|
+
const feedback = resp?.response?.promptFeedback;
|
|
47766
|
+
const blockReason = feedback?.blockReason || feedback?.block_reason;
|
|
47767
|
+
if (blockReason) {
|
|
47768
|
+
const modelName2 = this.primaryModel;
|
|
47769
|
+
const reason = String(blockReason);
|
|
47770
|
+
throw new Error(`GeminiMediaProvider.policy_violation: model=${modelName2}; reason=${reason}`);
|
|
47771
|
+
}
|
|
47749
47772
|
const parts = resp?.response?.candidates?.[0]?.content?.parts || [];
|
|
47750
47773
|
for (const p of parts) {
|
|
47751
47774
|
const data = p?.inlineData?.data || p?.inline_data?.data;
|
|
@@ -47919,7 +47942,7 @@ async function runImagePipeline(params2, opts) {
|
|
|
47919
47942
|
trace: Math.random().toString(36).slice(2, 8).toUpperCase()
|
|
47920
47943
|
};
|
|
47921
47944
|
const items = successes.filter(Boolean).map((b) => ({ bytes: b, ext: `.${params2.format}` }));
|
|
47922
|
-
const saved = await saveArtifacts({ root: opts.root, kind: "image", baseDir: opts.outDir }, items, manifest);
|
|
47945
|
+
const saved = await saveArtifacts({ root: opts.root, kind: "image", baseDir: opts.outDir, flat: true, skipManifest: true }, items, manifest);
|
|
47923
47946
|
progress.done();
|
|
47924
47947
|
return {
|
|
47925
47948
|
saved,
|
|
@@ -48311,7 +48334,7 @@ var init_image_command = __esm({
|
|
|
48311
48334
|
init_firestore();
|
|
48312
48335
|
init_cli_auth();
|
|
48313
48336
|
init_api_client();
|
|
48314
|
-
|
|
48337
|
+
init_cli_auth();
|
|
48315
48338
|
init_animations();
|
|
48316
48339
|
ImageCommand = class extends BaseCommand {
|
|
48317
48340
|
name = "image";
|
|
@@ -48360,12 +48383,13 @@ var init_image_command = __esm({
|
|
|
48360
48383
|
const fsMod = await import('fs/promises');
|
|
48361
48384
|
const savedPaths = [];
|
|
48362
48385
|
for (const f3 of filesInline) {
|
|
48363
|
-
const
|
|
48364
|
-
const
|
|
48386
|
+
const original = String(f3.file || "").replace(/^[\\/]+/, "");
|
|
48387
|
+
const name2 = pathMod.basename(original);
|
|
48388
|
+
const full = pathMod.resolve(root, name2);
|
|
48365
48389
|
await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
|
|
48366
48390
|
const buf = Buffer.from(String(f3.bytesBase64 || ""), "base64");
|
|
48367
48391
|
await fsMod.writeFile(full, buf);
|
|
48368
|
-
savedPaths.push(
|
|
48392
|
+
savedPaths.push(name2);
|
|
48369
48393
|
}
|
|
48370
48394
|
const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
|
|
48371
48395
|
const output4 = await formatImageOutput3(root, {
|
|
@@ -48373,18 +48397,18 @@ var init_image_command = __esm({
|
|
|
48373
48397
|
ok: savedPaths.length,
|
|
48374
48398
|
fail: 0,
|
|
48375
48399
|
files: savedPaths,
|
|
48376
|
-
manifestPath:
|
|
48400
|
+
manifestPath: "",
|
|
48377
48401
|
size: cli.size,
|
|
48378
48402
|
format: cli.format,
|
|
48379
48403
|
model: cli.model,
|
|
48380
48404
|
jobId: apiRes?.data?.jobId
|
|
48381
48405
|
});
|
|
48382
48406
|
try {
|
|
48383
|
-
const api =
|
|
48407
|
+
const api = cliAuth.getAPIClient();
|
|
48384
48408
|
await api.consumeQuota({ requests: 1, image: Math.max(1, savedPaths.length) });
|
|
48385
48409
|
} catch {
|
|
48386
48410
|
}
|
|
48387
|
-
return this.success(output4);
|
|
48411
|
+
return this.success(output4, void 0, void 0);
|
|
48388
48412
|
}
|
|
48389
48413
|
if (Array.isArray(filesList) && filesList.length > 0) {
|
|
48390
48414
|
const pathMod = await import('path');
|
|
@@ -48392,16 +48416,17 @@ var init_image_command = __esm({
|
|
|
48392
48416
|
const base = (process.env.MARIA_API_BASE || "https://api.maria-code.ai").replace(/\/$/, "");
|
|
48393
48417
|
const savedPaths = [];
|
|
48394
48418
|
for (const relRaw of filesList) {
|
|
48395
|
-
const
|
|
48396
|
-
const url2 = `${base}/${
|
|
48397
|
-
const
|
|
48419
|
+
const originalRel = String(relRaw || "").replace(/^[\\/]+/, "");
|
|
48420
|
+
const url2 = `${base}/${originalRel}`;
|
|
48421
|
+
const name2 = pathMod.basename(originalRel);
|
|
48422
|
+
const full = pathMod.resolve(root, name2);
|
|
48398
48423
|
await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
|
|
48399
48424
|
const res2 = await fetch(url2);
|
|
48400
48425
|
if (!res2.ok) throw new Error(`Failed to download image: ${res2.status}`);
|
|
48401
48426
|
const arrayBuf = await res2.arrayBuffer();
|
|
48402
48427
|
const buf = Buffer.from(arrayBuf);
|
|
48403
48428
|
await fsMod.writeFile(full, buf);
|
|
48404
|
-
savedPaths.push(
|
|
48429
|
+
savedPaths.push(name2);
|
|
48405
48430
|
}
|
|
48406
48431
|
const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
|
|
48407
48432
|
const output4 = await formatImageOutput3(root, {
|
|
@@ -48409,18 +48434,18 @@ var init_image_command = __esm({
|
|
|
48409
48434
|
ok: savedPaths.length,
|
|
48410
48435
|
fail: 0,
|
|
48411
48436
|
files: savedPaths,
|
|
48412
|
-
manifestPath:
|
|
48437
|
+
manifestPath: "",
|
|
48413
48438
|
size: cli.size,
|
|
48414
48439
|
format: cli.format,
|
|
48415
48440
|
model: cli.model,
|
|
48416
48441
|
jobId: apiRes?.data?.jobId
|
|
48417
48442
|
});
|
|
48418
48443
|
try {
|
|
48419
|
-
const api =
|
|
48444
|
+
const api = cliAuth.getAPIClient();
|
|
48420
48445
|
await api.consumeQuota({ requests: 1, image: Math.max(1, savedPaths.length) });
|
|
48421
48446
|
} catch {
|
|
48422
48447
|
}
|
|
48423
|
-
return this.success(output4);
|
|
48448
|
+
return this.success(output4, void 0, void 0);
|
|
48424
48449
|
}
|
|
48425
48450
|
if (urls.length > 0) {
|
|
48426
48451
|
const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
|
|
@@ -48429,19 +48454,19 @@ var init_image_command = __esm({
|
|
|
48429
48454
|
ok: urls.length,
|
|
48430
48455
|
fail: 0,
|
|
48431
48456
|
files: urls,
|
|
48432
|
-
manifestPath:
|
|
48457
|
+
manifestPath: "",
|
|
48433
48458
|
size: cli.size,
|
|
48434
48459
|
format: cli.format,
|
|
48435
48460
|
model: cli.model,
|
|
48436
48461
|
jobId: apiRes?.data?.jobId
|
|
48437
48462
|
});
|
|
48438
48463
|
try {
|
|
48439
|
-
const api =
|
|
48464
|
+
const api = cliAuth.getAPIClient();
|
|
48440
48465
|
const consumed = Math.max(1, urls.length || Number(cli.count || 1));
|
|
48441
48466
|
await api.consumeQuota({ requests: 1, image: consumed });
|
|
48442
48467
|
} catch {
|
|
48443
48468
|
}
|
|
48444
|
-
return this.success(output4);
|
|
48469
|
+
return this.success(output4, void 0, void 0);
|
|
48445
48470
|
}
|
|
48446
48471
|
const { formatRemoteAcceptedImage: formatRemoteAcceptedImage2 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
|
|
48447
48472
|
const msg = formatRemoteAcceptedImage2({
|
|
@@ -48468,11 +48493,11 @@ var init_image_command = __esm({
|
|
|
48468
48493
|
} catch {
|
|
48469
48494
|
}
|
|
48470
48495
|
try {
|
|
48471
|
-
const api =
|
|
48496
|
+
const api = cliAuth.getAPIClient();
|
|
48472
48497
|
await api.consumeQuota({ requests: 1, image: Math.max(1, Number(cli.count || 1)) });
|
|
48473
48498
|
} catch {
|
|
48474
48499
|
}
|
|
48475
|
-
return this.success(msg);
|
|
48500
|
+
return this.success(msg, void 0, void 0);
|
|
48476
48501
|
} catch (e2) {
|
|
48477
48502
|
}
|
|
48478
48503
|
}
|
|
@@ -48486,7 +48511,7 @@ var init_image_command = __esm({
|
|
|
48486
48511
|
keepExif: cli.keepExif
|
|
48487
48512
|
}, {
|
|
48488
48513
|
root,
|
|
48489
|
-
outDir: cli.outDir,
|
|
48514
|
+
outDir: cli.outDir || "",
|
|
48490
48515
|
concurrency: cli.concurrency || 1,
|
|
48491
48516
|
retry: cli.retry || 0,
|
|
48492
48517
|
onProgress: () => {
|
|
@@ -48517,7 +48542,7 @@ var init_image_command = __esm({
|
|
|
48517
48542
|
}
|
|
48518
48543
|
try {
|
|
48519
48544
|
if (await authManager.isAuthenticated()) {
|
|
48520
|
-
const api =
|
|
48545
|
+
const api = cliAuth.getAPIClient();
|
|
48521
48546
|
const consumed = Math.max(0, Number(res.ok || 0));
|
|
48522
48547
|
if (consumed > 0) await api.consumeQuota({ requests: 1, image: consumed });
|
|
48523
48548
|
}
|
|
@@ -48529,12 +48554,12 @@ var init_image_command = __esm({
|
|
|
48529
48554
|
ok,
|
|
48530
48555
|
fail,
|
|
48531
48556
|
files: res.saved.files,
|
|
48532
|
-
manifestPath:
|
|
48557
|
+
manifestPath: "",
|
|
48533
48558
|
size: cli.size,
|
|
48534
48559
|
format: cli.format,
|
|
48535
48560
|
model: cli.model
|
|
48536
48561
|
});
|
|
48537
|
-
return this.success(output3);
|
|
48562
|
+
return this.success(output3, void 0, void 0);
|
|
48538
48563
|
} finally {
|
|
48539
48564
|
try {
|
|
48540
48565
|
spinner.stop();
|
|
@@ -48618,7 +48643,13 @@ async function runVideoPipeline(params2, opts) {
|
|
|
48618
48643
|
const { GoogleGenAI } = __require("@google/genai");
|
|
48619
48644
|
const ai2 = new GoogleGenAI({ apiKey });
|
|
48620
48645
|
const modelName = params2.model || "veo-3.0-generate-001";
|
|
48621
|
-
|
|
48646
|
+
const aspectRatio = params2.size[0] >= params2.size[1] ? "16:9" : "9:16";
|
|
48647
|
+
const effectiveDuration = 8;
|
|
48648
|
+
let operation = await ai2.models.generateVideos({
|
|
48649
|
+
model: modelName,
|
|
48650
|
+
prompt: String(params2.prompt),
|
|
48651
|
+
config: { aspectRatio, durationSeconds: effectiveDuration, frameRate: params2.fps }
|
|
48652
|
+
});
|
|
48622
48653
|
const pollStart = Date.now();
|
|
48623
48654
|
const maxWaitMs = 6 * 60 * 1e3;
|
|
48624
48655
|
while (!operation?.done && Date.now() - pollStart < maxWaitMs) {
|
|
@@ -48629,16 +48660,28 @@ async function runVideoPipeline(params2, opts) {
|
|
|
48629
48660
|
if (!fileRef) throw new Error("Veo3: no video in response");
|
|
48630
48661
|
const dl = await ai2.files.download({ file: fileRef });
|
|
48631
48662
|
const arrayBuffer = await dl.arrayBuffer();
|
|
48632
|
-
const
|
|
48663
|
+
const bytes = Buffer.from(arrayBuffer);
|
|
48664
|
+
const head2 = bytes.subarray(0, 256);
|
|
48665
|
+
const headStr = head2.toString("latin1");
|
|
48666
|
+
const hasFtyp = headStr.indexOf("ftyp") >= 0 || head2.includes(Buffer.from("ftyp", "ascii"));
|
|
48667
|
+
const isWebm = head2[0] === 26 && head2[1] === 69 && head2[2] === 223 && head2[3] === 163;
|
|
48668
|
+
let ext2 = ".mp4";
|
|
48669
|
+
if (isWebm) ext2 = ".webm";
|
|
48670
|
+
else if (hasFtyp) {
|
|
48671
|
+
const brand = head2.subarray(8, 12).toString("latin1").toLowerCase();
|
|
48672
|
+
if (brand.startsWith("qt")) ext2 = ".mov";
|
|
48673
|
+
else ext2 = ".mp4";
|
|
48674
|
+
}
|
|
48633
48675
|
const promptHash2 = hashPrompt(params2.prompt);
|
|
48634
48676
|
const manifest2 = {
|
|
48635
48677
|
kind: "video",
|
|
48636
|
-
request: { promptHash: promptHash2, seed: params2.seed, params: { size: params2.size, fps: params2.fps, duration:
|
|
48678
|
+
request: { promptHash: promptHash2, seed: params2.seed, params: { size: params2.size, fps: params2.fps, duration: effectiveDuration, format: ext2.replace(".", "") }, model: modelName, provider: "google" },
|
|
48637
48679
|
artifacts: [],
|
|
48638
48680
|
metrics: { durationMs: Date.now() - started, retries: 0, fallbacks: 0 },
|
|
48639
48681
|
trace: Math.random().toString(36).slice(2, 8).toUpperCase()
|
|
48640
48682
|
};
|
|
48641
|
-
const
|
|
48683
|
+
const baseDir = opts.outDir || path11__namespace.join("artifacts", "media", "videos", String(manifest2.trace));
|
|
48684
|
+
const saved2 = await saveArtifacts({ root: opts.root, kind: "video", baseDir, flat: true }, [{ bytes, ext: ext2 }], manifest2);
|
|
48642
48685
|
return { saved: saved2, durationMs: Date.now() - started, frames: 0, warnFallback: false, retries: 0 };
|
|
48643
48686
|
}
|
|
48644
48687
|
} catch {
|
|
@@ -48683,11 +48726,17 @@ async function runVideoPipeline(params2, opts) {
|
|
|
48683
48726
|
await fsp__namespace.writeFile(path11__namespace.join(tmpDir, fname), frames[i2]);
|
|
48684
48727
|
}
|
|
48685
48728
|
const outBuf = await muxFramesToMp4(tmpDir, params2.fps);
|
|
48686
|
-
|
|
48729
|
+
{
|
|
48730
|
+
const baseDir = opts.outDir || path11__namespace.join("artifacts", "media", "videos", String(manifest.trace));
|
|
48731
|
+
saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir, flat: true }, [{ bytes: outBuf, ext: ".mp4" }], manifest);
|
|
48732
|
+
}
|
|
48687
48733
|
await fsp__namespace.rm(tmpDir, { recursive: true, force: true });
|
|
48688
48734
|
} else {
|
|
48689
48735
|
const items = frames.map((b, i2) => ({ bytes: b, ext: `.png`, logicalName: `frame-${String(i2 + 1).padStart(4, "0")}` }));
|
|
48690
|
-
|
|
48736
|
+
{
|
|
48737
|
+
const baseDir = opts.outDir || path11__namespace.join("artifacts", "media", "videos", String(manifest.trace));
|
|
48738
|
+
saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir, flat: true }, items, manifest);
|
|
48739
|
+
}
|
|
48691
48740
|
warnFallback = true;
|
|
48692
48741
|
}
|
|
48693
48742
|
progress.done();
|
|
@@ -48728,15 +48777,16 @@ var init_video_command = __esm({
|
|
|
48728
48777
|
category = "media";
|
|
48729
48778
|
description = "Generate videos using Gemini (frames fallback when mux unavailable)";
|
|
48730
48779
|
aliases = [];
|
|
48731
|
-
usage = '/video "prompt" [--duration
|
|
48780
|
+
usage = '/video "prompt" [--duration 8] [--fps 24] [--res 1280x720] [--format mp4|webm] [--model gemini-...] [--seed N] [--out dir] [--apply|--plan-only|--dry-run] [--concurrency N] [--retry N]';
|
|
48732
48781
|
examples = [
|
|
48733
|
-
{ input: '/video "product demo" --duration
|
|
48782
|
+
{ input: '/video "product demo" --duration 8 --fps 24 --res 1280x720 --apply', description: "Generate a short demo video" }
|
|
48734
48783
|
];
|
|
48735
48784
|
metadata = { version: "2.0.0", author: "maria" };
|
|
48736
48785
|
async execute(args2, context2) {
|
|
48737
48786
|
try {
|
|
48738
48787
|
const root = context2.environment.cwd;
|
|
48739
48788
|
const cli = normalizeVideoArgs(args2.raw, root);
|
|
48789
|
+
cli.duration = 8;
|
|
48740
48790
|
if (cli.planOnly || cli.dryRun || !cli.apply) {
|
|
48741
48791
|
const line = `Plan: video ${cli.duration}s @${cli.fps}fps ${cli.size[0]}x${cli.size[1]} ${cli.format} model=${cli.model || "auto"} concurrency=${cli.concurrency} retry=${cli.retry}`;
|
|
48742
48792
|
const next = `Next: /video "${cli.prompt}" --duration ${cli.duration} --fps ${cli.fps} --res ${cli.size[0]}x${cli.size[1]} --apply`;
|
|
@@ -48762,6 +48812,41 @@ var init_video_command = __esm({
|
|
|
48762
48812
|
body: JSON.stringify(body),
|
|
48763
48813
|
headers: { "Content-Type": "application/json" }
|
|
48764
48814
|
});
|
|
48815
|
+
const filesInline = apiRes?.data?.filesInline || [];
|
|
48816
|
+
if (filesInline.length > 0) {
|
|
48817
|
+
const pathMod = await import('path');
|
|
48818
|
+
const fsMod = await import('fs/promises');
|
|
48819
|
+
const savedPaths = [];
|
|
48820
|
+
for (const f3 of filesInline) {
|
|
48821
|
+
const original = String(f3.file || "").replace(/^[\\/]+/, "");
|
|
48822
|
+
const name2 = pathMod.basename(original || `video.${cli.format}`);
|
|
48823
|
+
const full = pathMod.resolve(root, name2);
|
|
48824
|
+
await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
|
|
48825
|
+
const buf = Buffer.from(String(f3.bytesBase64 || ""), "base64");
|
|
48826
|
+
await fsMod.writeFile(full, buf);
|
|
48827
|
+
savedPaths.push(name2);
|
|
48828
|
+
}
|
|
48829
|
+
const { formatVideoOutput: formatVideoOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
|
|
48830
|
+
const output4 = await formatVideoOutput3(root, {
|
|
48831
|
+
kind: "video",
|
|
48832
|
+
warnFallback: false,
|
|
48833
|
+
frames: 0,
|
|
48834
|
+
files: savedPaths,
|
|
48835
|
+
manifestPath: "",
|
|
48836
|
+
duration: cli.duration,
|
|
48837
|
+
fps: cli.fps,
|
|
48838
|
+
size: cli.size,
|
|
48839
|
+
format: cli.format,
|
|
48840
|
+
model: cli.model,
|
|
48841
|
+
jobId: apiRes?.data?.jobId
|
|
48842
|
+
});
|
|
48843
|
+
try {
|
|
48844
|
+
const api = cliAuth.getAPIClient();
|
|
48845
|
+
await api.consumeQuota({ requests: 1, video: savedPaths.length > 0 ? 1 : 0 });
|
|
48846
|
+
} catch {
|
|
48847
|
+
}
|
|
48848
|
+
return this.success(output4);
|
|
48849
|
+
}
|
|
48765
48850
|
const filesFromApi = apiRes?.data?.files || [];
|
|
48766
48851
|
if (filesFromApi.length > 0) {
|
|
48767
48852
|
const pathMod = await import('path');
|
|
@@ -48771,14 +48856,15 @@ var init_video_command = __esm({
|
|
|
48771
48856
|
for (const relRaw of filesFromApi) {
|
|
48772
48857
|
const rel = String(relRaw || "").replace(/^[\\/]+/, "");
|
|
48773
48858
|
const url2 = `${base}/${rel}`;
|
|
48774
|
-
const
|
|
48859
|
+
const name2 = pathMod.basename(rel);
|
|
48860
|
+
const full = pathMod.resolve(root, name2);
|
|
48775
48861
|
await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
|
|
48776
48862
|
const res2 = await fetch(url2);
|
|
48777
48863
|
if (!res2.ok) throw new Error(`Failed to download video: ${res2.status}`);
|
|
48778
48864
|
const arrayBuf = await res2.arrayBuffer();
|
|
48779
48865
|
const buf = Buffer.from(arrayBuf);
|
|
48780
48866
|
await fsMod.writeFile(full, buf);
|
|
48781
|
-
savedPaths.push(
|
|
48867
|
+
savedPaths.push(name2);
|
|
48782
48868
|
}
|
|
48783
48869
|
const { formatVideoOutput: formatVideoOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
|
|
48784
48870
|
const output4 = await formatVideoOutput3(root, {
|
|
@@ -48786,7 +48872,7 @@ var init_video_command = __esm({
|
|
|
48786
48872
|
warnFallback: false,
|
|
48787
48873
|
frames: 0,
|
|
48788
48874
|
files: savedPaths,
|
|
48789
|
-
manifestPath:
|
|
48875
|
+
manifestPath: "",
|
|
48790
48876
|
duration: cli.duration,
|
|
48791
48877
|
fps: cli.fps,
|
|
48792
48878
|
size: cli.size,
|
|
@@ -50473,7 +50559,7 @@ var init_about_command = __esm({
|
|
|
50473
50559
|
async execute(args2, context2) {
|
|
50474
50560
|
const output3 = [];
|
|
50475
50561
|
output3.push("");
|
|
50476
|
-
output3.push(chalk14__default.default.cyan.bold("\u{1F916} About MARIA v4.3.
|
|
50562
|
+
output3.push(chalk14__default.default.cyan.bold("\u{1F916} About MARIA v4.3.17"));
|
|
50477
50563
|
output3.push(chalk14__default.default.gray("\u2550".repeat(40)));
|
|
50478
50564
|
output3.push("");
|
|
50479
50565
|
output3.push(chalk14__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
|