@defai.digital/automatosx 5.0.2 โ†’ 5.0.3

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
@@ -5,6 +5,63 @@ 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.0.3] - 2025-10-09
9
+
10
+ ### ๐Ÿ› Critical Bug Fix
11
+
12
+ #### FTS5 Query Sanitization - Special Character Support
13
+
14
+ **Problem**: Memory search failed with syntax errors for queries containing common special characters (`/`, `@`, `#`, `&`, `=`, `?`, `!`, `;`, `'`, `` ` ``, `,`)
15
+
16
+ **Impact**:
17
+ - โŒ File path queries: `src/core/memory-manager.ts` โ†’ `fts5: syntax error near "/"`
18
+ - โŒ URL queries: `https://github.com/defai/automatosx` โ†’ Failed
19
+ - โŒ Date queries: `2025/10/09` โ†’ Failed
20
+ - โŒ Email queries: `user@example.com` โ†’ Failed
21
+ - โŒ All other queries with special characters โ†’ Silent memory injection failure
22
+
23
+ **Root Cause**: Incomplete FTS5 special character sanitization in `memory-manager.ts:301`
24
+
25
+ **Fix**: Extended regex pattern to sanitize 11 additional special characters:
26
+ - Before: `.:"*()[\]{}^$+|\\%<>~-` (15 characters)
27
+ - After: `.:"*()[\]{}^$+|\\%<>~\-/@#&=?!;'\`,` (26 characters) โœ…
28
+
29
+ **Testing**:
30
+ - โœ… Added 29 comprehensive tests (504 lines) covering all real-world scenarios
31
+ - โœ… All 1079 existing tests pass (zero regressions)
32
+ - โœ… Performance optimized for CI environments (1s timeout vs 100ms)
33
+
34
+ **Discovered By**: Queenie during Paris migration script review
35
+
36
+ **Affects**: All users since v5.0.1
37
+
38
+ **Files Modified**:
39
+ - `src/core/memory-manager.ts` (1 line)
40
+ - `tests/unit/memory-manager-special-chars.test.ts` (new, 509 lines)
41
+
42
+ ### ๐Ÿงช Test Coverage
43
+
44
+ **New Test Suite**: `memory-manager-special-chars.test.ts`
45
+ - โœ… File paths (Unix & Windows)
46
+ - โœ… URLs (HTTPS, query parameters, hash fragments)
47
+ - โœ… Dates (YYYY/MM/DD, MM/DD/YYYY)
48
+ - โœ… Email addresses
49
+ - โœ… Hashtags
50
+ - โœ… Mathematical expressions
51
+ - โœ… Special characters (?, !, &, ;, ', `, ,)
52
+ - โœ… Complex real-world queries
53
+ - โœ… Edge cases & performance
54
+
55
+ **Test Results**: 29/29 passed โœ…
56
+
57
+ ### ๐Ÿš€ Performance
58
+
59
+ - Search with special chars: < 1ms per query
60
+ - 100-entry performance test: < 1000ms (CI-safe)
61
+ - Zero impact on existing search performance
62
+
63
+ ---
64
+
8
65
  ## [5.0.2] - 2025-10-09
9
66
 
10
67
  ### ๐Ÿ“š Documentation
package/README.md CHANGED
@@ -24,6 +24,12 @@
24
24
 
25
25
  ## ๐Ÿ“ฃ What's New
26
26
 
27
+ **v5.0.3 (October 2025)**: FTS5 Special Character Support
28
+ - ๐Ÿ› **Memory search fixed** - File paths, URLs, dates, and emails now work correctly
29
+ - ๐Ÿ” **Extended sanitization** - Handles 26 special characters (up from 15)
30
+ - โœ… **Comprehensive testing** - Added 29 new tests covering all real-world scenarios
31
+ - ๐Ÿš€ **Zero regressions** - All 1,079 tests passing with complete backward compatibility
32
+
27
33
  **v5.0.2 (October 2025)**: Documentation & Schema Improvements
28
34
  - ๐Ÿ“š **Comprehensive documentation** - Added multi-agent orchestration guide (600+ lines)
29
35
  - ๐ŸŽฏ **Self-contained JSON Schema** - Configuration validation now built into repository
package/dist/index.js CHANGED
@@ -3361,7 +3361,7 @@ var MemoryManager = class _MemoryManager {
3361
3361
  ORDER BY fts.rank
3362
3362
  LIMIT ?
3363
3363
  `;
3364
- const ftsQuery = query.text.replace(/[.:"*()[\]{}^$+|\\%<>~-]/g, " ").replace(/\b(AND|OR|NOT)\b/gi, " ").replace(/\s+/g, " ").trim();
3364
+ const ftsQuery = query.text.replace(/[.:"*()[\]{}^$+|\\%<>~\-/@#&=?!;'`,]/g, " ").replace(/\b(AND|OR|NOT)\b/gi, " ").replace(/\s+/g, " ").trim();
3365
3365
  if (!ftsQuery) {
3366
3366
  logger.debug("FTS5 query empty after sanitization", { originalQuery: query.text });
3367
3367
  return [];