@bonginkan/maria 4.3.15 → 4.3.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MARIA - AI Development Platform v4.3.15
1
+ # MARIA - AI Development Platform v4.3.16
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@bonginkan/maria.svg)](https://www.npmjs.com/package/@bonginkan/maria)
4
4
  [![License](https://img.shields.io/badge/license-Multi--tier-blue.svg)](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.15 (September 16, 2025)
13
+ ## 🚀 What's New in v4.3.16 (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 5 --plan-only
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.15
925
+ npm install -g @bonginkan/maria@4.3.16
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.15`
1129
+ **Transform your development experience today**: `npm install -g @bonginkan/maria@4.3.16`
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)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "lite-1.0.0",
3
- "generatedAt": "2025-09-17T04:03:11.908Z",
3
+ "generatedAt": "2025-09-18T23:42:56.017Z",
4
4
  "totalCommands": 17,
5
5
  "readyCount": 17,
6
6
  "partialCount": 0,
@@ -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.15",
26042
- description: "\u{1F680} MARIA v4.3.15 - 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.",
26041
+ version: "4.3.16",
26042
+ description: "\u{1F680} MARIA v4.3.16 - 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.15"}`
28074
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.16"}`
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.15"}`,
28706
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.16"}`,
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: 5,
47439
+ duration: 8,
47440
47440
  fps: 24,
47441
47441
  size: [1280, 720],
47442
47442
  format: "mp4",
@@ -47584,7 +47584,7 @@ async function atomicRename(stage, dest) {
47584
47584
  }
47585
47585
  async function saveArtifacts(ctx2, items, manifest) {
47586
47586
  const root = ctx2.root;
47587
- const base = ctx2.baseDir || (ctx2.kind === "image" ? "artifacts/media/images" : "artifacts/media/videos");
47587
+ const base = typeof ctx2.baseDir === "string" ? ctx2.baseDir : "";
47588
47588
  const trace = ctx2.trace || Math.random().toString(36).slice(2, 10).toUpperCase();
47589
47589
  const stage = stageDir(root, trace);
47590
47590
  ensureDirSync(stage);
@@ -47592,7 +47592,7 @@ async function saveArtifacts(ctx2, items, manifest) {
47592
47592
  const dateSeg = datePath(/* @__PURE__ */ new Date());
47593
47593
  const reqHash = manifest.request && manifest.request.promptHash || "sha256:unknown";
47594
47594
  const slug = hashPrefix(reqHash, 6);
47595
- const outDirSeg = `${base}/${dateSeg}/${slug}`;
47595
+ const outDirSeg = ctx2.flat ? base || "" : `${base ? base + "/" : ""}${dateSeg}/${slug}`;
47596
47596
  const outDir = safeJoin(root, outDirSeg).full;
47597
47597
  ensureDirSync(outDir);
47598
47598
  const saved = [];
@@ -47602,7 +47602,8 @@ async function saveArtifacts(ctx2, items, manifest) {
47602
47602
  const ext2 = it.ext.startsWith(".") ? it.ext : `.${it.ext}`;
47603
47603
  const baseName = it.logicalName ? `${it.logicalName}` : `${contentHash}`;
47604
47604
  const fname = `${baseName}${ext2}`;
47605
- const dest = safeJoin(root, `${outDirSeg}/${fname}`);
47605
+ const relPath = outDirSeg ? `${outDirSeg}/${fname}` : `${fname}`;
47606
+ const dest = safeJoin(root, relPath);
47606
47607
  validateWinPathEdge(dest.full);
47607
47608
  if (await hasCaseInsensitiveCollision(path11__namespace.dirname(dest.full), path11__namespace.basename(dest.full))) {
47608
47609
  throw new Error("case-insensitive filename collision");
@@ -47622,23 +47623,28 @@ async function saveArtifacts(ctx2, items, manifest) {
47622
47623
  await atomicRename(stg, dest.full);
47623
47624
  saved.push(dest.rel);
47624
47625
  }
47625
- const manifestObj = {
47626
- manifestVersion: 1,
47627
- ...manifest,
47628
- createdAt: manifest.createdAt || (/* @__PURE__ */ new Date()).toISOString(),
47629
- artifacts: manifest.artifacts && manifest.artifacts.length > 0 ? manifest.artifacts : saved.map((file) => ({ file, hash: `sha256:${path11__namespace.basename(file).split(".")[0]}` }))
47630
- };
47631
- const manifestPathRel = `${outDirSeg}/manifest.json`;
47632
- const manifestStage = path11__namespace.join(stage, "manifest.json.part");
47633
- const manifestFull = safeJoin(root, manifestPathRel).full;
47634
- await fsp__namespace.writeFile(manifestStage, JSON.stringify(manifestObj, null, 2), "utf8");
47635
- try {
47636
- console.log(`[store] manifest -> ${manifestPathRel}`);
47637
- } catch {
47626
+ if (!ctx2.skipManifest) {
47627
+ const manifestObj = {
47628
+ manifestVersion: 1,
47629
+ ...manifest,
47630
+ createdAt: manifest.createdAt || (/* @__PURE__ */ new Date()).toISOString(),
47631
+ artifacts: manifest.artifacts && manifest.artifacts.length > 0 ? manifest.artifacts : saved.map((file) => ({ file, hash: `sha256:${path11__namespace.basename(file).split(".")[0]}` }))
47632
+ };
47633
+ const manifestPathRel = `${outDirSeg ? outDirSeg + "/" : ""}manifest.json`;
47634
+ const manifestStage = path11__namespace.join(stage, "manifest.json.part");
47635
+ const manifestFull = safeJoin(root, manifestPathRel).full;
47636
+ await fsp__namespace.writeFile(manifestStage, JSON.stringify(manifestObj, null, 2), "utf8");
47637
+ try {
47638
+ console.log(`[store] manifest -> ${manifestPathRel}`);
47639
+ } catch {
47640
+ }
47641
+ await atomicRename(manifestStage, manifestFull);
47642
+ await fsp__namespace.rm(stage, { recursive: true, force: true });
47643
+ return { files: saved, manifestPath: manifestPathRel };
47644
+ } else {
47645
+ await fsp__namespace.rm(stage, { recursive: true, force: true });
47646
+ return { files: saved, manifestPath: "" };
47638
47647
  }
47639
- await atomicRename(manifestStage, manifestFull);
47640
- await fsp__namespace.rm(stage, { recursive: true, force: true });
47641
- return { files: saved, manifestPath: manifestPathRel };
47642
47648
  } catch (e2) {
47643
47649
  await fsp__namespace.rm(stage, { recursive: true, force: true });
47644
47650
  throw e2;
@@ -47919,7 +47925,7 @@ async function runImagePipeline(params2, opts) {
47919
47925
  trace: Math.random().toString(36).slice(2, 8).toUpperCase()
47920
47926
  };
47921
47927
  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);
47928
+ const saved = await saveArtifacts({ root: opts.root, kind: "image", baseDir: opts.outDir, flat: true, skipManifest: true }, items, manifest);
47923
47929
  progress.done();
47924
47930
  return {
47925
47931
  saved,
@@ -48311,7 +48317,7 @@ var init_image_command = __esm({
48311
48317
  init_firestore();
48312
48318
  init_cli_auth();
48313
48319
  init_api_client();
48314
- init_MariaAPIClient();
48320
+ init_cli_auth();
48315
48321
  init_animations();
48316
48322
  ImageCommand = class extends BaseCommand {
48317
48323
  name = "image";
@@ -48360,12 +48366,13 @@ var init_image_command = __esm({
48360
48366
  const fsMod = await import('fs/promises');
48361
48367
  const savedPaths = [];
48362
48368
  for (const f3 of filesInline) {
48363
- const rel = String(f3.file || "").replace(/^[\\/]+/, "");
48364
- const full = pathMod.resolve(root, rel);
48369
+ const original = String(f3.file || "").replace(/^[\\/]+/, "");
48370
+ const name2 = pathMod.basename(original);
48371
+ const full = pathMod.resolve(root, name2);
48365
48372
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
48366
48373
  const buf = Buffer.from(String(f3.bytesBase64 || ""), "base64");
48367
48374
  await fsMod.writeFile(full, buf);
48368
- savedPaths.push(rel);
48375
+ savedPaths.push(name2);
48369
48376
  }
48370
48377
  const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
48371
48378
  const output4 = await formatImageOutput3(root, {
@@ -48373,18 +48380,18 @@ var init_image_command = __esm({
48373
48380
  ok: savedPaths.length,
48374
48381
  fail: 0,
48375
48382
  files: savedPaths,
48376
- manifestPath: apiRes?.data?.url || savedPaths[0],
48383
+ manifestPath: "",
48377
48384
  size: cli.size,
48378
48385
  format: cli.format,
48379
48386
  model: cli.model,
48380
48387
  jobId: apiRes?.data?.jobId
48381
48388
  });
48382
48389
  try {
48383
- const api = new MariaAPIClient();
48390
+ const api = cliAuth.getAPIClient();
48384
48391
  await api.consumeQuota({ requests: 1, image: Math.max(1, savedPaths.length) });
48385
48392
  } catch {
48386
48393
  }
48387
- return this.success(output4);
48394
+ return this.success(output4, void 0, void 0);
48388
48395
  }
48389
48396
  if (Array.isArray(filesList) && filesList.length > 0) {
48390
48397
  const pathMod = await import('path');
@@ -48392,16 +48399,17 @@ var init_image_command = __esm({
48392
48399
  const base = (process.env.MARIA_API_BASE || "https://api.maria-code.ai").replace(/\/$/, "");
48393
48400
  const savedPaths = [];
48394
48401
  for (const relRaw of filesList) {
48395
- const rel = String(relRaw || "").replace(/^[\\/]+/, "");
48396
- const url2 = `${base}/${rel}`;
48397
- const full = pathMod.resolve(root, rel);
48402
+ const originalRel = String(relRaw || "").replace(/^[\\/]+/, "");
48403
+ const url2 = `${base}/${originalRel}`;
48404
+ const name2 = pathMod.basename(originalRel);
48405
+ const full = pathMod.resolve(root, name2);
48398
48406
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
48399
48407
  const res2 = await fetch(url2);
48400
48408
  if (!res2.ok) throw new Error(`Failed to download image: ${res2.status}`);
48401
48409
  const arrayBuf = await res2.arrayBuffer();
48402
48410
  const buf = Buffer.from(arrayBuf);
48403
48411
  await fsMod.writeFile(full, buf);
48404
- savedPaths.push(rel);
48412
+ savedPaths.push(name2);
48405
48413
  }
48406
48414
  const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
48407
48415
  const output4 = await formatImageOutput3(root, {
@@ -48409,18 +48417,18 @@ var init_image_command = __esm({
48409
48417
  ok: savedPaths.length,
48410
48418
  fail: 0,
48411
48419
  files: savedPaths,
48412
- manifestPath: savedPaths[0],
48420
+ manifestPath: "",
48413
48421
  size: cli.size,
48414
48422
  format: cli.format,
48415
48423
  model: cli.model,
48416
48424
  jobId: apiRes?.data?.jobId
48417
48425
  });
48418
48426
  try {
48419
- const api = new MariaAPIClient();
48427
+ const api = cliAuth.getAPIClient();
48420
48428
  await api.consumeQuota({ requests: 1, image: Math.max(1, savedPaths.length) });
48421
48429
  } catch {
48422
48430
  }
48423
- return this.success(output4);
48431
+ return this.success(output4, void 0, void 0);
48424
48432
  }
48425
48433
  if (urls.length > 0) {
48426
48434
  const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
@@ -48429,19 +48437,19 @@ var init_image_command = __esm({
48429
48437
  ok: urls.length,
48430
48438
  fail: 0,
48431
48439
  files: urls,
48432
- manifestPath: urls[0],
48440
+ manifestPath: "",
48433
48441
  size: cli.size,
48434
48442
  format: cli.format,
48435
48443
  model: cli.model,
48436
48444
  jobId: apiRes?.data?.jobId
48437
48445
  });
48438
48446
  try {
48439
- const api = new MariaAPIClient();
48447
+ const api = cliAuth.getAPIClient();
48440
48448
  const consumed = Math.max(1, urls.length || Number(cli.count || 1));
48441
48449
  await api.consumeQuota({ requests: 1, image: consumed });
48442
48450
  } catch {
48443
48451
  }
48444
- return this.success(output4);
48452
+ return this.success(output4, void 0, void 0);
48445
48453
  }
48446
48454
  const { formatRemoteAcceptedImage: formatRemoteAcceptedImage2 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
48447
48455
  const msg = formatRemoteAcceptedImage2({
@@ -48468,11 +48476,11 @@ var init_image_command = __esm({
48468
48476
  } catch {
48469
48477
  }
48470
48478
  try {
48471
- const api = new MariaAPIClient();
48479
+ const api = cliAuth.getAPIClient();
48472
48480
  await api.consumeQuota({ requests: 1, image: Math.max(1, Number(cli.count || 1)) });
48473
48481
  } catch {
48474
48482
  }
48475
- return this.success(msg);
48483
+ return this.success(msg, void 0, void 0);
48476
48484
  } catch (e2) {
48477
48485
  }
48478
48486
  }
@@ -48486,7 +48494,7 @@ var init_image_command = __esm({
48486
48494
  keepExif: cli.keepExif
48487
48495
  }, {
48488
48496
  root,
48489
- outDir: cli.outDir,
48497
+ outDir: cli.outDir || "",
48490
48498
  concurrency: cli.concurrency || 1,
48491
48499
  retry: cli.retry || 0,
48492
48500
  onProgress: () => {
@@ -48517,7 +48525,7 @@ var init_image_command = __esm({
48517
48525
  }
48518
48526
  try {
48519
48527
  if (await authManager.isAuthenticated()) {
48520
- const api = new MariaAPIClient();
48528
+ const api = cliAuth.getAPIClient();
48521
48529
  const consumed = Math.max(0, Number(res.ok || 0));
48522
48530
  if (consumed > 0) await api.consumeQuota({ requests: 1, image: consumed });
48523
48531
  }
@@ -48529,12 +48537,12 @@ var init_image_command = __esm({
48529
48537
  ok,
48530
48538
  fail,
48531
48539
  files: res.saved.files,
48532
- manifestPath: res.saved.manifestPath,
48540
+ manifestPath: "",
48533
48541
  size: cli.size,
48534
48542
  format: cli.format,
48535
48543
  model: cli.model
48536
48544
  });
48537
- return this.success(output3);
48545
+ return this.success(output3, void 0, void 0);
48538
48546
  } finally {
48539
48547
  try {
48540
48548
  spinner.stop();
@@ -48618,7 +48626,13 @@ async function runVideoPipeline(params2, opts) {
48618
48626
  const { GoogleGenAI } = __require("@google/genai");
48619
48627
  const ai2 = new GoogleGenAI({ apiKey });
48620
48628
  const modelName = params2.model || "veo-3.0-generate-001";
48621
- let operation = await ai2.models.generateVideos({ model: modelName, prompt: String(params2.prompt) });
48629
+ const aspectRatio = params2.size[0] >= params2.size[1] ? "16:9" : "9:16";
48630
+ const effectiveDuration = 8;
48631
+ let operation = await ai2.models.generateVideos({
48632
+ model: modelName,
48633
+ prompt: String(params2.prompt),
48634
+ config: { aspectRatio, durationSeconds: effectiveDuration, frameRate: params2.fps }
48635
+ });
48622
48636
  const pollStart = Date.now();
48623
48637
  const maxWaitMs = 6 * 60 * 1e3;
48624
48638
  while (!operation?.done && Date.now() - pollStart < maxWaitMs) {
@@ -48629,16 +48643,27 @@ async function runVideoPipeline(params2, opts) {
48629
48643
  if (!fileRef) throw new Error("Veo3: no video in response");
48630
48644
  const dl = await ai2.files.download({ file: fileRef });
48631
48645
  const arrayBuffer = await dl.arrayBuffer();
48632
- const mp4 = Buffer.from(arrayBuffer);
48646
+ const bytes = Buffer.from(arrayBuffer);
48647
+ const head2 = bytes.subarray(0, 256);
48648
+ const headStr = head2.toString("latin1");
48649
+ const hasFtyp = headStr.indexOf("ftyp") >= 0 || head2.includes(Buffer.from("ftyp", "ascii"));
48650
+ const isWebm = head2[0] === 26 && head2[1] === 69 && head2[2] === 223 && head2[3] === 163;
48651
+ let ext2 = ".mp4";
48652
+ if (isWebm) ext2 = ".webm";
48653
+ else if (hasFtyp) {
48654
+ const brand = head2.subarray(8, 12).toString("latin1").toLowerCase();
48655
+ if (brand.startsWith("qt")) ext2 = ".mov";
48656
+ else ext2 = ".mp4";
48657
+ }
48633
48658
  const promptHash2 = hashPrompt(params2.prompt);
48634
48659
  const manifest2 = {
48635
48660
  kind: "video",
48636
- request: { promptHash: promptHash2, seed: params2.seed, params: { size: params2.size, fps: params2.fps, duration: params2.duration, format: params2.format }, model: modelName, provider: "google" },
48661
+ request: { promptHash: promptHash2, seed: params2.seed, params: { size: params2.size, fps: params2.fps, duration: effectiveDuration, format: ext2.replace(".", "") }, model: modelName, provider: "google" },
48637
48662
  artifacts: [],
48638
48663
  metrics: { durationMs: Date.now() - started, retries: 0, fallbacks: 0 },
48639
48664
  trace: Math.random().toString(36).slice(2, 8).toUpperCase()
48640
48665
  };
48641
- const saved2 = await saveArtifacts({ root: opts.root, kind: "video", baseDir: opts.outDir }, [{ bytes: mp4, ext: ".mp4" }], manifest2);
48666
+ const saved2 = await saveArtifacts({ root: opts.root, kind: "video", baseDir: opts.outDir, flat: true, skipManifest: true }, [{ bytes, ext: ext2 }], manifest2);
48642
48667
  return { saved: saved2, durationMs: Date.now() - started, frames: 0, warnFallback: false, retries: 0 };
48643
48668
  }
48644
48669
  } catch {
@@ -48683,11 +48708,11 @@ async function runVideoPipeline(params2, opts) {
48683
48708
  await fsp__namespace.writeFile(path11__namespace.join(tmpDir, fname), frames[i2]);
48684
48709
  }
48685
48710
  const outBuf = await muxFramesToMp4(tmpDir, params2.fps);
48686
- saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir: opts.outDir }, [{ bytes: outBuf, ext: ".mp4" }], manifest);
48711
+ saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir: opts.outDir, flat: true, skipManifest: true }, [{ bytes: outBuf, ext: ".mp4" }], manifest);
48687
48712
  await fsp__namespace.rm(tmpDir, { recursive: true, force: true });
48688
48713
  } else {
48689
48714
  const items = frames.map((b, i2) => ({ bytes: b, ext: `.png`, logicalName: `frame-${String(i2 + 1).padStart(4, "0")}` }));
48690
- saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir: opts.outDir }, items, manifest);
48715
+ saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir: opts.outDir, flat: true, skipManifest: true }, items, manifest);
48691
48716
  warnFallback = true;
48692
48717
  }
48693
48718
  progress.done();
@@ -48728,15 +48753,16 @@ var init_video_command = __esm({
48728
48753
  category = "media";
48729
48754
  description = "Generate videos using Gemini (frames fallback when mux unavailable)";
48730
48755
  aliases = [];
48731
- usage = '/video "prompt" [--duration 5] [--fps 24] [--res 1280x720] [--format mp4|webm] [--model gemini-...] [--seed N] [--out dir] [--apply|--plan-only|--dry-run] [--concurrency N] [--retry N]';
48756
+ 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
48757
  examples = [
48733
- { input: '/video "product demo" --duration 5 --fps 24 --res 1280x720 --apply', description: "Generate a short demo video" }
48758
+ { input: '/video "product demo" --duration 8 --fps 24 --res 1280x720 --apply', description: "Generate a short demo video" }
48734
48759
  ];
48735
48760
  metadata = { version: "2.0.0", author: "maria" };
48736
48761
  async execute(args2, context2) {
48737
48762
  try {
48738
48763
  const root = context2.environment.cwd;
48739
48764
  const cli = normalizeVideoArgs(args2.raw, root);
48765
+ cli.duration = 8;
48740
48766
  if (cli.planOnly || cli.dryRun || !cli.apply) {
48741
48767
  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
48768
  const next = `Next: /video "${cli.prompt}" --duration ${cli.duration} --fps ${cli.fps} --res ${cli.size[0]}x${cli.size[1]} --apply`;
@@ -48762,6 +48788,41 @@ var init_video_command = __esm({
48762
48788
  body: JSON.stringify(body),
48763
48789
  headers: { "Content-Type": "application/json" }
48764
48790
  });
48791
+ const filesInline = apiRes?.data?.filesInline || [];
48792
+ if (filesInline.length > 0) {
48793
+ const pathMod = await import('path');
48794
+ const fsMod = await import('fs/promises');
48795
+ const savedPaths = [];
48796
+ for (const f3 of filesInline) {
48797
+ const original = String(f3.file || "").replace(/^[\\/]+/, "");
48798
+ const name2 = pathMod.basename(original || `video.${cli.format}`);
48799
+ const full = pathMod.resolve(root, name2);
48800
+ await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
48801
+ const buf = Buffer.from(String(f3.bytesBase64 || ""), "base64");
48802
+ await fsMod.writeFile(full, buf);
48803
+ savedPaths.push(name2);
48804
+ }
48805
+ const { formatVideoOutput: formatVideoOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
48806
+ const output4 = await formatVideoOutput3(root, {
48807
+ kind: "video",
48808
+ warnFallback: false,
48809
+ frames: 0,
48810
+ files: savedPaths,
48811
+ manifestPath: "",
48812
+ duration: cli.duration,
48813
+ fps: cli.fps,
48814
+ size: cli.size,
48815
+ format: cli.format,
48816
+ model: cli.model,
48817
+ jobId: apiRes?.data?.jobId
48818
+ });
48819
+ try {
48820
+ const api = cliAuth.getAPIClient();
48821
+ await api.consumeQuota({ requests: 1, video: savedPaths.length > 0 ? 1 : 0 });
48822
+ } catch {
48823
+ }
48824
+ return this.success(output4);
48825
+ }
48765
48826
  const filesFromApi = apiRes?.data?.files || [];
48766
48827
  if (filesFromApi.length > 0) {
48767
48828
  const pathMod = await import('path');
@@ -48771,14 +48832,15 @@ var init_video_command = __esm({
48771
48832
  for (const relRaw of filesFromApi) {
48772
48833
  const rel = String(relRaw || "").replace(/^[\\/]+/, "");
48773
48834
  const url2 = `${base}/${rel}`;
48774
- const full = pathMod.resolve(root, rel);
48835
+ const name2 = pathMod.basename(rel);
48836
+ const full = pathMod.resolve(root, name2);
48775
48837
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
48776
48838
  const res2 = await fetch(url2);
48777
48839
  if (!res2.ok) throw new Error(`Failed to download video: ${res2.status}`);
48778
48840
  const arrayBuf = await res2.arrayBuffer();
48779
48841
  const buf = Buffer.from(arrayBuf);
48780
48842
  await fsMod.writeFile(full, buf);
48781
- savedPaths.push(rel);
48843
+ savedPaths.push(name2);
48782
48844
  }
48783
48845
  const { formatVideoOutput: formatVideoOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
48784
48846
  const output4 = await formatVideoOutput3(root, {
@@ -48786,7 +48848,7 @@ var init_video_command = __esm({
48786
48848
  warnFallback: false,
48787
48849
  frames: 0,
48788
48850
  files: savedPaths,
48789
- manifestPath: String(apiRes?.data?.url || savedPaths[0]),
48851
+ manifestPath: "",
48790
48852
  duration: cli.duration,
48791
48853
  fps: cli.fps,
48792
48854
  size: cli.size,
@@ -50473,7 +50535,7 @@ var init_about_command = __esm({
50473
50535
  async execute(args2, context2) {
50474
50536
  const output3 = [];
50475
50537
  output3.push("");
50476
- output3.push(chalk14__default.default.cyan.bold("\u{1F916} About MARIA v4.3.15"));
50538
+ output3.push(chalk14__default.default.cyan.bold("\u{1F916} About MARIA v4.3.16"));
50477
50539
  output3.push(chalk14__default.default.gray("\u2550".repeat(40)));
50478
50540
  output3.push("");
50479
50541
  output3.push(chalk14__default.default.white.bold("MARIA - Minimal API, Maximum Power"));