Introduction¶
In the plugin ecosystem of DeepSeek Harness (DSH), converting naming conventions across different programming languages is a common requirement. The dsh-case plugin addresses this need by registering the case_convert tool, enabling quick conversion between multiple naming styles.
Plugin Positioning¶
The plugin is maintained by ZhijiangTang, written as a pure ESM module, with zero dependencies and no build step required. It aims to provide DSH agents with lightweight text formatting capabilities.
Installation and Enablement¶
Use the official installation command to add the plugin to a specified profile configuration:
dsh plugin --profile <name> add dsh-case
Core Features¶
The core tool provided by the plugin is case_convert. Its main parameters include:
text(string, required): The text content to be converted.target(string, required): The target naming style.source(string, optional): The source naming style. Defaults toauto, automatically detected by the plugin.
Typical Usage¶
The tool supports conversions between several common naming styles. Using hello_world as input, the supported target values and corresponding outputs are as follows:
| target parameter | output |
|---|---|
camelCase |
helloWorld |
PascalCase |
HelloWorld |
snake_case |
hello_world |
kebab-case |
hello-world |
CONSTANT_CASE |
HELLO_WORLD |
UPPER |
HELLO WORLD |
lower |
hello world |
Title Case |
Hello World |
Tokenization Rules¶
The plugin tokenizes input text using the following logic:
- Separator splitting: Split by
-,_, whitespace, and.. - Case boundaries: Within separator-free segments, split at case boundaries:
- Lowercase to uppercase (
helloWorld→hello/World) - Consecutive uppercase letters followed by a lowercase letter (
HTTPApi→HTTP/Api) - A number followed by
uppercase + lowercase(my2Factor→my2/Factor)
- Lowercase to uppercase (
- Number adherence: Numbers adhere to adjacent words and are not treated as standalone tokens (for example,
version2remainsversion2). A leading2FAis not split. - Empty value handling: Empty input or input consisting only of symbols is returned unchanged, and the
wordsfield is an empty array.
Return Value¶
The tool returns a standardized JSON object containing the input, target, source style, output, and the list of tokenized words:
{ "input": "...", "target": "camelCase", "source": "snake_case", "output": "...", "words": [...] }
Notes¶
The plugin runs with the permissions of the current DSH process. Before installing, check its source code and license (MIT). The plugin depends on the following peerDependencies: @deepseek-ai/cordis ^4.0.1, @deepseek-ai/dsh-tools ^0.1.0-rc.6, and @deepseek-ai/dsh-llm ^0.1.0-rc.6.
Conclusion¶
dsh-case provides a concise, zero-dependency naming conversion solution. For more details, see the GitHub repository: https://github.com/ZhijiangTang/dsh-case