dsh-session-sync

DSH PLUGIN通知与集成

仓库 XXGxiaoyu/dsh-session-sync

通知与集成 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

DSH 局域网会话同步:自动发现装了本插件的设备、仅存本机的设备命名、浏览/拉取/推送会话,带 SHA-256 校验。

一句话选型结论

按资料字段整理

dsh-session-sync 是通知与集成类的 DSH 可安装插件,验证等级 L5 · 运行验证通过,安全审查为低风险,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类通知与集成 收录类型可安装插件 验证等级L5 · 运行验证通过 安全审查低风险
验证等级 L5 L5 · 运行验证通过
GitHub 星标 1 复刻 0 · 未关闭 issue 0
最近更新 2026-10-23 创建于 2026-10-21
README 14.9 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add @xxgxiaoyu/dsh-session-sync
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

通知与集成
字段来自项目仓库与公开索引,中文说明由本站标注

适用场景

存储通知

上游标签

deepseekdeepseek-harnessdshdsh-pluginlansession-sync

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L5:安装和运行都在沙盒里跑通过,装完能直接用的概率高。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在通知与集成场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-session-sync当前 L5 · 运行验证通过 低风险 1 未标注 有
treg L3 · 安装规范通过 低风险 4,976 未标注 无
dsh-purge 未做沙盒验证 未标注 3,412 未标注 有
dsh-im L5 · 运行验证通过 低风险 1,837 0.1.7-rc.2 等 10 个 有
dsh-aurabot-qq 未做沙盒验证 未标注 633 未标注 有
dsh-dafeiyu L5 · 运行验证通过 低风险 425 0.1.7-rc.2 等 10 个 有

仓库档案

通知与集成
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方XXGxiaoyu仓库 dsh-session-sync · 默认分支 main
分类通知与集成notify
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言未标注仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue1 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-21 · 2026-10-23最后推送 2026-10-23
本站收录2026-10-30首次进入本站目录的时间

README 全文

14.9 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-session-sync

LAN session sync for DSH. Every DSH that has this plugin discovers the others on the local network, lists their sessions, and can pull or push conversations over plain HTTP. The nickname you give a device lives only on your machine — the peer can go offline, reboot, or change IP and come back, and you still see the name you gave it.





🌏 简体中文 · English

> 0.8.0 UI rebuild: session desk, whole-row selection, selection bar, transfer dock and settings were redrawn. The full draft (19 scenes, dark/light, zh/en) is in docs/redesign/index.html; implementation mapping and acceptance are in DESIGN.md. The whole-session file transfer design (chunks / resume) is in session-bundle-transfer.md (next phase).

✨ Features

📡 Zero-config discoveryUDP broadcast on every IPv4 interface with a 4s beacon. A peer that just appeared gets an immediate unicast reply, so new devices show up without waiting for the next round. 🏷️ Local-only nicknamesStored in /session-sync/state.json and keyed by a stable device id (uuid) — not IP, not hostname. The peer renaming itself never overwrites your label.
🗂️ Browse · pull · pushSee each device's sessions with title, cwd and time; pull one into this machine or push one of yours out. Imported rows are marked as pulled. 🔐 SHA-256 verificationExports carry sha256 = SHA-256(JSON.stringify({format, session, events})); imports compare it before writing a byte and refuse with HTTP 409 checksum-mismatch. Each row has a Verify action.
🔁 Optional auto-pullEvery 20s, pull sessions you have not pulled yet. Content fingerprints (not ids) stop two machines with auto-pull on from bouncing one conversation back and forth forever. 🎨 Native look, i18nBuilt from DSH design tokens (colors, radii, type scale, 0.2s transitions), so light/dark follow the host. Language follows DSH by default, with explicit 中文 / English overrides.
🔎 Find sessions fastSearch (press /), 全部 / 未拉取 / 已拉取 filters, sort by time or title, and ↑↓ / Space / Enter navigation. Rows stay quiet: one status chip, with 校验 and 拉取 on hover or focus. 🧰 Tidy devices & queueThe rail only selects; rename, copy address, refresh, push and forget live in the stage header ⋯. Transfers sit in a bottom dock that expands into the queue; network/advanced options stay folded.
🪟 Master / detailDevices sit in a left column (session count + chevron, the whole row is the target) while the selected device's sessions stay visible on the right — no hidden "click a card to expand". The first online device is selected automatically. 🧭 Device actionsPush here, rename, copy address, refresh and remove live in the stage header ⋯; rename happens inline in the header.
🖱️ Drag, select, dropSelect one or many sessions and drag them onto any known folder or straight onto a workspace row in DSH's own sidebar: the header takes the whole group, a session row takes the pointer's position and shows an insertion line between rows. Every drop asks for confirmation and names the workspace it will land in. 🚦 Confirmed transfer queueRepeated pushes/pulls are detected up front; a dialog lets you keep the local copy, overwrite it, or drop that single item. The rest of the queue keeps running in order.
⚡ One-click syncSync all / Push all plan the whole device in one go, skip sessions already present by content fingerprint, and report each row as done, skipped or failed. 🌐 Cross-subnet scanningBroadcast stays on the local segment; add CIDRs, IPs or ip:port under Cross-subnet scan. CIDRs get silent UDP discovery packets, single IPs are also probed over HTTP on 47802–47817 — a firewall that drops UDP no longer hides the peer.
🚦 Queue that shows its workEach transfer is a card with spinner, measured duration, failure reason and a progress track; pulls stream their bytes so the card and the sticky bar show live percentages. The queue runs several workers sized from the CPU count (capped at 5), or a fixed 1–16 concurrency you choose.

Three UI promises

  • “This device” is always the first row, and one IP is never two devices. The card shows this machine's name, LAN address:sync port and running version. Any peer whose address belongs to this host is grouped underneath it as “other DSH instances on this machine” (browsable and pushable, so cross-profile sync still works) instead of counting as a device — the list and its counters only ever mean other machines.
  • Untitled sessions carry #first-8-chars-of-session-id. A pile of “Untitled” rows looks identical; the id is what tells them apart. The pull plan's “already present” flag is keyed by the same peer + session id, so renaming a session never turns a duplicate into a fresh copy.
  • A crashing UI is never blank. Render errors hit an error boundary that prints platform, Node version, host version, ports, UA and a stack summary, with Reload / Copy diagnostics. If Windows still shows nothing, paste that block into an issue.

🚀 Installation

From npm (scoped name; the unscoped dsh-session-sync belongs to another project):

dsh plugin --profile web add dsh-session-sync-xxg

Or from GitHub to track the latest commit:

dsh plugin --profile web add github:XXGxiaoyu/dsh-session-sync

Requires DSH 0.2.1-rc.2 (the version bundled with the current desktop app) and Node 22+.

Then restart the DSH desktop app (host-side changes load at boot; open pages pick up the new UI on refresh). The page footer shows the build that is actually running — if it reads an older number than the latest release, the process has not been restarted yet. The install is auto-activated: the package declares dsh.bundle, so dsh plugin add adds it to dsh.profile.bundles on its own.

Releases:

Manual install from a local checkout

// ~/.dsh/profiles//package.json
{
"dependencies": {
"dsh-session-sync-xxg": "link:/absolute/path/to/dsh-session-sync"
},
"dsh": {
"profile": {
"bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-session-sync-xxg"]
}
}
}
cd ~/.dsh/profiles/ && pnpm install

Confirm it loaded — the log shows:

[dsh-session-sync] ready: device , sync port 47802, discovery port 47801
[dsh-session-sync] discovered  (192.168.1.7:47802)

🧭 Where it lives

A Session Sync row appears under Plugins in the left sidebar (sidebar.panellist + keyed main panel, id session-sync). The same component is also registered as Settings → Session Sync (settings.section).

  • This machine — the name other devices see; changing it broadcasts immediately.
  • Devices — online/offline, last heartbeat, session count, platform and version.
  • Rename / Forget — a per-device nickname for this machine only. Offline devices keep their row (and their nickname), greyed out.
  • Sessions / Pull / Push — list a peer's sessions, copy one here, or send one over.
  • Verify — re-fetch the peer's payload, recompute SHA-256 and compare it with the local copy (sha256 2b12f7854d80… verified).
  • Integrity, not identity. A digest proves the bytes match; it does not prove who sent them — anyone can recompute it. So verification stays automatic and fail-closed, and there is no per-transfer “confirm the hash” prompt (that only trains people to click through). When you genuinely need authenticity, copy the full digest and compare it out-of-band (phone, terminal); the copy action sits next to the verified row.
  • Sync settings — UI language, auto-pull, and manual peer addresses for networks where broadcast is blocked (ip or ip:udpPort, one per line).

🌏 UI language

Option Behavior
Follow DSH (default) Use DSH's current language. DSH already resolves the system language, so non-Chinese systems get English, Chinese systems get Chinese
中文 Always Chinese
English Always English
settings.locale = 'auto' | 'zh' | 'en'   // persisted in /session-sync/state.json

The plugin reads ctx.locale.getSnapshot().active (zh* → Chinese, everything else → English) and only falls back to navigator.languages when no locale service exists. A language change is written to disk before the UI switches, so it never reverts on the next open. Sidebar/settings labels are resolved by the host, so the plugin re-registers its slots when the language changes — the page and the sidebar row never disagree.

🎨 Look and motion

The UI uses DSH's own CSS variables rather than copied hex values: --dsw-alias-* for colors, --dsw-radius-*, the --dsw-font-* scale, and var(--ds-transition-duration) var(--ds-ease-in-out) for every transition. Layout follows the built-in settings pages — title + muted note on the left, control on the right, .5px dividers, 32px inputs/selects, 36×22 pill switches — so it stays consistent in both themes and in narrow windows.

⚙️ Configuration (loader row config)

Key Default Meaning
name hostname Initial display name (the GUI value wins afterwards)
lanPort 47802 Sync HTTP port; tries the next 16 ports when busy
discoveryPort 47801 UDP discovery port
token none If set, LAN HTTP calls must send x-dsh-session-sync-token
home $DSH_HOME or ~/.dsh Root for state and sessions
autoPullIntervalMs 20000 Auto-pull interval (lowered in tests)
verbose true Turn plugin logging off
subnets [] Extra CIDRs/IPs/ip:port for devices that UDP broadcast cannot reach (e.g. 192.168.5.0/24, 10.0.0.7, 10.0.0.7:47802). CIDRs use UDP discovery packets; bare IPs are also probed over HTTP on 47802–47817

🔌 LAN protocol (/v1/*)

Binds 0.0.0.0; every route except /v1/health requires x-dsh-session-sync: 1.

Method Path Purpose
GET /v1/health {ok:true} liveness
GET /v1/info Device id, name, session count, version
GET /v1/sessions?limit=N Session summaries
GET /v1/sessions/:id Export {format:'dsh-session-sync/1', session, events, sha256}
POST /v1/sessions Import the same payload (verified when sha256 is present), returns the new id; ?force=1 skips the receiver-side fingerprint check

Discovery is a UDP broadcast: every 4s a dsh-session-sync/hello datagram ({id, name, port, platform, version, sessions}) goes to each IPv4 interface's broadcast address, 127.0.0.1, and any configured seeds; unknown ids are answered by unicast right away.

The GUI side (/session-sync/api) runs on DSH's own loopback web server and is fenced by the host connection policy; /v1/* is the only surface exposed to the LAN.

🧵 Design notes

  • Nicknames are keyed by device id, not IP. deviceId is a uuid generated on first start; peers[].customName is yours alone.
  • Imports use the official persistence service — ctx.sessionPersistence.create() → append() → flush(), with a v4 header that keeps only the allowed keys (version/id/createdAt/cwd/isSeeded/delegationDepth/parentSession/agentPreset). One extra type is rejected with format v4 header has unexpected field type.
  • Imports keep the source createdAt, re-index ids and seq. The id must be unique per machine; seq starts at 0 and stays contiguous; createdAt is preserved so content fingerprints agree.
  • Cross-machine cwd. The source cwd is kept when it exists here, otherwise it falls back to process.cwd() — a session pointing at a path that does not exist would vanish from the workspace list.
  • SHA-256 is byte-exact. Exports and imports serialize the same object, so key order is identical and digests are comparable. Mismatch aborts before persistence.
  • Your own machine is not a device. The device list only ever holds other machines: peers on this host's address are dropped on arrival (and pruned from history on boot), and several peers on one IP collapse into the freshest row. Rename this machine in the 本机 section; the counter only means other machines.
  • Fingerprints, not ids, dedupe auto-pull. state.signatures[sha1(createdAt, event shape, first preview)] is recorded on export and import; auto-pull skips anything already known. Without it, two auto-pulling machines would keep re-importing the same conversation under new ids.
  • Everything local stays local. Nicknames, import records and settings never leave /session-sync/state.json.

🩺 Troubleshooting

A build before 0.5.5 imported sessions with isSeeded: false but kept the peer's inherited end-seed marker, so DSH refused to open them (released v2 unseeded Session contains an inherited end-seed marker). Open Network & advanced → Repair old sessions to fix everything under /sessions, or run it offline:

node scripts/repair-sessions.mjs            # rewrite affected logs, keep *.bak
node scripts/repair-sessions.mjs --dry-run  # only report what would change

🧪 Development

node --test --test-force-exit --test-timeout=120000 'test/*.test.mjs'

56 cases: client bundle contract, dictionary parity, footer, stale-host hint and version pinning (13), jsdom mount and interactions (5), two-instance end-to-end — discovery, rename persistence, restart, pull/push, auto-pull dedupe, receiver dedupe, SHA-256 tamper rejection and HTTP-only discovery (8), and the probe fallback contract (7).

Run a headless instance without the desktop shell:

DSH_HOME=/tmp/dsh-ss-home node /lib/bin.js --profile ssync --no-open --host 127.0.0.1 --port 4399

--profile must come before launcher flags such as --no-open; web --profile x fails with select a profile only once.

📄 License

MIT

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
dsh-session-sync 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add @xxgxiaoyu/dsh-session-sync` 即可。

dsh-session-sync 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-session-sync 安全吗?

低风险。

dsh-session-sync 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-session-sync 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

同名或近似条目

6 条
不同作者的仓库分开列,请确认你要装的是哪一个
通知与集成
按星标排序,可作替代方案

treg

treg

Treg 是面向 Agent 工具的 OpenRouter,聚合 60 个提供商的 2896 个端点,按调用计费,统一令牌访问,无需注册各供

L3 · 安装规范通过 4,976 星

dsh-purge

dsh-purge

dsh-purge Community · DeepSeek Harness 社区维护版:宿主兼容、状态诊断、提示词管理、更新与本机备份回滚

未标注验证等级 3,412 星

dsh-im

dsh-im

将IM机器人接入DeepSeek Harness,支持飞书、微信、钉钉等九种渠道,通过扫码或凭据配置,统一管理多机器人连接。

L5 · 运行验证通过 1,837 星

dsh-aurabot-qq

dsh-aurabot-qq

让 DeepSeek Harness 里的 AI 以「大肥鱼」人格住进 QQ,通过 OneBot v11 网关聊天、发表情语音、写空间日记并

未标注验证等级 633 星

dsh-dafeiyu

dsh-dafeiyu

DSH 大肥鱼是一款由 DeepSeek Harness 真实工作状态驱动的桌面伴侣插件,以始终置顶的透明窗口实时展示 Agent 的思考、

L5 · 运行验证通过 425 星

dsh-trading

dsh-trading

L3 · 安装规范通过 235 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。