@bonginkan/maria 4.3.28 → 4.3.30

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/dist/cli.cjs CHANGED
@@ -1704,7 +1704,7 @@ var init_AuthenticationManager = __esm({
1704
1704
  const response = await fetch(`${this.apiBase}/api/user/profile`, {
1705
1705
  headers: {
1706
1706
  "Authorization": `Bearer ${tokens2.accessToken}`,
1707
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.28"}`
1707
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.30"}`
1708
1708
  }
1709
1709
  });
1710
1710
  if (response.status === 401) {
@@ -2407,7 +2407,7 @@ async function callApi(path60, init3 = {}) {
2407
2407
  "Authorization": `Bearer ${token}`,
2408
2408
  "X-Device-Id": getDeviceId(),
2409
2409
  "X-Session-Id": getSessionId() || "",
2410
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.28"}`,
2410
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.30"}`,
2411
2411
  "Content-Type": init3.headers?.["Content-Type"] || "application/json"
2412
2412
  });
2413
2413
  const doFetch = async (token) => {
@@ -16121,8 +16121,8 @@ var require_package = __commonJS({
16121
16121
  "package.json"(exports, module) {
16122
16122
  module.exports = {
16123
16123
  name: "@bonginkan/maria",
16124
- version: "4.3.28",
16125
- description: "\u{1F680} MARIA v4.3.28 - 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.",
16124
+ version: "4.3.30",
16125
+ description: "\u{1F680} MARIA v4.3.30 - 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.",
16126
16126
  keywords: [
16127
16127
  "ai",
16128
16128
  "cli",
@@ -22827,8 +22827,19 @@ async function runImagePipeline(params2, opts) {
22827
22827
  metrics: { durationMs, retries: totalRetries, fallbacks: 0 },
22828
22828
  trace: Math.random().toString(36).slice(2, 8).toUpperCase()
22829
22829
  };
22830
- const items = successes.filter(Boolean).map((b) => ({ bytes: b, ext: `.${params2.format}` }));
22831
- const saved = await saveArtifacts({ root: opts.root, kind: "image", baseDir: opts.outDir, flat: true, skipManifest: true }, items, manifest);
22830
+ const baseDir = opts.outDir && opts.outDir.length > 0 ? opts.outDir : "image";
22831
+ const rawPrefix = (params2.prompt || "").slice(0, 20).replace(/\s+/g, "_");
22832
+ let promptPrefix = rawPrefix.replace(/[\x00-\x1F<>:"/\\|?*]/g, "_").replace(/[. ]+$/g, "");
22833
+ if (!promptPrefix) promptPrefix = "untitled";
22834
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i.test(promptPrefix)) promptPrefix = `${promptPrefix}_`;
22835
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
22836
+ const filtered = successes.filter(Boolean);
22837
+ const items = filtered.map((b, i2) => ({
22838
+ bytes: b,
22839
+ ext: `.${params2.format}`,
22840
+ logicalName: `${promptPrefix}-${utc}${filtered.length > 1 ? `-${String(i2 + 1).padStart(2, "0")}` : ""}`
22841
+ }));
22842
+ const saved = await saveArtifacts({ root: opts.root, kind: "image", baseDir, flat: true, skipManifest: true }, items, manifest);
22832
22843
  progress.done();
22833
22844
  return {
22834
22845
  saved,
@@ -23277,14 +23288,23 @@ var init_image_command = __esm({
23277
23288
  const pathMod = await import('path');
23278
23289
  const fsMod = await import('fs/promises');
23279
23290
  const savedPaths = [];
23291
+ const baseDir = "image";
23292
+ const rawPrefix = (cli.prompt || "").slice(0, 20).replace(/\s+/g, "_");
23293
+ let promptPrefix = rawPrefix.replace(/[\x00-\x1F<>:"/\\|?*]/g, "_").replace(/[. ]+$/g, "");
23294
+ if (!promptPrefix) promptPrefix = "untitled";
23295
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i.test(promptPrefix)) promptPrefix = `${promptPrefix}_`;
23296
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23297
+ let idx = 0;
23280
23298
  for (const f3 of filesInline) {
23281
23299
  const original = String(f3.file || "").replace(/^[\\/]+/, "");
23282
- const name2 = pathMod.basename(original);
23283
- const full = pathMod.resolve(root, name2);
23300
+ const ext2 = pathMod.extname(original) || `.${cli.format}`;
23301
+ const name2 = `${promptPrefix}-${utc}${filesInline.length > 1 ? `-${String(++idx).padStart(2, "0")}` : ""}${ext2}`;
23302
+ const rel = pathMod.join(baseDir, name2);
23303
+ const full = pathMod.resolve(root, rel);
23284
23304
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
23285
23305
  const buf = Buffer.from(String(f3.bytesBase64 || ""), "base64");
23286
23306
  await fsMod.writeFile(full, buf);
23287
- savedPaths.push(name2);
23307
+ savedPaths.push(rel.replace(/\\/g, "/"));
23288
23308
  }
23289
23309
  const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
23290
23310
  const output4 = await formatImageOutput3(root, {
@@ -23310,18 +23330,24 @@ var init_image_command = __esm({
23310
23330
  const fsMod = await import('fs/promises');
23311
23331
  const base = (process.env.MARIA_API_BASE || "https://api.maria-code.ai").replace(/\/$/, "");
23312
23332
  const savedPaths = [];
23333
+ const baseDir = "image";
23334
+ const promptPrefix = (cli.prompt || "").slice(0, 20).replace(/\s+/g, "_").replace(/[^A-Za-z0-9_\-]/g, "_") || "untitled";
23335
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23336
+ let idx = 0;
23313
23337
  for (const relRaw of filesList) {
23314
23338
  const originalRel = String(relRaw || "").replace(/^[\\/]+/, "");
23315
23339
  const url2 = `${base}/${originalRel}`;
23316
- const name2 = pathMod.basename(originalRel);
23317
- const full = pathMod.resolve(root, name2);
23340
+ const ext2 = pathMod.extname(originalRel) || `.${cli.format}`;
23341
+ const name2 = `${promptPrefix}-${utc}${filesList.length > 1 ? `-${String(++idx).padStart(2, "0")}` : ""}${ext2}`;
23342
+ const rel = pathMod.join(baseDir, name2);
23343
+ const full = pathMod.resolve(root, rel);
23318
23344
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
23319
23345
  const res2 = await fetch(url2);
23320
23346
  if (!res2.ok) throw new Error(`Failed to download image: ${res2.status}`);
23321
23347
  const arrayBuf = await res2.arrayBuffer();
23322
23348
  const buf = Buffer.from(arrayBuf);
23323
23349
  await fsMod.writeFile(full, buf);
23324
- savedPaths.push(name2);
23350
+ savedPaths.push(rel.replace(/\\/g, "/"));
23325
23351
  }
23326
23352
  const { formatImageOutput: formatImageOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
23327
23353
  const output4 = await formatImageOutput3(root, {
@@ -23577,8 +23603,17 @@ async function runVideoPipeline(params2, opts) {
23577
23603
  metrics: { durationMs: Date.now() - started, retries: 0, fallbacks: 0 },
23578
23604
  trace: Math.random().toString(36).slice(2, 8).toUpperCase()
23579
23605
  };
23580
- const baseDir = opts.outDir || path10__namespace.join("artifacts", "media", "videos", String(manifest2.trace));
23581
- const saved2 = await saveArtifacts({ root: opts.root, kind: "video", baseDir, flat: true }, [{ bytes, ext: ext2 }], manifest2);
23606
+ const baseDir = opts.outDir && opts.outDir.length > 0 ? opts.outDir : "video";
23607
+ const rawPrefix = (params2.prompt || "").slice(0, 20).replace(/\s+/g, "_");
23608
+ let promptPrefix = rawPrefix.replace(/[\x00-\x1F<>:\"/\\|?*]/g, "_").replace(/[. ]+$/g, "");
23609
+ if (!promptPrefix) promptPrefix = "untitled";
23610
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i.test(promptPrefix)) promptPrefix = `${promptPrefix}_`;
23611
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23612
+ const saved2 = await saveArtifacts(
23613
+ { root: opts.root, kind: "video", baseDir, flat: true },
23614
+ [{ bytes, ext: ext2, logicalName: `${promptPrefix}-${utc}` }],
23615
+ manifest2
23616
+ );
23582
23617
  return { saved: saved2, durationMs: Date.now() - started, frames: 0, warnFallback: false, retries: 0 };
23583
23618
  }
23584
23619
  } catch {
@@ -23624,14 +23659,28 @@ async function runVideoPipeline(params2, opts) {
23624
23659
  }
23625
23660
  const outBuf = await muxFramesToMp4(tmpDir, params2.fps);
23626
23661
  {
23627
- const baseDir = opts.outDir || path10__namespace.join("artifacts", "media", "videos", String(manifest.trace));
23628
- saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir, flat: true }, [{ bytes: outBuf, ext: ".mp4" }], manifest);
23662
+ const baseDir = opts.outDir && opts.outDir.length > 0 ? opts.outDir : "video";
23663
+ const rawPrefix = (params2.prompt || "").slice(0, 20).replace(/\s+/g, "_");
23664
+ let promptPrefix = rawPrefix.replace(/[\x00-\x1F<>:\"/\\|?*]/g, "_").replace(/[. ]+$/g, "");
23665
+ if (!promptPrefix) promptPrefix = "untitled";
23666
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i.test(promptPrefix)) promptPrefix = `${promptPrefix}_`;
23667
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23668
+ saved = await saveArtifacts(
23669
+ { root: opts.root, kind: "video", baseDir, flat: true },
23670
+ [{ bytes: outBuf, ext: ".mp4", logicalName: `${promptPrefix}-${utc}` }],
23671
+ manifest
23672
+ );
23629
23673
  }
23630
23674
  await fsp__namespace.rm(tmpDir, { recursive: true, force: true });
23631
23675
  } else {
23632
- const items = frames.map((b, i2) => ({ bytes: b, ext: `.png`, logicalName: `frame-${String(i2 + 1).padStart(4, "0")}` }));
23676
+ const rawPrefix = (params2.prompt || "").slice(0, 20).replace(/\s+/g, "_");
23677
+ let promptPrefix = rawPrefix.replace(/[\x00-\x1F<>:\"/\\|?*]/g, "_").replace(/[. ]+$/g, "");
23678
+ if (!promptPrefix) promptPrefix = "untitled";
23679
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i.test(promptPrefix)) promptPrefix = `${promptPrefix}_`;
23680
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23681
+ const items = frames.map((b, i2) => ({ bytes: b, ext: `.png`, logicalName: `${promptPrefix}-${utc}-frame-${String(i2 + 1).padStart(4, "0")}` }));
23633
23682
  {
23634
- const baseDir = opts.outDir || path10__namespace.join("artifacts", "media", "videos", String(manifest.trace));
23683
+ const baseDir = opts.outDir && opts.outDir.length > 0 ? opts.outDir : "video";
23635
23684
  saved = await saveArtifacts({ root: opts.root, kind: "video", baseDir, flat: true }, items, manifest);
23636
23685
  }
23637
23686
  warnFallback = true;
@@ -23723,14 +23772,23 @@ var init_video_command = __esm({
23723
23772
  const pathMod = await import('path');
23724
23773
  const fsMod = await import('fs/promises');
23725
23774
  const savedPaths = [];
23775
+ const baseDir = "video";
23776
+ const rawPrefix = (cli.prompt || "").slice(0, 20).replace(/\s+/g, "_");
23777
+ let promptPrefix = rawPrefix.replace(/[\x00-\x1F<>:"/\\|?*]/g, "_").replace(/[. ]+$/g, "");
23778
+ if (!promptPrefix) promptPrefix = "untitled";
23779
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i.test(promptPrefix)) promptPrefix = `${promptPrefix}_`;
23780
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23781
+ let idx = 0;
23726
23782
  for (const f3 of filesInline) {
23727
23783
  const original = String(f3.file || "").replace(/^[\\/]+/, "");
23728
- const name2 = pathMod.basename(original || `video.${cli.format}`);
23729
- const full = pathMod.resolve(root, name2);
23784
+ const ext2 = pathMod.extname(original) || `.${cli.format}`;
23785
+ const name2 = `${promptPrefix}-${utc}${filesInline.length > 1 ? `-${String(++idx).padStart(2, "0")}` : ""}${ext2}`;
23786
+ const rel = pathMod.join(baseDir, name2);
23787
+ const full = pathMod.resolve(root, rel);
23730
23788
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
23731
23789
  const buf = Buffer.from(String(f3.bytesBase64 || ""), "base64");
23732
23790
  await fsMod.writeFile(full, buf);
23733
- savedPaths.push(name2);
23791
+ savedPaths.push(rel.replace(/\\/g, "/"));
23734
23792
  }
23735
23793
  const { formatVideoOutput: formatVideoOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
23736
23794
  const output4 = await formatVideoOutput3(root, {
@@ -23759,18 +23817,24 @@ var init_video_command = __esm({
23759
23817
  const fsMod = await import('fs/promises');
23760
23818
  const base = (process.env.MARIA_API_BASE || "https://api.maria-code.ai").replace(/\/$/, "");
23761
23819
  const savedPaths = [];
23820
+ const baseDir = "video";
23821
+ const promptPrefix = (cli.prompt || "").slice(0, 20).replace(/\s+/g, "_").replace(/[^A-Za-z0-9_\-]/g, "_") || "untitled";
23822
+ const utc = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
23823
+ let idx = 0;
23762
23824
  for (const relRaw of filesFromApi) {
23763
- const rel = String(relRaw || "").replace(/^[\\/]+/, "");
23764
- const url2 = `${base}/${rel}`;
23765
- const name2 = pathMod.basename(rel);
23766
- const full = pathMod.resolve(root, name2);
23825
+ const relApi = String(relRaw || "").replace(/^[\\/]+/, "");
23826
+ const url2 = `${base}/${relApi}`;
23827
+ const ext2 = pathMod.extname(relApi) || `.${cli.format}`;
23828
+ const name2 = `${promptPrefix}-${utc}${filesFromApi.length > 1 ? `-${String(++idx).padStart(2, "0")}` : ""}${ext2}`;
23829
+ const rel = pathMod.join(baseDir, name2);
23830
+ const full = pathMod.resolve(root, rel);
23767
23831
  await fsMod.mkdir(pathMod.dirname(full), { recursive: true });
23768
23832
  const res2 = await fetch(url2);
23769
23833
  if (!res2.ok) throw new Error(`Failed to download video: ${res2.status}`);
23770
23834
  const arrayBuf = await res2.arrayBuffer();
23771
23835
  const buf = Buffer.from(arrayBuf);
23772
23836
  await fsMod.writeFile(full, buf);
23773
- savedPaths.push(name2);
23837
+ savedPaths.push(rel.replace(/\\/g, "/"));
23774
23838
  }
23775
23839
  const { formatVideoOutput: formatVideoOutput3 } = await Promise.resolve().then(() => (init_cli_style(), cli_style_exports));
23776
23840
  const output4 = await formatVideoOutput3(root, {
@@ -25753,7 +25817,7 @@ var init_about_command = __esm({
25753
25817
  async execute(args2, context2) {
25754
25818
  const output3 = [];
25755
25819
  output3.push("");
25756
- output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.28"));
25820
+ output3.push(chalk40__default.default.cyan.bold("\u{1F916} About MARIA v4.3.30"));
25757
25821
  output3.push(chalk40__default.default.gray("\u2550".repeat(40)));
25758
25822
  output3.push("");
25759
25823
  output3.push(chalk40__default.default.white.bold("MARIA - Minimal API, Maximum Power"));