@gotza02/sequential-thinking 2026.1.25 → 2026.1.26
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/README.md +10 -0
- package/dist/index.js +1 -1
- package/dist/lib.js +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,6 +148,11 @@ The Sequential Thinking tool is designed for:
|
|
|
148
148
|
|
|
149
149
|
## Configuration
|
|
150
150
|
|
|
151
|
+
### Environment Variables
|
|
152
|
+
- `THOUGHT_DELAY_MS`: (Optional) Milliseconds to wait before processing each thought. Default: `0`.
|
|
153
|
+
- `DISABLE_THOUGHT_LOGGING`: (Optional) Set to `true` to hide colored logs.
|
|
154
|
+
- `THOUGHTS_STORAGE_PATH`: (Optional) Path to history file. Default: `thoughts_history.json`.
|
|
155
|
+
|
|
151
156
|
### Usage with Claude Desktop
|
|
152
157
|
|
|
153
158
|
Add this to your `claude_desktop_config.json`. You can configure API keys directly here:
|
|
@@ -193,6 +198,11 @@ npm run build
|
|
|
193
198
|
npm test
|
|
194
199
|
```
|
|
195
200
|
|
|
201
|
+
## Recent Updates (v2026.1.26)
|
|
202
|
+
|
|
203
|
+
- **Rate Limiting**:
|
|
204
|
+
- Added `THOUGHT_DELAY_MS` environment variable to introduce a delay between thought steps. This helps prevent request flooding and rate limit issues.
|
|
205
|
+
|
|
196
206
|
## Recent Updates (v2026.1.24)
|
|
197
207
|
|
|
198
208
|
- **Bug Fixes**:
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const server = new McpServer({
|
|
|
12
12
|
name: "sequential-thinking-server",
|
|
13
13
|
version: "2026.1.18",
|
|
14
14
|
});
|
|
15
|
-
const thinkingServer = new SequentialThinkingServer(process.env.THOUGHTS_STORAGE_PATH || 'thoughts_history.json');
|
|
15
|
+
const thinkingServer = new SequentialThinkingServer(process.env.THOUGHTS_STORAGE_PATH || 'thoughts_history.json', parseInt(process.env.THOUGHT_DELAY_MS || '0', 10));
|
|
16
16
|
const knowledgeGraph = new ProjectKnowledgeGraph();
|
|
17
17
|
// --- Sequential Thinking Tool ---
|
|
18
18
|
server.tool("sequentialthinking", `A detailed tool for dynamic and reflective problem-solving through thoughts.
|
package/dist/lib.js
CHANGED
|
@@ -7,9 +7,11 @@ export class SequentialThinkingServer {
|
|
|
7
7
|
branches = {};
|
|
8
8
|
disableThoughtLogging;
|
|
9
9
|
storagePath;
|
|
10
|
-
|
|
10
|
+
delayMs;
|
|
11
|
+
constructor(storagePath = 'thoughts_history.json', delayMs = 0) {
|
|
11
12
|
this.disableThoughtLogging = (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true";
|
|
12
13
|
this.storagePath = path.resolve(storagePath);
|
|
14
|
+
this.delayMs = delayMs;
|
|
13
15
|
this.loadHistory();
|
|
14
16
|
}
|
|
15
17
|
loadHistory() {
|
|
@@ -97,6 +99,9 @@ export class SequentialThinkingServer {
|
|
|
97
99
|
}
|
|
98
100
|
async processThought(input) {
|
|
99
101
|
try {
|
|
102
|
+
if (this.delayMs > 0) {
|
|
103
|
+
await new Promise(resolve => setTimeout(resolve, this.delayMs));
|
|
104
|
+
}
|
|
100
105
|
this.addToMemory(input);
|
|
101
106
|
await this.saveHistory();
|
|
102
107
|
if (!this.disableThoughtLogging) {
|