Preface¶
DeepSeek Harness (DSH) adopts a “everything is a plugin” design philosophy. In agent development, you often need to fetch web page content. Running the browser directly on the Windows side may encounter environment isolation or permission issues. The dsh-wsl-playwright plugin solves this pain point by running headless Playwright inside WSL (Windows Subsystem for Linux), allowing URLs to be opened headlessly in a Linux environment and fetching their titles and content.
Plugin Purpose¶
This is a DSH plugin designed to provide Playwright browser capabilities in a WSL environment. It does not include browser binaries; instead, it relies on npx and node in the system. The author is 173787247, and it is licensed under MIT.
Installation and Enablement¶
Install it directly using the official command; no additional environment variables are required.
dsh plugin --profile web add github:173787247/dsh-wsl-playwright
If you are using the dsh-wsl-kit suite, you can bulk-link plugins with the following command:
bash dsh-wsl-kit/scripts/link-linux-plugins.sh
Core Tools and Usage¶
The plugin provides two main tool commands:
- pw_status: Checks whether
npxandnodeare installed in the current environment, ensuring Playwright can run. - pw_fetch: Opens the specified URL headlessly and fetches the page title and content.
Usage example:
# 抓取指定 URL
pw_fetch https://example.com
The fetching behavior can be controlled via the timeoutMs and maxChars configuration items.
Notes¶
- Version Dependency: Requires DSH version >= 0.1.2.
- Browser Download: On first run, the plugin may need to download the Playwright browser via
npx; please ensure a stable network connection. - Avoid Conflicts: In the same task, do not use
dsh-wsl-playwrightanddsh-wsl-browser(interactive browser) simultaneously to avoid dual-driver issues. - Compatibility: For specific compatibility information, refer to the documentation in the
dsh-wsl-kitrepository.
Summary¶
This plugin provides a lightweight solution for web page fetching in a Linux environment under DSH. For more details, refer to the GitHub repository: https://github.com/173787247/dsh-wsl-playwright