argo-search 1.0.1

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.
@@ -0,0 +1,395 @@
1
+ {
2
+ "_description": "各引擎的配额/成本/限频配置。用于智能编排调度。",
3
+ "local_search": {
4
+ "label": "Local Search 聚合",
5
+ "qps": 10,
6
+ "limit": null,
7
+ "period": "second",
8
+ "cost_per_call": 0.0,
9
+ "cost_unit": "free",
10
+ "cost_tier": "free",
11
+ "priority": 1
12
+ },
13
+ "local_bing": {
14
+ "label": "Bing本地",
15
+ "qps": 5,
16
+ "limit": null,
17
+ "period": "second",
18
+ "cost_per_call": 0.0,
19
+ "cost_unit": "free",
20
+ "cost_tier": "free",
21
+ "priority": 20
22
+ },
23
+ "local_google": {
24
+ "label": "Google本地",
25
+ "qps": 3,
26
+ "limit": null,
27
+ "period": "second",
28
+ "cost_per_call": 0.0,
29
+ "cost_unit": "free",
30
+ "cost_tier": "free",
31
+ "priority": 21
32
+ },
33
+ "local_mojeek": {
34
+ "label": "Mojeek本地",
35
+ "qps": 3,
36
+ "limit": null,
37
+ "period": "second",
38
+ "cost_per_call": 0.0,
39
+ "cost_unit": "free",
40
+ "cost_tier": "free",
41
+ "priority": 22
42
+ },
43
+ "local_yandex": {
44
+ "label": "Yandex本地",
45
+ "qps": 3,
46
+ "limit": null,
47
+ "period": "second",
48
+ "cost_per_call": 0.0,
49
+ "cost_unit": "free",
50
+ "cost_tier": "free",
51
+ "priority": 23
52
+ },
53
+ "local_startpage": {
54
+ "label": "Startpage本地",
55
+ "qps": 3,
56
+ "limit": null,
57
+ "period": "second",
58
+ "cost_per_call": 0.0,
59
+ "cost_unit": "free",
60
+ "cost_tier": "free",
61
+ "priority": 24
62
+ },
63
+ "local_duckduckgo": {
64
+ "label": "DuckDuckGo本地",
65
+ "qps": 5,
66
+ "limit": null,
67
+ "period": "second",
68
+ "cost_per_call": 0.0,
69
+ "cost_unit": "free",
70
+ "cost_tier": "free",
71
+ "priority": 25
72
+ },
73
+ "local_baidu": {
74
+ "label": "百度本地",
75
+ "qps": 3,
76
+ "limit": null,
77
+ "period": "second",
78
+ "cost_per_call": 0.0,
79
+ "cost_unit": "free",
80
+ "cost_tier": "free",
81
+ "priority": 26
82
+ },
83
+ "local_sogou": {
84
+ "label": "搜狗本地",
85
+ "qps": 3,
86
+ "limit": null,
87
+ "period": "second",
88
+ "cost_per_call": 0.0,
89
+ "cost_unit": "free",
90
+ "cost_tier": "free",
91
+ "priority": 27
92
+ },
93
+ "local_arxiv": {
94
+ "label": "arXiv本地",
95
+ "qps": 1,
96
+ "limit": null,
97
+ "period": "second",
98
+ "cost_per_call": 0.0,
99
+ "cost_unit": "free",
100
+ "cost_tier": "free",
101
+ "priority": 28
102
+ },
103
+ "local_pubmed": {
104
+ "label": "PubMed本地",
105
+ "qps": 1,
106
+ "limit": null,
107
+ "period": "second",
108
+ "cost_per_call": 0.0,
109
+ "cost_unit": "free",
110
+ "cost_tier": "free",
111
+ "priority": 29
112
+ },
113
+ "local_crossref": {
114
+ "label": "Crossref本地",
115
+ "qps": 2,
116
+ "limit": null,
117
+ "period": "second",
118
+ "cost_per_call": 0.0,
119
+ "cost_unit": "free",
120
+ "cost_tier": "free",
121
+ "priority": 30
122
+ },
123
+ "local_semantic_scholar": {
124
+ "label": "Semantic Scholar本地",
125
+ "qps": 2,
126
+ "limit": null,
127
+ "period": "second",
128
+ "cost_per_call": 0.0,
129
+ "cost_unit": "free",
130
+ "cost_tier": "free",
131
+ "priority": 31
132
+ },
133
+ "local_bing_news": {
134
+ "label": "Bing News本地",
135
+ "qps": 3,
136
+ "limit": null,
137
+ "period": "second",
138
+ "cost_per_call": 0.0,
139
+ "cost_unit": "free",
140
+ "cost_tier": "free",
141
+ "priority": 32
142
+ },
143
+ "local_google_news": {
144
+ "label": "Google News本地",
145
+ "qps": 3,
146
+ "limit": null,
147
+ "period": "second",
148
+ "cost_per_call": 0.0,
149
+ "cost_unit": "free",
150
+ "cost_tier": "free",
151
+ "priority": 33
152
+ },
153
+ "local_duckduckgo_news": {
154
+ "label": "DuckDuckGo News本地",
155
+ "qps": 3,
156
+ "limit": null,
157
+ "period": "second",
158
+ "cost_per_call": 0.0,
159
+ "cost_unit": "free",
160
+ "cost_tier": "free",
161
+ "priority": 34
162
+ },
163
+ "local_github": {
164
+ "label": "GitHub本地",
165
+ "qps": 5,
166
+ "limit": 1000,
167
+ "period": "day",
168
+ "cost_per_call": 0.0,
169
+ "cost_unit": "free",
170
+ "cost_tier": "free",
171
+ "priority": 35
172
+ },
173
+ "local_stackoverflow": {
174
+ "label": "StackOverflow本地",
175
+ "qps": 5,
176
+ "limit": null,
177
+ "period": "second",
178
+ "cost_per_call": 0.0,
179
+ "cost_unit": "free",
180
+ "cost_tier": "free",
181
+ "priority": 36
182
+ },
183
+ "local_gitlab": {
184
+ "label": "GitLab本地",
185
+ "qps": 3,
186
+ "limit": null,
187
+ "period": "second",
188
+ "cost_per_call": 0.0,
189
+ "cost_unit": "free",
190
+ "cost_tier": "free",
191
+ "priority": 37
192
+ },
193
+ "local_npm": {
194
+ "label": "NPM本地",
195
+ "qps": 5,
196
+ "limit": null,
197
+ "period": "second",
198
+ "cost_per_call": 0.0,
199
+ "cost_unit": "free",
200
+ "cost_tier": "free",
201
+ "priority": 38
202
+ },
203
+ "local_wikipedia": {
204
+ "label": "Wikipedia本地",
205
+ "qps": 10,
206
+ "limit": null,
207
+ "period": "second",
208
+ "cost_per_call": 0.0,
209
+ "cost_unit": "free",
210
+ "cost_tier": "free",
211
+ "priority": 39
212
+ },
213
+ "local_wiktionary": {
214
+ "label": "Wiktionary本地",
215
+ "qps": 5,
216
+ "limit": null,
217
+ "period": "second",
218
+ "cost_per_call": 0.0,
219
+ "cost_unit": "free",
220
+ "cost_tier": "free",
221
+ "priority": 40
222
+ },
223
+ "local_wikiquote": {
224
+ "label": "Wikiquote本地",
225
+ "qps": 5,
226
+ "limit": null,
227
+ "period": "second",
228
+ "cost_per_call": 0.0,
229
+ "cost_unit": "free",
230
+ "cost_tier": "free",
231
+ "priority": 41
232
+ },
233
+ "local_imdb": {
234
+ "label": "IMDb本地",
235
+ "qps": 2,
236
+ "limit": null,
237
+ "period": "second",
238
+ "cost_per_call": 0.0,
239
+ "cost_unit": "free",
240
+ "cost_tier": "free",
241
+ "priority": 42
242
+ },
243
+ "local_goodreads": {
244
+ "label": "Goodreads本地",
245
+ "qps": 2,
246
+ "limit": null,
247
+ "period": "second",
248
+ "cost_per_call": 0.0,
249
+ "cost_unit": "free",
250
+ "cost_tier": "free",
251
+ "priority": 43
252
+ },
253
+ "local_openstreetmap": {
254
+ "label": "OpenStreetMap本地",
255
+ "qps": 1,
256
+ "limit": null,
257
+ "period": "second",
258
+ "cost_per_call": 0.0,
259
+ "cost_unit": "free",
260
+ "cost_tier": "free",
261
+ "priority": 44
262
+ },
263
+ "anysearch": {
264
+ "label": "AnySearch",
265
+ "qps": 5,
266
+ "limit": null,
267
+ "period": "second",
268
+ "cost_per_call": 0.0,
269
+ "cost_unit": "free",
270
+ "cost_tier": "free",
271
+ "priority": 1
272
+ },
273
+ "byted": {
274
+ "label": "字节搜索",
275
+ "qps": 5,
276
+ "limit": null,
277
+ "period": "second",
278
+ "cost_per_call": 0.0,
279
+ "cost_unit": "free",
280
+ "cost_tier": "low",
281
+ "priority": 2
282
+ },
283
+ "eastmoney": {
284
+ "label": "东财金融",
285
+ "qps": 1,
286
+ "limit": null,
287
+ "period": "second",
288
+ "cost_per_call": 0.0,
289
+ "cost_unit": "free",
290
+ "cost_tier": "free",
291
+ "priority": 3
292
+ },
293
+ "zhihu": {
294
+ "label": "知乎",
295
+ "qps": 2,
296
+ "limit": 1000,
297
+ "period": "day",
298
+ "cost_per_call": 0.0,
299
+ "cost_unit": "free",
300
+ "cost_tier": "free",
301
+ "priority": 4
302
+ },
303
+ "tavily": {
304
+ "label": "Tavily",
305
+ "qps": 1.67,
306
+ "limit": 1000,
307
+ "period": "month",
308
+ "cost_per_call": 0.001,
309
+ "cost_unit": "credit",
310
+ "credits_per_search": 1,
311
+ "cost_tier": "paid",
312
+ "priority": 5
313
+ },
314
+ "wigolo": {
315
+ "label": "Wigolo本地搜索",
316
+ "qps": 10,
317
+ "limit": null,
318
+ "period": "second",
319
+ "cost_per_call": 0.0,
320
+ "cost_unit": "free",
321
+ "cost_tier": "free",
322
+ "priority": 6
323
+ },
324
+ "arxiv": {
325
+ "label": "arXiv学术论文",
326
+ "qps": 1,
327
+ "limit": null,
328
+ "period": "second",
329
+ "cost_per_call": 0.0,
330
+ "cost_unit": "free",
331
+ "cost_tier": "free",
332
+ "priority": 7
333
+ },
334
+ "felo": {
335
+ "label": "Felo AI搜索",
336
+ "qps": 1,
337
+ "limit": null,
338
+ "period": "second",
339
+ "cost_per_call": 0.0,
340
+ "cost_unit": "credit",
341
+ "cost_tier": "paid",
342
+ "priority": 8
343
+ },
344
+ "bocha": {
345
+ "label": "博查搜索",
346
+ "qps": 5,
347
+ "limit": 10000,
348
+ "period": "month",
349
+ "cost_per_call": 0.0001,
350
+ "cost_unit": "credit",
351
+ "credits_per_search": 1,
352
+ "cost_tier": "low",
353
+ "priority": 9
354
+ },
355
+ "semantic_scholar": {
356
+ "label": "Semantic Scholar",
357
+ "qps": 2,
358
+ "limit": null,
359
+ "period": "second",
360
+ "cost_per_call": 0.0,
361
+ "cost_unit": "free",
362
+ "cost_tier": "free",
363
+ "priority": 10
364
+ },
365
+ "github": {
366
+ "label": "GitHub",
367
+ "qps": 5,
368
+ "limit": 1000,
369
+ "period": "day",
370
+ "cost_per_call": 0.0,
371
+ "cost_unit": "free",
372
+ "cost_tier": "free",
373
+ "priority": 11
374
+ },
375
+ "wikipedia": {
376
+ "label": "Wikipedia",
377
+ "qps": 10,
378
+ "limit": null,
379
+ "period": "second",
380
+ "cost_per_call": 0.0,
381
+ "cost_unit": "free",
382
+ "cost_tier": "free",
383
+ "priority": 12
384
+ },
385
+ "duckduckgo": {
386
+ "label": "DuckDuckGo",
387
+ "qps": 5,
388
+ "limit": null,
389
+ "period": "second",
390
+ "cost_per_call": 0.0,
391
+ "cost_unit": "free",
392
+ "cost_tier": "free",
393
+ "priority": 13
394
+ }
395
+ }
package/bin/argo.js ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * argo-mcp — 47-engine unified search MCP server
4
+ *
5
+ * Node.js entry point. Spawns the Python MCP server and transparently
6
+ * proxies stdin/stdout, giving Electron-based MCP clients (Grok, Kimi Code,
7
+ * Codex, etc.) a reliable Node.js process to manage.
8
+ *
9
+ * Usage: npx argo-mcp
10
+ * argo-mcp (after npm link or global install)
11
+ */
12
+
13
+ const { spawn } = require('child_process');
14
+ const path = require('path');
15
+ const fs = require('fs');
16
+ const os = require('os');
17
+
18
+ const LOG = path.join(os.homedir(), '.kimi', 'argo_diag.log');
19
+ fs.mkdirSync(path.dirname(LOG), { recursive: true });
20
+ fs.appendFileSync(LOG, `=== NODE PID=${process.pid} START ${new Date().toTimeString().split(' ')[0]} ===\n`);
21
+ fs.appendFileSync(LOG, `node: ${process.execPath}\n`);
22
+ fs.appendFileSync(LOG, `cwd: ${process.cwd()}\n`);
23
+ fs.appendFileSync(LOG, `PATH: ${(process.env.PATH || '').slice(0,200)}\n`);
24
+
25
+ const PYTHON = '/usr/bin/python3';
26
+ const SCRIPT = path.join(__dirname, '..', 'scripts', 'mcp_server.py');
27
+
28
+ fs.appendFileSync(LOG, `spawning: ${PYTHON} ${SCRIPT}\n`);
29
+
30
+ const proc = spawn(PYTHON, [SCRIPT], {
31
+ stdio: ['pipe', 'pipe', 'inherit'],
32
+ env: { ...process.env }
33
+ });
34
+
35
+ proc.on('error', (err) => {
36
+ fs.appendFileSync(LOG, `ERROR spawn: ${err.message}\n`);
37
+ console.error(`argo-mcp: failed to start Python server: ${err.message}`);
38
+ process.exit(1);
39
+ });
40
+
41
+ proc.on('exit', (code, signal) => {
42
+ fs.appendFileSync(LOG, `Python exited: code=${code} signal=${signal}\n`);
43
+ if (signal) {
44
+ process.exit(128 + (signal === 'SIGTERM' ? 15 : signal === 'SIGINT' ? 2 : 1));
45
+ }
46
+ process.exit(code || 0);
47
+ });
48
+
49
+ fs.appendFileSync(LOG, `Python PID=${proc.pid} spawned, proxying stdio\n`);
50
+
51
+ // Forward termination signals
52
+ process.on('SIGTERM', () => proc.kill('SIGTERM'));
53
+ process.on('SIGINT', () => proc.kill('SIGINT'));
54
+ process.on('SIGHUP', () => proc.kill('SIGHUP'));