为 DSH Web 端提供 `/export` 斜杠命令和会话页头按钮,把当前 Session 打成包含子会话与附件的 ZIP 文件下载到本地。
ⓘ 此插件是大仓库 op7418/pilot-harness 的子包,星数与活跃度统计的是整个仓库。
- 语言
- TypeScript
- License
- MIT
- 分支
- main
安装
$ dsh plugin --profile web add github:op7418/pilot-harness/packages/session-query/session-log-export在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
对话式安装
帮我安装 DeepSeek Harness 插件 op7418/pilot-harness/packages/session-query/session-log-export:先查看仓库 https://github.com/op7418/pilot-harness.git 确认安全性,然后执行安装命令并验证插件加载成功。
把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。
一句话定位
为 DSH Web 端提供一键下载 Session 日志的能力:在会话页头增加"导出日志"按钮,并在对话中识别 /export 斜杠命令,触发浏览器下载一个包含当前 Session、子 Session 和附件的 ZIP 文件。
核心能力
- 注册
/export斜杠命令,将用户的下载意图路由到浏览器侧的下载控制器 - 在 Session 页头工具栏渲染一个 111×32 的"导出日志"按钮,与斜杠命令共用同一个下载流程
- 自动执行 HEAD 预检,确认 Host 端
/api/session.export可用后再交由浏览器下载管理器接管,避免下载半途中断 - 通过统一弹窗展示"准备中 / 下载已开始 / 失败"三种状态
- 每个 Session 同时只允许一项下载,重复点击会复用同一笔进行中的下载操作
- 插件卸载(dispose)时会取消所有未完成的预检请求
技术实现
- 语言: TypeScript(含 React 18 浏览器端组件)
- 关键依赖:
@deepseek-ai/dsh-commands(注册/export斜杠命令)、@deepseek-ai/dsh-client-ui-trajectory(工具栏槽位)、@deepseek-ai/dsh-client-runtime(会话快照存储)、@deepseek-ai/dsh-client-ui-primitives(按钮、图标、弹窗) - 架构模式: 双面插件——Host 面注册
/export命令并触发command/executed事件;Browser 面订阅该事件并驱动下载控制器;实际 ZIP 生成由宿主侧的dsh-host-apiproxy拥有 - 入口文件:
src/index.ts(Host 面命令注册)、src/client/index.ts(Browser 面下载控制器与槽位注入)
适用场景
适合需要把 AI 助手某次完整对话(含子任务、附件、命令历史)打包分享给同事、归档留底,或上传到工单系统的用户。点击导出即可获得一个完整可解包的 ZIP,无需逐条复制对话内容。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| DSH | 0.1.0-rc.7 | 仅支持 Web bundle;需同时安装 dsh-host-apiproxy(提供 ZIP 端点)、dsh-commands、dsh-client-ui-commands、dsh-client-ui-trajectory |
| Node.js | >=22.19.0 | 沿用宿主根包 package.json 中 engines.node 的版本要求 |
| 平台 | 跨平台 | 浏览器侧运行,无原生模块,依赖宿主后端的持久化后端 |
安装方式
dsh plugin --profile web add github:op7418/pilot-harness/packages/session-query/session-log-export
配置项
本插件无需额外配置。安装到 Web profile 后,重启 profile 即可在 Session 页头看到"导出日志"按钮,并在对话中识别 /export 命令。
常见问题
Q: 怎么下载某个 Session 的日志?
A: 在浏览器界面的 Session 页头右侧点击"导出日志"按钮,或在对话中输入 /export 并发送,都会触发浏览器下载一个 ZIP 文件。
Q: ZIP 包里包含哪些内容?
A: 包含当前 Session、所有子 Session 以及附件。ZIP 的生成、流式读取、错误处理均由后端的 dsh-host-apiproxy 完成,本插件只负责发起下载。
Q: 一个 Session 可以同时下载多次吗?
A: 不行。每个 Session 同时只允许一项下载,重复点击按钮或重复发送 /export 会复用同一笔进行中的下载操作,不会启动新的下载。
Q: 支持 SQLite 后端的 Session 导出吗?
A: 当前不支持。下载端点要求持久化后端提供按 Session 的原始工件;随附的 JSONL 后端支持明文和 zstd 工件,SQLite 导出不在本次范围内。
Q: 下载失败时会怎样?
A: 下载开始前(HEAD 预检)发现的失败由插件自带弹窗报告并显示错误信息;浏览器已接收下载请求后发生的失败则由浏览器自身的下载管理器提示,不会再弹本插件的弹窗。
Q: 关闭弹窗会取消正在进行的下载吗?
A: 不会。关闭弹窗只是关闭 UI,不会取消浏览器正在进行的下载,该操作完成后也不会重新弹出弹窗。
Q: 怎么卸载?
A: 运行 dsh plugin --profile web remove @deepseek-ai/dsh-session-log-export,然后重启 Web profile 即可。
上手难度
入门 — 安装即用,无需任何额外配置;界面增加一个按钮 + 一个斜杠命令,浏览器侧完成所有交互逻辑。
已知问题与限制
- 仅 Web bundle 可用,不影响 CLI、ACP 等其他 profile。
- 依赖持久化后端能提供按 Session 的原始工件;SQLite 后端的导出当前未实现。
- 下载目标是浏览器本地,目标路径由浏览器决定,无法指定 Host 端路径或调用原生文件夹选择器。
- HEAD 预检只报告 ZIP 流式开始前的错误;浏览器接收下载后,子 Session 或附件的读取失败由浏览器下载管理器提示,不会通过本插件的弹窗展示。
Pilot Harness
English | 中文
A CodePilot-inspired desktop client and plugin suite for DeepSeek Harness.
Run the DeepSeek Harness plugin runtime as a focused native app, manage providers and multimodal models visually, and keep desktop additions isolated as ordinary Harness plugins.
Quick start · Plugins · Architecture · MIT License
Why Pilot Harness
DeepSeek Harness has a powerful “everything is a plugin” architecture, but its default experience is designed around a CLI-launched Web UI. Pilot Harness keeps that runtime model and adds the parts expected from a daily desktop product:
- A real desktop app — Electron packages the local Harness runtime for macOS, Windows, and Linux, owns native window behavior, and provides a recovery screen when startup needs attention.
- A calmer CodePilot-inspired interface — consistent tokens, radii, menus, hover states, settings cards, Markdown, conversation/trajectory navigation, and platform-aware title bars.
- Provider and model management — connect supported providers, declare an OpenAI-compatible endpoint, manage credentials separately from settings, browse the live model catalog, and identify image-capable models.
- Workspace context without clutter — project-aware conversation rows show branch, state, reminder summary, mode, and model details, while Files opens as a true right sidebar.
- Plugin-first extensions — the theme, Worktree sidebar, Schedule summary, and Session-log export remain Cordis/DeepSeek Harness rows rather than desktop-only business logic.
- Reversible customization — disabling the CodePilot theme row removes its product mark and visual overrides so the stock Harness presentation can take over again.
Pilot Harness does not replace the DeepSeek Harness agent loop, Session log, tool pipeline, provider contracts, or RPC implementation. Electron owns packaging and native integration; the composed Harness plugin tree remains the application runtime.
Quick Start
Download the installer for your system from GitHub Releases:
| Platform | Download | Install and handle the security prompt |
|---|---|---|
| macOS (Apple Silicon) | DMG installer ZIP app | Open the DMG, drag pilot-harness.app into Applications, and launch it normally. A formal Release is published only after its Developer ID signature has been verified. Because notarization is not enabled yet, Gatekeeper may still block the first launch; in that case open System Settings → Privacy & Security, click Open Anyway, then confirm Open. Do not run xattr or disable Gatekeeper for a formal Release. If macOS reports that the signed app is damaged, delete it, verify the Release checksum, and download it again instead of bypassing the warning. Apple's security instructions. |
| Windows (x64) | EXE installer | Run the EXE. If Microsoft Defender SmartScreen says Windows protected your PC, first confirm that the file came from this Release, then choose More info → Run anyway. Do not disable SmartScreen globally. A managed computer may hide this option; contact its administrator instead. Microsoft's SmartScreen explanation. |
| Linux (x64) | AppImage DEB RPM | DEB: sudo apt install ./Pilot-Harness-Linux-amd64.debRPM: sudo dnf install ./Pilot-Harness-Linux-x86_64.rpmAppImage: chmod +x Pilot-Harness-Linux-x86_64.AppImage, then ./Pilot-Harness-Linux-x86_64.AppImage. If the file manager blocks execution, enable Allow executing file as program in file properties. The preview packages are unsigned, so only accept a package-manager warning after confirming the official Release source. |
The table links to formal end-user Releases, not the seven-day Actions preview artifacts. Formal macOS files must pass Developer ID verification before publication; while they remain unnotarized, the only expected extra step is Open Anyway in System Settings. Preview macOS artifacts are ad-hoc signed for CI verification and are not the normal installation path. Once notarization is enabled, the Open Anyway step should normally disappear and this guide must be updated with the release pipeline. Windows and Linux preview installers remain unsigned. Only override an operating-system warning for files downloaded from this repository's official GitHub Release; do not turn off platform security globally.
After installation, open Pilot Harness, select a Workspace, then go to Settings → Providers to connect a provider and choose one of its available models. No separate DeepSeek Harness installation is required for the desktop app. Source setup and packaging instructions live in Development, not in the user installation path.
What is included
| Area | What Pilot Harness adds | Ownership |
|---|---|---|
| Desktop shell | Native window, local runtime lifecycle, directory dialog, recovery, installers, and platform icons | Electron app |
| Visual system | CodePilot-inspired design tokens and component contracts | @deepseek-ai/dsh-client-ui-codepilot-theme |
| Workspace Files | Right sidebar, file count, branch summary, row actions, and @path insertion | @deepseek-ai/dsh-ui-worktree |
| Reminder summary | Active reminder count and nearest scheduled time in Session hover details | @deepseek-ai/dsh-ui-schedule-summary |
| Session export | Per-Session ZIP export from the Trajectory toolbar and /export | @deepseek-ai/dsh-session-log-export |
| Providers and models | Configurable adapter, credential/settings UI, live catalog, and multimodal labels | Existing Harness plugins plus the Pilot Harness desktop profile |
The provider/model experience is deliberately a profile composition, not a new provider implementation. It mounts existing adapter, Settings, and Credentials contracts, then replaces the desktop placeholder only after a real provider advertises a usable model.
Use the plugins independently
The desktop client already includes every plugin below. If you use a local DeepSeek Harness Web profile instead, install only the feature you want with one command; each release asset is a prebuilt dsh.bundle, so no repository clone, YAML patch, or local build is required.
CodePilot theme
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-client-ui-codepilot-theme-0.1.0-rc.5.tgz
Applies the Pilot Harness visual system and product mark. Removing the plugin restores the stock Harness presentation. See theme details.
Files sidebar
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-ui-worktree-0.1.0-rc.5.tgz
Adds the Workspace-confined right file sidebar, file count, branch summary, row actions, and @path insertion. See Files plugin details.
Reminder summary
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-ui-schedule-summary-0.1.0-rc.5.tgz
Adds active-reminder metadata to Session hover details while the upstream Schedule plugin remains the reminder authority. See reminder plugin details.
Session-log export
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-session-log-export-0.1.0-rc.7.tgz
Adds per-Session ZIP export to the Trajectory toolbar and the /export command. See export plugin details.
Restart the Web profile after installation and use dsh --profile web --dump-config to confirm the added row. Files and Reminder summary require the Pilot Harness UI slot contracts included in Pilot Harness v0.1.0; older upstream Harness builds can install their bundles but cannot render those two UI contributions.
Remove a plugin with the same package name shown in its details page, for example:
dsh plugin --profile web remove @deepseek-ai/dsh-ui-worktree
Development
git clone https://github.com/op7418/pilot-harness.git
cd pilot-harness
pnpm install
pnpm run desktop:dev
Run the desktop checks with:
pnpm run desktop:test
pnpm --filter @deepseek-ai/dsh-desktop run typecheck
pnpm --filter @deepseek-ai/dsh-desktop run test:e2e
Official installers are never built or uploaded from a developer machine. Every verified push to main, and a manual workflow dispatch without a release tag, produces seven-day Actions preview artifacts on native macOS, Windows, and Linux runners. A version-matched v* tag starts the formal path, verifies the platform artifacts and macOS Developer ID signature, generates SHA256SUMS.txt, and publishes the GitHub Release.
The Sync DeepSeek Harness upstream workflow checks the newest non-draft official release every day at 09:00 Asia/Shanghai. A clean update is merged without force-pushing, verified, committed to main, and dispatched to the same native release pipeline as v<upstream-version>-pilot.1. A merge conflict opens or refreshes a GitHub Issue and stops before changing main; missing macOS signing secrets also open an issue and leave the verified source synchronized without publishing an unsigned release. Rerunning the workflow after resolving either condition resumes the pending release.
For the underlying system, read the DeepSeek Harness architecture, development guide, and desktop architecture.
Upstream, attribution, and trademark notice
Pilot Harness is an independent community project derived from the MIT-licensed DeepSeek Harness and visually inspired by CodePilot. It is not an official DeepSeek product and is not endorsed by or affiliated with DeepSeek. “DeepSeek”, “DeepSeek Harness”, and “CodePilot” remain the property of their respective owners.
License
Pilot Harness is available under the MIT License. Third-party software and licenses are listed in THIRD_PARTY_NOTICES.md.
收录徽章
[](https://deepseek-plugin.org/plugins/op7418/pilot-harness/packages/session-query/session-log-export)把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。