natureco-cli 2.12.9 → 2.13.0

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.12.9",
3
+ "version": "2.13.0",
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.12.9</div>
214
+ <div class="version-badge" id="version-badge">v2.13.0</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.12.9',
344
+ version: 'v2.13.0',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
@@ -118,11 +118,18 @@ async function migrate(options) {
118
118
  // First, convert all backslashes to forward slashes
119
119
  content = content.replace(/\\/g, '/');
120
120
 
121
- // Then normalize Windows path patterns
121
+ // Then normalize Windows path patterns (comprehensive)
122
+ // Handle escaped backslashes in strings (C:\\\\Users\\\\user\\\\ → homedir/)
122
123
  content = content
123
- .replace(/C:\/Users\/user\/\.openclaw\//g, `${os.homedir()}/.natureco/`)
124
- .replace(/E:\/\.openclaw\//g, `${os.homedir()}/.natureco/`)
124
+ .replace(/C:\/\/\/\/Users\/\/\/\/user\/\/\/\//g, `${os.homedir()}/`)
125
+ .replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
125
126
  .replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
127
+ // String literals with quotes
128
+ .replace(/'C:\/Users\/user\/\.natureco\//g, `'${os.homedir()}/.natureco/`)
129
+ .replace(/"C:\/Users\/user\/\.natureco\//g, `"${os.homedir()}/.natureco/`)
130
+ .replace(/'C:\/\/\/\/Users\/\/\/\/user\/\/\/\/\.natureco\/\/\/\//g, `'${os.homedir()}/.natureco/`)
131
+ // General patterns
132
+ .replace(/E:\/\.openclaw\//g, `${os.homedir()}/.natureco/`)
126
133
  .replace(/\.openclaw\//g, '.natureco/')
127
134
  .replace(/workspace\/scripts\\/g, 'workspace/scripts/');
128
135
  }
@@ -212,16 +219,22 @@ async function migrate(options) {
212
219
  // Get prompt (max 300 chars)
213
220
  let prompt = job.payload?.message || '';
214
221
 
215
- // Fix Windows paths in prompts
222
+ // Fix Windows paths in prompts (comprehensive)
216
223
  // First, convert all backslashes to forward slashes
217
224
  prompt = prompt.replace(/\\/g, '/');
218
225
 
219
226
  // Then normalize Windows path patterns
220
- // "node C:/Users/user/.openclaw/workspace/scripts/xxx.js" "node ~/.natureco/workspace/scripts/xxx.js"
227
+ // Handle escaped backslashes and string literals
221
228
  prompt = prompt
222
- .replace(/C:\/Users\/user\/\.openclaw\//g, `${os.homedir()}/.natureco/`)
223
- .replace(/E:\/\.openclaw\//g, `${os.homedir()}/.natureco/`)
229
+ .replace(/C:\/\/\/\/Users\/\/\/\/user\/\/\/\//g, `${os.homedir()}/`)
230
+ .replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
224
231
  .replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
232
+ // String literals with quotes
233
+ .replace(/'C:\/Users\/user\/\.natureco\//g, `'${os.homedir()}/.natureco/`)
234
+ .replace(/"C:\/Users\/user\/\.natureco\//g, `"${os.homedir()}/.natureco/`)
235
+ .replace(/'C:\/\/\/\/Users\/\/\/\/user\/\/\/\/\.natureco\/\/\/\//g, `'${os.homedir()}/.natureco/`)
236
+ // General patterns
237
+ .replace(/E:\/\.openclaw\//g, `${os.homedir()}/.natureco/`)
225
238
  .replace(/\.openclaw\//g, '.natureco/')
226
239
  .replace(/workspace\/scripts\\/g, 'workspace/scripts/');
227
240