converse-mcp-server 2.22.7 → 2.25.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 +18 -18
- package/docs/ALTERNATIVE_PROVIDERS.md +449 -449
- package/docs/API.md +164 -4
- package/docs/ARCHITECTURE.md +551 -551
- package/docs/EXAMPLES.md +98 -0
- package/package.json +13 -13
- package/src/async/asyncJobStore.js +2 -2
- package/src/providers/anthropic.js +35 -4
- package/src/providers/claude.js +1 -1
- package/src/providers/gemini-cli.js +33 -2
- package/src/providers/google.js +26 -0
- package/src/systemPrompts.js +33 -0
- package/src/tools/conversation.js +1217 -0
- package/src/tools/index.js +4 -2
- package/src/utils/formatStatus.js +9 -0
- package/src/utils/modelRouting.js +200 -0
package/docs/EXAMPLES.md
CHANGED
|
@@ -520,6 +520,104 @@ CODEX_SANDBOX_MODE=danger-full-access
|
|
|
520
520
|
}
|
|
521
521
|
```
|
|
522
522
|
|
|
523
|
+
## 🔄 Conversation (Round-Table) Examples
|
|
524
|
+
|
|
525
|
+
The `conversation` tool runs a turn-based round-table: models respond **in the order given**, and each model sees the full running transcript of every turn before it. One call = one lap. Pass the returned `continuation_id` to run another lap; every lap appends to one shared transcript. This differs from `consensus`, where all models answer the same prompt in parallel.
|
|
526
|
+
|
|
527
|
+
### Basic Two-Model Round-Table
|
|
528
|
+
|
|
529
|
+
```json
|
|
530
|
+
{
|
|
531
|
+
"tool": "conversation",
|
|
532
|
+
"arguments": {
|
|
533
|
+
"prompt": "Should we adopt event sourcing for the order service?",
|
|
534
|
+
"models": ["codex", "gemini"]
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
On this lap, `codex` opens, then `gemini` responds having seen codex's turn. The response contains both labeled turns in order plus a `continuation_id`.
|
|
540
|
+
|
|
541
|
+
### Continuing the Round-Table (More Laps)
|
|
542
|
+
|
|
543
|
+
```json
|
|
544
|
+
// Lap 1 returns: "continuation": { "id": "conv_abc123" }
|
|
545
|
+
|
|
546
|
+
// Lap 2 — every model again sees the full accumulated transcript
|
|
547
|
+
{
|
|
548
|
+
"tool": "conversation",
|
|
549
|
+
"arguments": {
|
|
550
|
+
"prompt": "Now focus specifically on the migration path from the current design.",
|
|
551
|
+
"models": ["codex", "gemini"],
|
|
552
|
+
"continuation_id": "conv_abc123"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
You may also change the model list on a resuming lap (e.g. drop a participant or add one); the shared transcript persists regardless of who ran in earlier laps:
|
|
558
|
+
|
|
559
|
+
```json
|
|
560
|
+
{
|
|
561
|
+
"tool": "conversation",
|
|
562
|
+
"arguments": {
|
|
563
|
+
"prompt": "Bring in a third perspective on testability.",
|
|
564
|
+
"models": ["codex", "gemini", "claude"],
|
|
565
|
+
"continuation_id": "conv_abc123"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### Round-Table with Files and a Custom Per-Turn Instruction
|
|
571
|
+
|
|
572
|
+
```json
|
|
573
|
+
{
|
|
574
|
+
"tool": "conversation",
|
|
575
|
+
"arguments": {
|
|
576
|
+
"prompt": "Review this module design and push back on weak assumptions.",
|
|
577
|
+
"models": ["codex", "gemini", "claude"],
|
|
578
|
+
"files": ["/c/Users/username/project/src/orders/design.md"],
|
|
579
|
+
"turn_prompt": "Call out concrete failure modes you would test for."
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### Async Round-Table with Progress Monitoring
|
|
585
|
+
|
|
586
|
+
```json
|
|
587
|
+
{
|
|
588
|
+
"tool": "conversation",
|
|
589
|
+
"arguments": {
|
|
590
|
+
"prompt": "Design a rollout plan for the new pricing engine.",
|
|
591
|
+
"models": ["codex", "gemini", "claude"],
|
|
592
|
+
"async": true
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**Immediate Response:**
|
|
598
|
+
```json
|
|
599
|
+
{
|
|
600
|
+
"content": "⏳ SUBMITTED | CONVERSATION | conv_xyz789 | 1/1 | Started: 01/12/2023 10:30:00 | \"Pricing Engine Rollout\" | codex, gemini, claude",
|
|
601
|
+
"continuation": {
|
|
602
|
+
"id": "conv_xyz789",
|
|
603
|
+
"status": "processing"
|
|
604
|
+
},
|
|
605
|
+
"async_execution": true
|
|
606
|
+
}
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
**Monitor per-turn progress, then read the full transcript on completion:**
|
|
610
|
+
```json
|
|
611
|
+
{
|
|
612
|
+
"tool": "check_status",
|
|
613
|
+
"arguments": {
|
|
614
|
+
"continuation_id": "conv_xyz789"
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
While running, the status line shows turn progress (e.g. `2/3 turns`) and the accumulating transcript. When complete, `check_status` renders the full lap transcript along with the AI-generated title and final summary.
|
|
620
|
+
|
|
523
621
|
## 🖼️ Image Analysis Examples
|
|
524
622
|
|
|
525
623
|
### Screenshot Analysis
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "converse-mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.1",
|
|
4
4
|
"description": "Converse MCP Server - Converse with other LLMs with chat and consensus tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -94,30 +94,30 @@
|
|
|
94
94
|
".env.example"
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@anthropic-ai/claude-agent-sdk": "^0.
|
|
98
|
-
"@anthropic-ai/sdk": "^0.
|
|
97
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.152",
|
|
98
|
+
"@anthropic-ai/sdk": "^0.99.0",
|
|
99
99
|
"@github/copilot-sdk": "^0.3.0",
|
|
100
|
-
"@google/genai": "^
|
|
100
|
+
"@google/genai": "^2.7.0",
|
|
101
101
|
"@mistralai/mistralai": "^2.2.1",
|
|
102
102
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
103
|
-
"@openai/codex-sdk": "^0.
|
|
104
|
-
"ai": "^6.0.
|
|
103
|
+
"@openai/codex-sdk": "^0.133.0",
|
|
104
|
+
"ai": "^6.0.191",
|
|
105
105
|
"ai-sdk-provider-gemini-cli": "^2.0.1",
|
|
106
106
|
"cors": "^2.8.6",
|
|
107
107
|
"dotenv": "^17.4.2",
|
|
108
108
|
"express": "^5.2.1",
|
|
109
|
-
"lru-cache": "^11.
|
|
110
|
-
"nanoid": "^5.1.
|
|
111
|
-
"openai": "^6.
|
|
109
|
+
"lru-cache": "^11.5.0",
|
|
110
|
+
"nanoid": "^5.1.11",
|
|
111
|
+
"openai": "^6.39.0",
|
|
112
112
|
"p-limit": "^7.3.0",
|
|
113
|
-
"vite": "^8.0.
|
|
113
|
+
"vite": "^8.0.14"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@vitest/coverage-v8": "^4.1.
|
|
116
|
+
"@vitest/coverage-v8": "^4.1.7",
|
|
117
117
|
"cross-env": "^10.1.0",
|
|
118
|
-
"eslint": "^10.
|
|
118
|
+
"eslint": "^10.4.0",
|
|
119
119
|
"prettier": "^3.8.3",
|
|
120
120
|
"rimraf": "^6.1.3",
|
|
121
|
-
"vitest": "^4.1.
|
|
121
|
+
"vitest": "^4.1.7"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -167,9 +167,9 @@ class LRUAsyncJobStore extends AsyncJobStoreInterface {
|
|
|
167
167
|
async create(tool, options = {}) {
|
|
168
168
|
try {
|
|
169
169
|
// Validate parameters
|
|
170
|
-
if (!tool || !['chat', 'consensus'].includes(tool)) {
|
|
170
|
+
if (!tool || !['chat', 'consensus', 'conversation'].includes(tool)) {
|
|
171
171
|
throw new AsyncJobStoreError(
|
|
172
|
-
'Invalid tool: must be "chat" or "
|
|
172
|
+
'Invalid tool: must be "chat", "consensus", or "conversation"',
|
|
173
173
|
'INVALID_TOOL',
|
|
174
174
|
);
|
|
175
175
|
}
|
|
@@ -13,6 +13,39 @@ import { ProviderError, ErrorCodes, StopReasons } from './interface.js';
|
|
|
13
13
|
|
|
14
14
|
// Define supported Claude models with their capabilities
|
|
15
15
|
const SUPPORTED_MODELS = {
|
|
16
|
+
'claude-opus-4-8': {
|
|
17
|
+
modelName: 'claude-opus-4-8',
|
|
18
|
+
friendlyName: 'Claude Opus 4.8',
|
|
19
|
+
contextWindow: 200000,
|
|
20
|
+
maxOutputTokens: 128000,
|
|
21
|
+
supportsStreaming: true,
|
|
22
|
+
supportsImages: true,
|
|
23
|
+
supportsTemperature: true,
|
|
24
|
+
supportsWebSearch: false,
|
|
25
|
+
supportsThinking: true,
|
|
26
|
+
supportsAdaptiveThinking: true,
|
|
27
|
+
minThinkingTokens: 1024,
|
|
28
|
+
maxThinkingTokens: 128000,
|
|
29
|
+
timeout: 600000,
|
|
30
|
+
supportsEffort: true,
|
|
31
|
+
effortGA: true,
|
|
32
|
+
supports1MContext: true,
|
|
33
|
+
supportsCompaction: true,
|
|
34
|
+
description:
|
|
35
|
+
'Claude Opus 4.8 - Most capable model for complex reasoning and agentic coding',
|
|
36
|
+
aliases: [
|
|
37
|
+
'claude-opus-4-8',
|
|
38
|
+
'claude-4.8-opus',
|
|
39
|
+
'claude-4-8-opus',
|
|
40
|
+
'opus-4.8',
|
|
41
|
+
'opus-4-8',
|
|
42
|
+
'opus4.8',
|
|
43
|
+
'opus4-8',
|
|
44
|
+
'claude-opus-4.8',
|
|
45
|
+
'opus',
|
|
46
|
+
'claude-opus',
|
|
47
|
+
],
|
|
48
|
+
},
|
|
16
49
|
'claude-opus-4-7': {
|
|
17
50
|
modelName: 'claude-opus-4-7',
|
|
18
51
|
friendlyName: 'Claude Opus 4.7',
|
|
@@ -32,7 +65,7 @@ const SUPPORTED_MODELS = {
|
|
|
32
65
|
supports1MContext: true,
|
|
33
66
|
supportsCompaction: true,
|
|
34
67
|
description:
|
|
35
|
-
'Claude Opus 4.7 -
|
|
68
|
+
'Claude Opus 4.7 - Previous most capable model for complex reasoning and agentic coding',
|
|
36
69
|
aliases: [
|
|
37
70
|
'claude-opus-4-7',
|
|
38
71
|
'claude-4.7-opus',
|
|
@@ -42,8 +75,6 @@ const SUPPORTED_MODELS = {
|
|
|
42
75
|
'opus4.7',
|
|
43
76
|
'opus4-7',
|
|
44
77
|
'claude-opus-4.7',
|
|
45
|
-
'opus',
|
|
46
|
-
'claude-opus',
|
|
47
78
|
],
|
|
48
79
|
},
|
|
49
80
|
'claude-opus-4-6': {
|
|
@@ -243,7 +274,7 @@ const THINKING_BUDGETS = {
|
|
|
243
274
|
};
|
|
244
275
|
|
|
245
276
|
/**
|
|
246
|
-
* Effort parameter mapping for Opus 4.7, Opus 4.6, Sonnet 4.6, and Opus 4.5
|
|
277
|
+
* Effort parameter mapping for Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 4.6, and Opus 4.5
|
|
247
278
|
* Maps reasoning_effort values to Anthropic's effort parameter values
|
|
248
279
|
*/
|
|
249
280
|
const EFFORT_MAP = {
|
package/src/providers/claude.js
CHANGED
|
@@ -223,7 +223,7 @@ async function* createStreamingGenerator(
|
|
|
223
223
|
// Build query options
|
|
224
224
|
// Use higher maxTurns to allow for file reading operations
|
|
225
225
|
const queryOptions = {
|
|
226
|
-
model: 'claude-opus-4-
|
|
226
|
+
model: 'claude-opus-4-8', // Use Opus 4.8 for best quality
|
|
227
227
|
maxTurns: 20, // Allow multiple turns for file operations
|
|
228
228
|
permissionMode: 'bypassPermissions', // Don't prompt for permissions
|
|
229
229
|
};
|
|
@@ -26,6 +26,32 @@ import { ProviderError, ErrorCodes, StopReasons } from './interface.js';
|
|
|
26
26
|
const SUPPORTED_MODELS = {
|
|
27
27
|
gemini: {
|
|
28
28
|
modelName: 'gemini',
|
|
29
|
+
friendlyName: 'Gemini 3.5 Flash (via CLI)',
|
|
30
|
+
contextWindow: 1048576, // 1M tokens
|
|
31
|
+
maxOutputTokens: 65536,
|
|
32
|
+
supportsStreaming: true,
|
|
33
|
+
supportsImages: true, // Base64 only (no URLs)
|
|
34
|
+
supportsTemperature: true,
|
|
35
|
+
supportsThinking: true,
|
|
36
|
+
supportsWebSearch: true,
|
|
37
|
+
timeout: 600000, // 10 minutes
|
|
38
|
+
description:
|
|
39
|
+
'Gemini 3.5 Flash via OAuth - frontier agentic/coding at Flash speed (requires Gemini CLI authentication)',
|
|
40
|
+
aliases: [
|
|
41
|
+
'gemini-cli',
|
|
42
|
+
'gemini-3.5-flash',
|
|
43
|
+
'gemini-3.5',
|
|
44
|
+
'gemini3.5',
|
|
45
|
+
'flash',
|
|
46
|
+
'flash-3.5',
|
|
47
|
+
'gemini-flash',
|
|
48
|
+
'gemini-flash-3.5',
|
|
49
|
+
],
|
|
50
|
+
// Internal SDK model name passed to the Google Cloud Code endpoint
|
|
51
|
+
sdkModelName: 'gemini-3.5-flash',
|
|
52
|
+
},
|
|
53
|
+
'gemini-3.1-pro-preview': {
|
|
54
|
+
modelName: 'gemini-3.1-pro-preview',
|
|
29
55
|
friendlyName: 'Gemini 3.1 Pro Preview (via CLI)',
|
|
30
56
|
contextWindow: 1048576, // 1M tokens
|
|
31
57
|
maxOutputTokens: 64000,
|
|
@@ -37,8 +63,13 @@ const SUPPORTED_MODELS = {
|
|
|
37
63
|
timeout: 600000, // 10 minutes
|
|
38
64
|
description:
|
|
39
65
|
'Gemini 3.1 Pro Preview via OAuth - requires Gemini CLI authentication',
|
|
40
|
-
aliases: [
|
|
41
|
-
|
|
66
|
+
aliases: [
|
|
67
|
+
'gemini-3.1-pro',
|
|
68
|
+
'gemini-3.1',
|
|
69
|
+
'gemini-pro',
|
|
70
|
+
'gemini-3-pro',
|
|
71
|
+
'pro',
|
|
72
|
+
],
|
|
42
73
|
sdkModelName: 'gemini-3.1-pro-preview',
|
|
43
74
|
},
|
|
44
75
|
};
|
package/src/providers/google.js
CHANGED
|
@@ -106,6 +106,32 @@ const SUPPORTED_MODELS = {
|
|
|
106
106
|
'pro',
|
|
107
107
|
],
|
|
108
108
|
},
|
|
109
|
+
'gemini-3.5-flash': {
|
|
110
|
+
modelName: 'gemini-3.5-flash',
|
|
111
|
+
friendlyName: 'Gemini (Flash 3.5)',
|
|
112
|
+
contextWindow: 1048576, // 1M tokens
|
|
113
|
+
maxOutputTokens: 65536,
|
|
114
|
+
supportsStreaming: true,
|
|
115
|
+
supportsImages: true,
|
|
116
|
+
supportsTemperature: true,
|
|
117
|
+
supportsThinking: true,
|
|
118
|
+
supportsWebSearch: true,
|
|
119
|
+
thinkingMode: 'level',
|
|
120
|
+
thinkingLevels: ['minimal', 'low', 'medium', 'high'],
|
|
121
|
+
timeout: 300000,
|
|
122
|
+
description:
|
|
123
|
+
'Gemini 3.5 Flash - Frontier-level agentic and coding performance at Flash speed (1M context)',
|
|
124
|
+
aliases: [
|
|
125
|
+
'gemini-3.5',
|
|
126
|
+
'gemini3.5',
|
|
127
|
+
'gemini-3.5-flash-latest',
|
|
128
|
+
'flash-3.5',
|
|
129
|
+
'flash3.5',
|
|
130
|
+
'gemini-flash-3.5',
|
|
131
|
+
'gemini flash 3.5',
|
|
132
|
+
'3.5-flash',
|
|
133
|
+
],
|
|
134
|
+
},
|
|
109
135
|
};
|
|
110
136
|
|
|
111
137
|
// Thinking mode budget percentages
|
package/src/systemPrompts.js
CHANGED
|
@@ -88,3 +88,36 @@ QUALITY STANDARDS
|
|
|
88
88
|
|
|
89
89
|
Remember: The best solution often has one breakthrough insight that makes the complexity fall away.
|
|
90
90
|
`.trim();
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Conversation tool system prompt - sequential round-table dialogue.
|
|
94
|
+
*
|
|
95
|
+
* Unlike CONSENSUS_PROMPT (parallel, rigidly-structured answers), this frames a
|
|
96
|
+
* turn-based round-table where each participant speaks after seeing the full
|
|
97
|
+
* running transcript and is expected to build the discussion forward as dialogue.
|
|
98
|
+
*/
|
|
99
|
+
export const CONVERSATION_PROMPT = `
|
|
100
|
+
You are taking part in a multi-model round-table conversation. Several AI models speak one after another, each seeing the full running transcript of everything said before it. When it is your turn, you respond to the whole conversation so far and your response is passed on to the next participant.
|
|
101
|
+
|
|
102
|
+
Your goal: advance the discussion. Build on, challenge, or refine what earlier participants have said — don't merely repeat them. Add genuine value with each turn, whether that's a new insight, a correction, a synthesis, or a sharper framing. Treat this as a collaborative dialogue, not a set of isolated answers.
|
|
103
|
+
|
|
104
|
+
CRITICAL LINE NUMBER INSTRUCTIONS
|
|
105
|
+
Code is presented with line number markers "LINE│ code". These markers are for reference ONLY and MUST NOT be
|
|
106
|
+
included in any code you generate. Always reference specific line numbers in your replies in order to locate
|
|
107
|
+
exact positions if needed to point to exact locations. Include a very short code excerpt alongside for clarity.
|
|
108
|
+
Never include "LINE│" markers in generated code snippets.
|
|
109
|
+
|
|
110
|
+
IF MORE INFORMATION IS NEEDED
|
|
111
|
+
If you need to see specific code, files, or technical context to properly contribute to the discussion, respond with this exact JSON:
|
|
112
|
+
{
|
|
113
|
+
"status": "files_required_to_continue",
|
|
114
|
+
"mandatory_instructions": "<your critical instructions for the agent>",
|
|
115
|
+
"files_needed": ["[file name here]", "[or some folder/]"]
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
RESPONSE STYLE
|
|
119
|
+
- Respond as a dialogue turn, not a rigid report — speak naturally to the round-table.
|
|
120
|
+
- Reference earlier participants by name when you agree, disagree, or extend their points.
|
|
121
|
+
- Be direct and technical; surface trade-offs and challenge weak assumptions constructively.
|
|
122
|
+
- Keep momentum: leave the conversation in a better place than you found it for the next participant.
|
|
123
|
+
`.trim();
|