Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
会话与消息 #dsh-plugin

dsh-session-handoff

把长会话交接到新会话:LLM 生成摘要,创建同工作区的新 session 并自动打开。

weiye6 @weiye6 ⬇ 1 ★ 1 main

安装

dsh plugin --profile web add github:weiye6/dsh-session-handoff
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

把长会话交接到新会话:LLM 生成摘要,创建同工作区的新 session 并自动打开。

该插件未提供要点说明,请参考仓库 README。

dsh-plugin
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/weiye6/dsh-session-handoff
许可证MIT
主要语言main
下载量1
GitHub 星标1
最近推送2026-08-17
收录日期2026-09-19
分类会话与消息

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-session-handoff

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-green.svg)](package.json)
[![dsh](https://img.shields.io/badge/dsh-0.1.0--rc.5-8a2be2.svg)](https://github.com/deepseek-ai/deepseek-harness)

English | [中文](README.zh-CN.md)

**Hand your long DSH session over to a clean one.** `/handoff` summarizes the recent
conversation with an LLM, creates a **brand-new session + agent** in the same workspace
(no history copied), injects a structured handoff document as its first message, and
**auto-opens** it — the model continues from the summary instead of replaying the whole
old history. The origin session is untouched.

## Features

- **One command** — `/handoff [|all]` (defaults to the last 8 user messages; `all`
  covers everything)
- **Clean handoff** — a fresh session with the origin's workspace, model route, and
  agent preset (system prompt / tools / skills), no context bloat
- **Structured summary** — 任务目标 / 当前进度 / 关键决策 / 涉及文件 / 下一步 / 遗留问题
- **Auto-open** — the client half waits for the new session to be ready and navigates
  to it (each child auto-opens once; history replay never re-jumps)
- **Robust by default** — summaries run with thinking off (fast, cheap), oversized
  excerpts keep the newest messages instead of erroring, and finish reasons
  (`max-tokens` / `error` / `aborted`) are translated into actionable errors
- **Zero core changes** — a single `dsh.bundle.patch` row; only public services are used

## Install

```sh
# 1. Build the bundle from source (or grab a release tarball)
npm install && npm run build && npm pack     # → dsh-session-handoff-0.2.0.tgz

# 2. Install into your web profile
dsh plugin --profile web add ./dsh-session-handoff-0.2.0.tgz

# 3. Restart and verify the row is mounted
dsh web
dsh --profile web --dump-config | grep handoff
# expected: # == dsh-session-handoff / - id: handoff / - name: dsh-session-handoff
```

> Dev-time source link (`dsh plugin --profile web add D:/path/to/dsh-session-handoff`) requires
> the source dir's `node_modules` to resolve `@deepseek-ai/*` peers; prefer the tarball.

## Usage

Type in any conversation's input box:

```text
/handoff          # summarize the last 8 user messages (default)
/handoff 20       # summarize the last 20 (same as turns=20)
/handoff all      # summarize every user message (same as turns=all)
```

What happens:

1. A command card shows "summarizing…";
2. An LLM produces the handoff document (goal / progress / decisions / files / next
   steps / open questions), which becomes the new session's first message;
3. The new session **auto-opens**; the origin session stays intact and is linked back.

> ⚠️ **Privacy**: the recent conversation text (user + assistant messages in the
> requested window) is sent to the configured model to produce the summary.

## Configuration

```yaml
- id: handoff
  name: dsh-session-handoff
  config:
    turns: 8            # user-message rounds to extract (1–50)
    maxInputChars: 24000  # byte cap for the summary input (oldest dropped first)
    maxTokens: 2000     # summary output budget
    reasoningEffort: off  # off (default, fast/cheap) | high | max | inherit
    timeoutMs: 120000   # summary call timeout
    # provider: deepseek-official   # optional fixed model route
    # model: deepseek-v4-flash      # must be paired with provider
```

Without `provider`/`model`, the current session's latest logged model route
(`session.requestHeader()`) is used.

## How it works

- **Host half** (`index.mjs`, plain ESM): public services only — `commands`
  (`/handoff`), `llm` (`ctx.llm.stream`, following official `session-title-llm`),
  `agents` (`ctx.agents.create` — session **and** agent together, inheriting the
  origin's cwd / model route / agent preset via `agentPresets.mount`), plus
  `workspaceRegistry.attachSession` (same-workspace grouping) and
  `sessionTitle.rename` (a `handoff: ` title).
- **Client half** (`src/client/`, tsdown → `lib/client.js`): a `handoff`
  conversation node matches the `/handoff` success event and auto-opens the child
  session (polling until it is addressable, deduped via localStorage).

## Development

```sh
npm install        # devDeps: tsdown / typescript / @types/react / vitest / jsdom ...
npm test           # 19 tests: 15 host+client pure functions + 4 client component
npm run typecheck
npm run build      # tsdown → lib/client.js (CJS factory, official client-module format)
npm pack           # prepack runs typecheck + build automatically
```

Publish checklist: add the `dsh-plugin` GitHub topic → open a PR to
[awesome-deepseek-harness](https://github.com/0xsline/awesome-deepseek-harness) →
optionally `npm publish`.

## Known limitations

- The handoff document lives in the session only; it is not written to disk
  (`HANDOFF.md` is a future enhancement).
- Targets the rc.5 public contracts; re-check on DSH upgrades.
- The auto-open component has pure-function tests only; jsdom component tests are
  pending.

## License

[MIT](./LICENSE)

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。