@defai.digital/ax-cli 3.8.7 → 3.8.8
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/README.md +28 -393
- package/config-defaults/settings.yaml +3 -0
- package/dist/agent/llm-agent.d.ts +11 -2
- package/dist/agent/llm-agent.js +73 -104
- package/dist/agent/llm-agent.js.map +1 -1
- package/dist/agent/loop-detector.d.ts +70 -0
- package/dist/agent/loop-detector.js +339 -0
- package/dist/agent/loop-detector.js.map +1 -0
- package/dist/agent/progress-tracker.d.ts +94 -0
- package/dist/agent/progress-tracker.js +222 -0
- package/dist/agent/progress-tracker.js.map +1 -0
- package/dist/agent/status-reporter.js +2 -2
- package/dist/agent/status-reporter.js.map +1 -1
- package/dist/agent/subagent.js +3 -3
- package/dist/agent/subagent.js.map +1 -1
- package/dist/analyzers/git/churn-calculator.js +2 -1
- package/dist/analyzers/git/churn-calculator.js.map +1 -1
- package/dist/checkpoint/storage.js +6 -4
- package/dist/checkpoint/storage.js.map +1 -1
- package/dist/commands/cache.js +8 -6
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/doctor.js +19 -27
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/mcp-migrate.js +6 -5
- package/dist/commands/mcp-migrate.js.map +1 -1
- package/dist/commands/models.js +8 -12
- package/dist/commands/models.js.map +1 -1
- package/dist/commands/plan.js +1 -10
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/setup.js +2 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/status.js +4 -4
- package/dist/commands/status.js.map +1 -1
- package/dist/constants.d.ts +12 -0
- package/dist/constants.js +16 -4
- package/dist/constants.js.map +1 -1
- package/dist/hooks/hook-runner.d.ts +138 -0
- package/dist/hooks/hook-runner.js +429 -0
- package/dist/hooks/hook-runner.js.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.js +1 -19
- package/dist/index.js.map +1 -1
- package/dist/llm/tools.js +2 -39
- package/dist/llm/tools.js.map +1 -1
- package/dist/mcp/automatosx-loader.js +2 -1
- package/dist/mcp/automatosx-loader.js.map +1 -1
- package/dist/mcp/config-migrator.js +3 -2
- package/dist/mcp/config-migrator.js.map +1 -1
- package/dist/mcp/config-v2.d.ts +5 -0
- package/dist/mcp/config-v2.js +26 -0
- package/dist/mcp/config-v2.js.map +1 -1
- package/dist/mcp/error-formatter.js +4 -1
- package/dist/mcp/error-formatter.js.map +1 -1
- package/dist/mcp/reconnection.js +2 -1
- package/dist/mcp/reconnection.js.map +1 -1
- package/dist/mcp/registry.js +3 -2
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/resources.js +2 -1
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/validation.js +9 -0
- package/dist/mcp/validation.js.map +1 -1
- package/dist/memory/context-store.js +4 -6
- package/dist/memory/context-store.js.map +1 -1
- package/dist/memory/types.d.ts +2 -0
- package/dist/memory/types.js +4 -1
- package/dist/memory/types.js.map +1 -1
- package/dist/permissions/index.d.ts +6 -0
- package/dist/permissions/index.js +7 -0
- package/dist/permissions/index.js.map +1 -0
- package/dist/permissions/permission-manager.d.ts +145 -0
- package/dist/permissions/permission-manager.js +401 -0
- package/dist/permissions/permission-manager.js.map +1 -0
- package/dist/planner/task-planner.js +2 -1
- package/dist/planner/task-planner.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/settings-schemas.d.ts +0 -14
- package/dist/schemas/settings-schemas.js +0 -10
- package/dist/schemas/settings-schemas.js.map +1 -1
- package/dist/schemas/tool-schemas.d.ts +2 -2
- package/dist/schemas/yaml-schemas.d.ts +15 -0
- package/dist/schemas/yaml-schemas.js +3 -0
- package/dist/schemas/yaml-schemas.js.map +1 -1
- package/dist/tools/bash.js +6 -5
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/confirmation-tool.js +3 -2
- package/dist/tools/confirmation-tool.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.js +2 -1
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/todo-tool.js +3 -2
- package/dist/tools/todo-tool.js.map +1 -1
- package/dist/ui/components/tool-group-display.js +0 -6
- package/dist/ui/components/tool-group-display.js.map +1 -1
- package/dist/ui/hooks/use-input-handler.js +7 -6
- package/dist/ui/hooks/use-input-handler.js.map +1 -1
- package/dist/ui/hooks/use-input-history.js +4 -4
- package/dist/ui/hooks/use-input-history.js.map +1 -1
- package/dist/ui/utils/tool-grouper.d.ts +1 -2
- package/dist/ui/utils/tool-grouper.js +4 -15
- package/dist/ui/utils/tool-grouper.js.map +1 -1
- package/dist/utils/audit-logger.js +2 -1
- package/dist/utils/audit-logger.js.map +1 -1
- package/dist/utils/config-loader.d.ts +3 -0
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/encryption.js +2 -1
- package/dist/utils/encryption.js.map +1 -1
- package/dist/utils/file-cache.js +4 -2
- package/dist/utils/file-cache.js.map +1 -1
- package/dist/utils/onboarding-manager.js +2 -1
- package/dist/utils/onboarding-manager.js.map +1 -1
- package/dist/utils/path-helpers.js +3 -2
- package/dist/utils/path-helpers.js.map +1 -1
- package/dist/utils/path-security.js +3 -2
- package/dist/utils/path-security.js.map +1 -1
- package/dist/utils/settings-manager.d.ts +1 -21
- package/dist/utils/settings-manager.js +2 -82
- package/dist/utils/settings-manager.js.map +1 -1
- package/dist/utils/streaming-analyzer.d.ts +2 -13
- package/dist/utils/streaming-analyzer.js +3 -25
- package/dist/utils/streaming-analyzer.js.map +1 -1
- package/dist/utils/token-counter.d.ts +8 -1
- package/dist/utils/token-counter.js +14 -5
- package/dist/utils/token-counter.js.map +1 -1
- package/package.json +3 -2
- package/packages/schemas/README.md +1 -1
- package/packages/schemas/package.json +1 -1
- package/.ax-cli/CUSTOM.md +0 -97
- package/.ax-cli/auto-accept-audit.json +0 -1302
- package/.ax-cli/index.json +0 -43
- package/.ax-cli/memory.json +0 -55
- package/.ax-cli/settings.json +0 -12
- package/ax.config.json +0 -303
- package/dist/tools/web-search/cache.d.ts +0 -62
- package/dist/tools/web-search/cache.js +0 -105
- package/dist/tools/web-search/cache.js.map +0 -1
- package/dist/tools/web-search/engines/crates.d.ts +0 -19
- package/dist/tools/web-search/engines/crates.js +0 -87
- package/dist/tools/web-search/engines/crates.js.map +0 -1
- package/dist/tools/web-search/engines/npm.d.ts +0 -18
- package/dist/tools/web-search/engines/npm.js +0 -86
- package/dist/tools/web-search/engines/npm.js.map +0 -1
- package/dist/tools/web-search/engines/pypi.d.ts +0 -18
- package/dist/tools/web-search/engines/pypi.js +0 -75
- package/dist/tools/web-search/engines/pypi.js.map +0 -1
- package/dist/tools/web-search/engines/stackoverflow.d.ts +0 -30
- package/dist/tools/web-search/engines/stackoverflow.js +0 -130
- package/dist/tools/web-search/engines/stackoverflow.js.map +0 -1
- package/dist/tools/web-search/engines/wikipedia.d.ts +0 -27
- package/dist/tools/web-search/engines/wikipedia.js +0 -112
- package/dist/tools/web-search/engines/wikipedia.js.map +0 -1
- package/dist/tools/web-search/index.d.ts +0 -11
- package/dist/tools/web-search/index.js +0 -11
- package/dist/tools/web-search/index.js.map +0 -1
- package/dist/tools/web-search/router.d.ts +0 -36
- package/dist/tools/web-search/router.js +0 -270
- package/dist/tools/web-search/router.js.map +0 -1
- package/dist/tools/web-search/types.d.ts +0 -45
- package/dist/tools/web-search/types.js +0 -6
- package/dist/tools/web-search/types.js.map +0 -1
- package/dist/tools/web-search/web-search-tool.d.ts +0 -51
- package/dist/tools/web-search/web-search-tool.js +0 -262
- package/dist/tools/web-search/web-search-tool.js.map +0 -1
- package/packages/schemas/dist/index.d.ts +0 -14
- package/packages/schemas/dist/index.d.ts.map +0 -1
- package/packages/schemas/dist/index.js +0 -19
- package/packages/schemas/dist/index.js.map +0 -1
- package/packages/schemas/dist/public/core/brand-types.d.ts +0 -308
- package/packages/schemas/dist/public/core/brand-types.d.ts.map +0 -1
- package/packages/schemas/dist/public/core/brand-types.js +0 -243
- package/packages/schemas/dist/public/core/brand-types.js.map +0 -1
- package/packages/schemas/dist/public/core/enums.d.ts +0 -227
- package/packages/schemas/dist/public/core/enums.d.ts.map +0 -1
- package/packages/schemas/dist/public/core/enums.js +0 -222
- package/packages/schemas/dist/public/core/enums.js.map +0 -1
- package/packages/schemas/dist/public/core/id-types.d.ts +0 -286
- package/packages/schemas/dist/public/core/id-types.d.ts.map +0 -1
- package/packages/schemas/dist/public/core/id-types.js +0 -136
- package/packages/schemas/dist/public/core/id-types.js.map +0 -1
package/README.md
CHANGED
|
@@ -20,12 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
- [🚀 Quick Start](#-quick-start)
|
|
22
22
|
- [✨ Features](#-features)
|
|
23
|
-
- [🎉 What's New](#-whats-new-in-
|
|
23
|
+
- [🎉 What's New](#-whats-new-in-v388)
|
|
24
24
|
- [📦 Installation](#-installation)
|
|
25
25
|
- [⚙️ Configuration](#️-configuration)
|
|
26
26
|
- [🔒 Security](#-security--api-key-handling)
|
|
27
27
|
- [🎯 Usage Examples](#-usage-examples)
|
|
28
|
-
- [🌐 Web Search](#-web-search)
|
|
29
28
|
- [🔌 MCP Integration](#-mcp-model-context-protocol)
|
|
30
29
|
- [🧠 Project Memory](#-project-memory)
|
|
31
30
|
- [🎯 Multi-Phase Planner](#-multi-phase-task-planner-v300)
|
|
@@ -100,19 +99,6 @@ ax-cli
|
|
|
100
99
|
- **Verbose mode**: Full details for debugging
|
|
101
100
|
- Press `Ctrl+O` to cycle between levels
|
|
102
101
|
- Auto-expands errors with full details
|
|
103
|
-
- **💬 Dual-Model Mode**: Use different models for chat vs coding
|
|
104
|
-
- Configure chat and coding models separately
|
|
105
|
-
- Manual model switching with `--chat-mode` flag
|
|
106
|
-
- Optimize cost and performance for different task types
|
|
107
|
-
- **🌐 Web Search**: Real-time package search capabilities
|
|
108
|
-
- **Works out-of-the-box**: npm, PyPI, and crates.io package search (no API keys required)
|
|
109
|
-
- **Intelligent routing**: Automatically selects the best engine based on query intent
|
|
110
|
-
- JavaScript/Node.js packages → npm registry search
|
|
111
|
-
- Python packages → PyPI registry search
|
|
112
|
-
- Rust packages → crates.io registry search
|
|
113
|
-
- Results caching for faster responses (5 minute TTL)
|
|
114
|
-
- Support for package discovery, dependency research, and version information
|
|
115
|
-
- Session-based context for iterative package exploration
|
|
116
102
|
- **🔄 Auto-Update**: Built-in update checker and installer
|
|
117
103
|
- **🔒 Enterprise-Grade Security**: **FREE & Open Source**
|
|
118
104
|
- **Command Injection Protection**: CVSS 9.8 CRITICAL fix - Safe command execution with whitelisting
|
|
@@ -164,6 +150,33 @@ AX CLI uses **industry-standard max tokens** based on research of leading AI cod
|
|
|
164
150
|
|
|
165
151
|
[View all features →](docs/features.md)
|
|
166
152
|
|
|
153
|
+
## 🎉 What's New in v3.8.8
|
|
154
|
+
|
|
155
|
+
**Code Quality & Maintainability Release** - Major refactoring for improved code consistency:
|
|
156
|
+
|
|
157
|
+
### 🔧 Improvements
|
|
158
|
+
|
|
159
|
+
- **Centralized configuration constants** - Added `CONFIG_DIR_NAME` constant to eliminate hard-coded `.ax-cli` strings across 15+ files
|
|
160
|
+
- **Unified error handling** - Replaced inline `error instanceof Error ? error.message : String(error)` patterns with `extractErrorMessage()` utility across 20+ files
|
|
161
|
+
- **Improved ES module consistency** - Converted inline `require()` calls to proper ES module imports
|
|
162
|
+
- **Better home directory handling** - Replaced `process.env.HOME || process.env.USERPROFILE` patterns with Node.js `homedir()` function
|
|
163
|
+
- **Removed examples folder** - Cleaned up unused example files
|
|
164
|
+
|
|
165
|
+
### ✅ Quality
|
|
166
|
+
|
|
167
|
+
- All tests passing
|
|
168
|
+
- 98%+ test coverage maintained
|
|
169
|
+
- Zero breaking changes
|
|
170
|
+
- Improved code maintainability
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 🎉 What's New in v3.8.7
|
|
175
|
+
|
|
176
|
+
**Critical Bug Fixes & Resilience Improvements** - Stability and reliability enhancements.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
167
180
|
## 🎉 What's New in v3.8.6
|
|
168
181
|
|
|
169
182
|
**Patch Release** - Bug fixes and stability improvements:
|
|
@@ -738,374 +751,6 @@ The `doctor` command checks:
|
|
|
738
751
|
- ✓ MCP server configuration
|
|
739
752
|
- ✓ Dependencies (ripgrep, git)
|
|
740
753
|
|
|
741
|
-
## 💬 Dual-Model Mode
|
|
742
|
-
|
|
743
|
-
Use different models for chat vs coding tasks to optimize performance and cost:
|
|
744
|
-
|
|
745
|
-
### Configuration
|
|
746
|
-
|
|
747
|
-
**Option 1: Project Settings** (recommended for project-specific preferences)
|
|
748
|
-
|
|
749
|
-
Add to `.ax-cli/settings.json` in your project directory:
|
|
750
|
-
|
|
751
|
-
```json
|
|
752
|
-
{
|
|
753
|
-
"dualModel": {
|
|
754
|
-
"enabled": true,
|
|
755
|
-
"chatModel": "grok-code-fast-1",
|
|
756
|
-
"codingModel": "glm-4.6"
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
```
|
|
760
|
-
|
|
761
|
-
**Option 2: Environment Variables** (for temporary or CI/CD use)
|
|
762
|
-
|
|
763
|
-
### Usage
|
|
764
|
-
|
|
765
|
-
```bash
|
|
766
|
-
# Use faster chat model for questions
|
|
767
|
-
ax-cli --chat-mode -p "explain what this project does"
|
|
768
|
-
|
|
769
|
-
# Use coding model (default) for implementation
|
|
770
|
-
ax-cli -p "implement user authentication"
|
|
771
|
-
|
|
772
|
-
# In interactive mode, default is coding model
|
|
773
|
-
ax-cli
|
|
774
|
-
```
|
|
775
|
-
|
|
776
|
-
### Environment Variables
|
|
777
|
-
|
|
778
|
-
```bash
|
|
779
|
-
# Enable dual-model mode
|
|
780
|
-
export AI_DUAL_MODEL_ENABLED=true
|
|
781
|
-
export AI_CHAT_MODEL=grok-code-fast-1
|
|
782
|
-
export AI_CODING_MODEL=glm-4.6
|
|
783
|
-
|
|
784
|
-
ax-cli --chat-mode
|
|
785
|
-
```
|
|
786
|
-
|
|
787
|
-
**Benefits:**
|
|
788
|
-
- 💰 **Cost savings**: Use faster/cheaper models for simple queries
|
|
789
|
-
- ⚡ **Better performance**: Match model capability to task complexity
|
|
790
|
-
- 🎯 **Manual control**: You decide when to use each model
|
|
791
|
-
|
|
792
|
-
## 🌐 Web Search
|
|
793
|
-
|
|
794
|
-
Search package registries for JavaScript, Python, and Rust packages with intelligent language detection and cross-registry comparison.
|
|
795
|
-
|
|
796
|
-
### ✨ Works Out of the Box!
|
|
797
|
-
|
|
798
|
-
**Package search is enabled by default** (no API key required):
|
|
799
|
-
- **npm** - JavaScript/Node.js packages from npmjs.com
|
|
800
|
-
- **PyPI** - Python packages from pypi.org
|
|
801
|
-
- **crates.io** - Rust packages from crates.io
|
|
802
|
-
|
|
803
|
-
### Quick Setup
|
|
804
|
-
|
|
805
|
-
**No setup required!** Package search works immediately:
|
|
806
|
-
- **npm** - JavaScript/Node.js packages work immediately
|
|
807
|
-
- **PyPI** - Python packages work immediately
|
|
808
|
-
- **crates.io** - Rust packages work immediately
|
|
809
|
-
- Perfect for package discovery and dependency management
|
|
810
|
-
- No API keys needed
|
|
811
|
-
|
|
812
|
-
### Usage
|
|
813
|
-
|
|
814
|
-
```bash
|
|
815
|
-
# The AI will automatically use web search when needed
|
|
816
|
-
ax-cli
|
|
817
|
-
|
|
818
|
-
> "Find a React state management library" # Uses npm search
|
|
819
|
-
> "Search for axios npm package" # Uses npm search
|
|
820
|
-
> "Find a Python data analysis library" # Uses PyPI search
|
|
821
|
-
> "Search for tokio rust crate" # Uses crates.io search
|
|
822
|
-
```
|
|
823
|
-
|
|
824
|
-
### How It Works
|
|
825
|
-
|
|
826
|
-
- **Intelligent Routing**: Automatically selects the best search engine based on query type and language detection
|
|
827
|
-
- **JavaScript/Node.js packages** → npm registry search (always available, no API key)
|
|
828
|
-
- **Python packages** → PyPI registry search (always available, no API key)
|
|
829
|
-
- **Rust packages** → crates.io registry search (always available, no API key)
|
|
830
|
-
- **General/technical queries** → package search fallback
|
|
831
|
-
|
|
832
|
-
- **Language Detection**: Automatically detects programming language from keywords
|
|
833
|
-
- Python keywords (pip, django, flask, pandas) → PyPI
|
|
834
|
-
- Rust keywords (cargo, crate, tokio, serde) → crates.io
|
|
835
|
-
- npm/package keywords → npm registry
|
|
836
|
-
- Multiple engines may be used in parallel for best results
|
|
837
|
-
|
|
838
|
-
- **Automatic Caching**: Results cached for 5 minutes for faster subsequent queries
|
|
839
|
-
|
|
840
|
-
- **LLM Integration**: The AI automatically uses package search for:
|
|
841
|
-
- Package discovery and dependency management
|
|
842
|
-
- Version compatibility checks
|
|
843
|
-
- Alternative package recommendations
|
|
844
|
-
- Package documentation and usage information
|
|
845
|
-
|
|
846
|
-
### Features
|
|
847
|
-
|
|
848
|
-
- **Multi-Registry Package Search**: Search across npm, PyPI, and crates.io simultaneously
|
|
849
|
-
- Package metadata, descriptions, and download statistics
|
|
850
|
-
- Version information and release dates
|
|
851
|
-
- No API keys or setup required
|
|
852
|
-
- **Source Attribution**: All results include URLs and sources
|
|
853
|
-
- **Parallel Search**: Multiple engines searched concurrently for comprehensive results
|
|
854
|
-
|
|
855
|
-
### Manual Usage
|
|
856
|
-
|
|
857
|
-
While the AI uses web search automatically, you can also request it explicitly:
|
|
858
|
-
|
|
859
|
-
```bash
|
|
860
|
-
# In interactive mode
|
|
861
|
-
> "search npm for a markdown parser library"
|
|
862
|
-
> "search PyPI for a web scraping package"
|
|
863
|
-
> "search crates.io for async runtime"
|
|
864
|
-
|
|
865
|
-
# Headless mode
|
|
866
|
-
ax-cli -p "search for react-query npm package"
|
|
867
|
-
ax-cli -p "find a Python FastAPI alternative"
|
|
868
|
-
```
|
|
869
|
-
|
|
870
|
-
### Web Search Session
|
|
871
|
-
|
|
872
|
-
AX CLI maintains intelligent search context across your conversation, enabling natural follow-up questions and iterative refinement:
|
|
873
|
-
|
|
874
|
-
**Session Continuity:**
|
|
875
|
-
- Package search results are preserved in conversation context
|
|
876
|
-
- Ask follow-up questions about packages without re-searching
|
|
877
|
-
- Reference previous search results naturally
|
|
878
|
-
- Session context includes package URLs, metadata, versions, and download stats
|
|
879
|
-
|
|
880
|
-
**Example Session:**
|
|
881
|
-
|
|
882
|
-
```bash
|
|
883
|
-
ax-cli
|
|
884
|
-
|
|
885
|
-
# Initial package search
|
|
886
|
-
> "search npm for a state management library"
|
|
887
|
-
🔍 Searching npm registry...
|
|
888
|
-
Found 5 packages:
|
|
889
|
-
|
|
890
|
-
1. **zustand** (2.5M weekly downloads)
|
|
891
|
-
Small, fast and scalable state-management
|
|
892
|
-
Latest: v4.4.7 | Size: 1.2KB gzipped
|
|
893
|
-
|
|
894
|
-
2. **redux** (8.1M weekly downloads)
|
|
895
|
-
Predictable state container for JavaScript apps
|
|
896
|
-
Latest: v5.0.0 | Size: 6.2KB (core only)
|
|
897
|
-
|
|
898
|
-
3. **mobx** (1.2M weekly downloads)
|
|
899
|
-
Simple, scalable state management
|
|
900
|
-
Latest: v6.12.0 | Size: 16KB
|
|
901
|
-
...
|
|
902
|
-
|
|
903
|
-
# Natural follow-up (uses cached context from npm search)
|
|
904
|
-
> "which one has the smallest bundle size?"
|
|
905
|
-
Based on the npm search results:
|
|
906
|
-
- ✅ zustand: 1.2KB (gzipped) - Smallest
|
|
907
|
-
- jotai: 2.9KB (gzipped)
|
|
908
|
-
- redux: 6.2KB (core only)
|
|
909
|
-
- mobx: 16KB
|
|
910
|
-
|
|
911
|
-
# Version and compatibility check
|
|
912
|
-
> "what's the latest version of zustand and does it support React 18?"
|
|
913
|
-
Package: zustand v4.4.7 (latest)
|
|
914
|
-
✅ Full React 18 support with concurrent features
|
|
915
|
-
✅ TypeScript 5.0+ support
|
|
916
|
-
📅 Last published: 2 weeks ago
|
|
917
|
-
|
|
918
|
-
# Installation guide
|
|
919
|
-
> "show me how to install and use zustand"
|
|
920
|
-
Installation:
|
|
921
|
-
npm install zustand
|
|
922
|
-
|
|
923
|
-
Basic usage:
|
|
924
|
-
[Provides code example from npm documentation]
|
|
925
|
-
```
|
|
926
|
-
|
|
927
|
-
**Context-Aware Features:**
|
|
928
|
-
|
|
929
|
-
1. **Result Caching**: Package search results stay in memory for the session
|
|
930
|
-
- 5-minute cache for identical queries
|
|
931
|
-
- Instant responses for follow-up questions about packages
|
|
932
|
-
- No repeated API calls to registries
|
|
933
|
-
|
|
934
|
-
2. **Multi-Turn Package Refinement**:
|
|
935
|
-
```bash
|
|
936
|
-
> "search npm for a react table library"
|
|
937
|
-
Found: tanstack-table, react-table, ag-grid-react, mui-x-data-grid
|
|
938
|
-
|
|
939
|
-
> "which ones have TypeScript support?"
|
|
940
|
-
All 4 packages support TypeScript:
|
|
941
|
-
- @tanstack/react-table: Full TS rewrite
|
|
942
|
-
- react-table (deprecated, use @tanstack)
|
|
943
|
-
- ag-grid-react: TypeScript included
|
|
944
|
-
- @mui/x-data-grid: Full TS support
|
|
945
|
-
|
|
946
|
-
> "which has the best documentation?"
|
|
947
|
-
Based on npm stats and GitHub stars:
|
|
948
|
-
- @tanstack/react-table: Excellent docs, 24K stars
|
|
949
|
-
|
|
950
|
-
> "install that one"
|
|
951
|
-
npm install @tanstack/react-table
|
|
952
|
-
```
|
|
953
|
-
|
|
954
|
-
3. **Cross-Registry Context**:
|
|
955
|
-
```bash
|
|
956
|
-
> "search for data validation libraries"
|
|
957
|
-
Searching npm, PyPI, and crates.io...
|
|
958
|
-
|
|
959
|
-
npm: zod, yup, joi, ajv
|
|
960
|
-
PyPI: pydantic, marshmallow, cerberus
|
|
961
|
-
crates.io: serde, validator
|
|
962
|
-
|
|
963
|
-
> "compare the JavaScript and Python options"
|
|
964
|
-
**JavaScript (npm):**
|
|
965
|
-
- zod: 3.5M/week, TypeScript-first, 30KB
|
|
966
|
-
- yup: 5.2M/week, Schema builder, 45KB
|
|
967
|
-
|
|
968
|
-
**Python (PyPI):**
|
|
969
|
-
- pydantic: 50M/month, Type hints, fast
|
|
970
|
-
- marshmallow: 8M/month, Schema validation
|
|
971
|
-
|
|
972
|
-
> "which is fastest?"
|
|
973
|
-
- JavaScript: zod (TypeScript inference, zero-cost)
|
|
974
|
-
- Python: pydantic (uses Rust core, 20x faster than marshmallow)
|
|
975
|
-
```
|
|
976
|
-
|
|
977
|
-
4. **Package Comparison Tables**:
|
|
978
|
-
```bash
|
|
979
|
-
> "search npm for http client libraries"
|
|
980
|
-
Found: axios, node-fetch, got, ky, superagent
|
|
981
|
-
|
|
982
|
-
> "create a comparison table"
|
|
983
|
-
|
|
984
|
-
| Package | Weekly DLs | Size | Last Update | Browser | Node |
|
|
985
|
-
|-------------|------------|---------|-------------|---------|------|
|
|
986
|
-
| axios | 48M | 11.5KB | 2 weeks ago | ✅ | ✅ |
|
|
987
|
-
| node-fetch | 35M | 4.5KB | 3 months | ❌ | ✅ |
|
|
988
|
-
| got | 23M | 15KB | 1 week ago | ❌ | ✅ |
|
|
989
|
-
| ky | 1.2M | 12KB | 2 weeks ago | ✅ | ✅ |
|
|
990
|
-
|
|
991
|
-
> "which is best for Node.js backend with retry logic?"
|
|
992
|
-
Recommendation: **got**
|
|
993
|
-
- Built-in retry with exponential backoff
|
|
994
|
-
- HTTP/2 support
|
|
995
|
-
- Request cancellation
|
|
996
|
-
- Promise & stream support
|
|
997
|
-
```
|
|
998
|
-
|
|
999
|
-
**Session Management:**
|
|
1000
|
-
|
|
1001
|
-
- **Session Duration**: Active for entire interactive session
|
|
1002
|
-
- **History Integration**: Search results included in `--continue` sessions
|
|
1003
|
-
- **Memory Commands**:
|
|
1004
|
-
```bash
|
|
1005
|
-
/clear # Clears search context and conversation
|
|
1006
|
-
/exit # Ends session (context lost)
|
|
1007
|
-
```
|
|
1008
|
-
- **Persistent Context**: Use with `--continue` to maintain search context across sessions
|
|
1009
|
-
|
|
1010
|
-
**Best Practices:**
|
|
1011
|
-
|
|
1012
|
-
1. **Start Broad, Refine Iteratively**:
|
|
1013
|
-
```bash
|
|
1014
|
-
> "search npm for testing libraries"
|
|
1015
|
-
Found: jest, vitest, mocha, jasmine, playwright, cypress
|
|
1016
|
-
|
|
1017
|
-
> "focus on those for integration testing"
|
|
1018
|
-
Integration testing: playwright, cypress, vitest (has browser mode)
|
|
1019
|
-
|
|
1020
|
-
> "which has TypeScript support?"
|
|
1021
|
-
All 3 have TypeScript:
|
|
1022
|
-
- playwright: Native TS
|
|
1023
|
-
- cypress: Full TS support
|
|
1024
|
-
- vitest: Native TS (Vite-powered)
|
|
1025
|
-
|
|
1026
|
-
> "show setup for playwright"
|
|
1027
|
-
npm install -D @playwright/test
|
|
1028
|
-
[Provides example config and test]
|
|
1029
|
-
```
|
|
1030
|
-
|
|
1031
|
-
2. **Leverage Context for Framework Comparisons**:
|
|
1032
|
-
```bash
|
|
1033
|
-
> "search npm for react vue svelte packages"
|
|
1034
|
-
Found core packages with download stats:
|
|
1035
|
-
- react: 22M/week
|
|
1036
|
-
- vue: 5.1M/week
|
|
1037
|
-
- svelte: 850K/week
|
|
1038
|
-
|
|
1039
|
-
> "compare their package ecosystems"
|
|
1040
|
-
**React:** 180K+ packages
|
|
1041
|
-
**Vue:** 45K+ packages
|
|
1042
|
-
**Svelte:** 8K+ packages
|
|
1043
|
-
|
|
1044
|
-
> "which has better TypeScript support?"
|
|
1045
|
-
All have excellent TS support:
|
|
1046
|
-
- React: @types/react (20M/week)
|
|
1047
|
-
- Vue: Built-in TS (Vue 3+)
|
|
1048
|
-
- Svelte: svelte-check + TypeScript plugin
|
|
1049
|
-
```
|
|
1050
|
-
|
|
1051
|
-
3. **Version Compatibility Checks**:
|
|
1052
|
-
```bash
|
|
1053
|
-
> "search npm for next auth package"
|
|
1054
|
-
Found: next-auth (8M/week, v4.24.5)
|
|
1055
|
-
|
|
1056
|
-
> "does it work with Next.js 15?"
|
|
1057
|
-
⚠️ Compatibility:
|
|
1058
|
-
- next-auth v4: Next.js 12-14
|
|
1059
|
-
- For Next.js 15: Use NextAuth.js v5 (beta)
|
|
1060
|
-
|
|
1061
|
-
> "show me the v5 package"
|
|
1062
|
-
Package: next-auth@beta (v5.0.0-beta.4)
|
|
1063
|
-
✅ Next.js 15 compatible
|
|
1064
|
-
[Installation and migration guide]
|
|
1065
|
-
```
|
|
1066
|
-
|
|
1067
|
-
4. **Combine Search with Development Tasks**:
|
|
1068
|
-
```bash
|
|
1069
|
-
> "search npm for a markdown parser library"
|
|
1070
|
-
Found: marked, remark, markdown-it, showdown
|
|
1071
|
-
|
|
1072
|
-
> "which is fastest and most secure?"
|
|
1073
|
-
Recommendation: **marked**
|
|
1074
|
-
- 13M/week downloads
|
|
1075
|
-
- Fast (built-in sanitization)
|
|
1076
|
-
- Active maintenance
|
|
1077
|
-
|
|
1078
|
-
> "install marked and show me basic usage"
|
|
1079
|
-
Installing: npm install marked
|
|
1080
|
-
[Generates code example with marked usage]
|
|
1081
|
-
|
|
1082
|
-
> "add it to my project"
|
|
1083
|
-
[Creates/updates relevant files with implementation]
|
|
1084
|
-
```
|
|
1085
|
-
|
|
1086
|
-
**Performance Tips:**
|
|
1087
|
-
|
|
1088
|
-
- **First search**: 1-3 seconds (registry API call)
|
|
1089
|
-
- **Follow-up questions**: Instant (uses cached package data)
|
|
1090
|
-
- **Cache duration**: 5 minutes per query
|
|
1091
|
-
- **Parallel searches**: Multiple registries searched concurrently for cross-language queries
|
|
1092
|
-
- **Offline work**: Use `--continue` to preserve search context across sessions
|
|
1093
|
-
|
|
1094
|
-
### Troubleshooting
|
|
1095
|
-
|
|
1096
|
-
**No results found**
|
|
1097
|
-
- Package registries (npm, PyPI, crates.io) are always available
|
|
1098
|
-
- Try refining your search query
|
|
1099
|
-
- Check your internet connection
|
|
1100
|
-
|
|
1101
|
-
**Rate limit errors**
|
|
1102
|
-
- Package registry searches are rate-limited by the registry providers
|
|
1103
|
-
- Results are cached to minimize API calls
|
|
1104
|
-
|
|
1105
|
-
**Slow searches**
|
|
1106
|
-
- Results are cached after first search (5 minute TTL)
|
|
1107
|
-
- Subsequent identical queries will be instant
|
|
1108
|
-
|
|
1109
754
|
## 🔌 MCP (Model Context Protocol)
|
|
1110
755
|
|
|
1111
756
|
Extend AX CLI with MCP servers for additional capabilities:
|
|
@@ -1304,15 +949,6 @@ AX CLI implements enterprise-grade architecture with:
|
|
|
1304
949
|
### v3.6.1 (2025-11-22)
|
|
1305
950
|
|
|
1306
951
|
**🔧 Improvements:**
|
|
1307
|
-
- **Web Search Simplification**: Removed Tavily AI dependency, focusing entirely on package registries
|
|
1308
|
-
- Streamlined to npm, PyPI, and crates.io package search only
|
|
1309
|
-
- No API keys required for web search functionality
|
|
1310
|
-
- Reduced dependencies and simplified architecture
|
|
1311
|
-
- **Documentation Overhaul**: Completely updated web search documentation
|
|
1312
|
-
- 200+ lines updated with package-focused examples
|
|
1313
|
-
- 15+ new realistic examples showing npm, PyPI, and crates.io workflows
|
|
1314
|
-
- Comprehensive session examples for package discovery and comparison
|
|
1315
|
-
- Best practices for cross-registry searches and version compatibility checks
|
|
1316
952
|
- **Smart Paste Auto-Collapse**: Intelligent handling of large text inputs
|
|
1317
953
|
- Automatic collapse of 20+ line pastes for better readability
|
|
1318
954
|
- Press Ctrl+P to expand/collapse pasted content
|
|
@@ -1434,7 +1070,6 @@ AX CLI implements enterprise-grade architecture with:
|
|
|
1434
1070
|
- Multi-phase task planner with automatic complexity detection
|
|
1435
1071
|
- Enhanced MCP integration with production-ready templates
|
|
1436
1072
|
- Project memory system with intelligent context caching
|
|
1437
|
-
- Web search capabilities with npm, PyPI, and crates.io package registries
|
|
1438
1073
|
- Advanced code analysis tools (dependency, security, metrics)
|
|
1439
1074
|
|
|
1440
1075
|
## 📄 License
|
|
@@ -6,6 +6,7 @@ agent:
|
|
|
6
6
|
default_timeout: 360000 # 6 minutes in milliseconds
|
|
7
7
|
default_max_tokens: 8192
|
|
8
8
|
max_recent_tool_calls: 20 # Keep only last 20 unique tool calls
|
|
9
|
+
max_messages: 500 # Maximum number of messages to keep in chat history
|
|
9
10
|
|
|
10
11
|
# Loop Detection (ENABLED BY DEFAULT)
|
|
11
12
|
# Detects when the AI repeats the same tool call multiple times
|
|
@@ -90,6 +91,8 @@ token:
|
|
|
90
91
|
cache:
|
|
91
92
|
default_max_size: 1000
|
|
92
93
|
default_ttl: 300000 # 5 minutes
|
|
94
|
+
tool_args_cache_max_size: 500 # Max entries for tool call arguments cache
|
|
95
|
+
tool_args_cache_prune_count: 100 # Number of entries to remove when cache is full
|
|
93
96
|
|
|
94
97
|
performance:
|
|
95
98
|
debounce_delay: 300 # milliseconds
|
|
@@ -57,7 +57,6 @@ export declare class LLMAgent extends EventEmitter {
|
|
|
57
57
|
private bashOutput;
|
|
58
58
|
private todoTool;
|
|
59
59
|
private search;
|
|
60
|
-
private webSearch;
|
|
61
60
|
private _architectureTool?;
|
|
62
61
|
private _validationTool?;
|
|
63
62
|
private chatHistory;
|
|
@@ -172,13 +171,23 @@ export declare class LLMAgent extends EventEmitter {
|
|
|
172
171
|
private get validationTool();
|
|
173
172
|
/**
|
|
174
173
|
* Detect if a tool call is repetitive (likely causing a loop)
|
|
175
|
-
*
|
|
174
|
+
* Uses the intelligent LoopDetector which provides:
|
|
175
|
+
* - Tool-specific thresholds (file ops get higher limits)
|
|
176
|
+
* - Progress-based detection (tracks success/failure)
|
|
177
|
+
* - Cycle pattern detection (A→B→A→B loops)
|
|
176
178
|
*/
|
|
177
179
|
private isRepetitiveToolCall;
|
|
180
|
+
/** Last loop detection result for error messages */
|
|
181
|
+
private lastLoopResult?;
|
|
178
182
|
/**
|
|
179
183
|
* Reset the tool call tracking (called at start of new user message)
|
|
180
184
|
*/
|
|
181
185
|
private resetToolCallTracking;
|
|
186
|
+
/**
|
|
187
|
+
* Generate a helpful warning message when a loop is detected
|
|
188
|
+
* Uses the lastLoopResult for context-aware suggestions
|
|
189
|
+
*/
|
|
190
|
+
private getLoopWarningMessage;
|
|
182
191
|
/**
|
|
183
192
|
* Check if a request should trigger multi-phase planning
|
|
184
193
|
*/
|