Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is to treat everything as a plugin. When building multi-agent collaboration or long-running workflows, agent processes themselves are ephemeral, which means context window exhaustion, process crashes, or timeouts can all lead to state loss. dsh-continuum is designed to solve this problem, transforming DSH from a stateless prompt runner into an engineering environment with persistent project memory and fault tolerance.
Plugin Overview¶
dsh-continuum is a production-grade marketplace plugin for DeepSeek Harness (DSH), maintained by developer QuantumKuba and licensed under the MIT License.
It primarily addresses the following pain points:
* Context erasure caused by context window limits.
* Loss of critical reasoning and uncommitted findings due to sub-agent crashes.
* Agents repeatedly performing expensive research work.
* Work content among multiple agents being uncoordinated or overwriting one another.
Core Capabilities¶
The plugin provides the following core features:
-
Deterministic Event Sourcing (events.l)
Models all state changes (project creation, task claims, findings, decisions, evidence) as immutable, strictly ordered events. System state is derived by replaying the event log. -
Crash Resilience & Partial Line Recovery
If the host process crashes during a write (SIGKILL or power loss), the system automatically detects incomplete JSON fragments, safely truncates to the last committed event, and continues operating without data loss. -
Liveness-Checked Cooperative Locking
Uses cooperative lock files with defensive PID existence verification (process.kill(pid, 0)) to serialize concurrent process writes. It can safely break locks from terminated processes without dangerous timeout configurations. -
Optimistic Concurrency Control (OCC)
Enforces strict version matching (expectedVersion) for entity updates. Concurrent writes using stale assumptions are rejected and throw a typedVersionConflictErrorinstead of silently overwriting state. -
Strict Mutation Idempotency
Tool calls with the sameidempotencyKey(network failures or replays) return cached results without side effects. Accidental key conflicts for different operations immediately triggerIdempotencyMismatchError. -
Renewable Execution Leases
When an agent claims a task, a bounded lease (e.g., 10 minutes) is issued. If the agent crashes or abandons the task without renewing the lease, the system automatically releases the task back to thereadystate and increments the retry count. -
Four-Eyes Separation of Duty
Configurable task verification policies (independent,dual,redteam) mathematically prohibit the agent implementing a task from self-verifying the task. -
Deterministic 10-Tier Context Budgeting
Builds token-bounded system prompts using strict priority ranking (active tasks -> north star -> blocking conflicts -> critical findings -> recent handoffs). Large outputs (>10KB) are automatically overflowed to disk. -
Untrusted Content Encapsulation
External web fetches, user input, and finding content are sanitized and encapsulated within strict<continuum:untrusted-finding>boundaries to prevent prompt injection attacks. -
Cryptographic Backup & Verified Restore
Exports the entire project as a self-contained.continuum-backuparchive with SHA-256 integrity verification.
Installation and Configuration¶
You can install it directly via the DSH plugin command:
dsh plugin --profile web add dsh-continuum
The plugin supports configuration through settings.yaml. In the Plugin configuration of the DSH Web UI, the following items can also be configured in real time:
dsh-continuum:
autoInjectContext: true # 自动将 Context Pack 注入系统提示
maxContextPackTokens: 8000 # Context Pack 的最大 Token 预算
defaultLeaseTtlMinutes: 10 # 任务执行租约的 TTL
storageMode: workspace # 存储模式:'workspace' (.continuum/) | 'home' (~/.continuum/) | 'custom'
customStoragePath: "" # 如果 storageMode 为 custom,指定自定义目录
The installation package includes cordis.patch.yml, which can be used to automatically set default values in the configuration file.
Typical Usage¶
dsh-continuum exposes 7 first-party tools, defined in @deepseek-ai/dsh-tools. Developers can call these tools as needed to manage project state:
| Tool Name | Common Operation Options | Description |
|---|---|---|
continuum_project |
init, get, status, history, export |
Initialize project, update north star requirements, export backup package |
continuum_task |
create, claim, renew_lease, submit, verify |
Manage the full task lifecycle, renew lease, submit, four-eyes verification |
continuum_memory |
record_finding, record_decision, raise_conflict |
Record facts, architectural decisions, conflicts, with evidence |
continuum_checkpoint |
create, list |
Create and list milestone snapshots |
continuum_handoff |
create, get_latest |
Safely transfer state between agent roles |
continuum_context |
render |
Inspect or re-render the current token-bounded context package |
continuum_status |
check |
Diagnose lock status, lease expiration, and event log health |
Concurrency and Security:
* Actor identity (id, role) is securely derived from exec.agent.id and runtime context; callers cannot spoof identities.
* Safe read operations (get, history, render, check) must declare isConcurrencySafe: true, while mutating operations are serialized.
Notes¶
- Node Version Requirement: The plugin requires Node.js version >= 22.19.0.
- Runtime Permissions: The plugin runs with the current DSH process permissions. Before installing, be sure to inspect the source code and license to ensure compliance with security requirements.
- Storage Location: Depending on
storageMode, data is stored in.continuum/at the project root,~/.continuum/in the user home directory, or a custom path.
Conclusion¶
Through event sourcing, optimistic concurrency control, and strict context budgeting, dsh-continuum provides database-like persistence and consistency guarantees for DSH. It enables agent development to shift from “one-off scripts” to “continuous engineering.”