@gotza02/sequential-thinking 2026.3.2 → 2026.3.4

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.d.ts CHANGED
@@ -69,5 +69,6 @@ export declare class SequentialThinkingServer {
69
69
  status: string;
70
70
  thoughtCount: number;
71
71
  }[];
72
+ getHistoryLength(): number;
72
73
  }
73
74
  export {};
package/dist/lib.js CHANGED
@@ -619,7 +619,7 @@ ${typeof wrappedThought === 'string' && wrappedThought.startsWith('│') ? wrapp
619
619
  if (input.thoughtType === 'observation') {
620
620
  const isError = input.toolResult?.toLowerCase().includes('error');
621
621
  if (isError)
622
- this.confidenceScore -= 20;
622
+ this.confidenceScore -= 10;
623
623
  else
624
624
  this.confidenceScore = Math.min(100, this.confidenceScore + 5);
625
625
  }
@@ -750,4 +750,7 @@ ${typeof wrappedThought === 'string' && wrappedThought.startsWith('│') ? wrapp
750
750
  thoughtCount: b.thoughts.length
751
751
  }));
752
752
  }
753
+ getHistoryLength() {
754
+ return this.thoughtHistory.length;
755
+ }
753
756
  }
@@ -80,8 +80,8 @@ If you have tried to fix the same problem 3 times and failed:
80
80
  'hypothesis', 'reflexion', 'solution',
81
81
  'generation', 'evaluation', 'selection'
82
82
  ]).default('analysis')).describe("The structural role of this thought (see THOUGHT TYPES above)"),
83
- thoughtNumber: z.number().int().min(1).describe("Current thought number (e.g., 1, 2, 3)"),
84
- totalThoughts: z.number().int().min(1).describe("Estimated total thoughts needed (can be adjusted)"),
83
+ thoughtNumber: z.number().int().min(1).optional().describe("Current thought number (e.g., 1, 2, 3)"),
84
+ totalThoughts: z.number().int().min(1).optional().describe("Estimated total thoughts needed (can be adjusted)"),
85
85
  nextThoughtNeeded: z.boolean().optional().default(true).describe("True if more thinking/action is needed"),
86
86
  // New Interleaved Fields
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."),
@@ -98,7 +98,10 @@ If you have tried to fix the same problem 3 times and failed:
98
98
  options: z.array(z.string()).optional().describe("List of options for generation type"),
99
99
  selectedOption: z.string().optional().describe("The option selected for selection type")
100
100
  }, async (args) => {
101
- const result = await thinkingServer.processThought(args);
101
+ const thoughtNumber = args.thoughtNumber ?? (thinkingServer.getHistoryLength() + 1);
102
+ const totalThoughts = args.totalThoughts ?? (thoughtNumber + 5);
103
+ const input = { ...args, thoughtNumber, totalThoughts };
104
+ const result = await thinkingServer.processThought(input);
102
105
  return {
103
106
  content: result.content,
104
107
  isError: result.isError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotza02/sequential-thinking",
3
- "version": "2026.3.2",
3
+ "version": "2026.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },