natureco-cli 2.14.4 → 2.14.5

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.14.4",
3
+ "version": "2.14.5",
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.14.4</div>
214
+ <div class="version-badge" id="version-badge">v2.14.5</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.14.4',
344
+ version: 'v2.14.5',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
@@ -251,6 +251,29 @@ async function migrate(options) {
251
251
  const memoryFile = path.join(memoryDir, 'universal-provider.json');
252
252
  fs.writeFileSync(memoryFile, JSON.stringify(memory, null, 2));
253
253
 
254
+ // Also update universal-provider.json if it already exists (merge with existing data)
255
+ try {
256
+ const universalFile = path.join(memoryDir, 'universal-provider.json');
257
+ if (fs.existsSync(universalFile)) {
258
+ const universal = JSON.parse(fs.readFileSync(universalFile, 'utf8'));
259
+
260
+ // Update name, botName, nickname if they exist in migration
261
+ if (memory.name) universal.name = memory.name;
262
+ if (memory.botName) universal.botName = memory.botName;
263
+ if (memory.nickname) universal.nickname = memory.nickname;
264
+
265
+ // Merge facts
266
+ if (!universal.facts) universal.facts = [];
267
+ for (const fact of (memory.facts || [])) {
268
+ addUniqueFact(universal.facts, fact);
269
+ }
270
+
271
+ fs.writeFileSync(universalFile, JSON.stringify(universal, null, 2));
272
+ }
273
+ } catch (err) {
274
+ // Silently fail if can't update universal-provider.json
275
+ }
276
+
254
277
  // Also copy to all existing bot memory files
255
278
  try {
256
279
  const memoryFiles = fs.readdirSync(memoryDir)