natureco-cli 2.13.1 → 2.13.3

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.1",
3
+ "version": "2.13.3",
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.1</div>
214
+ <div class="version-badge" id="version-badge">v2.13.3</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.1',
344
+ version: 'v2.13.3',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
@@ -79,6 +79,49 @@ async function migrate(options) {
79
79
  memory.facts.push(notes);
80
80
  }
81
81
 
82
+ // Migrate workspace/MEMORY.md and workspace/memory/*.md files
83
+ const memoryMdFiles = [];
84
+
85
+ // Add MEMORY.md if exists
86
+ const mainMemoryPath = path.join(openclawDir, 'workspace', 'MEMORY.md');
87
+ if (fs.existsSync(mainMemoryPath)) {
88
+ memoryMdFiles.push(mainMemoryPath);
89
+ }
90
+
91
+ // Add memory/*.md files if directory exists
92
+ const memoryDirPath = path.join(openclawDir, 'workspace', 'memory');
93
+ if (fs.existsSync(memoryDirPath)) {
94
+ const memoryFiles = fs.readdirSync(memoryDirPath)
95
+ .filter(f => f.endsWith('.md'))
96
+ .map(f => path.join(memoryDirPath, f));
97
+ memoryMdFiles.push(...memoryFiles);
98
+ }
99
+
100
+ // Process each memory file
101
+ for (const file of memoryMdFiles) {
102
+ try {
103
+ const content = fs.readFileSync(file, 'utf8');
104
+
105
+ // Extract meaningful lines (skip headers, empty lines)
106
+ const lines = content.split('\n')
107
+ .filter(l => l.trim() && !l.startsWith('#'))
108
+ .map(l => l.replace(/^[-*•]\s*/, '').trim())
109
+ .filter(l => l.length > 10);
110
+
111
+ // Add first 30 lines as facts (max 200 chars each)
112
+ for (const line of lines.slice(0, 30)) {
113
+ memory.facts.push({
114
+ value: line.slice(0, 200),
115
+ score: 6,
116
+ updatedAt: new Date().toISOString().split('T')[0]
117
+ });
118
+ }
119
+ } catch (err) {
120
+ // Skip file if error
121
+ console.log(chalk.gray(`⚠️ ${path.basename(file)} okunamadı`));
122
+ }
123
+ }
124
+
82
125
  // Save to NatureCo memory
83
126
  const memoryDir = path.join(os.homedir(), '.natureco', 'memory');
84
127
  fs.mkdirSync(memoryDir, { recursive: true });
@@ -165,6 +208,21 @@ async function migrate(options) {
165
208
  JSON.stringify(workspacePackageJson, null, 2)
166
209
  );
167
210
 
211
+ // Copy .env file (check multiple locations)
212
+ const envSources = [
213
+ path.join(openclawDir, 'workspace', 'scripts', '.env'), // önce buraya bak
214
+ path.join(openclawDir, '.env') // sonra buna
215
+ ];
216
+ const envDest = path.join(workspaceDir, '.env');
217
+
218
+ for (const envSource of envSources) {
219
+ if (fs.existsSync(envSource)) {
220
+ fs.copyFileSync(envSource, envDest);
221
+ console.log(chalk.green('✅ .env dosyası kopyalandı'));
222
+ break;
223
+ }
224
+ }
225
+
168
226
  // Install npm packages
169
227
  console.log(chalk.yellow('\n📦 Workspace npm paketleri kuruluyor...\n'));
170
228
  try {