natureco-cli 2.12.1 → 2.12.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.12.1",
3
+ "version": "2.12.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.12.1</div>
214
+ <div class="version-badge" id="version-badge">v2.12.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.12.1',
344
+ version: 'v2.12.3',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
@@ -77,13 +77,20 @@ async function migrate(options) {
77
77
  const cronJobsPath = path.join(openclawDir, 'cron', 'jobs.json');
78
78
 
79
79
  if (fs.existsSync(cronJobsPath)) {
80
- const openclawCrons = JSON.parse(fs.readFileSync(cronJobsPath, 'utf8'));
80
+ // OpenClaw cron format: { version: 1, jobs: [...] }
81
+ const cronData = JSON.parse(fs.readFileSync(cronJobsPath, 'utf8'));
82
+ const jobs = cronData.jobs || cronData || []; // jobs property or direct array
81
83
 
82
84
  const naturecoCrons = [];
83
85
 
84
- for (const job of openclawCrons) {
86
+ for (const job of jobs) {
85
87
  report.crons.total++;
86
88
 
89
+ // Only migrate cron schedule (not "at" schedule)
90
+ if (job.schedule?.kind !== 'cron') {
91
+ continue;
92
+ }
93
+
87
94
  if (!job.enabled) {
88
95
  report.crons.inactive++;
89
96
  continue;
@@ -91,11 +98,6 @@ async function migrate(options) {
91
98
 
92
99
  report.crons.active++;
93
100
 
94
- // Only migrate cron schedule (not interval)
95
- if (job.schedule?.kind !== 'cron') {
96
- continue;
97
- }
98
-
99
101
  // Determine action based on delivery channel
100
102
  let action = 'whatsapp'; // default
101
103
  if (job.delivery?.channel === 'telegram') {
@@ -178,11 +180,13 @@ async function migrate(options) {
178
180
  }
179
181
 
180
182
  if (report.crons.total > 0) {
181
- console.log(chalk.green('✅ Cron jobs:'), chalk.white(`${report.crons.total} job migrate edildi (${report.crons.active} aktif, ${report.crons.inactive} pasif)`));
183
+ console.log(chalk.green('✅ Cron jobs:'), chalk.white(`${report.crons.total} job bulundu (${report.crons.active} aktif migrate edildi, ${report.crons.inactive} pasif atlandı)`));
182
184
  }
183
185
 
184
186
  if (report.telegram && report.telegram.length > 0) {
185
187
  console.log(chalk.green('✅ Telegram allowFrom:'), chalk.white(report.telegram.join(', ')));
188
+ } else if (report.telegram !== null) {
189
+ console.log(chalk.gray('⚠️ Telegram allowFrom: Bulunamadı'));
186
190
  }
187
191
 
188
192
  if (report.whatsapp) {