@defai.digital/automatosx 5.2.0 → 5.2.1
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 +41 -0
- package/README.md +2 -2
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/version.json +1 -1
- package/package.json +1 -1
- package/version.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,47 @@ All notable changes to AutomatosX will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [5.2.1] - 2025-10-12
|
|
9
|
+
|
|
10
|
+
### 🐛 Bug Fixes
|
|
11
|
+
|
|
12
|
+
This patch release resolves three critical bugs identified through code review that affected core functionality.
|
|
13
|
+
|
|
14
|
+
#### Fixed
|
|
15
|
+
|
|
16
|
+
- **Memory Search - FTS5 BM25 Similarity Calculation** (CRITICAL):
|
|
17
|
+
- Fixed incorrect BM25 score interpretation in `src/core/memory-manager.ts:456`
|
|
18
|
+
- Changed from incorrectly assuming negative scores to properly handling non-negative scores
|
|
19
|
+
- Updated similarity calculation to use correct inverse function: `1 / (1 + Math.abs(relevance))`
|
|
20
|
+
- **Impact**: Fixes all similarity scores being incorrectly clamped to 1, making search relevance scoring functional again
|
|
21
|
+
- **Before**: All search results had similarity = 1, making ranking meaningless
|
|
22
|
+
- **After**: Proper similarity scoring where lower BM25 scores = higher similarity
|
|
23
|
+
|
|
24
|
+
- **Project Root Detection** (MAJOR):
|
|
25
|
+
- Fixed `src/cli/commands/run.ts` to use `detectProjectRoot()` instead of `process.cwd()`
|
|
26
|
+
- Now properly detects project root even when running commands from subdirectories
|
|
27
|
+
- **Impact**: Fixes agent profile and memory data loading failures when running from subdirectories
|
|
28
|
+
- **Before**: Running `ax run agent "task"` from `project/scripts/` would fail to find `.automatosx/` directory
|
|
29
|
+
- **After**: Correctly resolves project root regardless of current working directory
|
|
30
|
+
|
|
31
|
+
- **Memory Search Threshold Filter** (MAJOR):
|
|
32
|
+
- Implemented missing threshold filter in memory search results (`src/core/memory-manager.ts:475-479`)
|
|
33
|
+
- Added `.filter()` to actually apply `query.threshold` parameter
|
|
34
|
+
- **Impact**: Makes `ax memory search --threshold` CLI option functional
|
|
35
|
+
- **Before**: `--threshold` parameter was accepted but ignored, returning all results
|
|
36
|
+
- **After**: Results properly filtered based on similarity threshold
|
|
37
|
+
|
|
38
|
+
#### Technical Details
|
|
39
|
+
|
|
40
|
+
- All 1,343 tests passing (1,275 unit + 68 integration)
|
|
41
|
+
- Zero TypeScript errors
|
|
42
|
+
- No breaking changes
|
|
43
|
+
- Drop-in replacement for v5.2.0
|
|
44
|
+
|
|
45
|
+
#### Credits
|
|
46
|
+
|
|
47
|
+
Bugs identified through automated code review by quality assurance agent.
|
|
48
|
+
|
|
8
49
|
## [5.2.0] - 2025-10-11
|
|
9
50
|
|
|
10
51
|
### 🎯 Major Workspace Structure Simplification
|
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/@defai.digital/automatosx)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://www.typescriptlang.org/)
|
|
10
|
-
[](#)
|
|
11
11
|
|
|
12
|
-
**Status**: ✅ Production Ready · v5.2.
|
|
12
|
+
**Status**: ✅ Production Ready · v5.2.1 · October 2025
|
|
13
13
|
|
|
14
14
|
Looking for answers? See the [FAQ](FAQ.md).
|
|
15
15
|
|
package/dist/index.js
CHANGED
|
@@ -4746,7 +4746,7 @@ var MemoryManager = class _MemoryManager {
|
|
|
4746
4746
|
`).run(now, ...ids);
|
|
4747
4747
|
}
|
|
4748
4748
|
return results.map((row) => {
|
|
4749
|
-
const similarity = Math.max(0, Math.min(1, 1 + row.relevance
|
|
4749
|
+
const similarity = Math.max(0, Math.min(1, 1 / (1 + Math.abs(row.relevance))));
|
|
4750
4750
|
return {
|
|
4751
4751
|
entry: {
|
|
4752
4752
|
id: row.id,
|
|
@@ -4761,6 +4761,9 @@ var MemoryManager = class _MemoryManager {
|
|
|
4761
4761
|
similarity,
|
|
4762
4762
|
distance: 1 - similarity
|
|
4763
4763
|
};
|
|
4764
|
+
}).filter((result) => {
|
|
4765
|
+
const threshold = query.threshold ?? 0;
|
|
4766
|
+
return result.similarity >= threshold;
|
|
4764
4767
|
});
|
|
4765
4768
|
} catch (error) {
|
|
4766
4769
|
throw new MemoryError(
|
|
@@ -11908,8 +11911,8 @@ var runCommand = {
|
|
|
11908
11911
|
let context;
|
|
11909
11912
|
let resolvedAgentName = argv2.agent;
|
|
11910
11913
|
try {
|
|
11911
|
-
const
|
|
11912
|
-
const
|
|
11914
|
+
const projectDir = await detectProjectRoot(process.cwd());
|
|
11915
|
+
const config = await loadConfig(projectDir);
|
|
11913
11916
|
if (argv2.verbose) {
|
|
11914
11917
|
console.log(chalk12.gray(`Project: ${projectDir}`));
|
|
11915
11918
|
console.log(chalk12.gray(`Working directory: ${process.cwd()}`));
|