@gotza02/sequential-thinking 2026.3.4 → 2026.3.6

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/dist/lib.js CHANGED
@@ -445,13 +445,13 @@ ${typeof wrappedThought === 'string' && wrappedThought.startsWith('│') ? wrapp
445
445
  }
446
446
  }
447
447
  // --- 📊 FEATURE 4: Meta-Cognition Score Check ---
448
- if (this.confidenceScore < 50) {
448
+ if (this.confidenceScore < 50 && input.thoughtType !== 'reflexion' && input.thoughtType !== 'analysis') {
449
449
  return {
450
450
  content: [{
451
451
  type: "text",
452
452
  text: JSON.stringify({
453
453
  status: "CRITICAL_STOP",
454
- feedback: ["🚨 CONFIDENCE TOO LOW (<50). Please request human intervention via 'ask_human' tool."],
454
+ feedback: ["🚨 CONFIDENCE TOO LOW (<50). Execution blocked. Please use 'reflexion' or 'analysis' to self-correct, or request human intervention."],
455
455
  confidenceScore: this.confidenceScore
456
456
  }, null, 2)
457
457
  }],
@@ -87,7 +87,21 @@ If you have tried to fix the same problem 3 times and failed:
87
87
  blockId: z.string().optional().describe("ID for the current topic block (e.g., 'auth-debug', 'api-research'). Keep same ID to stay in context."),
88
88
  relatedToolCall: z.string().optional().describe("If type='execution', specify the tool name here (e.g., 'read_file', 'edit_file')"),
89
89
  toolResult: z.string().optional().describe("If type='observation', summarize the key findings from the tool output here"),
90
- complexity: z.enum(['low', 'medium', 'high']).optional().describe("Task complexity level. 'low': simple tasks, less strict. 'medium': standard. 'high': critical, requires critique & double verification."),
90
+ complexity: z.preprocess((val) => {
91
+ if (typeof val !== 'string')
92
+ return val;
93
+ const v = val.toLowerCase();
94
+ if (['simple', 'easy', 'basic'].includes(v))
95
+ return 'low';
96
+ if (['standard', 'normal', 'regular'].includes(v))
97
+ return 'medium';
98
+ if (['critical', 'expert', 'very high'].includes(v))
99
+ return 'high';
100
+ // If it's a string but not one of the enum values, default to medium
101
+ if (!['low', 'medium', 'high'].includes(v))
102
+ return 'medium';
103
+ return v;
104
+ }, z.enum(['low', 'medium', 'high']).optional()).describe("Task complexity level. 'low': simple tasks, less strict. 'medium': standard. 'high': critical, requires critique & double verification."),
91
105
  // Legacy Fields (backwards compatible)
92
106
  isRevision: z.boolean().optional().describe("Whether this revises previous thinking"),
93
107
  revisesThought: z.number().int().min(1).optional().describe("Which thought number is being reconsidered"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotza02/sequential-thinking",
3
- "version": "2026.3.4",
3
+ "version": "2026.3.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },