@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 +66 -0
- package/README.md +15 -6
- package/agent/design/local.progress-streaming.md +940 -0
- package/agent/milestones/milestone-4-progress-streaming-server.md +84 -0
- package/agent/milestones/milestone-5-progress-streaming-wrapper.md +71 -0
- package/agent/milestones/milestone-6-progress-streaming-client.md +79 -0
- package/agent/progress.yaml +145 -16
- package/agent/tasks/milestone-4-progress-streaming-server/task-6-add-ssh-stream-execution.md +149 -0
- package/agent/tasks/milestone-4-progress-streaming-server/task-7-implement-progress-streaming.md +191 -0
- package/agent/tasks/milestone-4-progress-streaming-server/task-8-update-server-handlers.md +109 -0
- package/agent/tasks/milestone-4-progress-streaming-server/task-9-testing-documentation.md +192 -0
- package/agent/tasks/task-5-fix-incomplete-directory-listings.md +170 -0
- package/dist/server-factory.js +299 -28
- package/dist/server-factory.js.map +4 -4
- package/dist/server.js +299 -28
- package/dist/server.js.map +4 -4
- package/dist/tools/acp-remote-execute-command.d.ts +4 -1
- package/dist/types/file-entry.d.ts +88 -0
- package/dist/utils/ssh-connection.d.ts +26 -5
- package/package.json +1 -1
- package/src/server-factory.ts +3 -2
- package/src/server.ts +3 -2
- package/src/tools/acp-remote-execute-command.ts +116 -7
- package/src/tools/acp-remote-list-files.ts +27 -21
- package/src/types/file-entry.ts +123 -0
- package/src/utils/ssh-connection.ts +189 -5
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
|
|
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
|
-
-
|
|
63
|
-
- **
|
|
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
|
|
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
|