@putao520/aiw 0.5.14

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 putao520
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,162 @@
1
+ # AIW - AI Workflow Orchestration Tool
2
+
3
+ <div align="center">
4
+
5
+ ![Version](https://img.shields.io/badge/version-0.5.13-blue?style=flat-square)
6
+ ![Rust](https://img.shields.io/badge/Rust-1.70+-orange?style=flat-square&logo=rust)
7
+ ![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)
8
+ ![MCP](https://img.shields.io/badge/MCP-Supported-purple?style=flat-square)
9
+
10
+ **Universal AI CLI Management Platform with Intelligent MCP Routing**
11
+
12
+ </div>
13
+
14
+ AIW is an intelligent platform for managing AI CLI tools (Claude, Codex, Gemini) with MCP routing, process tracking, and configuration synchronization.
15
+
16
+ ## 🎯 Core Features
17
+
18
+ ### 1. AI CLI Management
19
+ - **Process Tree Tracking**: Monitor AI CLI processes and their children
20
+ - **Provider Management**: Switch between AI providers (OpenAI, Anthropic, Google, etc.)
21
+ - **Capability Detection**: Auto-detect installed AI CLI tools
22
+ - **Wait Mode**: Block until AI CLI tasks complete
23
+
24
+ ```bash
25
+ # Launch AI CLI with process tracking
26
+ aiw claude "explain this code"
27
+ aiw codex "write a python script"
28
+ aiw gemini "translate to french"
29
+
30
+ # Wait for all AI CLI tasks to complete
31
+ aiw wait --timeout 300
32
+
33
+ # Manage providers
34
+ aiw provider list
35
+ aiw provider add openrouter "sk-xxx"
36
+ ```
37
+
38
+ ### 2. Intelligent MCP Routing ⭐
39
+ Route user requests to the best MCP tool with 98% token reduction.
40
+
41
+ **How it works:**
42
+ - **LLM ReAct Mode**: Uses LLM reasoning to analyze requests
43
+ - **Vector Search Mode**: Semantic similarity fallback
44
+ - **Dynamic Registration**: Registers tools on-demand (98% token savings)
45
+ - **JavaScript Orchestration**: Auto-generates workflows for complex tasks
46
+
47
+ **Usage:**
48
+ ```bash
49
+ # Start MCP server
50
+ aiw mcp
51
+
52
+ # Configure in Claude Code (~/.config/claude-code/mcp.json)
53
+ {
54
+ "mcpServers": {
55
+ "aiw": {
56
+ "command": "aiw",
57
+ "args": ["mcp"]
58
+ }
59
+ }
60
+ }
61
+
62
+ # Available MCP tools:
63
+ # - intelligent_route: Auto-route to best tool
64
+ # - get_method_schema: Get tool schemas
65
+ # - execute_tool: Execute tools with negotiation
66
+ ```
67
+
68
+ ### 3. MCP Server Management
69
+ Manage external MCP servers with hot-reload support.
70
+
71
+ ```bash
72
+ # Add MCP server
73
+ aiw mcp add filesystem npx --description "File operations" \
74
+ -- -y @modelcontextprotocol/server-filesystem /home/user
75
+
76
+ # List servers
77
+ aiw mcp list
78
+
79
+ # Enable/disable servers
80
+ aiw mcp enable brave-search
81
+ aiw mcp disable filesystem
82
+
83
+ # Hot-reload: Changes apply instantly without restart
84
+ ```
85
+
86
+ ### 4. Google Drive Sync (Optional)
87
+ Synchronize AI CLI configurations across devices using Google Drive.
88
+
89
+ ```bash
90
+ # Push configurations to Google Drive
91
+ aiw push [config_name]
92
+
93
+ # Pull configurations from Google Drive
94
+ aiw pull [config_name]
95
+
96
+ # List available backups
97
+ aiw list
98
+ ```
99
+
100
+ ## 🚀 Quick Start
101
+
102
+ ### Installation
103
+ ```bash
104
+ # Install from NPM
105
+ npm install -g @putao520/aiw
106
+
107
+ # Or use npx directly
108
+ npx @putao520/aiw --help
109
+ ```
110
+
111
+ ### Initial Setup
112
+ ```bash
113
+ # Verify installation
114
+ aiw --version
115
+
116
+ # Check available AI CLI tools
117
+ aiw status
118
+
119
+ # Configure MCP servers
120
+ aiw mcp add filesystem npx -- -y @modelcontextprotocol/server-filesystem $HOME
121
+ ```
122
+
123
+ ## 📖 Documentation
124
+
125
+ - **[MCP Usage Guide](./docs/MCP_GUIDE.md)** - Detailed MCP configuration and usage
126
+ - **[GitHub Repository](https://github.com/putao520/agentic-warden)** - Full source code and issues
127
+
128
+ ## 🛠️ Configuration
129
+
130
+ ### Environment Variables
131
+ ```bash
132
+ # AI CLI Configuration
133
+ export CLI_TYPE=claude # claude, codex, or gemini
134
+ export CLI_PROVIDER=llmlite # Any provider from provider.json
135
+
136
+ # MCP Server Configuration
137
+ export MCP_CONFIG_PATH=~/.aiw/.mcp.json
138
+
139
+ # Google Drive OAuth (optional)
140
+ export GOOGLE_CLIENT_ID=xxx
141
+ export GOOGLE_CLIENT_SECRET=xxx
142
+ ```
143
+
144
+ ### Configuration Files
145
+ - **MCP Servers**: `~/.aiw/.mcp.json`
146
+ - **Providers**: `~/.aiw/providers.json`
147
+ - **Google Drive Auth**: `~/.aiw/auth.json`
148
+
149
+ ## 🙏 Acknowledgments
150
+
151
+ - **Claude Code**: Anthropic's official CLI for Claude
152
+ - **Anthropic Code Execution**: Inspired by [Code Execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp)
153
+
154
+ ## 📜 License
155
+
156
+ MIT License - see [LICENSE](LICENSE) file for details.
157
+
158
+ ---
159
+
160
+ **AIW** - Universal AI CLI Management Platform with MCP Routing v0.5.13
161
+
162
+ For full documentation and source code, visit: [https://github.com/putao520/agentic-warden](https://github.com/putao520/agentic-warden)
Binary file
Binary file
package/index.js ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ // 根据架构选择正确的二进制
8
+ const arch = os.arch();
9
+ const platform = os.platform();
10
+
11
+ let binaryPath;
12
+
13
+ if (platform === 'linux') {
14
+ switch (arch) {
15
+ case 'x64':
16
+ binaryPath = path.join(__dirname, 'bin', 'aiw-linux-x64');
17
+ break;
18
+ default:
19
+ console.error(`❌ Unsupported architecture: ${arch}`);
20
+ console.error('Supported: x64');
21
+ process.exit(1);
22
+ }
23
+ } else if (platform === 'win32') {
24
+ switch (arch) {
25
+ case 'x64':
26
+ binaryPath = path.join(__dirname, 'bin', 'aiw-windows-x64.exe');
27
+ break;
28
+ default:
29
+ console.error(`❌ Unsupported architecture: ${arch}`);
30
+ console.error('Supported: x64');
31
+ process.exit(1);
32
+ }
33
+ } else {
34
+ console.error(`❌ Unsupported platform: ${platform}`);
35
+ console.error('Supported: linux, win32');
36
+ console.error('\nAlternative options:');
37
+ console.error('1. Using Cargo: cargo install --git https://github.com/putao520/agentic-warden');
38
+ console.error('2. Download pre-built: https://github.com/putao520/agentic-warden/releases');
39
+ process.exit(1);
40
+ }
41
+
42
+ // Execute binary and pass all arguments
43
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
44
+ stdio: 'inherit',
45
+ });
46
+
47
+ process.exit(result.status || 0);
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@putao520/aiw",
3
+ "version": "0.5.14",
4
+ "description": "Universal AI CLI management platform with intelligent MCP routing, process tracking, and configuration synchronization",
5
+ "keywords": [
6
+ "ai",
7
+ "cli",
8
+ "anthropic",
9
+ "openai",
10
+ "mcp",
11
+ "model-context-protocol",
12
+ "claude-code",
13
+ "tui",
14
+ "rust",
15
+ "static-binary",
16
+ "workflow"
17
+ ],
18
+ "homepage": "https://github.com/putao520/agentic-warden",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/putao520/agentic-warden.git"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Putao520",
25
+ "bin": {
26
+ "aiw": "./bin/aiw-linux-x64"
27
+ },
28
+ "files": [
29
+ "bin/aiw-linux-x64",
30
+ "bin/aiw-windows-x64.exe",
31
+ "index.js",
32
+ "README.md"
33
+ ],
34
+ "engines": {
35
+ "node": ">=14.0.0"
36
+ },
37
+ "os": [
38
+ "linux",
39
+ "win32"
40
+ ],
41
+ "cpu": [
42
+ "x64",
43
+ "arm64",
44
+ "arm"
45
+ ],
46
+ "bugs": {
47
+ "url": "https://github.com/putao520/agentic-warden/issues"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public",
51
+ "registry": "https://registry.npmjs.org/",
52
+ "provenance": true
53
+ }
54
+ }