@defai.digital/automatosx 5.2.2 → 5.3.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 CHANGED
@@ -5,6 +5,202 @@ 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.3.1] - 2025-10-14
9
+
10
+ ### 🪟 Windows CLI Provider Detection & Enhanced Robustness
11
+
12
+ **This patch release fixes critical Windows compatibility issues and adds robust provider detection with security enhancements.**
13
+
14
+ #### Added
15
+
16
+ - **Windows CLI Provider Detection** (Phase 1):
17
+ - Cross-platform CLI provider detector (`src/core/cli-provider-detector.ts`)
18
+ - Windows-specific detection using `where.exe` + PATH×PATHEXT fallback
19
+ - Unix detection using `which` command
20
+ - Detection caching for performance (< 1ms cached lookups)
21
+ - Support for `.CMD`, `.BAT`, `.EXE`, `.COM` extensions on Windows
22
+
23
+ - **ENV Variable Override** (Phase 2):
24
+ - `CLAUDE_CLI` - Override Claude CLI path
25
+ - `GEMINI_CLI` - Override Gemini CLI path
26
+ - `CODEX_CLI` - Override Codex CLI path
27
+ - Three-layer detection: ENV → Config → PATH
28
+ - `ax status` shows ENV variable status with validation
29
+
30
+ - **Provider Configuration** (Phase 2):
31
+ - `customPath` - Custom CLI path in provider config
32
+ - `versionArg` - Custom version check argument
33
+ - `minVersion` - Minimum required version (semantic versioning)
34
+
35
+ - **Version Validation**:
36
+ - Semantic version parsing and comparison
37
+ - Automatic CLI version detection via `--version`
38
+ - Warning logs when version requirement not met
39
+ - Permissive behavior (allows if version check fails)
40
+
41
+ - **Cross-Platform CI** (Phase 3):
42
+ - GitHub Actions workflows for Ubuntu, macOS, Windows
43
+ - Automatic testing on all platforms
44
+ - Coverage report artifacts
45
+ - 30-minute timeout for Windows tests
46
+
47
+ #### Fixed
48
+
49
+ - **Critical**: Windows CLI provider detection failures (GitHub Issue #1)
50
+ - Providers now detected correctly on Windows using `where.exe`
51
+ - Fallback to PATH×PATHEXT scanning if `where.exe` fails
52
+ - Standard PATH detection works on all platforms
53
+
54
+ - **Provider Detection**:
55
+ - Enhanced `BaseProvider.checkCLIAvailabilityEnhanced()` with version validation
56
+ - Proper fallback chain: ENV → customPath → PATH
57
+ - Graceful degradation on detection failures
58
+
59
+ - **CI Configuration**:
60
+ - Artifact upload paths corrected (coverage/ only)
61
+ - Removed non-existent test-results/ path
62
+ - Added `if-no-files-found: warn` for graceful handling
63
+
64
+ - **Documentation**:
65
+ - Async error handling documentation for `detectAll()`
66
+ - Clear usage examples with proper error handling
67
+ - JSDoc annotations updated with `@throws` tags
68
+
69
+ #### Security
70
+
71
+ - **Path Traversal Protection**:
72
+ - Added validation to reject `..` (parent directory) patterns
73
+ - Added validation to reject `~` (home directory) shortcuts
74
+ - Security warnings logged for suspicious paths
75
+ - Read-only validation (no writes, minimal risk)
76
+
77
+ #### Changed
78
+
79
+ - **Provider Detection Priority**:
80
+ 1. ENV variables (highest priority)
81
+ 2. Config `customPath` (second priority)
82
+ 3. Standard PATH detection (fallback)
83
+ 4. Version validation (if `minVersion` set)
84
+
85
+ #### Performance
86
+
87
+ - **Detection Caching**: First call ~100-500ms, cached calls < 1ms
88
+ - **Version Check Overhead**: +100-200ms when `minVersion` configured
89
+ - **Path Validation**: +0.1-0.5ms per path (negligible)
90
+ - **Overall Impact**: < 1% overhead
91
+
92
+ #### Documentation
93
+
94
+ - Added comprehensive JSDoc for all new APIs
95
+ - Added usage examples for ENV variables
96
+ - Added Windows-specific troubleshooting
97
+ - Added version validation configuration guide
98
+ - **README.md**: Enhanced with tested platforms (macOS 15, Ubuntu 24.04, Windows 10/11)
99
+ - **README.md**: Simplified Windows Support section with clearer quick-start instructions
100
+ - **Windows Setup Guide** (NEW): Complete installation walkthrough for Windows users
101
+ - **Windows Troubleshooting**: Updated to v5.3.1 with provider detection solutions
102
+
103
+ #### Testing
104
+
105
+ - **1,670 tests passing** (100% pass rate)
106
+ - **0 TypeScript errors** (strict mode)
107
+ - **Cross-platform CI**: Ubuntu, macOS, Windows
108
+ - **2 Windows-specific tests** (PATH×PATHEXT detection)
109
+
110
+ #### Related
111
+
112
+ - Fixes: GitHub Issue #1 (Windows CLI provider detection)
113
+ - PRD: `tmp/PRD-WINDOWS-CLI-DETECTION.md`
114
+ - Reports: `tmp/PHASE{1,2,3}-COMPLETION-REPORT.md`
115
+ - Code Review: `tmp/CODE-REVIEW-REPORT.md`
116
+ - Bug Fixes: `tmp/BUG-FIX-COMPLETION-REPORT.md`
117
+
118
+ ---
119
+
120
+ ## [5.3.0] - 2025-10-14
121
+
122
+ ### 🚀 Stage Execution & Checkpoint System
123
+
124
+ **This release introduces a checkpoint-based stage execution system for fault-tolerant, long-running workflows with interactive, streaming, and hybrid execution modes.**
125
+
126
+ #### Added
127
+
128
+ - **Stage Execution System**:
129
+ - `StageExecutionController` - Orchestrates multi-stage execution with checkpoint support
130
+ - `CheckpointManager` - JSON-based checkpoint persistence with automatic cleanup
131
+ - `ProgressChannel` - Event-based real-time progress tracking
132
+ - `PromptManager` - User interaction prompts with timeout handling
133
+ - **Commands**:
134
+ - `ax resume <run-id>` - Resume execution from saved checkpoint
135
+ - `ax runs list` - List all checkpoint runs with filtering
136
+ - `ax runs show <run-id>` - Show detailed checkpoint information
137
+ - `ax runs delete <run-id>` - Delete checkpoint with confirmation
138
+
139
+ - **Execution Modes**:
140
+ - `--interactive` - Pause between stages for user decisions
141
+ - `--streaming` - Real-time progress updates during execution
142
+ - `--hybrid` - Both interactive and streaming (shortcut for `--interactive --streaming`)
143
+ - `--resumable` - Enable checkpoint save for resume capability
144
+ - `--auto-continue` - Auto-confirm all checkpoints (CI-friendly mode)
145
+
146
+ - **Configuration** (`automatosx.config.json`):
147
+ - `execution.stages.enabled` - Enable stage-based execution (opt-in)
148
+ - `execution.stages.autoSaveCheckpoint` - Auto-save checkpoints after each stage
149
+ - `execution.stages.checkpointPath` - Checkpoint storage directory
150
+ - `execution.stages.cleanupAfterDays` - Automatic checkpoint cleanup
151
+ - `execution.stages.prompts.autoConfirm` - Default auto-confirm behavior
152
+ - `execution.stages.progress.updateInterval` - Progress update frequency
153
+ - `execution.stages.progress.syntheticProgress` - Enable synthetic progress
154
+
155
+ #### Fixed
156
+
157
+ - **Critical**: Removed `argv.interactive || true` forcing all executions into interactive mode (src/cli/commands/run.ts:458)
158
+ - Now respects CLI flags: `--interactive`, `--streaming`, `--hybrid`, `--resumable` work correctly
159
+ - Fixes regression where flagship v5.3.0 features were broken
160
+
161
+ - **Major**:
162
+ - Resume command now passes `memoryManager` to `StageExecutionController` for memory persistence (src/cli/commands/resume.ts:243-244)
163
+ - Config-driven automation settings now properly honored instead of being overridden by CLI defaults
164
+ - `autoSaveCheckpoint` uses config value when CLI flag not specified
165
+ - `autoConfirm` uses config value when CLI flag not specified
166
+ - Resume flow now preserves original `autoConfirm` choice from checkpoint instead of defaulting to `false`
167
+ - CLI options (`--interactive`, `--resumable`, `--auto-continue`, `--streaming`, `--hybrid`) no longer have hardcoded `default: false`, allowing proper config fallback
168
+
169
+ - **Minor**:
170
+ - Removed duplicate spinner in streaming mode - `ProgressRenderer` now handles all visual feedback (src/core/stage-execution-controller.ts:1286)
171
+
172
+ #### Technical Details
173
+
174
+ - **New Core Modules**:
175
+ - `src/core/stage-execution-controller.ts` - Stage lifecycle, checkpoint integration, progress tracking
176
+ - `src/core/checkpoint-manager.ts` - Checkpoint CRUD, JSON persistence, automatic cleanup
177
+ - `src/core/progress-channel.ts` - Event-based progress updates with percentage tracking
178
+ - `src/core/prompt-manager.ts` - CLI user prompts with timeout and validation
179
+ - `src/cli/commands/resume.ts` - Resume from checkpoint with mode override support
180
+ - `src/cli/commands/runs.ts` - Checkpoint management (list, show, delete)
181
+ - `src/cli/renderers/progress-renderer.ts` - Real-time progress visualization
182
+ - `src/types/stage-execution.ts` - Complete type definitions for stage system
183
+
184
+ - **Checkpoint Structure**:
185
+ ```
186
+ .automatosx/checkpoints/
187
+ └── <run-id>/
188
+ ├── checkpoint.json # Checkpoint metadata and stage states
189
+ └── artifacts/ # Stage outputs and files
190
+ ```
191
+
192
+ - **Benefits**:
193
+ - ✅ Fault tolerance: Resume from failure points
194
+ - ✅ Long-running workflows: Execute multi-hour tasks safely
195
+ - ✅ User control: Pause and review between stages
196
+ - ✅ Real-time feedback: Monitor progress during execution
197
+ - ✅ Audit trail: Complete execution history with artifacts
198
+
199
+ #### Known Limitations
200
+
201
+ - Test coverage for new features (StageExecutionController, CheckpointManager, resume, runs) is minimal
202
+ - Recommendation: Add comprehensive tests before production use
203
+
8
204
  ## [5.2.2] - 2025-10-14
9
205
 
10
206
  ### 🧪 Quality & Maintenance Release
package/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
  [![npm version](https://img.shields.io/npm/v/@defai.digital/automatosx.svg)](https://www.npmjs.com/package/@defai.digital/automatosx)
8
8
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue.svg)](https://www.typescriptlang.org/)
10
- [![Tests](https://img.shields.io/badge/tests-1,259%20passing-brightgreen.svg)](#)
10
+ [![Tests](https://img.shields.io/badge/tests-1,657%20passing-brightgreen.svg)](#)
11
11
 
12
- **Status**: ✅ Production Ready · v5.2.2 · October 2025
12
+ **Status**: ✅ Production Ready · v5.3.0 · October 2025
13
13
 
14
14
  Looking for answers? See the [FAQ](FAQ.md).
15
15
 
@@ -278,7 +278,7 @@ npm install -g @defai.digital/automatosx
278
278
 
279
279
  ```bash
280
280
  ax --version
281
- # Should show: 5.1.0 (or later)
281
+ # Should show: 5.3.0 (or later)
282
282
  ```
283
283
 
284
284
  > **Windows Users**: If `ax` command not found, see [Windows Troubleshooting](docs/troubleshooting/windows-troubleshooting.md)
@@ -332,6 +332,62 @@ ax list agents
332
332
 
333
333
  ---
334
334
 
335
+ ### 🪟 Windows Support (Fully Tested)
336
+
337
+ **AutomatosX v5.3.1+ fully supports Windows 10 & 11** with automatic CLI provider detection.
338
+
339
+ #### Quick Start for Windows Users
340
+
341
+ **Most users don't need any configuration** - AutomatosX automatically detects provider CLIs installed via npm:
342
+
343
+ ```bash
344
+ # 1. Install providers (if not already installed)
345
+ npm install -g @anthropic-ai/claude-cli
346
+ npm install -g @google/generative-ai-cli
347
+ npm install -g openai
348
+
349
+ # 2. Verify detection
350
+ ax status
351
+ ```
352
+
353
+ **If providers are not detected**, you can manually specify paths:
354
+
355
+ **Windows (Command Prompt)**:
356
+ ```cmd
357
+ set CLAUDE_CLI=C:\Users\YourName\AppData\Roaming\npm\claude.cmd
358
+ set GEMINI_CLI=C:\Users\YourName\AppData\Roaming\npm\gemini.cmd
359
+ ax status
360
+ ```
361
+
362
+ **Windows (PowerShell)**:
363
+ ```powershell
364
+ $env:CLAUDE_CLI="C:\Users\YourName\AppData\Roaming\npm\claude.cmd"
365
+ $env:GEMINI_CLI="C:\Users\YourName\AppData\Roaming\npm\gemini.cmd"
366
+ ax status
367
+ ```
368
+
369
+ #### How Provider Detection Works
370
+
371
+ AutomatosX uses a **three-layer detection system**:
372
+
373
+ 1. **ENV Variables** (highest priority) - `CLAUDE_CLI`, `GEMINI_CLI`, `CODEX_CLI`
374
+ 2. **Config File** - Custom paths in `automatosx.config.json`
375
+ 3. **PATH Detection** (automatic) - Standard system PATH
376
+ - **Windows**: Uses `where.exe` + PATH×PATHEXT scanning
377
+ - **Unix/macOS**: Uses `which` command
378
+
379
+ #### Windows-Specific Help
380
+
381
+ Having issues on Windows? See our comprehensive guides:
382
+
383
+ - 📖 **[Windows Setup Guide](docs/troubleshooting/windows-setup.md)** - Complete Windows installation walkthrough
384
+ - 🔧 **[Windows Troubleshooting](docs/troubleshooting/windows-troubleshooting.md)** - Common Windows issues and solutions
385
+ - ⚙️ **[Advanced Configuration](docs/guide/configuration.md)** - Custom paths, version requirements, and more
386
+
387
+ > **💡 Quick Tip**: Run `ax status --verbose` to see exactly which paths are being detected and used.
388
+
389
+ ---
390
+
335
391
  ### Step 3: Run Your First Agent
336
392
 
337
393
  **Terminal Mode** (any platform):
@@ -426,6 +482,26 @@ ax mcp
426
482
 
427
483
  ---
428
484
 
485
+ ## ⏱️ Stage Checkpoints & Run History
486
+
487
+ AutomatosX 5.3 introduces stage-aware checkpoints so you can pause long-running agent workflows, inspect intermediate outputs, and resume exactly where the run stopped.
488
+
489
+ ### Enable resumable runs
490
+ - CLI: `ax run <agent> "<task>" --resumable` (add `--interactive` or `--hybrid` for live approval)
491
+ - Config: set `execution.stages.enabled` to `true` in `automatosx.config.json` to make stage checkpoints the default. Combine with `execution.stages.autoSaveCheckpoint` to persist after every stage.
492
+
493
+ When a stage finishes, AutomatosX stores a checkpoint under `.automatosx/checkpoints/<run-id>/` (artifacts, logs, and metadata). The CLI prints the UUID so you can resume or inspect it later.
494
+
495
+ ### Manage checkpoints
496
+ - `ax resume <run-id>` — Resume a saved run. Flags such as `--interactive`, `--streaming`, `--hybrid`, or `--auto-continue` override the saved execution mode.
497
+ - `ax runs list [--status running|paused|completed|failed|aborted] [--agent <name>] [--limit <n>]` — Review recent checkpoints with progress and status.
498
+ - `ax runs show <run-id> [--artifacts]` — Inspect stage history, retry counts, and generated artifacts before resuming.
499
+ - `ax runs delete <run-id> [--force]` — Remove stale checkpoints or clear sensitive artifacts once a run is finalized.
500
+
501
+ Set `execution.stages.cleanupAfterDays` to control automatic pruning (default 7 days). For an end-to-end guide, see [Checkpoints & Run History](docs/guide/checkpoints-and-resume.md).
502
+
503
+ ---
504
+
429
505
  ## 📚 Documentation
430
506
 
431
507
  ### Getting Started
@@ -441,6 +517,7 @@ ax mcp
441
517
  - **[Multi-Agent Orchestration](docs/guide/multi-agent-orchestration.md)** - Natural language delegation
442
518
  - **[Team Configuration](docs/guide/team-configuration.md)** - Team-based agent organization
443
519
  - **[Agent Templates](docs/guide/agent-templates.md)** - Quick agent creation
520
+ - **[Checkpoints & Run History](docs/guide/checkpoints-and-resume.md)** - Manage resumable runs and checkpoint storage
444
521
 
445
522
  ### Tutorials
446
523
  - **[Memory Management](docs/tutorials/memory-management.md)** - Hands-on memory system guide
@@ -578,12 +655,20 @@ I need Daisy to analyze the data # Need expression
578
655
 
579
656
  ## 🛠️ Production-Ready
580
657
 
581
- ✅ **1,259 tests passing** (100% pass rate)
658
+ ✅ **1,670 tests passing** (100% pass rate)
582
659
  ✅ **TypeScript strict mode** (zero errors)
583
660
  ✅ **~56% test coverage** (comprehensive testing)
584
661
  ✅ **458KB bundle** (99.9% smaller than v3.x)
585
662
  ✅ **< 1ms memory search** (62x faster than v3.x)
586
663
 
664
+ ### Tested Platforms
665
+
666
+ AutomatosX has been thoroughly tested across multiple operating systems:
667
+
668
+ - ✅ **macOS**: macOS 15+ (tested on macOS 15)
669
+ - ✅ **Ubuntu**: Ubuntu 24.04 LTS
670
+ - ✅ **Windows**: Windows 10 & Windows 11
671
+
587
672
  ### Performance Metrics
588
673
 
589
674
  ```