メインコンテンツへスキップ
Y

dsh-session-brief

yomxxx/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.

インストール

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

README

dsh-session-brief

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.

What it does

PieceBehaviour
Goalthe first real user prompt of the session (system notices and injected context are ignored)
Turnsstart/end, duration, the first and latest prompt of each turn, tool count, failures
Filesfiles written by the file tools (write, edit, apply_patch, str_replace_editor), with edit counts and moves/deletes
FailuresisError, 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
Usageinput / output / cached / cache-write tokens, with the reported total preserved
Open itemspending todos, unresolved hard failures, a turn that ended in error/blocked/max-tokens, active plan mode
Handoffone click copies a Markdown brief with the goal, timeline, files, failures and a resume prompt
Journala private file under ~/.dsh/session-brief/<workspace-key>/, written on completed turns
Resumea 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:
CommandResult
/briefthe numbers, the journal mode and the resume state
/brief markdownthe full handoff printed in the conversation
/brief journal [private|workspace|off]switch where journals are written for this process
/brief resume on|offswitch the automatic resume for this process
/brief on|offswitch 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
KeyDefaultMeaning
enabledtruemaster switch; false disables journal, resume and the UI data
journalModeprivateprivate (~/.dsh/session-brief), workspace (.dsh/journal), off
journalMinTurns3sessions with fewer completed turns keep no journal
resumetrueinject the previous journal into a fresh session
resumeWithinDays7ignore older journals when resuming
resumeMinTurns3ignore journals with fewer turns
resumeMaxChars1200maximum size of the injected context
includeCommandstruerecord shell commands in the journal/handoff
includeFilestruerecord 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.
  • 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

node --test          # 81 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

関連プラグイン