@bonginkan/maria 4.2.9 → 4.2.11

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.2.9
1
+ # MARIA - AI Development Platform v4.2.11
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.2.9 (September 3, 2025)
13
+ ## 🚀 What's New in v4.2.11 (September 3, 2025)
14
14
 
15
15
  ### 🏗️ Build Status - All Systems Operational ✅
16
16
  - **CLI NPM Package**: ESM + CJS builds successful (2.02MB/1.16MB)
@@ -61,6 +61,34 @@
61
61
  $ npm install -g @bonginkan/maria
62
62
  ```
63
63
 
64
+ ### 🪟 Windows: Add npm global prefix to PATH
65
+ On Windows, npm's global bin directory may not be on PATH by default. After installing, verify and add the directory returned by `npm prefix -g` to PATH.
66
+
67
+ ```powershell
68
+ # Show npm global prefix (this directory should be on PATH)
69
+ npm prefix -g;
70
+
71
+ # Temporarily add to current PowerShell session
72
+ $env:Path += ";" + (npm prefix -g).Trim(); Get-Command maria;
73
+
74
+ # Persist for the current user (idempotent)
75
+ $npmBin = (npm prefix -g).Trim();
76
+ $userPath = [Environment]::GetEnvironmentVariable('Path','User');
77
+ if ($userPath -notlike "*$npmBin*") {
78
+ [Environment]::SetEnvironmentVariable('Path', ($userPath.TrimEnd(';') + ";" + $npmBin), 'User');
79
+ "Added to PATH: $npmBin";
80
+ } else {
81
+ "Already on PATH: $npmBin";
82
+ }
83
+
84
+ # Restart PowerShell, then verify
85
+ maria --version;
86
+ ```
87
+
88
+ Notes:
89
+ - Default location is typically `%APPDATA%\npm` on Windows.
90
+ - You can also run the CLI without installing globally via: `npx @bonginkan/maria --help`
91
+
64
92
  ### 🔗 VS Code Extension (NEW)
65
93
  **AI-powered coding directly in your editor**
66
94
 
@@ -707,10 +735,10 @@ await secureWorkflow.executeWithAuth(workflowDefinition, securityContext);
707
735
  ### Quick Installation
708
736
  ```bash
709
737
  # Install globally (recommended)
710
- npm install -g @bonginkan/maria@4.2.9
738
+ npm install -g @bonginkan/maria@4.2.11
711
739
 
712
740
  # Verify installation
713
- maria --version # Should show v4.2.9
741
+ maria --version # Should show v4.2.11
714
742
 
715
743
  # Initialize with authentication
716
744
  maria /login # Setup OAuth2.0 + PKCE authentication
@@ -911,7 +939,7 @@ MARIA CODE is distributed under a comprehensive licensing system designed for in
911
939
 
912
940
  *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.*
913
941
 
914
- **Transform your development experience today**: `npm install -g @bonginkan/maria@4.2.9`
942
+ **Transform your development experience today**: `npm install -g @bonginkan/maria@4.2.11`
915
943
 
916
944
  🌐 **Official Website**: [https://maria-code.ai](https://maria-code.ai)
917
945
  💬 **Community**: [https://discord.gg/SMSmSGcEQy](https://discord.gg/SMSmSGcEQy)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "2.0.0",
3
- "generatedAt": "2025-09-04T02:21:07.489Z",
3
+ "generatedAt": "2025-09-04T06:48:50.491Z",
4
4
  "totalCommands": 76,
5
5
  "readyCount": 74,
6
6
  "partialCount": 1,
@@ -174,6 +174,13 @@
174
174
  "depsAvailable": true,
175
175
  "description": "Delete stored memories"
176
176
  },
177
+ "learning/l2r": {
178
+ "status": "READY",
179
+ "hasExecute": true,
180
+ "hasMetadata": true,
181
+ "depsAvailable": true,
182
+ "description": "Learning-to-Rank machine learning system"
183
+ },
177
184
  "intelligence/quality-gate": {
178
185
  "status": "READY",
179
186
  "hasExecute": true,
@@ -195,13 +202,6 @@
195
202
  "depsAvailable": true,
196
203
  "description": "Manage MARIA Intelligence canary deployments for zero-downtime releases"
197
204
  },
198
- "learning/l2r": {
199
- "status": "READY",
200
- "hasExecute": true,
201
- "hasMetadata": true,
202
- "depsAvailable": true,
203
- "description": "Learning-to-Rank machine learning system"
204
- },
205
205
  "graphrag/search": {
206
206
  "status": "READY",
207
207
  "hasExecute": true,
@@ -497,19 +497,19 @@
497
497
  "depsAvailable": true,
498
498
  "description": "Advanced memory service operations"
499
499
  },
500
- "configuration/hooks": {
500
+ "core/enhanced-help": {
501
501
  "status": "READY",
502
502
  "hasExecute": true,
503
503
  "hasMetadata": true,
504
504
  "depsAvailable": true,
505
- "description": "Configure and manage command hooks"
505
+ "description": "Advanced help system with interactive features"
506
506
  },
507
- "core/enhanced-help": {
507
+ "configuration/hooks": {
508
508
  "status": "READY",
509
509
  "hasExecute": true,
510
510
  "hasMetadata": true,
511
511
  "depsAvailable": true,
512
- "description": "Advanced help system with interactive features"
512
+ "description": "Configure and manage command hooks"
513
513
  },
514
514
  "business/analytics": {
515
515
  "status": "READY",
@@ -21942,8 +21942,8 @@ var init_package = __esm({
21942
21942
  "package.json"() {
21943
21943
  package_default = {
21944
21944
  name: "@bonginkan/maria",
21945
- version: "4.2.9",
21946
- description: "\u{1F680} MARIA v4.2.9 - Enterprise AI Development Platform with 100% Command Availability. 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.",
21945
+ version: "4.2.11",
21946
+ description: "\u{1F680} MARIA v4.2.11 - Enterprise AI Development Platform with 100% Command Availability. 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.",
21947
21947
  keywords: [
21948
21948
  "ai",
21949
21949
  "cli",
@@ -23150,6 +23150,7 @@ var init_AuthenticationManager = __esm({
23150
23150
  this.clientId = config2.clientId;
23151
23151
  this.initialized = true;
23152
23152
  } catch (error2) {
23153
+ console.warn("Auth config initialization failed, using fallbacks:", error2);
23153
23154
  this.authBase = this.getAuthBaseUrl();
23154
23155
  this.apiBase = this.getApiBaseUrl();
23155
23156
  this.clientId = process.env.MARIA_CLIENT_ID || "maria-cli";
@@ -23196,7 +23197,8 @@ var init_AuthenticationManager = __esm({
23196
23197
  return await this.refreshToken();
23197
23198
  }
23198
23199
  return true;
23199
- } catch {
23200
+ } catch (error2) {
23201
+ console.error("isAuthenticated failed:", error2);
23200
23202
  return false;
23201
23203
  }
23202
23204
  }
@@ -23260,6 +23262,7 @@ var init_AuthenticationManager = __esm({
23260
23262
  if (error2 instanceof AuthenticationRequiredError || error2 instanceof QuotaExceededError) {
23261
23263
  throw error2;
23262
23264
  }
23265
+ console.error("getCurrentUser failed:", error2);
23263
23266
  throw new Error(ERROR_MESSAGES.NETWORK_ERROR);
23264
23267
  }
23265
23268
  }
@@ -23283,6 +23286,7 @@ var init_AuthenticationManager = __esm({
23283
23286
  try {
23284
23287
  tokens = await this.loginWithPKCEFlow();
23285
23288
  } catch (error2) {
23289
+ console.error("PKCE flow error:", error2);
23286
23290
  if (error2.message?.includes("ECONNREFUSED") || error2.message?.includes("fetch failed")) {
23287
23291
  console.error("\n\u274C Authentication service is currently unavailable");
23288
23292
  console.error("Please try one of the following:");
@@ -23304,6 +23308,7 @@ var init_AuthenticationManager = __esm({
23304
23308
  const user = await this.getCurrentUser();
23305
23309
  return { success: true, user, tokens };
23306
23310
  } catch (error2) {
23311
+ console.error("Login failed:", error2);
23307
23312
  return {
23308
23313
  success: false,
23309
23314
  error: error2.message || "Login failed"
@@ -23395,7 +23400,8 @@ var init_AuthenticationManager = __esm({
23395
23400
  };
23396
23401
  await this.tokenStorage.save(updatedTokens);
23397
23402
  return true;
23398
- } catch {
23403
+ } catch (error2) {
23404
+ console.error("Token refresh failed:", error2);
23399
23405
  return false;
23400
23406
  }
23401
23407
  }
@@ -23437,6 +23443,7 @@ var init_AuthenticationManager = __esm({
23437
23443
  await (0, import_open.default)(authUrl);
23438
23444
  } catch (error2) {
23439
23445
  server.close();
23446
+ console.error("Failed to open browser for authentication:", error2);
23440
23447
  throw new Error("Failed to open browser");
23441
23448
  }
23442
23449
  const authCode = await this.waitForCallback(server, pkceParams.state);
@@ -23460,49 +23467,62 @@ var init_AuthenticationManager = __esm({
23460
23467
  * Login with device flow (fallback)
23461
23468
  */
23462
23469
  async loginWithDeviceFlow() {
23463
- const response2 = await fetch(`${this.authBase}/oauth/device/start`, {
23464
- method: "POST",
23465
- headers: { "Content-Type": "application/json" },
23466
- body: JSON.stringify({
23467
- client_id: this.clientId,
23468
- scope: "user:profile user:inference org:create_api_key"
23469
- })
23470
- });
23471
- if (!response2.ok) {
23472
- throw new Error(`Device flow start failed: ${response2.statusText}`);
23473
- }
23474
- const deviceResponse = await response2.json();
23475
- console.log(`\u{1F510} Device Login`);
23476
- console.log(`Open: ${deviceResponse.verificationUri}`);
23477
- console.log(`Code: ${deviceResponse.userCode}`);
23478
- const deadline = Date.now() + deviceResponse.expiresIn * 1e3;
23479
- const intervalMs = Math.max(1500, deviceResponse.interval * 1e3);
23480
- while (Date.now() < deadline) {
23481
- await this.sleep(intervalMs);
23482
- const finishResponse = await fetch(`${this.authBase}/oauth/device/finish`, {
23470
+ try {
23471
+ const response2 = await fetch(`${this.authBase}/oauth/device/start`, {
23483
23472
  method: "POST",
23484
23473
  headers: { "Content-Type": "application/json" },
23485
23474
  body: JSON.stringify({
23486
23475
  client_id: this.clientId,
23487
- device_code: deviceResponse.deviceCode
23476
+ scope: "user:profile user:inference org:create_api_key"
23488
23477
  })
23489
23478
  });
23490
- if (finishResponse.status === 428 || finishResponse.status === 400) {
23491
- continue;
23492
- }
23493
- if (!finishResponse.ok) {
23494
- throw new Error(`Device flow failed: ${finishResponse.statusText}`);
23495
- }
23496
- const tokens = await finishResponse.json();
23497
- return {
23498
- idToken: tokens.id_token,
23499
- accessToken: tokens.access_token,
23500
- refreshToken: tokens.refresh_token,
23501
- customToken: tokens.custom_token,
23502
- expiresAt: Date.now() + tokens.expires_in * 1e3
23479
+ if (!response2.ok) {
23480
+ throw new Error(`Device flow start failed: ${response2.statusText}`);
23481
+ }
23482
+ const raw = await response2.json();
23483
+ const deviceResponse = {
23484
+ verificationUri: raw.verification_uri || raw.verificationUri || "https://auth.maria-code.ai/device",
23485
+ userCode: raw.user_code || raw.userCode || "",
23486
+ deviceCode: raw.device_code || raw.deviceCode || "",
23487
+ interval: (typeof raw.interval === "number" ? raw.interval : parseInt(String(raw.interval || 5), 10)) || 5,
23488
+ expiresIn: (typeof raw.expires_in === "number" ? raw.expires_in : parseInt(String(raw.expires_in || raw.expiresIn || 600), 10)) || 600
23503
23489
  };
23490
+ const verificationUrl = deviceResponse.verificationUri || `${this.authBase}/device`;
23491
+ console.log(`\u{1F510} Device Login`);
23492
+ console.log(`Open: ${verificationUrl}`);
23493
+ console.log(`Code: ${deviceResponse.userCode}`);
23494
+ const deadline = Date.now() + deviceResponse.expiresIn * 1e3;
23495
+ const intervalMs = Math.max(1500, deviceResponse.interval * 1e3);
23496
+ while (Date.now() < deadline) {
23497
+ await this.sleep(intervalMs);
23498
+ const finishResponse = await fetch(`${this.authBase}/oauth/device/finish`, {
23499
+ method: "POST",
23500
+ headers: { "Content-Type": "application/json" },
23501
+ body: JSON.stringify({
23502
+ client_id: this.clientId,
23503
+ device_code: deviceResponse.deviceCode
23504
+ })
23505
+ });
23506
+ if (finishResponse.status === 428 || finishResponse.status === 400) {
23507
+ continue;
23508
+ }
23509
+ if (!finishResponse.ok) {
23510
+ throw new Error(`Device flow failed: ${finishResponse.statusText}`);
23511
+ }
23512
+ const tokens = await finishResponse.json();
23513
+ return {
23514
+ idToken: tokens.id_token || tokens.access_token || "",
23515
+ accessToken: tokens.access_token || tokens.id_token || "",
23516
+ refreshToken: tokens.refresh_token || "",
23517
+ customToken: tokens.custom_token,
23518
+ expiresAt: Date.now() + (tokens.expires_in ? Number(tokens.expires_in) : 600) * 1e3
23519
+ };
23520
+ }
23521
+ throw new Error(ERROR_MESSAGES.LOGIN_TIMEOUT);
23522
+ } catch (error2) {
23523
+ console.error("Device flow error:", error2);
23524
+ throw error2;
23504
23525
  }
23505
- throw new Error(ERROR_MESSAGES.LOGIN_TIMEOUT);
23506
23526
  }
23507
23527
  /**
23508
23528
  * Generate PKCE parameters
@@ -23541,8 +23561,10 @@ var init_AuthenticationManager = __esm({
23541
23561
  } catch (error2) {
23542
23562
  lastError = error2;
23543
23563
  if (error2.code !== "EADDRINUSE") {
23564
+ console.error("Failed to start callback server:", error2);
23544
23565
  throw error2;
23545
23566
  }
23567
+ console.warn("Callback server port in use, retrying...", error2?.message || error2);
23546
23568
  }
23547
23569
  }
23548
23570
  throw lastError || new Error("Failed to find available port");
@@ -23574,6 +23596,7 @@ var init_AuthenticationManager = __esm({
23574
23596
  return new Promise((resolve4, reject) => {
23575
23597
  const timeout = setTimeout(() => {
23576
23598
  server.close();
23599
+ console.error("OAuth callback timed out");
23577
23600
  reject(new Error(ERROR_MESSAGES.LOGIN_TIMEOUT));
23578
23601
  }, 5 * 60 * 1e3);
23579
23602
  server.on("request", (req, res) => {
@@ -23586,6 +23609,7 @@ var init_AuthenticationManager = __esm({
23586
23609
  res.writeHead(400, { "Content-Type": "text/html" });
23587
23610
  res.end(this.getErrorPage(error2));
23588
23611
  clearTimeout(timeout);
23612
+ console.error("OAuth callback returned error:", error2);
23589
23613
  reject(new Error(error2));
23590
23614
  return;
23591
23615
  }
@@ -23593,6 +23617,7 @@ var init_AuthenticationManager = __esm({
23593
23617
  res.writeHead(400, { "Content-Type": "text/html" });
23594
23618
  res.end(this.getErrorPage("Invalid state parameter"));
23595
23619
  clearTimeout(timeout);
23620
+ console.error("OAuth callback invalid state", { received: state, expected: expectedState });
23596
23621
  reject(new Error(ERROR_MESSAGES.INVALID_STATE));
23597
23622
  return;
23598
23623
  }
@@ -23610,28 +23635,39 @@ var init_AuthenticationManager = __esm({
23610
23635
  * Exchange authorization code for tokens
23611
23636
  */
23612
23637
  async exchangeCodeForTokens(code, codeVerifier, redirectUri) {
23613
- const response2 = await fetch(`${this.authBase}/oauth/token`, {
23614
- method: "POST",
23615
- headers: { "Content-Type": "application/json" },
23616
- body: JSON.stringify({
23617
- grant_type: "authorization_code",
23618
- client_id: this.clientId,
23619
- code,
23620
- code_verifier: codeVerifier,
23621
- redirect_uri: redirectUri
23622
- })
23623
- });
23624
- if (!response2.ok) {
23625
- throw new Error(`Token exchange failed: ${response2.statusText}`);
23638
+ try {
23639
+ const response2 = await fetch(`${this.authBase}/oauth/token`, {
23640
+ method: "POST",
23641
+ headers: { "Content-Type": "application/json" },
23642
+ body: JSON.stringify({
23643
+ grant_type: "authorization_code",
23644
+ client_id: this.clientId,
23645
+ code,
23646
+ code_verifier: codeVerifier,
23647
+ redirect_uri: redirectUri
23648
+ })
23649
+ });
23650
+ if (!response2.ok) {
23651
+ let bodyText = "";
23652
+ try {
23653
+ bodyText = await response2.text();
23654
+ } catch {
23655
+ }
23656
+ console.error("Token exchange failed:", response2.status, response2.statusText, bodyText);
23657
+ throw new Error(`Token exchange failed: ${response2.status} ${response2.statusText}`);
23658
+ }
23659
+ const tokens = await response2.json();
23660
+ return {
23661
+ idToken: tokens.id_token,
23662
+ accessToken: tokens.access_token,
23663
+ refreshToken: tokens.refresh_token,
23664
+ customToken: tokens.custom_token,
23665
+ expiresAt: Date.now() + tokens.expires_in * 1e3
23666
+ };
23667
+ } catch (error2) {
23668
+ console.error("Token exchange request error:", error2);
23669
+ throw error2;
23626
23670
  }
23627
- const tokens = await response2.json();
23628
- return {
23629
- idToken: tokens.id_token,
23630
- accessToken: tokens.access_token,
23631
- refreshToken: tokens.refresh_token,
23632
- customToken: tokens.custom_token,
23633
- expiresAt: Date.now() + tokens.expires_in * 1e3
23634
- };
23635
23671
  }
23636
23672
  /**
23637
23673
  * Revoke tokens on server