@bonginkan/maria 2.0.5 → 2.0.7

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 Platform v1.8.6 "Quality Assured Edition"
1
+ # 🤖 MARIA Platform v2.0.7 "Memory Intelligence Edition"
2
2
 
3
3
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0%2B-blue)](https://www.typescriptlang.org/)
4
4
  [![Node.js](https://img.shields.io/badge/Node.js-18%2B-green)](https://nodejs.org/)
@@ -9,7 +9,7 @@
9
9
  [![Cognitive Modes](https://img.shields.io/badge/Cognitive%20Modes-50-purple)](https://github.com/bonginkan/maria)
10
10
  [![Memory System](https://img.shields.io/badge/Memory%20System-Dual--Layer-orange)](https://github.com/bonginkan/maria)
11
11
 
12
- > 🎉 **MARIA Platform v1.8.6** - Enterprise AI Development CLI with **100% Tested & Verified Commands**, **Revolutionary Dual-Layer Memory System**, **Context-Aware Intelligence**, **Complete Local LLM Integration** (Ollama, vLLM, LM Studio), **Personalized Learning**, 40+ Interactive Commands, and **Privacy-First Development** Environment!
12
+ > 🎉 **MARIA Platform v2.0.7** - Enterprise AI Development CLI with **100% Tested & Verified Commands**, **Revolutionary Dual-Layer Memory System**, **Context-Aware Intelligence**, **Complete Local LLM Integration** (Ollama, vLLM, LM Studio), **Personalized Learning**, 50+ Interactive Commands, and **Privacy-First Development** Environment!
13
13
 
14
14
  ## 🖥️ **MARIA CODE CLI Interface**
15
15
 
@@ -19,7 +19,7 @@ _MARIA's beautiful startup interface with automatic AI service initialization an
19
19
 
20
20
  ## 🌟 Key Features - Local AI & Privacy-First Development
21
21
 
22
- ### 🧠 **NEW: Revolutionary Dual-Layer Memory System (v1.8.5)**
22
+ ### 🧠 **Revolutionary Dual-Layer Memory System (v2.0.7)**
23
23
 
24
24
  - **System 1 (Fast/Intuitive)**: Instant pattern recognition and cache-based responses
25
25
  - **System 2 (Deliberate/Analytical)**: Deep reasoning traces and decision trees
@@ -178,7 +178,7 @@ npm install -g @bonginkan/maria
178
178
 
179
179
  # Verify installation
180
180
  maria --version
181
- # Output: MARIA Platform v1.8.2 "Algorithm Education Revolution"
181
+ # Output: MARIA Platform v2.0.6 "Memory Intelligence Edition"
182
182
 
183
183
  # Setup local AI models (optional)
184
184
  maria setup-ollama # Install and configure Ollama
package/dist/bin/maria.js CHANGED
@@ -157,8 +157,8 @@ var init_openai_provider = __esm({
157
157
  }
158
158
  name = "OpenAI";
159
159
  models = [
160
- "gpt-5-2025-08-07",
161
- "gpt-5-mini-2025-08-07",
160
+ "gpt-5",
161
+ "gpt-5-mini",
162
162
  "gpt-4o",
163
163
  "gpt-4o-mini",
164
164
  "gpt-4-turbo",
@@ -286,7 +286,7 @@ var init_anthropic_provider = __esm({
286
286
  }
287
287
  name = "Anthropic";
288
288
  models = [
289
- "claude-opus-4.1",
289
+ "claude-4.1",
290
290
  "claude-3-5-sonnet-20241022",
291
291
  "claude-3-5-haiku-20241022",
292
292
  "claude-3-opus-20240229",
@@ -584,7 +584,9 @@ var init_grok_provider = __esm({
584
584
  }
585
585
  name = "Grok";
586
586
  models = [
587
- "grok-4-0709",
587
+ "grok-4",
588
+ "grok-beta",
589
+ "grok-2",
588
590
  "llama-3.3-70b-versatile",
589
591
  "llama-3.1-70b-versatile",
590
592
  "llama-3.1-8b-instant",
@@ -1703,6 +1705,30 @@ var init_manager = __esm({
1703
1705
  }
1704
1706
  }
1705
1707
  }
1708
+ const cloudProviders = ["openai", "anthropic", "google", "grok"];
1709
+ const defaultCloudModels = {
1710
+ openai: ["gpt-5", "gpt-5-mini", "gpt-4o", "gpt-4o-mini", "o1-preview", "o1-mini"],
1711
+ anthropic: ["claude-4.1", "claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022", "claude-3-opus-20240229"],
1712
+ google: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-1.5-pro", "gemini-1.5-flash"],
1713
+ grok: ["grok-4", "grok-beta", "grok-2"]
1714
+ };
1715
+ for (const providerName of cloudProviders) {
1716
+ if (!this.availableProviders.has(providerName)) {
1717
+ const models = defaultCloudModels[providerName] || [];
1718
+ const modelInfos = models.map((modelName) => ({
1719
+ id: `${providerName}-${modelName}`,
1720
+ name: modelName,
1721
+ provider: providerName,
1722
+ description: `${modelName} from ${providerName}`,
1723
+ contextLength: 8192,
1724
+ capabilities: ["text", "code", "vision"],
1725
+ available: false,
1726
+ // Mark as unavailable (need API key)
1727
+ recommendedFor: ["general"]
1728
+ }));
1729
+ allModels.push(...modelInfos);
1730
+ }
1731
+ }
1706
1732
  return allModels;
1707
1733
  }
1708
1734
  selectOptimalProvider(_taskType, priorityMode = "auto") {
@@ -1924,6 +1950,17 @@ var init_intelligent_router = __esm({
1924
1950
  modelId: request.model || await this.getDefaultModelForProvider(request.provider)
1925
1951
  };
1926
1952
  }
1953
+ const preferredProvider = this.config.get("preferredProvider");
1954
+ const preferredModel = this.config.get("preferredModel");
1955
+ if (preferredProvider && preferredModel) {
1956
+ const availableProviders = this.providerManager.getAvailableProviders();
1957
+ if (availableProviders.includes(preferredProvider)) {
1958
+ return {
1959
+ providerName: preferredProvider,
1960
+ modelId: preferredModel
1961
+ };
1962
+ }
1963
+ }
1927
1964
  const priorityMode = this.config.get("priority", "auto");
1928
1965
  const providerName = this.providerManager.selectOptimalProvider(taskType, priorityMode);
1929
1966
  if (!providerName) {
@@ -1956,6 +1993,10 @@ var init_intelligent_router = __esm({
1956
1993
  updatePriorityMode(mode) {
1957
1994
  this.config.set("priority", mode);
1958
1995
  }
1996
+ updatePreferredProvider(provider, model) {
1997
+ this.config.set("preferredProvider", provider);
1998
+ this.config.set("preferredModel", model);
1999
+ }
1959
2000
  };
1960
2001
  }
1961
2002
  });
@@ -2422,7 +2463,9 @@ var init_config_manager = __esm({
2422
2463
  autoStart: true,
2423
2464
  healthMonitoring: true,
2424
2465
  language: "auto",
2425
- offlineMode: false
2466
+ offlineMode: false,
2467
+ model: "gpt-5-mini",
2468
+ provider: "openai"
2426
2469
  };
2427
2470
  }
2428
2471
  mergeConfig(newConfig) {
@@ -2645,6 +2688,50 @@ Context from memory:
2645
2688
  this.config.set("priority", mode);
2646
2689
  this.router.updatePriorityMode(mode);
2647
2690
  }
2691
+ /**
2692
+ * Switch to a specific model
2693
+ */
2694
+ async switchModel(modelId) {
2695
+ try {
2696
+ const models = await this.getModels();
2697
+ const targetModel = models.find((m) => m.id === modelId || m.name === modelId);
2698
+ if (!targetModel) {
2699
+ return {
2700
+ success: false,
2701
+ message: `Model not found: ${modelId}`
2702
+ };
2703
+ }
2704
+ if (!targetModel.available) {
2705
+ return {
2706
+ success: false,
2707
+ message: `Model ${targetModel.name} is not available. Please check API keys.`
2708
+ };
2709
+ }
2710
+ this.config.set("model", targetModel.name);
2711
+ this.config.set("provider", targetModel.provider);
2712
+ this.router.updatePreferredProvider(targetModel.provider, targetModel.name);
2713
+ return {
2714
+ success: true,
2715
+ message: `Switched to ${targetModel.name} (${targetModel.provider})`
2716
+ };
2717
+ } catch (error) {
2718
+ return {
2719
+ success: false,
2720
+ message: `Failed to switch model: ${error instanceof Error ? error.message : "Unknown error"}`
2721
+ };
2722
+ }
2723
+ }
2724
+ /**
2725
+ * Get current active model
2726
+ */
2727
+ getCurrentModel() {
2728
+ const currentModel = this.config.get("model");
2729
+ const currentProvider = this.config.get("provider");
2730
+ if (currentModel && currentProvider) {
2731
+ return { name: currentModel, provider: currentProvider };
2732
+ }
2733
+ return null;
2734
+ }
2648
2735
  /**
2649
2736
  * Get current configuration
2650
2737
  */
@@ -25597,17 +25684,36 @@ async function showModels(maria) {
25597
25684
  try {
25598
25685
  const models = await maria.getModels();
25599
25686
  const available = models.filter((m) => m.available);
25600
- if (available.length === 0) {
25601
- console.log(chalk13__default.default.yellow("No models available"));
25687
+ const unavailable = models.filter((m) => !m.available);
25688
+ if (available.length === 0 && unavailable.length === 0) {
25689
+ console.log(chalk13__default.default.yellow("No models found"));
25602
25690
  return;
25603
25691
  }
25604
- for (const model of available) {
25605
- const provider = chalk13__default.default.gray(`[${model.provider}]`);
25606
- const capabilities = model.capabilities ? model.capabilities.join(", ") : "No capabilities listed";
25607
- console.log(`\u2705 ${chalk13__default.default.bold(model.name)} ${provider}`);
25608
- console.log(` ${chalk13__default.default.gray(capabilities)}`);
25692
+ if (available.length > 0) {
25693
+ console.log(chalk13__default.default.green("\u2705 Available Models:"));
25694
+ for (const model of available) {
25695
+ const provider = chalk13__default.default.gray(`[${model.provider}]`);
25696
+ const capabilities = model.capabilities ? model.capabilities.join(", ") : "No capabilities listed";
25697
+ console.log(` \u2705 ${chalk13__default.default.bold(model.name)} ${provider}`);
25698
+ console.log(` ${chalk13__default.default.gray(capabilities)}`);
25699
+ }
25700
+ console.log("");
25701
+ }
25702
+ if (unavailable.length > 0) {
25703
+ console.log(chalk13__default.default.yellow("\u26A0\uFE0F Cloud Models (Require API Keys):"));
25704
+ for (const model of unavailable) {
25705
+ const provider = chalk13__default.default.gray(`[${model.provider}]`);
25706
+ const capabilities = model.capabilities ? model.capabilities.join(", ") : "No capabilities listed";
25707
+ console.log(` \u274C ${chalk13__default.default.white(model.name)} ${provider}`);
25708
+ console.log(` ${chalk13__default.default.gray(capabilities)}`);
25709
+ }
25710
+ console.log("");
25711
+ console.log(chalk13__default.default.gray("\u{1F4A1} To use cloud models, set environment variables:"));
25712
+ console.log(chalk13__default.default.cyan(" export OPENAI_API_KEY=your_key"));
25713
+ console.log(chalk13__default.default.cyan(" export ANTHROPIC_API_KEY=your_key"));
25714
+ console.log(chalk13__default.default.cyan(" export GOOGLE_API_KEY=your_key"));
25715
+ console.log("");
25609
25716
  }
25610
- console.log("");
25611
25717
  } catch (error) {
25612
25718
  console.error(chalk13__default.default.red("\u274C Failed to get models:"), error);
25613
25719
  }
@@ -25672,31 +25778,39 @@ async function showModelSelector(maria, args) {
25672
25778
  try {
25673
25779
  const models = await maria.getModels();
25674
25780
  const available = models.filter((m) => m.available);
25781
+ const allModels = models;
25675
25782
  if (args.length > 0) {
25676
25783
  const modelName = args.join(" ");
25677
- const targetModel = available.find(
25784
+ const targetModel = allModels.find(
25678
25785
  (m) => m.name.toLowerCase().includes(modelName.toLowerCase()) || m.provider.toLowerCase().includes(modelName.toLowerCase())
25679
25786
  );
25680
25787
  if (targetModel) {
25681
- console.log(
25682
- chalk13__default.default.green(`\u2705 Target model found: ${targetModel.name} (${targetModel.provider})`)
25683
- );
25684
- console.log(chalk13__default.default.yellow("Note: Model switching will be implemented in a future version"));
25685
- console.log(
25686
- chalk13__default.default.gray("Currently, you can switch models using environment variables or CLI options")
25687
- );
25788
+ if (targetModel.available) {
25789
+ console.log(
25790
+ chalk13__default.default.green(`\u2705 Target model found: ${targetModel.name} (${targetModel.provider})`)
25791
+ );
25792
+ console.log(chalk13__default.default.yellow("Note: Model switching will be implemented in a future version"));
25793
+ console.log(
25794
+ chalk13__default.default.gray("Currently, you can switch models using environment variables or CLI options")
25795
+ );
25796
+ } else {
25797
+ console.log(
25798
+ chalk13__default.default.yellow(`\u26A0\uFE0F Target model found but unavailable: ${targetModel.name} (${targetModel.provider})`)
25799
+ );
25800
+ console.log(chalk13__default.default.gray(`This model requires API key for ${targetModel.provider}`));
25801
+ }
25688
25802
  } else {
25689
25803
  console.log(chalk13__default.default.red(`\u274C Model not found: ${modelName}`));
25690
25804
  console.log(chalk13__default.default.gray("Available models listed below:"));
25691
25805
  }
25692
25806
  return;
25693
25807
  }
25694
- await showInteractiveModelSelector(available);
25808
+ await showInteractiveModelSelector(allModels, maria);
25695
25809
  } catch (error) {
25696
25810
  console.error(chalk13__default.default.red("\u274C Failed to access model selector:"), error);
25697
25811
  }
25698
25812
  }
25699
- async function showInteractiveModelSelector(models) {
25813
+ async function showInteractiveModelSelector(models, maria) {
25700
25814
  if (models.length === 0) {
25701
25815
  console.log(chalk13__default.default.yellow("No models available"));
25702
25816
  return;
@@ -25710,27 +25824,43 @@ async function showInteractiveModelSelector(models) {
25710
25824
  process.stdout.write("\x1B[2J\x1B[0;0f");
25711
25825
  console.log(chalk13__default.default.blue("\u{1F916} AI Model Selector\n"));
25712
25826
  console.log(chalk13__default.default.gray("Use \u2191/\u2193 to navigate, Enter to select, Esc to cancel\n"));
25827
+ const currentModel = maria.getCurrentModel();
25828
+ if (currentModel) {
25829
+ console.log(chalk13__default.default.green(`\u{1F3AF} Current Active Model: ${currentModel.name} (${currentModel.provider})
25830
+ `));
25831
+ } else {
25832
+ console.log(chalk13__default.default.yellow(`\u{1F3AF} Current Active Model: gpt-5-mini (openai) - Default
25833
+ `));
25834
+ }
25713
25835
  console.log(chalk13__default.default.yellow("\u{1F4CB} Available AI Models:\n"));
25714
25836
  models.forEach((model, index) => {
25715
- const status = model.available ? "\u2705" : "\u26A0\uFE0F";
25837
+ const status = model.available ? "\u2705" : "\u274C";
25716
25838
  const pricing = model.pricing ? ` ($${model.pricing.input}/${model.pricing.output})` : "";
25717
25839
  const isSelected = index === selectedIndex;
25840
+ const availabilityNote = model.available ? "" : " (API key required)";
25718
25841
  if (isSelected) {
25719
25842
  console.log(
25720
- chalk13__default.default.bgBlue.white(` \u25B6 ${status} ${model.name} [${model.provider}]${pricing}`)
25843
+ chalk13__default.default.bgBlue.white(` \u25B6 ${status} ${model.name} [${model.provider}]${pricing}${availabilityNote}`)
25721
25844
  );
25722
25845
  console.log(chalk13__default.default.bgBlue.white(` ${model.description}`));
25723
25846
  if (model.capabilities && model.capabilities.length > 0) {
25724
25847
  console.log(chalk13__default.default.bgBlue.white(` Capabilities: ${model.capabilities.join(", ")}`));
25725
25848
  }
25849
+ if (!model.available) {
25850
+ console.log(chalk13__default.default.bgBlue.white(` Status: Requires ${model.provider.toUpperCase()}_API_KEY environment variable`));
25851
+ }
25726
25852
  } else {
25853
+ const nameColor = model.available ? chalk13__default.default.bold : chalk13__default.default.white;
25727
25854
  console.log(
25728
- ` ${status} ${chalk13__default.default.bold(model.name)} ${chalk13__default.default.gray(`[${model.provider}]`)}${pricing}`
25855
+ ` ${status} ${nameColor(model.name)} ${chalk13__default.default.gray(`[${model.provider}]`)}${pricing}${availabilityNote}`
25729
25856
  );
25730
25857
  console.log(` ${chalk13__default.default.gray(model.description)}`);
25731
25858
  if (model.capabilities && model.capabilities.length > 0) {
25732
25859
  console.log(` ${chalk13__default.default.cyan("Capabilities:")} ${model.capabilities.join(", ")}`);
25733
25860
  }
25861
+ if (!model.available) {
25862
+ console.log(` ${chalk13__default.default.yellow("Status:")} Requires ${model.provider.toUpperCase()}_API_KEY environment variable`);
25863
+ }
25734
25864
  }
25735
25865
  console.log("");
25736
25866
  });
@@ -25741,7 +25871,7 @@ async function showInteractiveModelSelector(models) {
25741
25871
  stdin.removeAllListeners("data");
25742
25872
  }, "cleanup");
25743
25873
  return new Promise((resolve) => {
25744
- const handleKeypress = /* @__PURE__ */ __name((chunk) => {
25874
+ const handleKeypress = /* @__PURE__ */ __name(async (chunk) => {
25745
25875
  const key = chunk.toString();
25746
25876
  switch (key) {
25747
25877
  case "\x1B[A":
@@ -25753,31 +25883,45 @@ async function showInteractiveModelSelector(models) {
25753
25883
  renderModels();
25754
25884
  break;
25755
25885
  case "\r":
25756
- isSelecting = false;
25757
25886
  cleanup();
25758
25887
  const selectedModel = models[selectedIndex];
25759
- console.log(
25760
- chalk13__default.default.green(`
25761
- \u2705 Selected: ${selectedModel.name} (${selectedModel.provider})`)
25762
- );
25763
- console.log(
25764
- chalk13__default.default.yellow("Note: Model switching will be implemented in a future version")
25765
- );
25766
- console.log(
25767
- chalk13__default.default.gray(
25768
- "Currently, you can switch models using environment variables or CLI options\n"
25769
- )
25770
- );
25888
+ if (selectedModel.available) {
25889
+ try {
25890
+ const result = await maria.switchModel(selectedModel.id);
25891
+ if (result.success) {
25892
+ console.log(chalk13__default.default.green(`
25893
+ \u2705 ${result.message}`));
25894
+ console.log(chalk13__default.default.gray("Model switch completed successfully\n"));
25895
+ } else {
25896
+ console.log(chalk13__default.default.red(`
25897
+ \u274C ${result.message}
25898
+ `));
25899
+ }
25900
+ } catch (error) {
25901
+ console.log(chalk13__default.default.red(`
25902
+ \u274C Failed to switch model: ${error}
25903
+ `));
25904
+ }
25905
+ } else {
25906
+ console.log(
25907
+ chalk13__default.default.yellow(`
25908
+ \u26A0\uFE0F Selected: ${selectedModel.name} (${selectedModel.provider})`)
25909
+ );
25910
+ console.log(
25911
+ chalk13__default.default.red(`\u274C This model is not available. Please set ${selectedModel.provider.toUpperCase()}_API_KEY environment variable.`)
25912
+ );
25913
+ console.log(chalk13__default.default.gray("Example:"));
25914
+ console.log(chalk13__default.default.cyan(` export ${selectedModel.provider.toUpperCase()}_API_KEY=your_api_key`));
25915
+ console.log("");
25916
+ }
25771
25917
  resolve();
25772
25918
  break;
25773
25919
  case "\x1B":
25774
- isSelecting = false;
25775
25920
  cleanup();
25776
25921
  console.log(chalk13__default.default.gray("\n\u{1F4CB} Model selection cancelled\n"));
25777
25922
  resolve();
25778
25923
  break;
25779
25924
  case "":
25780
- isSelecting = false;
25781
25925
  cleanup();
25782
25926
  console.log(chalk13__default.default.gray("\n\u{1F4CB} Model selection cancelled\n"));
25783
25927
  resolve();
@@ -28359,8 +28503,8 @@ var init_package = __esm({
28359
28503
  "package.json"() {
28360
28504
  package_default = {
28361
28505
  name: "@bonginkan/maria",
28362
- version: "2.0.4",
28363
- description: "\u{1F9E0} MARIA Platform v2.0.0 Memory Intelligence Edition - Revolutionary Dual-Layer Memory System with Complete Local AI Integration (Ollama + vLLM + LM Studio), Context-Aware Learning, 50+ Cognitive Modes, and Enterprise-Grade Development Intelligence",
28506
+ version: "2.0.7",
28507
+ description: "\u{1F9E0} MARIA Platform v2.0.7 Memory Intelligence Edition - Revolutionary Dual-Layer Memory System with Complete Local AI Integration (Ollama + vLLM + LM Studio), Context-Aware Learning, 50+ Cognitive Modes, and Enterprise-Grade Development Intelligence",
28364
28508
  keywords: [
28365
28509
  "ai",
28366
28510
  "cli",