natureco-cli 5.6.37 → 5.6.39
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": "5.6.
|
|
3
|
+
"version": "5.6.39",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
|
@@ -1482,14 +1482,25 @@ async function processImessageMessage(msg, config) {
|
|
|
1482
1482
|
if (msg.id && msg.id === imessageLastMessageId) return;
|
|
1483
1483
|
if (msg.id) imessageLastMessageId = msg.id;
|
|
1484
1484
|
|
|
1485
|
-
// Skip outgoing messages
|
|
1486
|
-
|
|
1485
|
+
// v5.6.39: Skip outgoing messages - TÜM olası field adlarını kontrol et
|
|
1486
|
+
// imsg history kullanırsa is_from_me, watch kullanırsa fromMe/isFromMe olabilir
|
|
1487
|
+
if (msg.is_from_me || msg.isFromMe || msg.from_me || msg.fromMe) {
|
|
1488
|
+
log('imessage', `Skipping own message (is_from_me=${msg.is_from_me || msg.from_me || msg.fromMe})`, 'gray');
|
|
1489
|
+
return;
|
|
1490
|
+
}
|
|
1487
1491
|
|
|
1488
|
-
|
|
1489
|
-
|
|
1492
|
+
// v5.6.39: Sender kontrolü - sender kendimiz (bot) ise yut
|
|
1493
|
+
// 'sender' alanı kendi numaramız ise skip
|
|
1494
|
+
const myNumber = config.imessageBotId || ''; // bot ID değilse boş
|
|
1495
|
+
const sender = msg.sender || msg.from || msg.address || msg.handle || '';
|
|
1496
|
+
|
|
1497
|
+
const text = msg.text || msg.message || msg.body || '';
|
|
1490
1498
|
|
|
1491
1499
|
if (!text.trim() || !sender) return;
|
|
1492
1500
|
|
|
1501
|
+
// Boş sender veya placeholder ise skip
|
|
1502
|
+
if (sender === 'me' || sender === 'self') return;
|
|
1503
|
+
|
|
1493
1504
|
log('imessage', `Inbound from ${sender}: "${text.slice(0, 80)}"`, 'cyan');
|
|
1494
1505
|
|
|
1495
1506
|
const { sendMessage } = require('../utils/api');
|
|
@@ -1511,7 +1522,7 @@ async function processImessageMessage(msg, config) {
|
|
|
1511
1522
|
const reply = response?.reply || response?.message || '';
|
|
1512
1523
|
|
|
1513
1524
|
if (reply) {
|
|
1514
|
-
execSync(`${global.imessageProvider.imsgPath} send --to "${sender}" --
|
|
1525
|
+
execSync(`${global.imessageProvider.imsgPath} send --to "${sender}" --text "${reply.replace(/"/g, '\\"')}" 2>/dev/null`, {
|
|
1515
1526
|
timeout: 15000, stdio: 'pipe',
|
|
1516
1527
|
});
|
|
1517
1528
|
log('imessage', `Reply sent to ${sender} (${reply.length} chars)`, 'green');
|
|
@@ -1831,7 +1842,7 @@ function startHttpServer() {
|
|
|
1831
1842
|
return;
|
|
1832
1843
|
}
|
|
1833
1844
|
try {
|
|
1834
|
-
execSync(`${global.imessageProvider.imsgPath} send --to "${target.replace(/"/g, '\\"')}" --
|
|
1845
|
+
execSync(`${global.imessageProvider.imsgPath} send --to "${target.replace(/"/g, '\\"')}" --text "${message.replace(/"/g, '\\"')}" 2>/dev/null`, {
|
|
1835
1846
|
timeout: 15000, stdio: 'pipe',
|
|
1836
1847
|
});
|
|
1837
1848
|
log('http', `iMessage sent to ${target}`, 'green');
|
|
@@ -2025,7 +2036,7 @@ function startCronJobs(config) {
|
|
|
2025
2036
|
log('cron', 'iMessage not connected, skipping', 'red');
|
|
2026
2037
|
return;
|
|
2027
2038
|
}
|
|
2028
|
-
execSync(`${global.imessageProvider.imsgPath} send --to "${cronJob.target.replace(/"/g, '\\"')}" --
|
|
2039
|
+
execSync(`${global.imessageProvider.imsgPath} send --to "${cronJob.target.replace(/"/g, '\\"')}" --text "${reply.replace(/"/g, '\\"')}" 2>/dev/null`, {
|
|
2029
2040
|
timeout: 15000, stdio: 'pipe',
|
|
2030
2041
|
});
|
|
2031
2042
|
log('cron', `Sent to iMessage: ${cronJob.target}`, 'green');
|