aiexecode 1.0.94 → 1.0.98
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.
Potentially problematic release.
This version of aiexecode might be problematic. Click here for more details.
- package/README.md +198 -88
- package/index.js +43 -9
- package/package.json +4 -4
- package/payload_viewer/out/404/index.html +1 -1
- package/payload_viewer/out/404.html +1 -1
- package/payload_viewer/out/_next/static/chunks/{37d0cd2587a38f79.js → b6c0459f3789d25c.js} +1 -1
- package/payload_viewer/out/_next/static/chunks/b75131b58f8ca46a.css +3 -0
- package/payload_viewer/out/index.html +1 -1
- package/payload_viewer/out/index.txt +3 -3
- package/payload_viewer/web_server.js +361 -0
- package/src/LLMClient/client.js +392 -16
- package/src/LLMClient/converters/responses-to-claude.js +67 -18
- package/src/LLMClient/converters/responses-to-zai.js +608 -0
- package/src/LLMClient/errors.js +30 -4
- package/src/LLMClient/index.js +5 -0
- package/src/ai_based/completion_judge.js +35 -4
- package/src/ai_based/orchestrator.js +146 -35
- package/src/commands/agents.js +70 -0
- package/src/commands/apikey.js +1 -1
- package/src/commands/commands.js +51 -0
- package/src/commands/debug.js +52 -0
- package/src/commands/help.js +11 -1
- package/src/commands/model.js +42 -7
- package/src/commands/reasoning_effort.js +2 -2
- package/src/commands/skills.js +46 -0
- package/src/config/ai_models.js +106 -6
- package/src/config/constants.js +71 -0
- package/src/frontend/App.js +8 -0
- package/src/frontend/components/AutocompleteMenu.js +7 -1
- package/src/frontend/components/CurrentModelView.js +2 -2
- package/src/frontend/components/HelpView.js +106 -2
- package/src/frontend/components/Input.js +33 -11
- package/src/frontend/components/ModelListView.js +1 -1
- package/src/frontend/components/SetupWizard.js +51 -8
- package/src/frontend/hooks/useFileCompletion.js +467 -0
- package/src/frontend/utils/toolUIFormatter.js +261 -0
- package/src/system/agents_loader.js +289 -0
- package/src/system/ai_request.js +175 -12
- package/src/system/command_parser.js +33 -3
- package/src/system/conversation_state.js +265 -0
- package/src/system/custom_command_loader.js +386 -0
- package/src/system/session.js +59 -35
- package/src/system/skill_loader.js +318 -0
- package/src/system/tool_approval.js +10 -0
- package/src/tools/file_reader.js +49 -9
- package/src/tools/glob.js +0 -3
- package/src/tools/ripgrep.js +5 -7
- package/src/tools/skill_tool.js +122 -0
- package/src/tools/web_downloader.js +0 -3
- package/src/util/clone.js +174 -0
- package/src/util/config.js +38 -2
- package/src/util/config_migration.js +174 -0
- package/src/util/file_reference_parser.js +132 -0
- package/src/util/path_validator.js +178 -0
- package/src/util/prompt_loader.js +68 -1
- package/src/util/safe_fs.js +43 -3
- package/payload_viewer/out/_next/static/chunks/ecd2072ebf41611f.css +0 -3
- /package/payload_viewer/out/_next/static/{wkEKh6i9XPSyP6rjDRvHn → WjvWEjPqhHNIE_a6QIZaG}/_buildManifest.js +0 -0
- /package/payload_viewer/out/_next/static/{wkEKh6i9XPSyP6rjDRvHn → WjvWEjPqhHNIE_a6QIZaG}/_clientMiddlewareManifest.json +0 -0
- /package/payload_viewer/out/_next/static/{wkEKh6i9XPSyP6rjDRvHn → WjvWEjPqhHNIE_a6QIZaG}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
**AI-Powered Autonomous Coding
|
|
5
|
+
**AI-Powered Autonomous Coding Agent**
|
|
6
6
|
|
|
7
7
|
*by 코드깎는노인*
|
|
8
8
|
|
|
@@ -12,19 +12,26 @@
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
## What is
|
|
15
|
+
## What is AIEXEcode?
|
|
16
16
|
|
|
17
|
-
**AIEXEcode** is a CLI
|
|
17
|
+
**AIEXEcode** is a CLI-based AI coding agent that autonomously handles software development tasks. Simply describe what you want in natural language, and the AI will analyze, plan, and execute the work for you.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### Key Features
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
- **Natural Language Interface**: Just describe what you want - no complex commands needed
|
|
22
|
+
- **Autonomous Execution**: AI analyzes code, creates plans, and executes them automatically
|
|
23
|
+
- **Session Management**: Pause and resume work anytime with session IDs
|
|
24
|
+
- **Log Viewer**: Web-based UI to review AI's actions and decisions
|
|
25
|
+
- **MCP Integration**: Extend capabilities with Model Context Protocol servers
|
|
26
|
+
- **Z.AI Integration**: Powered by Z.AI's advanced GLM models
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
+
### What You Can Do
|
|
29
|
+
|
|
30
|
+
- **Bug Fixes**: "Fix the authentication error in login.js"
|
|
31
|
+
- **Add Features**: "Create a user profile editing feature"
|
|
32
|
+
- **Refactoring**: "Clean up the auth module for better readability"
|
|
33
|
+
- **Write Tests**: "Write unit tests for all API endpoints"
|
|
34
|
+
- **Documentation**: "Add JSDoc comments to main functions"
|
|
28
35
|
|
|
29
36
|
---
|
|
30
37
|
|
|
@@ -32,13 +39,14 @@ Just say things like "fix the lint errors in this file" or "add login functional
|
|
|
32
39
|
|
|
33
40
|
### System Requirements
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
| Requirement | Details |
|
|
43
|
+
|-------------|---------|
|
|
44
|
+
| **OS** | macOS, Linux (Windows not supported) |
|
|
45
|
+
| **Node.js** | 18.0.0 or higher |
|
|
46
|
+
| **npm** | 8.0.0 or higher |
|
|
47
|
+
| **ripgrep** | Required for code search |
|
|
40
48
|
|
|
41
|
-
### 1
|
|
49
|
+
### Step 1: Install ripgrep
|
|
42
50
|
|
|
43
51
|
**macOS:**
|
|
44
52
|
```bash
|
|
@@ -60,177 +68,279 @@ sudo dnf install ripgrep
|
|
|
60
68
|
sudo pacman -S ripgrep
|
|
61
69
|
```
|
|
62
70
|
|
|
63
|
-
### 2
|
|
71
|
+
### Step 2: Install AIEXEcode
|
|
64
72
|
|
|
65
73
|
```bash
|
|
66
74
|
npm install -g aiexecode
|
|
67
75
|
```
|
|
68
76
|
|
|
69
|
-
Done! The `aiexecode` command is now available everywhere.
|
|
70
|
-
|
|
71
77
|
---
|
|
72
78
|
|
|
73
79
|
## Getting Started
|
|
74
80
|
|
|
75
|
-
###
|
|
81
|
+
### First Run Setup
|
|
76
82
|
|
|
77
83
|
```bash
|
|
78
84
|
aiexecode
|
|
79
85
|
```
|
|
80
86
|
|
|
81
|
-
On first run, the setup wizard
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
On first run, the setup wizard will guide you through:
|
|
88
|
+
|
|
89
|
+
1. **Enter API Key** - Your Z.AI API key
|
|
90
|
+
2. **Select Model** - Choose from available models
|
|
84
91
|
|
|
85
|
-
**Where to get API
|
|
86
|
-
-
|
|
87
|
-
- Anthropic: https://console.anthropic.com/settings/keys
|
|
92
|
+
**Where to get API key:**
|
|
93
|
+
- **Z.AI**: https://z.ai/manage-apikey/apikey-list
|
|
88
94
|
|
|
89
|
-
###
|
|
95
|
+
### Basic Usage
|
|
90
96
|
|
|
91
97
|
**Interactive Mode (Recommended):**
|
|
92
98
|
```bash
|
|
93
99
|
aiexecode
|
|
94
100
|
```
|
|
95
101
|
|
|
96
|
-
|
|
102
|
+
Then enter your requests naturally:
|
|
97
103
|
```
|
|
98
|
-
>
|
|
99
|
-
>
|
|
104
|
+
> Fix all lint errors in src/
|
|
105
|
+
> Add input validation to the signup form
|
|
100
106
|
> /exit
|
|
101
107
|
```
|
|
102
108
|
|
|
103
|
-
**
|
|
109
|
+
**Direct Execution:**
|
|
110
|
+
```bash
|
|
111
|
+
aiexecode "create a REST API for user management"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Supported Models
|
|
117
|
+
|
|
118
|
+
### Z.AI (GLM Series)
|
|
119
|
+
|
|
120
|
+
| Model | Description | Context | Max Output |
|
|
121
|
+
|-------|-------------|---------|------------|
|
|
122
|
+
| `glm-4.7` | Latest flagship model | 200K | 128K |
|
|
123
|
+
| `glm-4.6` | High-performance model | 200K | 128K |
|
|
124
|
+
| `glm-4.5-air` | Fast, lightweight | 128K | 96K |
|
|
125
|
+
| `glm-4.5` | Standard model (default) | 128K | 96K |
|
|
126
|
+
|
|
127
|
+
- Supports **Thinking Mode**, prompt caching, and server-side web search
|
|
128
|
+
|
|
129
|
+
Use `/model list` to see all models or `/model <name>` to switch.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Commands
|
|
134
|
+
|
|
135
|
+
### CLI Options
|
|
136
|
+
|
|
104
137
|
```bash
|
|
105
|
-
aiexecode
|
|
138
|
+
aiexecode # Interactive mode
|
|
139
|
+
aiexecode "task description" # Direct execution
|
|
140
|
+
aiexecode -c <session_id> # Continue previous session
|
|
141
|
+
aiexecode -c <session_id> "new task" # Continue with new task
|
|
142
|
+
aiexecode --init # Initialize project prompts
|
|
143
|
+
aiexecode --viewer # Start log viewer (port 3300)
|
|
144
|
+
aiexecode --viewer --port 8080 # Log viewer on custom port
|
|
145
|
+
aiexecode --dangerously-skip-permissions "task" # Skip approval prompts
|
|
106
146
|
```
|
|
107
147
|
|
|
108
|
-
|
|
148
|
+
### Interactive Commands
|
|
149
|
+
|
|
150
|
+
| Command | Description |
|
|
151
|
+
|---------|-------------|
|
|
152
|
+
| `/help` | Show all available commands |
|
|
153
|
+
| `/exit` | Exit the application |
|
|
154
|
+
| `/clear` | Clear the screen |
|
|
155
|
+
| `/apikey` | Change API key |
|
|
156
|
+
| `/model` | Select AI model |
|
|
157
|
+
| `/model list` | List all available models |
|
|
158
|
+
| `/tools` | Enable/disable tools |
|
|
159
|
+
| `/mcp` | View MCP server status |
|
|
160
|
+
| `/agents` | Show AGENTS.md content |
|
|
161
|
+
| `/skills` | List project skills |
|
|
162
|
+
| `/commands` | List custom commands |
|
|
109
163
|
|
|
110
164
|
---
|
|
111
165
|
|
|
112
|
-
##
|
|
166
|
+
## Session Management
|
|
113
167
|
|
|
114
|
-
|
|
168
|
+
AIEXEcode automatically saves your work sessions, allowing you to pause and resume later.
|
|
115
169
|
|
|
116
|
-
|
|
170
|
+
### How It Works
|
|
117
171
|
|
|
118
172
|
```bash
|
|
119
|
-
#
|
|
173
|
+
# Start a new session
|
|
120
174
|
aiexecode
|
|
121
|
-
> Create large file processing feature
|
|
122
|
-
# Output:
|
|
175
|
+
> Create a large file processing feature
|
|
176
|
+
# Output: Session ID: abc1234567890def
|
|
123
177
|
|
|
124
178
|
# Continue later
|
|
125
179
|
aiexecode -c abc1234567890def
|
|
126
|
-
> Now add error handling
|
|
180
|
+
> Now add error handling
|
|
127
181
|
```
|
|
128
182
|
|
|
129
|
-
|
|
183
|
+
Sessions are stored in `.aiexe/<session_id>/` and include:
|
|
184
|
+
- Complete conversation history
|
|
185
|
+
- Tool execution logs
|
|
186
|
+
- File modification records
|
|
130
187
|
|
|
131
|
-
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Log Viewer
|
|
191
|
+
|
|
192
|
+
Review what the AI did through a web-based interface.
|
|
132
193
|
|
|
133
194
|
```bash
|
|
134
195
|
aiexecode --viewer
|
|
135
196
|
```
|
|
136
197
|
|
|
137
|
-
Open `http://localhost:3300`
|
|
198
|
+
Open `http://localhost:3300` to see:
|
|
138
199
|
- Commands executed by AI
|
|
139
200
|
- File modification history
|
|
140
201
|
- AI's thinking process
|
|
202
|
+
- API request/response logs
|
|
141
203
|
|
|
142
|
-
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## MCP Server Integration
|
|
207
|
+
|
|
208
|
+
Extend AIEXEcode's capabilities by connecting Model Context Protocol (MCP) servers.
|
|
143
209
|
|
|
144
|
-
|
|
210
|
+
### Adding MCP Servers
|
|
145
211
|
|
|
212
|
+
**stdio-based server:**
|
|
146
213
|
```bash
|
|
147
|
-
/
|
|
148
|
-
/exit # Exit
|
|
149
|
-
/clear # Clear screen
|
|
150
|
-
/apikey # Change API key
|
|
151
|
-
/model # Change model
|
|
214
|
+
aiexecode mcp add --transport stdio github -- npx -y @modelcontextprotocol/server-github
|
|
152
215
|
```
|
|
153
216
|
|
|
154
|
-
|
|
217
|
+
**HTTP-based server:**
|
|
218
|
+
```bash
|
|
219
|
+
aiexecode mcp add --transport http myserver http://localhost:3000
|
|
220
|
+
```
|
|
155
221
|
|
|
156
|
-
|
|
222
|
+
**JSON configuration:**
|
|
223
|
+
```bash
|
|
224
|
+
aiexecode mcp add-json github '{"type":"stdio","command":"npx","args":["-y","@modelcontextprotocol/server-github"]}'
|
|
225
|
+
```
|
|
157
226
|
|
|
158
|
-
|
|
159
|
-
- gpt-5
|
|
160
|
-
- gpt-5-mini (default)
|
|
161
|
-
- gpt-5-nano
|
|
162
|
-
- gpt-5-codex
|
|
227
|
+
### Managing MCP Servers
|
|
163
228
|
|
|
164
|
-
|
|
229
|
+
```bash
|
|
230
|
+
aiexecode mcp list # List all servers
|
|
231
|
+
aiexecode mcp get <name> # Get server details
|
|
232
|
+
aiexecode mcp remove <name> # Remove a server
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### In Interactive Mode
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
/mcp # Show all MCP servers and tools
|
|
239
|
+
/mcp <server-name> # Show specific server's tools
|
|
240
|
+
```
|
|
165
241
|
|
|
166
242
|
---
|
|
167
243
|
|
|
168
|
-
##
|
|
244
|
+
## Project Customization
|
|
169
245
|
|
|
170
|
-
###
|
|
246
|
+
### Custom Prompts
|
|
171
247
|
|
|
172
|
-
|
|
248
|
+
Initialize project-specific AI behavior:
|
|
173
249
|
|
|
174
250
|
```bash
|
|
175
251
|
aiexecode --init
|
|
176
252
|
```
|
|
177
253
|
|
|
178
|
-
|
|
254
|
+
This creates `.aiexe/prompts/` where you can customize how AI behaves for your project.
|
|
179
255
|
|
|
180
|
-
###
|
|
256
|
+
### Custom Commands
|
|
181
257
|
|
|
182
|
-
|
|
258
|
+
Add JavaScript files to `.aiexe/commands/` for project-specific slash commands.
|
|
183
259
|
|
|
184
|
-
|
|
185
|
-
# Connect GitHub
|
|
186
|
-
aiexecode mcp add --transport stdio github -- npx -y @modelcontextprotocol/server-github
|
|
260
|
+
### Skills
|
|
187
261
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
262
|
+
Add JavaScript files to `.aiexe/skills/` for reusable AI capabilities.
|
|
263
|
+
|
|
264
|
+
### AGENTS.md
|
|
265
|
+
|
|
266
|
+
Create an `AGENTS.md` file in your project root to provide additional context to the AI about your project's conventions and requirements.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Configuration
|
|
271
|
+
|
|
272
|
+
### Settings Location
|
|
273
|
+
|
|
274
|
+
| Path | Description |
|
|
275
|
+
|------|-------------|
|
|
276
|
+
| `~/.aiexe/settings.json` | Main configuration |
|
|
277
|
+
| `~/.aiexe/mcp_config.json` | MCP server settings |
|
|
278
|
+
| `~/.aiexe/skills/` | Personal skills |
|
|
279
|
+
| `~/.aiexe/commands/` | Personal commands |
|
|
280
|
+
| `.aiexe/` | Project-specific settings |
|
|
281
|
+
|
|
282
|
+
### Available Tools
|
|
283
|
+
|
|
284
|
+
AIEXEcode provides these built-in tools for AI:
|
|
285
|
+
|
|
286
|
+
- `edit_file_range` - Edit specific line ranges
|
|
287
|
+
- `edit_file_replace` - Replace exact strings
|
|
288
|
+
- `write_file` - Create or overwrite files
|
|
289
|
+
- `read_file` - Read entire files
|
|
290
|
+
- `read_file_range` - Read specific line ranges
|
|
291
|
+
- `bash` - Execute shell commands
|
|
292
|
+
- `run_python_code` - Run Python scripts
|
|
293
|
+
- `fetch_web_page` - Fetch web content
|
|
294
|
+
- `ripgrep` - Search code with ripgrep
|
|
295
|
+
- `glob_search` - Find files by pattern
|
|
296
|
+
|
|
297
|
+
Enable/disable tools with `/tools enable|disable <tool-name>`.
|
|
191
298
|
|
|
192
299
|
---
|
|
193
300
|
|
|
194
|
-
## Requirements
|
|
301
|
+
## Requirements Summary
|
|
195
302
|
|
|
196
303
|
**Required:**
|
|
197
|
-
- macOS or Linux
|
|
198
|
-
- Node.js
|
|
199
|
-
-
|
|
200
|
-
-
|
|
304
|
+
- macOS or Linux
|
|
305
|
+
- Node.js 18+
|
|
306
|
+
- npm 8+
|
|
307
|
+
- ripgrep
|
|
308
|
+
- Z.AI API key
|
|
201
309
|
|
|
202
310
|
**Optional:**
|
|
203
|
-
- Python 3 (for Python code execution
|
|
311
|
+
- Python 3 (for Python code execution)
|
|
204
312
|
|
|
205
313
|
---
|
|
206
314
|
|
|
207
315
|
## Contact
|
|
208
316
|
|
|
209
|
-
- Website
|
|
210
|
-
-
|
|
317
|
+
- **Website**: https://aiexecode.com
|
|
318
|
+
- **Issues**: https://github.com/kstost/aiexecode/issues
|
|
211
319
|
|
|
212
320
|
---
|
|
213
321
|
|
|
214
322
|
## Disclaimer
|
|
215
323
|
|
|
216
|
-
**THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.**
|
|
324
|
+
**THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.**
|
|
325
|
+
|
|
326
|
+
**IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS, OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**
|
|
217
327
|
|
|
218
|
-
|
|
328
|
+
This includes, without limitation:
|
|
329
|
+
- Data loss or corruption
|
|
330
|
+
- System damage or malfunction
|
|
331
|
+
- Security breaches or vulnerabilities
|
|
332
|
+
- Financial losses
|
|
333
|
+
- Any direct, indirect, incidental, special, exemplary, or consequential damages
|
|
219
334
|
|
|
220
|
-
|
|
221
|
-
- The developers and contributors are not liable for any damages, data loss, or issues arising from the use of this software
|
|
222
|
-
- Users assume all risks associated with using an AI-powered code modification tool
|
|
223
|
-
- Always review AI-generated code changes before committing them to production
|
|
224
|
-
- Maintain proper backups of your codebase before using this tool
|
|
225
|
-
- The software may produce unexpected results or behaviors
|
|
335
|
+
**The user assumes full responsibility for all consequences arising from the use of this software, regardless of whether such use was intended, authorized, or anticipated.**
|
|
226
336
|
|
|
227
|
-
**USE AT YOUR OWN RISK.**
|
|
337
|
+
**USE AT YOUR OWN RISK.**
|
|
228
338
|
|
|
229
339
|
---
|
|
230
340
|
|
|
231
341
|
<div align="center">
|
|
232
342
|
|
|
233
|
-
**AIEXEcode** - AI Coding
|
|
343
|
+
**AIEXEcode** - AI Coding Agent for Developers
|
|
234
344
|
|
|
235
345
|
Made by 코드깎는노인
|
|
236
346
|
|
package/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { loadPreviousSessions, reconstructUIHistory, deleteHistoryFile } from ".
|
|
|
13
13
|
import { getModelForProvider } from "./src/system/ai_request.js";
|
|
14
14
|
import { runSetupWizard, isConfigured } from "./src/util/setup_wizard.js";
|
|
15
15
|
import { safeRm, safeMkdir, safeCopyFile, safeReaddir } from './src/util/safe_fs.js';
|
|
16
|
+
import { parseFileReferences } from './src/util/file_reference_parser.js';
|
|
16
17
|
import chalk from 'chalk';
|
|
17
18
|
import { startUI } from './src/frontend/index.js';
|
|
18
19
|
import { uiEvents } from './src/system/ui_events.js';
|
|
@@ -21,7 +22,6 @@ import { Command } from 'commander';
|
|
|
21
22
|
import { registerMcpCliCommands } from './src/cli/mcp_cli.js';
|
|
22
23
|
import { createDebugLogger } from './src/util/debug_log.js';
|
|
23
24
|
import { checkForUpdates } from './src/util/version_check.js';
|
|
24
|
-
|
|
25
25
|
const debugLog = createDebugLogger('index.log', 'index');
|
|
26
26
|
|
|
27
27
|
// Read version from package.json
|
|
@@ -39,6 +39,7 @@ program
|
|
|
39
39
|
.option('--viewer', 'Start payload viewer web server')
|
|
40
40
|
.option('-p, --port <port>', 'Port for payload viewer (default: 3300)', '3300')
|
|
41
41
|
.option('--init', 'Initialize project-specific prompts in current directory')
|
|
42
|
+
.option('--dangerously-skip-permissions', 'Skip all tool approval prompts (use with caution)')
|
|
42
43
|
.argument('[mission]', 'Natural language task description (e.g., "refactor auth module")')
|
|
43
44
|
.action((mission, options) => {
|
|
44
45
|
// 메인 커맨드 action 핸들러
|
|
@@ -58,6 +59,8 @@ Examples:
|
|
|
58
59
|
Start payload viewer on default port (3300)
|
|
59
60
|
$ aiexecode --viewer --port 8000
|
|
60
61
|
Start payload viewer on custom port
|
|
62
|
+
$ aiexecode --dangerously-skip-permissions "build the project"
|
|
63
|
+
Run without tool approval prompts (use with caution)
|
|
61
64
|
|
|
62
65
|
Available Slash Commands (in interactive mode):
|
|
63
66
|
/help Show all available commands
|
|
@@ -88,7 +91,7 @@ Configuration:
|
|
|
88
91
|
MCP servers: ~/.aiexe/mcp_config.json
|
|
89
92
|
|
|
90
93
|
Supported AI Providers:
|
|
91
|
-
-
|
|
94
|
+
- Z.AI (GLM-4.5, GLM-4.6, GLM-4.7)
|
|
92
95
|
|
|
93
96
|
For more information, visit the project repository.
|
|
94
97
|
`);
|
|
@@ -105,6 +108,7 @@ const shouldContinue = options.continue;
|
|
|
105
108
|
const viewerMode = options.viewer;
|
|
106
109
|
const initMode = options.init;
|
|
107
110
|
const viewerPort = parseInt(options.port, 10);
|
|
111
|
+
const dangerouslySkipPermissions = options.dangerouslySkipPermissions || false;
|
|
108
112
|
let mission = args[0];
|
|
109
113
|
|
|
110
114
|
// Init 모드 처리
|
|
@@ -170,6 +174,7 @@ if (viewerMode) {
|
|
|
170
174
|
// 전역 설정
|
|
171
175
|
process.app_custom = {};
|
|
172
176
|
process.app_custom.__dirname = dirname(fileURLToPath(import.meta.url));
|
|
177
|
+
process.app_custom.dangerouslySkipPermissions = dangerouslySkipPermissions;
|
|
173
178
|
|
|
174
179
|
// 개발 모드 감지: 현재 디렉토리에서 node index.js로 실행했는지 확인
|
|
175
180
|
// (글로벌 설치 후 aiexecode 명령으로 실행 시에는 다른 경로에서 실행됨)
|
|
@@ -298,10 +303,8 @@ if (!process.env.API_KEY) {
|
|
|
298
303
|
console.log(chalk.yellow('Reason:'));
|
|
299
304
|
console.log(' API_KEY is not configured in the settings.');
|
|
300
305
|
console.log(chalk.yellow('\nSolution:'));
|
|
301
|
-
console.log(' 1. Obtain an API key from
|
|
302
|
-
console.log(chalk.cyan('
|
|
303
|
-
console.log(chalk.cyan(' Google: https://makersuite.google.com/app/apikey'));
|
|
304
|
-
console.log(chalk.cyan(' Anthropic: https://console.anthropic.com/settings/keys'));
|
|
306
|
+
console.log(' 1. Obtain an API key from Z.AI:');
|
|
307
|
+
console.log(chalk.cyan(' https://z.ai/manage-apikey/apikey-list'));
|
|
305
308
|
console.log(` 2. Add the API key to your settings file:`);
|
|
306
309
|
console.log(chalk.cyan(` ${SETTINGS_FILE}`));
|
|
307
310
|
console.log(' 3. Or run the setup wizard again by deleting the settings file');
|
|
@@ -451,7 +454,34 @@ async function handleSubmit(text) {
|
|
|
451
454
|
// 슬래시 커맨드 처리
|
|
452
455
|
if (isCommand(text)) {
|
|
453
456
|
try {
|
|
454
|
-
await commandRegistry.execute(text);
|
|
457
|
+
const result = await commandRegistry.execute(text);
|
|
458
|
+
|
|
459
|
+
// 커스텀 커맨드가 반환된 경우 AI에게 전달하여 실행
|
|
460
|
+
if (result && result.type === 'custom_command') {
|
|
461
|
+
debugLog(`Custom command invoked: ${result.commandName}`);
|
|
462
|
+
uiEvents.addSystemMessage(`📋 Command: ${result.commandName}`);
|
|
463
|
+
|
|
464
|
+
// 커맨드의 프롬프트를 미션으로 사용하여 세션 실행
|
|
465
|
+
await runSession({
|
|
466
|
+
mission: result.prompt,
|
|
467
|
+
maxIterations: 50,
|
|
468
|
+
mcpToolSchemas,
|
|
469
|
+
mcpToolFunctions
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
// 스킬이 반환된 경우 AI에게 전달하여 실행
|
|
473
|
+
else if (result && result.type === 'skill') {
|
|
474
|
+
debugLog(`Skill invoked: ${result.skillName}`);
|
|
475
|
+
uiEvents.addSystemMessage(`🎯 Skill: ${result.skillName}`);
|
|
476
|
+
|
|
477
|
+
// 스킬의 프롬프트를 미션으로 사용하여 세션 실행
|
|
478
|
+
await runSession({
|
|
479
|
+
mission: result.prompt,
|
|
480
|
+
maxIterations: 50,
|
|
481
|
+
mcpToolSchemas,
|
|
482
|
+
mcpToolFunctions
|
|
483
|
+
});
|
|
484
|
+
}
|
|
455
485
|
} catch (err) {
|
|
456
486
|
debugLog(`Command execution error: ${err.message}`);
|
|
457
487
|
uiEvents.addErrorMessage(`${err.message}\nType /help to see available commands`);
|
|
@@ -462,8 +492,12 @@ async function handleSubmit(text) {
|
|
|
462
492
|
// 세션 실행 (AI Agent의 미션 수행)
|
|
463
493
|
// 시작/종료 알림 및 저장은 runSession 내부에서 처리
|
|
464
494
|
try {
|
|
495
|
+
// 파일 참조 파싱 (@경로 -> 참조된 파일 목록으로 변환)
|
|
496
|
+
const parsed = await parseFileReferences(text);
|
|
497
|
+
const missionText = parsed.hasReferences ? parsed.transformedMessage : text;
|
|
498
|
+
|
|
465
499
|
await runSession({
|
|
466
|
-
mission:
|
|
500
|
+
mission: missionText, // 변환된 미션 (파일 참조 포함 시)
|
|
467
501
|
maxIterations: 50, // 최대 반복 횟수
|
|
468
502
|
mcpToolSchemas, // AI 모델에 전달할 MCP 도구 스키마들
|
|
469
503
|
mcpToolFunctions // 실제 MCP 도구 실행 함수들
|
|
@@ -566,7 +600,7 @@ const versionCheckPromise = checkForUpdates(VERSION).then(info => {
|
|
|
566
600
|
|
|
567
601
|
// UI 시작
|
|
568
602
|
const currentModel = await getModelForProvider();
|
|
569
|
-
const currentReasoningEffort = settings?.
|
|
603
|
+
const currentReasoningEffort = settings?.REASONING_EFFORT || process.env.REASONING_EFFORT;
|
|
570
604
|
uiInstance = startUI({
|
|
571
605
|
onSubmit: handleSubmit,
|
|
572
606
|
onClearScreen: handleClearScreen,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiexecode",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.98",
|
|
4
|
+
"description": "Your intelligent coding companion that thinks, plans, and builds with you",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"LICENSE"
|
|
22
22
|
],
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
25
|
-
"npm": ">=
|
|
24
|
+
"node": ">= 18.0.0",
|
|
25
|
+
"npm": ">= 8.0.0"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://aiexecode.com",
|
|
28
28
|
"repository": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--WjvWEjPqhHNIE_a6QIZaG--><html lang="ko" class="dark h-full"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/b75131b58f8ca46a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/e411019f55d87c42.js"/><script src="/_next/static/chunks/103c802c8f4a5ea1.js" async=""></script><script src="/_next/static/chunks/305b077a9873cf54.js" async=""></script><script src="/_next/static/chunks/turbopack-0ac29803ce3c3c7a.js" async=""></script><script src="/_next/static/chunks/060f9a97930f3d04.js" async=""></script><script src="/_next/static/chunks/cdd12d5c1a5a6064.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Payload Log Viewer</title><meta name="description" content="AI Agent 로그 파일 뷰어 및 편집기"/><link rel="icon" href="/favicon.ico?favicon.0b3bf435.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased h-screen overflow-hidden"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><div data-rht-toaster="" style="position:fixed;z-index:9999;top:16px;left:16px;right:16px;bottom:16px;pointer-events:none"></div><script src="/_next/static/chunks/e411019f55d87c42.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"default\"]\n4:I[5766,[\"/_next/static/chunks/cdd12d5c1a5a6064.js\"],\"Toaster\"]\n5:I[97367,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"OutletBoundary\"]\n7:I[11533,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"AsyncMetadataOutlet\"]\n9:I[97367,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"ViewportBoundary\"]\nb:I[97367,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[68027,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"default\"]\n:HL[\"/_next/static/chunks/b75131b58f8ca46a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"WjvWEjPqhHNIE_a6QIZaG\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/b75131b58f8ca46a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/cdd12d5c1a5a6064.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ko\",\"className\":\"dark h-full\",\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased h-screen overflow-hidden\",\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L4\",null,{\"position\":\"bottom-right\",\"toastOptions\":{\"duration\":4000,\"style\":{\"background\":\"hsl(var(--background))\",\"color\":\"hsl(var(--foreground))\",\"border\":\"1px solid hsl(var(--border))\"}}}]]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:0:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:0:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"f:I[27201,[\"/_next/static/chunks/060f9a97930f3d04.js\"],\"IconMark\"]\n8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Payload Log Viewer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI Agent 로그 파일 뷰어 및 편집기\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0b3bf435.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Lf\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|