@nbiish/cognitive-tools-mcp 0.8.3 → 0.8.5
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/README.md +5 -1
- package/build/index.js +20 -20
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<hr width="50%">
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Gikendaasowin Aabajichiganan - (Cognitive Tools v0.8.
|
|
21
|
+
ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Gikendaasowin Aabajichiganan - (Cognitive Tools v0.8.5): SOTA reasoning suite aligned with AI Pair Programmer Prompt v0.8.1+. Enforces structured deliberation via `think` after explicit assessment or action results. Returns generated cognitive content (thoughts, plans, CoT, critiques, summaries) for explicit analysis and action planning, optimizing for cognitive enhancement and effective tool integration. Features advanced deliberation (`think`), rapid checks (`quick_think`), mandatory complexity assessment & thought mode selection (`assess_cuc_n_mode`), context synthesis, confidence gauging, proactive planning, explicit reasoning (CoT), and reflection.
|
|
22
22
|
|
|
23
23
|
Known as:
|
|
24
24
|
- Anishinaabemowin: [`@nbiish/gikendaasowin-aabajichiganan-mcp`](https://www.npmjs.com/package/@nbiish/gikendaasowin-aabajichiganan-mcp)
|
|
@@ -26,6 +26,8 @@ Known as:
|
|
|
26
26
|
|
|
27
27
|
Both packages are maintained in parallel and receive the same updates. You can use either package name in your projects - they provide identical functionality.
|
|
28
28
|
|
|
29
|
+
**See the latest integration details in [`integration-prompts/integration-prompt-12.md`](integration-prompts/integration-prompt-12.md).**
|
|
30
|
+
|
|
29
31
|
## Features
|
|
30
32
|
|
|
31
33
|
Provides five cognitive tools for AI agents:
|
|
@@ -215,6 +217,8 @@ Example Response:
|
|
|
215
217
|
|
|
216
218
|
## Version History
|
|
217
219
|
|
|
220
|
+
- **0.8.5**: Version update to resolve npm publish conflicts and maintain consistency between packages. Continues using the shortened tool name `assess_cuc_n_mode` to comply with MCP tool name length requirements.
|
|
221
|
+
- **0.8.4**: Version bump to align packages after updating the tool name from `assess_complexity_and_select_thought_mode` to `assess_cuc_n_mode`. Ensures consistent naming across all files.
|
|
218
222
|
- **0.8.3**: Updated package version to maintain consistency between `gikendaasowin-aabajichiganan-mcp` and `cognitive-tools-mcp` packages. Ensures all references to the tool use the shortened name `assess_cuc_n_mode`.
|
|
219
223
|
- **0.8.2**: Removed integration prompt references from codebase and made various refinements. Shortened `assess_complexity_and_select_thought_mode` to `assess_cuc_n_mode` to address MCP tool name length limitation.
|
|
220
224
|
- **0.8.1**: Updated tool function to integrate with external tools, renamed `assess_cuc_n_mode` to `assess_complexity_and_select_thought_mode`, improved validation of thought structure, aligned with AI Pair Programmer Prompt v0.8.1+
|
package/build/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import { z } from "zod";
|
|
|
5
5
|
// Create the MCP server - Version aligned with prompt
|
|
6
6
|
const server = new McpServer({
|
|
7
7
|
name: "gikendaasowin-aabajichiganan-mcp",
|
|
8
|
-
version: "0.8.
|
|
9
|
-
description: "ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Gikendaasowin Aabajichiganan - (Cognitive Tools v0.8.
|
|
8
|
+
version: "0.8.5", // Updated version to match prompt
|
|
9
|
+
description: "ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Gikendaasowin Aabajichiganan - (Cognitive Tools v0.8.5): SOTA reasoning suite aligned with AI Pair Programmer Prompt v0.8.1+. Enforces structured deliberation via `think` after explicit assessment or action results. Returns generated cognitive content (thoughts, plans, CoT, critiques, summaries) for explicit analysis and action planning, optimizing for cognitive enhancement and effective tool integration."
|
|
10
10
|
});
|
|
11
11
|
// --- Core Cognitive Deliberation Tools ---
|
|
12
12
|
server.tool("think",
|
|
@@ -23,11 +23,11 @@ server.tool("think",
|
|
|
23
23
|
// Simple check for presence; more robust parsing could be added if needed
|
|
24
24
|
const hasRequiredSections = requiredSections.every(section => thought.includes(section));
|
|
25
25
|
if (!hasRequiredSections) {
|
|
26
|
-
console.warn(`[CognitiveToolsServer v0.8.
|
|
26
|
+
console.warn(`[CognitiveToolsServer v0.8.5] Warning: 'think' input might be missing some mandatory sections.`);
|
|
27
27
|
// Decide whether to throw error or just warn. Warning allows flexibility.
|
|
28
28
|
// throw new Error('Invalid thought: Missing one or more mandatory sections (## Analysis:, ## Plan:, etc.).');
|
|
29
29
|
}
|
|
30
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
30
|
+
console.error(`[CognitiveToolsServer v0.8.5] Think Tool Received: ${thought.substring(0, 150)}...`);
|
|
31
31
|
// Returns the same thought text received, making it explicit in context.
|
|
32
32
|
return { content: [{ type: "text", text: thought }] };
|
|
33
33
|
});
|
|
@@ -39,7 +39,7 @@ server.tool("quick_think",
|
|
|
39
39
|
if (!brief_thought || typeof brief_thought !== 'string' || brief_thought.trim().length === 0) {
|
|
40
40
|
throw new Error('Invalid brief_thought: Must be non-empty.');
|
|
41
41
|
}
|
|
42
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
42
|
+
console.error(`[CognitiveToolsServer v0.8.5] QuickThink Tool Logged: ${brief_thought.substring(0, 100)}...`);
|
|
43
43
|
// Simple confirmation remains appropriate for quick_think.
|
|
44
44
|
return { content: [{ type: "text", text: `Quick Thought logged successfully.` }] };
|
|
45
45
|
});
|
|
@@ -56,7 +56,7 @@ server.tool("assess_cuc_n_mode", // Shortened name to avoid length limitations
|
|
|
56
56
|
if (!assessment_and_choice || typeof assessment_and_choice !== 'string' || !hasRequiredPhrases || !hasModeSelection) {
|
|
57
57
|
throw new Error('Invalid assessment: String must include CUC-N ratings, Recommended Initial Strategy, and explicit Selected Mode ("think" or "quick_think").');
|
|
58
58
|
}
|
|
59
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
59
|
+
console.error(`[CognitiveToolsServer v0.8.5] AssessComplexity Tool Signaled: ${assessment_and_choice.substring(0, 150)}...`);
|
|
60
60
|
const mode = assessment_and_choice.includes("Selected Mode: think") ? "think" : "quick_think";
|
|
61
61
|
// Confirmation guides the next step.
|
|
62
62
|
return { content: [{ type: "text", text: `Cognitive Assessment Completed. Proceeding with selected mode: ${mode}. Full Assessment: ${assessment_and_choice}` }] };
|
|
@@ -73,7 +73,7 @@ server.tool("gauge_confidence",
|
|
|
73
73
|
}
|
|
74
74
|
const match = assessment_and_confidence.match(confidenceRegex);
|
|
75
75
|
const level = match ? match[1] : "Unknown";
|
|
76
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
76
|
+
console.error(`[CognitiveToolsServer v0.8.5] GaugeConfidence Tool Signaled: Level ${level}`);
|
|
77
77
|
// Confirmation includes level, prepares for mandatory analysis.
|
|
78
78
|
return { content: [{ type: "text", text: `Confidence Gauge Completed. Level: ${level}. Assessment Text: ${assessment_and_confidence}. Ready for mandatory post-assessment 'think' analysis (action required if Low/Medium).` }] };
|
|
79
79
|
});
|
|
@@ -91,7 +91,7 @@ server.tool("plan_and_solve",
|
|
|
91
91
|
if (!task_objective || typeof task_objective !== 'string' || task_objective.trim().length === 0) {
|
|
92
92
|
throw new Error('Invalid task_objective.');
|
|
93
93
|
}
|
|
94
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
94
|
+
console.error(`[CognitiveToolsServer v0.8.5] PlanAndSolve Tool Received Plan for Objective: ${task_objective.substring(0, 100)}...`);
|
|
95
95
|
// Returns the actual plan text received for analysis.
|
|
96
96
|
return { content: [{ type: "text", text: generated_plan_text }] };
|
|
97
97
|
});
|
|
@@ -108,7 +108,7 @@ server.tool("chain_of_thought",
|
|
|
108
108
|
if (!problem_statement || typeof problem_statement !== 'string' || problem_statement.trim().length === 0) {
|
|
109
109
|
throw new Error('Invalid problem_statement.');
|
|
110
110
|
}
|
|
111
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
111
|
+
console.error(`[CognitiveToolsServer v0.8.5] ChainOfThought Tool Received CoT for Problem: ${problem_statement.substring(0, 100)}...`);
|
|
112
112
|
// Returns the actual CoT text received for analysis.
|
|
113
113
|
return { content: [{ type: "text", text: generated_cot_text }] };
|
|
114
114
|
});
|
|
@@ -121,7 +121,7 @@ server.tool("chain_of_draft",
|
|
|
121
121
|
if (!problem_statement || typeof problem_statement !== 'string' || problem_statement.trim().length === 0) {
|
|
122
122
|
throw new Error('Invalid problem statement.');
|
|
123
123
|
}
|
|
124
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
124
|
+
console.error(`[CognitiveToolsServer v0.8.5] ChainOfDraft Tool Signaled for: ${problem_statement.substring(0, 100)}...`);
|
|
125
125
|
// Returns confirmation, strongly reminding LLM of the mandatory next step.
|
|
126
126
|
return { content: [{ type: "text", text: `Reasoning drafts generated internally for problem: ${problem_statement}. MANDATORY: Analyze these drafts now in your next 'think' step.` }] };
|
|
127
127
|
});
|
|
@@ -138,7 +138,7 @@ server.tool("reflection",
|
|
|
138
138
|
if (!input_reasoning_or_plan || typeof input_reasoning_or_plan !== 'string' || input_reasoning_or_plan.trim().length === 0) {
|
|
139
139
|
throw new Error('Invalid input_reasoning_or_plan.');
|
|
140
140
|
}
|
|
141
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
141
|
+
console.error(`[CognitiveToolsServer v0.8.5] Reflection Tool Received Critique for: ${input_reasoning_or_plan.substring(0, 100)}...`);
|
|
142
142
|
// Returns the actual critique text received for analysis.
|
|
143
143
|
return { content: [{ type: "text", text: generated_critique_text }] };
|
|
144
144
|
});
|
|
@@ -155,30 +155,30 @@ server.tool("synthesize_prior_reasoning",
|
|
|
155
155
|
if (!context_to_summarize_description || typeof context_to_summarize_description !== 'string' || context_to_summarize_description.trim().length === 0) {
|
|
156
156
|
throw new Error('Invalid context_to_summarize_description.');
|
|
157
157
|
}
|
|
158
|
-
console.error(`[CognitiveToolsServer v0.8.
|
|
158
|
+
console.error(`[CognitiveToolsServer v0.8.5] SynthesizeReasoning Tool Received Summary for: ${context_to_summarize_description}...`);
|
|
159
159
|
// Returns the actual summary text received for analysis.
|
|
160
160
|
return { content: [{ type: "text", text: generated_summary_text }] };
|
|
161
161
|
});
|
|
162
162
|
// --- Server Lifecycle and Error Handling (Unchanged) ---
|
|
163
163
|
process.on('SIGINT', async () => {
|
|
164
|
-
console.error('\n[CognitiveToolsServer v0.8.
|
|
164
|
+
console.error('\n[CognitiveToolsServer v0.8.5] Received SIGINT, shutting down gracefully.');
|
|
165
165
|
await server.close();
|
|
166
166
|
process.exit(0);
|
|
167
167
|
});
|
|
168
168
|
process.on('SIGTERM', async () => {
|
|
169
|
-
console.error('\n[CognitiveToolsServer v0.8.
|
|
169
|
+
console.error('\n[CognitiveToolsServer v0.8.5] Received SIGTERM, shutting down gracefully.');
|
|
170
170
|
await server.close();
|
|
171
171
|
process.exit(0);
|
|
172
172
|
});
|
|
173
173
|
process.on('uncaughtException', (error) => {
|
|
174
|
-
console.error('[CognitiveToolsServer v0.8.
|
|
175
|
-
server.close().catch(err => console.error('[CognitiveToolsServer v0.8.
|
|
174
|
+
console.error('[CognitiveToolsServer v0.8.5] FATAL: Uncaught Exception:', error);
|
|
175
|
+
server.close().catch(err => console.error('[CognitiveToolsServer v0.8.5] Error during shutdown on uncaughtException:', err)).finally(() => {
|
|
176
176
|
process.exit(1);
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
179
|
process.on('unhandledRejection', (reason, promise) => {
|
|
180
|
-
console.error('[CognitiveToolsServer v0.8.
|
|
181
|
-
server.close().catch(err => console.error('[CognitiveToolsServer v0.8.
|
|
180
|
+
console.error('[CognitiveToolsServer v0.8.5] FATAL: Unhandled Promise Rejection:', reason);
|
|
181
|
+
server.close().catch(err => console.error('[CognitiveToolsServer v0.8.5] Error during shutdown on unhandledRejection:', err)).finally(() => {
|
|
182
182
|
process.exit(1);
|
|
183
183
|
});
|
|
184
184
|
});
|
|
@@ -187,10 +187,10 @@ async function main() {
|
|
|
187
187
|
try {
|
|
188
188
|
const transport = new StdioServerTransport();
|
|
189
189
|
await server.connect(transport);
|
|
190
|
-
console.error('ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Gikendaasowin Aabajichiganan - (Cognitive Tools v0.8.
|
|
190
|
+
console.error('ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Gikendaasowin Aabajichiganan - (Cognitive Tools v0.8.5) MCP Server running on stdio');
|
|
191
191
|
}
|
|
192
192
|
catch (error) {
|
|
193
|
-
console.error('[CognitiveToolsServer v0.8.
|
|
193
|
+
console.error('[CognitiveToolsServer v0.8.5] Fatal error during startup:', error);
|
|
194
194
|
process.exit(1);
|
|
195
195
|
}
|
|
196
196
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nbiish/cognitive-tools-mcp",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Cognitive Tools MCP v0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
|
+
"description": "Cognitive Tools MCP v0.8.5: SOTA reasoning suite aligned with AI Pair Programmer Prompt v0.8.1+. Features advanced deliberation (`think`), rapid checks (`quick_think`), mandatory complexity assessment & thought mode selection (`assess_cuc_n_mode`), context synthesis, confidence gauging, proactive planning, explicit reasoning (CoT), and reflection with content return. Alternative package name for gikendaasowin-aabajichiganan-mcp.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|