@wonderwhy-er/desktop-commander 0.2.8 → 0.2.9
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 +238 -38
- package/dist/server.js +3 -0
- package/dist/setup-claude-server.js +11 -1
- package/dist/terminal-manager.js +9 -3
- package/dist/tools/config.js +1 -0
- package/dist/tools/improved-process-tools.js +12 -1
- package/dist/tools/schemas.d.ts +1 -1
- package/dist/uninstall-claude-server.js +753 -0
- package/dist/utils/dockerPrompt.d.ts +17 -0
- package/dist/utils/dockerPrompt.js +53 -0
- package/dist/utils/system-info.d.ts +18 -0
- package/dist/utils/system-info.js +232 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -4
- package/dist/index-dxt.d.ts +0 -2
- package/dist/index-dxt.js +0 -39
package/README.md
CHANGED
|
@@ -20,12 +20,11 @@ Work with code and text, run processes, and automate tasks, going far beyond oth
|
|
|
20
20
|
|
|
21
21
|
## Table of Contents
|
|
22
22
|
- [Features](#features)
|
|
23
|
-
- [
|
|
23
|
+
- [How to install](#how-to-install)
|
|
24
24
|
- [Usage](#usage)
|
|
25
|
-
- [Docker Support](#docker-support)
|
|
26
25
|
- [Handling Long-Running Commands](#handling-long-running-commands)
|
|
27
|
-
- [Work in Progress and TODOs](#
|
|
28
|
-
- [Sponsors and Supporters](#
|
|
26
|
+
- [Work in Progress and TODOs](#roadmap)
|
|
27
|
+
- [Sponsors and Supporters](#support-desktop-commander)
|
|
29
28
|
- [Website](#website)
|
|
30
29
|
- [Media](#media)
|
|
31
30
|
- [Testimonials](#testimonials)
|
|
@@ -69,12 +68,13 @@ Execute long-running terminal commands on your computer and manage processes thr
|
|
|
69
68
|
- Log rotation with 10MB size limit
|
|
70
69
|
- Detailed timestamps and arguments
|
|
71
70
|
|
|
72
|
-
##
|
|
73
|
-
First, ensure you've downloaded and installed the [Claude Desktop app](https://claude.ai/download) and you have [npm installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
|
|
71
|
+
## How to install
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
Desktop Commander offers multiple installation methods to fit different user needs and technical requirements.
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
> **📋 Update & Uninstall Information:** Before choosing an installation option, note that **only Options 1, 2, 3, and 6 have automatic updates**. Options 4 and 5 require manual updates. See the sections below for update and uninstall instructions for each option.
|
|
76
|
+
|
|
77
|
+
### Option 1: Install through npx ⭐ **Auto-Updates** **Requires Node.js**
|
|
78
78
|
Just run this in terminal:
|
|
79
79
|
```
|
|
80
80
|
npx @wonderwhy-er/desktop-commander@latest setup
|
|
@@ -88,9 +88,9 @@ Restart Claude if running.
|
|
|
88
88
|
|
|
89
89
|
**✅ Auto-Updates:** Yes - automatically updates when you restart Claude
|
|
90
90
|
**🔄 Manual Update:** Run the setup command again
|
|
91
|
-
**🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest
|
|
91
|
+
**🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`
|
|
92
92
|
|
|
93
|
-
### Option 2: Using bash script installer (macOS) ⭐ **Auto-Updates**
|
|
93
|
+
### Option 2: Using bash script installer (macOS) ⭐ **Auto-Updates** **Installs Node.js if needed**
|
|
94
94
|
For macOS users, you can use our automated bash installer which will check your Node.js version, install it if needed, and automatically configure Desktop Commander:
|
|
95
95
|
```
|
|
96
96
|
curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash
|
|
@@ -99,21 +99,24 @@ This script handles all dependencies and configuration automatically for a seaml
|
|
|
99
99
|
|
|
100
100
|
**✅ Auto-Updates:** Yes - requires manual updates
|
|
101
101
|
**🔄 Manual Update:** Re-run the bash installer command above
|
|
102
|
-
**🗑️ Uninstall:**
|
|
102
|
+
**🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`
|
|
103
103
|
|
|
104
|
-
### Option 3: Installing via Smithery ⭐ **Auto-Updates**
|
|
104
|
+
### Option 3: Installing via Smithery ⭐ **Auto-Updates** **Requires Node.js**
|
|
105
105
|
|
|
106
|
-
To install Desktop Commander for Claude Desktop
|
|
106
|
+
To install Desktop Commander for Claude Desktop via [Smithery](https://smithery.ai/server/@wonderwhy-er/desktop-commander):
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
1. **Visit the Smithery page:** https://smithery.ai/server/@wonderwhy-er/desktop-commander
|
|
109
|
+
2. **Login to Smithery** if you haven't already
|
|
110
|
+
3. **Select your client** (Claude Desktop) on the right side
|
|
111
|
+
4. **Install with the provided key** that appears after selecting your client
|
|
112
|
+
5. **Restart Claude Desktop**
|
|
113
|
+
|
|
114
|
+
The old command-line installation method is no longer supported. Please use the web interface above for the most reliable installation experience.
|
|
111
115
|
|
|
112
116
|
**✅ Auto-Updates:** Yes - automatically updates when you restart Claude
|
|
113
|
-
**🔄 Manual Update:**
|
|
114
|
-
**🗑️ Uninstall:** `npx -y @smithery/cli uninstall @wonderwhy-er/desktop-commander --client claude`
|
|
117
|
+
**🔄 Manual Update:** Visit the Smithery page and reinstall
|
|
115
118
|
|
|
116
|
-
### Option 4: Add to claude_desktop_config manually
|
|
119
|
+
### Option 4: Add to claude_desktop_config manually ⭐ **Auto-Updates** **Requires Node.js**
|
|
117
120
|
Add this entry to your claude_desktop_config.json:
|
|
118
121
|
|
|
119
122
|
- On Mac: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
|
|
@@ -135,11 +138,11 @@ Add this entry to your claude_desktop_config.json:
|
|
|
135
138
|
```
|
|
136
139
|
Restart Claude if running.
|
|
137
140
|
|
|
138
|
-
|
|
139
|
-
**🔄 Manual Update:**
|
|
140
|
-
**🗑️ Uninstall:**
|
|
141
|
+
**✅ Auto-Updates:** Yes - automatically updates when you restart Claude
|
|
142
|
+
**🔄 Manual Update:** Run the setup command again
|
|
143
|
+
**🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the "desktop-commander" entry from your claude_desktop_config.json file
|
|
141
144
|
|
|
142
|
-
### Option 5: Checkout locally ❌ **Manual Updates**
|
|
145
|
+
### ### Option 5: Checkout locally ❌ **Manual Updates** **Requires Node.js** ❌ **Manual Updates** **Requires Node.js**
|
|
143
146
|
1. Clone and build:
|
|
144
147
|
```bash
|
|
145
148
|
git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git
|
|
@@ -156,26 +159,223 @@ The setup command will:
|
|
|
156
159
|
|
|
157
160
|
**❌ Auto-Updates:** No - requires manual git updates
|
|
158
161
|
**🔄 Manual Update:** `cd DesktopCommanderMCP && git pull && npm run setup`
|
|
159
|
-
**🗑️ Uninstall:**
|
|
162
|
+
**🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the cloned directory and remove MCP server entry from Claude config
|
|
163
|
+
|
|
164
|
+
### Option 6: Docker Installation 🐳 ⭐ **Auto-Updates** **No Node.js Required**
|
|
165
|
+
|
|
166
|
+
Perfect for users who want complete or partial isolation or don't have Node.js installed. Desktop Commander runs in a sandboxed Docker container with a persistent work environment.
|
|
167
|
+
|
|
168
|
+
#### Prerequisites
|
|
169
|
+
- [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed **and running**
|
|
170
|
+
- Claude Desktop app installed
|
|
171
|
+
|
|
172
|
+
**Important:** Make sure Docker Desktop is fully started before running the installer.
|
|
173
|
+
|
|
174
|
+
#### Automated Installation (Recommended)
|
|
175
|
+
|
|
176
|
+
**macOS/Linux:**
|
|
177
|
+
```bash
|
|
178
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Windows PowerShell:**
|
|
182
|
+
```powershell
|
|
183
|
+
# Download and run the installer (one-liner)
|
|
184
|
+
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'))
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The automated installer will:
|
|
188
|
+
- Check Docker installation
|
|
189
|
+
- Pull the latest Docker image
|
|
190
|
+
- Prompt you to select folders for mounting
|
|
191
|
+
- Configure Claude Desktop automatically
|
|
192
|
+
- Restart Claude if possible
|
|
193
|
+
|
|
194
|
+
#### How Docker Persistence Works
|
|
195
|
+
Desktop Commander creates a persistent work environment that remembers everything between sessions:
|
|
196
|
+
- **Your development tools**: Any software you install (Node.js, Python, databases, etc.) stays installed
|
|
197
|
+
- **Your configurations**: Git settings, SSH keys, shell preferences, and other personal configs are preserved
|
|
198
|
+
- **Your work files**: Projects and files in the workspace area persist across restarts
|
|
199
|
+
- **Package caches**: Downloaded packages and dependencies are cached for faster future installs
|
|
200
|
+
|
|
201
|
+
Think of it like having your own dedicated development computer that never loses your setup, but runs safely isolated from your main system.
|
|
202
|
+
|
|
203
|
+
#### Manual Docker Configuration
|
|
204
|
+
|
|
205
|
+
If you prefer manual setup, add this to your claude_desktop_config.json:
|
|
206
|
+
|
|
207
|
+
**Basic setup (no file access):**
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"mcpServers": {
|
|
211
|
+
"desktop-commander-in-docker": {
|
|
212
|
+
"command": "docker",
|
|
213
|
+
"args": [
|
|
214
|
+
"run",
|
|
215
|
+
"-i",
|
|
216
|
+
"--rm",
|
|
217
|
+
"mcp/desktop-commander:latest"
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**With folder mounting:**
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"mcpServers": {
|
|
228
|
+
"desktop-commander-in-docker": {
|
|
229
|
+
"command": "docker",
|
|
230
|
+
"args": [
|
|
231
|
+
"run",
|
|
232
|
+
"-i",
|
|
233
|
+
"--rm",
|
|
234
|
+
"-v", "/Users/username/Desktop:/mnt/desktop",
|
|
235
|
+
"-v", "/Users/username/Documents:/mnt/documents",
|
|
236
|
+
"mcp/desktop-commander:latest"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Advanced folder mounting:**
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"mcpServers": {
|
|
247
|
+
"desktop-commander-in-docker": {
|
|
248
|
+
"command": "docker",
|
|
249
|
+
"args": [
|
|
250
|
+
"run", "-i", "--rm",
|
|
251
|
+
"-v", "dc-system:/usr",
|
|
252
|
+
"-v", "dc-home:/root",
|
|
253
|
+
"-v", "dc-workspace:/workspace",
|
|
254
|
+
"-v", "dc-packages:/var",
|
|
255
|
+
"-v", "/Users/username/Projects:/mnt/Projects",
|
|
256
|
+
"-v", "/Users/username/Downloads:/mnt/Downloads",
|
|
257
|
+
"mcp/desktop-commander:latest"
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
#### Docker Benefits
|
|
265
|
+
✅ **Controlled Isolation:** Runs in sandboxed environment with persistent development state
|
|
266
|
+
✅ **No Node.js Required:** Everything included in the container
|
|
267
|
+
✅ **Cross-Platform:** Same experience on all operating systems
|
|
268
|
+
✅ **Persistent Environment:** Your tools, files, configs, and work survives restarts
|
|
269
|
+
|
|
270
|
+
**✅ Auto-Updates:** Yes - `latest` tag automatically gets newer versions
|
|
271
|
+
**🔄 Manual Update:** `docker pull mcp/desktop-commander:latest` then restart Claude
|
|
272
|
+
|
|
273
|
+
#### Docker Management Commands
|
|
274
|
+
|
|
275
|
+
**macOS/Linux:**
|
|
276
|
+
|
|
277
|
+
Check installation status:
|
|
278
|
+
```bash
|
|
279
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --status
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Reset all persistent data (removes all installed tools and configs):
|
|
283
|
+
```bash
|
|
284
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Windows PowerShell:**
|
|
288
|
+
|
|
289
|
+
Check status:
|
|
290
|
+
```powershell
|
|
291
|
+
$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Status
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Reset all data:
|
|
295
|
+
```powershell
|
|
296
|
+
$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Reset
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Show help:
|
|
300
|
+
```powershell
|
|
301
|
+
$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Help
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Verbose output:
|
|
305
|
+
```powershell
|
|
306
|
+
$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -VerboseOutput
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
#### Troubleshooting Docker Installation
|
|
310
|
+
If you broke the Docker container or need a fresh start:
|
|
311
|
+
```bash
|
|
312
|
+
# Reset and reinstall from scratch
|
|
313
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset && bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)
|
|
314
|
+
```
|
|
315
|
+
This will completely reset your persistent environment and reinstall everything fresh with exception of not touching mounted folders
|
|
160
316
|
|
|
161
317
|
## Updating & Uninstalling Desktop Commander
|
|
162
318
|
|
|
163
|
-
### Automatic Updates (Options 1
|
|
164
|
-
**Options 1 (npx)
|
|
319
|
+
### Automatic Updates (Options 1, 2, 3, 4 & 6)
|
|
320
|
+
**Options 1 (npx), Option 2 (bash installer), 3 (Smithery), 4 (manual config), and 6 (Docker)** automatically update to the latest version whenever you restart Claude. No manual intervention needed.
|
|
165
321
|
|
|
166
|
-
### Manual Updates (
|
|
167
|
-
- **Option 2 (bash installer):** Re-run the curl command
|
|
168
|
-
- **Option 4 (manual config):** Usually automatic via npx, but re-add config entry if issues occur
|
|
322
|
+
### Manual Updates (Option 5)
|
|
169
323
|
- **Option 5 (local checkout):** `cd DesktopCommanderMCP && git pull && npm run setup`
|
|
170
324
|
|
|
171
325
|
### Uninstalling Desktop Commander
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
326
|
+
#### 🤖 Automatic Uninstallation (Recommended)
|
|
327
|
+
|
|
328
|
+
The easiest way to completely remove Desktop Commander:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
npx @wonderwhy-er/desktop-commander@latest remove
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
This automatic uninstaller will:
|
|
335
|
+
- ✅ Remove Desktop Commander from Claude's MCP server configuration
|
|
336
|
+
- ✅ Create a backup of your Claude config before making changes
|
|
337
|
+
- ✅ Provide guidance for complete package removal
|
|
338
|
+
- ✅ Restore from backup if anything goes wrong
|
|
339
|
+
|
|
340
|
+
#### 🔧 Manual Uninstallation
|
|
341
|
+
|
|
342
|
+
If the automatic uninstaller doesn't work or you prefer manual removal:
|
|
343
|
+
|
|
344
|
+
##### Remove from Claude Configuration
|
|
345
|
+
|
|
346
|
+
1. **Locate your Claude Desktop config file:**
|
|
347
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
348
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
349
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
350
|
+
|
|
351
|
+
2. **Edit the config file:**
|
|
352
|
+
- Open the file in a text editor
|
|
353
|
+
- Find and remove the `"desktop-commander"` entry from the `"mcpServers"` section
|
|
354
|
+
- Save the file
|
|
355
|
+
|
|
356
|
+
**Example - Remove this section:**
|
|
357
|
+
```json
|
|
358
|
+
{
|
|
359
|
+
"desktop-commander": {
|
|
360
|
+
"command": "npx",
|
|
361
|
+
"args": ["@wonderwhy-er/desktop-commander@latest"]
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Close and restart Claude Desktop to complete the removal.
|
|
367
|
+
|
|
368
|
+
#### 🆘 Troubleshooting
|
|
369
|
+
|
|
370
|
+
**If automatic uninstallation fails:**
|
|
371
|
+
- Use manual uninstallation as a fallback
|
|
372
|
+
|
|
373
|
+
**If Claude won't start after uninstalling:**
|
|
374
|
+
- Restore the backup config file created by the uninstaller
|
|
375
|
+
- Or manually fix the JSON syntax in your claude_desktop_config.json
|
|
177
376
|
|
|
178
|
-
|
|
377
|
+
**Need help?**
|
|
378
|
+
- Join our Discord community: https://discord.com/invite/kQ27sNnZr7
|
|
179
379
|
|
|
180
380
|
## Usage
|
|
181
381
|
|
|
@@ -502,7 +702,7 @@ Terminal still can access files ignoring allowed directories.
|
|
|
502
702
|
- **28-03-2025 Fixed "Watching /" JSON error** - Implemented custom stdio transport to handle non-JSON messages and prevent server crashes
|
|
503
703
|
- **25-03-2025 Better code search** ([merged](https://github.com/wonderwhy-er/ClaudeServerCommander/pull/17)) - Enhanced code exploration with context-aware results
|
|
504
704
|
|
|
505
|
-
##
|
|
705
|
+
## Roadmap
|
|
506
706
|
|
|
507
707
|
The following features are currently being explored:
|
|
508
708
|
|
|
@@ -514,7 +714,7 @@ The following features are currently being explored:
|
|
|
514
714
|
- **Interactive shell support** - ssh, node/python repl
|
|
515
715
|
- **Improve large file reading and writing**
|
|
516
716
|
|
|
517
|
-
##
|
|
717
|
+
## Support Desktop Commander
|
|
518
718
|
|
|
519
719
|
<div align="center">
|
|
520
720
|
<h3>📢 SUPPORT THIS PROJECT</h3>
|
|
@@ -533,7 +733,7 @@ The following features are currently being explored:
|
|
|
533
733
|
</div>
|
|
534
734
|
|
|
535
735
|
|
|
536
|
-
### Supporters Hall of Fame
|
|
736
|
+
### ❤️ Supporters Hall of Fame
|
|
537
737
|
|
|
538
738
|
Generous supporters are featured here. Thank you for helping make this project possible!
|
|
539
739
|
|
package/dist/server.js
CHANGED
|
@@ -14,6 +14,7 @@ import { getUsageStats } from './tools/usage.js';
|
|
|
14
14
|
import { giveFeedbackToDesktopCommander } from './tools/feedback.js';
|
|
15
15
|
import { trackToolCall } from './utils/trackTools.js';
|
|
16
16
|
import { usageTracker } from './utils/usageTracker.js';
|
|
17
|
+
import { processDockerPrompt } from './utils/dockerPrompt.js';
|
|
17
18
|
import { VERSION } from './version.js';
|
|
18
19
|
import { capture, capture_call_tool } from "./utils/capture.js";
|
|
19
20
|
console.error("Loading server.ts");
|
|
@@ -739,6 +740,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
739
740
|
// Mark that we've prompted (to prevent spam)
|
|
740
741
|
await usageTracker.markFeedbackPrompted();
|
|
741
742
|
}
|
|
743
|
+
// Check if should prompt about Docker environment
|
|
744
|
+
result = await processDockerPrompt(result, name);
|
|
742
745
|
}
|
|
743
746
|
return result;
|
|
744
747
|
}
|
|
@@ -580,7 +580,17 @@ async function restartClaude() {
|
|
|
580
580
|
logToFile('\nThe server is available as "desktop-commander" in Claude\'s MCP server list');
|
|
581
581
|
|
|
582
582
|
logToFile("Future updates will install automatically — no need to run this setup again.\n\n");
|
|
583
|
-
logToFile("
|
|
583
|
+
logToFile("🤔 Need help or have feedback? Happy to jump on a quick call: \n\n")
|
|
584
|
+
logToFile("https://calendar.app.google/SHMNZN5MJznJWC5A7 \n\n")
|
|
585
|
+
logToFile("or join our community: https://discord.com/invite/kQ27sNnZr7\n\n")
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
584
594
|
updateSetupStep(restartStep, 'completed');
|
|
585
595
|
await trackEvent('npx_setup_restart_claude_success', { platform });
|
|
586
596
|
} catch (startError) {
|
package/dist/terminal-manager.js
CHANGED
|
@@ -141,7 +141,7 @@ export class TerminalManager {
|
|
|
141
141
|
// Store completed session before removing active session
|
|
142
142
|
this.completedSessions.set(childProcess.pid, {
|
|
143
143
|
pid: childProcess.pid,
|
|
144
|
-
output: output
|
|
144
|
+
output: output, // Use only the main output variable
|
|
145
145
|
exitCode: code,
|
|
146
146
|
startTime: session.startTime,
|
|
147
147
|
endTime: new Date()
|
|
@@ -172,9 +172,15 @@ export class TerminalManager {
|
|
|
172
172
|
// Then check completed sessions
|
|
173
173
|
const completedSession = this.completedSessions.get(pid);
|
|
174
174
|
if (completedSession) {
|
|
175
|
-
// Format
|
|
175
|
+
// Format with output first, then completion info
|
|
176
176
|
const runtime = (completedSession.endTime.getTime() - completedSession.startTime.getTime()) / 1000;
|
|
177
|
-
|
|
177
|
+
const output = completedSession.output.trim();
|
|
178
|
+
if (output) {
|
|
179
|
+
return `${output}\n\nProcess completed with exit code ${completedSession.exitCode}\nRuntime: ${runtime}s`;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
return `Process completed with exit code ${completedSession.exitCode}\nRuntime: ${runtime}s\n(No output produced)`;
|
|
183
|
+
}
|
|
178
184
|
}
|
|
179
185
|
return null;
|
|
180
186
|
}
|
package/dist/tools/config.js
CHANGED
|
@@ -97,8 +97,19 @@ export async function readProcessOutput(args) {
|
|
|
97
97
|
const { pid, timeout_ms = 5000 } = parsed.data;
|
|
98
98
|
const session = terminalManager.getSession(pid);
|
|
99
99
|
if (!session) {
|
|
100
|
+
// Check if this is a completed session
|
|
101
|
+
const completedOutput = terminalManager.getNewOutput(pid);
|
|
102
|
+
if (completedOutput) {
|
|
103
|
+
return {
|
|
104
|
+
content: [{
|
|
105
|
+
type: "text",
|
|
106
|
+
text: completedOutput
|
|
107
|
+
}],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
// Neither active nor completed session found
|
|
100
111
|
return {
|
|
101
|
-
content: [{ type: "text", text: `No
|
|
112
|
+
content: [{ type: "text", text: `No session found for PID ${pid}` }],
|
|
102
113
|
isError: true,
|
|
103
114
|
};
|
|
104
115
|
}
|
package/dist/tools/schemas.d.ts
CHANGED
|
@@ -55,8 +55,8 @@ export declare const ReadFileArgsSchema: z.ZodObject<{
|
|
|
55
55
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
56
56
|
length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
path: string;
|
|
59
58
|
length: number;
|
|
59
|
+
path: string;
|
|
60
60
|
isUrl: boolean;
|
|
61
61
|
offset: number;
|
|
62
62
|
}, {
|