@prmichaelsen/acp-mcp 0.6.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.1] - 2026-02-23
9
+
10
+ ### Fixed
11
+ - **Shell environment not loaded**: Commands now properly source shell configuration files (`~/.zshrc`, `~/.bashrc`, `~/.profile`)
12
+ - Non-interactive SSH shells don't source config files by default
13
+ - This caused `$PATH` to be incomplete and environment variables to be missing
14
+ - Commands like `npm`, `node`, `git` would fail with "command not found" if installed via nvm, homebrew, or other user-space package managers
15
+ - Solution: Wrap all commands with shell config sourcing: `(source ~/.zshrc || source ~/.bashrc || source ~/.profile || true) && command`
16
+ - Applies to both `execWithTimeout()` and `execStream()` methods
17
+ - Gracefully handles missing config files (uses `|| true` to prevent errors)
18
+
19
+ ### Technical Details
20
+ - Added `wrapCommandWithShellInit()` private method to SSHConnectionManager
21
+ - Tries to source config files in order: `.zshrc` → `.bashrc` → `.profile`
22
+ - Ignores errors if files don't exist (2>/dev/null and || true)
23
+ - No breaking changes - transparent to users
24
+ - Fixes common issue where user-installed tools aren't in PATH
25
+
26
+ ## [0.7.0] - 2026-02-23
27
+
28
+ ### Added
29
+ - **Progress Streaming** for `acp_remote_execute_command` tool
30
+ - Real-time output streaming for long-running commands
31
+ - Uses MCP SDK's native progress notification system (`notifications/progress`)
32
+ - Graceful fallback to timeout mode for clients without progress support
33
+ - Rate limiting prevents notification spam (max 10/second, 100ms interval)
34
+ - Supports commands like `npm run build`, `npm run dev`, `npm test`
35
+ - Progress notifications include stdout chunks as messages
36
+ - Automatically resets request timeout on progress (prevents timeout for long operations)
37
+ - **`execStream()` method** in SSHConnectionManager
38
+ - Returns stdout stream, stderr stream, and exit code promise
39
+ - Enables real-time processing of command output
40
+ - Comprehensive logging for stream lifecycle
41
+ - Error handling for stream failures
42
+
43
+ ### Changed
44
+ - `acp_remote_execute_command` handler now accepts `extra` parameter with `progressToken`
45
+ - Server request handlers pass `extra` to execute_command handler
46
+ - Tool description updated to mention progress streaming support
47
+ - Timeout parameter ignored when progress streaming is active
48
+
49
+ ### Technical Details
50
+ - Requires MCP SDK v1.26.0+ for progress support
51
+ - Progress token accessed via `extra._meta.progressToken`
52
+ - Progress notifications sent via `server.notification()` method
53
+ - Backward compatible - existing clients unaffected
54
+ - No breaking changes to API
55
+ - Streaming mode indicated by `streamed: true` in response
56
+
8
57
  ## [0.6.0] - 2026-02-23
9
58
 
10
59
  ### Added
package/README.md CHANGED
@@ -64,11 +64,23 @@ const server = await createServer({
64
64
  - **Metadata includes**: name, path, type, size, permissions (mode, string, owner/group/others), owner (uid, gid), timestamps (accessed, modified)
65
65
  - **Note**: Uses hybrid approach (shell `ls` + SFTP `stat()`) to get all files including hidden ones with rich metadata
66
66
 
67
- - **acp_remote_execute_command** - Execute a shell command on the remote machine
67
+ - **acp_remote_execute_command** - Execute a shell command on the remote machine with optional progress streaming
68
68
  - `command` (required): Shell command to execute
69
69
  - `cwd` (optional): Working directory for command execution
70
- - `timeout` (optional): Timeout in seconds (default: 30)
71
- - Returns: `{ stdout, stderr, exitCode, timedOut }`
70
+ - `timeout` (optional): Timeout in seconds (default: 30, ignored if progress streaming)
71
+ - **Returns**: `{ stdout, stderr, exitCode, timedOut, streamed? }`
72
+ - **Shell Environment** (v0.7.1+): Automatically sources shell configuration files
73
+ - Sources `~/.zshrc`, `~/.bashrc`, or `~/.profile` before executing commands
74
+ - Ensures `$PATH` and environment variables are properly loaded
75
+ - Enables user-installed tools (nvm, homebrew, etc.) to work correctly
76
+ - Gracefully handles missing config files
77
+ - **Progress Streaming** (v0.7.0+): Supports real-time output streaming when client provides `progressToken`
78
+ - Requires MCP SDK v1.26.0+ (server and client)
79
+ - Client must provide `progressToken` in request `_meta`
80
+ - Client must handle progress notifications via `onprogress` callback
81
+ - Graceful fallback to timeout mode if no `progressToken` provided
82
+ - Rate limited to max 10 notifications/second
83
+ - Ideal for long-running commands: `npm run build`, `npm test`, `npm run dev`
72
84
 
73
85
  - **acp_remote_read_file** - Read file contents from the remote machine
74
86
  - `path` (required): Absolute path to file