DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

State — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@xiyiyiru/dsh-state

State

mycel 会话状态作为纯文本笔记本:提供 add_state / read_state / compact_state,以及基于每个会话文件的 focus 任务栈,文件位于 <cwd>/.mycel/state/<sessionId>/;可在压缩和恢复后保留,绝不会自动注入,不写入任何会话事件

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @xiyiyiru/dsh-state@0.2.0-rc.1
README兼容性版本

兼容性与来源证明

State 以 @xiyiyiru/dsh-state 发布,当前版本为 0.2.0-rc.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/9/11

版本

0.2.0-rc.1prerelease
2026/9/11
查看其余 1 个版本收起版本
0.1.0-rc.5prerelease
2026/9/6

相关插件

正在加载相关插件…

最新版
0.2.0-rc.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
33.3 kB
文件数
9
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/9/11
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Memory@furongjun1999/dsh-memory灵枢(Lingshu·líng shū)DeepSeek Harness 插件:完整大脑——长期记忆/知识飞轮/自我认知/递归反思接入 DSH,对话自动沉淀进 md_cg 认知图(md 文档)

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