@gotza02/sequential-thinking 2026.3.8 → 2026.3.9

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.
@@ -87,21 +87,8 @@ 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.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."),
90
+ complexity: z.string().optional()
91
+ .describe("Task complexity level. 'low': simple tasks, less strict. 'medium': standard. 'high': critical, requires critique & double verification."),
105
92
  // Legacy Fields (backwards compatible)
106
93
  isRevision: z.boolean().optional().describe("Whether this revises previous thinking"),
107
94
  revisesThought: z.number().int().min(1).optional().describe("Which thought number is being reconsidered"),
@@ -114,14 +101,30 @@ If you have tried to fix the same problem 3 times and failed:
114
101
  }, async (args) => {
115
102
  try {
116
103
  const thoughtNumber = args.thoughtNumber ?? (thinkingServer.getHistoryLength() + 1);
104
+ // Normalize complexity manually since we removed z.preprocess to avoid schema validation errors
105
+ let complexity = 'medium';
106
+ if (args.complexity) {
107
+ const v = args.complexity.toLowerCase();
108
+ if (['low', 'simple', 'easy', 'basic'].includes(v))
109
+ complexity = 'low';
110
+ else if (['high', 'critical', 'expert', 'very high'].includes(v))
111
+ complexity = 'high';
112
+ else
113
+ complexity = 'medium';
114
+ }
117
115
  // Smart defaults for totalThoughts based on complexity
118
116
  let defaultAdd = 5;
119
- if (args.complexity === 'low')
117
+ if (complexity === 'low')
120
118
  defaultAdd = 3;
121
- else if (args.complexity === 'high')
119
+ else if (complexity === 'high')
122
120
  defaultAdd = 8;
123
121
  const totalThoughts = args.totalThoughts ?? (thoughtNumber + defaultAdd);
124
- const input = { ...args, thoughtNumber, totalThoughts };
122
+ const input = {
123
+ ...args,
124
+ thoughtNumber,
125
+ totalThoughts,
126
+ complexity: complexity
127
+ };
125
128
  const result = await thinkingServer.processThought(input);
126
129
  return {
127
130
  content: result.content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotza02/sequential-thinking",
3
- "version": "2026.3.8",
3
+ "version": "2026.3.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },