Preface¶
When building agents or engaging in long-term collaboration in DeepSeek Harness (DSH), closing a session breaks the context: project conventions, user preferences, and conclusions from the previous round often have to be restated. Writing memory into the project repository easily pollutes the codebase, and it is also unsuitable for scenarios like “global preferences” and “shared across multiple workspaces”. Below introduces the community plugin jiyi (maintainer yueyexiayu): for the official desktop client, it maintains topics, an inbox, and an index under $DSH_HOME/jiyi/, and injects them into the model on demand before the next round begins; the model side reads memory through dedicated tools, rather than browsing local directories with file tools.
What is this¶
jiyi is a cross-session memory plugin for the official DSH desktop client: the right sidebar “Start” page adds a Memory entry, supporting Markdown topics, observation collection after a turn ends, index generation, and injection before each outbound step. It goes through connection.fetch, does not depend on webServer, and does not install dependencies via dsh plugin --profile desktop. It is classified as a Memory category plugin in the community catalog; the current repository version is 0.1.4 (see package.json).
Core features¶
Browsing and injection¶
- Browse global / workspace topics and the inbox in the right sidebar Memory.
- Before an outbound step with new messages, only a read-only current index is generated; content is re-injected only if it changes. An empty store on first run injects nothing; after deleting the last topic, an old-index invalidation notice is sent. Decision fields such as DSH’s
startsRequestSeriesare preserved. - Index reminders use the v4
plugin:jiyimessage source; plugin reminders, continuation reminders, and team messages are not collected as real user preferences.
How the model reads memory¶
The model should use jiyi_list / jiyi_search / jiyi_read to read memory, not access ~/.dsh/jiyi directly with file tools.
Turn boundaries and observation collection¶
- Collection only happens at the official
session/eventturn/endcompleted final boundary; afterxuxie(continuation) in the same turn finishes, it extracts once more. - aborted (aborts caused by user cancel or release) is recorded as cancelled; error as failed; max-tokens as skipped. Turns that did not complete normally are not treated as successful extractions.
- Extraction that has completed holds an independent workspace/session snapshot; subsequent Agent releases will not cancel it; releases without a completed boundary do not trigger extraction.
- Tool summaries read v4 direct output,
source.callId,isError, and structured failure reasons; results without a return value are marked as unresolved. Summaries keep a separate budget for turn state and tools, so long body text will not crowd out all tool information.
Extraction and organization¶
- Extraction uses a model pool: main model
glm-5.3-flash, secondary modeldeepseek-flash. Pure tasks/questions are not sent to the extraction model; mixed requests containing persistent agreements like “以后” (“from now on”) or “默认” (“by default”) still participate in extraction; “记住:” (“remember:”) can be collected locally. - Structurally invalid or over-limit results go to a fallback model; sensitive-content filtering is recorded separately as filtered; storage/extraction failures are visible in the status.
- After extraction, the same model pool organizes topics: the organization plan is fully validated first, then updated via a resumable transaction; on failure, the input is retained. Processed raw observations (including noop) are archived. The LLM returns
processed/archivedandcoverage: unverified, not claiming that all observations have been merged into topics.
Status API and cold history¶
/api/jiyi?action=statusprovideslastInjection,lastCapture,lastDream. WithsessionId,lastCaptureshows only the latest turn of that session, andlastInjectionshows only that session’s injection result; a late completion of an old turn cannot overwrite a new turn’s cancelled; an injection success in another session cannot mask this session’s failure. The global page withoutsessionIdkeeps the most recent actual working state.lastDreamindicates cross-workspace background organization, not current-session success.- The right sidebar cold-history workspace reuses the official
sessionController.inspect(sessionId, signal), without creating/restoring an Agent, reasoning, or modifying the session. Unknown session: 404; missing absolute cwd: 400; service missing: 503; corrupted history: 500. Failures withsessionIddo not degrade to global memory.
Storage location¶
Files are in $DSH_HOME/jiyi/ (default ~/.dsh/jiyi/), not written into the user’s repository. Clones / worktrees of the same git origin share the workspace directory.
Installation and enablement¶
jiyi is not installed via one-click dsh plugin install; it needs manual copying and a patch applied to the desktop profile.
- Copy the plugin to
$DSH_HOME/plugins/jiyi(by default$DSH_HOMEis~/.dsh). - Write the following to
$DSH_HOME/profiles/desktop/cordis.patch.yml:
- insert:
- id: jiyi
name: ../../plugins/jiyi/lib/index.js
- Fully quit DeepSeek Harness (macOS: ⌘Q) and reopen it, so the new Host/Client code can be loaded.
- Expand the right sidebar, and Memory will appear under “Start”. After a restart, existing sessions will also check injection against the current index before their next outbound step with messages; simply refreshing the webpage does not guarantee updating the Host.
Typical usage¶
- After installing and restarting the desktop client, enter Memory from “Start”, and view global or current-workspace topics and the inbox.
- During normal conversation, state persistent agreements in mixed requests (e.g., “以后默认用 TypeScript” — “use TypeScript by default from now on”), or use “记住:” (“remember:”) in messages to trigger local collection; after the turn completes, the plugin extracts observations into the inbox, and background organization merges them into topics.
- When the model needs to reference history, ask the Agent in the conversation to call
jiyi_search/jiyi_read(or browse withjiyi_list), rather than reading files under~/.dsh/jiyi. - When troubleshooting injection or organization issues, request
/api/jiyi?action=status(optionally withsessionId) to viewlastInjection,lastCapture,lastDream.
Suitable scenarios and notes¶
For whom: Developers who use the DSH official desktop long-term, want to keep topic-level memory across multiple sessions and workspaces, and can accept memory residing in the local $DSH_HOME.
Be sure to know:
- The plugin runs with the privileges of the current DSH process; before installing, read the GitHub source and the repository declarations yourself, and confirm the license and data boundaries.
- It targets the official desktop; do not use
dsh plugin installto stuff dependencies into the desktop profile. - Closing the Host aborts running and queued extraction/organization; completed writes will not be revoked. Old workspace directories without a Git host need to be explicitly migrated per the README’s “Security and recovery boundaries”; automatic attribution cannot be relied upon.
- The community plugin catalog SkillHub is an independent site, with no official affiliation with DeepSeek / High-Flyer; star counts and other metadata are based on the catalog page (currently 0).
Conclusion¶
jiyi separates cross-session memory from “writing into the repository” or “letting the model remember blindly”: local topics + inbox + pre-step index injection, and constrains collection and reading with completed boundaries and dedicated tools. If you need to keep searchable memory long-term in the DSH desktop client, you can follow the steps above to install it and maintain topics via the “Memory” entry.
- Catalog page: https://www.skillhub.cn/plugins/yueyexiayu/dsh-jiyi
- GitHub: https://github.com/yueyexiayu/dsh-jiyi