natureco-cli 2.13.3 → 2.13.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.13.3",
3
+ "version": "2.13.4",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -211,7 +211,7 @@ body::before{
211
211
  <div class="header-bot-name" id="header-bot-name">Nature Bot</div>
212
212
  <div class="header-bot-model" id="header-bot-model">NatureCo</div>
213
213
  </div>
214
- <div class="version-badge" id="version-badge">v2.13.3</div>
214
+ <div class="version-badge" id="version-badge">v2.13.4</div>
215
215
  </div>
216
216
  <div class="messages" id="messages"></div>
217
217
  <div class="input-area">
@@ -341,7 +341,7 @@ function dashboard(action) {
341
341
  apiKey: cfg.apiKey,
342
342
  defaultBot: cfg.defaultBot,
343
343
  defaultBotId: cfg.defaultBotId,
344
- version: 'v2.13.3',
344
+ version: 'v2.13.4',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
@@ -71,14 +71,33 @@ async function migrate(options) {
71
71
 
72
72
  if (timezoneMatch) {
73
73
  let timezone = timezoneMatch[1].trim().replace(/\*\*/g, '').trim();
74
- memory.facts.push(`Timezone: ${timezone}`);
74
+ memory.facts.push({
75
+ value: `Timezone: ${timezone}`,
76
+ score: 6,
77
+ updatedAt: new Date().toISOString().split('T')[0]
78
+ });
75
79
  }
76
80
 
77
81
  if (notesMatch) {
78
82
  let notes = notesMatch[1].trim().replace(/\*\*/g, '').trim();
79
- memory.facts.push(notes);
83
+ memory.facts.push({
84
+ value: notes,
85
+ score: 6,
86
+ updatedAt: new Date().toISOString().split('T')[0]
87
+ });
80
88
  }
81
89
 
90
+ // Skip patterns for useless lines
91
+ const skipPatterns = [
92
+ /^\|/, // tablo satırları
93
+ /^✅|^❌|^⚠️/, // emoji başlangıçlı
94
+ /^npm |^npx |^firebase |^node /, // komutlar
95
+ /^Status:/, // status satırları
96
+ /^#/ // başlıklar
97
+ ];
98
+
99
+ const isUseful = (line) => !skipPatterns.some(p => p.test(line.trim()));
100
+
82
101
  // Migrate workspace/MEMORY.md and workspace/memory/*.md files
83
102
  const memoryMdFiles = [];
84
103
 
@@ -88,11 +107,11 @@ async function migrate(options) {
88
107
  memoryMdFiles.push(mainMemoryPath);
89
108
  }
90
109
 
91
- // Add memory/*.md files if directory exists
110
+ // Add memory/*.md files if directory exists (skip macOS metadata files)
92
111
  const memoryDirPath = path.join(openclawDir, 'workspace', 'memory');
93
112
  if (fs.existsSync(memoryDirPath)) {
94
113
  const memoryFiles = fs.readdirSync(memoryDirPath)
95
- .filter(f => f.endsWith('.md'))
114
+ .filter(f => f.endsWith('.md') && !f.startsWith('._')) // skip ._MEMORY.md
96
115
  .map(f => path.join(memoryDirPath, f));
97
116
  memoryMdFiles.push(...memoryFiles);
98
117
  }
@@ -102,11 +121,12 @@ async function migrate(options) {
102
121
  try {
103
122
  const content = fs.readFileSync(file, 'utf8');
104
123
 
105
- // Extract meaningful lines (skip headers, empty lines)
124
+ // Extract meaningful lines (skip headers, empty lines, useless patterns)
106
125
  const lines = content.split('\n')
107
126
  .filter(l => l.trim() && !l.startsWith('#'))
108
127
  .map(l => l.replace(/^[-*•]\s*/, '').trim())
109
- .filter(l => l.length > 10);
128
+ .filter(l => l.length > 10)
129
+ .filter(isUseful);
110
130
 
111
131
  // Add first 30 lines as facts (max 200 chars each)
112
132
  for (const line of lines.slice(0, 30)) {
@@ -385,8 +405,14 @@ async function migrate(options) {
385
405
  console.log(chalk.green('✅ Migration tamamlandı!\n'));
386
406
 
387
407
  if (report.memory) {
388
- const facts = report.memory.facts.join(', ');
389
- console.log(chalk.green('✅ Memory:'), chalk.white(`${report.memory.name || 'N/A'}${facts ? ', ' + facts : ''}`));
408
+ // Extract string facts for display (handle both string and object formats)
409
+ const factStrings = report.memory.facts
410
+ .map(f => typeof f === 'string' ? f : f.value)
411
+ .filter(f => f && f.length > 0)
412
+ .slice(0, 3); // Show first 3 facts
413
+
414
+ const factsDisplay = factStrings.length > 0 ? `, ${factStrings.join(', ')}` : '';
415
+ console.log(chalk.green('✅ Memory:'), chalk.white(`${report.memory.name || 'N/A'}${factsDisplay}`));
390
416
  }
391
417
 
392
418
  if (report.scripts > 0) {