@defai.digital/automatosx 5.0.2 โ†’ 5.0.4

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
@@ -15,7 +15,13 @@
15
15
  - โšก **Shortens idea-to-impact gap** โ€“ organized workflows mean faster onboarding, tighter handoffs, confident timelines
16
16
  - ๐Ÿ’ฐ **10ร— more cost-effective** โ€“ CLI-based orchestration beats expensive assistants APIs
17
17
 
18
- **๐Ÿค– 4 Specialized Teams**: AutomatosX agents are [organized into 4 professional teams](https://github.com/defai-digital/automatosx/blob/main/examples/AGENTS_INFO.md) (Core, Engineering, Business, Design), each optimized with the best AI provider for their domainโ€”**Claude** for deep reasoning, **Gemini** for strategic thinking, and **OpenAI** for fast execution. Every team uses intelligent fallback strategies to ensure maximum reliability across all your workflows.
18
+ **๐Ÿค– 4 Specialized Teams**: AutomatosX agents are [organized into 4 professional teams](https://github.com/defai-digital/automatosx/blob/main/examples/AGENTS_INFO.md), each optimized with the best AI provider for their domain:
19
+ - **๐Ÿ‘ฅ Core Team** (OpenAI): General assistance, code generation, planning - Alex, Sofia, Ryan, Danny, Wendy
20
+ - **๐Ÿ’ป Engineering Team** (Claude): Deep reasoning for backend, frontend, security, DevOps, QA - Bob, Frank, Oliver, Steve, Queenie
21
+ - **๐Ÿ“Š Business Team** (Gemini): Strategic thinking for executive leadership and product - Eric, Tony, Paris, Daisy
22
+ - **๐ŸŽจ Design Team** (Gemini): Creative work for UX/UI and technical writing - Debbee
23
+
24
+ Every team uses intelligent fallback strategies to ensure maximum reliability across all your workflows.
19
25
 
20
26
  **Status**: โœ… Production Release ยท **Latest**: October 2025
21
27
  ๐Ÿ“– **[Project History](docs/PROJECT-HISTORY.md)**: From Tokyo AI Expo (Nov 2024) to v5.0.1 - The complete journey
@@ -24,6 +30,19 @@
24
30
 
25
31
  ## ๐Ÿ“ฃ What's New
26
32
 
33
+ **v5.0.4 (October 2025)**: Memory Saving Fix
34
+ - ๐Ÿ› **Memory saving now works** - Agent conversations automatically saved to memory (--save-memory flag)
35
+ - ๐Ÿ”ง **Fixed initialization logic** - Memory manager properly initialized for all flag combinations
36
+ - โœ… **All edge cases tested** - 4/4 scenarios verified (inject-only, save-only, both, neither)
37
+ - ๐Ÿš€ **FTS5 search working** - Search your agent conversation history instantly
38
+ - ๐ŸŽฏ **Zero regressions** - All existing features continue to work perfectly
39
+
40
+ **v5.0.3 (October 2025)**: FTS5 Special Character Support
41
+ - ๐Ÿ› **Memory search fixed** - File paths, URLs, dates, and emails now work correctly
42
+ - ๐Ÿ” **Extended sanitization** - Handles 26 special characters (up from 15)
43
+ - โœ… **Comprehensive testing** - Added 29 new tests covering all real-world scenarios
44
+ - ๐Ÿš€ **Zero regressions** - All 1,079 tests passing with complete backward compatibility
45
+
27
46
  **v5.0.2 (October 2025)**: Documentation & Schema Improvements
28
47
  - ๐Ÿ“š **Comprehensive documentation** - Added multi-agent orchestration guide (600+ lines)
29
48
  - ๐ŸŽฏ **Self-contained JSON Schema** - Configuration validation now built into repository
@@ -65,7 +84,7 @@ ax agent show backend
65
84
 
66
85
  **v4.10.0 (October 2025)**: Team-Based Configuration
67
86
  - ๐ŸŽฏ **No configuration duplication** - Agents inherit settings from team
68
- - ๐Ÿ‘ฅ **4 built-in teams** - Core, Engineering, Business, Design
87
+ - ๐Ÿ‘ฅ **4 built-in teams** - Core Team (OpenAI), Engineering Team (Claude), Business Team (Gemini), Design Team (Gemini)
69
88
  - โ™ป๏ธ **Shared abilities** - Team-wide abilities automatically included
70
89
 
71
90
  For detailed release notes, new features, and upgrade instructions, see:
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 [];
@@ -8858,7 +8858,10 @@ var BaseProvider = class {
8858
8858
  debug: false
8859
8859
  });
8860
8860
  }
8861
- // Priority from config
8861
+ // Name and priority from config
8862
+ get name() {
8863
+ return this.config.name;
8864
+ }
8862
8865
  get priority() {
8863
8866
  return this.config.priority;
8864
8867
  }
@@ -9145,9 +9148,6 @@ var ClaudeProvider = class extends BaseProvider {
9145
9148
  constructor(config) {
9146
9149
  super(config);
9147
9150
  }
9148
- get name() {
9149
- return "claude";
9150
- }
9151
9151
  get version() {
9152
9152
  return "1.0.0";
9153
9153
  }
@@ -9368,9 +9368,6 @@ var GeminiProvider = class extends BaseProvider {
9368
9368
  constructor(config) {
9369
9369
  super(config);
9370
9370
  }
9371
- get name() {
9372
- return "gemini";
9373
- }
9374
9371
  get version() {
9375
9372
  return "1.0.0";
9376
9373
  }
@@ -9520,9 +9517,6 @@ var OpenAIProvider = class extends BaseProvider {
9520
9517
  constructor(config) {
9521
9518
  super(config);
9522
9519
  }
9523
- get name() {
9524
- return "codex";
9525
- }
9526
9520
  get version() {
9527
9521
  return "1.0.0";
9528
9522
  }
@@ -9866,7 +9860,7 @@ var runCommand = {
9866
9860
  join8(projectDir, ".automatosx", "abilities")
9867
9861
  );
9868
9862
  try {
9869
- if (argv2.memory) {
9863
+ if (argv2.memory || argv2.saveMemory) {
9870
9864
  memoryManager = await MemoryManager.create({
9871
9865
  dbPath: join8(projectDir, ".automatosx", "memory", "memory.db")
9872
9866
  });
@@ -9891,7 +9885,7 @@ var runCommand = {
9891
9885
  const providers = [];
9892
9886
  if (config.providers["claude-code"]?.enabled) {
9893
9887
  providers.push(new ClaudeProvider({
9894
- name: "claude",
9888
+ name: "claude-code",
9895
9889
  enabled: true,
9896
9890
  priority: config.providers["claude-code"].priority,
9897
9891
  timeout: config.providers["claude-code"].timeout,
@@ -9900,7 +9894,7 @@ var runCommand = {
9900
9894
  }
9901
9895
  if (config.providers["gemini-cli"]?.enabled) {
9902
9896
  providers.push(new GeminiProvider({
9903
- name: "gemini",
9897
+ name: "gemini-cli",
9904
9898
  enabled: true,
9905
9899
  priority: config.providers["gemini-cli"].priority,
9906
9900
  timeout: config.providers["gemini-cli"].timeout,
@@ -9909,7 +9903,7 @@ var runCommand = {
9909
9903
  }
9910
9904
  if (config.providers["openai"]?.enabled) {
9911
9905
  providers.push(new OpenAIProvider({
9912
- name: "codex",
9906
+ name: "openai",
9913
9907
  enabled: true,
9914
9908
  priority: config.providers["openai"].priority,
9915
9909
  timeout: config.providers["openai"].timeout,
@@ -10082,6 +10076,31 @@ var runCommand = {
10082
10076
  `));
10083
10077
  }
10084
10078
  }
10079
+ if (argv2.saveMemory && memoryManager) {
10080
+ try {
10081
+ const metadata = {
10082
+ type: "conversation",
10083
+ source: "agent-execution",
10084
+ agentId: argv2.agent,
10085
+ tags: ["agent-execution", argv2.agent, "multi-stage"],
10086
+ provider: context.provider.name,
10087
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
10088
+ };
10089
+ const embedding = null;
10090
+ const content = `Agent: ${argv2.agent}
10091
+ Task: ${argv2.task}
10092
+
10093
+ Result: ${multiStageResult.finalOutput}`;
10094
+ await memoryManager.add(content, embedding, metadata);
10095
+ if (argv2.verbose) {
10096
+ console.log(chalk12.green("\u2713 Conversation saved to memory"));
10097
+ }
10098
+ } catch (error) {
10099
+ if (argv2.verbose) {
10100
+ console.log(chalk12.yellow(`\u26A0 Failed to save to memory: ${error.message}`));
10101
+ }
10102
+ }
10103
+ }
10085
10104
  } else {
10086
10105
  const executor = new AgentExecutor({
10087
10106
  sessionManager,
@@ -10134,9 +10153,31 @@ var runCommand = {
10134
10153
  `));
10135
10154
  }
10136
10155
  }
10137
- }
10138
- if (argv2.saveMemory && argv2.verbose) {
10139
- console.log(chalk12.gray("\u26A0 Memory saving skipped (embedding provider not configured)"));
10156
+ if (argv2.saveMemory && memoryManager) {
10157
+ try {
10158
+ const metadata = {
10159
+ type: "conversation",
10160
+ source: "agent-execution",
10161
+ agentId: argv2.agent,
10162
+ tags: ["agent-execution", argv2.agent],
10163
+ provider: context.provider.name,
10164
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
10165
+ };
10166
+ const embedding = null;
10167
+ const content = `Agent: ${argv2.agent}
10168
+ Task: ${argv2.task}
10169
+
10170
+ Response: ${result.response.content}`;
10171
+ await memoryManager.add(content, embedding, metadata);
10172
+ if (argv2.verbose) {
10173
+ console.log(chalk12.green("\u2713 Conversation saved to memory"));
10174
+ }
10175
+ } catch (error) {
10176
+ if (argv2.verbose) {
10177
+ console.log(chalk12.yellow(`\u26A0 Failed to save to memory: ${error.message}`));
10178
+ }
10179
+ }
10180
+ }
10140
10181
  }
10141
10182
  await contextManager.cleanup(context);
10142
10183
  if (memoryManager) {
@@ -10467,7 +10508,7 @@ var statusCommand2 = {
10467
10508
  const providers = [];
10468
10509
  if (config.providers["claude-code"]?.enabled) {
10469
10510
  providers.push(new ClaudeProvider({
10470
- name: "claude",
10511
+ name: "claude-code",
10471
10512
  enabled: true,
10472
10513
  priority: config.providers["claude-code"].priority,
10473
10514
  timeout: config.providers["claude-code"].timeout,
@@ -10476,7 +10517,7 @@ var statusCommand2 = {
10476
10517
  }
10477
10518
  if (config.providers["gemini-cli"]?.enabled) {
10478
10519
  providers.push(new GeminiProvider({
10479
- name: "gemini",
10520
+ name: "gemini-cli",
10480
10521
  enabled: true,
10481
10522
  priority: config.providers["gemini-cli"].priority,
10482
10523
  timeout: config.providers["gemini-cli"].timeout,
@@ -10485,7 +10526,7 @@ var statusCommand2 = {
10485
10526
  }
10486
10527
  if (config.providers["openai"]?.enabled) {
10487
10528
  providers.push(new OpenAIProvider({
10488
- name: "codex",
10529
+ name: "openai",
10489
10530
  enabled: true,
10490
10531
  priority: config.providers["openai"].priority,
10491
10532
  timeout: config.providers["openai"].timeout,