nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ZenithJoyH/dsh-session-actions
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
一个 DeepSeek Harness (dsh) Web 插件:侧栏会话行上的操作集合——标为未读、永久删除已归档会话。
A DSH Web plugin that puts session actions in the sidebar row menu: mark unread, and permanently delete archived sessions.
原名 dsh-archive-delete;功能从“只删归档会话”扩展到“会话操作”后改为现名。旧版本的未读标记会自动迁移。
DSH 的官方设计是「会话只能归档,永不删除」:归档只是把会话从列表里隐藏,日志仍然占着磁盘,也仍然能被搜索到。dsh-session-actions 补上这一个缺口:
它不删除可见会话、不删除工作区、不删除附件等共享文件。
| 功能 | 入口 | 作用范围 |
|---|---|---|
| 标为未读 / 标为已读 | 会话行「⋯」菜单 | 任意会话;行尾显示未读圆点 |
| 永久删除… | 归档会话的「⋯」菜单 | 仅已归档、未在运行的会话 |
DSH 自带的未读状态只存在于浏览器内存:会话跑完一轮后变未读,打开即清除,刷新后全部丢失。本插件:
localStorage(键 dsh-session-actions.unread),刷新、重启后仍在;删除的是会话日志(
$DSH_HOME/sessions/...)。会话里引用过的附件是内容寻址的共享文件,不会被删除;如果你需要连附件一起清理,应另行实现带引用计数的手动清理。
DSH="/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
"$DSH" plugin --profile desktop add /absolute/path/to/dsh-session-actions
包内 dsh.bundle.patch 会让插件管理器把 dsh-session-actions 加入 profile 的
dsh.profile.bundles,bundle 里的 cordis.patch.yml 再插入加载行;不需要手工改
cordis.patch.yml。
安装后刷新页面(客户端 bundle 由模块图热更新);如果 Host 半没有自动加载,重启
dsh / 桌面端。只改 lib/client.js 时刷新页面即可(若 pnpm run dev:web 在运行则自动热更新)。
若不经过插件管理器,把仓库复制到 profile 的 node_modules/dsh-session-actions,
再在 ~/.dsh/profiles/desktop/cordis.patch.yml 末尾加入:
- insert:
- id: session-actions
name: "dsh-session-actions"
# Web profile
dsh plugin --profile web add dsh-session-actions
# Desktop profile
dsh plugin --profile desktop add dsh-session-actions
# 或从 GitHub 源码安装
dsh plugin --profile web add github:ZenithJoyH/dsh-session-actions
dsh plugin --profile desktop add github:ZenithJoyH/dsh-session-actions
包内 dsh.bundle.patch 已声明挂载行,插件管理器识别 bundle 时会自动插入。
dsh plugin --profile desktop remove dsh-session-actions
并删除 cordis.patch.yml 里的 session-actions 条目;重启。
fs/path,目录编码与官方 JSONL 后端一致);$DSH_HOME/sessions 与会话持久化服务,删除时移除该会话的 JSONL 目录与投影缓存;不发起外网请求、不读取工作区文件、不执行命令;/plugin/session-actions/delete;localStorage,不上传;Host 侧可选配置(写在 cordis.patch.yml 的条目下):
- insert:
- id: session-actions
name: "dsh-session-actions"
config:
route: /plugin/session-actions/delete
# 覆盖 JSONL 会话根目录;默认 $DSH_HOME/sessions
sessionsRoot: /Users/me/.dsh/sessions
# 覆盖用于清理投影缓存文件的 dsh home;默认 $DSH_HOME 或 ~/.dsh
dshHome: /Users/me/.dsh
一般不需要配置。只有当 profile 里 @deepseek-ai/dsh-session-persistence-jsonl 的 root 被改成非默认值、或 DSH_HOME 未被进程继承时,才需要显式指定。
Host 路由 POST /plugin/session-actions/delete:
ctx.connection.requestRejection():Host/Origin 围栏 + 浏览器会话认证,和官方 /api 同级;POST,请求体上限 64 KiB;projectKey / encodeSegment 计算,并强制落在会话根目录内;sessionPersistence.open(id, 'write') 抢占写所有权后才删除,避免与另一个进程并发写;它不会:
session_projcache 之外的任何缓存;npm test
# = node --check lib/index.js
# node --check lib/client.js
# node test/host.test.mjs
# node test/client.smoke.cjs
测试覆盖:
projectKey / encodeSegment;lib/index.js:ctx.inject(['webServer', 'connection', 'workspaceRegistry']) 后注册一条 exact 路由;核心操作 deleteArchivedSession() 可单独测试。lib/client.js:手写 dsh client-bundle 格式,注册两个 slot:sidebar.workspaces.session.menu.item(order 500,官方 session-id 之后)——仅归档行可见;shell.overlay(order 900)——确认弹窗。detachSession + unarchiveSession 会推送 Workspace/归档增量,侧栏自然移除该行。projectKey / encodeSegment。MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session-management。