natureco-cli 2.23.29 → 2.23.31

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.
Files changed (111) hide show
  1. package/README.md +94 -11
  2. package/bin/natureco.js +495 -94
  3. package/package.json +1 -1
  4. package/src/commands/acp.js +39 -0
  5. package/src/commands/admin-rpc.js +302 -0
  6. package/src/commands/agent.js +280 -0
  7. package/src/commands/agents.js +114 -30
  8. package/src/commands/approvals.js +214 -0
  9. package/src/commands/backup.js +124 -0
  10. package/src/commands/bonjour.js +167 -0
  11. package/src/commands/browser.js +815 -0
  12. package/src/commands/capability.js +237 -0
  13. package/src/commands/channels.js +422 -267
  14. package/src/commands/chat.js +5 -8
  15. package/src/commands/clawbot.js +19 -0
  16. package/src/commands/clickclack.js +130 -0
  17. package/src/commands/code.js +3 -2
  18. package/src/commands/commitments.js +148 -0
  19. package/src/commands/completion.js +84 -0
  20. package/src/commands/config.js +219 -30
  21. package/src/commands/configure.js +110 -0
  22. package/src/commands/crestodian.js +92 -0
  23. package/src/commands/cron.js +239 -19
  24. package/src/commands/daemon.js +90 -0
  25. package/src/commands/dashboard.js +47 -374
  26. package/src/commands/device-pair.js +248 -0
  27. package/src/commands/devices.js +137 -0
  28. package/src/commands/directory.js +179 -0
  29. package/src/commands/dns.js +196 -0
  30. package/src/commands/docs.js +136 -0
  31. package/src/commands/doctor.js +143 -492
  32. package/src/commands/exec-policy.js +80 -0
  33. package/src/commands/gateway-server.js +1155 -24
  34. package/src/commands/gateway.js +492 -249
  35. package/src/commands/health.js +148 -0
  36. package/src/commands/help.js +24 -25
  37. package/src/commands/hooks.js +141 -87
  38. package/src/commands/imessage.js +128 -14
  39. package/src/commands/infer.js +1474 -0
  40. package/src/commands/irc.js +64 -15
  41. package/src/commands/logs.js +122 -99
  42. package/src/commands/mattermost.js +114 -12
  43. package/src/commands/mcp.js +121 -309
  44. package/src/commands/memory-cmd.js +134 -1
  45. package/src/commands/memory.js +128 -0
  46. package/src/commands/message.js +720 -134
  47. package/src/commands/migrate.js +213 -2
  48. package/src/commands/models.js +39 -1
  49. package/src/commands/node.js +98 -0
  50. package/src/commands/nodes.js +362 -0
  51. package/src/commands/oc-path.js +200 -0
  52. package/src/commands/onboard.js +129 -0
  53. package/src/commands/open-prose.js +67 -0
  54. package/src/commands/pairing.js +108 -107
  55. package/src/commands/path.js +206 -0
  56. package/src/commands/plugins.js +35 -1
  57. package/src/commands/policy.js +176 -0
  58. package/src/commands/proxy.js +306 -0
  59. package/src/commands/qr.js +70 -0
  60. package/src/commands/reset.js +101 -94
  61. package/src/commands/sandbox.js +125 -0
  62. package/src/commands/secrets.js +201 -0
  63. package/src/commands/sessions.js +110 -51
  64. package/src/commands/setup.js +102 -543
  65. package/src/commands/signal.js +447 -18
  66. package/src/commands/skills.js +67 -1
  67. package/src/commands/sms.js +123 -19
  68. package/src/commands/status.js +101 -127
  69. package/src/commands/system.js +53 -0
  70. package/src/commands/tasks.js +208 -100
  71. package/src/commands/terminal.js +139 -0
  72. package/src/commands/thread-ownership.js +157 -0
  73. package/src/commands/transcripts.js +95 -0
  74. package/src/commands/tui.js +41 -0
  75. package/src/commands/uninstall.js +73 -92
  76. package/src/commands/update.js +146 -91
  77. package/src/commands/voice.js +82 -0
  78. package/src/commands/vydra.js +98 -0
  79. package/src/commands/webhooks.js +58 -66
  80. package/src/commands/wiki.js +783 -0
  81. package/src/commands/workboard.js +207 -0
  82. package/src/tools/audio_understanding.js +154 -0
  83. package/src/tools/browser.js +112 -0
  84. package/src/tools/canvas.js +104 -0
  85. package/src/tools/document_extract.js +84 -0
  86. package/src/tools/duckduckgo.js +54 -0
  87. package/src/tools/exa_search.js +66 -0
  88. package/src/tools/firecrawl.js +104 -0
  89. package/src/tools/image_generation.js +99 -0
  90. package/src/tools/llm_task.js +118 -0
  91. package/src/tools/media_understanding.js +128 -0
  92. package/src/tools/music_generation.js +113 -0
  93. package/src/tools/parallel_search.js +77 -0
  94. package/src/tools/phone_control.js +80 -0
  95. package/src/tools/phone_control_enhanced.js +184 -0
  96. package/src/tools/searxng.js +61 -0
  97. package/src/tools/speech_to_text.js +135 -0
  98. package/src/tools/text_to_speech.js +105 -0
  99. package/src/tools/thread_ownership.js +88 -0
  100. package/src/tools/video_generation.js +72 -0
  101. package/src/tools/web_readability.js +104 -0
  102. package/src/utils/agents-md.js +85 -0
  103. package/src/utils/api.js +39 -40
  104. package/src/utils/format.js +144 -0
  105. package/src/utils/headless.js +2 -1
  106. package/src/utils/memory.js +200 -0
  107. package/src/utils/parallel-tools.js +106 -0
  108. package/src/utils/sub-agent.js +148 -0
  109. package/src/utils/token-budget.js +304 -0
  110. package/src/utils/tool-runner.js +7 -5
  111. package/src/utils/web-fetch.js +107 -0
@@ -1,55 +1,169 @@
1
1
  const chalk = require('chalk');
2
2
  const inquirer = require('../utils/inquirer-wrapper');
3
3
  const { getConfig, saveConfig } = require('../utils/config');
4
+ const fs = require('fs');
5
+ const { execSync } = require('child_process');
4
6
 
5
7
  async function imessage(action) {
6
8
  if (!action || action === 'connect') return connectImessage();
7
9
  if (action === 'disconnect') return disconnectImessage();
8
10
  if (action === 'status') return statusImessage();
11
+ if (action === 'probe') return probeImessage();
9
12
  console.log(chalk.red('\n❌ Unknown action\n'));
10
- console.log(chalk.gray('Available actions: connect, disconnect, status\n'));
13
+ console.log(chalk.gray('Available actions: connect, disconnect, status, probe\n'));
11
14
  process.exit(1);
12
15
  }
13
16
 
14
17
  async function connectImessage() {
15
18
  const config = getConfig();
16
- if (!config.providerUrl) { console.log(chalk.red('\n❌ Setup yapılmamış. Önce "natureco setup" çalıştırın.\n')); process.exit(1); }
19
+ if (!config.providerUrl) {
20
+ console.log(chalk.red('\n❌ Setup yapılmamış. Önce "natureco setup" çalıştırın.\n'));
21
+ process.exit(1);
22
+ }
23
+
24
+ if (process.platform !== 'darwin') {
25
+ console.log(chalk.red('\n❌ iMessage sadece macOS\'te çalışır.\n'));
26
+ console.log(chalk.gray('Mevcut platform:'), chalk.white(process.platform));
27
+ console.log(chalk.gray('Diğer platformlar için SMS (Twilio) kullanılabilir.\n'));
28
+ process.exit(1);
29
+ }
30
+
17
31
  console.log(chalk.yellow('\n⏳ iMessage bağlantısı hazırlanıyor...\n'));
18
- console.log(chalk.gray('iMessage sadece macOS\'te çalışır. Windows/Linux\'ta kullanılamaz.'));
19
- console.log(chalk.gray('Gereken: imsg bridge: https://github.com/mbilker/imsg\n'));
32
+ console.log(chalk.gray('Gereken: imsg bridge — https://github.com/mbilker/imsg\n'));
33
+
34
+ const defaults = {
35
+ cliPath: config.imessageCliPath || '',
36
+ service: config.imessageService || 'auto',
37
+ dbPath: config.imessageDbPath || '~/Library/Messages/chat.db',
38
+ dmPolicy: config.imessageDmPolicy || 'pairing',
39
+ };
40
+
20
41
  const answers = await inquirer.prompt([
21
- { type: 'input', name: 'cliPath', message: 'imsg CLI yolu (opsiyonel, boş bırakın PATH\'ten bulsun):' },
22
- { type: 'list', name: 'dmPolicy', message: 'DM politikası:', choices: [{ name: 'Pairing (önerilen)', value: 'pairing' }, { name: 'Allowlist', value: 'allowlist' }, { name: 'Open', value: 'open' }, { name: 'Disabled', value: 'disabled' }], default: 'pairing' },
42
+ { type: 'input', name: 'cliPath', message: 'imsg CLI yolu (boş = PATH):', default: defaults.cliPath },
43
+ { type: 'input', name: 'dbPath', message: 'iMessage veritabanı yolu:', default: defaults.dbPath },
44
+ { type: 'list', name: 'service', message: 'Servis:', default: defaults.service, choices: [
45
+ { name: 'Auto-detect (önerilen)', value: 'auto' },
46
+ { name: 'iMessage', value: 'imessage' },
47
+ { name: 'SMS', value: 'sms' },
48
+ ]},
49
+ { type: 'list', name: 'dmPolicy', message: 'DM politikası:', default: defaults.dmPolicy, choices: [
50
+ { name: 'Pairing (önerilen)', value: 'pairing' },
51
+ { name: 'Allowlist', value: 'allowlist' },
52
+ { name: 'Open', value: 'open' },
53
+ { name: 'Disabled', value: 'disabled' },
54
+ ]},
23
55
  ]);
56
+
24
57
  const botId = `imessage_${Date.now()}`;
25
58
  config.imessageCliPath = answers.cliPath.trim() || '';
59
+ config.imessageDbPath = answers.dbPath.trim() || '~/Library/Messages/chat.db';
60
+ config.imessageService = answers.service;
26
61
  config.imessageDmPolicy = answers.dmPolicy;
27
62
  config.imessageBotId = botId;
28
63
  saveConfig(config);
64
+
29
65
  console.log(chalk.green('\n✅ iMessage bağlantısı kaydedildi!\n'));
30
66
  console.log(chalk.cyan('Bot ID:'), chalk.white(botId));
31
67
  if (config.imessageCliPath) console.log(chalk.cyan('CLI Yolu:'), chalk.white(config.imessageCliPath));
32
- console.log(chalk.gray('\nNot: iMessage sadece macOS\'te çalışır.'));
33
- console.log(chalk.gray('Gateway ile başlatmak için: natureco gateway start\n'));
68
+ console.log(chalk.cyan('Servis:'), chalk.white(answers.service));
69
+ console.log(chalk.gray('\nGateway ile başlatmak için: natureco gateway start\n'));
34
70
  }
35
71
 
36
72
  async function disconnectImessage() {
37
73
  const config = getConfig();
38
- if (!config.imessageBotId) { console.log(chalk.gray('\n⚠️ No iMessage connection found\n')); return; }
39
- const { confirm } = await inquirer.prompt([{ type: 'confirm', name: 'confirm', message: 'iMessage bağlantısını kaldırmak istediğinize emin misiniz?', default: false }]);
40
- if (!confirm) { console.log(chalk.gray('\nCancelled\n')); return; }
41
- delete config.imessageCliPath; delete config.imessageDmPolicy; delete config.imessageBotId;
74
+ if (!config.imessageBotId) {
75
+ console.log(chalk.gray('\n⚠️ No iMessage connection found\n'));
76
+ return;
77
+ }
78
+ const { confirm } = await inquirer.prompt([
79
+ { type: 'confirm', name: 'confirm', message: 'iMessage bağlantısını kaldırmak istediğinize emin misiniz?', default: false }
80
+ ]);
81
+ if (!confirm) {
82
+ console.log(chalk.gray('\nCancelled\n'));
83
+ return;
84
+ }
85
+ delete config.imessageCliPath; delete config.imessageDbPath; delete config.imessageService;
86
+ delete config.imessageDmPolicy; delete config.imessageBotId;
42
87
  saveConfig(config);
43
88
  console.log(chalk.green('\n✅ iMessage disconnected\n'));
44
89
  }
45
90
 
46
- function statusImessage() {
91
+ async function statusImessage() {
47
92
  const config = getConfig();
48
- if (!config.imessageBotId) { console.log(chalk.gray('\n⚠️ iMessage not connected\n')); console.log(chalk.gray('Connect with: natureco imessage connect\n')); return; }
93
+ if (!config.imessageBotId) {
94
+ console.log(chalk.gray('\n⚠️ iMessage not connected\n'));
95
+ console.log(chalk.gray('Connect with: natureco imessage connect\n'));
96
+ return;
97
+ }
49
98
  console.log(chalk.green('\n✅ iMessage connected\n'));
50
99
  console.log(chalk.cyan('Bot ID:'), chalk.white(config.imessageBotId));
51
100
  if (config.imessageCliPath) console.log(chalk.cyan('CLI Yolu:'), chalk.white(config.imessageCliPath));
101
+ console.log(chalk.cyan('Servis:'), chalk.white(config.imessageService || 'auto'));
102
+
103
+ if (process.platform === 'darwin') {
104
+ const imsgPath = findImsgBinary(config);
105
+ console.log(chalk.cyan('imsg binary:'), chalk.white(imsgPath || 'Bulunamadı'));
106
+ if (config.imessageDbPath) console.log(chalk.cyan('DB Yolu:'), chalk.white(config.imessageDbPath));
107
+ } else {
108
+ console.log(chalk.yellow('\n⚠️ iMessage sadece macOS\'te çalışır'));
109
+ }
110
+
52
111
  console.log(chalk.gray('\nDisconnect with: natureco imessage disconnect\n'));
53
112
  }
54
113
 
114
+ async function probeImessage() {
115
+ const config = getConfig();
116
+ if (!config.imessageBotId) {
117
+ console.log(chalk.red('\n❌ iMessage bağlantısı yapılmamış\n'));
118
+ console.log(chalk.gray('Önce: natureco imessage connect\n'));
119
+ process.exit(1);
120
+ }
121
+
122
+ if (process.platform !== 'darwin') {
123
+ console.log(chalk.red('\n❌ iMessage sadece macOS\'te kullanılabilir.\n'));
124
+ process.exit(1);
125
+ }
126
+
127
+ console.log(chalk.yellow('\n⏳ iMessage problanıyor...\n'));
128
+
129
+ const imsgPath = findImsgBinary(config);
130
+ if (!imsgPath) {
131
+ console.log(chalk.red('✗ imsg binary bulunamadı\n'));
132
+ console.log(chalk.gray('Kurulum: brew install mbilker/imsg/imsg'));
133
+ console.log(chalk.gray('Veya: https://github.com/mbilker/imsg\n'));
134
+ process.exit(1);
135
+ }
136
+ console.log(chalk.green(`✓ imsg found: ${imsgPath}`));
137
+
138
+ // Check DB
139
+ const dbPath = (config.imessageDbPath || '~/Library/Messages/chat.db').replace(/^~/, require('os').homedir());
140
+ if (fs.existsSync(dbPath)) {
141
+ console.log(chalk.green(`✓ iMessage DB: ${dbPath}`));
142
+ } else {
143
+ console.log(chalk.yellow(`⚠️ iMessage DB bulunamadı: ${dbPath}`));
144
+ }
145
+
146
+ // Try to send a test message (dry run)
147
+ try {
148
+ const result = execSync(`"${imsgPath}" --help 2>&1`, { encoding: 'utf-8', timeout: 5000 });
149
+ console.log(chalk.gray(`\nimsg version: ${result.split('\n')[0]}`));
150
+ } catch {
151
+ console.log(chalk.yellow('⚠️ imsg çalıştırılamadı'));
152
+ }
153
+
154
+ console.log('');
155
+ }
156
+
157
+ function findImsgBinary(config) {
158
+ if (config.imessageCliPath && fs.existsSync(config.imessageCliPath)) {
159
+ return config.imessageCliPath;
160
+ }
161
+ try {
162
+ const which = execSync('which imsg 2>/dev/null || echo ""', { encoding: 'utf-8', timeout: 5000 });
163
+ const p = which.trim();
164
+ if (p && fs.existsSync(p)) return p;
165
+ } catch {}
166
+ return null;
167
+ }
168
+
55
169
  module.exports = imessage;