@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 +1 -0
- package/dist/lib.js +4 -1
- package/dist/tools/thinking.js +6 -3
- package/package.json +1 -1
package/dist/lib.d.ts
CHANGED
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 -=
|
|
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
|
}
|
package/dist/tools/thinking.js
CHANGED
|
@@ -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
|
|
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
|