-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Parent Epic
Part of #18 - STDIO Transport Support
Description
Create a background service that watches for the STDIO pipe and automatically connects when detected.
Implementation
New File: src/CodingWithCalvin.MCPServer/Services/StdioPipeWatcher.cs
Behavior
- Background polling service (check every 1-2 seconds)
- Watches for
vsmcp-stdionamed pipe existence - Only active when
CurrentMode == None(paused during HTTP or STDIO modes) - When pipe detected: triggers
RpcClient.ConnectAsync(), sets mode toStdioClient - Handles disconnection: resets mode to
None, resumes watching - MEF exported service
Key Methods
public interface IStdioPipeWatcher : IDisposable
{
bool IsWatching { get; }
void Start();
void Stop();
event EventHandler<PipeDetectedEventArgs>? PipeDetected;
event EventHandler? Disconnected;
}Pipe Detection
Use File.Exists(@"\.\pipe\vsmcp-stdio") or equivalent to check pipe existence.
Acceptance Criteria
- StdioPipeWatcher class created with MEF export
- Background polling for pipe existence
- Start/Stop/Pause functionality
- Event raised when pipe detected
- Event raised on disconnection
- Only watches when mode is None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels