natureco-cli 5.9.7 → 5.10.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 +1 -1
- package/src/commands/repl.js +32 -23
- package/src/tools/approval.js +55 -0
- package/src/tools/async_delegation.js +83 -0
- package/src/tools/blueprint.js +88 -0
- package/src/tools/checkpoint.js +66 -0
- package/src/tools/clarify.js +31 -0
- package/src/tools/computer_use.js +141 -0
- package/src/tools/discord.js +65 -0
- package/src/tools/file_state.js +73 -0
- package/src/tools/google_meet.js +71 -0
- package/src/tools/homeassistant.js +84 -0
- package/src/tools/microsoft_graph.js +103 -0
- package/src/tools/pii_redact.js +50 -0
- package/src/tools/send_message.js +39 -0
- package/src/tools/session_search.js +62 -0
- package/src/tools/spotify.js +93 -0
- package/src/tools/url_safety.js +65 -0
- package/src/tools/x_search.js +51 -0
- package/src/utils/tools.js +17 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
|
|
3
|
+
async function xSearch(params) {
|
|
4
|
+
const { query, maxResults = 5, apiKey } = params;
|
|
5
|
+
if (!query) return { success: false, error: 'query gerekli' };
|
|
6
|
+
const key = apiKey || process.env.X_API_KEY || process.env.TWITTER_API_KEY;
|
|
7
|
+
if (!key) return { success: false, error: 'X API anahtari gerekli (X_API_KEY veya TWITTER_API_KEY ortam degiskeni)' };
|
|
8
|
+
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
const encoded = encodeURIComponent(query);
|
|
11
|
+
const url = `https://api.twitter.com/2/tweets/search/recent?query=${encoded}&max_results=${Math.min(maxResults, 100)}&tweet.fields=created_at,public_metrics`;
|
|
12
|
+
const req = https.get(url, {
|
|
13
|
+
headers: { 'Authorization': `Bearer ${key}` },
|
|
14
|
+
timeout: 15000,
|
|
15
|
+
}, (res) => {
|
|
16
|
+
let data = '';
|
|
17
|
+
res.on('data', c => data += c);
|
|
18
|
+
res.on('end', () => {
|
|
19
|
+
if (res.statusCode !== 200) {
|
|
20
|
+
resolve({ success: false, error: `HTTP ${res.statusCode}: ${data.slice(0, 200)}` });
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const parsed = JSON.parse(data);
|
|
25
|
+
const tweets = (parsed.data || []).map(t => ({
|
|
26
|
+
id: t.id, text: t.text, createdAt: t.created_at,
|
|
27
|
+
likes: t.public_metrics?.like_count || 0, retweets: t.public_metrics?.retweet_count || 0,
|
|
28
|
+
}));
|
|
29
|
+
resolve({ success: true, query, count: tweets.length, tweets, meta: parsed.meta });
|
|
30
|
+
} catch { resolve({ success: false, error: 'Yanit cozumlenemedi' }); }
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
req.on('error', (e) => resolve({ success: false, error: e.message }));
|
|
34
|
+
req.on('timeout', () => { req.destroy(); resolve({ success: false, error: 'Timeout' }); });
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = {
|
|
39
|
+
name: 'x_search',
|
|
40
|
+
description: 'X/Twitter API v2 ile tweet aramasi. X_API_KEY veya TWITTER_API_KEY ortam degiskeni gerekli.',
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
query: { type: 'string', description: 'Arama sorgusu' },
|
|
45
|
+
maxResults: { type: 'number', description: 'Maksimum tweet sayisi (default: 5, max: 100)' },
|
|
46
|
+
apiKey: { type: 'string', description: 'Opsiyonel: API anahtari (default: X_API_KEY env)' },
|
|
47
|
+
},
|
|
48
|
+
required: ['query'],
|
|
49
|
+
},
|
|
50
|
+
async execute(params) { return await xSearch(params); },
|
|
51
|
+
};
|
package/src/utils/tools.js
CHANGED
|
@@ -60,6 +60,12 @@ const EMOJI_MAP = {
|
|
|
60
60
|
code_execution: '⚡',
|
|
61
61
|
// Cross-session
|
|
62
62
|
cross_session_memory: '🔗',
|
|
63
|
+
// v5.10.0: New tools
|
|
64
|
+
url_safety: '🛡️', approval: '✅', checkpoint: '💾', file_state: '🔍',
|
|
65
|
+
pii_redact: '🔒', clarify: '❓', session_search: '🔎', x_search: '🐦',
|
|
66
|
+
discord: '💬', send_message: '📨', async_delegation: '⏳', blueprint: '📐',
|
|
67
|
+
spotify: '🎧', homeassistant: '🏠', microsoft_graph: '📊', computer_use: '🖱️',
|
|
68
|
+
google_meet: '📹',
|
|
63
69
|
};
|
|
64
70
|
|
|
65
71
|
// ── Toolset grouping ─────────────────────────────────────────────────────
|
|
@@ -105,6 +111,15 @@ const TOOLSET_MAP = {
|
|
|
105
111
|
kanban: 'planning',
|
|
106
112
|
cron_create: 'cron', thread_ownership: 'threads', code_execution: 'sandbox',
|
|
107
113
|
cross_session_memory: 'memory',
|
|
114
|
+
// v5.10.0: New tools
|
|
115
|
+
url_safety: 'security', approval: 'security', pii_redact: 'security',
|
|
116
|
+
checkpoint: 'system', file_state: 'system',
|
|
117
|
+
clarify: 'agent',
|
|
118
|
+
session_search: 'memory',
|
|
119
|
+
x_search: 'web', discord: 'communication', send_message: 'communication',
|
|
120
|
+
async_delegation: 'agent', blueprint: 'planning',
|
|
121
|
+
spotify: 'media', homeassistant: 'iot', microsoft_graph: 'office',
|
|
122
|
+
computer_use: 'automation', google_meet: 'communication',
|
|
108
123
|
};
|
|
109
124
|
|
|
110
125
|
// ── check_fn'ler (tool availability kontrolleri) ────────────────────────
|
|
@@ -132,6 +147,8 @@ const CHECK_FN_MAP = {
|
|
|
132
147
|
macos_screenshot: _checkMacOSTools,
|
|
133
148
|
phone_control: _checkMacOSTools,
|
|
134
149
|
phone_control_enhanced: _checkMacOSTools,
|
|
150
|
+
// v5.10.0: google_meet create macOS-only; computer_use partial cross-platform
|
|
151
|
+
google_meet: () => process.platform === 'darwin' || true, // only 'create' is macOS-only, 'open' cross-platform
|
|
135
152
|
};
|
|
136
153
|
|
|
137
154
|
// ── Provider filtering ───────────────────────────────────────────────────
|