@qzhike/agent-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.
- package/LICENSE +21 -0
- package/README.md +123 -0
- package/dist/adapters/brave-config.js +46 -0
- package/dist/adapters/brave.js +83 -0
- package/dist/adapters/deeproute-mirror.js +31 -0
- package/dist/adapters/exa-config.js +35 -0
- package/dist/adapters/exa.js +91 -0
- package/dist/adapters/jina-config.js +102 -0
- package/dist/adapters/jina-reader.js +83 -0
- package/dist/adapters/jina.js +90 -0
- package/dist/adapters/kimi.js +196 -0
- package/dist/adapters/metaso-config.js +35 -0
- package/dist/adapters/metaso.js +102 -0
- package/dist/adapters/minimax-config.js +54 -0
- package/dist/adapters/minimax.js +85 -0
- package/dist/adapters/provider-auth.js +18 -0
- package/dist/adapters/ragflow-config.js +63 -0
- package/dist/adapters/ragflow.js +170 -0
- package/dist/adapters/searxng-config.js +40 -0
- package/dist/adapters/searxng.js +86 -0
- package/dist/adapters/serper-config.js +35 -0
- package/dist/adapters/serper.js +80 -0
- package/dist/adapters/tavily-config.js +46 -0
- package/dist/adapters/tavily.js +98 -0
- package/dist/adapters/zai-config.js +39 -0
- package/dist/adapters/zai.js +91 -0
- package/dist/config-schema.js +221 -0
- package/dist/http.js +49 -0
- package/dist/index.js +84 -0
- package/dist/plugin-meta.js +11 -0
- package/dist/read-url.js +38 -0
- package/dist/result.js +326 -0
- package/dist/run-provider.js +42 -0
- package/dist/search-concurrent.js +23 -0
- package/dist/search-fallback.js +14 -0
- package/dist/search.js +43 -0
- package/dist/types.js +2 -0
- package/openclaw.plugin.json +547 -0
- package/package.json +25 -0
- package/skills/qzhike-agent-search/SKILL.md +90 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qzhike-agent-search",
|
|
3
|
+
"name": "Qzhike Agent Search",
|
|
4
|
+
"description": "Multi-backend search (RAGFlow KB, Serper, Metaso, Zhipu, Exa, SearXNG, Kimi, Brave, Tavily, Jina, MiniMax) with fallback/concurrent modes, plus Jina Reader URL fetch. DeepRoute mirror support.",
|
|
5
|
+
"version": "1.0.1",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"searchMode": {
|
|
10
|
+
"anyOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string",
|
|
13
|
+
"const": "fallback"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "string",
|
|
17
|
+
"const": "concurrent"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"description": "Search strategy: \"fallback\" = linear try order; \"concurrent\" = parallel calls. Default fallback."
|
|
21
|
+
},
|
|
22
|
+
"fallback": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"anyOf": [
|
|
26
|
+
{
|
|
27
|
+
"type": "string",
|
|
28
|
+
"const": "ragflow"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "string",
|
|
32
|
+
"const": "serper"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"const": "metaso"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "string",
|
|
40
|
+
"const": "zai"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "string",
|
|
44
|
+
"const": "exa"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "string",
|
|
48
|
+
"const": "searxng"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "string",
|
|
52
|
+
"const": "kimi"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "string",
|
|
56
|
+
"const": "brave"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "string",
|
|
60
|
+
"const": "tavily"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "string",
|
|
64
|
+
"const": "jina"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "string",
|
|
68
|
+
"const": "minimax"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"description": "Fallback mode: strict try order. Only listed configured providers run."
|
|
73
|
+
},
|
|
74
|
+
"concurrent": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"anyOf": [
|
|
78
|
+
{
|
|
79
|
+
"type": "string",
|
|
80
|
+
"const": "ragflow"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "string",
|
|
84
|
+
"const": "serper"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "string",
|
|
88
|
+
"const": "metaso"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "string",
|
|
92
|
+
"const": "zai"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "string",
|
|
96
|
+
"const": "exa"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "string",
|
|
100
|
+
"const": "searxng"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "string",
|
|
104
|
+
"const": "kimi"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "string",
|
|
108
|
+
"const": "brave"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "string",
|
|
112
|
+
"const": "tavily"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "string",
|
|
116
|
+
"const": "jina"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "string",
|
|
120
|
+
"const": "minimax"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"description": "Concurrent mode: providers to call in parallel (capped by concurrentMaxProviders)."
|
|
125
|
+
},
|
|
126
|
+
"concurrentMaxProviders": {
|
|
127
|
+
"type": "number",
|
|
128
|
+
"description": "Max parallel providers in concurrent mode (1-10). Default 3.",
|
|
129
|
+
"minimum": 1,
|
|
130
|
+
"maximum": 10
|
|
131
|
+
},
|
|
132
|
+
"timeoutSeconds": {
|
|
133
|
+
"type": "number",
|
|
134
|
+
"description": "HTTP timeout per request (seconds).",
|
|
135
|
+
"minimum": 1,
|
|
136
|
+
"maximum": 120
|
|
137
|
+
},
|
|
138
|
+
"maxResults": {
|
|
139
|
+
"type": "number",
|
|
140
|
+
"description": "Default max structured results (1-10).",
|
|
141
|
+
"minimum": 1,
|
|
142
|
+
"maximum": 10
|
|
143
|
+
},
|
|
144
|
+
"providers": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"ragflow": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"enabled": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
153
|
+
},
|
|
154
|
+
"auth": {
|
|
155
|
+
"anyOf": [
|
|
156
|
+
{
|
|
157
|
+
"type": "string",
|
|
158
|
+
"const": "direct"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "string",
|
|
162
|
+
"const": "deeproute"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"description": "direct: Bearer RAGFlow API key + datasetIds in config. deeproute: Bearer user sk; Console injects RAGFlow key and dataset_ids."
|
|
166
|
+
},
|
|
167
|
+
"baseUrl": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "direct: RAGFlow service root. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
170
|
+
},
|
|
171
|
+
"apiKey": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"description": "direct: RAGFlow API key. deeproute: New API user sk (Console injects RAGFlow key)."
|
|
174
|
+
},
|
|
175
|
+
"datasetIds": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "direct only: comma-separated RAGFlow dataset IDs (deeproute: configured in Console 扩展服务)."
|
|
178
|
+
},
|
|
179
|
+
"similarityThreshold": {
|
|
180
|
+
"type": "number",
|
|
181
|
+
"description": "RAGFlow similarity_threshold, default 0.2."
|
|
182
|
+
},
|
|
183
|
+
"pageSize": {
|
|
184
|
+
"type": "number",
|
|
185
|
+
"description": "RAGFlow page_size, default 30."
|
|
186
|
+
},
|
|
187
|
+
"topK": {
|
|
188
|
+
"type": "number",
|
|
189
|
+
"description": "RAGFlow top_k."
|
|
190
|
+
},
|
|
191
|
+
"timeoutSeconds": {
|
|
192
|
+
"type": "number",
|
|
193
|
+
"description": "RAGFlow HTTP timeout (seconds), default 120, max 120.",
|
|
194
|
+
"minimum": 1,
|
|
195
|
+
"maximum": 120
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"serper": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"enabled": {
|
|
203
|
+
"type": "boolean",
|
|
204
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
205
|
+
},
|
|
206
|
+
"auth": {
|
|
207
|
+
"anyOf": [
|
|
208
|
+
{
|
|
209
|
+
"type": "string",
|
|
210
|
+
"const": "direct"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "string",
|
|
214
|
+
"const": "deeproute"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"description": "direct: X-API-KEY to google.serper.dev. deeproute: Bearer user sk; Console injects Serper key."
|
|
218
|
+
},
|
|
219
|
+
"apiKey": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "direct: Serper API key. deeproute: New API user sk (Console injects Serper key)."
|
|
222
|
+
},
|
|
223
|
+
"baseUrl": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "direct: default https://google.serper.dev. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"metaso": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"properties": {
|
|
232
|
+
"enabled": {
|
|
233
|
+
"type": "boolean",
|
|
234
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
235
|
+
},
|
|
236
|
+
"auth": {
|
|
237
|
+
"anyOf": [
|
|
238
|
+
{
|
|
239
|
+
"type": "string",
|
|
240
|
+
"const": "direct"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "string",
|
|
244
|
+
"const": "deeproute"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"description": "direct: Bearer Metaso key. deeproute: Bearer user sk; Console injects Metaso key."
|
|
248
|
+
},
|
|
249
|
+
"apiKey": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "direct: Metaso API key. deeproute: New API user sk (Console injects Metaso key)."
|
|
252
|
+
},
|
|
253
|
+
"baseUrl": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "direct: default https://metaso.cn. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"zai": {
|
|
260
|
+
"type": "object",
|
|
261
|
+
"properties": {
|
|
262
|
+
"enabled": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
265
|
+
},
|
|
266
|
+
"auth": {
|
|
267
|
+
"anyOf": [
|
|
268
|
+
{
|
|
269
|
+
"type": "string",
|
|
270
|
+
"const": "direct"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "string",
|
|
274
|
+
"const": "deeproute"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"description": "direct: Bearer Zhipu key. deeproute: Bearer user sk; Console injects Zhipu key."
|
|
278
|
+
},
|
|
279
|
+
"apiKey": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "direct: Zhipu API key. deeproute: New API user sk (Console injects Zhipu key)."
|
|
282
|
+
},
|
|
283
|
+
"baseUrl": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"description": "direct: default https://open.bigmodel.cn. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
286
|
+
},
|
|
287
|
+
"searchEngine": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "Zhipu search_engine parameter, default \"search_pro\"."
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"exa": {
|
|
294
|
+
"type": "object",
|
|
295
|
+
"properties": {
|
|
296
|
+
"enabled": {
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
299
|
+
},
|
|
300
|
+
"auth": {
|
|
301
|
+
"anyOf": [
|
|
302
|
+
{
|
|
303
|
+
"type": "string",
|
|
304
|
+
"const": "direct"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"type": "string",
|
|
308
|
+
"const": "deeproute"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"description": "direct: x-api-key to api.exa.ai. deeproute: Bearer user sk; Console injects Exa key."
|
|
312
|
+
},
|
|
313
|
+
"apiKey": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"description": "direct: Exa API key. deeproute: New API user sk (Console injects Exa key)."
|
|
316
|
+
},
|
|
317
|
+
"baseUrl": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"description": "direct: default https://api.exa.ai. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"searxng": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": {
|
|
326
|
+
"enabled": {
|
|
327
|
+
"type": "boolean",
|
|
328
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
329
|
+
},
|
|
330
|
+
"auth": {
|
|
331
|
+
"anyOf": [
|
|
332
|
+
{
|
|
333
|
+
"type": "string",
|
|
334
|
+
"const": "direct"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"type": "string",
|
|
338
|
+
"const": "deeproute"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"description": "direct: SearXNG instance baseUrl. deeproute: Bearer sk to Console /api/mirror/searxng."
|
|
342
|
+
},
|
|
343
|
+
"baseUrl": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "direct: SearXNG root, e.g. http://127.0.0.1:8888. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
346
|
+
},
|
|
347
|
+
"apiKey": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "deeproute only: New API user sk (Bearer)."
|
|
350
|
+
},
|
|
351
|
+
"categories": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "SearXNG categories, e.g. general"
|
|
354
|
+
},
|
|
355
|
+
"language": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "SearXNG language code"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"kimi": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"enabled": {
|
|
365
|
+
"type": "boolean",
|
|
366
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
367
|
+
},
|
|
368
|
+
"baseUrl": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"description": "OpenAI-compatible base URL, e.g. https://new-api.example.com/v1 (New API)."
|
|
371
|
+
},
|
|
372
|
+
"apiKey": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"description": "Bearer token for Authorization header (required to enable)."
|
|
375
|
+
},
|
|
376
|
+
"model": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"description": "Model id for chat/completions, default kimi-k2.6"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"brave": {
|
|
383
|
+
"type": "object",
|
|
384
|
+
"properties": {
|
|
385
|
+
"enabled": {
|
|
386
|
+
"type": "boolean",
|
|
387
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
388
|
+
},
|
|
389
|
+
"auth": {
|
|
390
|
+
"anyOf": [
|
|
391
|
+
{
|
|
392
|
+
"type": "string",
|
|
393
|
+
"const": "direct"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"type": "string",
|
|
397
|
+
"const": "deeproute"
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
"description": "direct: Brave X-Subscription-Token (default). deeproute: Bearer user sk to Console /api/mirror/brave."
|
|
401
|
+
},
|
|
402
|
+
"apiKey": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"description": "direct: Brave subscription token. deeproute: New API user sk (Console injects Brave key)."
|
|
405
|
+
},
|
|
406
|
+
"baseUrl": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"description": "direct: default https://api.search.brave.com. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
409
|
+
},
|
|
410
|
+
"country": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"description": "Brave country filter (ISO 3166-1 alpha-2), e.g. US."
|
|
413
|
+
},
|
|
414
|
+
"freshness": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"description": "Brave result freshness: \"pd\" (day), \"pw\", \"pm\", or \"py\"."
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"tavily": {
|
|
421
|
+
"type": "object",
|
|
422
|
+
"properties": {
|
|
423
|
+
"enabled": {
|
|
424
|
+
"type": "boolean",
|
|
425
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
426
|
+
},
|
|
427
|
+
"auth": {
|
|
428
|
+
"anyOf": [
|
|
429
|
+
{
|
|
430
|
+
"type": "string",
|
|
431
|
+
"const": "direct"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"type": "string",
|
|
435
|
+
"const": "deeproute"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"description": "direct: Tavily api_key in POST body. deeproute: Bearer sk; Console injects Tavily key."
|
|
439
|
+
},
|
|
440
|
+
"apiKey": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"description": "direct: Tavily API key. deeproute: New API user sk (Console injects Tavily key)."
|
|
443
|
+
},
|
|
444
|
+
"baseUrl": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"description": "direct: default https://api.tavily.com. deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work."
|
|
447
|
+
},
|
|
448
|
+
"searchDepth": {
|
|
449
|
+
"anyOf": [
|
|
450
|
+
{
|
|
451
|
+
"type": "string",
|
|
452
|
+
"const": "basic"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"type": "string",
|
|
456
|
+
"const": "advanced"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"description": "Tavily search depth."
|
|
460
|
+
},
|
|
461
|
+
"includeAnswer": {
|
|
462
|
+
"type": "boolean",
|
|
463
|
+
"description": "Include Tavily synthesized answer when available."
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"jina": {
|
|
468
|
+
"type": "object",
|
|
469
|
+
"properties": {
|
|
470
|
+
"enabled": {
|
|
471
|
+
"type": "boolean",
|
|
472
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
473
|
+
},
|
|
474
|
+
"auth": {
|
|
475
|
+
"anyOf": [
|
|
476
|
+
{
|
|
477
|
+
"type": "string",
|
|
478
|
+
"const": "direct"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"type": "string",
|
|
482
|
+
"const": "deeproute"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"description": "direct: POST https://s.jina.ai/ with Jina API key. deeproute: POST {baseUrl}/mirror/jina/s with user sk; Console must store valid Jina API key."
|
|
486
|
+
},
|
|
487
|
+
"apiKey": {
|
|
488
|
+
"type": "string",
|
|
489
|
+
"description": "direct: Jina API key (required). deeproute: New API user sk; vendor Jina key must be in Console 扩展服务."
|
|
490
|
+
},
|
|
491
|
+
"baseUrl": {
|
|
492
|
+
"type": "string",
|
|
493
|
+
"description": "deeproute: deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work. direct: default https://s.jina.ai."
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"minimax": {
|
|
498
|
+
"type": "object",
|
|
499
|
+
"properties": {
|
|
500
|
+
"enabled": {
|
|
501
|
+
"type": "boolean",
|
|
502
|
+
"description": "Set false to disable a configured provider. Omitted providers are disabled."
|
|
503
|
+
},
|
|
504
|
+
"auth": {
|
|
505
|
+
"anyOf": [
|
|
506
|
+
{
|
|
507
|
+
"type": "string",
|
|
508
|
+
"const": "direct"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"type": "string",
|
|
512
|
+
"const": "deeproute"
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"description": "direct: Bearer Token Plan key. deeproute: Bearer user sk; Console injects minimax key and region."
|
|
516
|
+
},
|
|
517
|
+
"apiKey": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"description": "direct: MiniMax Token Plan key. deeproute: New API user sk (Console injects minimax credentials)."
|
|
520
|
+
},
|
|
521
|
+
"baseUrl": {
|
|
522
|
+
"type": "string",
|
|
523
|
+
"description": "deeproute: deeproute: Console API origin only (e.g. http://host:20316); plugin appends /api/mirror/{provider}. Legacy full mirror paths still work. direct: api.minimax.io or api.minimaxi.com."
|
|
524
|
+
},
|
|
525
|
+
"region": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"description": "direct only: \"global\" (default) or \"cn\" for upstream host."
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"activation": {
|
|
536
|
+
"onStartup": true
|
|
537
|
+
},
|
|
538
|
+
"skills": [
|
|
539
|
+
"skills/qzhike-agent-search"
|
|
540
|
+
],
|
|
541
|
+
"contracts": {
|
|
542
|
+
"tools": [
|
|
543
|
+
"qzhike_search",
|
|
544
|
+
"qzhike_read_url"
|
|
545
|
+
]
|
|
546
|
+
}
|
|
547
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qzhike/agent-search",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Agent search plugin (OpenClaw-first): multi-backend search with RAGFlow KB, fallback/concurrent modes, Jina Reader read URL, and DeepRoute mirror support.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"typebox": "^1.1.38"
|
|
10
|
+
},
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"openclaw": ">=2026.5.17"
|
|
13
|
+
},
|
|
14
|
+
"openclaw": {
|
|
15
|
+
"extensions": [
|
|
16
|
+
"./dist/index.js"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qzhike-agent-search
|
|
3
|
+
description: >-
|
|
4
|
+
检索与读页编排:组织内知识库(RAGFlow)优先,公网多后端 fallback/concurrent,
|
|
5
|
+
已有 URL 用 Jina Reader 读全文。原生工具 qzhike_search、qzhike_read_url;
|
|
6
|
+
安装本插件后禁用 web_search。
|
|
7
|
+
metadata: {"openclaw":{}}
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
> **本 Skill 随 npm 插件 `@qzhike/agent-search` 交付**:在 **`openclaw.plugin.json`** 中声明 **`skills/qzhike-agent-search`**,启用插件后 Gateway 自动加载(无需 symlink 到 **`~/.openclaw/skills/`**)。
|
|
11
|
+
> 安装与配置见包内 **`README.md`**;插件 config 路径:**`plugins.entries.qzhike-agent-search.config`**。
|
|
12
|
+
|
|
13
|
+
# 检索与读页工作流(原生工具)
|
|
14
|
+
|
|
15
|
+
## 何时用哪个工具
|
|
16
|
+
|
|
17
|
+
| 用户意图 | 工具 | 说明 |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| 组织内文档、知识库、法规/内部资料 | **`qzhike_search`** | 配置中将 **`ragflow`** 置于 **`fallback`** 首位或 **`concurrent`** 列表 |
|
|
20
|
+
| 公网新闻、技术资料、开放信息 | **`qzhike_search`** | 使用 brave / tavily / searxng / kimi 等已配置 provider |
|
|
21
|
+
| 搜索结果或用户给出的链接需要全文 | **`qzhike_read_url`** | Jina Reader;**不要**用 search 代替读页 |
|
|
22
|
+
| 仅有一个明确 URL | **`qzhike_read_url`** | 直接读 URL |
|
|
23
|
+
|
|
24
|
+
**禁止**:在本插件已启用且 `tools.deny` 含 **`web_search`** 时,仍调用内置 **`web_search`**。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Agent 必须遵守的顺序
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
收到问题
|
|
32
|
+
│
|
|
33
|
+
├─ 用户已给出 URL 且只需全文?
|
|
34
|
+
│ └─ 是 → qzhike_read_url({ url })
|
|
35
|
+
│
|
|
36
|
+
├─ 需要检索(含知识库 / 公网)?
|
|
37
|
+
│ └─ 是 → qzhike_search({ query: 用户完整原话或精炼检索词 })
|
|
38
|
+
│ ├─ 组织内 / 合规 / 内部文档优先:fallback 中 ragflow 在前
|
|
39
|
+
│ ├─ 单次可指定 provider: "ragflow" 等强制 backend
|
|
40
|
+
│ └─ 若返回 attempts 全失败 → 告知用户并引用 attempts 中的 error
|
|
41
|
+
│
|
|
42
|
+
└─ 从 search 结果中选出需精读的 URL
|
|
43
|
+
└─ qzhike_read_url({ url })(按需,勿一次读过多链接)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 与 `qzhike_search` 编排模式
|
|
47
|
+
|
|
48
|
+
- **`fallback`**(默认):按 config 中 **`fallback`** 顺序线性尝试,首个成功即返回。
|
|
49
|
+
- **`concurrent`**:并行调用 **`concurrent`** 列表中的 provider,合并去重结果。
|
|
50
|
+
- 单次调用可用参数 **`searchMode`** / **`provider`** 覆盖 config。
|
|
51
|
+
|
|
52
|
+
**RAGFlow**:是 **`qzhike_search`** 的一个 provider,**不是**独立工具;deeproute 模式下 **`dataset_ids`** 由 DeepRoute Console 注入,插件 config **勿写** `datasetIds`。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 与 `TOOLS.md` 配合
|
|
57
|
+
|
|
58
|
+
在 **`~/.openclaw/workspace/TOOLS.md`** 可写入例如:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## 检索
|
|
62
|
+
- 凡需查资料、知识库、公网信息:第一条检索工具必须是 `qzhike_search`。
|
|
63
|
+
- 已有 URL 需全文:使用 `qzhike_read_url`。
|
|
64
|
+
- 勿使用 `web_search`(已由配置 deny)。
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Skill 管流程与工具选择;TOOLS.md 强化调用顺序。
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 输出与引用
|
|
72
|
+
|
|
73
|
+
- **`qzhike_search`** 成功时返回 **`results`**、**`content`**、**`citations`**(视 provider 而定);正文来自 **`externalContent`**(**`untrusted: true`**),引用时说明来源 provider / URL。
|
|
74
|
+
- **`qzhike_read_url`** 返回 **`content`**(Markdown 正文)与 **`title`**。
|
|
75
|
+
- 工具失败时阅读 **`error`** / **`message`** / **`attempts`**,勿编造检索结果。
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 禁止事项
|
|
80
|
+
|
|
81
|
+
- 跳过已配置的 **`qzhike_search`** 链,直接凭模型常识充当检索结果。
|
|
82
|
+
- 用 **`qzhike_search` + provider jina** 代替 **`qzhike_read_url`** 读单一 URL 全文(职责不同)。
|
|
83
|
+
- 重复 symlink 同名 Skill 到 **`~/.openclaw/skills/qzhike-agent-search`**(与 bundled Skill 冲突)。
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 延伸阅读
|
|
88
|
+
|
|
89
|
+
- 包内 **`README.md`**:安装、DeepRoute 扩展服务映射、配置示例。
|
|
90
|
+
- 仓库 **`examples/openclaw.config.json5`**:完整 fallback / concurrent 与全 provider 模板。
|