@bonginkan/maria 1.8.10 → 1.8.12
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/bin/maria.js +142 -7
- package/dist/bin/maria.js.map +1 -1
- package/dist/cli.js +142 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.js +142 -7
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/package.json +1 -1
package/dist/bin/maria.js
CHANGED
|
@@ -8266,6 +8266,15 @@ var init_dual_memory_engine = __esm({
|
|
|
8266
8266
|
processingLock = false;
|
|
8267
8267
|
performanceCache = /* @__PURE__ */ new Map();
|
|
8268
8268
|
constructor(config2) {
|
|
8269
|
+
if (!config2) {
|
|
8270
|
+
throw new Error("DualMemoryEngine: config parameter is required");
|
|
8271
|
+
}
|
|
8272
|
+
if (!config2.system1) {
|
|
8273
|
+
throw new Error("DualMemoryEngine: config.system1 is required");
|
|
8274
|
+
}
|
|
8275
|
+
if (!config2.system2) {
|
|
8276
|
+
throw new Error("DualMemoryEngine: config.system2 is required");
|
|
8277
|
+
}
|
|
8269
8278
|
this.config = config2;
|
|
8270
8279
|
this.system1 = new System1MemoryManager(config2.system1);
|
|
8271
8280
|
this.system2 = new System2MemoryManager(config2.system2);
|
|
@@ -8371,6 +8380,30 @@ var init_dual_memory_engine = __esm({
|
|
|
8371
8380
|
urgency: "high"
|
|
8372
8381
|
});
|
|
8373
8382
|
}
|
|
8383
|
+
async recall(options) {
|
|
8384
|
+
try {
|
|
8385
|
+
const result = await this.query({
|
|
8386
|
+
type: options.type,
|
|
8387
|
+
query: options.query,
|
|
8388
|
+
limit: options.limit || 10
|
|
8389
|
+
});
|
|
8390
|
+
return Array.isArray(result.data) ? result.data : [result.data];
|
|
8391
|
+
} catch (error) {
|
|
8392
|
+
console.warn("Memory recall failed:", error);
|
|
8393
|
+
return [];
|
|
8394
|
+
}
|
|
8395
|
+
}
|
|
8396
|
+
async clearMemory() {
|
|
8397
|
+
try {
|
|
8398
|
+
this.performanceCache.clear();
|
|
8399
|
+
this.eventQueue.length = 0;
|
|
8400
|
+
this.resetMetrics();
|
|
8401
|
+
console.log("Memory cleared successfully");
|
|
8402
|
+
} catch (error) {
|
|
8403
|
+
console.error("Failed to clear memory:", error);
|
|
8404
|
+
throw error;
|
|
8405
|
+
}
|
|
8406
|
+
}
|
|
8374
8407
|
// ========== Memory Strategy Selection ==========
|
|
8375
8408
|
async selectMemoryStrategy(query) {
|
|
8376
8409
|
const factors = {
|
|
@@ -8773,6 +8806,17 @@ var init_dual_memory_engine = __esm({
|
|
|
8773
8806
|
getQueueSize() {
|
|
8774
8807
|
return this.eventQueue.length;
|
|
8775
8808
|
}
|
|
8809
|
+
// ========== Initialization ==========
|
|
8810
|
+
async initialize() {
|
|
8811
|
+
try {
|
|
8812
|
+
this.resetMetrics();
|
|
8813
|
+
this.performanceCache.clear();
|
|
8814
|
+
console.log("DualMemoryEngine initialized successfully");
|
|
8815
|
+
} catch (error) {
|
|
8816
|
+
console.error("Failed to initialize DualMemoryEngine:", error);
|
|
8817
|
+
throw error;
|
|
8818
|
+
}
|
|
8819
|
+
}
|
|
8776
8820
|
// ========== Configuration Management ==========
|
|
8777
8821
|
updateConfig(newConfig) {
|
|
8778
8822
|
Object.assign(this.config, newConfig);
|
|
@@ -8780,6 +8824,49 @@ var init_dual_memory_engine = __esm({
|
|
|
8780
8824
|
getConfig() {
|
|
8781
8825
|
return { ...this.config };
|
|
8782
8826
|
}
|
|
8827
|
+
async getStatistics() {
|
|
8828
|
+
try {
|
|
8829
|
+
const metrics = this.getMetrics();
|
|
8830
|
+
const system1Stats = {
|
|
8831
|
+
totalNodes: 0,
|
|
8832
|
+
// Will be populated when system1 interface is stable
|
|
8833
|
+
patterns: 0,
|
|
8834
|
+
// Will be populated when system1 interface is stable
|
|
8835
|
+
preferences: 0,
|
|
8836
|
+
// Will be populated when system1 interface is stable
|
|
8837
|
+
cacheHitRate: metrics.cacheHitRate || 0
|
|
8838
|
+
};
|
|
8839
|
+
const system2Stats = {
|
|
8840
|
+
reasoningTraces: 0,
|
|
8841
|
+
// Will be populated when system2 interface is stable
|
|
8842
|
+
decisionTrees: 0,
|
|
8843
|
+
// Will be populated when system2 interface is stable
|
|
8844
|
+
activeSessions: 0,
|
|
8845
|
+
// Will be populated when system2 interface is stable
|
|
8846
|
+
memoryUsage: 0
|
|
8847
|
+
// Will be populated when system2 interface is stable
|
|
8848
|
+
};
|
|
8849
|
+
return {
|
|
8850
|
+
system1: system1Stats,
|
|
8851
|
+
system2: system2Stats
|
|
8852
|
+
};
|
|
8853
|
+
} catch (error) {
|
|
8854
|
+
return {
|
|
8855
|
+
system1: {
|
|
8856
|
+
totalNodes: 0,
|
|
8857
|
+
patterns: 0,
|
|
8858
|
+
preferences: 0,
|
|
8859
|
+
cacheHitRate: 0
|
|
8860
|
+
},
|
|
8861
|
+
system2: {
|
|
8862
|
+
reasoningTraces: 0,
|
|
8863
|
+
decisionTrees: 0,
|
|
8864
|
+
activeSessions: 0,
|
|
8865
|
+
memoryUsage: 0
|
|
8866
|
+
}
|
|
8867
|
+
};
|
|
8868
|
+
}
|
|
8869
|
+
}
|
|
8783
8870
|
};
|
|
8784
8871
|
}
|
|
8785
8872
|
});
|
|
@@ -24987,15 +25074,59 @@ function createInteractiveSession(maria) {
|
|
|
24987
25074
|
running = true;
|
|
24988
25075
|
try {
|
|
24989
25076
|
console.log(chalk13__default.default.cyan("\u{1F9E0} Initializing Memory System..."));
|
|
24990
|
-
|
|
25077
|
+
const memoryConfig = {
|
|
25078
|
+
system1: {
|
|
25079
|
+
maxKnowledgeNodes: 1e3,
|
|
25080
|
+
embeddingDimension: 1536,
|
|
25081
|
+
cacheSize: 100,
|
|
25082
|
+
compressionThreshold: 0.75,
|
|
25083
|
+
accessDecayRate: 0.03
|
|
25084
|
+
},
|
|
25085
|
+
system2: {
|
|
25086
|
+
maxReasoningTraces: 100,
|
|
25087
|
+
qualityThreshold: 0.75,
|
|
25088
|
+
reflectionFrequency: 12,
|
|
25089
|
+
enhancementEvaluationInterval: 6
|
|
25090
|
+
},
|
|
25091
|
+
coordinator: {
|
|
25092
|
+
syncInterval: 5e3,
|
|
25093
|
+
conflictResolutionStrategy: "balanced",
|
|
25094
|
+
learningRate: 0.15,
|
|
25095
|
+
adaptationThreshold: 0.7
|
|
25096
|
+
},
|
|
25097
|
+
performance: {
|
|
25098
|
+
targetLatency: 50,
|
|
25099
|
+
maxMemoryUsage: 256,
|
|
25100
|
+
cacheStrategy: "lru",
|
|
25101
|
+
preloadPriority: "medium",
|
|
25102
|
+
backgroundOptimization: true,
|
|
25103
|
+
batchSize: 10
|
|
25104
|
+
}
|
|
25105
|
+
};
|
|
25106
|
+
if (!memoryConfig || !memoryConfig.system1 || !memoryConfig.system2) {
|
|
25107
|
+
throw new Error("Invalid memory configuration: missing required sections");
|
|
25108
|
+
}
|
|
25109
|
+
memoryEngine2 = new DualMemoryEngine(memoryConfig);
|
|
24991
25110
|
memoryCoordinator2 = new MemoryCoordinator(memoryEngine2);
|
|
24992
|
-
maria.setMemorySystem
|
|
25111
|
+
if (maria && typeof maria.setMemorySystem === "function") {
|
|
25112
|
+
maria.setMemorySystem(memoryEngine2, memoryCoordinator2);
|
|
25113
|
+
}
|
|
24993
25114
|
Promise.resolve().then(async () => {
|
|
24994
|
-
|
|
24995
|
-
|
|
25115
|
+
try {
|
|
25116
|
+
if (memoryEngine2 && typeof memoryEngine2.initialize === "function") {
|
|
25117
|
+
await memoryEngine2.initialize();
|
|
25118
|
+
console.log(chalk13__default.default.green("\u2705 Memory System initialized"));
|
|
25119
|
+
} else {
|
|
25120
|
+
console.log(chalk13__default.default.green("\u2705 Memory System created (no initialization required)"));
|
|
25121
|
+
}
|
|
25122
|
+
} catch (initError) {
|
|
25123
|
+
console.warn(chalk13__default.default.yellow("\u26A0\uFE0F Memory System initialization failed:"), initError);
|
|
25124
|
+
}
|
|
24996
25125
|
});
|
|
24997
25126
|
} catch (error) {
|
|
24998
|
-
console.warn(chalk13__default.default.yellow("\u26A0\uFE0F Memory System initialization deferred:", error)
|
|
25127
|
+
console.warn(chalk13__default.default.yellow("\u26A0\uFE0F Memory System initialization deferred:"), error);
|
|
25128
|
+
memoryEngine2 = null;
|
|
25129
|
+
memoryCoordinator2 = null;
|
|
24999
25130
|
}
|
|
25000
25131
|
const { BackgroundAIChecker: BackgroundAIChecker2 } = await Promise.resolve().then(() => (init_background_ai_checker(), background_ai_checker_exports));
|
|
25001
25132
|
BackgroundAIChecker2.startBackgroundCheck();
|
|
@@ -25049,8 +25180,12 @@ function createInteractiveSession(maria) {
|
|
|
25049
25180
|
process.stdout.write(chalk13__default.default.gray("Thinking..."));
|
|
25050
25181
|
try {
|
|
25051
25182
|
const stream = maria.chatStream(message);
|
|
25052
|
-
|
|
25183
|
+
let isFirstChunk = true;
|
|
25053
25184
|
for await (const chunk of stream) {
|
|
25185
|
+
if (isFirstChunk) {
|
|
25186
|
+
process.stdout.write("\r" + TEXT_HIERARCHY.SUBTITLE("MARIA: "));
|
|
25187
|
+
isFirstChunk = false;
|
|
25188
|
+
}
|
|
25054
25189
|
process.stdout.write(chunk);
|
|
25055
25190
|
}
|
|
25056
25191
|
console.log("\n");
|
|
@@ -28190,7 +28325,7 @@ var init_package = __esm({
|
|
|
28190
28325
|
"package.json"() {
|
|
28191
28326
|
package_default = {
|
|
28192
28327
|
name: "@bonginkan/maria",
|
|
28193
|
-
version: "1.8.
|
|
28328
|
+
version: "1.8.12",
|
|
28194
28329
|
description: "Enterprise-Grade AI Development Platform - Intelligent CLI with Complete Local AI Integration (Ollama + vLLM + LM Studio), 50 Cognitive Modes, Vector-based Code Search, and Comprehensive Quality Analysis",
|
|
28195
28330
|
keywords: [
|
|
28196
28331
|
"ai",
|