deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Honcho Memory Plugin for DeepSeek Harness — give your AI persistent, cross-session memory backed by a self-hosted Honcho v3 service.
中文 | English
# From npm
dsh plugin --profile web add npm:@nanpaidashi/dsh-honcho-sync dsh web
# Or from GitHub
dsh plugin --profile web add link:https://github.com/nanpaidashi/dsh-honcho-sync dsh web
Then restart DSH:
systemctl --user restart dsh-web
# or: dsh web --restart
If you installed an earlier version (v0.6.x or v0.7.0):
# Re-run the same install command — it pulls the latest version and overwrites
dsh plugin --profile web add npm:@nanpaidashi/dsh-honcho-sync dsh web
# or
dsh plugin --profile web add link:https://github.com/nanpaidashi/dsh-honcho-sync dsh web
systemctl --user restart dsh-web
The install is idempotent: it replaces the plugin source file in place. Your configuration (settings panel) and sync state (~/.dsh/honcho-sync-state.json) are preserved — no data loss, no re-configuration needed.
honcho_recall, honcho_ask, honcho_remember, honcho_context) — saves ~7K tokens of tool schema injection per session_filterRepresentation() — removes Pattern [medium]/[low] blocks, Premises/Sources provenance chains, and orphan Type/Sources lines from representation injection_assembleByPriority() — assembles memory-context parts by priority (peer-card > session-summary > semantic-recall > representation) instead of fixed orderinjectionMaxChars default 8000 → 4000, reprMaxObs default 8 → 4normalizeToolParameters() to convert legacy parameter shorthand to standard JSON Schemaoutput.render returning content blocks array (required by DSH >= 2026)~/.config/systemd/user/dsh-web.serviceconclusions/query requiring filters parameter/search, /peers/list, /summariesPOST /conclusions body formatschedule_dream parameter name (dream_type)honcho_conclude, honcho_conclude_list, honcho_conclude_query, honcho_message_get# 1. Remove the plugin from DSH
dsh plugin --profile web remove honcho-sync dsh web
# 2. (Optional) Remove sync state file
rm ~/.dsh/honcho-sync-state.json
# 3. Restart DSH
systemctl --user restart dsh-web
Note: Removing the plugin does NOT delete your Honcho data. All messages, conclusions, and peer cards remain on your Honcho server. The plugin is just the bridge — your memory is safe.
There is no settings panel. All configuration is done via environment variables in your DSH service file.
# For systemd (Linux)
nano ~/.config/systemd/user/dsh-web.service
Add these environment variables to the [Service] section:
[Service]
Environment="HONCHO_URL=http://localhost:8000"
Environment="HONCHO_WORKSPACE=my-workspace"
Environment="HONCHO_USER_PEER=user"
Environment="HONCHO_AGENT_PEER=agent"
systemctl --user daemon-reload
systemctl --user restart dsh-web
| Variable | Description | Default |
|---|---|---|
HONCHO_URL |
Honcho API base URL | (required) |
HONCHO_WORKSPACE |
Honcho workspace name | (required) |
HONCHO_USER_PEER |
Peer ID representing the user | user |
HONCHO_AGENT_PEER |
Peer ID representing the agent | agent |
Note: Advanced options (debounce, recall budget, timeouts) use sensible defaults and rarely need tuning. If you do need to customize them, edit the
DEFAULTSobject at the top ofsrc/index.mjs.
If you don't have Honcho running yet:
# Quick start with Docker
docker run -d --name honcho \
-p 8000:8000 \
-e HONCHO_API_KEY="your-api-key" \
plasticlabs/honcho:latest
# Or self-host from source (recommended for production)
# See: https://github.com/plastic-labs/honcho#self-hosting
Create a workspace and peers:
curl -X POST http://localhost:8000/v3/workspaces/my-workspace \
-H "Authorization: Bearer $HONCHO_API_KEY" \
-H "Content-Type: application/json"
curl -X POST http://localhost:8000/v3/workspaces/my-workspace/peers \
-H "Authorization: Bearer $HONCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "user"}'
curl -X POST http://localhost:8000/v3/workspaces/my-workspace/peers \
-H "Authorization: Bearer $HONCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "agent"}'
| Tool | Description |
|---|---|
honcho_recall |
Hybrid semantic search (messages + conclusions). Fast (2-5s). |
honcho_ask |
Deep dialectic reasoning with a peer. Slower (2-5min) but thorough. |
honcho_remember |
Save a fact/statement to Honcho memory. |
honcho_context |
Get compressed conversation context for a session. |
| Tool | Description |
|---|---|
honcho_search |
Search across ALL sessions (no date filter). |
honcho_session_search |
Search within a specific session. |
| Tool | Description |
|---|---|
honcho_profile |
Get a peer's card (identity, attributes, relationships). |
honcho_representation |
Get a peer's representation (compressed observations). |
| Tool | Description |
|---|---|
honcho_session |
List sessions. |
honcho_session_create |
Create a new session. |
honcho_session_clone |
Clone an existing session. |
honcho_session_peers |
List/add/remove peers on a session. |
honcho_session_summaries |
Get session summaries (compressed context). |
honcho_session_context |
Get full conversation context. |
| Tool | Description |
|---|---|
honcho_peer |
List all peers. |
honcho_peer_create |
Create or get a peer. |
honcho_peer_list |
List all peers (alias). |
| Tool | Description |
|---|---|
honcho_message_send |
Send a message to a session. |
honcho_message_get |
Get a message by ID. |
| Tool | Description |
|---|---|
honcho_conclude |
Create an explicit conclusion. |
honcho_conclude_list |
List conclusions. |
honcho_conclude_query |
Semantic search across conclusions. |
| Tool | Description |
|---|---|
honcho_status |
Health check + queue stats. |
honcho_dream |
Trigger a dream (card_refresh or omni). |
honcho_queue |
Check processing queue status. |
per-directory (default): Each working directory gets its own Honcho session (e.g., dsh-home-user-project). Conversations in different directories are isolated.global: All conversations share one session regardless of directory.~/.dsh/honcho-sync-state.json — survives HMR and DSH restarts.When autoRecall is enabled, on the first user message of each session:
<memory-context> tags and injected into the system prompt| Symptom | Fix |
|---|---|
HONCHO_URL is required at boot |
Set via environment variable in ~/.config/systemd/user/dsh-web.service. |
| No sync happening | Check autoSync is true, verify Honcho URL is reachable, check logs: journalctl --user -u dsh-web \| grep honcho |
| Recall returns empty | Ensure Deriver has processed messages (check honcho_queue), wait a few minutes after first sync |
401 Unauthorized |
Check your Honcho API key in server config |
| Session not found | Verify workspace name matches your Honcho workspace exactly |
MIT
English | 中文
Honcho 记忆插件,为 DeepSeek Harness 提供持久化跨会话记忆,基于自托管的 Honcho v3 服务。
# 从 npm
dsh plugin --profile web add npm:@nanpaidashi/dsh-honcho-sync dsh web
# 或从 GitHub
dsh plugin --profile web add link:https://github.com/nanpaidashi/dsh-honcho-sync dsh web
然后重启 DSH:
systemctl --user restart dsh-web
# 或: dsh web --restart
如果你安装过旧版本(v0.6.x 或 v0.7.0):
# 重跑同一条安装命令 — 会拉取最新版并覆盖
dsh plugin --profile web add npm:@nanpaidashi/dsh-honcho-sync dsh web
# 或
dsh plugin --profile web add link:https://github.com/nanpaidashi/dsh-honcho-sync dsh web
systemctl --user restart dsh-web
安装是幂等的:原地替换插件源码文件。你的配置(环境变量)和同步状态(~/.dsh/honcho-sync-state.json)会保留 — 无数据丢失,无需重新配置。
honcho_recall、honcho_ask、honcho_remember、honcho_context)— 每会话节省约 7K tokens 的工具 schema 注入_filterRepresentation() — 从表征注入中过滤 Pattern [medium]/[low] 块、Premises/Sources 溯源链、孤立 Type/Sources 行_assembleByPriority() — 按优先级组装 memory-context(peer-card > session-summary > semantic-recall > representation)injectionMaxChars 默认 8000 → 4000,reprMaxObs 默认 8 → 4normalizeToolParameters() 将旧式参数简写转换为标准 JSON Schemaoutput.render 返回 content blocks 数组(DSH >= 2026 要求)~/.config/systemd/user/dsh-web.service 中的环境变量完成conclusions/query 需要 filters 参数/search、/peers/list、/summaries 响应解析POST /conclusions 请求体格式schedule_dream 参数名(dream_type)honcho_conclude、honcho_conclude_list、honcho_conclude_query、honcho_message_get# 1. 从 DSH 移除插件
dsh plugin --profile web remove honcho-sync dsh web
# 2.(可选)删除同步状态文件
rm ~/.dsh/honcho-sync-state.json
# 3. 重启 DSH
systemctl --user restart dsh-web
注意: 卸载插件不会删除你的 Honcho 数据。所有消息、结论和 peer 卡片仍然保留在你的 Honcho 服务器上。插件只是桥梁 — 你的记忆是安全的。
没有设置面板。 所有配置通过 DSH 服务文件中的环境变量完成。
# systemd (Linux)
nano ~/.config/systemd/user/dsh-web.service
在 [Service] 部分添加环境变量:
[Service]
Environment="HONCHO_URL=http://localhost:8000"
Environment="HONCHO_WORKSPACE=my-workspace"
Environment="HONCHO_USER_PEER=user"
Environment="HONCHO_AGENT_PEER=agent"
systemctl --user daemon-reload
systemctl --user restart dsh-web
| 变量 | 说明 | 默认值 |
|---|---|---|
HONCHO_URL |
Honcho API 地址 | (必填) |
HONCHO_WORKSPACE |
Honcho 工作区名称 | (必填) |
HONCHO_USER_PEER |
用户 peer ID | user |
HONCHO_AGENT_PEER |
Agent peer ID | agent |
注意: 高级选项(防抖、召回预算、超时)使用合理的默认值,很少需要调整。如需自定义,编辑
src/index.mjs顶部的DEFAULTS对象。
如果你还没有运行 Honcho:
# Docker 快速启动
docker run -d --name honcho \
-p 8000:8000 \
-e HONCHO_API_KEY="your-api-key" \
plasticlabs/honcho:latest
# 或从源码自托管(生产环境推荐)
# 参考: https://github.com/plastic-labs/honcho#self-hosting
创建工作区和 peers:
curl -X POST http://localhost:8000/v3/workspaces/my-workspace \
-H "Authorization: Bearer $HONCHO_API_KEY" \
-H "Content-Type: application/json"
curl -X POST http://localhost:8000/v3/workspaces/my-workspace/peers \
-H "Authorization: Bearer $HONCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "user"}'
curl -X POST http://localhost:8000/v3/workspaces/my-workspace/peers \
-H "Authorization: Bearer $HONCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "agent"}'
| 工具 | 说明 |
|---|---|
honcho_recall |
混合语义搜索(消息 + 结论)。快(2-5秒)。 |
honcho_ask |
与 peer 深度辩证推理。慢(2-5分钟)但全面。 |
honcho_remember |
保存事实/陈述到 Honcho 记忆。 |
honcho_context |
获取会话的压缩上下文。 |
| 工具 | 说明 |
|---|---|
honcho_search |
跨所有会话搜索(无日期过滤)。 |
honcho_session_search |
在特定会话内搜索。 |
| 工具 | 说明 |
|---|---|
honcho_profile |
获取 peer 卡片(身份、属性、关系)。 |
honcho_representation |
获取 peer 表征(压缩观察)。 |
| 工具 | 说明 |
|---|---|
honcho_session |
列出会话。 |
honcho_session_create |
创建新会话。 |
honcho_session_clone |
克隆现有会话。 |
honcho_session_peers |
列出/添加/移除会话中的 peer。 |
honcho_session_summaries |
获取会话摘要(压缩上下文)。 |
honcho_session_context |
获取完整对话上下文。 |
| 工具 | 说明 |
|---|---|
honcho_peer |
列出所有 peer。 |
honcho_peer_create |
创建或获取 peer。 |
honcho_peer_list |
列出所有 peer(别名)。 |
| 工具 | 说明 |
|---|---|
honcho_message_send |
向会话发送消息。 |
honcho_message_get |
按 ID 获取消息。 |
| 工具 | 说明 |
|---|---|
honcho_conclude |
创建显式结论。 |
honcho_conclude_list |
列出结论。 |
honcho_conclude_query |
跨结论语义搜索。 |
| 工具 | 说明 |
|---|---|
honcho_status |
健康检查 + 队列统计。 |
honcho_dream |
触发做梦(card_refresh 或 omni)。 |
honcho_queue |
查看处理队列状态。 |
per-directory(默认):每个工作目录对应独立的 Honcho 会话(如 dsh-home-user-project)。不同目录的对话互相隔离。global:所有对话共享一个会话,不区分目录。~/.dsh/honcho-sync-state.json — 跨 HMR 和 DSH 重启保留。当 autoRecall 启用时,每个会话的首条用户消息触发:
<memory-context> 标签中注入系统提示词| 症状 | 解决方案 |
|---|---|
启动时 HONCHO_URL is required |
通过设置面板或环境变量配置。如果设置异步加载,此消息无害。 |
| 没有同步发生 | 检查 autoSync 是否为 true,确认 Honcho URL 可达,查看日志:journalctl --user -u dsh-web \| grep honcho |
| 召回返回空 | 确认 Deriver 已处理消息(检查 honcho_queue),首次同步后等待几分钟 |
401 Unauthorized |
检查 Honcho 服务器配置中的 API key |
| Session not found | 确认 workspace 名与 Honcho 工作区完全一致 |
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。