DeepSeek Harness Plugin

YOMXXX/dsh-session-brief

Stars ★ 0 Category Sessions & Messages Added 2026-12-01 npm dsh-session-brief

A zero-LLM session brief for DeepSeek Harness: a Session Pulse dashboard (turn, token, file and failure charts), goal, files, open items, a copyable handoff, and a private journal the next session in the same workspace can resume from. Optional better-sidebar tab.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-session-brief

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:YOMXXX/dsh-session-brief

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

English | 中文

A zero-LLM session brief for DeepSeek Harness: every session writes down its own goal, progress, files, failures, open items and tokens, so you can see where the work stands at a glance, copy a handoff into the next session, and let the next session start from a private journal.

Session brief
Goal: publish the plugin and fix the QA findings
6 turns · 47m · 18 files · 2 failures · 1.2M tokens
Open items
  ● M4 release checklist (in progress)
  ● `pnpm test` — AssertionError: expected 1 (needs review)
What happened
  #6  fix the journal race → done · 8m · 12 tools
  #5  audit the fold against the real log → 3 failures found · 21m · 19 tools
Files touched   src/brief.js ×4   src/journal.js ×2   client.js ×3

No model call, no embedding, no network request. The brief is folded from the committed session log, so it survives fork, replay and a page reload, and it costs nothing until you open it.

Where it lives

  • better-sidebar tab (recommended): with dsh-better-sidebar installed, the brief is a live sidebar page next to the file tree and the terminal.
  • Session header chip (fallback): without better-sidebar, a small chip appears in the session header; clicking it opens the full panel.

Both surfaces read the same sessionBrief projection.

The dashboard

Every surface renders the same brief as a compact dashboard:

Session Pulse dashboard: hero facts, four KPI tiles with micro-charts, a turn pulse chart, a token donut, a file ranking and a failure mix

See docs/DETAIL.md for the surfaces and the chart encodings.

  • Hero — title, goal, a live status dot and a fact strip (active time, average turn, tool calls, turns).
  • KPI tiles — turns with a tool sparkline, files with an edit sparkline, failures with a hard/soft split bar, tokens with a mini-donut.
  • Turn pulse — one bar per turn; height is tool calls, color is the outcome, red pips mark failed turns. Hover or focus a bar for the prompt, duration and failures.
  • Token mix — input, output, cache-read and cache-write arcs with values and percentages.
  • Top files — the most edited files with edit counts and op badges.
  • Failure mix — a hard/soft stacked bar for open failures, then the failure list (resolved history is not shown as open).
  • Timeline — newest first, outcome-colored, with duration and tool/failure counts.

Charts are hand-drawn with divs and SVG (no chart library, no build), use the DSH theme tokens, collapse to one column in the sidebar tab, and honor prefers-reduced-motion.

What it does

Piece Behaviour
Goal the first real user prompt of the session (system notices and injected context are ignored)
Turns start/end, duration, the first and latest prompt of each turn, tool count, failures
Files files written by the file tools (write, edit, apply_patch, str_replace_editor), with edit counts and moves/deletes
Failures isError, structured tool errors, shell [exit code: N] and meta.stopped; classified as soft (exploratory read/grep misses) or hard (tests, builds, writes); a later successful run of the same command marks the older failure resolved
Usage input / output / cached / cache-write tokens, with the reported total preserved
Open items pending todos, unresolved hard failures, a turn that ended in error/blocked/max-tokens, active plan mode
Handoff one click copies a Markdown brief with the goal, timeline, files, failures and a resume prompt
Journal a private file under ~/.dsh/session-brief/<workspace-key>/, written on completed turns
Resume a fresh session in the same workspace receives the previous journal as a visible context line (≤1200 chars, once per session, and can be turned off)

What it never does

  • No model calls. The brief is deterministic: the same log always folds to the same brief.
  • No network access and no external binary.
  • No session mutation. It never writes the session log and never adds a new event type.
  • No workspace writes by default. Journals go to your home directory; the in-repo mode is opt-in.
  • No secrets in the brief. Common key shapes, JSON key/value pairs, private-key blocks, JWTs, URL credentials and emails are masked before truncation; the journal is written with 0600.

Install

In DSH: Plugins → Add plugin → search dsh-session-brief → Install, then enable it.

From the CLI:

dsh plugin --profile <profile> add dsh-session-brief

The package is plain ESM: no build step, no install scripts, no external binary.

Use

  • Open the tab (better-sidebar) or click the header chip.
  • Copy handoff puts a Markdown brief on the clipboard; paste it into a new session to continue.
  • Type /brief in a session:
Command Result
/brief the numbers, the journal mode and the resume state
/brief markdown the full handoff printed in the conversation
/brief journal [private|workspace|off] switch where journals are written for this process
/brief resume on|off switch the automatic resume for this process
/brief on|off switch the whole plugin for this process

Runtime switches last until the process restarts; the patch config is the durable form.

Configuration

Patch the row in your profile's cordis.patch.yml:

- id: dsh-session-brief
  name: dsh-session-brief
  config:
    journalMode: private
    resume: true
Key Default Meaning
enabled true master switch; false disables journal, resume and the UI data
journalMode private private (~/.dsh/session-brief), workspace (.dsh/journal), off
journalMinTurns 3 sessions with fewer completed turns keep no journal
resume true inject the previous journal into a fresh session
resumeWithinDays 7 ignore older journals when resuming
resumeMinTurns 3 ignore journals with fewer turns
resumeMaxChars 1200 maximum size of the injected context
includeCommands true record shell commands in the journal/handoff
includeFiles true record file writes in the journal/handoff

To keep the journal inside the repository instead (shareable with the team), use journalMode: workspace. That mode also writes .dsh/.gitignore and skips paths that are not on the local host; read the privacy notes before enabling it.

How it is built

  • Host: a sessionBrief projection (sessionProjections) folds committed events; a turn/end listener writes the journal; an agent/created listener injects the resume context through createUserMessage + agent.inject with the session-brief source kind, so the Chat layer renders it as a visible context row. /brief is a host command.
  • Client: the better-sidebar tab when ctx.betterSidebar exists, otherwise a conversation.session.header.utilities chip and a shell.overlay panel. One projection view, no RPC, no polling. Charts are hand-drawn divs/SVG with theme tokens; no chart dependency.
  • Forked sessions skip the inherited prefix, exactly like the official action-card projection; subagent sessions never write a journal or receive a resume.

Known limitations

  • Shell edits are invisible. sed -i, > file, mv, git apply and anything a script or a subagent writes do not appear under Files touched; the panel says so explicitly.
  • Fork history is excluded. A fork's brief only covers the fork's own turns.
  • Remote workspaces keep a host-local journal. The private journal lives on the machine running DSH; workspace mode is skipped when the session directory is not local.
  • Resume is a hint, not a summary. It carries the previous goal, last outcome, open items and file paths; it never invents decisions the log does not record.
  • Projects that reject writes keep no journal. The panel still works.
  • The in-repo mode can be swept into a commit by git add -A; the plugin writes a warning and a .dsh/.gitignore, but review your repository before enabling it.

Development

npm test             # 98 unit tests
npm run pack:check   # confirm the tarball contents

Compatibility

  • DSH ^0.2.3-alpha.2; verified on DSH Desktop 0.2.3-alpha.2 (macOS).
  • Optional dsh-better-sidebar ^0.33.0 for the sidebar tab; the header chip and panel work without it.

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.