How dobychao/dsh-workspace-enhancement works
This is a DeepSeek Harness plugin for managing local and SSH workspaces together. The principal workflow starts with a user adding or selecting a machine and directory, then attaching that workspace to a session; the plugin routes subprocess and filesystem operations to the appropriate local or remote environment and returns results to the Harness. Other major capabilities include machine and host-key management, session context and side workspaces, connection status, remote file browsing, command approval, and a remote sandbox fence. Some implementation paths are unsampled, so those relationships are shown only where documented or evidenced by imports.
Main entry points: web-channel.ts Web channel · registry.ts Machine registry · flow.tsx Workspace picker · settings.tsx Machine settings
Components 25
Client experience
- Workspace picker
src/client/flow.tsx - Machine form
src/client/machine-form.tsx - Machine settings
src/client/settings.tsx - Remote file browser
src/client/remote-files.ts - Connection status UI
src/client/status.tsx - Sidebar status badges
src/client/row-badges.ts - Client icons
src/client/icons.tsx - Client UI helpers
src/client/ui.ts
Session workspaces
- Session workspace roots
src/session-workspaces.ts - Session remote context
src/session-remote-context.ts
Remote access
- Web channel
src/web-channel.ts - Web endpoints
src/web.ts - Machine registry
src/registry.ts - Host-key trust
src/hostkey.ts - SSH connection
src/connection.ts - Route resolution
src/transport.ts - SSH operations
src/ssh-core.ts - Remote subprocess
src/subprocess.ts - Remote filesystem
src/filesystem.ts
Execution safety
- Command approval gate
src/remote-approval-gate.ts - Sandbox policy
src/remote-sandbox.ts - Core sandbox fence
core/fence_tier.go
Other components
- Harness user
- DSH Harness
- Remote host
Connections 29
- Harness user → Workspace picker: selects workspace
README.md - Workspace picker → Machine form: creates connection
src/client/flow.tsx - Workspace picker → Web channel: uses channel
src/client/index.ts - Harness user → Machine settings: manages machines
README.md - Machine settings → Machine form: uses form
src/client/settings.tsx - Machine settings → Web channel: requests status
src/client/settings.tsx - Remote file browser → Web channel: uses channel
src/client/remote-files-panel.tsx - Sidebar status badges → Connection status UI: uses fallback
src/client/row-badges.ts - Sidebar status badges → Web channel: probes connections
src/client/index.ts - DSH Harness → Web channel: mounts plugin
- Web channel → Web endpoints: routes requests
- Web endpoints → Machine registry: manages connections
- Machine registry → Host-key trust: checks trust
src/registry.ts - Machine registry → SSH connection: resolves connections
src/registry.ts - Route resolution → Machine registry: resolves route
src/transport.ts - DSH Harness → Remote subprocess: runs commands
README.md - DSH Harness → Remote filesystem: uses filesystem
README.md - Remote subprocess → Route resolution: routes execution
- Remote filesystem → Route resolution: routes file access
- SSH connection → Remote host: connects by SSH
README.md - Remote subprocess → Remote host: runs commands
README.md - Remote filesystem → Remote host: accesses files
README.md - Harness user → Session workspace roots: attaches directories
README.md - Session workspace roots → Session remote context: provides workspace context
src/session-remote-context.ts - DSH Harness → Session remote context: receives session context
README.md - Machine registry → Command approval gate: configures optional gate
src/registry.ts - Command approval gate → Remote host: gates commands
README.md - Sandbox policy → Core sandbox fence: applies execution fence
- Core sandbox fence → Remote host: confines execution