When handling JSON, YAML, or SQLite data in the DeepSeek Harness (DSH) Web UI or development environment, parsing and querying can become cumbersome without the aid of external tools. By wrapping jq, yq, and sqlite3, this plugin provides a set of sandboxed command-line tools, allowing data filtering and querying to run safely within a restricted environment.
Plugin Overview¶
This is a tool plugin focused on data parsing. It does not provide new data sources but rather wraps common data querying tools within a DSH plugin. The core value lies in sandboxing and read-only restrictions, ensuring that data operations within the WSL environment are controlled and secure.
- Name:
dsh-wsl-struct - Maintainer: 173787247
- Category: admin-security
- One-line Description: Sandboxed jq / yq / read-only sqlite3.
- License: MIT
Installation¶
Install via the DSH plugin manager. This plugin requires dsh version ≥ 0.1.2.
dsh plugin --profile web add github:173787247/dsh-wsl-struct
If you need to use the batch linking feature, you can execute the following command (this step is optional):
bash dsh-wsl-kit/scripts/link-linux-plugins.sh
Core Features¶
The plugin provides four main command-line tools, corresponding to different data processing needs:
- struct_status: Checks if the CLI is in the PATH to confirm tool availability.
- struct_jq: Provides
jqfiltering functionality for processing JSON data. - struct_yq: Provides
yqquerying functionality for processing YAML data. - struct_sqlite: Provides read-only SQL query capabilities for
sqlite3.
Typical Usage¶
Depending on the data format and processing needs, you can use the corresponding commands:
- Filter JSON data: Use
struct_jqto filter and extract from JSON input. - Query YAML data: Use
struct_yqto query YAML structures. - Run read-only SQL: Use
struct_sqliteto execute SELECT statements, prohibiting destructive operations. - Check availability: Use
struct_statusto confirm that the relevant CLI tools are loaded correctly.
Notes¶
- Permission Restrictions:
struct_sqliteonly supports read-only operations and prohibits destructive SQL statements. - Default Root Directory: The default execution root directory for the tools includes
$HOME,~/.dsh, and/tmp. - Compatibility: Please ensure the DSH version meets the requirement of ≥ 0.1.2.
- Ecosystem Relationship: This plugin is related to the dsh-wsl-kit ecosystem; the Kit batch linking is an optional configuration.
Summary¶
dsh-wsl-struct provides a set of lightweight data parsing capabilities for the DSH plugin system. Through sandboxing and read-only restrictions, it solves the need for data querying within the environment without adding system complexity. For more details and source code, please refer to the project directory page or the GitHub repository.