tachibot-mcp 2.0.2 → 2.0.4
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/CHANGELOG.md +28 -0
- package/dist/src/collaborative-orchestrator.js +2 -1
- package/dist/src/config/model-constants.js +55 -28
- package/dist/src/config/model-defaults.js +14 -14
- package/dist/src/memory/memory-manager.js +3 -2
- package/dist/src/sequential-thinking.js +2 -1
- package/dist/src/tools/openai-tools.js +210 -118
- package/dist/src/tools/perplexity-tools.js +2 -6
- package/dist/src/tools/unified-ai-provider.js +11 -12
- package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +1 -1
- package/dist/src/workflows/tool-mapper.js +20 -24
- package/package.json +1 -3
- package/tools.config.json +1 -1
- package/workflows/core/iterative-problem-solver.yaml +2 -2
- package/workflows/system/scout.yaml +1 -1
- package/workflows/ultra-creative-brainstorm.yaml +2 -2
- package/dist/personality/komaai-expressions.js +0 -12
- package/dist/profiles/balanced.json +0 -33
- package/dist/profiles/code_focus.json +0 -33
- package/dist/profiles/full.json +0 -33
- package/dist/profiles/minimal.json +0 -33
- package/dist/profiles/research_power.json +0 -33
- package/dist/src/application/services/focus/ModeRegistry.js +0 -46
- package/dist/src/application/services/focus/modes/status.mode.js +0 -50
- package/dist/src/profiles/debug_intensive.js +0 -59
- package/dist/src/profiles/research_code.js +0 -59
- package/dist/src/profiles/workflow_builder.js +0 -53
- package/dist/src/tools/consolidated/ai-router.js +0 -174
- package/dist/src/tools/consolidated/ai-tool.js +0 -48
- package/dist/src/tools/consolidated/brainstorm-tool.js +0 -87
- package/dist/src/tools/consolidated/environment-detector.js +0 -80
- package/dist/src/tools/consolidated/index.js +0 -50
- package/dist/src/tools/consolidated/search-tool.js +0 -110
- package/dist/src/tools/consolidated/workflow-tool.js +0 -238
- package/dist/src/tools/pingpong-tool.js +0 -343
- package/dist/src/workflows/orchestrator-integration.js +0 -200
- package/dist/src/workflows/workflow-engine.js +0 -573
- package/dist/src/workflows/workflow-parser.js +0 -283
- package/dist/test-workflow-file-output.js +0 -93
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { ToolOrchestrator } from './tool-orchestrator.js';
|
|
2
|
-
export class OrchestratorIntegration {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.orchestrator = new ToolOrchestrator();
|
|
5
|
-
}
|
|
6
|
-
async executeOrchestratorStep(step, context) {
|
|
7
|
-
const query = context.metadata.get('input_query') || context.query;
|
|
8
|
-
const contextStr = context.metadata.get('input_context') || '';
|
|
9
|
-
// Get recommendations from orchestrator
|
|
10
|
-
const recommendations = this.orchestrator.recommendTools(query, contextStr);
|
|
11
|
-
// Transform to workflow-compatible format
|
|
12
|
-
const result = {
|
|
13
|
-
analysis: {
|
|
14
|
-
category: recommendations.analysis.category,
|
|
15
|
-
complexity: recommendations.analysis.complexity,
|
|
16
|
-
domain: recommendations.analysis.domain,
|
|
17
|
-
timeConstraint: recommendations.analysis.timeConstraint,
|
|
18
|
-
qualityRequirement: recommendations.analysis.qualityRequirement,
|
|
19
|
-
keywords: recommendations.analysis.keywords
|
|
20
|
-
},
|
|
21
|
-
recommended_tools: {
|
|
22
|
-
primary: recommendations.primary.map(p => p.toolId),
|
|
23
|
-
primary_agent: this.selectPrimaryAgent(recommendations.analysis)
|
|
24
|
-
},
|
|
25
|
-
workflow_plan: {
|
|
26
|
-
tools: recommendations.workflow,
|
|
27
|
-
agent_reason: this.getAgentReason(recommendations.analysis),
|
|
28
|
-
research_reason: recommendations.workflow.find(w => w.toolId.includes('scout') || w.toolId.includes('perplexity'))?.reason || 'Context gathering',
|
|
29
|
-
reasoning_reason: recommendations.workflow.find(w => w.toolId.includes('focus') || w.toolId.includes('think'))?.reason || 'Problem solving',
|
|
30
|
-
validation_reasons: recommendations.workflow.filter(w => w.toolId.includes('challenger') || w.toolId.includes('verifier')).map(w => w.reason)
|
|
31
|
-
},
|
|
32
|
-
research_tool: this.extractResearchTool(recommendations.workflow),
|
|
33
|
-
research_variant: this.getResearchVariant(recommendations.workflow),
|
|
34
|
-
reasoning_tool: this.extractReasoningTool(recommendations.workflow),
|
|
35
|
-
reasoning_mode: this.getReasoningMode(recommendations.analysis),
|
|
36
|
-
reasoning_rounds: this.getReasoningRounds(recommendations.analysis),
|
|
37
|
-
recommended_models: this.getRecommendedModels(recommendations.analysis),
|
|
38
|
-
validation_tools: this.extractValidationTools(recommendations.workflow)
|
|
39
|
-
};
|
|
40
|
-
// Store orchestrator result in context for other steps to use
|
|
41
|
-
context.metadata.set('orchestrator_result', result);
|
|
42
|
-
context.metadata.set('tool_analysis', recommendations.analysis);
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
selectPrimaryAgent(analysis) {
|
|
46
|
-
if (analysis.domain === 'technical' && analysis.keywords.includes('code')) {
|
|
47
|
-
return 'code-quality-reviewer';
|
|
48
|
-
}
|
|
49
|
-
if (analysis.keywords.includes('architecture') || analysis.keywords.includes('system')) {
|
|
50
|
-
return 'atlassian-forge-architect';
|
|
51
|
-
}
|
|
52
|
-
if (analysis.keywords.includes('ui') || analysis.keywords.includes('design')) {
|
|
53
|
-
return 'responsive-ui-designer';
|
|
54
|
-
}
|
|
55
|
-
return 'code-quality-reviewer'; // Default
|
|
56
|
-
}
|
|
57
|
-
getAgentReason(analysis) {
|
|
58
|
-
return `Selected based on ${analysis.domain} domain and ${analysis.complexity} complexity`;
|
|
59
|
-
}
|
|
60
|
-
extractResearchTool(workflow) {
|
|
61
|
-
const researchStep = workflow.find(step => ['scout', 'perplexity_ask', 'perplexity_research', 'focus_deep_research'].includes(step.toolId));
|
|
62
|
-
return researchStep?.toolId || 'scout';
|
|
63
|
-
}
|
|
64
|
-
getResearchVariant(workflow) {
|
|
65
|
-
const researchTool = this.extractResearchTool(workflow);
|
|
66
|
-
if (researchTool === 'scout')
|
|
67
|
-
return 'research_scout';
|
|
68
|
-
return undefined; // Other tools don't need variants
|
|
69
|
-
}
|
|
70
|
-
extractReasoningTool(workflow) {
|
|
71
|
-
const reasoningStep = workflow.find(step => ['focus', 'think', 'nextThought', 'perplexity_reason'].includes(step.toolId));
|
|
72
|
-
return reasoningStep?.toolId || 'focus';
|
|
73
|
-
}
|
|
74
|
-
getReasoningMode(analysis) {
|
|
75
|
-
const tool = this.extractReasoningTool([]);
|
|
76
|
-
if (tool === 'focus') {
|
|
77
|
-
if (analysis.complexity === 'complex')
|
|
78
|
-
return 'deep-reasoning';
|
|
79
|
-
if (analysis.domain === 'technical')
|
|
80
|
-
return 'code-brainstorm';
|
|
81
|
-
return 'simple';
|
|
82
|
-
}
|
|
83
|
-
return 'simple'; // Default to simple mode
|
|
84
|
-
}
|
|
85
|
-
getReasoningRounds(analysis) {
|
|
86
|
-
if (analysis.complexity === 'complex')
|
|
87
|
-
return 3;
|
|
88
|
-
if (analysis.complexity === 'medium')
|
|
89
|
-
return 2;
|
|
90
|
-
return 1;
|
|
91
|
-
}
|
|
92
|
-
getRecommendedModels(analysis) {
|
|
93
|
-
if (analysis.complexity === 'complex') {
|
|
94
|
-
return ['grok', 'gemini', 'openai'];
|
|
95
|
-
}
|
|
96
|
-
if (analysis.domain === 'technical') {
|
|
97
|
-
return ['grok', 'qwen'];
|
|
98
|
-
}
|
|
99
|
-
return ['gemini', 'openai'];
|
|
100
|
-
}
|
|
101
|
-
extractValidationTools(workflow) {
|
|
102
|
-
return workflow
|
|
103
|
-
.filter(step => ['challenger', 'verifier', 'auditor'].includes(step.toolId))
|
|
104
|
-
.map(step => step.toolId);
|
|
105
|
-
}
|
|
106
|
-
// Method to be called from workflow engine
|
|
107
|
-
static async executeStep(step, context) {
|
|
108
|
-
const integration = new OrchestratorIntegration();
|
|
109
|
-
return integration.executeOrchestratorStep(step, context);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
// Export for workflow engine registration
|
|
113
|
-
export const orchestratorStepHandler = {
|
|
114
|
-
type: 'tool-orchestrator',
|
|
115
|
-
execute: OrchestratorIntegration.executeStep
|
|
116
|
-
};
|
|
117
|
-
// Usage examples
|
|
118
|
-
export const ORCHESTRATOR_USAGE_EXAMPLES = {
|
|
119
|
-
// How to call the orchestrated workflow from CLI
|
|
120
|
-
cli_usage: `
|
|
121
|
-
# Use the AI-orchestrated problem solver
|
|
122
|
-
focus workflow run agent-scout-solve-iterate "Fix performance issues in my React app"
|
|
123
|
-
|
|
124
|
-
# The orchestrator will automatically:
|
|
125
|
-
# 1. Analyze: technical domain, medium complexity, performance focus
|
|
126
|
-
# 2. Select: scout (quick research), focus (code-brainstorm), challenger
|
|
127
|
-
# 3. Execute: Optimized workflow based on analysis
|
|
128
|
-
`,
|
|
129
|
-
// How to use in code
|
|
130
|
-
programmatic_usage: `
|
|
131
|
-
import { ToolOrchestrator } from './tool-orchestrator.js';
|
|
132
|
-
|
|
133
|
-
const orchestrator = new ToolOrchestrator();
|
|
134
|
-
const recommendations = orchestrator.recommendTools(
|
|
135
|
-
"Debug memory leaks in Node.js application",
|
|
136
|
-
"Production environment, urgent fix needed"
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
// Results:
|
|
140
|
-
// - analysis: { category: 'analysis', complexity: 'medium', timeConstraint: 'urgent' }
|
|
141
|
-
// - workflow: [{ toolId: 'scout', reason: '...' }, { toolId: 'nextThought', reason: '...' }]
|
|
142
|
-
// - primary: [{ toolId: 'architect', reason: '...' }]
|
|
143
|
-
`,
|
|
144
|
-
// How to test orchestrator decisions
|
|
145
|
-
testing_usage: `
|
|
146
|
-
import { testOrchestrationLogic, orchestratorCLI } from './orchestrator-examples.js';
|
|
147
|
-
|
|
148
|
-
// Test all scenarios
|
|
149
|
-
testOrchestrationLogic();
|
|
150
|
-
|
|
151
|
-
// Quick CLI test
|
|
152
|
-
console.error(orchestratorCLI("Research AI safety best practices"));
|
|
153
|
-
|
|
154
|
-
// Output shows:
|
|
155
|
-
# 📊 Analysis: research, complex, general, normal, high
|
|
156
|
-
# 🤖 Recommended Workflow:
|
|
157
|
-
# 1. perplexity_research
|
|
158
|
-
# └─ Comprehensive research with evidence gathering
|
|
159
|
-
# 2. focus
|
|
160
|
-
# └─ Deep multi-AI collaborative reasoning
|
|
161
|
-
`
|
|
162
|
-
};
|
|
163
|
-
// Smart workflow templates that use orchestration
|
|
164
|
-
export const ORCHESTRATED_WORKFLOW_TEMPLATES = {
|
|
165
|
-
smart_code_review: `
|
|
166
|
-
name: "Smart Code Review (Orchestrated)"
|
|
167
|
-
steps:
|
|
168
|
-
- id: orchestrator
|
|
169
|
-
type: tool-orchestrator
|
|
170
|
-
- id: dynamic_analysis
|
|
171
|
-
type: tachibot-mcp-tool
|
|
172
|
-
tool: \${orchestrator.reasoning_tool}
|
|
173
|
-
config:
|
|
174
|
-
selected_by_ai: true
|
|
175
|
-
`,
|
|
176
|
-
adaptive_research: `
|
|
177
|
-
name: "Adaptive Research (Orchestrated)"
|
|
178
|
-
steps:
|
|
179
|
-
- id: orchestrator
|
|
180
|
-
type: tool-orchestrator
|
|
181
|
-
- id: intelligent_research
|
|
182
|
-
type: tachibot-mcp-tool
|
|
183
|
-
tool: \${orchestrator.research_tool}
|
|
184
|
-
variant: \${orchestrator.research_variant}
|
|
185
|
-
`,
|
|
186
|
-
context_aware_problem_solving: `
|
|
187
|
-
name: "Context-Aware Problem Solving"
|
|
188
|
-
steps:
|
|
189
|
-
- id: orchestrator
|
|
190
|
-
type: tool-orchestrator
|
|
191
|
-
config:
|
|
192
|
-
analyze_task: true
|
|
193
|
-
adaptive_selection: true
|
|
194
|
-
- id: contextual_solution
|
|
195
|
-
type: tachibot-mcp-tool
|
|
196
|
-
tool: \${orchestrator.reasoning_tool}
|
|
197
|
-
models: \${orchestrator.recommended_models}
|
|
198
|
-
rounds: \${orchestrator.reasoning_rounds}
|
|
199
|
-
`
|
|
200
|
-
};
|