atlas-pipeline-mcp 1.0.17 → 1.0.18

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.
@@ -0,0 +1,432 @@
1
+ /**
2
+ * Atlas Server - Advanced Sequential Thinking Tool
3
+ *
4
+ * Enhanced reasoning capabilities beyond basic sequential thinking:
5
+ * - Dynamic thought branching with merge support
6
+ * - Hypothesis generation and verification
7
+ * - Confidence scoring and uncertainty tracking
8
+ * - Automatic insight extraction
9
+ * - Deadend detection and smart backtracking
10
+ * - AI-enhanced reasoning when LLM available
11
+ * - Thought summarization and compression
12
+ * - Memory of key conclusions
13
+ */
14
+ import { getActiveProvider, isNoLLMMode } from '../providers/index.js';
15
+ import { logger } from '../utils.js';
16
+ // ============================================================================
17
+ // Thinking Server Class
18
+ // ============================================================================
19
+ export class AdvancedThinkingServer {
20
+ sessions = new Map();
21
+ currentSession = null;
22
+ constructor() {
23
+ logger.debug('AdvancedThinkingServer initialized');
24
+ }
25
+ /**
26
+ * Start a new thinking session
27
+ */
28
+ startSession(problem, sessionId) {
29
+ const id = sessionId ?? `session-${Date.now()}`;
30
+ const session = {
31
+ id,
32
+ startTime: new Date().toISOString(),
33
+ problem,
34
+ thoughts: [],
35
+ branches: {},
36
+ currentBranch: null,
37
+ hypotheses: [],
38
+ keyInsights: [],
39
+ deadEnds: [],
40
+ overallConfidence: 0,
41
+ };
42
+ this.sessions.set(id, session);
43
+ this.currentSession = session;
44
+ return id;
45
+ }
46
+ /**
47
+ * Process a thought and return the result
48
+ */
49
+ async processThought(input) {
50
+ // Get or create session
51
+ if (!this.currentSession) {
52
+ this.startSession(input.problemContext ?? 'General problem solving');
53
+ }
54
+ const session = this.currentSession;
55
+ // Auto-adjust totalThoughts if needed
56
+ if (input.thoughtNumber > input.totalThoughts) {
57
+ input.totalThoughts = input.thoughtNumber;
58
+ }
59
+ // Create thought record
60
+ const thought = {
61
+ ...input,
62
+ timestamp: new Date().toISOString(),
63
+ extractedInsights: [],
64
+ confidenceHistory: [...(session.thoughts[session.thoughts.length - 1]?.confidenceHistory ?? []), input.confidence ?? 0.5],
65
+ };
66
+ // Extract insights from thought
67
+ thought.extractedInsights = this.extractInsights(input.thought);
68
+ // Handle branching
69
+ if (input.branchFromThought && input.branchId) {
70
+ this.handleBranching(session, thought, input.branchId, input.branchFromThought);
71
+ }
72
+ // Handle branch merging
73
+ if (input.mergeBranches && input.mergeBranches.length > 0) {
74
+ this.handleMerge(session, thought, input.mergeBranches);
75
+ }
76
+ // Handle hypothesis
77
+ if (input.thoughtType === 'hypothesis' && input.hypothesis) {
78
+ this.addHypothesis(session, input.hypothesis, input.thoughtNumber);
79
+ }
80
+ // Handle verification
81
+ if (input.thoughtType === 'verification' && input.verificationResult) {
82
+ this.updateHypothesisStatus(session, input.verificationResult, input.thoughtNumber);
83
+ }
84
+ // Handle dead end
85
+ if (input.isDeadEnd) {
86
+ this.recordDeadEnd(session, thought);
87
+ }
88
+ // Record key insight
89
+ if (input.keyInsight) {
90
+ session.keyInsights.push(input.keyInsight);
91
+ }
92
+ // Add thought to history
93
+ session.thoughts.push(thought);
94
+ // Update confidence
95
+ session.overallConfidence = this.calculateOverallConfidence(session);
96
+ // Get AI enhancement if available
97
+ let aiSuggestion;
98
+ let recommendedNextStep;
99
+ if (!isNoLLMMode() && input.nextThoughtNeeded) {
100
+ try {
101
+ const enhancement = await this.getAIEnhancement(session, thought);
102
+ aiSuggestion = enhancement.suggestion;
103
+ recommendedNextStep = enhancement.nextStep;
104
+ thought.aiEnhancement = enhancement.suggestion;
105
+ }
106
+ catch (error) {
107
+ logger.warn({ error }, 'AI enhancement failed');
108
+ }
109
+ }
110
+ // Generate conclusion if this is the final thought
111
+ let conclusion;
112
+ if (!input.nextThoughtNeeded) {
113
+ conclusion = this.generateConclusion(session);
114
+ session.conclusion = conclusion;
115
+ }
116
+ // Build result
117
+ const result = {
118
+ thoughtNumber: input.thoughtNumber,
119
+ totalThoughts: input.totalThoughts,
120
+ nextThoughtNeeded: input.nextThoughtNeeded,
121
+ currentBranch: session.currentBranch,
122
+ branches: Object.keys(session.branches),
123
+ thoughtHistoryLength: session.thoughts.length,
124
+ currentConfidence: session.overallConfidence,
125
+ activeHypotheses: session.hypotheses.filter(h => h.status === 'testing' || h.status === 'proposed').length,
126
+ keyInsightsCount: session.keyInsights.length,
127
+ deadEndsEncountered: session.deadEnds.length,
128
+ aiSuggestion,
129
+ recommendedNextStep,
130
+ progressSummary: this.generateProgressSummary(session, input.thoughtNumber),
131
+ conclusion,
132
+ };
133
+ return result;
134
+ }
135
+ /**
136
+ * Extract insights from thought text
137
+ */
138
+ extractInsights(thought) {
139
+ const insights = [];
140
+ // Look for key phrases that indicate insights
141
+ const insightPatterns = [
142
+ /(?:i realize|i notice|key point|important|crucial|this means|therefore|thus|hence|conclusion|insight)/gi,
143
+ /(?:the pattern is|this suggests|this indicates|this shows)/gi,
144
+ ];
145
+ const sentences = thought.split(/[.!?]+/).filter(s => s.trim());
146
+ for (const sentence of sentences) {
147
+ for (const pattern of insightPatterns) {
148
+ if (pattern.test(sentence)) {
149
+ insights.push(sentence.trim());
150
+ break;
151
+ }
152
+ }
153
+ }
154
+ return insights;
155
+ }
156
+ /**
157
+ * Handle branching logic
158
+ */
159
+ handleBranching(session, thought, branchId, fromThought) {
160
+ if (!session.branches[branchId]) {
161
+ session.branches[branchId] = {
162
+ id: branchId,
163
+ parentThought: fromThought,
164
+ thoughts: [],
165
+ status: 'active',
166
+ };
167
+ }
168
+ session.branches[branchId].thoughts.push(thought);
169
+ session.currentBranch = branchId;
170
+ }
171
+ /**
172
+ * Handle merging of branches
173
+ */
174
+ handleMerge(session, thought, branchIds) {
175
+ const mergedInsights = [];
176
+ for (const branchId of branchIds) {
177
+ const branch = session.branches[branchId];
178
+ if (branch) {
179
+ branch.status = 'merged';
180
+ // Collect insights from merged branches
181
+ for (const t of branch.thoughts) {
182
+ mergedInsights.push(...t.extractedInsights);
183
+ }
184
+ if (branch.conclusion) {
185
+ mergedInsights.push(branch.conclusion);
186
+ }
187
+ }
188
+ }
189
+ // Add merged insights to current thought
190
+ thought.extractedInsights.push(...mergedInsights);
191
+ session.currentBranch = null;
192
+ }
193
+ /**
194
+ * Add a new hypothesis
195
+ */
196
+ addHypothesis(session, statement, thoughtNumber) {
197
+ session.hypotheses.push({
198
+ id: `hyp-${session.hypotheses.length + 1}`,
199
+ statement,
200
+ proposedAt: thoughtNumber,
201
+ status: 'proposed',
202
+ evidence: [],
203
+ confidence: 0.5,
204
+ });
205
+ }
206
+ /**
207
+ * Update hypothesis status based on verification
208
+ */
209
+ updateHypothesisStatus(session, result, thoughtNumber) {
210
+ // Update the most recent hypothesis being tested
211
+ const testingHypothesis = [...session.hypotheses].reverse().find(h => h.status === 'testing' || h.status === 'proposed');
212
+ if (testingHypothesis) {
213
+ switch (result) {
214
+ case 'confirmed':
215
+ testingHypothesis.status = 'confirmed';
216
+ testingHypothesis.confidence = 0.9;
217
+ break;
218
+ case 'refuted':
219
+ testingHypothesis.status = 'refuted';
220
+ testingHypothesis.confidence = 0.1;
221
+ break;
222
+ case 'partial':
223
+ testingHypothesis.status = 'partial';
224
+ testingHypothesis.confidence = 0.6;
225
+ break;
226
+ default:
227
+ testingHypothesis.confidence = 0.5;
228
+ }
229
+ testingHypothesis.evidence.push({
230
+ thoughtNumber,
231
+ type: result === 'confirmed' ? 'supports' : result === 'refuted' ? 'refutes' : 'neutral',
232
+ description: `Verification at thought ${thoughtNumber}`,
233
+ weight: 1,
234
+ });
235
+ }
236
+ }
237
+ /**
238
+ * Record a dead end
239
+ */
240
+ recordDeadEnd(session, thought) {
241
+ // Find the best point to backtrack to
242
+ const backtrackTo = this.findBacktrackPoint(session, thought.thoughtNumber);
243
+ session.deadEnds.push({
244
+ thoughtNumber: thought.thoughtNumber,
245
+ reason: thought.thought,
246
+ lessonsLearned: thought.extractedInsights,
247
+ backtrackTo,
248
+ });
249
+ // Mark current branch as deadend if in a branch
250
+ if (session.currentBranch && session.branches[session.currentBranch]) {
251
+ session.branches[session.currentBranch].status = 'deadend';
252
+ }
253
+ }
254
+ /**
255
+ * Find the best point to backtrack to
256
+ */
257
+ findBacktrackPoint(session, currentThought) {
258
+ // Look for the last branching point or hypothesis
259
+ for (let i = session.thoughts.length - 1; i >= 0; i--) {
260
+ const t = session.thoughts[i];
261
+ if (t && (t.thoughtType === 'hypothesis' || t.branchFromThought)) {
262
+ return t.thoughtNumber;
263
+ }
264
+ }
265
+ return 1; // Backtrack to beginning if no better point found
266
+ }
267
+ /**
268
+ * Calculate overall confidence
269
+ */
270
+ calculateOverallConfidence(session) {
271
+ if (session.thoughts.length === 0)
272
+ return 0;
273
+ // Factors: hypothesis confirmation, dead ends, insight count
274
+ let confidence = 0.5;
275
+ // Boost for confirmed hypotheses
276
+ const confirmedCount = session.hypotheses.filter(h => h.status === 'confirmed').length;
277
+ confidence += confirmedCount * 0.1;
278
+ // Penalty for dead ends
279
+ confidence -= session.deadEnds.length * 0.05;
280
+ // Boost for insights
281
+ confidence += Math.min(session.keyInsights.length * 0.02, 0.2);
282
+ // Use latest thought confidence if available
283
+ const lastConfidence = session.thoughts[session.thoughts.length - 1]?.confidence;
284
+ if (lastConfidence !== undefined) {
285
+ confidence = (confidence + lastConfidence) / 2;
286
+ }
287
+ return Math.max(0, Math.min(1, confidence));
288
+ }
289
+ /**
290
+ * Get AI enhancement for the current thinking
291
+ */
292
+ async getAIEnhancement(session, currentThought) {
293
+ const provider = await getActiveProvider();
294
+ const recentThoughts = session.thoughts.slice(-5).map(t => t.thought).join('\n');
295
+ const hypotheses = session.hypotheses.map(h => `- ${h.statement} (${h.status})`).join('\n');
296
+ const insights = session.keyInsights.join('\n- ');
297
+ const prompt = `You are helping with step-by-step reasoning about: "${session.problem}"
298
+
299
+ Recent thoughts:
300
+ ${recentThoughts}
301
+
302
+ Current hypotheses:
303
+ ${hypotheses || 'None yet'}
304
+
305
+ Key insights so far:
306
+ ${insights || 'None yet'}
307
+
308
+ Current thought: ${currentThought.thought}
309
+ Current confidence: ${(session.overallConfidence * 100).toFixed(0)}%
310
+
311
+ Provide:
312
+ 1. A brief suggestion to improve the current reasoning (1-2 sentences)
313
+ 2. A recommended next step (1 sentence)
314
+
315
+ Format as JSON: {"suggestion": "...", "nextStep": "..."}`;
316
+ const response = await provider.completeJson(prompt, {
317
+ systemPrompt: 'You are a reasoning assistant. Be concise and helpful.',
318
+ temperature: 0.5,
319
+ maxTokens: 200,
320
+ });
321
+ return response.data ?? { suggestion: '', nextStep: '' };
322
+ }
323
+ /**
324
+ * Generate a progress summary
325
+ */
326
+ generateProgressSummary(session, thoughtNumber) {
327
+ const parts = [];
328
+ parts.push(`Thought ${thoughtNumber}/${session.thoughts.length > 0 ? Math.max(...session.thoughts.map(t => t.totalThoughts)) : '?'}`);
329
+ if (session.hypotheses.length > 0) {
330
+ const confirmed = session.hypotheses.filter(h => h.status === 'confirmed').length;
331
+ const testing = session.hypotheses.filter(h => h.status === 'testing' || h.status === 'proposed').length;
332
+ parts.push(`Hypotheses: ${confirmed} confirmed, ${testing} testing`);
333
+ }
334
+ if (session.keyInsights.length > 0) {
335
+ parts.push(`${session.keyInsights.length} key insights`);
336
+ }
337
+ if (session.deadEnds.length > 0) {
338
+ parts.push(`${session.deadEnds.length} dead ends avoided`);
339
+ }
340
+ if (Object.keys(session.branches).length > 0) {
341
+ parts.push(`${Object.keys(session.branches).length} branches explored`);
342
+ }
343
+ parts.push(`Confidence: ${(session.overallConfidence * 100).toFixed(0)}%`);
344
+ return parts.join(' | ');
345
+ }
346
+ /**
347
+ * Generate final conclusion
348
+ */
349
+ generateConclusion(session) {
350
+ // Find the most confident hypothesis
351
+ const confirmedHypotheses = session.hypotheses
352
+ .filter(h => h.status === 'confirmed')
353
+ .sort((a, b) => b.confidence - a.confidence);
354
+ // Collect supporting evidence
355
+ const supportingThoughts = session.thoughts
356
+ .filter(t => t.confidence && t.confidence > 0.7)
357
+ .map(t => t.thoughtNumber);
358
+ // Find alternative approaches that were considered
359
+ const alternatives = session.hypotheses
360
+ .filter(h => h.status === 'refuted' || h.status === 'partial')
361
+ .map(h => h.statement);
362
+ // Identify caveats
363
+ const caveats = [];
364
+ if (session.deadEnds.length > 0) {
365
+ caveats.push(`${session.deadEnds.length} approach(es) were found to be dead ends`);
366
+ }
367
+ if (session.overallConfidence < 0.7) {
368
+ caveats.push('Moderate uncertainty remains in this conclusion');
369
+ }
370
+ // Generate answer
371
+ let answer = '';
372
+ if (confirmedHypotheses.length > 0) {
373
+ answer = confirmedHypotheses.map(h => h.statement).join('. ');
374
+ }
375
+ else if (session.keyInsights.length > 0) {
376
+ answer = session.keyInsights.join('. ');
377
+ }
378
+ else {
379
+ const lastThought = session.thoughts[session.thoughts.length - 1];
380
+ answer = lastThought?.thought ?? 'No conclusion reached';
381
+ }
382
+ return {
383
+ answer,
384
+ confidence: session.overallConfidence,
385
+ supportingThoughts,
386
+ alternativeConsidered: alternatives,
387
+ caveats,
388
+ };
389
+ }
390
+ /**
391
+ * Get current session
392
+ */
393
+ getSession() {
394
+ return this.currentSession;
395
+ }
396
+ /**
397
+ * Reset the server
398
+ */
399
+ reset() {
400
+ this.sessions.clear();
401
+ this.currentSession = null;
402
+ }
403
+ }
404
+ // ============================================================================
405
+ // Singleton Instance
406
+ // ============================================================================
407
+ const thinkingServer = new AdvancedThinkingServer();
408
+ /**
409
+ * Process a thought using the advanced thinking server
410
+ */
411
+ export async function processThought(input) {
412
+ return thinkingServer.processThought(input);
413
+ }
414
+ /**
415
+ * Start a new thinking session
416
+ */
417
+ export function startSession(problem) {
418
+ return thinkingServer.startSession(problem);
419
+ }
420
+ /**
421
+ * Reset the thinking server
422
+ */
423
+ export function resetThinking() {
424
+ thinkingServer.reset();
425
+ }
426
+ /**
427
+ * Get the current session
428
+ */
429
+ export function getCurrentSession() {
430
+ return thinkingServer.getSession();
431
+ }
432
+ //# sourceMappingURL=think.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"think.js","sourceRoot":"","sources":["../../src/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AAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,cAAc,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,cAAc,CAAC,UAAU,EAAE,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "atlas-pipeline-mcp",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "mcpName": "io.github.IamNishant51/atlas-pipeline",
5
- "description": "Model Context Protocol server with multi-stage AI pipeline - works with any LLM provider (Ollama, OpenAI, Anthropic). Compatible with Cursor, GitHub Copilot, Windsurf, and more.",
5
+ "description": "Model Context Protocol server with multi-stage AI pipeline - works with any LLM provider (Ollama, OpenAI, Anthropic). Compatible with Cursor, GitHub Copilot, Windsurf, and more. Features 14 tools including security scanning, test generation, code explanation, and debugging assistance.",
6
6
  "main": "dist/server.js",
7
7
  "bin": {
8
8
  "atlas-pipeline-mcp": "./dist/mcp.js",