@prmichaelsen/acp-mcp 0.5.1 → 0.7.0

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,72 @@ 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.0] - 2026-02-23
9
+
10
+ ### Added
11
+ - **Progress Streaming** for `acp_remote_execute_command` tool
12
+ - Real-time output streaming for long-running commands
13
+ - Uses MCP SDK's native progress notification system (`notifications/progress`)
14
+ - Graceful fallback to timeout mode for clients without progress support
15
+ - Rate limiting prevents notification spam (max 10/second, 100ms interval)
16
+ - Supports commands like `npm run build`, `npm run dev`, `npm test`
17
+ - Progress notifications include stdout chunks as messages
18
+ - Automatically resets request timeout on progress (prevents timeout for long operations)
19
+ - **`execStream()` method** in SSHConnectionManager
20
+ - Returns stdout stream, stderr stream, and exit code promise
21
+ - Enables real-time processing of command output
22
+ - Comprehensive logging for stream lifecycle
23
+ - Error handling for stream failures
24
+
25
+ ### Changed
26
+ - `acp_remote_execute_command` handler now accepts `extra` parameter with `progressToken`
27
+ - Server request handlers pass `extra` to execute_command handler
28
+ - Tool description updated to mention progress streaming support
29
+ - Timeout parameter ignored when progress streaming is active
30
+
31
+ ### Technical Details
32
+ - Requires MCP SDK v1.26.0+ for progress support
33
+ - Progress token accessed via `extra._meta.progressToken`
34
+ - Progress notifications sent via `server.notification()` method
35
+ - Backward compatible - existing clients unaffected
36
+ - No breaking changes to API
37
+ - Streaming mode indicated by `streamed: true` in response
38
+
39
+ ## [0.6.0] - 2026-02-23
40
+
41
+ ### Added
42
+ - **Comprehensive file metadata** in `acp_remote_list_files` tool
43
+ - Now returns structured JSON with full file information
44
+ - Includes permissions (mode, string, owner/group/others breakdown)
45
+ - Includes timestamps (accessed, modified in ISO 8601 format)
46
+ - Includes ownership (uid, gid)
47
+ - Includes file type (file, directory, symlink, other)
48
+ - Includes file size in bytes
49
+ - **`includeHidden` parameter** for `acp_remote_list_files` (default: true)
50
+ - Control whether hidden files (starting with `.`) are included
51
+ - Addresses GitHub Issue #2 - incomplete directory listings
52
+
53
+ ### Fixed
54
+ - **CRITICAL**: Fixed GitHub Issue #2 - `acp_remote_list_files` missing hidden files
55
+ - Root cause: SFTP `readdir()` filters hidden files by default (protocol behavior)
56
+ - Solution: Hybrid approach using shell `ls` for filenames + SFTP `stat()` for metadata
57
+ - Now returns ALL files including hidden directories (`.ssh`, `.config`, `.npm`, etc.)
58
+ - Fallback to SFTP `readdir()` if shell command unavailable
59
+
60
+ ### Changed
61
+ - **BREAKING**: `acp_remote_list_files` output format changed from simple text to structured JSON
62
+ - **Before**: Newline-separated list of paths
63
+ - **After**: JSON array of FileEntry objects with comprehensive metadata
64
+ - **Migration**: Parse JSON response to access file information
65
+ - **Benefit**: Rich metadata enables better file system operations and decision-making
66
+
67
+ ### Technical Details
68
+ - Added `FileEntry` interface in `src/types/file-entry.ts`
69
+ - Updated `SSHConnectionManager.listFiles()` with hybrid implementation
70
+ - Added helper functions: `parsePermissions()`, `modeToPermissionString()`, `getFileType()`
71
+ - Enhanced logging for file listing operations
72
+ - Maintains backward compatibility via fallback to SFTP
73
+
8
74
  ## [0.5.0] - 2026-02-23
9
75
 
10
76
  ### Fixed
package/README.md CHANGED
@@ -56,17 +56,26 @@ const server = await createServer({
56
56
 
57
57
  ## Available Tools
58
58
 
59
- - **acp_remote_list_files** - List files and directories in a specified path on the remote machine
59
+ - **acp_remote_list_files** - List files and directories with comprehensive metadata
60
60
  - `path` (required): The directory path to list files from
61
61
  - `recursive` (optional): Whether to list files recursively (default: false)
62
- - **Returns**: Absolute paths (e.g., `/home/user/project/file.txt`) that can be used directly with other tools
63
- - **Note**: As of v0.5.0, returns absolute paths instead of relative filenames for seamless integration with read/write operations
62
+ - `includeHidden` (optional): Whether to include hidden files starting with `.` (default: true)
63
+ - **Returns**: JSON array of file entries with metadata (permissions, timestamps, size, ownership)
64
+ - **Metadata includes**: name, path, type, size, permissions (mode, string, owner/group/others), owner (uid, gid), timestamps (accessed, modified)
65
+ - **Note**: Uses hybrid approach (shell `ls` + SFTP `stat()`) to get all files including hidden ones with rich metadata
64
66
 
65
- - **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
66
68
  - `command` (required): Shell command to execute
67
69
  - `cwd` (optional): Working directory for command execution
68
- - `timeout` (optional): Timeout in seconds (default: 30)
69
- - 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
+ - **Progress Streaming** (v0.7.0+): Supports real-time output streaming when client provides `progressToken`
73
+ - Requires MCP SDK v1.26.0+ (server and client)
74
+ - Client must provide `progressToken` in request `_meta`
75
+ - Client must handle progress notifications via `onprogress` callback
76
+ - Graceful fallback to timeout mode if no `progressToken` provided
77
+ - Rate limited to max 10 notifications/second
78
+ - Ideal for long-running commands: `npm run build`, `npm test`, `npm run dev`
70
79
 
71
80
  - **acp_remote_read_file** - Read file contents from the remote machine
72
81
  - `path` (required): Absolute path to file