dsh-logbook
Makes ctx.logger output visible: a /logs chat command over a full-capture ring (level, name, grep, since filters) plus a default-on stderr exporter for warnings and errors, configurable per plugin; works headless. Also documents that dsh's default log buffer silently drops warn and debug records.
安装
dsh plugin --profile web add github:d3vmeh/dsh-logbook
需要可复现安装时,可在仓库后追加 #commit 固定提交。
Makes ctx.logger output visible: a /logs chat command over a full-capture ring (level, name, grep, since filters) plus a default-on stderr exporter for warnings and errors, configurable per plugin; works headless. Also documents that dsh's default log buffer silently drops warn and debug records.
该插件未提供要点说明,请参考仓库 README。
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/d3vmeh/dsh-logbook |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 1 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-30 |
| 收录日期 | 2026-09-19 |
| 分类 | 开发与运行时 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-logbook
A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin that makes `ctx.logger` output visible: a `/logs` command in the chat, and a stderr exporter that is on by default for warnings and errors.
## The problem it fixes
Every dsh plugin logs through `ctx.logger`, but no shipped profile mounts a log sink. The only default destination is a 1000-record in-memory buffer, and that buffer has a surprise: it silently drops `warn` and `debug` records. Cordis orders its levels error=0, info=1, warn=2, debug=3, and the buffer exporter falls back to each logger's default level of 1, so warnings never make it in. A plugin can warn about a real problem and there is no way to see it, live or after the fact (discussions #2905, #1241, #4994).
dsh-logbook registers one full-capture exporter (it asks cordis for everything, then filters itself) and gives you two views:
1. **stderr, live.** By default only warnings and errors, so a healthy session stays silent. Open it up per plugin with a config map. Never writes to stdout, which stays free for SDK and ACP protocol traffic.
2. **`/logs` in the chat.** The recent history (default ring of 2000 records, all levels), with filters:
```
/logs
/logs --level warn
/logs --name llm-gate --grep queue
/logs --since 10m --limit 100
```
```
logs: 3 of 41 records shown (ring 2000, buffer seeded 12)
14:01:59 llm-gate info llm-gate: llamacpp session=059a680f queued (depth 1)
14:02:03 llm-gate info llm-gate: llamacpp session=059a680f dispatched after 4012ms
14:02:11 llm-gate warn llm-gate: llamacpp session=059a680f queue full, rejecting
```
## Install
```
dsh plugin --profile web add dsh-logbook
```
That is enough. To tune it, add to your profile's `cordis.patch.yml`:
```yaml
- id: logs
config:
ring: 2000 # records kept for /logs
stderr:
enabled: true
types:
default: warn # error | warn | info | debug | off
llm-gate: debug # everything from one plugin
hmr: off # silence one logger entirely
```
A value means "this type and anything more severe", in the order error, warn, info, debug. This deliberately differs from cordis's numeric levels, where info sits below warn and "warnings and errors only" cannot be expressed.
## What you should know
- The ring captures every level from the moment the plugin mounts, and seeds itself from the built-in buffer for anything earlier. Records from before the mount can only be error and info, because of the buffer behaviour described above.
- The stderr writer attaches an error listener so a closed pipe (for example a dying `tee`) cannot crash dsh, and it never throws into the logging path.
- Upstream note: cordis's `ctx.logger.exporter()` disposer currently removes the most recently registered exporter rather than its own, so any plugin reload can detach some other plugin's log sink. dsh-logbook keeps an internal flag so a stale copy of its exporter goes inert instead of double-reporting.
- Related work: [dsh-logger-panel](https://github.com/LingLambda/dsh-logger-panel) is a web Settings page with rotating JSONL files; [dsh-boot-doctor](https://github.com/Mide69/dsh-boot-doctor) mounts a minimal console sink aimed at boot problems; [dsh-o11y-plugin](https://github.com/fly3366/dsh-o11y-plugin) exports to OpenTelemetry. dsh-logbook is the terminal-and-chat option: filters, stderr, no web dependency, works headless.
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。