DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

State — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

@xiyiyiru/dsh-state

State

mycel session state as a plain-text notebook: add_state / read_state / compact_state plus a focus task stack over per-session files under <cwd>/.mycel/state/<sessionId>/; survives compaction and resume, never auto-injected, writes zero session events

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add @xiyiyiru/dsh-state@0.2.0-rc.1
READMECompatibilityVersions

Compatibility and provenance

State is published as @xiyiyiru/dsh-state and currently resolves to version 0.2.0-rc.1. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
npm
Registry updated
9/11/2026

Versions

0.2.0-rc.1prerelease
9/11/2026
Show 1 more versionCollapse versions
0.1.0-rc.5prerelease
9/6/2026

Related plugins

Loading related plugins…

Latest
0.2.0-rc.1
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
33.3 kB
Files
9
Surface
any
License
MIT
Source
npm
GitHub
★ 0
Weekly downloads
0
Last push
9/11/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in memory-context.

Memory Plugin@openviking/dsh-memory-pluginOpenViking memory and context bundle for DeepSeek HarnessContextdsh-contextA DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.Weknora@wxg-prc-cpg/dsh-weknoraWeKnora knowledge retrieval tools for DeepSeek Harness (dsh): semantic search, document reading and RAG/agent answers over your own knowledge bases.Memsearch Dsh@zilliz/memsearch-dshMemSearch plugin for DeepSeek Harness: shared markdown memory across agents, with capture, pre-step context injection, memory-recall skill, and a skill-candidate review panel.

README

@xiyiyiru/dsh-state

A plain-text session notebook for dsh agents: add_state / read_state / compact_state over per-session files, plus a two-tool task stack (focus_task / focus_complete).

中文 README

dsh agent 的会话状态笔记本:抗上下文压缩、跨 resume 存活的纯文本笔记层,外加一个任务栈。零自动注入——想看笔记就调 read_state,没有后台魔法。

Why

Context compaction deletes working memory. An agent that just learned "the bug is in the retry loop, user confirmed fix #2" loses exactly that when the window compresses. Auto-injected state has the inverse failure: it burns the same tokens every request and trains the model to ignore it.

This plugin persists working facts as plain files under the workspace — they survive compaction and resume — and keeps the notebook out of every request unless the agent explicitly reads it. Five verbs, no storage to manage, no schema to migrate, zero session events (dsh session-log readers refuse event types outside the harness vocabulary, so since 0.2.0 the plugin touches no log at all).

Storage

Everything lives under <session-cwd>/.mycel/state/<sessionId>/:

  • notebook.md — the notebook, one appended paragraph per note
  • focus.json — the task stack, bottom frame first

The session id keys the container: two conversations in one workspace never share state, and a resumed session (same id, same cwd) finds its files back.

The notebook

toolverbsemantics
add_stateappendappend one note. Mistakes are corrected by appending a correction line — there is no edit verb
read_statereadfull text + size; appends a compress hint once the notebook passes 8K
compact_statereplacethe compression verb: read first, then rewrite the whole file with a summary

add_state's model-facing guidance carries hard triggers (record the moment it happens, not at task end):

  1. the user made a decision or correction ("yes", "no — do it this way" landing)
  2. a key fact or root cause was established (a path, a cause, a number that would need re-discovering)
  3. a multi-step task is starting (goal + acceptance criteria — recovery material after compaction)
  4. a milestone completed (conclusion + artifact paths; work that leaves no trace didn't happen)

The task stack

focus.json; frames are plain one-line task descriptions.

toolverbsemantics
focus_taskpushlock a multi-step task; the previous task is pushed down automatically
focus_completepopdeclare done with a one-line conclusion and fall back to the previous task (or clear the stack). Call it before delivering the answer — the task's completion standard is the artifact landing

focus_task's guidance on when not to use it: single-turn Q&A, or a change of working posture within the same task (that is the mode plugin's business — the two are orthogonal by design: the stack restores your task, a re-switch restores your methodology; frames carry no mode snapshot).

Interrupted mid-task? Lock the blocker with focus_task, solve it, focus_complete back to the main task.

As a convenience, focus calls also append to <session-cwd>/.mycel/focus.log — best-effort, for grepping a workspace's task history; focus.json remains authoritative.

What it does not do

  • ❌ no auto-injection: the notebook never leaks into a request on its own
  • ❌ no prompt section, no system-prompt contribution at all
  • ❌ no mode knowledge, no snapshot riding frames (mode-agnostic since 2026-09-03)
  • ❌ no edit/delete verbs — append or compact-replace, two verbs total

Install

dsh plugin --profile <name> add @xiyiyiru/dsh-state

Peer dependencies (@deepseek-ai/cordis, dsh-agent, dsh-session, dsh-system-prompt, dsh-tools) resolve from your dsh installation automatically.

API

import {
  ADD_STATE, READ_STATE, COMPACT_STATE,
  FOCUS_TASK, FOCUS_COMPLETE, FOCUS_TASK_DESCRIPTION, FOCUS_COMPLETE_DESCRIPTION,
  SIZE_WARN_THRESHOLD,
} from '@xiyiyiru/dsh-state'
exportwhat it is
SIZE_WARN_THRESHOLD8000 — where read_state starts appending the compress hint
ADD_STATE … FOCUS_COMPLETEtool names; *_DESCRIPTION their model-facing descriptions

The invariant companion (@xiyiyiru/dsh-state/invariant) still validates legacy mycel/state events in stored logs written before 0.2.0; the plugin itself writes zero session events.

Design notes

  • Zero auto-injection — reading is an explicit act; the notebook costs tokens only when spent deliberately.
  • Append-mostly — two verbs (append / compact-replace) keep the semantics total; correction is a new line, not a rewrite.
  • Files are truth — the state directory is the single source; focus.log is a convenience projection, lossy by design.
  • Zero session events — nothing enters the session log, so no harness vocabulary or reader-compatibility surface is involved.

License

MIT