dsh-honcho-sync

6Star0Fork0Issue0Watching
机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科
语言
JavaScript
License
MIT
分支
main
dsh-plugindsh-plugins

安装

$ dsh plugin --profile web add github:nanpaidashi/dsh-honcho-sync

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 nanpaidashi/dsh-honcho-sync:先查看仓库 https://github.com/nanpaidashi/dsh-honcho-sync 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

Honcho Memory Plugin for DeepSeek Harness — give your AI persistent, cross-session memory backed by a self-hosted Honcho v3 service.

中文 | English


What it does

  • Auto-sync: Every conversation turn is automatically synced to Honcho (with debounce). Sync cursors persist across restarts.
  • Hybrid recall: Semantic search across both raw messages AND reasoned conclusions (explicit/deductive/inductive) in parallel.
  • Memory injection: On session start, relevant peer cards, representations, and semantic recall results are injected into the system prompt.
  • 25 tools: Full Honcho v3 API surface exposed as DSH tools — search, profile, session management, peer management, conclusions, dreaming, queue monitoring.

Requirements

  • DeepSeek Harness (DSH) with web profile
  • A running Honcho v3 instance (self-hosted)
  • Node.js >= 18

Installation

# 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

Upgrading

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.

v0.8.0 → v0.8.1 changelog

  • Context efficiency: Reduced registered tools from 25 to 4 (honcho_recall, honcho_ask, honcho_remember, honcho_context) — saves ~7K tokens of tool schema injection per session
  • Injection quality: Added _filterRepresentation() — removes Pattern [medium]/[low] blocks, Premises/Sources provenance chains, and orphan Type/Sources lines from representation injection
  • Injection quality: Added _assembleByPriority() — assembles memory-context parts by priority (peer-card > session-summary > semantic-recall > representation) instead of fixed order
  • Injection budget: injectionMaxChars default 8000 → 4000, reprMaxObs default 8 → 4
  • Tool descriptions: Shortened all tool descriptions to ~100 chars

v0.7.x → v0.8.0 changelog

  • DSH 0.1.0-rc.8 compatibility: Added normalizeToolParameters() to convert legacy parameter shorthand to standard JSON Schema
  • DSH 0.1.0-rc.8 compatibility: Added output.render returning content blocks array (required by DSH >= 2026)
  • README: Removed settings panel references — configuration is done via environment variables in ~/.config/systemd/user/dsh-web.service
  • Fixed conclusions/query requiring filters parameter
  • Fixed response parsing for /search, /peers/list, /summaries
  • Fixed POST /conclusions body format
  • Fixed schedule_dream parameter name (dream_type)
  • Added 4 tools: honcho_conclude, honcho_conclude_list, honcho_conclude_query, honcho_message_get
  • Hybrid recall now searches messages + conclusions in parallel

Uninstalling

# 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.

Configuration

There is no settings panel. All configuration is done via environment variables in your DSH service file.

Step 1: Edit the 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"

Step 2: Apply the changes

systemctl --user daemon-reload
systemctl --user restart dsh-web

Configuration reference

VariableDescriptionDefault
HONCHO_URLHoncho API base URL(required)
HONCHO_WORKSPACEHoncho workspace name(required)
HONCHO_USER_PEERPeer ID representing the useruser
HONCHO_AGENT_PEERPeer ID representing the agentagent

Note: Advanced options (debounce, recall budget, timeouts) use sensible defaults and rarely need tuning. If you do need to customize them, edit the DEFAULTS object at the top of src/index.mjs.

Honcho Server Setup

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"}'

Tools

Memory

ToolDescription
honcho_recallHybrid semantic search (messages + conclusions). Fast (2-5s).
honcho_askDeep dialectic reasoning with a peer. Slower (2-5min) but thorough.
honcho_rememberSave a fact/statement to Honcho memory.
honcho_contextGet compressed conversation context for a session.
ToolDescription
honcho_searchSearch across ALL sessions (no date filter).
honcho_session_searchSearch within a specific session.

Profile

ToolDescription
honcho_profileGet a peer's card (identity, attributes, relationships).
honcho_representationGet a peer's representation (compressed observations).

Session

ToolDescription
honcho_sessionList sessions.
honcho_session_createCreate a new session.
honcho_session_cloneClone an existing session.
honcho_session_peersList/add/remove peers on a session.
honcho_session_summariesGet session summaries (compressed context).
honcho_session_contextGet full conversation context.

Peer

ToolDescription
honcho_peerList all peers.
honcho_peer_createCreate or get a peer.
honcho_peer_listList all peers (alias).

Message

ToolDescription
honcho_message_sendSend a message to a session.
honcho_message_getGet a message by ID.

Conclude

ToolDescription
honcho_concludeCreate an explicit conclusion.
honcho_conclude_listList conclusions.
honcho_conclude_querySemantic search across conclusions.

Admin

ToolDescription
honcho_statusHealth check + queue stats.
honcho_dreamTrigger a dream (card_refresh or omni).
honcho_queueCheck processing queue status.

Session Strategy

  • 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.

Auto-sync & Persistence

  • Messages are synced with a configurable debounce (default 3s).
  • Sync cursors are persisted to ~/.dsh/honcho-sync-state.json — survives HMR and DSH restarts.
  • On restart, only new events since the last cursor are synced (no duplicates).

Memory Injection

When autoRecall is enabled, on the first user message of each session:

  1. Peer cards (profile) for both peers are fetched
  2. Representations are fetched and deduplicated (semantic overlap removal)
  3. A semantic search query is run using the user's message as the query
  4. Results are wrapped in <memory-context> tags and injected into the system prompt

Privacy

  • All data stays on your Honcho server. No third-party data transmission.
  • The plugin does not log message content.
  • Configuration (URL, workspace, peer IDs) is stored in DSH settings, not in the plugin source.

Troubleshooting

SymptomFix
HONCHO_URL is required at bootSet via environment variable in ~/.config/systemd/user/dsh-web.service.
No sync happeningCheck autoSync is true, verify Honcho URL is reachable, check logs: journalctl --user -u dsh-web | grep honcho
Recall returns emptyEnsure Deriver has processed messages (check honcho_queue), wait a few minutes after first sync
401 UnauthorizedCheck your Honcho API key in server config
Session not foundVerify workspace name matches your Honcho workspace exactly

License

MIT


中文说明

English | 中文

Honcho 记忆插件,为 DeepSeek Harness 提供持久化跨会话记忆,基于自托管的 Honcho v3 服务。

功能

  • 自动同步:每轮对话自动同步到 Honcho(带防抖)。同步游标跨重启持久化。
  • 混合召回:同时搜索原始消息和推理结论(显式/演绎/归纳),并行执行。
  • 记忆注入:会话开始时,将相关的 peer 卡片、表征和语义召回结果注入系统提示词。
  • 25 个工具:覆盖 Honcho v3 完整 API — 搜索、画像、会话管理、peer 管理、结论、做梦、队列监控。

依赖

  • DeepSeek Harness (DSH) web profile
  • 一个运行中的 Honcho v3 实例(自托管)
  • Node.js >= 18

安装

# 从 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)会保留 — 无数据丢失,无需重新配置。

v0.8.0 → v0.8.1 变更

  • 上下文效率:注册工具从 25 个精简到 4 个(honcho_recallhoncho_askhoncho_rememberhoncho_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 → 4
  • 工具描述:所有工具描述精简到 ~100 字符

v0.7.x → v0.8.0 变更

  • DSH 0.1.0-rc.8 兼容:添加 normalizeToolParameters() 将旧式参数简写转换为标准 JSON Schema
  • DSH 0.1.0-rc.8 兼容:添加 output.render 返回 content blocks 数组(DSH >= 2026 要求)
  • README:移除设置面板说明 — 配置通过 ~/.config/systemd/user/dsh-web.service 中的环境变量完成
  • 修复 conclusions/query 需要 filters 参数
  • 修复 /search/peers/list/summaries 响应解析
  • 修复 POST /conclusions 请求体格式
  • 修复 schedule_dream 参数名(dream_type
  • 新增 4 个工具:honcho_concludehoncho_conclude_listhoncho_conclude_queryhoncho_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 服务文件中的环境变量完成。

第一步:编辑 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_URLHoncho API 地址(必填)
HONCHO_WORKSPACEHoncho 工作区名称(必填)
HONCHO_USER_PEER用户 peer IDuser
HONCHO_AGENT_PEERAgent peer IDagent

注意: 高级选项(防抖、召回预算、超时)使用合理的默认值,很少需要调整。如需自定义,编辑 src/index.mjs 顶部的 DEFAULTS 对象。

Honcho 服务器搭建

如果你还没有运行 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获取完整对话上下文。

Peer

工具说明
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:所有对话共享一个会话,不区分目录。

自动同步与持久化

  • 消息以可配置的防抖间隔同步(默认 3 秒)。
  • 同步游标持久化到 ~/.dsh/honcho-sync-state.json — 跨 HMR 和 DSH 重启保留。
  • 重启后只同步游标之后的新事件(无重复)。

记忆注入

autoRecall 启用时,每个会话的首条用户消息触发:

  1. 获取两个 peer 的卡片(画像)
  2. 获取表征并去重(语义重叠移除)
  3. 以用户消息为查询执行语义搜索
  4. 结果包裹在 <memory-context> 标签中注入系统提示词

隐私

  • 所有数据保留在你的 Honcho 服务器上。无第三方数据传输。
  • 插件不记录消息内容。
  • 配置(URL、工作区、peer ID)通过环境变量存储在 DSH 服务文件中,不在插件源码里。

故障排查

症状解决方案
启动时 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

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/nanpaidashi/dsh-honcho-sync)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录