dshbase

插件目录 / Knowledge / mindspace-dsh-session-memory

mindspace-dsh-session-memory

已验证 · 实测可装 Spirtxiaoqi7

✓ 持续维护 基于 6 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
1Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

mindspace-dsh-session-memory — DSH 插件(会话)

✅
我们的评价
可用 — 实测通过,早期项目

mindspace-dsh-session-memory — DSH 插件(会话) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

Mindspace Session Memory for DeepSeek Harness

DeepSeek whale community artwork

An installable DeepSeek Harness community plugin for editable, session-isolated
personalization memory. It keeps continuity and user control in the same place:

  • a roughly 300-character profile separating confirmed user facts from AI observations, while DSH compaction stays internal;
  • editable preferences and assistant instructions consolidated into at most three categorized cards each;
  • a relationship identity and a purpose for each conversation;
  • an optional roleplay preset isolated to one session;
  • model-facing get_session_memory and update_session_memory tools;
  • conservative automatic extraction from explicit user statements;
  • category-based conflict replacement with stable card ids and a visible append/merge/replace/skip audit trail;
  • a one-time, optional role/purpose/style question when a new session has no personalization.

0.2.9: Session-scoped context compaction

The Memory Center now exposes a session-isolated context-compaction policy. Users can
enable it, set the trigger ratio, retained recent context, and summary limit, or run a
manual compaction before the threshold is reached. The policy is persisted as session
events and never changes another conversation.

  • Only conversation messages are summarized; system, tool, personalization,
    relationship-mission, and roleplay layers are excluded.
  • The prior summary is included as input to avoid losing durable context across
    repeated compactions.
  • The compaction prompt prioritizes facts, decisions, constraints, open work,
    and reusable conclusions while dropping greetings, repetition, and tool logs.
  • DSH remains the compaction executor; this plugin supplies the session policy
    and the visible user controls.

This is a community plugin and is not an official DeepSeek project. The repository
artwork is supplied by the project owner and is used only to identify this repository.

0.2.0 update and contribution

Version 0.2.0 turns the first editable-memory prototype into a governed,
session-scoped personalization layer for DeepSeek Harness:

  • the public compaction-summary override is replaced by a 300-character user profile
    that separates confirmed facts from clearly labelled AI observations;
  • preferences and assistant requirements are consolidated into at most three
    categorized cards per section instead of growing as disconnected fragments;
  • corrections replace conflicting information while preserving stable card ids;
  • automatic extraction proposes a complete next state and an atom-by-atom
    handled/skipped ledger, so partial model output is rejected atomically;
  • append, merge, replace, and skip activity records expose source message sequences,
    before/after values, reasons, and timestamps;
  • V1 session events remain replayable and migrate into the V2 document shape;
  • repeated legacy fallback categories are repaired during replay instead of locking all later writes;
  • assistant names, nicknames, self-designations, and relationship-specific titles have a dedicated
    identity action and are never routed into the user's profile or preferences;
  • relationship missions and roleplay presets remain independently scoped to each
    conversation.

The contribution is deliberately tree-out: one installable dual-face DSH bundle owns
the Host service, event projection, prompt/tool integration, extraction hook, Typert
descriptor, Remote, and settings UI. It does not replace DSH compaction semantics or
require an upstream source patch, making the memory-governance layer independently
installable, auditable, and removable.

Confirmed/observed profile and categorized preferences

V2 profile and categorized preference cards

Session role preset and visible memory audit

V2 role preset and memory activity audit

The V2 acceptance run passed 10 automated tests, build and package checks, real model
write/merge/replace flows, cross-session isolation, and persistence after restarting
the default Web profile.

Install

This README describes current main. It does not point at a nonexistent Release
tarball: build the prebuilt package from a pulled checkout, then install it from
the official Harness checkout root.

git clone https://github.com/Spirtxiaoqi7/mindspace-dsh-session-memory.git
Set-Location .\mindspace-dsh-session-memory
corepack pnpm install
corepack pnpm run build
corepack pnpm pack --pack-destination dist
$memoryTgz = (Get-ChildItem .\dist\mindspace-dsh-session-memory-*.tgz | Sort-Object LastWriteTime -Descending | Select-Object -First 1).FullName

Set-Location C:\path\to\deepseek-harness
corepack pnpm dsh plugin --profile web add $memoryTgz
corepack pnpm dsh --profile web --dump-config
corepack pnpm dsh web

Do not run pnpm dsh in the plugin directory or require a global dsh: that
command belongs to the official Harness checkout. The repository has no
install-time build script; the commands above explicitly create and install the
tarball. Historic GitHub Releases map only to their respective tags and do not
represent the current main feature set.

How it composes

The package is one DSH bundle with one dual-face row. On the Host it mounts the
memory service, projection, prompt contribution, model tools, extraction hook, and
Typert descriptor. The same package declares its Web client contribution, which
self-mounts the generated Remote descriptor and registers the settings page.

It does not patch DSH source, api-remotes, the built-in bundles, or root TypeScript
projects. Removal is therefore one command:

corepack pnpm dsh plugin --profile web remove mindspace-dsh-session-memory

Data and model calls

Memory changes are appended to the selected DSH session event log. The UI reads and
replaces a whole versioned document with optimistic revision checks. Automatic
extraction is enabled by default and may make one auxiliary model request after a
completed root-agent turn. A proposal must contain the complete next state plus a
handled/skipped ledger for every extracted atom; invalid or partial output is rejected
atomically. Confirmed facts and cautious observations remain separate, and inferred
sensitive facts are rejected by policy.

Disable automatic extraction in a later profile patch if you want tool/manual writes
only:

- id: mindspace-session-memory
  name: mindspace-dsh-session-memory
  config:
    maxTextBytes: 4096
    maxItemsPerSection: 3
    maxProfileCharacters: 300
    autoExtract: false
    extractionMaxTokens: 1024

Compatibility

The initial release targets the public DeepSeek Harness 0.1.0-rc family and Node
22.19+ or Node 24+. Harness is currently a developer preview; breaking upstream
changes may require a plugin update.

Recent DSH builds also ship experimental in-tree session-memory fields and a
matching settings entry. This plugin deliberately disables those in-tree rows in
its profile patch before installing its own single owner for the Remote, event
projection, prompt integration, and editable UI. Future extensions must keep one
owner per session-memory schema/Remote namespace; enabling both implementations
causes duplicate registration or competing writers.

Development

pnpm install
pnpm run build
pnpm test
pnpm pack --pack-destination dist

The generated Typert descriptors are committed under src/generated/. The build
rescopes their package identity and bundles the browser Remote with the UI.

Chinese documentation: README.zh-CN.md

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 mindspace-dsh-session-memory」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Spirtxiaoqi7/mindspace-dsh-session-memory

Headless(CLI)profile:

dsh plugin --profile headless add github:Spirtxiaoqi7/mindspace-dsh-session-memory

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。

适合谁

跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。

二次开发建议

记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7797 个插件 →