dsh-session-s3
Run the following command in DeepSeek Harness:
dsh plugin install gengmao/dsh-session-s3
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install gengmao/dsh-session-s3 in the terminal to install this plugin; the source is at https://github.com/gengmao/dsh-session-s3
About this plugin
DeepSeek Harness writes session history to a local JSONL file by default. That path has triggered a recurring class of corruption bugs caused by torn writes, missing fsync, and concurrent appenders. At least seven community-confirmed corruption discussions point to the same root cause, yet there is no structural fix. dsh-session-s3 moves the persistence backend to an S3-compatible object store and eliminates the bug class with two invariants: every write is an immutable JSONL fragment carrying a SHA-256 digest, and write ordering is coordinated through a compare-and-swap on a single manifest. A fragment is conditionally PUT with If-None-Match; the manifest is then conditionally PUT with If-Match. The successful conditional PUT on the manifest is the commit point. A fragment, once landed, is never mutated; a crash at worst leaves one harmless orphan object. Concurrent writers arbitrate on the same manifest via CAS, and the loser receives a StaleWriterError instead of a silent overwrite. No leases, heartbeats, or fencing are required.
The plugin also exposes a library-level createProvider (load / append / read / compact / close) for callers outside the DSH seam, and invalid configuration reports every problem in one pass rather than stopping at the first. AWS S3, Cloudflare R2, MinIO, and Tigris are all on the compatibility matrix; pointing at an S3 Express One Zone directory bucket pushes single PUT latency into single-digit milliseconds. Credentials flow through the AWS SDK default chain, so SSO, instance roles, and GitHub OIDC work out of the box without embedding static keys. This plugin suits multi-instance deployments, teams that want session data collected in an object store, and anyone who does not fully trust the durability of a local filesystem. Note 22 or higher is required, and the target store must genuinely honor If-Match and If-None-Match headers: if conditional PUT always returns 200, the store is unsafe for this plugin.
Use Cases
- Multi-instance Harness deployments that centralize session history in S3 or R2
- Recurring torn-write and concurrent-corruption bugs in local JSONL that need a structural fix
- Multi-AZ setups where session data must survive in an object store while controlling write latency
Best For
- Ops and dev teams running multi-instance Harness who need centralized session management
- Users who distrust local-filesystem durability and want a swappable object-store backend
- Developers on R2, MinIO, Tigris, or similar S3-compatible stores who need real CAS semantics
Related Plugins
Traceable, searchable cross-session memory for AI agents that turns conversation knowledge into a typed knowledge graph and recalls relevant subgraphs instead of replaying full history, natively integrated with DeepSeek Harness.
Gives DSH AI cross-session long-term memory, to-do and skill management, plus multi-session orchestration, external AI delegation, and an infinite canvas that grows with you.
dsh-mnemon is a three-tier, pluggable, Agent-driven memory system for DeepSeek Harness, combining Runtime memory, Project Documents, and replaceable Memory Spaces with nine long-term providers.
An opinionated, zero-infrastructure file-based memory protocol: human-readable markdown files plus a bounded always-loaded index, curation discipline, and no database or embeddings.