DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-session-guard

p

dsh-session-guard

Manifest valid

Prevents concurrent-write session corruption: takes a per-session advisory lock on session start and every step, so a second dsh process fails loudly instead of writing a duplicate-seq gap; dead owner

hasBundlePatch

dsh-session-guard

Stops two DeepSeek Harness processes from corrupting one session log.

中文文档 · Companion: dsh-session-rescue (repairs the damage this plugin prevents)

The most common dsh corruption family is concurrent writing: a dsh web plus a CLI, two instances on different ports, or a desktop shell sharing one $DSH_HOME. Each process keeps its own in-memory seq cursor, the second writer lands events with already-committed seqs, and the session becomes permanently unloadable:

history unavailable for session "…": corrupt session log: seq gap in committed region …

dsh has no cross-process lock today. This plugin adds one — advisory, per-session, with automatic takeover of dead owners — so the conflicting step fails loudly with an actionable message instead of silently destroying your history.

Install

Not on npm yet, so install straight from GitHub. pnpm will ask you to allow this package's build script once (dsh prints the exact line to add); that's the prepare step compiling TypeScript.

dsh plugin --profile web add github:po-et/dsh-session-guard

Using an AI agent? Tell it: "Install the dsh-session-guard plugin into my dsh."

What you see when it saves you

Error: session-guard: session session-37374e34… is already being written by another
dsh process (pid 84231 on mbp.local, held 42s, last heartbeat 3s ago). Two writers
on one session corrupt its log ("seq gap in committed region"). Close that process
or use a different session; a dead owner’s lock is taken over automatically …

The step fails; the log stays intact; nothing is lost. Crashed processes never wedge a session: a lock whose owner pid is gone is taken over instantly, and unverifiable owners (other hosts on a shared home) expire after 90s without a heartbeat.

Configuration

All optional, set on the plugin row in your profile patch:

- id: session-guard
  name: "@po-et/dsh-session-guard"
  config:
    mode: enforce        # 'enforce' (default) fails conflicting steps; 'warn' only logs
    heartbeatMs: 15000   # heartbeat refresh for held locks
    staleAfterMs: 90000  # unverifiable owners expire after this silence
    # lockDir: /custom   # default: $DSH_HOME/session-locks

Honest boundary

  • The lock is advisory: it protects dsh processes that load this plugin. A process without it is not restrained (install the plugin in every profile you run).
  • It guards the active turn-write path (agent/session-start, agent/pre-step). The cold-load repair path that commits synthetic interrupt-closers before any step runs is inside dsh itself and cannot be intercepted from a plugin — that fix needs to land upstream.
  • Locks live under $DSH_HOME/session-locks; deployments overriding the session root elsewhere in config still key locks by home + session id.
  • If corruption already happened, this plugin can't undo it — dsh-session-rescue can.

Zero runtime dependencies. MIT.

Comments

Loading…

Similar plugins

dsh-session-bridge

by FuWenLianggit

Session-level multi-thread orchestration for DeepSeek Harness: create ordinary sessions, send queued or interrupt prompts to any session by id, and enumerate sessions. Installs globally, independent o

Tools & CapabilitiesManifest valid

★ 0

↓ 474/wk

MIT

TypeScript

Aug 15, 2026

dsh plugin --profile web add dsh-session-bridge

by snow-The

Scans and repairs DSH session logs: re-encodes single-frame corrupt zstd files back to the multi-frame layout and marks unknown event types (e.g. llm/failover) as ignorable so older harnesses can load

Manifest valid

★ 0

MIT

TypeScript

Oct 19, 2026

dsh plugin --profile web add @snow-the/dsh-session-repair

Session Steward for DSH: browse and bulk-prune the official session archive set, and run a four-gate health checkup (log integrity, projection cache, lossless JSON, cold read) that ends in a reversibl

Terminal & ClientsSessions & MessagesManifest valid

★ 1

MIT

TypeScript

dsh plugin --profile web add dsh-session-steward

by Zn-Dk

Diagnose and safely repair corrupted DSH session history: raw zstd/JSONL validation, tool-call ID repair, single-slot pre-repair backup, restore, and an audit trail.

Sessions & MessagesManifest valid

★ 4

↓ 305/wk

MIT

TypeScript

Sep 29, 2026

dsh plugin --profile web add dsh-session-repair

by EIGHTfs

Session management for DSH: archive/restore, batch & conditional delete, AI auto-rename, interrupted-session auto-resume, workspace grouping, undo last message, repair damaged session logs (seq-gap/EI

Sessions & MessagesManifest valid

★ 1

NOASSERTION

HTML

Oct 21, 2026

dsh plugin --profile web add dsh-session-conductor

by rhl88

Deletes a session from the sidebar session menu after a confirmation dialog, removing its log directory, projection-cache record and workspace/pin/archive accounting; registry calls are timeout-guarde

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 13, 2026

dsh plugin --profile web add dsh-session-remove