DeepSeek Harness (DSH) provides a self-referential toolset (such as cordis_run) that allows an agent to write and hot-load plugins. However, dynamic packages exist only in process memory and disappear after restart. dsh-genie is a condensed version of this normal development workflow; it turns code validated at runtime by an agent into permanently installed plugins.
Core Features¶
dsh-genie provides a set of tools to manage these “wishes”:
genie_keep: Makes a dynamic package just validated by the agent permanent.genie_wish: Makes code written directly by the agent permanent, without requiring a prototyping step.genie_list: Lists all wishes on the machine and their runtime status.genie_revoke: Revokes a wish and unbinds it. Unless otherwise requested, the source code is preserved./wish: A human-oriented view showing granted wishes, active status, and code location.Mounts @deepseek-ai/dsh-tool-cordis: Mounts the self-modifying toolset provided by DeepSeek Harness.
Installation and Enablement¶
Install the plugin with the following command:
dsh plugin --profile web add github:swaylq/dsh-genie
After installation, restart dsh. The plugin itself does not depend on pnpm, network access, or build authorization, and granted wishes are only files.
Typical Usage¶
In an agent development workflow, you can proceed as follows:
- The agent writes a plugin and mounts/tests it through
cordis_run. - After confirming that the functionality works, issue the “keep it” instruction.
- Run
genie_keep dyn-1to convert the dynamic package into a formal wish, generatingdsh-wish-ship-it. - After restarting
dsh, the plugin will be loaded at every startup.
Configuration Conflict Handling¶
If your personal configuration already mounts @deepseek-ai/dsh-tool-cordis, installing dsh-genie may fail to load because of a tool name conflict. You need to disable the built-in line provided by dsh-genie in the configuration file:
- id: genie-tool-cordis
disabled: true
Configuration Options¶
Configure the genie entry in cordis.patch.yml:
allowUpdate(defaulttrue): Controls whethermode: "update"is allowed to overwrite an existing wish.
Working Principles and Notes¶
- Wishes as files: Each wish is a directory containing
package.json,cordis.patch.yml, andindex.js. After being granted, the code is not modified again and can be read, edited, or published like ordinary code. - Runtime domain: A preserved dynamic package changes its runtime domain. Code that originally ran in the
cordis_defineVM sandbox, where Node global objects are unavailable, will run in a normal Node environment after becoming permanent. If the code depends on sandbox Facades, adjustments may be needed. - Loading timing: The code is not executed in the session where it is written; it is loaded only on the next restart.
- Validation method: Before installation, the generated module is only subject to a parse check through
node --check; the code is not executed. - Layer order: Wish patch layers take effect in the order they are appended, and are located after
dsh-baseand other installed plugins. - Naming rules: A wish name must be a single validated path segment.
Trust Posture¶
Granted wishes are ordinary code with full access to the Harness context. dsh-genie does not execute code in the writing session and uses node --check for static validation. However, it does not sandbox or review the code. If the agent has sufficient permissions, its behavior is equivalent to directly writing files. It is recommended to inspect the wish source code before restarting and to make sure you trust the code.