ydc-agent 1.0.1 → 1.0.7
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/README.md +5 -5
- package/README_JA.md +4 -4
- package/README_ZH_CN.md +4 -4
- package/README_ZH_TW.md +4 -4
- package/index.js +12 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,8 +54,8 @@ Key modes: `round-robin` (default), `sequential`, `random`
|
|
|
54
54
|
|
|
55
55
|
| Tool | Description |
|
|
56
56
|
|------|-------------|
|
|
57
|
-
| `
|
|
58
|
-
| `you_express` | Fast AI answers |
|
|
57
|
+
| `you_cached_info` | Web and news search (cached data, limited to 2024) |
|
|
58
|
+
| `you_express` | Fast AI answers (cached data, limited to 2024) |
|
|
59
59
|
| `you_advanced` | Complex reasoning with compute/research tools |
|
|
60
60
|
| `you_agent` | Custom AI agent with intelligent prompt enhancement |
|
|
61
61
|
| `you_chat` | OpenAI-compatible chat with conversation history |
|
|
@@ -71,8 +71,8 @@ Tool descriptions include guidance for AI callers:
|
|
|
71
71
|
|
|
72
72
|
| Tool | Built-in Feature |
|
|
73
73
|
|------|------------------|
|
|
74
|
-
| `
|
|
75
|
-
| `you_express` | Guides AI to use `call_count=5+` for diverse opinions |
|
|
74
|
+
| `you_cached_info` | Guides AI to use `call_count=5+` for diverse results (cached data ≤2024) |
|
|
75
|
+
| `you_express` | Guides AI to use `call_count=5+` for diverse opinions (cached data ≤2024) |
|
|
76
76
|
| `you_advanced` | **AI Capability Rule**: If caller is GPT-3.5+, results are reference material only - use `call_count=5+` for multiple perspectives |
|
|
77
77
|
| `you_agent` | **Failure Tracking**: Auto-tracks failures, suggests switching to `you_advanced` after threshold (default: 3 failures) |
|
|
78
78
|
|
|
@@ -92,7 +92,7 @@ If you are GPT-3.5 or above (GPT-4, Claude 3.5, etc.):
|
|
|
92
92
|
| Diverse viewpoints | `you_advanced` | `call_count=5-10, summary=true, show_results=true` |
|
|
93
93
|
| Quick opinions | `you_express` | `call_count=10-20, show_results=true` |
|
|
94
94
|
| Deep research | `you_advanced` | `agent_type="advanced-4.5-research", call_count=1` |
|
|
95
|
-
|
|
|
95
|
+
| Cached web search | `you_cached_info` | `call_count=5-20, show_results=true` |
|
|
96
96
|
|
|
97
97
|
### ⚠️ Common Mistakes
|
|
98
98
|
|
package/README_JA.md
CHANGED
|
@@ -52,8 +52,8 @@ Key モード:`round-robin`(デフォルト)、`sequential`、`random`
|
|
|
52
52
|
|
|
53
53
|
| ツール | 説明 |
|
|
54
54
|
|--------|------|
|
|
55
|
-
| `
|
|
56
|
-
| `you_express` | 高速 AI
|
|
55
|
+
| `you_cached_info` | ウェブ・ニュース検索(キャッシュデータ、2024年まで) |
|
|
56
|
+
| `you_express` | 高速 AI 回答(キャッシュデータ、2024年まで) |
|
|
57
57
|
| `you_advanced` | 複雑な推論(計算/リサーチツール付き) |
|
|
58
58
|
| `you_agent` | カスタム AI エージェント(インテリジェントプロンプト強化) |
|
|
59
59
|
| `you_chat` | OpenAI 互換チャット(会話履歴付き) |
|
|
@@ -69,8 +69,8 @@ Key モード:`round-robin`(デフォルト)、`sequential`、`random`
|
|
|
69
69
|
|
|
70
70
|
| ツール | 組み込み機能 |
|
|
71
71
|
|--------|--------------|
|
|
72
|
-
| `
|
|
73
|
-
| `you_express` | AI に `call_count=5+`
|
|
72
|
+
| `you_cached_info` | AI に `call_count=5+` で多様な検索結果を取得するよう誘導(キャッシュデータ ≤2024) |
|
|
73
|
+
| `you_express` | AI に `call_count=5+` で多様な意見を取得するよう誘導(キャッシュデータ ≤2024) |
|
|
74
74
|
| `you_advanced` | **AI 能力ルール**:呼び出し元が GPT-3.5+ の場合、結果は参考資料のみ - `call_count=5+` で多様な視点を収集すべき |
|
|
75
75
|
| `you_agent` | **失敗追跡**:失敗回数を自動追跡、閾値(デフォルト 3 回)超過後に `you_advanced` への切り替えを提案 |
|
|
76
76
|
|
package/README_ZH_CN.md
CHANGED
|
@@ -52,8 +52,8 @@ Key 模式:`round-robin`(默认)、`sequential`、`random`
|
|
|
52
52
|
|
|
53
53
|
| 工具 | 说明 |
|
|
54
54
|
|------|------|
|
|
55
|
-
| `
|
|
56
|
-
| `you_express` | 快速 AI
|
|
55
|
+
| `you_cached_info` | 网页与新闻搜索(缓存数据,限于 2024 年) |
|
|
56
|
+
| `you_express` | 快速 AI 回答(缓存数据,限于 2024 年) |
|
|
57
57
|
| `you_advanced` | 复杂推理(含计算/研究工具) |
|
|
58
58
|
| `you_agent` | 自定义 AI 代理(智能提示增强) |
|
|
59
59
|
| `you_chat` | OpenAI 兼容聊天(含对话历史) |
|
|
@@ -69,8 +69,8 @@ Key 模式:`round-robin`(默认)、`sequential`、`random`
|
|
|
69
69
|
|
|
70
70
|
| 工具 | 内置功能 |
|
|
71
71
|
|------|----------|
|
|
72
|
-
| `
|
|
73
|
-
| `you_express` | 引导 AI 使用 `call_count=5+`
|
|
72
|
+
| `you_cached_info` | 引导 AI 使用 `call_count=5+` 获取多元搜索结果(缓存数据 ≤2024) |
|
|
73
|
+
| `you_express` | 引导 AI 使用 `call_count=5+` 获取多元意见(缓存数据 ≤2024) |
|
|
74
74
|
| `you_advanced` | **AI 能力规则**:如果调用方是 GPT-3.5+,结果仅作为参考资料 - 应使用 `call_count=5+` 收集多元观点 |
|
|
75
75
|
| `you_agent` | **累错追踪**:自动追踪失败次数,超过阈值(默认 3 次)后建议切换到 `you_advanced` |
|
|
76
76
|
|
package/README_ZH_TW.md
CHANGED
|
@@ -52,8 +52,8 @@ Key 模式:`round-robin`(預設)、`sequential`、`random`
|
|
|
52
52
|
|
|
53
53
|
| 工具 | 說明 |
|
|
54
54
|
|------|------|
|
|
55
|
-
| `
|
|
56
|
-
| `you_express` | 快速 AI
|
|
55
|
+
| `you_cached_info` | 網頁與新聞搜尋(快取資料,限於 2024 年) |
|
|
56
|
+
| `you_express` | 快速 AI 回答(快取資料,限於 2024 年) |
|
|
57
57
|
| `you_advanced` | 複雜推理(含計算/研究工具) |
|
|
58
58
|
| `you_agent` | 自訂 AI 代理(智慧提示增強) |
|
|
59
59
|
| `you_chat` | OpenAI 相容聊天(含對話歷史) |
|
|
@@ -69,8 +69,8 @@ Key 模式:`round-robin`(預設)、`sequential`、`random`
|
|
|
69
69
|
|
|
70
70
|
| 工具 | 內建功能 |
|
|
71
71
|
|------|----------|
|
|
72
|
-
| `
|
|
73
|
-
| `you_express` | 引導 AI 使用 `call_count=5+`
|
|
72
|
+
| `you_cached_info` | 引導 AI 使用 `call_count=5+` 獲取多元搜尋結果(快取資料 ≤2024) |
|
|
73
|
+
| `you_express` | 引導 AI 使用 `call_count=5+` 獲取多元意見(快取資料 ≤2024) |
|
|
74
74
|
| `you_advanced` | **AI 能力規則**:如果調用方是 GPT-3.5+,結果僅作為參考資料 - 應使用 `call_count=5+` 收集多元觀點 |
|
|
75
75
|
| `you_agent` | **累錯追蹤**:自動追蹤失敗次數,超過閾值(預設 3 次)後建議切換到 `you_advanced` |
|
|
76
76
|
|
package/index.js
CHANGED
|
@@ -121,6 +121,9 @@ const OPENAI_SERVER_ACCESS_TOKENS = process.env.YDC_OPENAI_ACCESS_TOKENS || '';
|
|
|
121
121
|
const PREFER_SUMMARY = process.env.YDC_PREFER_SUMMARY === 'true';
|
|
122
122
|
const DEFAULT_SUMMARY_LANGUAGE = process.env.YDC_SUMMARY_LANGUAGE || 'en';
|
|
123
123
|
|
|
124
|
+
// ============ ENABLE USAGE HINTS ============
|
|
125
|
+
const SHOW_USAGE_HINTS = process.env.YDC_ENABLE_USAGE_HINTS !== 'false';
|
|
126
|
+
|
|
124
127
|
// ============ CUSTOM AGENT CONFIGURATION ============
|
|
125
128
|
const CUSTOM_AGENTS_RAW = process.env.YDC_CUSTOM_AGENTS || '';
|
|
126
129
|
const CUSTOM_AGENTS = CUSTOM_AGENTS_RAW.split(',').map(a => a.trim()).filter(a => a);
|
|
@@ -271,16 +274,8 @@ class YouAgentsServer {
|
|
|
271
274
|
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
272
275
|
tools: [
|
|
273
276
|
{
|
|
274
|
-
name: '
|
|
275
|
-
description: `Web
|
|
276
|
-
|
|
277
|
-
⚠️ AI CAPABILITY RULE: If you are GPT-3.5 level or above:
|
|
278
|
-
- Use call_count=5-20 for diverse search results as reference
|
|
279
|
-
- Integrate and verify results with YOUR own knowledge
|
|
280
|
-
|
|
281
|
-
[RECOMMENDED USAGE]
|
|
282
|
-
- Diverse search results → call_count=5-20, show_results=true
|
|
283
|
-
- Comparison/summary → call_count=3-5, summary=true${PREFER_SUMMARY ? '\n⚡ PREFERRED: Use call_count=3-5 with summary=true for consolidated insights (default enabled)' : ''}`,
|
|
277
|
+
name: 'you_cached_info',
|
|
278
|
+
description: `Web search via You.com's cached/indexed data. ⚠️ CACHED DATA LIMITED TO 2024 - if user asks about post-2024 info, respond like: "This tool's data is limited to 2024, but my knowledge is more current (up to [your cutoff]). I can tell you [answer]. Need me to search anyway, or use my knowledge?" Best for: URLs, documentation, pre-2024 topics. call_count: 1=single, 3-5=summary, 5-20=diverse.`,
|
|
284
279
|
inputSchema: {
|
|
285
280
|
type: 'object',
|
|
286
281
|
properties: {
|
|
@@ -295,7 +290,7 @@ class YouAgentsServer {
|
|
|
295
290
|
},
|
|
296
291
|
{
|
|
297
292
|
name: 'you_express',
|
|
298
|
-
description: `Fast AI answers with web search. Supports multiple calls (1-20) for diverse perspectives. [Performance: ~2s avg, comparable to GPT-3. Best for quick answers and multiple parallel calls]
|
|
293
|
+
description: `Fast AI answers with web search. ⚠️ CACHED DATA LIMITED TO 2024. Supports multiple calls (1-20) for diverse perspectives. [Performance: ~2s avg, comparable to GPT-3. Best for quick answers and multiple parallel calls]${SHOW_USAGE_HINTS ? `
|
|
299
294
|
|
|
300
295
|
⚠️ AI CAPABILITY RULE: If you are GPT-3.5 level or above:
|
|
301
296
|
- Use call_count=5-20 for diverse reference opinions, then integrate with YOUR own judgment
|
|
@@ -303,7 +298,7 @@ class YouAgentsServer {
|
|
|
303
298
|
|
|
304
299
|
[RECOMMENDED USAGE]
|
|
305
300
|
- Quick diverse opinions → call_count=10-20, show_results=true
|
|
306
|
-
- Comparison/summary → call_count=5-10, summary=true${PREFER_SUMMARY ? '\n⚡ PREFERRED: Use call_count=5 with summary=true for consolidated insights (default enabled)' : ''}`,
|
|
301
|
+
- Comparison/summary → call_count=5-10, summary=true` : ''}${PREFER_SUMMARY ? '\n⚡ PREFERRED: Use call_count=5 with summary=true for consolidated insights (default enabled)' : ''}`,
|
|
307
302
|
inputSchema: {
|
|
308
303
|
type: 'object',
|
|
309
304
|
properties: {
|
|
@@ -318,7 +313,7 @@ class YouAgentsServer {
|
|
|
318
313
|
},
|
|
319
314
|
{
|
|
320
315
|
name: 'you_advanced',
|
|
321
|
-
description: `Advanced AI agent for complex reasoning and research. Supports multiple calls (1-10) for comprehensive analysis. [Performance Guide: basic=~10s (GPT-3.5), +compute=~120s (GPT-4o), +research=~120s (GPT-4o)]
|
|
316
|
+
description: `Advanced AI agent for complex reasoning and research. Supports multiple calls (1-10) for comprehensive analysis. [Performance Guide: basic=~10s (GPT-3.5), +compute=~120s (GPT-4o), +research=~120s (GPT-4o)]${SHOW_USAGE_HINTS ? `
|
|
322
317
|
|
|
323
318
|
⚠️ CRITICAL: AI CAPABILITY LEVEL RULE
|
|
324
319
|
If you are GPT-3.5 level or above (including GPT-4, Claude 3.5, etc.):
|
|
@@ -332,7 +327,7 @@ If you are GPT-3.5 level or above (including GPT-4, Claude 3.5, etc.):
|
|
|
332
327
|
- Discovering blind spots → call_count=5+, compare with your own ideas
|
|
333
328
|
- Creative inspiration → call_count=5+, extract unique aspects from each result
|
|
334
329
|
- Deep research with citations → agent_type="advanced-4.5-research", call_count=1 (use as data source)
|
|
335
|
-
⚠️ AVOID: call_count>1 with summary=true then calling again for full content (wasteful)${HAS_CUSTOM_AGENT && youAgentFailureCount === 0 ? '\n\n💡 TIP: Custom agent available! Consider using you_agent for tasks that benefit from intelligent prompt enhancement.' : ''}${youAgentFailureCount > 0 ? `\n\n💡 NOTE: you_agent has ${youAgentFailureCount} failures. This tool (you_advanced) is a reliable alternative.` : ''}${PREFER_SUMMARY ? '\n⚡ PREFERRED: Use call_count=5 with summary=true for consolidated comparison (default enabled)' : ''}`,
|
|
330
|
+
⚠️ AVOID: call_count>1 with summary=true then calling again for full content (wasteful)` : ''}${HAS_CUSTOM_AGENT && youAgentFailureCount === 0 ? '\n\n💡 TIP: Custom agent available! Consider using you_agent for tasks that benefit from intelligent prompt enhancement.' : ''}${youAgentFailureCount > 0 ? `\n\n💡 NOTE: you_agent has ${youAgentFailureCount} failures. This tool (you_advanced) is a reliable alternative.` : ''}${PREFER_SUMMARY ? '\n⚡ PREFERRED: Use call_count=5 with summary=true for consolidated comparison (default enabled)' : ''}`,
|
|
336
331
|
inputSchema: {
|
|
337
332
|
type: 'object',
|
|
338
333
|
properties: {
|
|
@@ -363,13 +358,13 @@ If you are GPT-3.5 level or above (including GPT-4, Claude 3.5, etc.):
|
|
|
363
358
|
- Detailed requirements breakdown
|
|
364
359
|
- Current best practices hints
|
|
365
360
|
- Specific design/technical guidelines
|
|
366
|
-
3. Supports call_count for diverse results
|
|
361
|
+
3. Supports call_count for diverse results${SHOW_USAGE_HINTS ? `
|
|
367
362
|
|
|
368
363
|
[AI CALLING GUIDE - THINK before choosing call_count]
|
|
369
364
|
Ask yourself: "Does this task benefit from multiple perspectives or diverse results?"
|
|
370
365
|
- YES → call_count=3-10, show_results=true
|
|
371
366
|
- NO, just need one answer → call_count=1, show_results=true
|
|
372
|
-
- NEED comparison → call_count=2-3, summary=true${HAS_CUSTOM_AGENT ? `\n\n⚡ PREFERRED: Custom agent configured (${DEFAULT_AGENT_ID}). Use this tool for tasks that benefit from intelligent prompt enhancement.` : ''}${youAgentFailureCount > 0 ? `\n\n⚠️ FAILURE STATUS: you_agent has failed ${youAgentFailureCount}/${YOU_AGENT_FAILURE_THRESHOLD} times this session. Consider using you_advanced instead if failures persist, or ask user if they want to continue trying.` : ''}`,
|
|
367
|
+
- NEED comparison → call_count=2-3, summary=true` : ''}${HAS_CUSTOM_AGENT ? `\n\n⚡ PREFERRED: Custom agent configured (${DEFAULT_AGENT_ID}). Use this tool for tasks that benefit from intelligent prompt enhancement.` : ''}${youAgentFailureCount > 0 ? `\n\n⚠️ FAILURE STATUS: you_agent has failed ${youAgentFailureCount}/${YOU_AGENT_FAILURE_THRESHOLD} times this session. Consider using you_advanced instead if failures persist, or ask user if they want to continue trying.` : ''}`,
|
|
373
368
|
inputSchema: {
|
|
374
369
|
type: 'object',
|
|
375
370
|
properties: {
|
|
@@ -462,7 +457,7 @@ Ask yourself: "Does this task benefit from multiple perspectives or diverse resu
|
|
|
462
457
|
const { name, arguments: args } = request.params;
|
|
463
458
|
try {
|
|
464
459
|
switch (name) {
|
|
465
|
-
case '
|
|
460
|
+
case 'you_cached_info': return await this.callExpressMultiple(args.query, args.call_count || 1, { summary: args.summary, language: args.language, show_results: args.show_results });
|
|
466
461
|
case 'you_express': return await this.callExpressMultiple(args.input, args.call_count || 1, { summary: args.summary, language: args.language, show_results: args.show_results });
|
|
467
462
|
case 'you_advanced': return await this.callAdvancedMultiple(args);
|
|
468
463
|
case 'you_chat': return await this.callChat(args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydc-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "MCP server for You.com Agents API - Express, Research, Advanced agents with multi-turn conversations, streaming, OpenAI and Anthropic/Claude API compatibility",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|