@nbiish/cognitive-tools-mcp 0.9.12 → 0.9.14

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.
Files changed (2) hide show
  1. package/build/index.js +10 -7
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -254,16 +254,19 @@ server.tool("plan_and_solve", "Guides *internal generation* of a **structured pl
254
254
  logToolCall(toolName);
255
255
  try {
256
256
  if (!generated_plan_text || typeof generated_plan_text !== 'string' || !task_objective || typeof task_objective !== 'string') {
257
- throw new Error('Both generated_plan_text and task_objective must be non-empty strings.');
258
- }
259
- if (!generated_plan_text.match(/phase|step|goal|objective|:\s|^\d+[\.\)]/im)) {
260
- throw new Error('Invalid plan format: Must contain clear sections (phases, steps, goals) with proper structure.');
261
- }
262
- if (!generated_plan_text.toLowerCase().includes('risk') && !generated_plan_text.toLowerCase().includes('challenge')) {
263
- throw new Error('Invalid plan format: Must include risk/challenge assessment.');
257
+ throw new Error("Missing or invalid required parameters: 'generated_plan_text' and 'task_objective' must be non-empty strings.");
264
258
  }
259
+ // Basic structure check (optional, less strict)
260
+ // if (!generated_plan_text.match(/phase|step|goal|objective|:\\s|^\\d+[\\.\\)]/im)) {
261
+ // console.warn(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Warning: Plan structure might be basic. Consider using clear steps/phases.`);
262
+ // }
263
+ // Removed strict validation for risk/challenge
264
+ // if (!generated_plan_text.toLowerCase().includes('risk') && !generated_plan_text.toLowerCase().includes('challenge')) {
265
+ // throw new Error("Invalid plan format: Must include risk/challenge assessment.");
266
+ // }
265
267
  logToolResult(toolName, true, `Task: ${task_objective.substring(0, 50)}...`);
266
268
  console.error(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Details:\nTask: ${task_objective}\nPlan:\n${generated_plan_text}`);
269
+ // Return the plan text directly (potentially formatted as markdown if needed, but currently just text)
267
270
  return { content: [{ type: "text", text: generated_plan_text }] };
268
271
  }
269
272
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbiish/cognitive-tools-mcp",
3
- "version": "0.9.12",
3
+ "version": "0.9.14",
4
4
  "description": "Cognitive Tools MCP: SOTA reasoning suite focused on iterative refinement and tool integration for AI Pair Programming. Enables structured, iterative problem-solving through Chain of Draft methodology, with tools for draft generation, analysis, and refinement. 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",