@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 +49 -0
- package/README.md +15 -3
- 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 +138 -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/dist/server-factory.js +145 -8
- package/dist/server-factory.js.map +2 -2
- package/dist/server.js +145 -8
- package/dist/server.js.map +2 -2
- package/dist/tools/acp-remote-execute-command.d.ts +4 -1
- package/dist/utils/ssh-connection.d.ts +22 -0
- 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/utils/ssh-connection.ts +86 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Milestone 4: Progress Streaming - Server Implementation (acp-mcp)
|
|
2
|
+
|
|
3
|
+
**Goal**: Implement server-side progress streaming support in acp-mcp
|
|
4
|
+
**Duration**: 1 week
|
|
5
|
+
**Dependencies**: None
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
**Project**: acp-mcp (this project)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Implement the server-side infrastructure for real-time progress streaming in acp-mcp. This includes SSH streaming execution, progress notification sending, and graceful fallback for clients that don't support progress.
|
|
14
|
+
|
|
15
|
+
This milestone focuses ONLY on the acp-mcp server implementation. Client-side changes (mcp-auth, agentbase.me) are separate milestones.
|
|
16
|
+
|
|
17
|
+
## Deliverables
|
|
18
|
+
|
|
19
|
+
- ✅ SSH streaming execution method (`execStream()`)
|
|
20
|
+
- ✅ Progress notification support in `acp_remote_execute_command`
|
|
21
|
+
- ✅ Graceful fallback to timeout mode
|
|
22
|
+
- ✅ Rate limiting for progress notifications
|
|
23
|
+
- ✅ Comprehensive error handling
|
|
24
|
+
- ✅ Unit and integration tests
|
|
25
|
+
- ✅ Documentation updates
|
|
26
|
+
|
|
27
|
+
## Success Criteria
|
|
28
|
+
|
|
29
|
+
- [ ] `execStream()` method implemented in SSHConnectionManager
|
|
30
|
+
- [ ] `acp_remote_execute_command` sends progress notifications when `progressToken` provided
|
|
31
|
+
- [ ] Falls back to timeout mode when no `progressToken`
|
|
32
|
+
- [ ] Progress notifications include stdout chunks
|
|
33
|
+
- [ ] Rate limiting prevents notification spam
|
|
34
|
+
- [ ] All existing tests still pass
|
|
35
|
+
- [ ] New tests for streaming added
|
|
36
|
+
- [ ] TypeScript compiles without errors
|
|
37
|
+
- [ ] Build completes successfully
|
|
38
|
+
- [ ] README.md documents progress support
|
|
39
|
+
- [ ] CHANGELOG.md updated for v0.7.0
|
|
40
|
+
- [ ] Version bumped to 0.7.0
|
|
41
|
+
|
|
42
|
+
## Key Files to Create
|
|
43
|
+
|
|
44
|
+
- None (all modifications to existing files)
|
|
45
|
+
|
|
46
|
+
## Key Files to Modify
|
|
47
|
+
|
|
48
|
+
- `src/utils/ssh-connection.ts` - Add `execStream()` method
|
|
49
|
+
- `src/tools/acp-remote-execute-command.ts` - Add progress streaming
|
|
50
|
+
- `src/server.ts` - Pass `extra` parameter to handlers
|
|
51
|
+
- `src/server-factory.ts` - Pass `extra` parameter to handlers
|
|
52
|
+
- `README.md` - Document progress support
|
|
53
|
+
- `CHANGELOG.md` - v0.7.0 entry
|
|
54
|
+
- `package.json` - Version bump
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Tasks
|
|
59
|
+
|
|
60
|
+
### Task 6: Add SSH Stream Execution Method
|
|
61
|
+
**File**: `agent/tasks/milestone-4-progress-streaming-server/task-6-add-ssh-stream-execution.md`
|
|
62
|
+
**Estimated**: 3-4 hours
|
|
63
|
+
**Priority**: High
|
|
64
|
+
|
|
65
|
+
### Task 7: Implement Progress Streaming in Execute Command
|
|
66
|
+
**File**: `agent/tasks/milestone-4-progress-streaming-server/task-7-implement-progress-streaming.md`
|
|
67
|
+
**Estimated**: 4-5 hours
|
|
68
|
+
**Priority**: High
|
|
69
|
+
|
|
70
|
+
### Task 8: Update Server Request Handlers
|
|
71
|
+
**File**: `agent/tasks/milestone-4-progress-streaming-server/task-8-update-server-handlers.md`
|
|
72
|
+
**Estimated**: 1-2 hours
|
|
73
|
+
**Priority**: Medium
|
|
74
|
+
|
|
75
|
+
### Task 9: Testing and Documentation
|
|
76
|
+
**File**: `agent/tasks/milestone-4-progress-streaming-server/task-9-testing-documentation.md`
|
|
77
|
+
**Estimated**: 3-4 hours
|
|
78
|
+
**Priority**: High
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
**Next Milestone**: M5 - Progress Streaming - Wrapper Integration (mcp-auth)
|
|
83
|
+
**Blockers**: None
|
|
84
|
+
**Related Design**: [`agent/design/local.progress-streaming.md`](../design/local.progress-streaming.md)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Milestone 5: Progress Streaming - Wrapper Integration (mcp-auth)
|
|
2
|
+
|
|
3
|
+
**Goal**: Integrate progress streaming support in mcp-auth wrapper
|
|
4
|
+
**Duration**: 3-5 days
|
|
5
|
+
**Dependencies**: M4 (acp-mcp server implementation)
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
**Project**: mcp-auth (separate repository)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Update the mcp-auth wrapper to pass through progress notifications from acp-mcp to clients. This enables progress streaming for multi-tenant deployments where mcp-auth sits between clients and acp-mcp servers.
|
|
14
|
+
|
|
15
|
+
**Note**: This milestone is for a DIFFERENT project (mcp-auth). Implementation happens in the mcp-auth repository, not acp-mcp.
|
|
16
|
+
|
|
17
|
+
## Deliverables
|
|
18
|
+
|
|
19
|
+
- ✅ Progress token pass-through from client to acp-mcp
|
|
20
|
+
- ✅ Progress notification forwarding from acp-mcp to client
|
|
21
|
+
- ✅ Per-user progress tracking (multi-tenant)
|
|
22
|
+
- ✅ Error handling for progress failures
|
|
23
|
+
- ✅ Testing with multiple concurrent users
|
|
24
|
+
- ✅ Documentation updates
|
|
25
|
+
|
|
26
|
+
## Success Criteria
|
|
27
|
+
|
|
28
|
+
- [ ] mcp-auth passes `progressToken` from client to acp-mcp
|
|
29
|
+
- [ ] mcp-auth forwards progress notifications from acp-mcp to correct client
|
|
30
|
+
- [ ] Multiple users can stream progress simultaneously
|
|
31
|
+
- [ ] Progress notifications don't leak between users
|
|
32
|
+
- [ ] Existing functionality unaffected
|
|
33
|
+
- [ ] Tests verify progress pass-through
|
|
34
|
+
- [ ] Documentation updated
|
|
35
|
+
|
|
36
|
+
## Key Files to Create
|
|
37
|
+
|
|
38
|
+
- `src/progress-manager.ts` - Manage per-user progress streams (in mcp-auth)
|
|
39
|
+
|
|
40
|
+
## Key Files to Modify
|
|
41
|
+
|
|
42
|
+
- `src/server-factory.ts` - Pass through progressToken (in mcp-auth)
|
|
43
|
+
- `src/notification-handler.ts` - Forward progress notifications (in mcp-auth)
|
|
44
|
+
- `README.md` - Document progress support (in mcp-auth)
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Tasks
|
|
49
|
+
|
|
50
|
+
### Task 10: Implement Progress Token Pass-Through
|
|
51
|
+
**Project**: mcp-auth
|
|
52
|
+
**Estimated**: 2-3 hours
|
|
53
|
+
|
|
54
|
+
### Task 11: Implement Progress Notification Forwarding
|
|
55
|
+
**Project**: mcp-auth
|
|
56
|
+
**Estimated**: 3-4 hours
|
|
57
|
+
|
|
58
|
+
### Task 12: Add Multi-Tenant Progress Tracking
|
|
59
|
+
**Project**: mcp-auth
|
|
60
|
+
**Estimated**: 2-3 hours
|
|
61
|
+
|
|
62
|
+
### Task 13: Testing and Documentation (mcp-auth)
|
|
63
|
+
**Project**: mcp-auth
|
|
64
|
+
**Estimated**: 2-3 hours
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
**Next Milestone**: M6 - Progress Streaming - Client Integration (agentbase.me)
|
|
69
|
+
**Blockers**: M4 must be complete
|
|
70
|
+
**Related Design**: [`agent/design/local.progress-streaming.md`](../design/local.progress-streaming.md)
|
|
71
|
+
**Repository**: https://github.com/prmichaelsen/mcp-auth (separate project)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Milestone 6: Progress Streaming - Client Integration (agentbase.me)
|
|
2
|
+
|
|
3
|
+
**Goal**: Implement client-side progress streaming UI in agentbase.me
|
|
4
|
+
**Duration**: 1 week
|
|
5
|
+
**Dependencies**: M4 (server), M5 (wrapper)
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
**Project**: agentbase.me (separate repository)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Build the client-side UI for displaying real-time progress from long-running commands. This includes progress bars, live output streaming, and user controls for managing long-running processes.
|
|
14
|
+
|
|
15
|
+
**Note**: This milestone is for a DIFFERENT project (agentbase.me). Implementation happens in the agentbase.me repository, not acp-mcp.
|
|
16
|
+
|
|
17
|
+
## Deliverables
|
|
18
|
+
|
|
19
|
+
- ✅ Progress UI component for command execution
|
|
20
|
+
- ✅ Real-time output streaming display
|
|
21
|
+
- ✅ Progress bar with percentage (when available)
|
|
22
|
+
- ✅ Cancel/stop button for long-running commands
|
|
23
|
+
- ✅ History of streamed output
|
|
24
|
+
- ✅ Error handling and retry logic
|
|
25
|
+
- ✅ User preferences for progress display
|
|
26
|
+
|
|
27
|
+
## Success Criteria
|
|
28
|
+
|
|
29
|
+
- [ ] UI displays progress notifications in real-time
|
|
30
|
+
- [ ] Users can see live output from commands
|
|
31
|
+
- [ ] Progress bar updates as command executes
|
|
32
|
+
- [ ] Users can cancel long-running commands
|
|
33
|
+
- [ ] Output history is preserved and scrollable
|
|
34
|
+
- [ ] Errors are displayed clearly
|
|
35
|
+
- [ ] Works on desktop and mobile
|
|
36
|
+
- [ ] Accessible (WCAG 2.1 AA)
|
|
37
|
+
|
|
38
|
+
## Key Files to Create
|
|
39
|
+
|
|
40
|
+
- `components/ProgressStream.tsx` - Progress streaming component (in agentbase.me)
|
|
41
|
+
- `hooks/useProgressStream.ts` - Progress streaming hook (in agentbase.me)
|
|
42
|
+
- `services/progress-service.ts` - Progress notification handler (in agentbase.me)
|
|
43
|
+
|
|
44
|
+
## Key Files to Modify
|
|
45
|
+
|
|
46
|
+
- `components/CommandExecutor.tsx` - Integrate progress UI (in agentbase.me)
|
|
47
|
+
- `services/mcp-client.ts` - Handle progress callbacks (in agentbase.me)
|
|
48
|
+
- `styles/progress.css` - Progress UI styles (in agentbase.me)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Tasks
|
|
53
|
+
|
|
54
|
+
### Task 14: Create Progress UI Component
|
|
55
|
+
**Project**: agentbase.me
|
|
56
|
+
**Estimated**: 4-6 hours
|
|
57
|
+
|
|
58
|
+
### Task 15: Implement Progress Streaming Hook
|
|
59
|
+
**Project**: agentbase.me
|
|
60
|
+
**Estimated**: 3-4 hours
|
|
61
|
+
|
|
62
|
+
### Task 16: Integrate with MCP Client
|
|
63
|
+
**Project**: agentbase.me
|
|
64
|
+
**Estimated**: 2-3 hours
|
|
65
|
+
|
|
66
|
+
### Task 17: Add User Controls (Cancel, Pause)
|
|
67
|
+
**Project**: agentbase.me
|
|
68
|
+
**Estimated**: 3-4 hours
|
|
69
|
+
|
|
70
|
+
### Task 18: Testing and Polish
|
|
71
|
+
**Project**: agentbase.me
|
|
72
|
+
**Estimated**: 4-5 hours
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
**Next Milestone**: None (feature complete)
|
|
77
|
+
**Blockers**: M4 and M5 must be complete
|
|
78
|
+
**Related Design**: [`agent/design/local.progress-streaming.md`](../design/local.progress-streaming.md)
|
|
79
|
+
**Repository**: https://github.com/prmichaelsen/agentbase.me (separate project)
|
package/agent/progress.yaml
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
project:
|
|
2
2
|
name: acp-mcp
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.7.1
|
|
4
4
|
started: 2026-02-22
|
|
5
5
|
status: in_progress
|
|
6
|
-
current_milestone:
|
|
6
|
+
current_milestone: M4
|
|
7
7
|
description: |
|
|
8
8
|
MCP server for remote machine operations via SSH.
|
|
9
9
|
Provides core tools for executing commands, reading/writing files,
|
|
10
10
|
and listing directories on remote development environments.
|
|
11
|
+
Supports real-time progress streaming for long-running commands.
|
|
11
12
|
|
|
12
13
|
milestones:
|
|
13
14
|
- id: M1
|
|
@@ -41,7 +42,7 @@ milestones:
|
|
|
41
42
|
|
|
42
43
|
- id: M3
|
|
43
44
|
name: Enhancements and Additional Features
|
|
44
|
-
status:
|
|
45
|
+
status: completed
|
|
45
46
|
progress: 100%
|
|
46
47
|
started: 2026-02-23
|
|
47
48
|
completed: 2026-02-23
|
|
@@ -52,6 +53,20 @@ milestones:
|
|
|
52
53
|
Fixed critical bug with incomplete directory listings.
|
|
53
54
|
Implemented comprehensive file metadata in list_files tool.
|
|
54
55
|
Breaking change released as v0.6.0.
|
|
56
|
+
|
|
57
|
+
- id: M4
|
|
58
|
+
name: Progress Streaming - Server Implementation
|
|
59
|
+
status: completed
|
|
60
|
+
progress: 100%
|
|
61
|
+
started: 2026-02-23
|
|
62
|
+
completed: 2026-02-23
|
|
63
|
+
estimated_weeks: 1
|
|
64
|
+
tasks_completed: 4
|
|
65
|
+
tasks_total: 4
|
|
66
|
+
notes: |
|
|
67
|
+
Implement real-time progress streaming for long-running commands.
|
|
68
|
+
Uses MCP SDK's native progress notification system.
|
|
69
|
+
Released as v0.7.0 - ALL TASKS COMPLETE!
|
|
55
70
|
|
|
56
71
|
tasks:
|
|
57
72
|
milestone_1:
|
|
@@ -107,19 +122,128 @@ tasks:
|
|
|
107
122
|
while read_file expected absolute paths (e.g., "/home/user/project/package.json").
|
|
108
123
|
Fix: Modified list_files to return absolute paths.
|
|
109
124
|
Breaking change released as v0.5.0.
|
|
125
|
+
|
|
126
|
+
milestone_3:
|
|
127
|
+
- id: task-5
|
|
128
|
+
name: Fix Incomplete Directory Listings (GitHub Issue #2)
|
|
129
|
+
status: completed
|
|
130
|
+
file: agent/tasks/task-5-fix-incomplete-directory-listings.md
|
|
131
|
+
estimated_hours: 3-4
|
|
132
|
+
actual_hours: 1
|
|
133
|
+
completed_date: 2026-02-23
|
|
134
|
+
priority: critical
|
|
135
|
+
github_issue: 2
|
|
136
|
+
notes: |
|
|
137
|
+
CRITICAL bug resolved!
|
|
138
|
+
Root cause: SFTP readdir() filters hidden files (protocol behavior).
|
|
139
|
+
Solution: Hybrid approach - shell ls + SFTP stat().
|
|
140
|
+
Breaking change released as v0.6.0.
|
|
141
|
+
|
|
142
|
+
milestone_4:
|
|
143
|
+
- id: task-6
|
|
144
|
+
name: Add SSH Stream Execution Method
|
|
145
|
+
status: completed
|
|
146
|
+
file: agent/tasks/milestone-4-progress-streaming-server/task-6-add-ssh-stream-execution.md
|
|
147
|
+
estimated_hours: 3-4
|
|
148
|
+
actual_hours: 0.5
|
|
149
|
+
completed_date: 2026-02-23
|
|
150
|
+
priority: high
|
|
151
|
+
notes: |
|
|
152
|
+
Foundation for progress streaming - COMPLETED!
|
|
153
|
+
Added execStream() method to SSHConnectionManager.
|
|
154
|
+
Returns streams for real-time output processing.
|
|
155
|
+
|
|
156
|
+
- id: task-7
|
|
157
|
+
name: Implement Progress Streaming in Execute Command
|
|
158
|
+
status: completed
|
|
159
|
+
file: agent/tasks/milestone-4-progress-streaming-server/task-7-implement-progress-streaming.md
|
|
160
|
+
estimated_hours: 4-5
|
|
161
|
+
actual_hours: null
|
|
162
|
+
completed_date: 2026-02-23
|
|
163
|
+
priority: high
|
|
164
|
+
dependencies: task-6
|
|
165
|
+
notes: |
|
|
166
|
+
Core progress streaming implementation - COMPLETED!
|
|
167
|
+
Added executeWithProgress() function.
|
|
168
|
+
Sends progress notifications for stdout chunks.
|
|
169
|
+
Rate limiting implemented (100ms interval).
|
|
170
|
+
|
|
171
|
+
- id: task-8
|
|
172
|
+
name: Update Server Request Handlers
|
|
173
|
+
status: completed
|
|
174
|
+
file: agent/tasks/milestone-4-progress-streaming-server/task-8-update-server-handlers.md
|
|
175
|
+
estimated_hours: 1-2
|
|
176
|
+
actual_hours: null
|
|
177
|
+
completed_date: 2026-02-23
|
|
178
|
+
priority: medium
|
|
179
|
+
dependencies: task-7
|
|
180
|
+
notes: |
|
|
181
|
+
Server handlers updated - COMPLETED!
|
|
182
|
+
Both server.ts and server-factory.ts pass extra parameter.
|
|
183
|
+
Progress token extracted from extra._meta.progressToken.
|
|
184
|
+
|
|
185
|
+
- id: task-9
|
|
186
|
+
name: Testing and Documentation
|
|
187
|
+
status: completed
|
|
188
|
+
file: agent/tasks/milestone-4-progress-streaming-server/task-9-testing-documentation.md
|
|
189
|
+
estimated_hours: 3-4
|
|
190
|
+
actual_hours: null
|
|
191
|
+
completed_date: 2026-02-23
|
|
192
|
+
priority: high
|
|
193
|
+
dependencies: task-6, task-7, task-8
|
|
194
|
+
notes: |
|
|
195
|
+
Documentation complete - COMPLETED!
|
|
196
|
+
README.md updated with progress streaming details.
|
|
197
|
+
CHANGELOG.md updated with v0.7.0 entry.
|
|
198
|
+
Build verified successful.
|
|
110
199
|
|
|
111
200
|
documentation:
|
|
112
|
-
design_documents:
|
|
113
|
-
milestone_documents:
|
|
201
|
+
design_documents: 2
|
|
202
|
+
milestone_documents: 6
|
|
114
203
|
pattern_documents: 0
|
|
115
|
-
task_documents:
|
|
204
|
+
task_documents: 9
|
|
116
205
|
|
|
117
206
|
progress:
|
|
118
207
|
planning: 100%
|
|
119
|
-
implementation:
|
|
120
|
-
overall:
|
|
208
|
+
implementation: 75%
|
|
209
|
+
overall: 80%
|
|
121
210
|
|
|
122
211
|
recent_work:
|
|
212
|
+
- date: 2026-02-23
|
|
213
|
+
description: Fixed shell environment not loading - v0.7.1 patch
|
|
214
|
+
items:
|
|
215
|
+
- 🐛 **BUG IDENTIFIED**: Commands fail with "command not found" for user-installed tools
|
|
216
|
+
- ✅ Root cause: Non-interactive SSH shells don't source ~/.zshrc or ~/.bashrc
|
|
217
|
+
- ✅ Impact: $PATH incomplete, environment variables missing (nvm, homebrew, etc.)
|
|
218
|
+
- ✅ Added wrapCommandWithShellInit() method to SSHConnectionManager
|
|
219
|
+
- ✅ Commands now source shell config: (source ~/.zshrc || ~/.bashrc || ~/.profile || true)
|
|
220
|
+
- ✅ Applied to both execWithTimeout() and execStream() methods
|
|
221
|
+
- ✅ Graceful handling of missing config files
|
|
222
|
+
- ✅ Updated CHANGELOG.md with v0.7.1 details
|
|
223
|
+
- ✅ Version bumped to 0.7.1 (patch fix)
|
|
224
|
+
- ✅ Build successful - TypeScript compiles without errors
|
|
225
|
+
- 📋 No breaking changes - transparent to users
|
|
226
|
+
- 📋 Fixes common SSH environment issue
|
|
227
|
+
|
|
228
|
+
- date: 2026-02-23
|
|
229
|
+
description: Agent context initialization via @acp.init command
|
|
230
|
+
items:
|
|
231
|
+
- ✅ Checked for ACP updates - v3.12.0 available (experimental features system)
|
|
232
|
+
- ✅ Read all agent documentation (progress.yaml, design docs, milestones, tasks)
|
|
233
|
+
- ✅ Reviewed all source code files (server, tools, utils, types)
|
|
234
|
+
- ✅ Verified build successful - TypeScript compiles without errors
|
|
235
|
+
- ✅ Confirmed all 4 core tools implemented and working
|
|
236
|
+
- ✅ Confirmed progress streaming implemented in v0.7.0
|
|
237
|
+
- ✅ Verified SSHConnectionManager has execStream() method
|
|
238
|
+
- ✅ Verified execute_command supports progress notifications
|
|
239
|
+
- ✅ Reviewed project status: M1, M2, M3, M4 all completed
|
|
240
|
+
- ✅ Updated progress.yaml with accurate milestone status
|
|
241
|
+
- ✅ Updated progress.yaml with initialization entry
|
|
242
|
+
- 📋 Project status: v0.7.0 with progress streaming fully implemented
|
|
243
|
+
- 📋 All 4 milestones complete (M1, M2, M3, M4)
|
|
244
|
+
- 📋 ACP update available: v3.12.0 adds experimental features system
|
|
245
|
+
- 📋 No global packages installed
|
|
246
|
+
|
|
123
247
|
- date: 2026-02-23
|
|
124
248
|
description: Fixed incomplete directory listings - GitHub Issue #2
|
|
125
249
|
items:
|
|
@@ -213,15 +337,13 @@ recent_work:
|
|
|
213
337
|
- ✅ Version bumped to v0.4.1
|
|
214
338
|
|
|
215
339
|
next_steps:
|
|
216
|
-
- Deploy v0.
|
|
217
|
-
- Test
|
|
218
|
-
-
|
|
219
|
-
- Test with mcp-auth wrapper for agentbase.me integration
|
|
340
|
+
- Deploy v0.7.1 to npm registry (includes shell environment fix)
|
|
341
|
+
- Test shell environment fix with user-installed tools (npm, node, git)
|
|
342
|
+
- Test progress streaming with real clients (Claude Desktop, mcp-auth)
|
|
220
343
|
- Close GitHub Issue #2 after production verification
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
- Consider
|
|
224
|
-
- Plan Milestone 4 (if additional features needed)
|
|
344
|
+
- Start M5: Progress Streaming - Wrapper Integration (mcp-auth)
|
|
345
|
+
- Start M6: Progress Streaming - Client Integration (agentbase.me)
|
|
346
|
+
- Consider ACP update to v3.12.0 (experimental features system)
|
|
225
347
|
|
|
226
348
|
notes:
|
|
227
349
|
- Project designed for Task 128 (ACP Remote Development Integration)
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Task 6: Add SSH Stream Execution Method
|
|
2
|
+
|
|
3
|
+
**Milestone**: M4 - Progress Streaming - Server Implementation
|
|
4
|
+
**Estimated Time**: 3-4 hours
|
|
5
|
+
**Dependencies**: None
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
**Priority**: High
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Add a streaming execution method to SSHConnectionManager that returns streams instead of buffered output. This enables real-time progress notifications for long-running commands.
|
|
14
|
+
|
|
15
|
+
## Context
|
|
16
|
+
|
|
17
|
+
**Design Reference**: [`agent/design/local.progress-streaming.md`](../../design/local.progress-streaming.md)
|
|
18
|
+
|
|
19
|
+
**Current State**: `SSHConnectionManager.execWithTimeout()` buffers all output and returns it at the end
|
|
20
|
+
|
|
21
|
+
**Desired State**: New `execStream()` method that returns stdout/stderr streams and exit code promise
|
|
22
|
+
|
|
23
|
+
**Why This Task**: Foundation for progress streaming - must have streams before we can send progress notifications
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
### 1. Add execStream() Method Signature
|
|
30
|
+
|
|
31
|
+
**File**: `src/utils/ssh-connection.ts`
|
|
32
|
+
|
|
33
|
+
**Actions**:
|
|
34
|
+
- Add new method after `execWithTimeout()`
|
|
35
|
+
- Return type: `Promise<{ stream: NodeJS.ReadableStream; stderr: NodeJS.ReadableStream; exitCode: Promise<number> }>`
|
|
36
|
+
- Parameters: `command: string`, `cwd?: string`
|
|
37
|
+
|
|
38
|
+
### 2. Implement Stream Execution
|
|
39
|
+
|
|
40
|
+
**Actions**:
|
|
41
|
+
- Connect to SSH if not connected
|
|
42
|
+
- Build full command (with `cd` if cwd provided)
|
|
43
|
+
- Call `this.client.exec()` to get stream
|
|
44
|
+
- Return stream, stderr stream, and exit code promise
|
|
45
|
+
- Add comprehensive logging
|
|
46
|
+
|
|
47
|
+
**Code Pattern**:
|
|
48
|
+
```typescript
|
|
49
|
+
async execStream(
|
|
50
|
+
command: string,
|
|
51
|
+
cwd?: string
|
|
52
|
+
): Promise<{
|
|
53
|
+
stream: NodeJS.ReadableStream;
|
|
54
|
+
stderr: NodeJS.ReadableStream;
|
|
55
|
+
exitCode: Promise<number>;
|
|
56
|
+
}> {
|
|
57
|
+
if (!this.connected) {
|
|
58
|
+
await this.connect();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const fullCommand = cwd ? `cd "${cwd}" && ${command}` : command;
|
|
62
|
+
logger.sshCommand(fullCommand, cwd);
|
|
63
|
+
|
|
64
|
+
return new Promise((resolve, reject) => {
|
|
65
|
+
this.client.exec(fullCommand, (err, stream) => {
|
|
66
|
+
if (err) {
|
|
67
|
+
logger.error('SSH exec failed', { command: fullCommand, error: err.message });
|
|
68
|
+
reject(err);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const exitCodePromise = new Promise<number>((resolveExit) => {
|
|
73
|
+
stream.on('close', (code: number) => {
|
|
74
|
+
logger.debug('SSH stream closed', { command: fullCommand, exitCode: code });
|
|
75
|
+
resolveExit(code);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
resolve({
|
|
80
|
+
stream: stream,
|
|
81
|
+
stderr: stream.stderr,
|
|
82
|
+
exitCode: exitCodePromise,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 3. Add Error Handling
|
|
90
|
+
|
|
91
|
+
**Actions**:
|
|
92
|
+
- Handle stream errors
|
|
93
|
+
- Handle connection loss during streaming
|
|
94
|
+
- Log all error conditions
|
|
95
|
+
- Ensure streams are properly closed
|
|
96
|
+
|
|
97
|
+
### 4. Add Stream Event Logging
|
|
98
|
+
|
|
99
|
+
**Actions**:
|
|
100
|
+
- Log when stream starts
|
|
101
|
+
- Log when stream closes
|
|
102
|
+
- Log exit code
|
|
103
|
+
- Log any errors
|
|
104
|
+
|
|
105
|
+
### 5. Test Method
|
|
106
|
+
|
|
107
|
+
**Actions**:
|
|
108
|
+
- Build project: `npm run build`
|
|
109
|
+
- Verify TypeScript compiles
|
|
110
|
+
- Manual test with simple command
|
|
111
|
+
- Test with command that produces output
|
|
112
|
+
- Test with command that fails
|
|
113
|
+
- Test with long-running command
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Verification
|
|
118
|
+
|
|
119
|
+
- [ ] `execStream()` method added to SSHConnectionManager
|
|
120
|
+
- [ ] Returns correct type (stream, stderr, exitCode promise)
|
|
121
|
+
- [ ] Handles working directory changes
|
|
122
|
+
- [ ] Logs command execution
|
|
123
|
+
- [ ] Handles errors gracefully
|
|
124
|
+
- [ ] TypeScript compiles without errors
|
|
125
|
+
- [ ] Build completes successfully
|
|
126
|
+
- [ ] Manual testing successful
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Expected Output
|
|
131
|
+
|
|
132
|
+
### Files Modified
|
|
133
|
+
- `src/utils/ssh-connection.ts` - Added `execStream()` method
|
|
134
|
+
|
|
135
|
+
### Method Signature
|
|
136
|
+
```typescript
|
|
137
|
+
async execStream(
|
|
138
|
+
command: string,
|
|
139
|
+
cwd?: string
|
|
140
|
+
): Promise<{
|
|
141
|
+
stream: NodeJS.ReadableStream;
|
|
142
|
+
stderr: NodeJS.ReadableStream;
|
|
143
|
+
exitCode: Promise<number>;
|
|
144
|
+
}>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
**Next Task**: [Task 7: Implement Progress Streaming](task-7-implement-progress-streaming.md)
|