DeepSeek Harness
Connect DeepSeek Harness (dsh) with a native lifecycle plugin and an MCP bridge: per-session boot, recall before each user message, and lore tools.
The DeepSeek Harness (dsh) integration installs the Lore lifecycle plugin and MCP bridge for dsh. Every dsh session gets startup memory from its runtime boot node, recall before each new user message, and the Lore memory tools through a local MCP bridge.
Install
Run this on the machine where you use dsh:
npx @loremem/cli install --channels dshThe installer detects dsh through the dsh command on your PATH, or through an existing ~/.dsh directory when you run dsh with npx @deepseek-ai/dsh. Restart dsh after the install finishes.
What gets installed
- The plugin files from
lore-dsh.zip, in~/.lore/dsh/. - Two rows in the home-level
~/.dsh/cordis.patch.yml, which every dsh profile applies. The rows use the stable idslore-lifecycleandlore-mcp, sit inside a clearly marked managed block, and are the only thing the installer replaces on re-install. All other rows and comments in the file are preserved, and a backup is kept beside it. lore-lifecycleloads the native plugin at~/.lore/dsh/plugin/lifecycle.mjs. On everyagent/createdit sends asession.startlifecycle event and puts the returned boot context into that session's system prompt. On the first step of a user turn it sends exactly oneprompt.submitfor that user message and adds the returned recall context to that step, marked as Lore-injected context rather than user input.lore-mcpstarts a local stdio MCP bridge namedlorethat forwards MCP requests to<server>/api/mcp?client_type=dsh. Its tools appear asmcp__lore__lore_status,mcp__lore__lore_search, and so on.- Skills, only when the server advertises them. The plugin registers a skills provider over
~/.lore/skills/<project-id>/, which the session-start sync fills; you invoke a skill by its own user-invocable entry.
No token is written into the dsh configuration. The plugin and the bridge read ${LORE_HOME:-~/.lore}/config.json.
Verify
- Run
npx @loremem/cli status. Thedshline should readinstalled. - Inspect the composed profile without booting it:
dsh --profile <name> --dump-configlists thelore-lifecycleandlore-mcprows. - Start a dsh session and ask it to call
lore_status. The tool appears asmcp__lore__lore_status. - Send a prompt about a project that has memories. Then ask the agent which memory nodes it was given for that prompt.
Notes
- dsh boot node. dsh loads its startup memory from
core://agent/dsh. If that node is empty, create it with the rules you want dsh agents to start with. Use the Memory page in the console. On a self-hosted server, that page is/memory. - Fail open. If Lore is unreachable or slow, the plugin skips its context and dsh keeps working. Requests are bounded by short timeouts.
- Configuration. The plugin and the bridge read
${LORE_HOME:-~/.lore}/config.json. The environment variablesLORE_BASE_URL,LORE_API_TOKEN, andAPI_TOKENare fallbacks. The token never appears in the dsh patch file or in command arguments. - Uninstall removes only the managed Lore rows and
~/.lore/dsh. Everything else in~/.dsh/cordis.patch.ymlstays. - Restart after changes. Restart dsh after you change the configuration or the token.