In a WSL (Windows Subsystem for Linux) environment, agents and human developers often confuse Linux paths (such as /mnt/c/Users/...) with Windows paths (such as C:\Users\...), or need to generate UNC paths in the \\wsl$\... format for access by Windows applications. To address the problems caused by mixing these path formats, this article introduces the dsh-wsl-path plugin.

Plugin Positioning

dsh-wsl-path is a plugin in the DeepSeek Harness (DSH) ecosystem and belongs to the dsh-wsl-kit toolkit. It provides the path_convert tool, which is designed to convert between Linux and Windows path formats and explain the relevant technical trade-offs.

Core Features

This plugin mainly handles the following path-related issues:

  • Path Conversion: Supports converting Linux-format paths (such as /home/user, /mnt/c/Windows) to Windows-format paths (such as C:\, \\wsl$\), and vice versa.
  • Tag Handling: Specifically handles WSL mount-point-related /mnt tags.
  • Technical Notes: Explains the differences between Windows drvfs mounts and native Linux file systems in file attributes (such as CRLF line endings), permissions, and Git configuration.

Installation and Enablement

Before installing this plugin, ensure that your environment meets the following dependency requirements:

  • DSH version >= 0.1.2
  • Node.js version >= 18

Run the following command in the terminal to install the plugin:

dsh plugin --profile web add github:173787247/dsh-wsl-path

After installation, the plugin will start with the DSH process.

Typical Usage

The path_convert tool accepts the following parameters:

  • path (required): An absolute path, which can be in Linux format or Windows format.
  • direction (optional): The conversion direction. Defaults to auto (automatically detects the source path format and converts it), or can be set to toWindows or toLinux.

According to the documentation examples, the following can be used in a test environment:

npm test

Applicable Scenarios and Notes

  • Toolkit Dependency: This plugin is maintained as part of dsh-wsl-kit. It is recommended to check the compatibility notes for the toolkit.
  • Runtime Permissions: The plugin runs with the permissions of the current DSH process. Check the source code and license before use.
  • MIT License: The plugin is open source under the MIT License and can be freely used and modified.

Summary

dsh-wsl-path addresses the path format consistency problem in WSL environments. By providing the path_convert tool, it helps developers avoid mistakes when manually converting between Linux and Windows path notations, and provides necessary explanations about file system differences.