DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

@deepseek-ai/dsh-tool-memory

Tool Memory

DeepSeek Harness 的持久化记忆插件,使智能体能够跨会话存储和召回信息——提供具备原子存储、验证和并发安全读取功能的 DSH 原生工具

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

npx -y @deepseek-ai/dsh plugin --profile web add github:disc0nct/dsh-memory-plugin#0005ac2e190379d457699fa534760927206f3024
README兼容性版本

兼容性与来源证明

Tool Memory 以 @deepseek-ai/dsh-tool-memory 发布,当前版本为 1.3.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/21

版本

1.3.1stable
2026/8/21
1.2.0stable
2026/8/20

相关插件

正在加载相关插件…

最新版
1.3.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 1
周下载
0
最近提交
2026/8/22
查看源码 ↗
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

@deepseek-ai/dsh-tool-memory

A persistent memory plugin for DeepSeek Harness (DSH) that enables agents to store and recall information across sessions, similar to the memory system in Hermes agent AI.

Features

  • 🧠 Persistent Storage: Memories are saved to disk and survive across sessions
  • 🔍 Flexible Search: Hybrid keyword+semantic (token Jaccard + substring) with mode: hybrid|keyword|semantic
  • 🏷️ Categorization: Organize memories with optional categories (kebab-case, defaults to general)
  • 📋 Seven Tools: memory_store, memory_search, memory_get, memory_list, memory_delete, memory_clear, memory_stats
  • 🔄 Atomic Writes: write+rename with mkdir -p, corrupt-file recovery to *.corrupt.*, orphan *.tmp.* sweep (>1h) on load
  • ⚡ Performance: In-memory mtime cache, timestampMs numeric sort, inverted index Map<token,Set<id>> for sub-linear hybridSearch, MAX_FACTS cap, timeoutMs:5000, isConcurrencySafe for reads
  • ✅ Validation & Safety: kebab-case keys, MAX_TIMESTAMP_MS, timestampMs auto-generated, MemoryPluginError + 3× retry for EACCES/EBUSY, memory_clear confirm:true, withWriteLock per-file serialization
  • 🧩 Modular & DSH-Native: lib/config|storage|validation|search/scoring|tools/*, peerDependencies to avoid dual-instance prepare bug, graceful fallback to linear scan

Installation

This package ships a dsh.bundle manifest, so it can be installed as a regular profile bundle.

As a DSH Plugin

  1. Add the plugin to your DSH profile (this runs pnpm add in the profile directory, so a git URL works):

    dsh plugin --profile <your-profile> add github:disc0nct/dsh-memory-plugin
    
  2. Register it as a bundle in the profile's package.json ($DSH_HOME/profiles/<your-profile>/package.json):

    {
      "dependencies": {
        "@deepseek-ai/dsh-tool-memory": "github:disc0nct/dsh-memory-plugin"
      },
      "dsh": {
        "profile": {
          "bundles": [
            "@deepseek-ai/dsh-base",
            "@deepseek-ai/dsh-web-app",
            "@deepseek-ai/dsh-tool-memory"
          ]
        }
      }
    }
    
  3. Boot the profile:

    dsh --profile <your-profile>
    

Usage

Available Tools

Once installed, the following tools become available to your DSH agent:

memory_store

Save an important fact to long-term memory.

// Store a user preference
await ctx.tools.memory_store({
  key: "user-name",
  value: "Alice",
  category: "preferences"
});

// Store project information
await ctx.tools.memory_store({
  key: "project-language",
  value: "TypeScript",
  category: "project"
});

// Store a decision
await ctx.tools.memory_store({
  key: "api-decision",
  value: "Use REST API for simplicity",
  category: "decisions"
});

memory_search

Search for memories by keyword, category, or semantic paraphrase (hybrid keyword+token Jaccard ranking, dependency-free).

// Search all memories
const results = await ctx.tools.memory_search({
  query: "Alice"
});

// Search by category
const results = await ctx.tools.memory_search({
  category: "preferences"
});

// Combined search
const results = await ctx.tools.memory_search({
  query: "API",
  category: "decisions",
  limit: 5
});

// Semantic paraphrase: "fav color" matches "favorite-color"
const results = await ctx.tools.memory_search({
  query: "fav color",
  mode: "hybrid" // | "keyword" | "semantic" (default: "hybrid")
});

// Force exact substring only
const results = await ctx.tools.memory_search({
  query: "color",
  mode: "keyword"
});

memory_get

Fast exact lookup by key (vs memory_search scan).

const { found, fact } = await ctx.tools.memory_get({ key: "user-name" });
if (found) console.log(fact.value);

memory_list

List all stored memories (most recent first, optionally filtered).

// List all memories
const memories = await ctx.tools.memory_list();

// List memories by category
const memories = await ctx.tools.memory_list({
  category: "project"
});

memory_delete

Delete a specific memory by its key.

await ctx.tools.memory_delete({
  key: "user-name"
});

memory_clear

Clear ALL stored memories (requires explicit confirmation).

// cancelled without confirm
await ctx.tools.memory_clear(); // { cleared:false, count: N }

// confirmed
await ctx.tools.memory_clear({ confirm: true }); // { cleared:true, count: N }

memory_stats

Get health stats (count, per-category, oldest/newest, file size).

const stats = await ctx.tools.memory_stats();
console.log(stats.count, stats.categories); // {count: 12, categories:{project:5}}

Memory Storage Format

Memories are stored in ~/.dsh/memory.json with this structure:

{
  "facts": [
    {
      "id": "unique-identifier",
      "key": "user-name",
      "value": "Alice",
      "category": "preferences",
      "timestamp": "2024-01-15T10:30:00.000Z"
    }
  ]
}

Configuration

The memory file defaults to $DSH_HOME/memory.json (or ~/.dsh/memory.json when DSH_HOME is unset). Override it in the profile's patch layer ($DSH_HOME/profiles/<your-profile>/cordis.patch.yml):

- id: tool-memory
  config:
    memoryPath: /absolute/path/to/memory.json

Examples

Remembering User Information

// When user introduces themselves
if (userMessage.includes("my name is")) {
  const name = extractName(userMessage);
  await ctx.tools.memory_store({
    key: "user-name",
    value: name,
    category: "identity"
  });
}

// Later, when needing to address the user
const memory = await ctx.tools.memory_search({
  query: "name",
  category: "identity"
});
if (memory.results.length > 0) {
  await ctx.tools.memory_store({
    key: "greeting-used",
    value: `Hello ${memory.results[0].value}!`,
    category: "interaction"
  });
}

Project Context Tracking

// When starting work on a project
await ctx.tools.memory_store({
  key: "project-start",
  value: `Started work on ${projectName} at ${new Date().toISOString()}`,
  category: "project"
});

// When making a technical decision
await ctx.tools.memory_store({
  key: "tech-decision-db",
  value: "Selected PostgreSQL for reliability",
  category: "decisions"
});

// Later, when continuing work
const projectInfo = await ctx.tools.memory_list({
  category: "project"
});

How It Works

The plugin implements persistent memory by:

  1. File Storage: Atomic writeFile(tmp)+rename to ~/.dsh/memory.json (no double-write), mkdir -p, max 5000 facts, orphan *.tmp.* sweep (>1h) via readdir on load
  2. Concurrency: Per-file withWriteLock Promise queue (lib/storage.js:47-62) serializes store/delete/clear load→mutate→save — prevents lost updates; reads remain isConcurrencySafe
  3. Timestamps: timestamp (ISO) + timestampMs (numeric, Date.now()) generated internally; compareRecent prefers timestampMs (no Date.parse per compare); old files migrated on load (backfill timestampMs via Date.parse)
  4. Performance: mtime+size cache (lib/storage.js:105-115), inverted index Map<token,Set<id>> + Map<id,{hash,tokens}> cache (lib/search/scoring.js:50-120) — hybridSearch union of id sets → sub-linear, fallback linear on miss
  5. Efficient Lookups: Hybrid search token Jaccard + substring boosts then timestampMs desc; empty query → recency
  6. Upsert: memory_store replaces existing key and moves to most-recent
  7. Validation: key/category kebab-case, value ≤10000, category ≤32, timestampMs 0..4102444800000 (lib/validation.js:5-27), MemoryPluginError + 3× retry for transient EACCES/EBUSY
  8. Recovery: SyntaxError → *.corrupt.* backup + empty; ENOENT → empty; graceful degradation index→linear
  9. Modular Layout: lib/config.js, lib/storage.js, lib/validation.js, lib/search/scoring.js, lib/tools/* (DSH apply re-exports)
  10. DSH Idioms: Config via schemastery, defineTool timeoutMs:5000 isConcurrencySafe hints

Requirements

  • DeepSeek Harness (DSH) v0.1.0-rc.8 or later
  • Node.js v18.0.0 or later (uses crypto.randomUUID, fs/promises.rename/stat)
  • Peer dependencies:
    • @deepseek-ai/cordis: ^4.0.1
    • @deepseek-ai/dsh-tools: ^0.1.0-rc.8
    • @deepseek-ai/schemastery: ^3.18.1

License

MIT License - feel free to use, modify, and distribute this plugin.

Development

To contribute to this plugin:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Ensure all tests pass (if applicable)
  5. Submit a pull request

Credits

Inspired by the memory systems in agents like Hermes AI, this plugin brings similar long-term memory capabilities to the DeepSeek Harness ecosystem.


Built with ❤️ for the DSH community

kind
exec.signal
peerDependencies