Preface¶
The core philosophy of DeepSeek Harness (dsh) is “Everything is a plugin”: Models, tools, sessions, sandboxes, schedulers, and even the UI can be combined or replaced on the Cordis kernel without modifying the Harness source code. The official repository deepseek-ai/deepseek-harness clearly explains this concept.
The ability of plugins to add capabilities does not equate to their ability to modify others’ capabilities. If a community plugin wants to rewrite the parameters or return values of a function in another plugin without forking or modifying the source code, the official plugin mechanism usually cannot reach this level. In the Minecraft ecosystem, Fabric uses Mixin to rewrite game code during the loading phase, leaving the original JAR untouched. The community plugin fabric does the same thing, just targeting DSH / Cordis plugins instead of game mods.
This article covers the fabric plugin in the community registry, not an official DeepSeek application. The registry site deepseek-harness-plugin.com is an independent listing site and has no official affiliation with DeepSeek / Horizon Robotics.
What is fabric?¶
fabric is a tool and capability type DSH plugin maintained by the GitHub organization omdsh-dev, with the repository address omdsh-dev/fabric. The one-sentence description on the registry page is: “A MC Fabric-like hook processor.”
The repository README provides a more complete definition: it is a set of Fabric / Mixin extension layers for DSH, structured to align with the upstream Fabric’s three-package split, plus an installable profile bundle carrier. The root package name is cordis-fabric-bundle, current version 0.0.3, primarily written in TypeScript. The GitHub topics are tagged dsh and dsh-plugin. It was listed on the registry on 2026-08-09, with 9 stars at that time; as of 2026-08-17, the GitHub repository has 14 stars.
The problem it solves can be summarized in one sentence: allowing trusted plugins to perform code transformations on target modules during the loading phase, so that hooks can be attached without modifying the source code of the target plugin. It is not a tool for models, nor does it add buttons to the chat window; the underlying transformation itself does not produce any content visible to the model.
Core Features¶
There are only three full packages in the repository. Changes outside of these three packages (such as behavior fixes for the official @deepseek-ai/dsh-tool-cordis) are placed in patches/ as pnpm dependency patches, and no fourth package is created.
cordis-fabric: Pure Cordis loading-time transformation service. ProvidesFabricService,bootstrapFabric, Orchestrion transformations, Node loader hooks, bridge, browser transforms, and testkit. This package does not import any DSH modules. Trusted plugins register patches viactx.fabric.register(), and can perform four operations on target functions:
-before: Rewrite parameters before the original function body executes
-after: Observe or replace successful results (including after asynchronous settlement)
-around: Decide whether to execute the original function body, and can delegate viainvoke()
-replace: Take over the call entirely; the original function body will only run if the handler callsinvoke()
The mechanism is loading-time code transformation: the transform hook rewrites the target function body to send call records to the in-process bridge, and the runtime distributes them to the currently registered handlers. When there are no active handlers, the transformed code delegates directly to the original function body.
-
cordis-fabric-api: Collaborative compatibility facade. Only peer-depends on Cordis andcordis-fabric, providingFabricCompatServiceandbuildCompatInstrumentations. The documentation compares it to the Minecraft Fabric API layer: above the loader and Mixin, it provides mods with a relatively stable registration entry point. The bundle will not automatically add this import; mods need to manuallyimport FabricCompatService from 'cordis-fabric-api'. -
cordis-fabric-dsh: DSH integration package. Exposesctx.fabricAgent,ctx.fabricTools,ctx.fabricPrompt,ctx.fabricCommands, andctx.fabricClienton the browser side, plus package invariants and profile bootstrapping (installFabricBootstrap). These facades delegate prompt, tool, command, agent event, and browser command/slot registrations to the official DSH services, do not store a separate copy of domain state, and cannot bypass permission, approval, timeout, logging, or cancellation semantics.
The two default lines inserted by the bundle into the profile are both opt-in disabled:
- id: cordis-fabric
name: 'cordis-fabric'
disabled: true
- id: cordis-fabric-dsh
name: 'cordis-fabric-dsh'
disabled: true
Installing the bundle does not mean the Fabric layer is active. You need to enable these two lines in the profile combination, and use the fabric-dsh launcher provided by the repository to inject loader hooks. Running the official dsh directly will only execute the official code and will not activate the Fabric hooks.
The trust model is clearly defined: patch handlers are trusted code bound via ctx.fabric.register(); executable handlers will not be deserialized from YAML or model input. Temporary cordis_mount plugins and repository plugins may not use Fabric capabilities until explicit authorization is granted.
Installation and Activation¶
The installation command given on the community registry page is as follows, run it in the DeepSeek Harness terminal:
dsh plugin add github:omdsh-dev/fabric
The registry page also notes that for reproducible installations, you can pin the commit hash:
dsh plugin add github:omdsh-dev/fabric#<commit>
Replace <commit> with the actual commit hash from the repository. Do not use a random hash.
The current English README of the repository recommends the official bundle plugin channel + pre-built Release artifacts (there is indeed a pkg.tgz in the GitHub Release v0.0.3):
dsh plugin add https://github.com/omdsh-dev/fabric/releases/latest/download/pkg.tgz
After installation, restart the web application, then enable cordis-fabric / cordis-fabric-dsh in the profile combination.
There are inconsistent sources that need to be handled using primary sources, do not mix outdated commands:
- The registry page uses github:omdsh-dev/fabric
- The English README uses the pkg.tgz address above
- The Chinese README still uses dsh plugin --profile web add github:dsh-external/fabric
- The root package.json has three runtime dependencies pointing to github:dsh-external/fabric#main&path:/packages/...
Verify the installation command by cross-checking the registry page and the current English README of the repository; confirm whether the Chinese README and the dsh-external/fabric path are still available based on the repository’s state at the time, do not assume they have been merged into a single installation entry.
For the Fabric layer to actually attach hooks, load-time transformations must complete before any target modules are imported. The bundle includes the fabric-dsh launcher to handle this, leaving the host source code unchanged (patches/README.md notes that host patches are currently empty). After the profile is installed, you can run the bin in the profile directly:
# For a vanilla official deepseek-harness checkout
$DSH_HOME/profiles/web/node_modules/.bin/fabric-dsh \
--harness <deepseek-harness-checkout> web --port 8000
$DSH_HOME and the profile name are derived from the installation path. The development mode is also available:
node /scripts/fabric-dsh.mjs --harness <deepseek-harness-checkout> --profile web
If you are preparing for the first time from this repository, the entry point given in the README is:
pnpm run install:host -- <deepseek-harness-checkout> --dsh-home "$HOME/.dsh_dev"
This script will install host dependencies, build and seed the profile, install the bundle via the official plugin channel, and enable the cordis-fabric-dsh line. The example in patches/README.md writes --dsh-home as $HOME/.dsh_dev, which is the path in the documentation and not a required directory.
To confirm whether Fabric was started properly, check the stderr: the fabric-dsh: tag will be printed when the hooks are installed, followed by a hook summary listing each patch and its target file.
Typical Usage¶
The two examples below are from the repository documentation, not fictional scenarios.
1. Register a before patch with a trusted plugin
Documentation example: In the target package @example/target-package’s lib/index.js, intercept the synchronous function greet and capitalize the first argument. The plugin needs to declare inject = ['fabric']:
import type { Context } from 'cordis'
import type { FabricCall, FabricService } from 'cordis-fabric'
export const inject = ['fabric']
export function apply(ctx: Context & { fabric: FabricService }): void {
ctx.fabric.register({
id: 'my-vendor/rewrite-greeting',
target: {
module: '@example/target-package',
versionRange: '^1.0.0',
filePath: 'lib/index.js',
functionQuery: { functionName: 'greet', kind: 'Sync' },
},
operation: 'before',
handler(call: FabricCall) {
call.arguments[0] = String(call.arguments[0]).toUpperCase()
},
})
}
Static descriptors can be placed under config.fabric.patches in the user overlay (such as $DSH_HOME/config.yaml or the --config file), but only the id / target / operation fields are allowed here. The handler cannot be written in YAML and must be bound by the plugin at runtime via ctx.fabric.
2. Use the collaboration layer instead of directly interacting with Mixin
The documentation recommends that mods only declare the services they consume. The following example listens to agent status and adds a section to the system prompt:
import type { Context } from 'cordis'
import type { FabricAgentService, FabricPromptService } from 'cordis-fabric-dsh'
export const name = 'my-mod'
export const inject = ['fabricAgent', 'fabricPrompt']
export function apply(
ctx: Context & {
fabricAgent: FabricAgentService
fabricPrompt: FabricPromptService
},
): void {
ctx.fabricAgent.onStatus((agent, status) => {
ctx.logger.info('agent %s is %s', agent.id, status)
})
ctx.fabricPrompt.section({
name: 'my-mod-identity',
order: -80,
text: 'my-mod is active',
})
}
Mounting the Host bundle itself is straightforward:
import * as fabricDsh from 'cordis-fabric-dsh'
import type { Context } from 'cordis'
declare const ctx: Context
await ctx.plugin(fabricDsh)
The corresponding profile overlay is to enable the cordis-fabric-dsh line:
- id: cordis-fabric-dsh
disabled: false
The collaboration layer’s public surface does not export AST selectors, module file paths, or raw bridge handles. The low-level ctx.fabric patch is still an escape hatch for the Mixin subsystem, not part of the collaboration layer’s contract.
Applicable Scenarios and Notes¶
Who this is for: Plugin authors who are already using the source code version of DeepSeek Harness and need to attach loading-time hooks to other plugins. If you just want to add a calculator, search, or notification tool to the agent, a regular DSH plugin is sufficient, and there is no need to use Fabric.
Before using it, review these boundaries, all from the repository README and documentation, not speculative:
-
Launcher restrictions. The officially packaged
dshCLI installed via npm cannot runfabric-dsh: the CLI is a pre-built artifact with no preloadable source code entry. Source code checkouts need to use thefabric-dshlauncher. The README notes that after the official repository merges the wiring code, this type of host will work (the split commit65bcaf9902already includes the wiring, but confirm whether it has been merged upstream based on the official repository’s state at the time). -
Runtime requirements. The root
package.jsondeclaresnodeas^22.19.0 || >=24.0.0, and the package manager ispnpm@11.7.0. Node loading-time transformations require pre-compiled JavaScript; handing raw.tsfiles to Node load hooks will fail. The browser path will strip TypeScript before the application handler runs. -
Git dependencies and SSH. The English README still notes that pnpm resolves GitHub dependencies via SSH, so the installation machine needs GitHub SSH access to
dsh-external/fabric. If you use thepkg.tgzmethod, also verify that the dependencies in the unpacked tarball still point to this repository. -
Permissions and security. The same rule applies as listed on the registry page and skill requirements: the plugin runs with the permissions of the current dsh process, and code may be executed during installation. Please review the source code repository and license before installing. The transformed code has process-level permissions within the target module. Target validation failures will throw an error during registration; if the format is correct but no matching files are found, the module will remain untransformed (silently). A patch marked
required: truewill fail loudly after startup if it has never modified anything. -
License. The root
package.jsondeclaresBSD-3-Clause. Thelicensefield in the GitHub repository metadata is empty, and there is no separateLICENSEfile in the root directory. Refer to the repository’s declared license at the time, and verify it yourself before installation. -
Do not treat it as model-writable configuration. The low-level transformer does not produce content visible to the model; handlers cannot be deserialized from model input. Whether the tools / prompts / commands registered via the collaboration layer are visible to the model depends entirely on the official DSH services they delegate to.
Summary¶
fabric brings the Minecraft Fabric concept of “loading-time hooks, no modification of original code” to DeepSeek Harness: three-package split, disabled by default, handlers only run via trusted code. It is targeted at host developers who need to modify the behavior of other plugins, not daily chat enhancement. Installing via the registry command is just the first step; for it to take effect, you also need to enable the profile lines and start with fabric-dsh instead of the regular dsh.
Registry page: https://deepseek-harness-plugin.com/zh-CN/plugins/fabric/
GitHub: https://github.com/omdsh-dev/fabric