@defai.digital/automatosx 6.2.6 → 6.2.7
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/CHANGELOG.md +37 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [6.2.7] - 2025-10-31
|
|
6
|
+
|
|
7
|
+
### 🔧 Fixes
|
|
8
|
+
|
|
9
|
+
**Timer Cleanup Memory Leak (Bug #34)**
|
|
10
|
+
|
|
11
|
+
Through systematic timer analysis across all setTimeout/setInterval operations:
|
|
12
|
+
|
|
13
|
+
- **Bug #34 (LOW)**: Missing timer cleanup in prompt timeout handler (`src/core/prompt-manager.ts:238`)
|
|
14
|
+
- **Problem**: When main timeout fires, the warning timer (`warningHandle`) is not cleared
|
|
15
|
+
- **Impact**: Memory leak - warning timer continues running even after prompt resolved
|
|
16
|
+
- **Root Cause**: `handleTimeout()` clears readline and resolves promise, but forgets to clear `warningHandle`
|
|
17
|
+
- **Fix**: Added `clearTimeout(warningHandle)` in `handleTimeout()` before resolving (lines 242-244)
|
|
18
|
+
- **Pattern**: Symmetric cleanup - both answer callback and timeout handler now clear both timers
|
|
19
|
+
|
|
20
|
+
### 🔍 Analysis Methodology
|
|
21
|
+
|
|
22
|
+
- **Heavy-thinking timer analysis**: Systematically checked all setTimeout/setInterval in `src/core/`
|
|
23
|
+
- **Verified safe operations**:
|
|
24
|
+
- db-connection-pool.ts queue timeouts (properly cleared in processWaitQueue)
|
|
25
|
+
- session-manager.ts save debouncing (clears before setting new)
|
|
26
|
+
- All setInterval operations have corresponding clear in destroy/close methods
|
|
27
|
+
- **Fixed vulnerable operation**: prompt-manager.ts dual-timeout handling
|
|
28
|
+
|
|
29
|
+
### 📊 Impact
|
|
30
|
+
|
|
31
|
+
- **Users affected**: Users with interactive prompts that timeout (edge case)
|
|
32
|
+
- **Severity**: Low (timer eventually completes, but wastes resources)
|
|
33
|
+
- **Breaking changes**: None
|
|
34
|
+
- **Migration**: None required - automatic cleanup improvement
|
|
35
|
+
|
|
36
|
+
### ✅ Testing
|
|
37
|
+
|
|
38
|
+
- All 2,281 unit tests passing
|
|
39
|
+
- TypeScript compilation successful
|
|
40
|
+
- Build successful
|
|
41
|
+
|
|
5
42
|
## [6.2.6] - 2025-10-31
|
|
6
43
|
|
|
7
44
|
### 🔧 Fixes
|
package/dist/index.js
CHANGED
|
@@ -23366,6 +23366,9 @@ ${this.config.locale === "zh" ? "\u8ACB\u9078\u64C7" : "Select"}${defaultDisplay
|
|
|
23366
23366
|
const handleTimeout = () => {
|
|
23367
23367
|
if (!resolved) {
|
|
23368
23368
|
resolved = true;
|
|
23369
|
+
if (warningHandle) {
|
|
23370
|
+
clearTimeout(warningHandle);
|
|
23371
|
+
}
|
|
23369
23372
|
console.log(`
|
|
23370
23373
|
${template.timedOut}`);
|
|
23371
23374
|
rl.close();
|