@bonginkan/maria 4.3.39 → 4.3.40

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.39
1
+ # MARIA - AI Development Platform v4.3.40
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,12 @@
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.39 (September 29, 2025)
13
+ ## 🚀 What's New in v4.3.40 (October, 2025)
14
+
15
+ ### Functinal enhancements
16
+ - **Enhanced Natural Language Support**: Main commands called automatically by natural language input
17
+ - **Research and novel**: Research and novel generation now fully functional
18
+ - **Improved coding**
14
19
 
15
20
  ### 🎯 Interactive Improvements & Choice Memory
16
21
  - **Choice Memory System**: Smart persistence of user selections across sessions
@@ -922,7 +927,7 @@ await secureWorkflow.executeWithAuth(workflowDefinition, securityContext);
922
927
  ### Quick Installation
923
928
  ```bash
924
929
  # Install globally (recommended)
925
- npm install -g @bonginkan/maria@4.3.39
930
+ npm install -g @bonginkan/maria@4.3.40
926
931
 
927
932
  # Verify installation
928
933
  maria --version # Should show v4.3.9
@@ -1126,7 +1131,7 @@ MARIA CODE is distributed under a comprehensive licensing system designed for in
1126
1131
 
1127
1132
  *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
1133
 
1129
- **Transform your development experience today**: `npm install -g @bonginkan/maria@4.3.39`
1134
+ **Transform your development experience today**: `npm install -g @bonginkan/maria@4.3.40`
1130
1135
 
1131
1136
  🌐 **Official Website**: [https://maria-code.ai](https://maria-code.ai)
1132
1137
  💬 **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-10-05T09:49:22.946Z",
3
+ "generatedAt": "2025-10-05T10:57:31.633Z",
4
4
  "totalCommands": 19,
5
5
  "readyCount": 19,
6
6
  "partialCount": 0,
@@ -26066,8 +26066,8 @@ var require_package = __commonJS({
26066
26066
  "package.json"(exports, module) {
26067
26067
  module.exports = {
26068
26068
  name: "@bonginkan/maria",
26069
- version: "4.3.39",
26070
- description: "\u{1F680} MARIA v4.3.39 - 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.",
26069
+ version: "4.3.40",
26070
+ description: "\u{1F680} MARIA v4.3.40 - 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.",
26071
26071
  keywords: [
26072
26072
  "ai",
26073
26073
  "cli",
@@ -28104,7 +28104,7 @@ var init_AuthenticationManager = __esm({
28104
28104
  const response = await fetch(`${this.apiBase}/api/user/profile`, {
28105
28105
  headers: {
28106
28106
  "Authorization": `Bearer ${tokens2.accessToken}`,
28107
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.39"}`
28107
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.40"}`
28108
28108
  }
28109
28109
  });
28110
28110
  if (response.status === 401) {
@@ -28758,7 +28758,7 @@ async function callApi(path65, init3 = {}) {
28758
28758
  "Authorization": `Bearer ${token}`,
28759
28759
  "X-Device-Id": getDeviceId(),
28760
28760
  "X-Session-Id": getSessionId() || "",
28761
- "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.39"}`,
28761
+ "User-Agent": `maria-cli/${process.env.CLI_VERSION || "4.3.40"}`,
28762
28762
  "Content-Type": init3.headers?.["Content-Type"] || "application/json"
28763
28763
  });
28764
28764
  const doFetch = async (token) => {
@@ -51261,7 +51261,7 @@ var init_about_command = __esm({
51261
51261
  async execute(args2, context2) {
51262
51262
  const output3 = [];
51263
51263
  output3.push("");
51264
- output3.push(chalk14__default.default.cyan.bold("\u{1F916} About MARIA v4.3.39"));
51264
+ output3.push(chalk14__default.default.cyan.bold("\u{1F916} About MARIA v4.3.40"));
51265
51265
  output3.push(chalk14__default.default.gray("\u2550".repeat(40)));
51266
51266
  output3.push("");
51267
51267
  output3.push(chalk14__default.default.white.bold("MARIA - Minimal API, Maximum Power"));
@@ -56028,6 +56028,114 @@ function languageFromExt(ext2) {
56028
56028
  if (e2 === "yaml" || e2 === "yml") return "yaml";
56029
56029
  return void 0;
56030
56030
  }
56031
+ async function readHeadTail(root, rel, n) {
56032
+ try {
56033
+ const fs52 = await import('fs/promises');
56034
+ const pathMod = await import('path');
56035
+ const full = pathMod.join(root, rel);
56036
+ const buf = await fs52.readFile(full, "utf8");
56037
+ const lines = buf.split(/\r?\n/);
56038
+ const head2 = lines.slice(0, n).join("\n");
56039
+ const tail = lines.slice(Math.max(0, lines.length - n)).join("\n");
56040
+ return { head: head2, tail };
56041
+ } catch {
56042
+ return { head: "", tail: "" };
56043
+ }
56044
+ }
56045
+ async function llmSelectEditTargets(root, request, repoFiles) {
56046
+ try {
56047
+ const candidates = repoFiles.filter((p) => /\.(html|css|js|ts|tsx)$/i.test(p)).slice(0, 150);
56048
+ const samples = [];
56049
+ for (const p of candidates.slice(0, 60)) {
56050
+ const h2 = await readHeadTail(root, p, 5);
56051
+ samples.push(`- ${p}
56052
+ ${h2.head}`);
56053
+ }
56054
+ const system = [
56055
+ "You select existing repository files that should be EDITED to satisfy a user request.",
56056
+ "Consider path names and the first lines. Return JSON array of repo-relative paths to edit.",
56057
+ "Keep the list short (<= 10). If none are relevant, return []. Do not invent paths."
56058
+ ].join("\n");
56059
+ const user = [`Request: ${request}`, "Candidates:", samples.join("\n\n")].join("\n\n");
56060
+ const resp = await executeChat([
56061
+ { role: "system", content: system },
56062
+ { role: "user", content: user }
56063
+ ]);
56064
+ const raw = (resp?.output || "").trim();
56065
+ const jsonText = (() => {
56066
+ try {
56067
+ const m2 = raw.match(/\[[\s\S]*\]/);
56068
+ return m2 ? m2[0] : raw;
56069
+ } catch {
56070
+ return raw;
56071
+ }
56072
+ })();
56073
+ const arr = JSON.parse(jsonText);
56074
+ const set = new Set(candidates.map((c) => c.toLowerCase()));
56075
+ const out = [];
56076
+ if (Array.isArray(arr)) {
56077
+ for (const v of arr) {
56078
+ if (typeof v === "string" && set.has(v.toLowerCase())) out.push(v);
56079
+ if (out.length >= 10) break;
56080
+ }
56081
+ }
56082
+ return out;
56083
+ } catch {
56084
+ return [];
56085
+ }
56086
+ }
56087
+ async function llmMapBlockToFile(root, request, block, repoFiles) {
56088
+ try {
56089
+ const lang = (block.language || "").toLowerCase();
56090
+ const extFilter = lang.includes("html") ? /\.html$/i : /(ts|tsx)/.test(lang) ? /\.(ts|tsx)$/i : /(js|jsx)/.test(lang) ? /\.(js|jsx)$/i : /\.css$/i;
56091
+ const candidates = repoFiles.filter((p) => extFilter.test(p)).slice(0, 80);
56092
+ const head2 = block.code.split(/\r?\n/).slice(0, 20).join("\n");
56093
+ const samples = [];
56094
+ for (const p of candidates.slice(0, 40)) {
56095
+ const h2 = await readHeadTail(root, p, 8);
56096
+ samples.push(`- ${p}
56097
+ ${h2.head}`);
56098
+ }
56099
+ const system = [
56100
+ "Decide where to apply an EDIT vs CREATE for a code block within an existing repository.",
56101
+ 'Return JSON: { "action": "modify"|"create", "path": string }.',
56102
+ "If modify, path must be one of the candidate repo-relative paths. If create, propose a sensible repo-relative path."
56103
+ ].join("\n");
56104
+ const user = [
56105
+ `Request: ${request}`,
56106
+ "Block:",
56107
+ "```",
56108
+ head2,
56109
+ "```",
56110
+ "Candidates:",
56111
+ samples.join("\n\n")
56112
+ ].join("\n");
56113
+ const resp = await executeChat([
56114
+ { role: "system", content: system },
56115
+ { role: "user", content: user }
56116
+ ]);
56117
+ const raw = (resp?.output || "").trim();
56118
+ const jsonText = (() => {
56119
+ try {
56120
+ const m2 = raw.match(/\{[\s\S]*\}/);
56121
+ return m2 ? m2[0] : raw;
56122
+ } catch {
56123
+ return raw;
56124
+ }
56125
+ })();
56126
+ const parsed = JSON.parse(jsonText);
56127
+ if (parsed && (parsed.action === "modify" || parsed.action === "create") && typeof parsed.path === "string") {
56128
+ return { action: parsed.action, path: parsed.path.replace(/^\/+/, "") };
56129
+ }
56130
+ } catch {
56131
+ }
56132
+ const desired = typeof block.filename === "string" && block.filename.trim() ? block.filename.trim() : null;
56133
+ const fallback2 = desired || suggestName2(request, block.language, 0);
56134
+ return { action: "create", path: fallback2 };
56135
+ }
56136
+ function tokenizeRequest(text) {
56137
+ return Array.from(new Set(text.toLowerCase().replace(/[^a-z0-9_-]+/g, " ").split(/\s+/).filter((t2) => t2.length >= 3)));
56138
+ }
56031
56139
  async function ensureCodeFallbackManager() {
56032
56140
  const policy = await loadFallbackPolicy().catch(() => getDefaultFallbackPolicy());
56033
56141
  const signature = JSON.stringify(policy);
@@ -56073,8 +56181,8 @@ async function orchestrate(request, opts) {
56073
56181
  if (isEditIntent && editTargets.length === 0) {
56074
56182
  try {
56075
56183
  const repoFiles = await getRepoFiles(opts.root);
56076
- const likely = repoFiles.filter((p) => /\.(ts|tsx|js|jsx|html|css|scss|json|md)$/i.test(p));
56077
- editTargets = likely.slice(0, 20);
56184
+ const llmTargets = await llmSelectEditTargets(opts.root, request, repoFiles);
56185
+ editTargets = llmTargets;
56078
56186
  } catch {
56079
56187
  }
56080
56188
  }
@@ -56135,6 +56243,7 @@ ${editContext}`;
56135
56243
  data_base64: f3.content ? Buffer.from(f3.content, "utf8").toString("base64") : void 0
56136
56244
  })).map((a) => a.data_base64 ? a : { ...a, data_base64: void 0 }) : [];
56137
56245
  const pathAttachments = [];
56246
+ const attachedPathSet = /* @__PURE__ */ new Set();
56138
56247
  if (explicitFiles.length > 0) {
56139
56248
  try {
56140
56249
  const fs52 = await import('fs/promises');
@@ -56153,6 +56262,33 @@ ${editContext}`;
56153
56262
  mime,
56154
56263
  data_base64: buf.toString("base64")
56155
56264
  });
56265
+ attachedPathSet.add(full.toLowerCase());
56266
+ } catch {
56267
+ }
56268
+ }
56269
+ } catch {
56270
+ }
56271
+ }
56272
+ if (isEditIntent && Array.isArray(editTargets) && editTargets.length > 0) {
56273
+ try {
56274
+ const fs52 = await import('fs/promises');
56275
+ const pathMod = await import('path');
56276
+ for (const rel of editTargets) {
56277
+ try {
56278
+ const full = pathMod.isAbsolute(rel) ? rel : pathMod.join(opts.root, rel);
56279
+ const key = full.toLowerCase();
56280
+ if (attachedPathSet.has(key)) continue;
56281
+ const stat13 = await fs52.stat(full).catch(() => null);
56282
+ if (!stat13 || !stat13.isFile()) continue;
56283
+ const ext2 = (pathMod.extname(full) || "").toLowerCase();
56284
+ const buf = await fs52.readFile(full);
56285
+ pathAttachments.push({
56286
+ name: pathMod.basename(full),
56287
+ path: full,
56288
+ mime: "text/plain",
56289
+ data_base64: buf.toString("base64")
56290
+ });
56291
+ attachedPathSet.add(key);
56156
56292
  } catch {
56157
56293
  }
56158
56294
  }
@@ -56257,21 +56393,31 @@ ${editContext}`;
56257
56393
  return m2 >= 0 ? f3.slice(m2) : "";
56258
56394
  })();
56259
56395
  const lang = languageFromExt(ext2);
56260
- initial.push({ path: f3, absPath: absMap[f3], noNormalize: true, kind: "source", action: "modify", description: "Edit target", language: lang, preview: "" });
56396
+ const strongMatch = /pong|retro|game|index\.(html)$|script\.(js|ts)$|style\.css/i.test(f3) || tokenizeRequest(request).some((t2) => f3.toLowerCase().includes(t2));
56397
+ if (strongMatch) {
56398
+ initial.push({ path: f3, absPath: absMap[f3], noNormalize: true, kind: "source", action: "modify", description: "Edit target", language: lang, preview: "" });
56399
+ }
56261
56400
  }
56262
56401
  } else {
56263
- for (let i2 = 0; i2 < blocks.length; i2++) {
56264
- const b = blocks[i2];
56265
- const desired = typeof b.filename === "string" && b.filename.trim() ? b.filename.trim() : null;
56266
- const path65 = desired || suggestName2(request, b.language, i2);
56267
- initial.push({
56268
- path: path65,
56269
- kind: "source",
56270
- action: "create",
56271
- description: describe2(b.language, ""),
56272
- language: b.language,
56273
- preview: b.code
56274
- });
56402
+ try {
56403
+ const repoFiles = await getRepoFiles(opts.root);
56404
+ for (let i2 = 0; i2 < blocks.length; i2++) {
56405
+ const b = blocks[i2];
56406
+ const decision = await llmMapBlockToFile(opts.root, request, b, repoFiles);
56407
+ if (decision.action === "modify" && repoFiles.includes(decision.path)) {
56408
+ const lang = languageFromExt(decision.path.replace(/^.*(\.[a-z0-9]+)$/i, "$1"));
56409
+ initial.push({ path: decision.path, kind: "source", action: "modify", description: "Modify existing file", language: lang, preview: b.code });
56410
+ } else {
56411
+ const path65 = decision.path || suggestName2(request, b.language, i2);
56412
+ initial.push({ path: path65, kind: "source", action: "create", description: describe2(b.language, ""), language: b.language, preview: b.code });
56413
+ }
56414
+ }
56415
+ } catch {
56416
+ for (let i2 = 0; i2 < blocks.length; i2++) {
56417
+ const b = blocks[i2];
56418
+ const path65 = suggestName2(request, b.language, i2);
56419
+ initial.push({ path: path65, kind: "source", action: "create", description: describe2(b.language, ""), language: b.language, preview: b.code });
56420
+ }
56275
56421
  }
56276
56422
  }
56277
56423
  }
@@ -56311,6 +56457,9 @@ ${editContext}`;
56311
56457
  } catch {
56312
56458
  p.action = "create";
56313
56459
  }
56460
+ if (p.action === "modify" && (!p.preview || p.preview.length === 0)) {
56461
+ p.action = "skip";
56462
+ }
56314
56463
  }
56315
56464
  } catch {
56316
56465
  }