Preface

In DeepSeek Harness (DSH), runtime inspection and dynamic plugin capabilities for creation mode (agent-presets) are provided by the official presets. However, the official implementation relies on a process-level singleton registry cordisInspect, which makes the preset impossible to copy and reuse—copied presets cannot be mounted because they trigger a “provider already registered” error. This plugin refactors these capabilities into a normal host-layer tool set and does not register providers with cordisInspect, allowing creation-mode presets to be copied and reused in any session.

Core Features

This plugin provides the following tools:

Tool Purpose
cordis_inspect_list Lists inspection surfaces: four host providers (Service / Event / Builtin / Tool), plus client providers mirrored from browser pages
cordis_inspect_query Read-only query. Host queries run locally; client queries are forwarded to connected pages and return when the page responds
cordis_inspect_self Inspect the current session’s dynamic plugins, package versions, runtime diagnostics, and source code
cordis_define Record an immutable Package (host side / client side). It only records source code; it does not execute code or change the running version
cordis_run Activate a Package: use run for first execution, use update to switch versions, and use run to roll back
cordis_stop Stop the current run while preserving its definition, version, and authorization; it can be run again directly afterwards
cordis_undefine Permanently delete the plugin and all its versions

Installation and Enablement

Run the following command in the DSH profile directory (default ~/.dsh/profiles/web):

pnpm add 'github:leolee9086/dsh-tool-cordis-local#v0.1.0'

After installation, mount it via a patch layer or as a bundle (choose one):

Option 1: Add one line to the profile patch layer

Insert the following in ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: tool-cordis-local
      name: dsh-tool-cordis-local

Option 2: Mount it as a bundle

Add "dsh-tool-cordis-local" to dsh.profile.bundles in ~/.dsh/profiles/web/package.json.

Security and Boundaries

The core value of this plugin is that it allows the model to define and run arbitrary JavaScript (the host side executes inside the Harness process), so it must be treated with caution:

  1. Permission risk: Treat any session where it is mounted as having shell-level access. Do not expose it in untrusted sessions.
  2. Code execution: cordis_define and cordis_run are the only entries that can actually execute code; execution happens inside the Harness process, without a sandbox.
  3. Session requirement: All tools require exec.agent; calls outside a session will produce a clear error.
  4. Lifecycle: Dynamic plugins are process-local temporary artifacts; after the process restarts, their definitions disappear (consistent with the official runner behavior).
  5. Read-only vs. execution: cordis_inspect_query is read-only and cannot call business service methods or modify the runtime; cordis_define only records source code and does not execute it.

Summary

dsh-tool-cordis-local solves the problem that DSH creation-mode presets cannot be copied. By avoiding registration of process-level providers, it encapsulates runtime inspection and dynamic plugin lifecycle into host-layer tools. Before installing, please read the source code carefully and verify security.

  • GitHub repository: https://github.com/leolee9086/dsh-tool-cordis-local
  • Community catalog: https://www.skillhub.cn/plugins/leolee9086/dsh-tool-cordis-local