@bonginkan/maria 2.0.6 → 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 v2.0.6 "Memory Intelligence 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 v2.0.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**, 50+ 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
- ### 🧠 **Revolutionary Dual-Layer Memory System (v2.0.6)**
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
package/dist/bin/maria.js CHANGED
@@ -1950,6 +1950,17 @@ var init_intelligent_router = __esm({
1950
1950
  modelId: request.model || await this.getDefaultModelForProvider(request.provider)
1951
1951
  };
1952
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
+ }
1953
1964
  const priorityMode = this.config.get("priority", "auto");
1954
1965
  const providerName = this.providerManager.selectOptimalProvider(taskType, priorityMode);
1955
1966
  if (!providerName) {
@@ -1982,6 +1993,10 @@ var init_intelligent_router = __esm({
1982
1993
  updatePriorityMode(mode) {
1983
1994
  this.config.set("priority", mode);
1984
1995
  }
1996
+ updatePreferredProvider(provider, model) {
1997
+ this.config.set("preferredProvider", provider);
1998
+ this.config.set("preferredModel", model);
1999
+ }
1985
2000
  };
1986
2001
  }
1987
2002
  });
@@ -25790,12 +25805,12 @@ async function showModelSelector(maria, args) {
25790
25805
  }
25791
25806
  return;
25792
25807
  }
25793
- await showInteractiveModelSelector(allModels);
25808
+ await showInteractiveModelSelector(allModels, maria);
25794
25809
  } catch (error) {
25795
25810
  console.error(chalk13__default.default.red("\u274C Failed to access model selector:"), error);
25796
25811
  }
25797
25812
  }
25798
- async function showInteractiveModelSelector(models) {
25813
+ async function showInteractiveModelSelector(models, maria) {
25799
25814
  if (models.length === 0) {
25800
25815
  console.log(chalk13__default.default.yellow("No models available"));
25801
25816
  return;
@@ -25809,6 +25824,14 @@ async function showInteractiveModelSelector(models) {
25809
25824
  process.stdout.write("\x1B[2J\x1B[0;0f");
25810
25825
  console.log(chalk13__default.default.blue("\u{1F916} AI Model Selector\n"));
25811
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
+ }
25812
25835
  console.log(chalk13__default.default.yellow("\u{1F4CB} Available AI Models:\n"));
25813
25836
  models.forEach((model, index) => {
25814
25837
  const status = model.available ? "\u2705" : "\u274C";
@@ -25848,7 +25871,7 @@ async function showInteractiveModelSelector(models) {
25848
25871
  stdin.removeAllListeners("data");
25849
25872
  }, "cleanup");
25850
25873
  return new Promise((resolve) => {
25851
- const handleKeypress = /* @__PURE__ */ __name((chunk) => {
25874
+ const handleKeypress = /* @__PURE__ */ __name(async (chunk) => {
25852
25875
  const key = chunk.toString();
25853
25876
  switch (key) {
25854
25877
  case "\x1B[A":
@@ -25862,18 +25885,35 @@ async function showInteractiveModelSelector(models) {
25862
25885
  case "\r":
25863
25886
  cleanup();
25864
25887
  const selectedModel = models[selectedIndex];
25865
- console.log(
25866
- chalk13__default.default.green(`
25867
- \u2705 Selected: ${selectedModel.name} (${selectedModel.provider})`)
25868
- );
25869
- console.log(
25870
- chalk13__default.default.yellow("Note: Model switching will be implemented in a future version")
25871
- );
25872
- console.log(
25873
- chalk13__default.default.gray(
25874
- "Currently, you can switch models using environment variables or CLI options\n"
25875
- )
25876
- );
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
+ }
25877
25917
  resolve();
25878
25918
  break;
25879
25919
  case "\x1B":
@@ -28463,8 +28503,8 @@ var init_package = __esm({
28463
28503
  "package.json"() {
28464
28504
  package_default = {
28465
28505
  name: "@bonginkan/maria",
28466
- version: "2.0.5",
28467
- description: "\u{1F9E0} MARIA Platform v2.0.5 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",
28468
28508
  keywords: [
28469
28509
  "ai",
28470
28510
  "cli",