im-Captain/dsh-session-guard0

@im-captain/dsh-session-guard

DeepSeek Harness plugin that prevents the concurrent-write session corruption family: per-session advisory locks with stale takeover, so two dsh processes can no longer corrupt one session log

AI Analysis

核心用途是通过文件锁和心跳机制,阻止两个 DSH 进程同时写入同一个会话日志,从而避免数据损坏。适合经常多开 DSH 实例、或需要保障会话日志绝对完整性的用户。

Package
@im-captain/dsh-session-guard
Version
0.1.0
License
MIT
Last updated
Sep 10, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:im-Captain/dsh-session-guard

Configuration

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

- id: session-guard
  name: "@im-captain/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