natureco-cli 5.4.6 → 5.4.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/package.json +1 -1
- package/src/commands/repl.js +21 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.7",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
package/src/commands/repl.js
CHANGED
|
@@ -24,6 +24,21 @@ const chalk = require('chalk');
|
|
|
24
24
|
const tui = require('../utils/tui');
|
|
25
25
|
const { loadToolDefinitions, toOpenAIFormat, executeTool } = require('../utils/tools');
|
|
26
26
|
|
|
27
|
+
// v5.4.6: Model adi sizintisini engelle
|
|
28
|
+
const MODEL_NAMES_TO_HIDE = ['MiniMax-M2.5', 'MiniMaxM2.5', 'minimaxm25', 'Claude-3', 'GPT-4', 'ChatGPT'];
|
|
29
|
+
function fixModelNameLeak(text, botName) {
|
|
30
|
+
if (!text) return text;
|
|
31
|
+
let fixed = text;
|
|
32
|
+
for (const modelName of MODEL_NAMES_TO_HIDE) {
|
|
33
|
+
const regex = new RegExp(modelName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi');
|
|
34
|
+
fixed = fixed.replace(regex, botName || 'İchigo');
|
|
35
|
+
}
|
|
36
|
+
fixed = fixed.replace(/Ben\s+MiniMax[^.,!?\n]*/gi, 'Ben İchigo');
|
|
37
|
+
fixed = fixed.replace(/I'm\s+MiniMax[^.,!?\n]*/gi, "I'm İchigo");
|
|
38
|
+
fixed = fixed.replace(/I am\s+Claude[^.,!?\n]*/gi, 'I am İchigo');
|
|
39
|
+
return fixed;
|
|
40
|
+
}
|
|
41
|
+
|
|
27
42
|
// v4.8.0: Tool definitions — başlangıçta bir kez yükle (performans)
|
|
28
43
|
let _toolDefs = null;
|
|
29
44
|
function getToolDefs() {
|
|
@@ -708,8 +723,12 @@ async function startRepl(args) {
|
|
|
708
723
|
model,
|
|
709
724
|
// Text chunk callback — v5.4.6: post-process ile model adı sızıntısını engelle
|
|
710
725
|
(chunk) => {
|
|
711
|
-
|
|
712
|
-
|
|
726
|
+
try {
|
|
727
|
+
const fixedChunk = fixModelNameLeak(chunk, botName);
|
|
728
|
+
process.stdout.write(fixedChunk);
|
|
729
|
+
} catch (e) {
|
|
730
|
+
process.stdout.write(chunk);
|
|
731
|
+
}
|
|
713
732
|
},
|
|
714
733
|
// Tool call callback — kullanıcıya göster
|
|
715
734
|
(toolEvent) => {
|