@defai.digital/automatosx 6.2.5 → 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 CHANGED
@@ -2,6 +2,76 @@
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
+
42
+ ## [6.2.6] - 2025-10-31
43
+
44
+ ### 🔧 Fixes
45
+
46
+ **Cache Prediction Division by Zero (Bug #33)**
47
+
48
+ Through ultra-deep systematic analysis of all division operations in the codebase:
49
+
50
+ - **Bug #33 (MEDIUM)**: Division by zero in adaptive cache prediction (`src/core/adaptive-cache.ts:244`)
51
+ - **Problem**: `intervals.reduce(...) / intervals.length` can divide by zero when timestamps array contains only undefined values
52
+ - **Impact**: NaN values in predictive cache scoring, corrupting cache access predictions
53
+ - **Root Cause**: Even with `timestamps.length >= 2` check, the intervals array could be empty if all timestamps were undefined
54
+ - **Fix**: Added guard to check `intervals.length === 0` after building intervals array, skip prediction for insufficient data
55
+ - **Pattern**: Consistent with defensive division guards from Bugs #16, #19, #31
56
+
57
+ ### 🔍 Analysis Methodology
58
+
59
+ - **Ultra-deep grep analysis**: Systematically found and verified all 9 division operations in `src/core/`
60
+ - **Verified safe operations**: provider-metrics-tracker.ts (4 divisions), AnalyticsAggregator.ts (3 divisions)
61
+ - **Fixed vulnerable operation**: adaptive-cache.ts (1 division)
62
+
63
+ ### 📊 Impact
64
+
65
+ - **Users affected**: Users with adaptive caching enabled (performance feature)
66
+ - **Breaking changes**: None
67
+ - **Migration**: None required - automatic graceful skip for invalid prediction data
68
+
69
+ ### ✅ Testing
70
+
71
+ - All 2,281 unit tests passing
72
+ - TypeScript compilation successful
73
+ - Build successful
74
+
5
75
  ## [6.2.5] - 2025-10-31
6
76
 
7
77
  ### 🔧 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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defai.digital/automatosx",
3
- "version": "6.2.5",
3
+ "version": "6.2.7",
4
4
  "description": "AI Agent Orchestration Platform",
5
5
  "type": "module",
6
6
  "publishConfig": {