Перейти к основному содержимому
C

dsh-incognito

cxquang/dsh-incognito

Community fork of the incognito-session plugin: a standalone ephemeral sub-agent with its own preset (no parent context) and the full toolset, now streaming both its reasoning and its answer token by token in a collapsible panel, draggable floating window, burned to zero traces on close.

Установка

dsh plugin --profile web add github:cxquang/dsh-incognito

README

dsh-incognito

DeepSeek Harness 无痕会话(incognito)插件——随时开一个独立的临时子 Agent:不继承任何父会话上下文,工作目录隔离在专用临时目录,聊天内容只显示在浮窗里,关闭窗口即焚毁——主会话零记录、磁盘零痕迹。

本仓库是 HuiHuitie-zhu/dsh-incognito 的社区分支:在原版基础上补上了真流式输出与思考过程展示,详见与原版的差异。

无痕会话

入口按钮(输入框加号旁):

入口

功能

  • 一键开启:输入框加号旁的入口按钮,打开无痕卡片窗,输入条自动切换为无痕输入条
  • 完全隔离:独立 agent preset,不继承父会话的上下文、记忆、提示词;工作目录用 /incognito/ 专用临时目录
  • 真流式输出:思考过程与答案都边生成边显示,不是等一整段结束再蹦出来
  • 思考过程可折叠:浮窗顶部显示「思考过程(N 字)」,流式期间默认展开,点标题折叠;限高 220px 内部滚动,不顶穿窗口
  • 全量工具:DSH 初始化工具集全给——shell / 文件读写 / 后台任务 / skills / goals / subagent / workflow / ralph / 联网(含 web_fetch)
  • 窗口可拖动:标题栏拖拽移动,自动避开右侧文件树
  • 粉碎关闭动画:点关闭 → 窗口淡出 + 碎片飞散 → 彻底焚毁
  • 用完即焚:close 时子会话目录延迟重试删除,刷新/重启残留自动清理

与原版的差异

  • 流式来源:原版 poll 读 assistant/message 事件,而该事件在一个 step 结算后才落盘,所以只能整段显示。本版让 host 订阅 agent/assistant-stream({ global: true }),把 text-delta / reasoning-delta 累积进 entry.live;poll 同时返回已结算内容与 live 快照,前端 80ms 轮询并按快照整段替换渲染,配合 lastSeq 去重,避免并发 poll 重复累加。
  • 思考过程:从 assistant message 的 reasoning block 收集(兜底读 stream 里的 reasoning-chunks),与答案分开返回;前端 ThinkBlock 组件折叠渲染。
  • 预设注册:cordis.patch.yml 里显式声明 @deepseek-ai/dsh-agent-preset 的 fork 预设——预设注册表不会扫描包的 preset/ 目录,只放 preset/preset.yml 挂载时会报 Unknown agent preset: fork。
  • 版本:0.2.0(原版 0.1.0)。

安装

dsh plugin --profile web add github:Cxquang/dsh-incognito

本地开发(file: 依赖):

git clone https://github.com/Cxquang/dsh-incognito.git
# 在 ~/.dsh/profiles/web/package.json 的 dependencies 中加入:
#   "dsh-incognito": "file:/path/to/dsh-incognito"
cd ~/.dsh/profiles/web && npm install

设计要点

  • Host 端走 /api/fork-incognito/* RPC(open / send / poll / close),完全绕过主会话——主会话零消息、零工具调用、零记录
  • 子 agent 会话目录落在 --incognito-- 专用目录,close 时焚毁,刷新/重启残留一键清空
  • 模型用 host 级默认模型,无需配置
  • 提示词与工具集 = cordis.patch.yml 里 preset-fork 那一行声明的 fork 预设(persona + DSH 初始化全量工具集)

目录结构

lib/index.js         # host 端:fork-incognito RPC(open/send/poll/close + 流式订阅 + 焚毁)
lib/client.js        # 前端:入口按钮 + 无痕卡片窗(流式渲染、思考过程折叠、可拖动、粉碎动画)
cordis.patch.yml     # bundle patch:挂载插件 + 声明 fork 预设
docs/                # 截图

免责声明

  • 社区插件,非 DeepSeek 官方插件
  • 无痕 ≠ 绝对安全:模型输出仍经 API 服务端处理;本地不留痕

License

MIT(原版作者 HuiHuitie-zhu)

Похожие плагины