DeepSeek Harness Real-Time Runtime Panel Plugin

Preface

When developing agents in DeepSeek Harness (DSH), you often need to track multiple things at once: the files the model is reading or writing, the modifications it makes, and the output of command execution. The existing workflow typically involves toggling between contexts, manually scrolling through session logs, or waiting for a command to finish before checking the tool card—each approach either fragments the experience or introduces latency.

DSH’s philosophy is “everything is a plugin.” This plugin provides a sidebar tab that lets you see the current file, write operations, and command output simultaneously in a single view. It does not rely on additional routing or RPC; it fetches data directly from session snapshots and the client-side jobs service.

Plugin Overview

  • Name: dsh-live-run
  • Maintainer: Prcjimmy1015
  • Category: Client
  • Core Value: Provides a “Live Run” panel in the DSH sidebar. Zero build required; registered via better-sidebar’s registerTab.

Installation & Activation

This plugin depends on dsh-better-sidebar (version >=0.12.0). Without it, nothing is rendered, and DSH startup is unaffected.

# Install from GitHub source (works in most network environments)
dsh plugin --profile web add github:Prcjimmy1015/dsh-live-run

# If github: fails (e.g., codeload blocked by a proxy), use the prebuilt tarball instead
dsh plugin --profile web add "https://github.com/Prcjimmy1015/dsh-live-run/releases/download/v0.1.0/dsh-live-run-0.1.0.tgz"

After installation, refresh the page, click + in the right sidebar, then select “Live Run”.

Fill in --profile with the profile you actually use (web / desktop, etc.).

Core Capabilities

1. Current File

Displays the file the model is currently reading, writing, or modifying, with line numbers in the content. Edit operations show line-level diffs: red for deletions, green for additions.

2. Write Operations

Lists every read / write / edit operation with its timestamp, type, path, and line count change. Click a row to pin it and inspect the historical file content; click “Follow Latest” to restore the live view.

3. Command Output

Shows running pwsh/bash tasks with stdout/stderr streaming in real time. When multiple command tasks are active, use the small buttons on the right side of the title bar to switch between them.

Long Command Handling

The title bar displays only a one-line summary; the panel contains the full command block. By default, the command is collapsed to a single line (hover to see the full text). Click “Expand” for auto-wrapping with scrolling; click “Collapse” to fold it back. The adjacent “Copy” button copies the entire command. The title bar itself is non-collapsible and will not be squeezed into a vertical layout by long commands.

State Memory

Expand/collapse state is remembered per “session + command,” not as a global toggle. Closing and reopening the panel, switching to another session and coming back, or refreshing the page (within the same tab) all preserve your last selection. New commands are collapsed by default.

Settings

In DSH Settings → Sidebar Cards → Live Run, there are two toggles:

  • Remember Expand/Collapse State (default: on): Remembered per session + command; survives remounts and page refreshes. When toggled off, the current command block is immediately collapsed and all stored records for that session are cleared (re-enabling the toggle will not restore the old state).
  • Copy as a Single Pasteable Line (default: off): When enabled, commands are folded into a single line when safe; otherwise they are copied as-is with an explanation of why.

Folding rules: Statements are joined with ;. Continuation characters (| , { ( [ & = + - * / %, etc.) and line continuations via trailing backticks are joined with a space. Folding is refused for here-strings/heredocs, comments, and multi-line strings—joining these three types either produces errors or silently changes semantics (multi-line strings would have ; injected into the string content). The PowerShell rules have been verified with the local native parser; the bash branch uses a conservative implementation.

Capability Boundaries

  • Foreground commands also appear in the panel: every invocation of dsh-tool-pwsh (including foreground calls) first registers in the jobs registry before waiting for the result. The panel can show output streaming as the command runs, whereas the tool card in the conversation only displays results after completion—not so here.
  • After a foreground command finishes, its job record is removed from the registry via remove() (a cleanup convention for foreground callers). The panel therefore retains “the last observed output before termination” and automatically falls back to the shell invocation results stored in the session log (labeled “Session Log”) when no active job exists. Three-tier data source: live job → last observed output → session history.
  • “Write Operations” is at the op granularity (one entry per read/write/edit operation), not a character-by-character input stream. The operation currently executing shows …; after completion, the content and line count are filled in.
  • The ring buffer has a limit: when output is too long, the earliest portions are discarded, and the panel displays “Output Discarded.”
  • The panel depends on better-sidebar for the tab slot. If better-sidebar is not installed, nothing is rendered (no errors, no impact on DSH startup).
  • Expand state is stored in two layers: module memory (page lifetime) + sessionStorage (keyed by session id, survives page refresh). Closing the entire tab clears the sessionStorage copy; the in-memory copy also does not persist across pages. Commands collapsed by default do not consume storage; at most 200 entries are stored per session.
  • If the current deployment lacks the jobs client service, the command area does not pretend to have a live stream but directly uses shell results from the session log. An explicit notice is shown when no shell invocations exist at all.

Repository Layout

package.json                 dsh.client(platform:web) + dsh.bundle(patch)
cordis.patch.yml             A single insert layer
lib/index.js                 Host half: plugin identity only (no routes, no services)
lib/client.js                Browser half: data hooks + tab registration + UI (hand-written CJS factory bundle, no build)
locale/zh.json               Plugin marketplace display strings
tools/smoke.mjs              37 offline tests (custom mini React runtime, exercises real data paths)
tools/verify-install.mjs     Verifies that the profile resolves to these exact bytes and only requests react
tools/feasibility-one-line.mjs  Feasibility experiment for one-line folding rules (scored by PowerShell parser)
LICENSE                      MIT

As a Plugin Index Source

This repository ships with a format-1 plugin index. In DSH 0.2.1+, open Plugins → Experimental Plugins → Custom Plugin Index and add the index URL to discover and install it from the “Discover” section:

https://cdn.jsdelivr.net/gh/Prcjimmy1015/dsh-live-run@main/index.json

(Discover enforces a 15-second timeout per index source, hence the use of jsDelivr instead of raw.githubusercontent.)

Verification

node tools/smoke.mjs          # 37 tests, all must pass
node tools/verify-install.mjs # Requires installation into a profile; use DSH_LIVE_RUN_PROFILE to specify an alternate profile absolute path

Use Cases & Caveats

Ideal for agent developers who need to track file modifications and command output simultaneously. This plugin runs with the privileges of the current DSH process—review the source code and license before installing.

Closing

This plugin fetches data directly from session snapshots and the jobs service, requiring no additional build steps. If you’re developing agents in DSH that need real-time feedback, give this panel a try.

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

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

Xiaoye