npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-compile-digest

v0.1.0

Published

Read-only LaTeX build-log diagnostics for DeepSeek Harness: errors, warnings, source locations, context and duplicate groups.

Readme

dsh-compile-digest

English

用于 DeepSeek Harness 的 LaTeX 构建日志解析插件。log_parse 提取可识别的错误、警告、文件位置和源码上下文,合并重复消息并保留各处位置。只读取已有日志,不运行构建、不修改源码。

安装

需要 Node.js 24.9 以上。注册器集成已在 DSH tools 0.2.2-rc.3 上验证。

在 DSH 的 插件 → 添加插件 中粘贴:

https://github.com/DengyiGu/dsh-compile-digest

也可通过命令行安装指定版本到 web profile:

dsh plugin --profile web add github:DengyiGu/dsh-compile-digest#v0.1.0

Releases 提供可安装的 .tgz。源码已是可执行 JavaScript,无需编译、安装脚本或额外运行时依赖,宿主包由 DSH 提供。仅通过包名安装需要另行发布 npm。

使用

log_parse({
  path: 'C:/work/paper/build.log',
  toolchain: 'auto',
  maxDiagnostics: 20,
  includeBoxWarnings: false,
})

优先使用绝对路径;相对路径基于 DSH 进程的工作目录。解析已有日志无需安装 TeX。

| 参数 | 默认值 | 含义 | |---|---|---| | path | 必填 | 日志文件路径 | | toolchain | auto | auto 或 latex | | maxDiagnostics | 20 | 展示诊断分组的上限 | | includeBoxWarnings | false | 是否列出 overfull/underfull box 警告,默认仅计数 |

可在 DSH 对话中要求:“解析 C:/work/paper/build.log,给出错误位置和上下文,合并重复消息。”

真实样例输出:

latex · recognized · 19 lines
1 error(s), 0 warning(s) · 1 unique, 1 occurrence(s) · showing 1

ERROR  Undefined control sequence.
  ./chapters/one.tex:2  ctx: \badcommandhere

run: Output written on main.pdf (1 page, 14785 bytes).

TeX 即使报告错误也可能输出 PDF。recognized 表示识别到日志结构及结束标记,不代表构建没有错误。

支持范围

  • pdflatex、xelatex、lualatex 的传统控制台输出、-file-line-error 输出及 .log 文件。
  • 包含上述引擎输出的 latexmk 日志。
  • 真实样例覆盖 pdfTeX 1.40.28、XeTeX 0.999997、LuaHBTeX 1.22.0 和 latexmk 4.87。

此版本不支持 Typst 或其他编译器格式。

输出及配置

每条诊断包含严重级别、消息、出现次数、不同位置和相关说明。文件、行号、行号范围及源码片段仅在可确定时提供。TeX 不报告列号,因此不填列号;该格式的错误码为空。

按严重级别和空白归一化后的消息合并,保留数字、路径和标点。错误排在警告前,同级别保持首次出现顺序。已识别的汇总消息放进 runNotes,不重复计为具体诊断。

返回值包含 summary、runNotes 和 parseNotes。展示上限不改变已解析诊断的统计,filteredBoxWarnings 记录默认隐藏的 box 警告。超过读取上限时,统计仅描述实际读取的前缀。

| parseStatus | 含义 | |---|---| | recognized | 已识别 TeX 结构及结束标记 | | partial | 已识别但输入不完整,包括最后一轮引擎输出未结束 | | unrecognized | 未发现支持的结构,不能据此判断构建成功 |

插件设置可配置 toolchain、maxDiagnostics、includeBoxWarnings 默认值。maxBytes 默认 4000000,限制从文件开头读取的字节数。调用支持取消。

开发与验证

npm test
npm run check
npm run verify
npm pack

测试使用 Node 内置 runner,全程离线。解析器使用真实采集及明确标记的合成样例,适配层测试替换宿主导入。样例来源 记录采集命令、版本和脱敏方式。

另行通过真实 Cordis 4.1.0、ToolsService 0.2.2-rc.3、Schemastery 3.19.0 完成打包插件的注册、直接调用和输出 Schema 校验。systemPrompt 依赖使用最小回调接收器。完整 DSH 应用启动及对话驱动调用仍未验证。

限制

文件定位依赖 TeX 的文件打开标记。上下文已关闭或有歧义时省略位置,折行的文件标记可能无法确定。多轮构建不暴露轮次边界。说明文本来自编译器,消息合并不等于根因判断。插件不执行命令、修复代码或启动后台服务。

许可

MIT。