@bonginkan/maria 4.4.8 → 4.4.9

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
@@ -1828,7 +1828,7 @@ var init_AuthenticationManager = __esm({
1828
1828
  const response = await fetch(`${this.apiBase}/api/user/profile`, {
1829
1829
  headers: {
1830
1830
  "Authorization": `Bearer ${tokens2.accessToken}`,
1831
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.4.8"}`
1831
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.4.9"}`
1832
1832
  }
1833
1833
  });
1834
1834
  if (response.status === 401) {
@@ -2576,7 +2576,7 @@ async function callApi(path69, init3 = {}) {
2576
2576
  "Authorization": `Bearer ${token}`,
2577
2577
  "X-Device-Id": getDeviceId(),
2578
2578
  "X-Session-Id": getSessionId() || "",
2579
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.4.8"}`,
2579
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.4.9"}`,
2580
2580
  "Content-Type": init3.headers?.["Content-Type"] || "application/json"
2581
2581
  });
2582
2582
  const doFetch = async (token) => {
@@ -15330,7 +15330,7 @@ var init_about_command = __esm({
15330
15330
  async execute(args2, context2) {
15331
15331
  const output3 = [];
15332
15332
  output3.push("");
15333
- output3.push(chalk48__default.default.cyan.bold("About MARIA v4.4.8"));
15333
+ output3.push(chalk48__default.default.cyan.bold("About MARIA v4.4.9"));
15334
15334
  output3.push(chalk48__default.default.gray("\u2550".repeat(40)));
15335
15335
  output3.push("");
15336
15336
  output3.push(chalk48__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
@@ -15406,7 +15406,7 @@ var init_contact_command = __esm({
15406
15406
  output3.push("");
15407
15407
  output3.push(chalk48__default.default.white.bold("Company Information:"));
15408
15408
  output3.push(" Company: Bonginkan");
15409
- output3.push(" Product: MARIA v4.4.8");
15409
+ output3.push(" Product: MARIA v4.4.9");
15410
15410
  output3.push(" Website: https://bonginkan.ai");
15411
15411
  output3.push(" Product Site: https://maria-code.ai");
15412
15412
  output3.push("");
@@ -18684,8 +18684,8 @@ var require_package = __commonJS({
18684
18684
  "package.json"(exports, module) {
18685
18685
  module.exports = {
18686
18686
  name: "@bonginkan/maria",
18687
- version: "4.4.8",
18688
- description: "\u{1F680} MARIA v4.4.8 - 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.",
18687
+ version: "4.4.9",
18688
+ description: "\u{1F680} MARIA v4.4.9 - 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.",
18689
18689
  keywords: [
18690
18690
  "ai",
18691
18691
  "cli",
@@ -36627,7 +36627,7 @@ var init_manager = __esm({
36627
36627
  return [
36628
36628
  "gemini-2.5-pro",
36629
36629
  "gemini-2.5-flash",
36630
- "gemini-2.5-flash-image-preview",
36630
+ "gemini-3-pro-image-preview",
36631
36631
  "gemini-2.5-flash-lite"
36632
36632
  ];
36633
36633
  }
@@ -36990,7 +36990,7 @@ var init_config_manager = __esm({
36990
36990
  "claude-opus-4-20250514",
36991
36991
  "claude-sonnet-4-20250514"
36992
36992
  ],
36993
- google: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-image-preview", "gemini-2.5-flash-lite", "gemini-2.0-flash-exp", "gemini-1.5-pro", "gemini-1.5-flash"],
36993
+ google: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-3-pro-image-preview", "gemini-2.5-flash-lite", "gemini-2.0-flash-exp", "gemini-1.5-pro", "gemini-1.5-flash"],
36994
36994
  groq: [
36995
36995
  "llama-3.1-70b-versatile",
36996
36996
  "llama-3.1-8b-instant",
@@ -38788,7 +38788,7 @@ var init_types4 = __esm({
38788
38788
  PROVIDER_MATRIX = [
38789
38789
  {
38790
38790
  provider: "google",
38791
- model: "gemini-2.5-flash-image-preview",
38791
+ model: "gemini-3-pro-image-preview",
38792
38792
  kind: "image",
38793
38793
  maxImageSize: [2048, 2048],
38794
38794
  supportedImageFormats: ["png", "webp", "jpg"],
@@ -39595,7 +39595,7 @@ var init_gemini_media = __esm({
39595
39595
  }
39596
39596
  const { GoogleGenAI } = __require("@google/genai");
39597
39597
  this.ai = new GoogleGenAI({ apiKey });
39598
- this.primaryModel = opts?.model || process.env.MARIA_IMAGE_MODEL || "gemini-2.5-flash-image-preview";
39598
+ this.primaryModel = opts?.model || process.env.MARIA_IMAGE_MODEL || "gemini-3-pro-image-preview";
39599
39599
  }
39600
39600
  async generateImage(req) {
39601
39601
  const modelName = this.primaryModel;
@@ -39612,11 +39612,8 @@ var init_gemini_media = __esm({
39612
39612
  try {
39613
39613
  resp = await this.ai.models.generateContent({
39614
39614
  model: modelName,
39615
- contents: [{ role: "user", parts: [{ text: String(req.prompt) }] }],
39616
- generationConfig: {
39617
- responseModalities: ["IMAGE"],
39618
- responseMimeType: targetMime
39619
- }
39615
+ // For @google/genai, a simple string prompt is sufficient here.
39616
+ contents: String(req.prompt ?? "")
39620
39617
  });
39621
39618
  } catch (err) {
39622
39619
  const errMsg = err?.message || String(err);
@@ -39624,15 +39621,19 @@ var init_gemini_media = __esm({
39624
39621
  `GeminiMediaProvider.generateImage request failed: model=${modelName}; prompt="${promptPreview}"; error=${errMsg}`
39625
39622
  );
39626
39623
  }
39627
- const feedback = resp?.response?.promptFeedback;
39624
+ const root = resp?.response ?? resp;
39625
+ const feedback = root?.promptFeedback || root?.prompt_feedback;
39628
39626
  const blockReason = feedback?.blockReason || feedback?.block_reason;
39629
39627
  if (blockReason) {
39630
39628
  const modelName2 = this.primaryModel;
39631
39629
  const reason = String(blockReason);
39632
39630
  throw new Error(`GeminiMediaProvider.policy_violation: model=${modelName2}; reason=${reason}`);
39633
39631
  }
39634
- const parts = resp?.response?.candidates?.[0]?.content?.parts || [];
39635
- for (const p2 of parts) {
39632
+ const candidates = root?.candidates ?? [];
39633
+ const parts = candidates?.[0]?.content?.parts || [];
39634
+ for (let i2 = parts.length - 1; i2 >= 0; i2--) {
39635
+ const p2 = parts[i2];
39636
+ if (p2?.thought === true) continue;
39636
39637
  const data = p2?.inlineData?.data || p2?.inline_data?.data;
39637
39638
  const mime = p2?.inlineData?.mimeType || p2?.inline_data?.mime_type || p2?.inline_data?.mimeType || p2?.inlineData?.mime_type;
39638
39639
  if (data) {
@@ -39640,22 +39641,17 @@ var init_gemini_media = __esm({
39640
39641
  if (buf.length > 0) return { bytes: buf, mime: typeof mime === "string" ? mime : targetMime };
39641
39642
  }
39642
39643
  }
39643
- try {
39644
- const imagenModel = process.env.MARIA_IMAGE_FALLBACK_MODEL || "imagen-4.0-generate-001";
39645
- const r2 = await this.ai.models.generateImages({
39646
- model: imagenModel,
39647
- prompt: String(req.prompt)
39648
- });
39649
- const img0 = r2?.generatedImages?.[0]?.image;
39650
- const bytesB64 = img0?.imageBytes || img0?.bytesBase64Encoded;
39651
- if (bytesB64) {
39652
- const buf = Buffer.from(String(bytesB64), "base64");
39653
- if (buf.length > 0) return { bytes: buf, mime: targetMime };
39644
+ for (let i2 = parts.length - 1; i2 >= 0; i2--) {
39645
+ const p2 = parts[i2];
39646
+ const data = p2?.inlineData?.data || p2?.inline_data?.data;
39647
+ const mime = p2?.inlineData?.mimeType || p2?.inline_data?.mime_type || p2?.inline_data?.mimeType || p2?.inlineData?.mime_type;
39648
+ if (data) {
39649
+ const buf = Buffer.from(String(data), "base64");
39650
+ if (buf.length > 0) return { bytes: buf, mime: typeof mime === "string" ? mime : targetMime };
39654
39651
  }
39655
- } catch {
39656
39652
  }
39657
- const candidatesLen = resp?.response?.candidates?.length ?? 0;
39658
- const finish = resp?.response?.candidates?.[0]?.finishReason || resp?.response?.promptFeedback?.blockReason || "unknown";
39653
+ const candidatesLen = candidates.length ?? 0;
39654
+ const finish = candidates?.[0]?.finishReason || root?.promptFeedback?.blockReason || "unknown";
39659
39655
  const firstPartKeys = parts[0] ? Object.keys(parts[0]).join(",") : "n/a";
39660
39656
  throw new Error(
39661
39657
  `GeminiMediaProvider.generateImage: no inline image returned; model=${modelName}; prompt="${promptPreview}"; candidates=${candidatesLen}; parts=${parts.length}; firstPartKeys=${firstPartKeys}; finish=${finish}`