tachibot-mcp 2.7.6 → 2.7.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.
@@ -243,6 +243,11 @@ export const TOOL_DEFAULTS = {
243
243
  maxTokens: 4000,
244
244
  temperature: 0.5,
245
245
  },
246
+ qwen_algo: {
247
+ model: QWEN_MODELS.QWQ_32B,
248
+ maxTokens: 8000,
249
+ temperature: 0.2,
250
+ },
246
251
  kimi_thinking: {
247
252
  model: CURRENT_MODELS.openrouter.kimi,
248
253
  maxTokens: 16000,
@@ -23,6 +23,7 @@ export const balancedProfile = {
23
23
  gemini_analyze_code: true,
24
24
  gemini_analyze_text: true,
25
25
  qwen_coder: true,
26
+ qwen_algo: true,
26
27
  kimi_thinking: true,
27
28
  qwen_competitive: false,
28
29
  workflow: true,
@@ -23,6 +23,7 @@ export const codeFocusProfile = {
23
23
  gemini_analyze_code: true,
24
24
  gemini_analyze_text: false,
25
25
  qwen_coder: true,
26
+ qwen_algo: true,
26
27
  kimi_thinking: true,
27
28
  qwen_competitive: false,
28
29
  workflow: true,
@@ -23,6 +23,7 @@ export const fullProfile = {
23
23
  gemini_analyze_code: true,
24
24
  gemini_analyze_text: true,
25
25
  qwen_coder: true,
26
+ qwen_algo: true,
26
27
  kimi_thinking: true,
27
28
  qwen_competitive: true,
28
29
  workflow: true,
@@ -29,6 +29,7 @@ export const heavyCodingProfile = {
29
29
  gemini_analyze_text: true,
30
30
  // OpenRouter - coders enabled
31
31
  qwen_coder: true,
32
+ qwen_algo: true,
32
33
  kimi_thinking: true,
33
34
  qwen_competitive: false,
34
35
  // Workflow - minimal set for execution
@@ -23,6 +23,7 @@ export const minimalProfile = {
23
23
  gemini_analyze_code: false,
24
24
  gemini_analyze_text: false,
25
25
  qwen_coder: true,
26
+ qwen_algo: false,
26
27
  kimi_thinking: false,
27
28
  qwen_competitive: false,
28
29
  workflow: true,
@@ -23,6 +23,7 @@ export const researchPowerProfile = {
23
23
  gemini_analyze_code: false,
24
24
  gemini_analyze_text: false,
25
25
  qwen_coder: true,
26
+ qwen_algo: false,
26
27
  kimi_thinking: true,
27
28
  qwen_competitive: false,
28
29
  workflow: true,
@@ -549,12 +549,15 @@ async function initializeServer() {
549
549
  });
550
550
  console.error(`✅ Registered ${geminiTools.length} Gemini tools (brainstorm, code analysis, text analysis)`);
551
551
  }
552
- // Register OpenRouter tools (Qwen3 Coder, Kimi - selective based on flags)
552
+ // Register OpenRouter tools (Qwen3 Coder, Algo, Kimi - selective based on flags)
553
553
  if (isOpenRouterAvailable()) {
554
- const { qwenCoderTool, qwenCompetitiveTool, kimiThinkingTool } = await import("./tools/openrouter-tools.js");
554
+ const { qwenCoderTool, qwenAlgoTool, qwenCompetitiveTool, kimiThinkingTool } = await import("./tools/openrouter-tools.js");
555
555
  // Always register qwen_coder
556
556
  safeAddTool(qwenCoderTool);
557
557
  let toolCount = 1;
558
+ // Always register qwen_algo (QwQ-32B for algorithm optimization)
559
+ safeAddTool(qwenAlgoTool);
560
+ toolCount++;
558
561
  // Always register kimi_thinking (advanced agentic reasoning)
559
562
  safeAddTool(kimiThinkingTool);
560
563
  toolCount++;
@@ -564,7 +567,7 @@ async function initializeServer() {
564
567
  toolCount++;
565
568
  console.error(`🏆 Competitive programming mode enabled (qwen_competitive)`);
566
569
  }
567
- console.error(`✅ Registered ${toolCount} OpenRouter tools (Qwen3, Kimi)`);
570
+ console.error(`✅ Registered ${toolCount} OpenRouter tools (Qwen3, QwQ, Kimi)`);
568
571
  }
569
572
  // Register workflow tools
570
573
  registerWorkflowTools(server);
@@ -215,6 +215,78 @@ export const openRouterMultiModelTool = {
215
215
  return await callOpenRouter(messages, selectedModel, args.temperature || 0.7, 4000);
216
216
  }
217
217
  };
218
+ /**
219
+ * Algorithm Optimization Tool
220
+ * Deep algorithmic reasoning with QwQ-32B (RL-trained reasoning model)
221
+ * Best for: complexity analysis, data structure selection, performance optimization
222
+ */
223
+ export const qwenAlgoTool = {
224
+ name: "qwen_algo",
225
+ description: "Algorithm optimization and complexity analysis using QwQ-32B reasoning model",
226
+ parameters: z.object({
227
+ problem: z.string().describe("The algorithm problem, optimization challenge, or code to analyze"),
228
+ context: z.string().optional().describe("Additional context: current performance, constraints, use case"),
229
+ focus: z.enum(["optimize", "complexity", "data-structure", "memory", "general"])
230
+ .optional()
231
+ .default("general")
232
+ .describe("Focus area for analysis"),
233
+ language: z.string().optional().default("typescript")
234
+ }),
235
+ execute: async (args, { log }) => {
236
+ const focusPrompts = {
237
+ optimize: `Focus on performance optimization:
238
+ - Identify bottlenecks and hot paths
239
+ - Suggest algorithmic improvements (better Big-O)
240
+ - Propose micro-optimizations where applicable
241
+ - Consider cache-friendliness and memory access patterns`,
242
+ complexity: `Focus on complexity analysis:
243
+ - Analyze time complexity (best, average, worst case)
244
+ - Analyze space complexity
245
+ - Identify hidden costs (allocations, copies, GC pressure)
246
+ - Suggest complexity improvements`,
247
+ "data-structure": `Focus on data structure selection:
248
+ - Evaluate current data structure choices
249
+ - Suggest better alternatives (trees, heaps, hash maps, etc.)
250
+ - Consider tradeoffs (lookup vs insert vs memory)
251
+ - Propose hybrid approaches if beneficial`,
252
+ memory: `Focus on memory optimization:
253
+ - Identify memory allocation patterns
254
+ - Suggest pooling/recycling strategies
255
+ - Reduce GC pressure
256
+ - Consider memory layout and cache efficiency`,
257
+ general: `Provide comprehensive algorithmic analysis:
258
+ - Time and space complexity
259
+ - Optimization opportunities
260
+ - Data structure recommendations
261
+ - Memory efficiency considerations`
262
+ };
263
+ const messages = [
264
+ {
265
+ role: "system",
266
+ content: `You are QwQ-32B, an expert algorithmic reasoning model trained with reinforcement learning.
267
+ You excel at deep algorithmic thinking, complexity analysis, and performance optimization.
268
+
269
+ ${focusPrompts[args.focus || 'general']}
270
+
271
+ ${args.context ? `Context: ${args.context}` : ''}
272
+ ${args.language ? `Target language: ${args.language}` : ''}
273
+
274
+ Structure your response:
275
+ 1. **Analysis**: Understand the current approach
276
+ 2. **Complexity**: Time/space analysis
277
+ 3. **Optimizations**: Specific improvements with reasoning
278
+ 4. **Implementation**: Optimized code if applicable
279
+ 5. **Tradeoffs**: What we gain/lose with each approach`
280
+ },
281
+ {
282
+ role: "user",
283
+ content: args.problem
284
+ }
285
+ ];
286
+ // Use QwQ-32B - the RL-trained reasoning model (strongest for algorithms)
287
+ return await callOpenRouter(messages, OpenRouterModel.QWQ_32B, 0.2, 8000);
288
+ }
289
+ };
218
290
  /**
219
291
  * Code Competition Tool
220
292
  * Competitive programming and algorithm challenges
@@ -313,6 +385,7 @@ export function getAllOpenRouterTools() {
313
385
  qwenGeneralTool,
314
386
  openRouterMultiModelTool,
315
387
  qwenCompetitiveTool,
388
+ qwenAlgoTool,
316
389
  kimiThinkingTool
317
390
  ];
318
391
  }
@@ -466,13 +466,7 @@ Examples:
466
466
  return response;
467
467
  },
468
468
  };
469
- // Also export as focus (alias)
470
- export const focusTool = {
471
- ...tachiTool,
472
- name: "focus",
473
- description: tachiTool.description.replace(/tachi/g, "focus"),
474
- };
475
- // Export for registration
469
+ // Export for registration (removed focus alias - was wasting tokens)
476
470
  export function getTachiTools() {
477
- return [tachiTool, focusTool];
471
+ return [tachiTool];
478
472
  }
@@ -39,6 +39,7 @@ export const KNOWN_TOOLS = [
39
39
  'gemini_analyze_text',
40
40
  // Qwen
41
41
  'qwen_coder',
42
+ 'qwen_algo',
42
43
  'qwq_reason',
43
44
  // Advanced modes
44
45
  'verifier',
@@ -208,6 +208,16 @@ export async function executeWorkflowTool(toolName, input, options = {}) {
208
208
  ? OpenRouterModel.QWQ_32B
209
209
  : OpenRouterModel.QWEN3_CODER;
210
210
  return buildResult(await callOpenRouter(toMessages(prompt, systemPrompt), qwenModel, temperature, maxTokens), qwenModel);
211
+ case "qwen_algo":
212
+ if (!callOpenRouter) {
213
+ return buildResult("[Qwen algo tool requires OpenRouter API key. Add OPENROUTER_API_KEY to .env]", "error");
214
+ }
215
+ // Extract focus mode from input if available
216
+ const algoFocus = typeof input === 'object' && input.focus ? input.focus : 'general';
217
+ const algoSystemPrompt = systemPrompt || `You are QwQ-32B, an expert algorithmic reasoning model.
218
+ Focus: ${algoFocus}. Analyze complexity, suggest optimizations, and provide implementation guidance.`;
219
+ return buildResult(await callOpenRouter(toMessages(prompt, algoSystemPrompt), OpenRouterModel.QWQ_32B, 0.2, // Low temperature for precise algorithmic analysis
220
+ maxTokens), OpenRouterModel.QWQ_32B);
211
221
  // ============ KIMI TOOLS (via OpenRouter) ============
212
222
  case "kimi_thinking":
213
223
  if (!callOpenRouter) {
@@ -424,6 +434,9 @@ export function getAvailableTools() {
424
434
  if (hasGrokApiKey()) {
425
435
  tools.push("grok", "grok_reason", "grok_code", "grok_debug", "grok_brainstorm", "grok_search");
426
436
  }
437
+ if (process.env.OPENROUTER_API_KEY) {
438
+ tools.push("qwen_coder", "qwen_algo", "qwq_reason", "kimi_thinking");
439
+ }
427
440
  // Add modes if available
428
441
  if (Verifier)
429
442
  tools.push("verifier");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tachibot-mcp",
3
3
  "mcpName": "io.github.byPawel/tachibot-mcp",
4
4
  "displayName": "TachiBot MCP - Universal AI Orchestrator",
5
- "version": "2.7.6",
5
+ "version": "2.7.7",
6
6
  "type": "module",
7
7
  "main": "dist/src/server.js",
8
8
  "bin": {
@@ -78,7 +78,7 @@
78
78
  "cli-highlight": "^2.1.11",
79
79
  "cli-table3": "^0.6.5",
80
80
  "dotenv": "^16.4.5",
81
- "fastmcp": "^1.21.0",
81
+ "fastmcp": "^3.26.7",
82
82
  "gradient-string": "^3.0.0",
83
83
  "ink": "^6.6.0",
84
84
  "ink-big-text": "^2.0.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Balanced set for general use (~Xk tokens, 21 tools)",
2
+ "description": "Balanced set for general use (~Xk tokens, 22 tools)",
3
3
  "tools": {
4
4
  "think": true,
5
5
  "focus": true,
@@ -23,6 +23,7 @@
23
23
  "gemini_analyze_code": true,
24
24
  "gemini_analyze_text": true,
25
25
  "qwen_coder": true,
26
+ "qwen_algo": true,
26
27
  "kimi_thinking": true,
27
28
  "qwen_competitive": false,
28
29
  "workflow": true,
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Code-heavy work with debugging and analysis (~Xk tokens, 17 tools)",
2
+ "description": "Code-heavy work with debugging and analysis (~Xk tokens, 18 tools)",
3
3
  "tools": {
4
4
  "think": true,
5
5
  "focus": true,
@@ -23,6 +23,7 @@
23
23
  "gemini_analyze_code": true,
24
24
  "gemini_analyze_text": false,
25
25
  "qwen_coder": true,
26
+ "qwen_algo": true,
26
27
  "kimi_thinking": true,
27
28
  "qwen_competitive": false,
28
29
  "workflow": true,
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "All tools enabled for maximum capability (~Xk tokens, 33 tools)",
2
+ "description": "All tools enabled for maximum capability (~Xk tokens, 34 tools)",
3
3
  "tools": {
4
4
  "think": true,
5
5
  "focus": true,
@@ -23,6 +23,7 @@
23
23
  "gemini_analyze_code": true,
24
24
  "gemini_analyze_text": true,
25
25
  "qwen_coder": true,
26
+ "qwen_algo": true,
26
27
  "kimi_thinking": true,
27
28
  "qwen_competitive": true,
28
29
  "workflow": true,
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Heavy coding with all reasoning & code tools (~14k tokens, 25 tools)",
2
+ "description": "Heavy coding with all reasoning & code tools (~14k tokens, 26 tools)",
3
3
  "tools": {
4
4
  "think": true,
5
5
  "focus": true,
@@ -23,6 +23,7 @@
23
23
  "gemini_analyze_code": true,
24
24
  "gemini_analyze_text": true,
25
25
  "qwen_coder": true,
26
+ "qwen_algo": true,
26
27
  "kimi_thinking": true,
27
28
  "qwen_competitive": false,
28
29
  "workflow": true,
@@ -23,6 +23,7 @@
23
23
  "gemini_analyze_code": false,
24
24
  "gemini_analyze_text": false,
25
25
  "qwen_coder": true,
26
+ "qwen_algo": false,
26
27
  "kimi_thinking": false,
27
28
  "qwen_competitive": false,
28
29
  "workflow": true,
@@ -23,6 +23,7 @@
23
23
  "gemini_analyze_code": false,
24
24
  "gemini_analyze_text": false,
25
25
  "qwen_coder": true,
26
+ "qwen_algo": false,
26
27
  "kimi_thinking": true,
27
28
  "qwen_competitive": false,
28
29
  "workflow": true,