CoDev is a collaborative development bridge connecting VS Code directly to the CoDev Electron Desktop application over WebSockets (ws://127.0.0.1:5050).
🏗 Architecture Overview
The extension strictly acts as an activity observer and UI renderer. It contains no business logic.
VS Code Extension API
├── Core (EventBus, Logger, Configuration, Constants)
├── Managers (Workspace, Editor, Cursor, Typing, Selection, File, Save, Git, Terminal)
├── Communication (WebSocketClient, EventSender, EventReceiver, CommandDispatcher)
├── Providers (GhostCode, GhostCursor, GhostSelection, GhostFile, Decoration)
├── UI (StatusBar, Notifications, TreeView, WelcomeView)
└── Commands (Connect, Disconnect, ToggleGhost, AcceptGhost, RejectGhost, RefreshWorkspace)
│
WebSocket (ws://127.0.0.1:5050)
│
CoDev Electron Desktop App
🔒 Security & Safety Principles
- Local Files Are Never Modified Automatically: Ghost Code edits are strictly visual overlays rendered using VS Code text editor decorations. They are only applied to disk when the developer explicitly executes
CoDev: Accept Ghost Changes. - Localhost Only: Connects exclusively to
ws://127.0.0.1:5050. Remote code execution is strictly prohibited. - Sensitive File Filtering: Files matching
node_modules,.env,.git,build,dist, or private key patterns are automatically filtered out before sending telemetry to socket.
⚙ Key Extension Commands
CoDev: Connect to CoDev Desktop(codev.connect)CoDev: Disconnect(codev.disconnect)CoDev: Reconnect(codev.reconnect)CoDev: Toggle Ghost Mode(codev.toggleGhostMode)CoDev: Accept Ghost Changes(codev.acceptGhost)CoDev: Reject Ghost Changes(codev.rejectGhost)CoDev: Refresh Workspace(codev.refreshWorkspace)
🧪 Testing
Run the integration test suite:
cd codev-extension
node test/extension.test.js