@debatetalk/mcp 1.0.15 → 1.0.20
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/.claude-plugin/plugin.json +1 -1
- package/README.md +8 -8
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/mcp/server.js +4 -1
- package/dist/mcp/server.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "debatetalk",
|
|
3
3
|
"description": "Run structured multi-model AI debates from your AI assistant. Multiple models argue independently, deliberate, and converge on a 4-part synthesis: Strong Ground, Fault Lines, Blind Spots, and Your Call.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "DebateTalk",
|
|
7
7
|
"email": "support@debatetalk.ai"
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Create a key at [console.debatetalk.ai/api-keys](https://console.debatetalk.ai/a
|
|
|
62
62
|
```json
|
|
63
63
|
{
|
|
64
64
|
"mcpServers": {
|
|
65
|
-
"
|
|
65
|
+
"dt": {
|
|
66
66
|
"command": "npx",
|
|
67
67
|
"args": ["-y", "@debatetalk/mcp"],
|
|
68
68
|
"env": {
|
|
@@ -113,28 +113,28 @@ export DEBATETALK_API_KEY=dt_your_key_here
|
|
|
113
113
|
|
|
114
114
|
**Run a debate:**
|
|
115
115
|
```bash
|
|
116
|
-
|
|
116
|
+
dt debate "Should we adopt microservices?"
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
**Check which models are online:**
|
|
120
120
|
```bash
|
|
121
|
-
|
|
121
|
+
dt models
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
**Get a recommended model panel for your question:**
|
|
125
125
|
```bash
|
|
126
|
-
|
|
126
|
+
dt recommend "Is Rust worth learning in 2026?"
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
**Estimate cost before running:**
|
|
130
130
|
```bash
|
|
131
|
-
|
|
131
|
+
dt cost "Should we raise our Series A now?"
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
**View past debates:**
|
|
135
135
|
```bash
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
dt history
|
|
137
|
+
dt history --limit 5
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
---
|
|
@@ -209,7 +209,7 @@ Public tools (`get_model_status`, `recommend_models`) work without an API key.
|
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
211
|
git clone https://github.com/DebateTalk-AI/mcp
|
|
212
|
-
cd
|
|
212
|
+
cd mcp
|
|
213
213
|
npm install
|
|
214
214
|
npm run build
|
|
215
215
|
npm test
|
package/dist/cli/index.js
CHANGED
|
@@ -195,7 +195,7 @@ function historyCommand() {
|
|
|
195
195
|
Number.isNaN(rawLimit) ? 20 : Math.min(Math.max(1, rawLimit), 100)
|
|
196
196
|
);
|
|
197
197
|
if (debates.length === 0) {
|
|
198
|
-
console.log(chalk6.dim('No debates yet. Run:
|
|
198
|
+
console.log(chalk6.dim('No debates yet. Run: dt debate "your question"'));
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
201
|
console.log(
|
|
@@ -221,7 +221,7 @@ function historyCommand() {
|
|
|
221
221
|
|
|
222
222
|
// src/cli/index.ts
|
|
223
223
|
var program = new Command6();
|
|
224
|
-
program.name("
|
|
224
|
+
program.name("dt").description(
|
|
225
225
|
"DebateTalk CLI \u2014 run structured multi-model AI debates from your terminal.\nDocs: https://debatetalk.ai/resources/api-reference"
|
|
226
226
|
).version("1.0.0");
|
|
227
227
|
program.addCommand(debateCommand());
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/index.ts","../../src/cli/commands/debate.ts","../../src/cli/utils.ts","../../src/cli/commands/models.ts","../../src/cli/commands/recommend.ts","../../src/cli/commands/cost.ts","../../src/cli/commands/history.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { debateCommand } from \"./commands/debate.js\";\nimport { modelsCommand } from \"./commands/models.js\";\nimport { recommendCommand } from \"./commands/recommend.js\";\nimport { costCommand } from \"./commands/cost.js\";\nimport { historyCommand } from \"./commands/history.js\";\n\nconst program = new Command();\n\nprogram\n .name(\"debatetalk\")\n .description(\n \"DebateTalk CLI — run structured multi-model AI debates from your terminal.\\n\" +\n \"Docs: https://debatetalk.ai/resources/api-reference\"\n )\n .version(\"1.0.0\");\n\nprogram.addCommand(debateCommand());\nprogram.addCommand(modelsCommand());\nprogram.addCommand(recommendCommand());\nprogram.addCommand(costCommand());\nprogram.addCommand(historyCommand());\n\nprogram.parse();\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport ora from \"ora\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\nimport type { DebateEvent } from \"../../types.js\";\n\nexport function debateCommand(): Command {\n return new Command(\"debate\")\n .description(\"Run a structured multi-model AI debate\")\n .argument(\"<question>\", \"The question or topic to debate\")\n .option(\n \"--models <ids>\",\n \"Comma-separated model IDs (omit for smart routing)\"\n )\n .option(\"--rounds <n>\", \"Number of deliberation rounds (default: 2)\")\n .action(\n async (\n question: string,\n opts: { models?: string; rounds?: string }\n ) => {\n const client = new DebateTalkClient();\n const params = {\n question,\n ...(opts.models && { models: opts.models.split(\",\").map((s) => s.trim()) }),\n ...(opts.rounds && { rounds: parseInt(opts.rounds, 10) }),\n };\n\n const spinner = ora(\"Starting debate…\").start();\n\n try {\n let currentPhase = \"\";\n\n for await (const event of client.streamDebate(params)) {\n const phase = getPhaseLabel(event);\n if (phase && phase !== currentPhase) {\n currentPhase = phase;\n spinner.text = phase;\n }\n\n if (event.type === \"synthesis\") {\n spinner.succeed(\"Debate complete\");\n printSynthesis(question, event);\n return;\n }\n }\n\n spinner.fail(\"Debate ended without synthesis\");\n } catch (err) {\n spinner.fail(\"Debate failed\");\n handleError(err);\n }\n }\n );\n}\n\nfunction getPhaseLabel(event: DebateEvent): string | null {\n switch (event.type) {\n case \"debate_start\":\n return \"Debate starting…\";\n case \"classification\":\n return `Classifying question (${(event.data[\"question_type\"] as string | undefined) ?? \"…\"})`;\n case \"round_start\":\n return `Round ${(event.data[\"round\"] as number | undefined) ?? \"?\"} — models deliberating…`;\n case \"consensus\":\n return \"Checking consensus…\";\n case \"synthesis\":\n return \"Generating synthesis…\";\n default:\n return null;\n }\n}\n\nfunction printSynthesis(question: string, event: DebateEvent): void {\n const d = event.data as Record<string, string>;\n console.log();\n console.log(chalk.bold(`\"${question}\"`));\n console.log();\n console.log(chalk.bold.green(\"━━━ STRONG GROUND ━━━\"));\n console.log(d[\"strong_ground\"] ?? \"\");\n console.log();\n console.log(chalk.bold.yellow(\"━━━ FAULT LINES ━━━\"));\n console.log(d[\"fault_lines\"] ?? \"\");\n console.log();\n console.log(chalk.bold.magenta(\"━━━ BLIND SPOTS ━━━\"));\n console.log(d[\"blind_spots\"] ?? \"\");\n console.log();\n console.log(chalk.bold.cyan(\"━━━ YOUR CALL ━━━\"));\n console.log(d[\"your_call\"] ?? \"\");\n console.log();\n}\n","import chalk from \"chalk\";\nimport { DebateTalkError } from \"../client.js\";\n\nexport function handleError(err: unknown): never {\n if (err instanceof DebateTalkError) {\n if (err.status === 401 || err.status === 403) {\n console.error(chalk.red(\"Authentication failed.\"));\n console.error(\n chalk.dim(\n \"Set DEBATETALK_API_KEY or create a key at https://console.debatetalk.ai/api-keys\"\n )\n );\n } else if (err.status === 429) {\n console.error(chalk.red(\"Rate limit reached.\"));\n console.error(chalk.dim(\"Free plan: 5 debates/day. Upgrade at https://debatetalk.ai\"));\n } else {\n console.error(chalk.red(`API error (${err.status}): ${err.message}`));\n }\n } else if (err instanceof Error) {\n console.error(chalk.red(err.message));\n } else {\n console.error(chalk.red(\"An unexpected error occurred.\"));\n }\n process.exit(1);\n}\n\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function modelsCommand(): Command {\n return new Command(\"models\")\n .description(\"Show real-time health and latency for all DebateTalk models\")\n .action(async () => {\n const client = new DebateTalkClient();\n try {\n const { models, updated_at } = await client.getModelStatus();\n const online = models.filter((m) => m.status === \"online\").length;\n console.log(\n chalk.bold(`Model Status`) +\n chalk.dim(` — ${online}/${models.length} online (updated ${updated_at})`)\n );\n console.log();\n for (const m of models) {\n const icon =\n m.status === \"online\"\n ? chalk.green(\"✓\")\n : m.status === \"degraded\"\n ? chalk.yellow(\"⚠\")\n : chalk.red(\"✗\");\n const latency =\n m.latency_ms != null ? chalk.dim(` ${m.latency_ms}ms`) : \"\";\n console.log(` ${icon} ${m.display_name}${latency}`);\n }\n } catch (err) {\n handleError(err);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function recommendCommand(): Command {\n return new Command(\"recommend\")\n .description(\"Get the best model panel for a question\")\n .argument(\"<question>\", \"The question to get recommendations for\")\n .action(async (question: string) => {\n const client = new DebateTalkClient();\n try {\n const rec = await client.recommendModels(question);\n console.log(chalk.bold(`Recommended panel`) + chalk.dim(` for \"${question}\"`));\n console.log(chalk.dim(`Question type: ${rec.question_type}`));\n console.log();\n console.log(` ${chalk.cyan(\"Debaters:\")} ${rec.debaters.join(\", \")}`);\n console.log(` ${chalk.cyan(\"Synthesizer:\")} ${rec.synthesizer}`);\n console.log(` ${chalk.cyan(\"Adjudicator:\")} ${rec.adjudicator}`);\n } catch (err) {\n handleError(err);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function costCommand(): Command {\n return new Command(\"cost\")\n .description(\"Estimate the credit cost of a debate before running it\")\n .argument(\"<question>\", \"The question to estimate cost for\")\n .option(\"--rounds <n>\", \"Number of deliberation rounds\")\n .action(async (question: string, opts: { rounds?: string }) => {\n const client = new DebateTalkClient();\n try {\n const est = await client.estimateCost({\n question,\n ...(opts.rounds && { rounds: parseInt(opts.rounds, 10) }),\n });\n console.log(chalk.bold(`Cost estimate`));\n console.log();\n console.log(\n ` ${chalk.cyan(\"Total:\")} ${est.estimated_credits} credits` +\n chalk.dim(` (~$${est.estimated_usd.toFixed(2)} USD)`)\n );\n console.log();\n console.log(chalk.dim(\" Breakdown:\"));\n for (const b of est.breakdown) {\n console.log(\n chalk.dim(\n ` • ${b.model} (${b.role}): ~${b.estimated_tokens.toLocaleString()} tokens = ${b.estimated_credits} credits`\n )\n );\n }\n } catch (err) {\n handleError(err);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function historyCommand(): Command {\n return new Command(\"history\")\n .description(\"List your past debates\")\n .option(\"--limit <n>\", \"Number of debates to show\", \"20\")\n .action(async (opts: { limit: string }) => {\n const client = new DebateTalkClient();\n try {\n const rawLimit = parseInt(opts.limit, 10);\n const { debates, total } = await client.getHistory(\n Number.isNaN(rawLimit) ? 20 : Math.min(Math.max(1, rawLimit), 100)\n );\n if (debates.length === 0) {\n console.log(chalk.dim('No debates yet. Run: debatetalk debate \"your question\"'));\n return;\n }\n console.log(\n chalk.bold(`Debate history`) +\n chalk.dim(` — showing ${debates.length} of ${total}`)\n );\n console.log();\n for (const d of debates) {\n const date = new Date(d.created_at).toLocaleDateString(\"en-US\", {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n const share = d.share_token\n ? chalk.dim(` → https://console.debatetalk.ai/share/${d.share_token}`)\n : \"\";\n console.log(\n ` ${chalk.dim(date)} ${d.title}` +\n chalk.dim(` (${d.model_count} models, ${d.status})`) +\n share\n );\n }\n } catch (err) {\n handleError(err);\n }\n });\n}\n"],"mappings":";;;;;;AAAA,SAAS,WAAAA,gBAAe;;;ACAxB,SAAS,eAAe;AAC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ACF,SAAS,KAAK;AACZ,kBAAY,GAAG;AAAA,IACjB;AAAA,EACF,CAAC;AACL;;;ANrCA,IAAM,UAAU,IAAIC,SAAQ;AAE5B,QACG,KAAK,YAAY,EACjB;AAAA,EACC;AAEF,EACC,QAAQ,OAAO;AAElB,QAAQ,WAAW,cAAc,CAAC;AAClC,QAAQ,WAAW,cAAc,CAAC;AAClC,QAAQ,WAAW,iBAAiB,CAAC;AACrC,QAAQ,WAAW,YAAY,CAAC;AAChC,QAAQ,WAAW,eAAe,CAAC;AAEnC,QAAQ,MAAM;","names":["Command","chalk","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command"]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/index.ts","../../src/cli/commands/debate.ts","../../src/cli/utils.ts","../../src/cli/commands/models.ts","../../src/cli/commands/recommend.ts","../../src/cli/commands/cost.ts","../../src/cli/commands/history.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { debateCommand } from \"./commands/debate.js\";\nimport { modelsCommand } from \"./commands/models.js\";\nimport { recommendCommand } from \"./commands/recommend.js\";\nimport { costCommand } from \"./commands/cost.js\";\nimport { historyCommand } from \"./commands/history.js\";\n\nconst program = new Command();\n\nprogram\n .name(\"dt\")\n .description(\n \"DebateTalk CLI — run structured multi-model AI debates from your terminal.\\n\" +\n \"Docs: https://debatetalk.ai/resources/api-reference\"\n )\n .version(\"1.0.0\");\n\nprogram.addCommand(debateCommand());\nprogram.addCommand(modelsCommand());\nprogram.addCommand(recommendCommand());\nprogram.addCommand(costCommand());\nprogram.addCommand(historyCommand());\n\nprogram.parse();\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport ora from \"ora\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\nimport type { DebateEvent } from \"../../types.js\";\n\nexport function debateCommand(): Command {\n return new Command(\"debate\")\n .description(\"Run a structured multi-model AI debate\")\n .argument(\"<question>\", \"The question or topic to debate\")\n .option(\n \"--models <ids>\",\n \"Comma-separated model IDs (omit for smart routing)\"\n )\n .option(\"--rounds <n>\", \"Number of deliberation rounds (default: 2)\")\n .action(\n async (\n question: string,\n opts: { models?: string; rounds?: string }\n ) => {\n const client = new DebateTalkClient();\n const params = {\n question,\n ...(opts.models && { models: opts.models.split(\",\").map((s) => s.trim()) }),\n ...(opts.rounds && { rounds: parseInt(opts.rounds, 10) }),\n };\n\n const spinner = ora(\"Starting debate…\").start();\n\n try {\n let currentPhase = \"\";\n\n for await (const event of client.streamDebate(params)) {\n const phase = getPhaseLabel(event);\n if (phase && phase !== currentPhase) {\n currentPhase = phase;\n spinner.text = phase;\n }\n\n if (event.type === \"synthesis\") {\n spinner.succeed(\"Debate complete\");\n printSynthesis(question, event);\n return;\n }\n }\n\n spinner.fail(\"Debate ended without synthesis\");\n } catch (err) {\n spinner.fail(\"Debate failed\");\n handleError(err);\n }\n }\n );\n}\n\nfunction getPhaseLabel(event: DebateEvent): string | null {\n switch (event.type) {\n case \"debate_start\":\n return \"Debate starting…\";\n case \"classification\":\n return `Classifying question (${(event.data[\"question_type\"] as string | undefined) ?? \"…\"})`;\n case \"round_start\":\n return `Round ${(event.data[\"round\"] as number | undefined) ?? \"?\"} — models deliberating…`;\n case \"consensus\":\n return \"Checking consensus…\";\n case \"synthesis\":\n return \"Generating synthesis…\";\n default:\n return null;\n }\n}\n\nfunction printSynthesis(question: string, event: DebateEvent): void {\n const d = event.data as Record<string, string>;\n console.log();\n console.log(chalk.bold(`\"${question}\"`));\n console.log();\n console.log(chalk.bold.green(\"━━━ STRONG GROUND ━━━\"));\n console.log(d[\"strong_ground\"] ?? \"\");\n console.log();\n console.log(chalk.bold.yellow(\"━━━ FAULT LINES ━━━\"));\n console.log(d[\"fault_lines\"] ?? \"\");\n console.log();\n console.log(chalk.bold.magenta(\"━━━ BLIND SPOTS ━━━\"));\n console.log(d[\"blind_spots\"] ?? \"\");\n console.log();\n console.log(chalk.bold.cyan(\"━━━ YOUR CALL ━━━\"));\n console.log(d[\"your_call\"] ?? \"\");\n console.log();\n}\n","import chalk from \"chalk\";\nimport { DebateTalkError } from \"../client.js\";\n\nexport function handleError(err: unknown): never {\n if (err instanceof DebateTalkError) {\n if (err.status === 401 || err.status === 403) {\n console.error(chalk.red(\"Authentication failed.\"));\n console.error(\n chalk.dim(\n \"Set DEBATETALK_API_KEY or create a key at https://console.debatetalk.ai/api-keys\"\n )\n );\n } else if (err.status === 429) {\n console.error(chalk.red(\"Rate limit reached.\"));\n console.error(chalk.dim(\"Free plan: 5 debates/day. Upgrade at https://debatetalk.ai\"));\n } else {\n console.error(chalk.red(`API error (${err.status}): ${err.message}`));\n }\n } else if (err instanceof Error) {\n console.error(chalk.red(err.message));\n } else {\n console.error(chalk.red(\"An unexpected error occurred.\"));\n }\n process.exit(1);\n}\n\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function modelsCommand(): Command {\n return new Command(\"models\")\n .description(\"Show real-time health and latency for all DebateTalk models\")\n .action(async () => {\n const client = new DebateTalkClient();\n try {\n const { models, updated_at } = await client.getModelStatus();\n const online = models.filter((m) => m.status === \"online\").length;\n console.log(\n chalk.bold(`Model Status`) +\n chalk.dim(` — ${online}/${models.length} online (updated ${updated_at})`)\n );\n console.log();\n for (const m of models) {\n const icon =\n m.status === \"online\"\n ? chalk.green(\"✓\")\n : m.status === \"degraded\"\n ? chalk.yellow(\"⚠\")\n : chalk.red(\"✗\");\n const latency =\n m.latency_ms != null ? chalk.dim(` ${m.latency_ms}ms`) : \"\";\n console.log(` ${icon} ${m.display_name}${latency}`);\n }\n } catch (err) {\n handleError(err);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function recommendCommand(): Command {\n return new Command(\"recommend\")\n .description(\"Get the best model panel for a question\")\n .argument(\"<question>\", \"The question to get recommendations for\")\n .action(async (question: string) => {\n const client = new DebateTalkClient();\n try {\n const rec = await client.recommendModels(question);\n console.log(chalk.bold(`Recommended panel`) + chalk.dim(` for \"${question}\"`));\n console.log(chalk.dim(`Question type: ${rec.question_type}`));\n console.log();\n console.log(` ${chalk.cyan(\"Debaters:\")} ${rec.debaters.join(\", \")}`);\n console.log(` ${chalk.cyan(\"Synthesizer:\")} ${rec.synthesizer}`);\n console.log(` ${chalk.cyan(\"Adjudicator:\")} ${rec.adjudicator}`);\n } catch (err) {\n handleError(err);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function costCommand(): Command {\n return new Command(\"cost\")\n .description(\"Estimate the credit cost of a debate before running it\")\n .argument(\"<question>\", \"The question to estimate cost for\")\n .option(\"--rounds <n>\", \"Number of deliberation rounds\")\n .action(async (question: string, opts: { rounds?: string }) => {\n const client = new DebateTalkClient();\n try {\n const est = await client.estimateCost({\n question,\n ...(opts.rounds && { rounds: parseInt(opts.rounds, 10) }),\n });\n console.log(chalk.bold(`Cost estimate`));\n console.log();\n console.log(\n ` ${chalk.cyan(\"Total:\")} ${est.estimated_credits} credits` +\n chalk.dim(` (~$${est.estimated_usd.toFixed(2)} USD)`)\n );\n console.log();\n console.log(chalk.dim(\" Breakdown:\"));\n for (const b of est.breakdown) {\n console.log(\n chalk.dim(\n ` • ${b.model} (${b.role}): ~${b.estimated_tokens.toLocaleString()} tokens = ${b.estimated_credits} credits`\n )\n );\n }\n } catch (err) {\n handleError(err);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { DebateTalkClient } from \"../../client.js\";\nimport { handleError } from \"../utils.js\";\n\nexport function historyCommand(): Command {\n return new Command(\"history\")\n .description(\"List your past debates\")\n .option(\"--limit <n>\", \"Number of debates to show\", \"20\")\n .action(async (opts: { limit: string }) => {\n const client = new DebateTalkClient();\n try {\n const rawLimit = parseInt(opts.limit, 10);\n const { debates, total } = await client.getHistory(\n Number.isNaN(rawLimit) ? 20 : Math.min(Math.max(1, rawLimit), 100)\n );\n if (debates.length === 0) {\n console.log(chalk.dim('No debates yet. Run: dt debate \"your question\"'));\n return;\n }\n console.log(\n chalk.bold(`Debate history`) +\n chalk.dim(` — showing ${debates.length} of ${total}`)\n );\n console.log();\n for (const d of debates) {\n const date = new Date(d.created_at).toLocaleDateString(\"en-US\", {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n const share = d.share_token\n ? chalk.dim(` → https://console.debatetalk.ai/share/${d.share_token}`)\n : \"\";\n console.log(\n ` ${chalk.dim(date)} ${d.title}` +\n chalk.dim(` (${d.model_count} models, ${d.status})`) +\n share\n );\n }\n } catch (err) {\n handleError(err);\n }\n });\n}\n"],"mappings":";;;;;;AAAA,SAAS,WAAAA,gBAAe;;;ACAxB,SAAS,eAAe;AACxB,OAAOC,YAAW;AAClB,OAAO,SAAS;;;ACFhB,OAAO,WAAW;AAGX,SAAS,YAAY,KAAqB;AAC/C,MAAI,eAAe,iBAAiB;AAClC,QAAI,IAAI,WAAW,OAAO,IAAI,WAAW,KAAK;AAC5C,cAAQ,MAAM,MAAM,IAAI,wBAAwB,CAAC;AACjD,cAAQ;AAAA,QACN,MAAM;AAAA,UACJ;AAAA,QACF;AAAA,MACF;AAAA,IACF,WAAW,IAAI,WAAW,KAAK;AAC7B,cAAQ,MAAM,MAAM,IAAI,qBAAqB,CAAC;AAC9C,cAAQ,MAAM,MAAM,IAAI,4DAA4D,CAAC;AAAA,IACvF,OAAO;AACL,cAAQ,MAAM,MAAM,IAAI,cAAc,IAAI,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;AAAA,IACtE;AAAA,EACF,WAAW,eAAe,OAAO;AAC/B,YAAQ,MAAM,MAAM,IAAI,IAAI,OAAO,CAAC;AAAA,EACtC,OAAO;AACL,YAAQ,MAAM,MAAM,IAAI,+BAA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AQ,IAAIC,OAAM,IAAI,gDAAgD,CAAC;AACvE;AAAA,MACF;AACA,cAAQ;AAAA,QACNA,OAAM,KAAK,gBAAgB,IACzBA,OAAM,IAAI,mBAAc,QAAQ,MAAM,OAAO,KAAK,EAAE;AAAA,MACxD;AACA,cAAQ,IAAI;AACZ,iBAAW,KAAK,SAAS;AACvB,cAAM,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,mBAAmB,SAAS;AAAA,UAC9D,MAAM;AAAA,UACN,OAAO;AAAA,UACP,KAAK;AAAA,QACP,CAAC;AACD,cAAM,QAAQ,EAAE,cACZA,OAAM,IAAI,+CAA0C,EAAE,WAAW,EAAE,IACnE;AACJ,gBAAQ;AAAA,UACN,KAAKA,OAAM,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,KAC9BA,OAAM,IAAI,KAAK,EAAE,WAAW,YAAY,EAAE,MAAM,GAAG,IACnD;AAAA,QACJ;AAAA,MACF;AAAA,IACF,SAAS,KAAK;AACZ,kBAAY,GAAG;AAAA,IACjB;AAAA,EACF,CAAC;AACL;;;ANrCA,IAAM,UAAU,IAAIC,SAAQ;AAE5B,QACG,KAAK,IAAI,EACT;AAAA,EACC;AAEF,EACC,QAAQ,OAAO;AAElB,QAAQ,WAAW,cAAc,CAAC;AAClC,QAAQ,WAAW,cAAc,CAAC;AAClC,QAAQ,WAAW,iBAAiB,CAAC;AACrC,QAAQ,WAAW,YAAY,CAAC;AAChC,QAAQ,WAAW,eAAe,CAAC;AAEnC,QAAQ,MAAM;","names":["Command","chalk","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command","chalk","Command"]}
|
package/dist/mcp/server.js
CHANGED
|
@@ -249,6 +249,7 @@ async function handleGetHistory(client, args) {
|
|
|
249
249
|
|
|
250
250
|
// src/mcp/server.ts
|
|
251
251
|
import { fileURLToPath } from "url";
|
|
252
|
+
import { basename } from "path";
|
|
252
253
|
var ALL_TOOLS = [
|
|
253
254
|
runDebateTool,
|
|
254
255
|
getModelStatusTool,
|
|
@@ -289,7 +290,9 @@ async function main() {
|
|
|
289
290
|
const transport = new StdioServerTransport();
|
|
290
291
|
await server.connect(transport);
|
|
291
292
|
}
|
|
292
|
-
|
|
293
|
+
var thisFile = basename(fileURLToPath(import.meta.url));
|
|
294
|
+
var argvFile = basename(process.argv[1] ?? "");
|
|
295
|
+
if (thisFile === argvFile) {
|
|
293
296
|
main().catch((err) => {
|
|
294
297
|
process.stderr.write(
|
|
295
298
|
`DebateTalk MCP server error: ${err instanceof Error ? err.message : String(err)}
|
package/dist/mcp/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/mcp/server.ts","../../src/mcp/tools/run_debate.ts","../../src/mcp/tools/get_model_status.ts","../../src/mcp/tools/recommend_models.ts","../../src/mcp/tools/estimate_cost.ts","../../src/mcp/tools/get_history.ts"],"sourcesContent":["// Server is the low-level class needed for JSON Schema tool definitions.\n// McpServer (the replacement) requires Zod schemas — not compatible with our Tool[] approach.\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nimport { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport {\n CallToolRequestSchema,\n ListToolsRequestSchema,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport { DebateTalkClient } from \"../client.js\";\nimport { runDebateTool, handleRunDebate } from \"./tools/run_debate.js\";\nimport { getModelStatusTool, handleGetModelStatus } from \"./tools/get_model_status.js\";\nimport { recommendModelsTool, handleRecommendModels } from \"./tools/recommend_models.js\";\nimport { estimateCostTool, handleEstimateCost } from \"./tools/estimate_cost.js\";\nimport { getHistoryTool, handleGetHistory } from \"./tools/get_history.js\";\n\nexport const ALL_TOOLS = [\n runDebateTool,\n getModelStatusTool,\n recommendModelsTool,\n estimateCostTool,\n getHistoryTool,\n];\n\nfunction createServer(client: DebateTalkClient): Server {\n const server = new Server(\n { name: \"debatetalk\", version: \"1.0.0\" },\n { capabilities: { tools: {} } }\n );\n\n server.setRequestHandler(ListToolsRequestSchema, async () => ({\n tools: ALL_TOOLS,\n }));\n\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args = {} } = request.params;\n\n switch (name) {\n case \"run_debate\":\n return handleRunDebate(client, args as Parameters<typeof handleRunDebate>[1]);\n case \"get_model_status\":\n return handleGetModelStatus(client);\n case \"recommend_models\":\n return handleRecommendModels(client, args as Parameters<typeof handleRecommendModels>[1]);\n case \"estimate_cost\":\n return handleEstimateCost(client, args as Parameters<typeof handleEstimateCost>[1]);\n case \"get_history\":\n return handleGetHistory(client, args as Parameters<typeof handleGetHistory>[1]);\n default:\n throw new Error(`Unknown tool: ${name}`);\n }\n });\n\n return server;\n}\n\nasync function main() {\n const client = new DebateTalkClient();\n const server = createServer(client);\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\n// Only start the server when run directly, not when imported in tests.\n// fileURLToPath handles Windows drive letter differences vs process.argv[1].\nimport { fileURLToPath } from \"url\";\nif (fileURLToPath(import.meta.url) === process.argv[1]) {\n main().catch((err: unknown) => {\n process.stderr.write(\n `DebateTalk MCP server error: ${err instanceof Error ? err.message : String(err)}\\n`\n );\n process.exit(1);\n });\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const runDebateTool: Tool = {\n name: \"run_debate\",\n description:\n \"Run a structured multi-model AI debate on any question. Use this tool when the user asks to 'debate', 'use DebateTalk', 'use DT', 'multi-model', 'multi model', 'get a second opinion', 'stress-test' an idea, or wants multiple AI perspectives on a decision. \" +\n \"Also use it proactively for high-stakes decisions where a single AI answer is insufficient — architecture choices, hiring decisions, strategic bets, predictions, or anything with genuine uncertainty. \" +\n \"Multiple AI models argue independently in a blind round, deliberate, and converge on a 4-part synthesis: \" +\n \"Strong Ground (what all models agree on), Fault Lines (genuine disagreements), \" +\n \"Blind Spots (what all models missed), and Your Call (actionable recommendation). \" +\n \"Requires an API key (Pro or Enterprise plan). Free tier: 5 debates/day.\",\n inputSchema: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n description:\n \"The question or topic to debate. Can be a decision, prediction, factual question, or open-ended topic.\",\n },\n models: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Specific model IDs to use as debaters (e.g. [\\\"claude-opus-4-6\\\", \\\"gpt-5.4\\\"]). \" +\n \"Omit to let DebateTalk smart routing pick the best panel automatically.\",\n },\n rounds: {\n type: \"number\",\n description: \"Number of deliberation rounds (default: 2, max depends on plan)\",\n },\n },\n required: [\"question\"],\n },\n};\n\nexport async function handleRunDebate(\n client: DebateTalkClient,\n args: { question: string; models?: string[]; rounds?: number }\n) {\n const result = await client.runDebate(args);\n\n if (!result.synthesis) {\n const id = result.debate_id ? `Debate ${result.debate_id}` : \"Debate\";\n return {\n content: [\n {\n type: \"text\" as const,\n text: `${id} completed but synthesis was not produced. Check your plan limits at https://console.debatetalk.ai`,\n },\n ],\n };\n }\n\n const { strong_ground, fault_lines, blind_spots, your_call } =\n result.synthesis;\n\n const modelList =\n result.models.length > 0 ? result.models.join(\", \") : \"smart routing\";\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `DebateTalk — ${result.question_type} question`,\n `Question: \"${result.question}\"`,\n `Models: ${modelList}`,\n `Debate ID: ${result.debate_id}`,\n ``,\n `━━━ Strong Ground ━━━`,\n `What all models agreed on:`,\n strong_ground,\n ``,\n `━━━ Fault Lines ━━━`,\n `Where models genuinely disagreed:`,\n fault_lines,\n ``,\n `━━━ Blind Spots ━━━`,\n `What all models missed:`,\n blind_spots,\n ``,\n `━━━ Your Call ━━━`,\n your_call,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const getModelStatusTool: Tool = {\n name: \"get_model_status\",\n description:\n \"Get real-time health, latency, and uptime for all DebateTalk models. \" +\n \"Use this before running a debate to check which models are currently online. \" +\n \"No API key required.\",\n inputSchema: {\n type: \"object\",\n properties: {},\n },\n};\n\nexport async function handleGetModelStatus(client: DebateTalkClient) {\n const { models, updated_at } = await client.getModelStatus();\n\n const rows = models\n .map((m) => {\n const latency = m.latency_ms != null ? `${m.latency_ms}ms` : \"—\";\n const uptime =\n m.uptime_pct != null ? `${m.uptime_pct.toFixed(1)}%` : \"—\";\n const statusIcon =\n m.status === \"online\" ? \"✓\" : m.status === \"degraded\" ? \"⚠\" : \"✗\";\n return `${statusIcon} ${m.display_name} (${m.provider}) — ${m.status}, latency: ${latency}, uptime: ${uptime}`;\n })\n .join(\"\\n\");\n\n const online = models.filter((m) => m.status === \"online\").length;\n const total = models.length;\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: `Model Status — ${online}/${total} online (updated ${updated_at})\\n\\n${rows}`,\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const recommendModelsTool: Tool = {\n name: \"recommend_models\",\n description:\n \"Get the best model panel recommended by DebateTalk smart routing for a specific question. \" +\n \"Returns the ideal debaters, synthesizer, and adjudicator based on the question type. \" +\n \"No API key required.\",\n inputSchema: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n description: \"The question or topic you want to debate\",\n },\n },\n required: [\"question\"],\n },\n};\n\nexport async function handleRecommendModels(\n client: DebateTalkClient,\n args: { question: string }\n) {\n const rec = await client.recommendModels(args.question);\n\n const debaterList = rec.debaters.join(\", \");\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `Recommended panel for \"${args.question}\"`,\n `Question type: ${rec.question_type}`,\n ``,\n `Debaters: ${debaterList}`,\n `Synthesizer: ${rec.synthesizer}`,\n `Adjudicator: ${rec.adjudicator}`,\n ``,\n `To use this panel, run a debate with models: ${rec.debaters.join(\", \")}`,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const estimateCostTool: Tool = {\n name: \"estimate_cost\",\n description:\n \"Estimate the credit cost of a debate before running it. \" +\n \"Returns total credits, USD cost, and a per-model breakdown. \" +\n \"Requires an API key (Pro or Enterprise plan).\",\n inputSchema: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n description: \"The question to estimate cost for\",\n },\n models: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Specific model IDs to use (omit for smart routing)\",\n },\n rounds: {\n type: \"number\",\n description: \"Number of deliberation rounds (default: 2)\",\n },\n },\n required: [\"question\"],\n },\n};\n\nexport async function handleEstimateCost(\n client: DebateTalkClient,\n args: { question: string; models?: string[]; rounds?: number }\n) {\n const estimate = await client.estimateCost(args);\n\n const breakdownRows = estimate.breakdown\n .map(\n (b) =>\n ` • ${b.model} (${b.role}): ~${b.estimated_tokens.toLocaleString()} tokens = ${b.estimated_credits} credits`\n )\n .join(\"\\n\");\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `Cost estimate for \"${args.question}\"`,\n ``,\n `Total: ${estimate.estimated_credits} credits (~$${estimate.estimated_usd.toFixed(2)} USD)`,\n ``,\n `Breakdown:`,\n breakdownRows,\n ``,\n `Credits refill automatically on Pro plans. View balance at https://console.debatetalk.ai`,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const getHistoryTool: Tool = {\n name: \"get_history\",\n description:\n \"Retrieve your past DebateTalk debates. \" +\n \"Returns debate titles, dates, model counts, and share links. \" +\n \"Requires an API key (Pro or Enterprise plan).\",\n inputSchema: {\n type: \"object\",\n properties: {\n limit: {\n type: \"number\",\n description: \"Number of debates to return (default: 20, max: 100)\",\n },\n },\n },\n};\n\nexport async function handleGetHistory(\n client: DebateTalkClient,\n args: { limit?: number }\n) {\n const raw = args.limit ?? 20;\n const limit = Number.isFinite(raw) ? Math.min(Math.max(1, raw), 100) : 20;\n const { debates, total } = await client.getHistory(limit);\n\n if (debates.length === 0) {\n return {\n content: [\n {\n type: \"text\" as const,\n text: \"No debates found. Run your first debate at https://console.debatetalk.ai\",\n },\n ],\n };\n }\n\n const rows = debates.map((d) => {\n const date = new Date(d.created_at).toLocaleDateString(\"en-US\", {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n const shareLink = d.share_token\n ? ` — https://console.debatetalk.ai/share/${d.share_token}`\n : \"\";\n return `• [${date}] ${d.title} (${d.model_count} models, ${d.status})${shareLink}`;\n });\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `Debate history — showing ${debates.length} of ${total}`,\n ``,\n ...rows,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n"],"mappings":";;;;;AAGA,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLA,IAAM,gBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,aACE;AAAA,EAMF,aAAa;AAAA,IACX,MAAM;AAAA,IACN,YAAY;AAAA,MACV,UAAU;AAAA,QACR,MAAM;AAAA,QACN,aACE;AAAA,MACJ;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,OAAO,EAAE,MAAM,SAAS;AAAA,QACxB,aACE;AAAA,MAEJ;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA,UAAU,CAAC,UAAU;AAAA,EACvB;AACF;AAEA,eAAsB,gBACpB,QACA,MACA;AACA,QAAM,SAAS,MAAM,OAAO,UAAU,IAAI;AAE1C,MAAI,CAAC,OAAO,WAAW;AACrB,UAAM,KAAK,OAAO,YAAY,UAAU,OAAO,SAAS,KAAK;AAC7D,WAAO;AAAA,MACL,SAAS;AAAA,QACP;AAAA,UACE,MAAM;AAAA,UACN,MAAM,GAAG,EAAE;AAA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eAAO,iBAAiB,QAAQ,IAA8C;AAAA,MAChF;AACE,cAAM,IAAI,MAAM,iBAAiB,IAAI,EAAE;AAAA,IAC3C;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAEA,eAAe,OAAO;AACpB,QAAM,SAAS,IAAI,iBAAiB;AACpC,QAAM,SAAS,aAAa,MAAM;AAClC,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAChC;AAKA,IAAI,cAAc,YAAY,GAAG,MAAM,QAAQ,KAAK,CAAC,GAAG;AACtD,OAAK,EAAE,MAAM,CAAC,QAAiB;AAC7B,YAAQ,OAAO;AAAA,MACb,gCAAgC,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA;AAAA,IAClF;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/mcp/server.ts","../../src/mcp/tools/run_debate.ts","../../src/mcp/tools/get_model_status.ts","../../src/mcp/tools/recommend_models.ts","../../src/mcp/tools/estimate_cost.ts","../../src/mcp/tools/get_history.ts"],"sourcesContent":["// Server is the low-level class needed for JSON Schema tool definitions.\n// McpServer (the replacement) requires Zod schemas — not compatible with our Tool[] approach.\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nimport { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport {\n CallToolRequestSchema,\n ListToolsRequestSchema,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport { DebateTalkClient } from \"../client.js\";\nimport { runDebateTool, handleRunDebate } from \"./tools/run_debate.js\";\nimport { getModelStatusTool, handleGetModelStatus } from \"./tools/get_model_status.js\";\nimport { recommendModelsTool, handleRecommendModels } from \"./tools/recommend_models.js\";\nimport { estimateCostTool, handleEstimateCost } from \"./tools/estimate_cost.js\";\nimport { getHistoryTool, handleGetHistory } from \"./tools/get_history.js\";\n\nexport const ALL_TOOLS = [\n runDebateTool,\n getModelStatusTool,\n recommendModelsTool,\n estimateCostTool,\n getHistoryTool,\n];\n\nfunction createServer(client: DebateTalkClient): Server {\n const server = new Server(\n { name: \"debatetalk\", version: \"1.0.0\" },\n { capabilities: { tools: {} } }\n );\n\n server.setRequestHandler(ListToolsRequestSchema, async () => ({\n tools: ALL_TOOLS,\n }));\n\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args = {} } = request.params;\n\n switch (name) {\n case \"run_debate\":\n return handleRunDebate(client, args as Parameters<typeof handleRunDebate>[1]);\n case \"get_model_status\":\n return handleGetModelStatus(client);\n case \"recommend_models\":\n return handleRecommendModels(client, args as Parameters<typeof handleRecommendModels>[1]);\n case \"estimate_cost\":\n return handleEstimateCost(client, args as Parameters<typeof handleEstimateCost>[1]);\n case \"get_history\":\n return handleGetHistory(client, args as Parameters<typeof handleGetHistory>[1]);\n default:\n throw new Error(`Unknown tool: ${name}`);\n }\n });\n\n return server;\n}\n\nasync function main() {\n const client = new DebateTalkClient();\n const server = createServer(client);\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\n// Start the server when run directly (not when imported in tests).\n// Comparing full paths via `import.meta.url === process.argv[1]` fails under\n// npx because npm's bin-link resolves to a different absolute path. Comparing\n// basenames is robust across npx, direct `node server.js`, and tsx.\nimport { fileURLToPath } from \"url\";\nimport { basename } from \"path\";\n\nconst thisFile = basename(fileURLToPath(import.meta.url));\nconst argvFile = basename(process.argv[1] ?? \"\");\n\nif (thisFile === argvFile) {\n main().catch((err: unknown) => {\n process.stderr.write(\n `DebateTalk MCP server error: ${err instanceof Error ? err.message : String(err)}\\n`\n );\n process.exit(1);\n });\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const runDebateTool: Tool = {\n name: \"run_debate\",\n description:\n \"Run a structured multi-model AI debate on any question. Use this tool when the user asks to 'debate', 'use DebateTalk', 'use DT', 'multi-model', 'multi model', 'get a second opinion', 'stress-test' an idea, or wants multiple AI perspectives on a decision. \" +\n \"Also use it proactively for high-stakes decisions where a single AI answer is insufficient — architecture choices, hiring decisions, strategic bets, predictions, or anything with genuine uncertainty. \" +\n \"Multiple AI models argue independently in a blind round, deliberate, and converge on a 4-part synthesis: \" +\n \"Strong Ground (what all models agree on), Fault Lines (genuine disagreements), \" +\n \"Blind Spots (what all models missed), and Your Call (actionable recommendation). \" +\n \"Requires an API key (Pro or Enterprise plan). Free tier: 5 debates/day.\",\n inputSchema: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n description:\n \"The question or topic to debate. Can be a decision, prediction, factual question, or open-ended topic.\",\n },\n models: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Specific model IDs to use as debaters (e.g. [\\\"claude-opus-4-6\\\", \\\"gpt-5.4\\\"]). \" +\n \"Omit to let DebateTalk smart routing pick the best panel automatically.\",\n },\n rounds: {\n type: \"number\",\n description: \"Number of deliberation rounds (default: 2, max depends on plan)\",\n },\n },\n required: [\"question\"],\n },\n};\n\nexport async function handleRunDebate(\n client: DebateTalkClient,\n args: { question: string; models?: string[]; rounds?: number }\n) {\n const result = await client.runDebate(args);\n\n if (!result.synthesis) {\n const id = result.debate_id ? `Debate ${result.debate_id}` : \"Debate\";\n return {\n content: [\n {\n type: \"text\" as const,\n text: `${id} completed but synthesis was not produced. Check your plan limits at https://console.debatetalk.ai`,\n },\n ],\n };\n }\n\n const { strong_ground, fault_lines, blind_spots, your_call } =\n result.synthesis;\n\n const modelList =\n result.models.length > 0 ? result.models.join(\", \") : \"smart routing\";\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `DebateTalk — ${result.question_type} question`,\n `Question: \"${result.question}\"`,\n `Models: ${modelList}`,\n `Debate ID: ${result.debate_id}`,\n ``,\n `━━━ Strong Ground ━━━`,\n `What all models agreed on:`,\n strong_ground,\n ``,\n `━━━ Fault Lines ━━━`,\n `Where models genuinely disagreed:`,\n fault_lines,\n ``,\n `━━━ Blind Spots ━━━`,\n `What all models missed:`,\n blind_spots,\n ``,\n `━━━ Your Call ━━━`,\n your_call,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const getModelStatusTool: Tool = {\n name: \"get_model_status\",\n description:\n \"Get real-time health, latency, and uptime for all DebateTalk models. \" +\n \"Use this before running a debate to check which models are currently online. \" +\n \"No API key required.\",\n inputSchema: {\n type: \"object\",\n properties: {},\n },\n};\n\nexport async function handleGetModelStatus(client: DebateTalkClient) {\n const { models, updated_at } = await client.getModelStatus();\n\n const rows = models\n .map((m) => {\n const latency = m.latency_ms != null ? `${m.latency_ms}ms` : \"—\";\n const uptime =\n m.uptime_pct != null ? `${m.uptime_pct.toFixed(1)}%` : \"—\";\n const statusIcon =\n m.status === \"online\" ? \"✓\" : m.status === \"degraded\" ? \"⚠\" : \"✗\";\n return `${statusIcon} ${m.display_name} (${m.provider}) — ${m.status}, latency: ${latency}, uptime: ${uptime}`;\n })\n .join(\"\\n\");\n\n const online = models.filter((m) => m.status === \"online\").length;\n const total = models.length;\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: `Model Status — ${online}/${total} online (updated ${updated_at})\\n\\n${rows}`,\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const recommendModelsTool: Tool = {\n name: \"recommend_models\",\n description:\n \"Get the best model panel recommended by DebateTalk smart routing for a specific question. \" +\n \"Returns the ideal debaters, synthesizer, and adjudicator based on the question type. \" +\n \"No API key required.\",\n inputSchema: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n description: \"The question or topic you want to debate\",\n },\n },\n required: [\"question\"],\n },\n};\n\nexport async function handleRecommendModels(\n client: DebateTalkClient,\n args: { question: string }\n) {\n const rec = await client.recommendModels(args.question);\n\n const debaterList = rec.debaters.join(\", \");\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `Recommended panel for \"${args.question}\"`,\n `Question type: ${rec.question_type}`,\n ``,\n `Debaters: ${debaterList}`,\n `Synthesizer: ${rec.synthesizer}`,\n `Adjudicator: ${rec.adjudicator}`,\n ``,\n `To use this panel, run a debate with models: ${rec.debaters.join(\", \")}`,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const estimateCostTool: Tool = {\n name: \"estimate_cost\",\n description:\n \"Estimate the credit cost of a debate before running it. \" +\n \"Returns total credits, USD cost, and a per-model breakdown. \" +\n \"Requires an API key (Pro or Enterprise plan).\",\n inputSchema: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n description: \"The question to estimate cost for\",\n },\n models: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Specific model IDs to use (omit for smart routing)\",\n },\n rounds: {\n type: \"number\",\n description: \"Number of deliberation rounds (default: 2)\",\n },\n },\n required: [\"question\"],\n },\n};\n\nexport async function handleEstimateCost(\n client: DebateTalkClient,\n args: { question: string; models?: string[]; rounds?: number }\n) {\n const estimate = await client.estimateCost(args);\n\n const breakdownRows = estimate.breakdown\n .map(\n (b) =>\n ` • ${b.model} (${b.role}): ~${b.estimated_tokens.toLocaleString()} tokens = ${b.estimated_credits} credits`\n )\n .join(\"\\n\");\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `Cost estimate for \"${args.question}\"`,\n ``,\n `Total: ${estimate.estimated_credits} credits (~$${estimate.estimated_usd.toFixed(2)} USD)`,\n ``,\n `Breakdown:`,\n breakdownRows,\n ``,\n `Credits refill automatically on Pro plans. View balance at https://console.debatetalk.ai`,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n","import type { Tool } from \"@modelcontextprotocol/sdk/types.js\";\nimport type { DebateTalkClient } from \"../../client.js\";\n\nexport const getHistoryTool: Tool = {\n name: \"get_history\",\n description:\n \"Retrieve your past DebateTalk debates. \" +\n \"Returns debate titles, dates, model counts, and share links. \" +\n \"Requires an API key (Pro or Enterprise plan).\",\n inputSchema: {\n type: \"object\",\n properties: {\n limit: {\n type: \"number\",\n description: \"Number of debates to return (default: 20, max: 100)\",\n },\n },\n },\n};\n\nexport async function handleGetHistory(\n client: DebateTalkClient,\n args: { limit?: number }\n) {\n const raw = args.limit ?? 20;\n const limit = Number.isFinite(raw) ? Math.min(Math.max(1, raw), 100) : 20;\n const { debates, total } = await client.getHistory(limit);\n\n if (debates.length === 0) {\n return {\n content: [\n {\n type: \"text\" as const,\n text: \"No debates found. Run your first debate at https://console.debatetalk.ai\",\n },\n ],\n };\n }\n\n const rows = debates.map((d) => {\n const date = new Date(d.created_at).toLocaleDateString(\"en-US\", {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n const shareLink = d.share_token\n ? ` — https://console.debatetalk.ai/share/${d.share_token}`\n : \"\";\n return `• [${date}] ${d.title} (${d.model_count} models, ${d.status})${shareLink}`;\n });\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: [\n `Debate history — showing ${debates.length} of ${total}`,\n ``,\n ...rows,\n ].join(\"\\n\"),\n },\n ],\n };\n}\n"],"mappings":";;;;;AAGA,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLA,IAAM,gBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,aACE;AAAA,EAMF,aAAa;AAAA,IACX,MAAM;AAAA,IACN,YAAY;AAAA,MACV,UAAU;AAAA,QACR,MAAM;AAAA,QACN,aACE;AAAA,MACJ;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,OAAO,EAAE,MAAM,SAAS;AAAA,QACxB,aACE;AAAA,MAEJ;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA,UAAU,CAAC,UAAU;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M,WAAW,OAAO,CAAC,EAAE,IAAI,QAAQ;AAE/C,YAAQ,MAAM;AAAA,MACZ,KAAK;AACH,eAAO,gBAAgB,QAAQ,IAA6C;AAAA,MAC9E,KAAK;AACH,eAAO,qBAAqB,MAAM;AAAA,MACpC,KAAK;AACH,eAAO,sBAAsB,QAAQ,IAAmD;AAAA,MAC1F,KAAK;AACH,eAAO,mBAAmB,QAAQ,IAAgD;AAAA,MACpF,KAAK;AACH,eAAO,iBAAiB,QAAQ,IAA8C;AAAA,MAChF;AACE,cAAM,IAAI,MAAM,iBAAiB,IAAI,EAAE;AAAA,IAC3C;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAEA,eAAe,OAAO;AACpB,QAAM,SAAS,IAAI,iBAAiB;AACpC,QAAM,SAAS,aAAa,MAAM;AAClC,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAChC;AASA,IAAM,WAAW,SAAS,cAAc,YAAY,GAAG,CAAC;AACxD,IAAM,WAAW,SAAS,QAAQ,KAAK,CAAC,KAAK,EAAE;AAE/C,IAAI,aAAa,UAAU;AACzB,OAAK,EAAE,MAAM,CAAC,QAAiB;AAC7B,YAAQ,OAAO;AAAA,MACb,gCAAgC,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA;AAAA,IAClF;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB,CAAC;AACH;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debatetalk/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "Official MCP server and CLI for DebateTalk — run structured multi-model AI debates from your AI assistant or terminal.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"main": "./dist/mcp/server.js",
|
|
23
23
|
"bin": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"dt": "./dist/cli/index.js",
|
|
25
|
+
"mcp": "./dist/mcp/server.js"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|