@cyrus/dsh-plugins: DSH Plugin Collection and Sessions Insight

Preface

When running long sessions in Claude Code, DSH, or Codex, the context window is often filled up with tool schemas, historical turns, and compression points all together, yet the logs rarely let you see “what the model actually consumed this turn” at a glance. DeepSeek Harness (DSH) splits capabilities into installable plugins; the community directory SkillHub has no official affiliation with DeepSeek / 幻方, so plugins must be evaluated on their source code and licenses by users themselves.

The following introduces the npm collection @cyrus/dsh-plugins published by the repository Mt-Youya/dsh-plugins (also called Cyrus Plugins in the README): a single installation can register all plugins in the collection, and you may also install only individual sub-packages.

What Is This

@cyrus/dsh-plugins is a plugin collection for DSH, maintained by Mt-Youya, currently at version v0.0.3 (consistent between the SkillHub directory and package.json), licensed under MIT.

The collection registers sub-plugins via cordis.patch.yml; as of the current repository, it mainly contains Sessions Insight (npm: @cyrus/dsh-sessions-insight): it provides a read-only “session insights” sidebar in the DSH Web GUI, parses local session logs from Claude Code, DSH, and Codex, and shows per-turn what is fed into the model (system prompt, tool definitions, memory & instructions, history, tool results, images, etc.), and labels whether usage numbers are exact values from the logs or character-based estimates.

Core Features

Collection vs. Single Package

Installation method npm package Description
Collection (recommended) @cyrus/dsh-plugins Installs all plugins listed in the README table in one go; when the collection adds new plugins later, upgrading the collection brings them in
Single plugin @cyrus/dsh-sessions-insight Only Sessions Insight

Both insert the same loader id (sessions-insight) into the loading tree. If both the collection and the single package exist in dsh.profile.bundles, DSH will fail to start with duplicate loader entry id; you must remove one via dsh plugin --profile <name> remove.

Questions Sessions Insight Can Answer

According to the sub-plugin README, the panel is organized around workdir → session → turn and merges display across three data sources (source is merely labeled):

  • Within a 392K window of a given turn, how much is taken up by tool schemas and how much by history;
  • When the window jumps after a turn, where is the compression point and how do the sizes before and after compare;
  • Whether numbers shown in the UI are log usage or estimates (marked exact / estimate);
  • How many sessions and turns exist across the three sources under a working directory, and when they were last active.

Interaction highlights: the project tree is grouped by workdir; the session header shows statistics such as context proportions, peak, turns, and cost; the turns list supports paginated loading; ⌘K / Ctrl+K opens full-library search and jumps to the corresponding turn. It also supports summary handoff: via the official session.create / session.prompt, it sends a generated brief into a new DSH session without hand-writing session events or altering the source session.

Data root directories (can be overridden via environment variables):

Source Default root Environment variable
Claude Code ~/.claude/projects DSH_CONTEXT_INSIGHT_CLAUDE_ROOT
DSH ~/.dsh/sessions DSH_CONTEXT_INSIGHT_DSH_ROOT
Codex ~/.codex/sessions DSH_CONTEXT_INSIGHT_CODEX_ROOT

End-to-end read-only: it does not write source data, does not build indexes, and does not persist cache to disk (only an in-process LRU). If a path is unreadable, the top bar marks that source as unavailable without affecting other sources.

Installation and Activation

Environment requirements: DSH 0.2.1-rc.2 or newer (aligned with the running app.asar behavior; see the repository docs/adr/0002-asar-021-is-the-contract.md).

Choose the right profile first: installing into the wrong profile will not error, but the plugin will not appear.

Startup method profile --profile in the install command
Desktop DeepSeek Harness.app desktop desktop
Command line dsh web web web

Install the collection (recommended):

dsh plugin --profile desktop add @cyrus/dsh-plugins

For the command-line web scenario, replace desktop with web.

Install only Sessions Insight:

dsh plugin --profile desktop add @cyrus/dsh-sessions-insight

After installation, fully quit and reopen DSH. The plugin manager showing “Cyrus Plugins” or “Sessions Insight” indicates successful loading; the “Sessions Insight” entry in the Web sidebar indicates the panel is mounted.

Do not install directly via Git URL using pnpm add https://github.com/...: the root package depends on workspace:^, which is only resolved to a version number when published to npm.

dsh plugin ... add usually writes the package name into ~/.dsh/profiles/<profile>/package.json under dsh.profile.bundles. If it does not, you must manually add it (order matters, later layers override earlier ones), for example:

{
  "dsh": {
    "profile": {
      "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "@cyrus/dsh-sessions-insight"]
    }
  }
}

The loader assembles at startup; after changing bundles you must restart; merely rebuilding the client cannot substitute for a restart.

Typical Usage

  1. Install into the profile matching your startup method as described above, then restart DSH.
  2. Open Sessions Insight in the Web GUI, browse sessions by workdir on the left, select a turn in the middle column after opening a session, and view that turn’s context composition, compression, tool calls, and sub-agent sessions on the right.
  3. For cross-session retrieval, use Ctrl+K (⌘K on macOS) to open the search panel; after a hit, jump to the corresponding turn.
  4. Optional: after starting dsh web, perform a host health check with a same-origin request (no Origin is considered same-origin):
curl -sS http://127.0.0.1:<port>/api/dsh-sessions-insight/health

The expected JSON looks like {"ok":true,"value":{"version":"<version>","sources":["claude","dsh","codex"]}} (value.version is the plugin version injected at build time).

Developers can run pnpm dev in the repository root; the local preview harness listens on http://localhost:5178 and reads real local sessions (you can add ?theme=light or ?theme=dark). When linking the workspace into the desktop plugin manager, you must first run npx tsdown in the checkout root to generate lib/ before restarting DSH.

Use Cases and Notes

Who it’s for: DSH / agent developers who need to audit or debug multi-source coding sessions, verify context inflation and compression, and distinguish exact tokens from estimates; anyone who wants a read-only panel to view Claude Code, DSH, and Codex local logs together.

Permissions and security: The plugin runs under the permissions of the current DSH process and will stat and read the three default roots above (and any paths you configure via environment variables). Please read the GitHub source code and the MIT license before installation; handoff is the only write path and only calls official session APIs.

Known limitations (excerpted from the sub-plugin documentation):

  • Full-library search has a budget of about 2.5 s; very large corpora may return truncated: true;
  • When some Claude sessions lack prompt_snapshot, the composition will include an explicit “unknown” slice;
  • Codex encrypted reasoning cannot be parsed; block-level values are estimates and totals should follow the logs and are not suitable for direct billing reconciliation;
  • Cost display relies on multiple price tables and does not sum across currencies.

Closing

@cyrus/dsh-plugins turns DSH into an “installable plugin collection” form: its current core value is the bundled Sessions Insight—a read-only view of what is truly fed into the model each turn and its usage structure across three session sources. To track versions or submit issues, see the SkillHub directory page and the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye