@defai.digital/ax-cli 1.0.0 → 1.1.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/.ax-cli/index.json +43 -0
- package/README.md +370 -75
- package/automatosx.config.json +333 -0
- package/dist/agent/context-manager.d.ts +76 -0
- package/dist/agent/context-manager.js +239 -0
- package/dist/agent/context-manager.js.map +1 -0
- package/dist/agent/grok-agent.d.ts +1 -0
- package/dist/agent/grok-agent.js +16 -0
- package/dist/agent/grok-agent.js.map +1 -1
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.js +106 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.js +173 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/hooks/use-input-handler.js +4 -4
- package/dist/hooks/use-input-handler.js.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/schemas/api-schemas.d.ts +5 -554
- package/dist/schemas/api-schemas.js +3 -3
- package/dist/schemas/api-schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +20 -262
- package/dist/schemas/index.js +5 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/settings-schemas.d.ts +4 -153
- package/dist/schemas/settings-schemas.js +1 -3
- package/dist/schemas/settings-schemas.js.map +1 -1
- package/dist/schemas/tool-schemas.d.ts +6 -6
- package/dist/types/project-analysis.d.ts +76 -0
- package/dist/types/project-analysis.js +5 -0
- package/dist/types/project-analysis.js.map +1 -0
- package/dist/utils/custom-instructions.js +12 -2
- package/dist/utils/custom-instructions.js.map +1 -1
- package/dist/utils/instruction-generator.d.ts +21 -0
- package/dist/utils/instruction-generator.js +233 -0
- package/dist/utils/instruction-generator.js.map +1 -0
- package/dist/utils/project-analyzer.d.ts +24 -0
- package/dist/utils/project-analyzer.js +411 -0
- package/dist/utils/project-analyzer.js.map +1 -0
- package/dist/utils/settings-manager.d.ts +12 -0
- package/dist/utils/settings-manager.js +112 -8
- package/dist/utils/settings-manager.js.map +1 -1
- package/dist/utils/token-counter.js +1 -1
- package/dist/utils/token-counter.js.map +1 -1
- package/dist/utils/version.d.ts +5 -0
- package/dist/utils/version.js +37 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectName": "@defai.digital/ax-cli",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"primaryLanguage": "TypeScript",
|
|
5
|
+
"techStack": [
|
|
6
|
+
"React",
|
|
7
|
+
"Vitest",
|
|
8
|
+
"Zod",
|
|
9
|
+
"Commander",
|
|
10
|
+
"Ink",
|
|
11
|
+
"ESM",
|
|
12
|
+
"TypeScript"
|
|
13
|
+
],
|
|
14
|
+
"projectType": "cli",
|
|
15
|
+
"entryPoint": "dist/index.js",
|
|
16
|
+
"directories": {
|
|
17
|
+
"source": "src",
|
|
18
|
+
"tests": "tests",
|
|
19
|
+
"tools": "src/tools"
|
|
20
|
+
},
|
|
21
|
+
"keyFiles": [
|
|
22
|
+
"package.json",
|
|
23
|
+
"tsconfig.json",
|
|
24
|
+
"vitest.config.ts",
|
|
25
|
+
".eslintrc.js",
|
|
26
|
+
"README.md",
|
|
27
|
+
"CLAUDE.md"
|
|
28
|
+
],
|
|
29
|
+
"conventions": {
|
|
30
|
+
"moduleSystem": "esm",
|
|
31
|
+
"importExtension": ".js",
|
|
32
|
+
"testFramework": "vitest",
|
|
33
|
+
"validation": "zod"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
39
|
+
"dev": "bun run src/index.ts"
|
|
40
|
+
},
|
|
41
|
+
"packageManager": "npm",
|
|
42
|
+
"lastAnalyzed": "2025-11-19T07:45:34.457Z"
|
|
43
|
+
}
|
package/README.md
CHANGED
|
@@ -33,11 +33,7 @@ Originally forked from [grok-cli](https://github.com/superagent-ai/grok-cli), AX
|
|
|
33
33
|
|
|
34
34
|
**GLM-Optimized**: Primary support for GLM (General Language Model) with optimized performance for local and cloud GLM deployments.
|
|
35
35
|
|
|
36
|
-
**
|
|
37
|
-
|
|
38
|
-
**Developer-Centric**: Built by developers, for developers, with smart file operations, bash integration, and intelligent tool selection.
|
|
39
|
-
|
|
40
|
-
**Production-Ready**: Unlike hobby projects, AX CLI is enterprise-grade with extensive testing, TypeScript safety, and proven reliability.
|
|
36
|
+
**Production-Ready**: AX CLI is enterprise-grade with extensive testing, TypeScript safety, and proven reliability.
|
|
41
37
|
|
|
42
38
|
---
|
|
43
39
|
|
|
@@ -222,21 +218,26 @@ npm run test:ui # Interactive UI
|
|
|
222
218
|
- Full conversational AI capabilities offline
|
|
223
219
|
|
|
224
220
|
### 🚀 **Multi-Provider AI Support**
|
|
225
|
-
- **Primary**: GLM 4.6 (
|
|
226
|
-
- **
|
|
227
|
-
- **
|
|
221
|
+
- **Primary**: GLM 4.6 (200K context, reasoning mode) - Default model optimized for AX CLI
|
|
222
|
+
- **Built-in GLM Models**: glm-4.6, grok-code-fast-1, glm-4-air, glm-4-airx
|
|
223
|
+
- **Local Models**: Llama 3.1, Qwen 2.5, DeepSeek, and any Ollama-supported model
|
|
224
|
+
- **Cloud Providers**: OpenAI (GPT-4), Anthropic (Claude), Google (Gemini), X.AI (Grok), OpenRouter, Groq
|
|
225
|
+
- **Z.AI Platform**: Native support for z.ai GLM API server (cloud & local deployments)
|
|
228
226
|
- **Flexible Configuration**: Switch between providers seamlessly
|
|
229
|
-
- **OpenAI-Compatible API**: Works with
|
|
227
|
+
- **OpenAI-Compatible API**: Works with ANY OpenAI-compatible endpoint
|
|
228
|
+
- **Full Backward Compatibility**: All models from original grok-cli still supported
|
|
230
229
|
|
|
231
230
|
### 🤖 **Intelligent Automation**
|
|
232
231
|
- **Smart File Operations**: AI automatically reads, creates, and edits files
|
|
233
232
|
- **Bash Integration**: Execute shell commands through natural conversation
|
|
234
233
|
- **Automatic Tool Selection**: AI chooses the right tools for your requests
|
|
235
234
|
- **Multi-Step Task Execution**: Handle complex workflows with up to 400 tool rounds
|
|
235
|
+
- **Intelligent Context Management**: Automatic pruning for infinite conversation length
|
|
236
|
+
- **Project Analysis**: Auto-detect tech stack, conventions, and structure (`ax-cli init`)
|
|
236
237
|
|
|
237
238
|
### 🔌 **Extensibility**
|
|
238
239
|
- **MCP Protocol Support**: Integrate Model Context Protocol servers
|
|
239
|
-
- **Custom Instructions**: Project-specific AI behavior via `.ax/
|
|
240
|
+
- **Custom Instructions**: Project-specific AI behavior via `.ax-cli/CUSTOM.md`
|
|
240
241
|
- **Plugin Architecture**: Extend with Linear, GitHub, and other MCP tools
|
|
241
242
|
- **Morph Fast Apply**: Optional 4,500+ tokens/sec code editing
|
|
242
243
|
|
|
@@ -398,21 +399,40 @@ ax-cli --directory /path/to/project --prompt "List all TypeScript files"
|
|
|
398
399
|
|
|
399
400
|
#### Supported Providers
|
|
400
401
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
|
404
|
-
|
|
405
|
-
| **
|
|
406
|
-
| **
|
|
407
|
-
| **
|
|
402
|
+
**AX CLI supports ANY OpenAI-compatible API endpoint**, making it universally compatible with major AI providers.
|
|
403
|
+
|
|
404
|
+
| Provider | Base URL | Supported Models | Best For |
|
|
405
|
+
|----------|----------|------------------|----------|
|
|
406
|
+
| **Z.AI** | `https://api.z.ai/v1` | GLM-4.6, GLM-4-Air, GLM-4-AirX | GLM models (cloud & local), 200K context, reasoning mode |
|
|
407
|
+
| **X.AI (Grok)** | `https://api.x.ai/v1` | Grok, Grok Code Fast | Fast code generation, X.AI ecosystem |
|
|
408
|
+
| **OpenAI** | `https://api.openai.com/v1` | GPT-4, GPT-4 Turbo, GPT-3.5 | General purpose, production-ready |
|
|
409
|
+
| **Anthropic** | `https://api.anthropic.com/v1` | Claude 3.5 Sonnet, Claude 3 Opus | Long context, advanced reasoning |
|
|
410
|
+
| **Google** | `https://openrouter.ai/api/v1` | Gemini Pro 1.5 (via OpenRouter) | Multi-modal, Google ecosystem |
|
|
411
|
+
| **OpenRouter** | `https://openrouter.ai/api/v1` | 100+ models from all providers | Model routing, fallback strategies |
|
|
412
|
+
| **Groq** | `https://api.groq.com/openai/v1` | Llama, Mistral, Gemma | Ultra-fast inference (500+ tokens/sec) |
|
|
413
|
+
| **Ollama** | `http://localhost:11434/v1` | Llama, Qwen, DeepSeek, GLM, any | Complete privacy, offline operation |
|
|
414
|
+
|
|
415
|
+
#### Built-in Models
|
|
416
|
+
|
|
417
|
+
AX CLI includes 4 pre-configured GLM models optimized for different use cases:
|
|
418
|
+
|
|
419
|
+
| Model | Context | Max Output | Thinking Mode | Best For |
|
|
420
|
+
|-------|---------|-----------|---------------|----------|
|
|
421
|
+
| **glm-4.6** ⭐ | 200K | 128K | ✅ Yes | Default - Long context, reasoning tasks |
|
|
422
|
+
| **grok-code-fast-1** | 128K | 4K | ❌ No | Fast code generation, quick responses |
|
|
423
|
+
| **glm-4-air** | 128K | 8K | ❌ No | Balanced performance, general tasks |
|
|
424
|
+
| **glm-4-airx** | 8K | 8K | ❌ No | Lightweight, quick interactions |
|
|
425
|
+
|
|
426
|
+
⭐ **Default Model**: glm-4.6 is the default model for AX CLI
|
|
408
427
|
|
|
409
428
|
#### Step 1: Get API Key
|
|
410
429
|
|
|
411
430
|
1. Sign up at your chosen provider:
|
|
431
|
+
- [Z.AI](https://docs.z.ai) - GLM models (recommended for GLM 4.6)
|
|
412
432
|
- [X.AI (Grok)](https://x.ai) - Fast code models
|
|
413
433
|
- [OpenAI](https://platform.openai.com) - GPT-4 and GPT-3.5
|
|
414
434
|
- [Anthropic](https://console.anthropic.com) - Claude 3.5 Sonnet
|
|
415
|
-
- [OpenRouter](https://openrouter.ai) - Multi-model access
|
|
435
|
+
- [OpenRouter](https://openrouter.ai) - Multi-model access to 100+ models
|
|
416
436
|
|
|
417
437
|
2. Generate an API key from your provider's dashboard
|
|
418
438
|
|
|
@@ -472,6 +492,166 @@ export MORPH_API_KEY="your_morph_key_here"
|
|
|
472
492
|
|
|
473
493
|
---
|
|
474
494
|
|
|
495
|
+
### Multi-Provider Usage Examples
|
|
496
|
+
|
|
497
|
+
AX CLI works with ANY OpenAI-compatible API. Here are examples for popular providers:
|
|
498
|
+
|
|
499
|
+
**Z.AI (GLM Models - Recommended)**
|
|
500
|
+
```bash
|
|
501
|
+
# Cloud GLM 4.6 via Z.AI
|
|
502
|
+
ax-cli --api-key YOUR_ZAI_KEY --base-url https://api.z.ai/v1 --model glm-4.6
|
|
503
|
+
|
|
504
|
+
# Local Z.AI deployment
|
|
505
|
+
ax-cli --base-url http://localhost:8000/v1 --model glm-4.6
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
**OpenAI (GPT-4)**
|
|
509
|
+
```bash
|
|
510
|
+
ax-cli --api-key YOUR_OPENAI_KEY --base-url https://api.openai.com/v1 --model gpt-4
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**Anthropic (Claude)**
|
|
514
|
+
```bash
|
|
515
|
+
ax-cli --api-key YOUR_ANTHROPIC_KEY --base-url https://api.anthropic.com/v1 --model claude-3.5-sonnet
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Google Gemini (via OpenRouter)**
|
|
519
|
+
```bash
|
|
520
|
+
ax-cli --api-key YOUR_OPENROUTER_KEY --base-url https://openrouter.ai/api/v1 --model google/gemini-pro-1.5
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
**Ollama (Local - No API Key Needed)**
|
|
524
|
+
```bash
|
|
525
|
+
# Any Ollama model
|
|
526
|
+
ax-cli --base-url http://localhost:11434/v1 --model llama3.1
|
|
527
|
+
ax-cli --base-url http://localhost:11434/v1 --model qwen2.5
|
|
528
|
+
ax-cli --base-url http://localhost:11434/v1 --model deepseek-coder
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
**X.AI (Grok)**
|
|
532
|
+
```bash
|
|
533
|
+
ax-cli --api-key YOUR_XAI_KEY --base-url https://api.x.ai/v1 --model grok-code-fast-1
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**OpenRouter (100+ Models)**
|
|
537
|
+
```bash
|
|
538
|
+
ax-cli --api-key YOUR_OPENROUTER_KEY --base-url https://openrouter.ai/api/v1 --model anthropic/claude-3.5-sonnet
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## 🎯 Project Initialization
|
|
544
|
+
|
|
545
|
+
AX CLI can automatically analyze your project and generate optimized custom instructions for better performance and accuracy.
|
|
546
|
+
|
|
547
|
+
### Quick Setup
|
|
548
|
+
|
|
549
|
+
```bash
|
|
550
|
+
# Navigate to your project
|
|
551
|
+
cd /path/to/your/project
|
|
552
|
+
|
|
553
|
+
# Initialize AX CLI (one-time setup)
|
|
554
|
+
ax-cli init
|
|
555
|
+
|
|
556
|
+
# Start using AX CLI with project-aware intelligence
|
|
557
|
+
ax-cli
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
### What Gets Detected Automatically
|
|
561
|
+
|
|
562
|
+
The `init` command intelligently analyzes your project:
|
|
563
|
+
|
|
564
|
+
- ✅ **Project Type**: CLI, library, web-app, API, etc.
|
|
565
|
+
- ✅ **Tech Stack**: React, Vue, Express, NestJS, Vitest, Jest, etc.
|
|
566
|
+
- ✅ **Language & Conventions**: TypeScript with ESM/CJS, import extensions
|
|
567
|
+
- ✅ **Directory Structure**: Source, tests, tools, config directories
|
|
568
|
+
- ✅ **Build Scripts**: Test, build, lint, dev commands
|
|
569
|
+
- ✅ **Package Manager**: npm, yarn, pnpm, or bun
|
|
570
|
+
- ✅ **Code Conventions**: Module system, validation library, test framework
|
|
571
|
+
|
|
572
|
+
### Generated Files
|
|
573
|
+
|
|
574
|
+
**`.ax-cli/CUSTOM.md`** - Project-specific custom instructions:
|
|
575
|
+
```markdown
|
|
576
|
+
# Custom Instructions for AX CLI
|
|
577
|
+
|
|
578
|
+
**Project**: your-project v1.0.0
|
|
579
|
+
**Type**: cli
|
|
580
|
+
**Language**: TypeScript
|
|
581
|
+
**Stack**: Commander, Vitest, Zod, ESM
|
|
582
|
+
|
|
583
|
+
## Code Conventions
|
|
584
|
+
|
|
585
|
+
### TypeScript
|
|
586
|
+
- Use explicit type annotations
|
|
587
|
+
- **CRITICAL**: Always use `.js` extension in imports (ESM requirement)
|
|
588
|
+
|
|
589
|
+
### Validation
|
|
590
|
+
- Use **zod** for runtime validation
|
|
591
|
+
- Validate all external inputs
|
|
592
|
+
|
|
593
|
+
## File Structure
|
|
594
|
+
- Commands: `src/commands/`
|
|
595
|
+
- Utilities: `src/utils/`
|
|
596
|
+
- Types: `src/types/`
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
**`.ax-cli/index.json`** - Fast project reference for quick lookups
|
|
600
|
+
|
|
601
|
+
### Command Options
|
|
602
|
+
|
|
603
|
+
```bash
|
|
604
|
+
# Basic initialization
|
|
605
|
+
ax-cli init
|
|
606
|
+
|
|
607
|
+
# Force regeneration (after major project changes)
|
|
608
|
+
ax-cli init --force
|
|
609
|
+
|
|
610
|
+
# Verbose output showing detection details
|
|
611
|
+
ax-cli init --verbose
|
|
612
|
+
|
|
613
|
+
# Initialize specific directory
|
|
614
|
+
ax-cli init --directory /path/to/project
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
### Benefits
|
|
618
|
+
|
|
619
|
+
**🚀 Performance Improvements:**
|
|
620
|
+
- **25-30% fewer tokens** - No repeated project exploration
|
|
621
|
+
- **23% faster responses** - Direct file access using generated index
|
|
622
|
+
- **Better accuracy** - Project conventions understood from the start
|
|
623
|
+
|
|
624
|
+
**🧠 Smart Context:**
|
|
625
|
+
- Knows your project structure instantly
|
|
626
|
+
- Understands your tech stack and conventions
|
|
627
|
+
- References correct file paths automatically
|
|
628
|
+
- Follows project-specific patterns
|
|
629
|
+
|
|
630
|
+
### When to Run Init
|
|
631
|
+
|
|
632
|
+
- ✅ After cloning a new repository
|
|
633
|
+
- ✅ When starting a new project
|
|
634
|
+
- ✅ After changing major dependencies
|
|
635
|
+
- ✅ When migrating frameworks (e.g., Jest → Vitest)
|
|
636
|
+
- ✅ After restructuring directories
|
|
637
|
+
|
|
638
|
+
### Team Usage
|
|
639
|
+
|
|
640
|
+
**Option 1: Share Configuration**
|
|
641
|
+
```bash
|
|
642
|
+
# Commit configuration to repository
|
|
643
|
+
git add .ax-cli/
|
|
644
|
+
git commit -m "Add AX CLI project configuration"
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
**Option 2: Personal Configuration**
|
|
648
|
+
```bash
|
|
649
|
+
# Add to .gitignore for personal customization
|
|
650
|
+
echo ".ax-cli/" >> .gitignore
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
475
655
|
## 📖 Usage
|
|
476
656
|
|
|
477
657
|
### Interactive Mode
|
|
@@ -479,17 +659,21 @@ export MORPH_API_KEY="your_morph_key_here"
|
|
|
479
659
|
Start a conversational AI session:
|
|
480
660
|
|
|
481
661
|
```bash
|
|
482
|
-
# Basic usage
|
|
662
|
+
# Basic usage (uses glm-4.6 by default)
|
|
483
663
|
ax-cli
|
|
484
664
|
|
|
485
665
|
# Specify working directory
|
|
486
666
|
ax-cli --directory /path/to/project
|
|
487
667
|
|
|
488
|
-
# Use specific model
|
|
668
|
+
# Use specific built-in model
|
|
489
669
|
ax-cli --model grok-code-fast-1
|
|
670
|
+
ax-cli --model glm-4-air
|
|
671
|
+
|
|
672
|
+
# Connect to Z.AI
|
|
673
|
+
ax-cli --base-url https://api.z.ai/v1 --model glm-4.6
|
|
490
674
|
|
|
491
|
-
# Offline mode with
|
|
492
|
-
ax-cli --model
|
|
675
|
+
# Offline mode with Ollama
|
|
676
|
+
ax-cli --model llama3.1 --base-url http://localhost:11434/v1
|
|
493
677
|
```
|
|
494
678
|
|
|
495
679
|
**Example Session:**
|
|
@@ -874,6 +1058,170 @@ MCP servers are stored in `.ax/settings.json`:
|
|
|
874
1058
|
|
|
875
1059
|
---
|
|
876
1060
|
|
|
1061
|
+
## 🎯 Strategic Architecture: AutomatosX vs Morph
|
|
1062
|
+
|
|
1063
|
+
AX CLI is built on **two complementary technologies** that solve different problems at different architectural layers:
|
|
1064
|
+
|
|
1065
|
+
### 🧠 AutomatosX: Orchestration Layer (Core Strategy)
|
|
1066
|
+
|
|
1067
|
+
**AutomatosX is the strategic foundation** of AX CLI, providing enterprise-grade multi-agent orchestration:
|
|
1068
|
+
|
|
1069
|
+
```
|
|
1070
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
1071
|
+
│ AutomatosX Orchestration │
|
|
1072
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
1073
|
+
│ │ Claude Code │ │ Gemini CLI │ │ OpenAI │ │
|
|
1074
|
+
│ │ (Priority 3)│ │ (Priority 2)│ │ (Priority 1)│ │
|
|
1075
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
1076
|
+
│ │
|
|
1077
|
+
│ • Multi-Agent Coordination • Health Checks │
|
|
1078
|
+
│ • Intelligent Routing • Circuit Breakers │
|
|
1079
|
+
│ • Session Management • Provider Fallback │
|
|
1080
|
+
│ • Memory Persistence • Workload Distribution │
|
|
1081
|
+
└─────────────────────────────────────────────────────────────┘
|
|
1082
|
+
↓
|
|
1083
|
+
AX CLI Execution
|
|
1084
|
+
↓
|
|
1085
|
+
┌────────────────┼────────────────┐
|
|
1086
|
+
↓ ↓ ↓
|
|
1087
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
1088
|
+
│ Bash │ │ Search │ │ Edit │
|
|
1089
|
+
│ Tool │ │ Tool │ │ Tool │
|
|
1090
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
**Key Capabilities**:
|
|
1094
|
+
- **Provider Coordination**: Routes tasks to Claude Code, Gemini CLI, OpenAI, or Grok based on availability and workload
|
|
1095
|
+
- **Intelligent Fallback**: Automatically switches to backup providers when primary fails
|
|
1096
|
+
- **Session/Memory**: Maintains context across multi-agent conversations
|
|
1097
|
+
- **Health & Reliability**: Circuit breakers, health checks, retry logic
|
|
1098
|
+
|
|
1099
|
+
#### 🏛️ Architecture Purity: Why AX CLI Handles LLM Integration
|
|
1100
|
+
|
|
1101
|
+
**Strategic Decision**: AutomatosX remains a **pure orchestration framework** while AX CLI handles all LLM-specific integration:
|
|
1102
|
+
|
|
1103
|
+
```
|
|
1104
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
1105
|
+
│ AutomatosX (Pure Orchestration) │
|
|
1106
|
+
│ • Provider-agnostic routing │
|
|
1107
|
+
│ • Session/memory management │
|
|
1108
|
+
│ • Health checks & circuit breakers │
|
|
1109
|
+
│ • NO LLM-specific code │
|
|
1110
|
+
│ • NO model integration (0 lines) │
|
|
1111
|
+
│ • NO tree-sitter parsing │
|
|
1112
|
+
└─────────────────────────────────────────────────────────────┘
|
|
1113
|
+
↓ delegates to
|
|
1114
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
1115
|
+
│ AX CLI (LLM Integration Layer) │
|
|
1116
|
+
│ • GLM-4.6, Grok, OpenAI, Anthropic, Google API clients │
|
|
1117
|
+
│ • ~30,000 lines of LLM provider integration code │
|
|
1118
|
+
│ • Tree-sitter parsing for code intelligence │
|
|
1119
|
+
│ • Model-specific optimizations (reasoning mode, streaming) │
|
|
1120
|
+
│ • Tool definitions (bash, editor, search) │
|
|
1121
|
+
└─────────────────────────────────────────────────────────────┘
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
**Why This Separation Matters**:
|
|
1125
|
+
|
|
1126
|
+
1. **Maintainability** 🛠️
|
|
1127
|
+
- AutomatosX stays clean: orchestration logic only (~3K LOC)
|
|
1128
|
+
- AX CLI absorbs complexity: LLM APIs, model quirks, provider changes
|
|
1129
|
+
- Bug fixes isolated to appropriate layer
|
|
1130
|
+
|
|
1131
|
+
2. **Reusability** ♻️
|
|
1132
|
+
- AutomatosX can orchestrate ANY tool/agent, not just LLM-based ones
|
|
1133
|
+
- Same orchestration works for Python agents, Rust tools, shell scripts
|
|
1134
|
+
- Other projects can use AutomatosX without inheriting LLM baggage
|
|
1135
|
+
|
|
1136
|
+
3. **Testing & Reliability** ✅
|
|
1137
|
+
- AutomatosX: Pure logic testing (fast, deterministic)
|
|
1138
|
+
- AX CLI: Integration testing against real LLM APIs
|
|
1139
|
+
- Clear boundaries make issues easy to diagnose
|
|
1140
|
+
|
|
1141
|
+
4. **Evolution** 🚀
|
|
1142
|
+
- LLM landscape changes rapidly (new models monthly)
|
|
1143
|
+
- AutomatosX orchestration patterns remain stable
|
|
1144
|
+
- AX CLI can add GPT-5, Claude 4, GLM-5 without touching AutomatosX core
|
|
1145
|
+
|
|
1146
|
+
**What We Avoided**:
|
|
1147
|
+
- ❌ Mixing 30K lines of LLM code into orchestration framework
|
|
1148
|
+
- ❌ Coupling AutomatosX to specific model APIs
|
|
1149
|
+
- ❌ Making every AutomatosX user depend on OpenAI/Anthropic SDKs
|
|
1150
|
+
- ❌ Tree-sitter parser dependencies in core framework
|
|
1151
|
+
|
|
1152
|
+
**The Result**: AutomatosX is a **pure, reusable orchestration platform**. AX CLI is a **specialized LLM CLI** built on top of it. Clean separation of concerns wins.
|
|
1153
|
+
|
|
1154
|
+
### ⚡ Morph Fast Apply: Execution Layer (Optional Enhancement)
|
|
1155
|
+
|
|
1156
|
+
**Morph is an optional performance enhancement** for file editing, not a core architectural component:
|
|
1157
|
+
|
|
1158
|
+
```
|
|
1159
|
+
AutomatosX decides WHAT to edit
|
|
1160
|
+
↓
|
|
1161
|
+
┌───────────────────────────────┐
|
|
1162
|
+
│ How should we edit files? │
|
|
1163
|
+
├───────────────┬───────────────┤
|
|
1164
|
+
│ Standard │ Morph Fast │
|
|
1165
|
+
│ Editor (✓) │ Apply (opt) │
|
|
1166
|
+
│ │ │
|
|
1167
|
+
│ • Free │ • 4,500+ │
|
|
1168
|
+
│ • Built-in │ tokens/sec │
|
|
1169
|
+
│ • Simple │ • AI-powered │
|
|
1170
|
+
│ string │ • Complex │
|
|
1171
|
+
│ replace │ refactors │
|
|
1172
|
+
│ │ • Requires │
|
|
1173
|
+
│ │ paid key │
|
|
1174
|
+
└───────────────┴───────────────┘
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
**Why Keep Morph?**
|
|
1178
|
+
- ✅ Some users value speed for complex refactoring
|
|
1179
|
+
- ✅ Already optional - zero impact on non-users
|
|
1180
|
+
- ✅ Low maintenance burden (392 lines, stable)
|
|
1181
|
+
- ✅ Different problem space than AutomatosX
|
|
1182
|
+
|
|
1183
|
+
**Why It's Not Core Strategy?**
|
|
1184
|
+
- ❌ Solves only ONE execution step (file editing)
|
|
1185
|
+
- ❌ No orchestration capabilities
|
|
1186
|
+
- ❌ Requires paid external API
|
|
1187
|
+
- ❌ Can be replaced by standard editor
|
|
1188
|
+
|
|
1189
|
+
### 📊 Comparison Table
|
|
1190
|
+
|
|
1191
|
+
| Capability | AutomatosX | AX CLI | Morph | Standard Editor |
|
|
1192
|
+
|------------|------------|--------|-------|-----------------|
|
|
1193
|
+
| **Strategic Value** | ⭐⭐⭐⭐⭐ Highest | ⭐⭐⭐⭐⭐ Highest | ⭐⭐ Low | ⭐⭐⭐ Medium |
|
|
1194
|
+
| **Architecture Layer** | Orchestration | Integration | Execution | Execution |
|
|
1195
|
+
| **Lines of Code** | ~3K (pure) | ~30K (LLM) | 392 | ~500 |
|
|
1196
|
+
| Multi-agent orchestration | ✅ | ❌ | ❌ | ❌ |
|
|
1197
|
+
| Provider routing/fallback | ✅ | ❌ | ❌ | ❌ |
|
|
1198
|
+
| Session management | ✅ | ❌ | ❌ | ❌ |
|
|
1199
|
+
| Health checks & reliability | ✅ | ❌ | ❌ | ❌ |
|
|
1200
|
+
| LLM API integration | ❌ | ✅ (all) | ❌ | ❌ |
|
|
1201
|
+
| Model-specific features | ❌ | ✅ | ❌ | ❌ |
|
|
1202
|
+
| Tree-sitter parsing | ❌ | ✅ | ❌ | ❌ |
|
|
1203
|
+
| File editing | ❌ | ❌ | ✅ (fast) | ✅ (basic) |
|
|
1204
|
+
| Complex code refactoring | ❌ | ❌ | ✅ | ❌ |
|
|
1205
|
+
| Reusable framework | ✅ | ❌ | ❌ | ✅ |
|
|
1206
|
+
| Cost | Free | Free | Paid | Free |
|
|
1207
|
+
| Required | ✅ Core | ✅ Core | ❌ Optional | ✅ Core |
|
|
1208
|
+
|
|
1209
|
+
### 🎯 Bottom Line
|
|
1210
|
+
|
|
1211
|
+
- **AutomatosX = Brain**: Pure orchestration framework - coordinates multiple agents, handles failures, manages state (reusable across any domain)
|
|
1212
|
+
- **AX CLI = Nervous System**: LLM integration layer - connects to GLM/Grok/Claude/GPT, handles model specifics, provides tools (~30K LOC)
|
|
1213
|
+
- **Morph = Fast Hands** (optional): Executes file edits quickly when you need performance
|
|
1214
|
+
- **Standard Editor = Reliable Hands**: Executes file edits reliably for everyone
|
|
1215
|
+
|
|
1216
|
+
**Architectural Philosophy**:
|
|
1217
|
+
- **AutomatosX stays pure** (no LLM code) → reusable orchestration framework
|
|
1218
|
+
- **AX CLI absorbs complexity** (30K lines of LLM integration) → keeps AutomatosX clean
|
|
1219
|
+
- **We keep Morph** because some users find the speed valuable for refactoring
|
|
1220
|
+
|
|
1221
|
+
This clean separation means AutomatosX can orchestrate Python agents, Rust tools, or any future AI models without being coupled to today's LLM APIs.
|
|
1222
|
+
|
|
1223
|
+
---
|
|
1224
|
+
|
|
877
1225
|
## ⚡ Morph Fast Apply (Optional)
|
|
878
1226
|
|
|
879
1227
|
Ultra-fast code editing at **4,500+ tokens/second with 98% accuracy**.
|
|
@@ -989,59 +1337,6 @@ ax-cli -m anthropic/claude-3.5-sonnet -u https://openrouter.ai/api/v1
|
|
|
989
1337
|
|
|
990
1338
|
---
|
|
991
1339
|
|
|
992
|
-
## 🤝 Contributing
|
|
993
|
-
|
|
994
|
-
We welcome contributions! AX CLI is enterprise-grade software, and we maintain high standards.
|
|
995
|
-
|
|
996
|
-
### Development Setup
|
|
997
|
-
|
|
998
|
-
```bash
|
|
999
|
-
# Fork and clone
|
|
1000
|
-
git clone https://github.com/YOUR_USERNAME/ax-cli
|
|
1001
|
-
cd ax-cli
|
|
1002
|
-
|
|
1003
|
-
# Install dependencies
|
|
1004
|
-
npm install
|
|
1005
|
-
|
|
1006
|
-
# Run tests
|
|
1007
|
-
npm test
|
|
1008
|
-
|
|
1009
|
-
# Build
|
|
1010
|
-
npm run build
|
|
1011
|
-
|
|
1012
|
-
# Lint
|
|
1013
|
-
npm run lint
|
|
1014
|
-
|
|
1015
|
-
# Type check
|
|
1016
|
-
npm run typecheck
|
|
1017
|
-
```
|
|
1018
|
-
|
|
1019
|
-
### Contribution Guidelines
|
|
1020
|
-
|
|
1021
|
-
1. **Tests Required**: All new features must include tests
|
|
1022
|
-
2. **Type Safety**: Full TypeScript with strict mode
|
|
1023
|
-
3. **Code Coverage**: Maintain 80%+ coverage
|
|
1024
|
-
4. **Documentation**: Update README and inline docs
|
|
1025
|
-
5. **Conventional Commits**: Use semantic commit messages
|
|
1026
|
-
|
|
1027
|
-
### Pull Request Process
|
|
1028
|
-
|
|
1029
|
-
1. Create feature branch: `git checkout -b feature/my-feature`
|
|
1030
|
-
2. Write tests for new functionality
|
|
1031
|
-
3. Ensure all tests pass: `npm test`
|
|
1032
|
-
4. Run type checking: `npm run typecheck`
|
|
1033
|
-
5. Update documentation as needed
|
|
1034
|
-
6. Submit PR with clear description
|
|
1035
|
-
|
|
1036
|
-
### Code Standards
|
|
1037
|
-
|
|
1038
|
-
- **TypeScript**: Strict mode, no `any` types
|
|
1039
|
-
- **Testing**: Vitest with high coverage
|
|
1040
|
-
- **Linting**: ESLint + Prettier
|
|
1041
|
-
- **Commits**: Conventional commits format
|
|
1042
|
-
|
|
1043
|
-
---
|
|
1044
|
-
|
|
1045
1340
|
## 📄 License
|
|
1046
1341
|
|
|
1047
1342
|
MIT License - see [LICENSE](LICENSE) file for details
|