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-tool-writing

v0.8.1

Published

面向 DeepSeek Harness 的长篇网络小说写文引擎插件:独立 DeepSeek key 分流并行生成(起草/润色/同步/子代理四通道)、多书隔离(一个工作区=一本书)、弹性合同体系(故事承诺书/追读力台账/五段任务书/硬关卡)、章后八项体检(含节奏信号与 AI 味检查)、起点+番茄双平台审稿、发书前敏感自查、语义检索(概念索引)与饲料区书库管理。

Readme

dsh-tool-writing

面向 DeepSeek Harness 的「写文引擎」插件:让 harness 具备长篇网络小说的创作能力,并用一把独立的 DeepSeek key 承担「子线程 / 分流 / 多线并行」的生成与检索任务。

设计定位

  • 主 Agent(harness 自身模型):总调度,负责主线叙事、结构、设定、以及「新奇的、出其不意的想法」的决策。
  • 本插件(独立 key):把重活分流出去——并发生成多章草稿、批量出点子、批量扩写细纲,以及资料检索与一致性筛查。
  • 饲料区(书库):导入并管理多本小说,建立全文索引,供考据、风格参考与设定借鉴。

工具集

创作核心

| 工具 | 作用 | |---|---| | `novel_init` | 初始化小说项目(元信息 + 目录骨架) | | `novel_outline` | 生成/展开主线、分卷、章节细纲(可并行) | | `novel_lore` | 人物/世界观/时间线/伏笔的增删改查 | | `novel_brainstorm` | 并发生成 N 个新奇点子 | | `novel_draft` | 起草一章正文(综合设定+大纲+前文,支持分卷) | | `novel_continue` | 从最近章节自动续写下一章 | | `novel_batch` | 并发生成多章草稿(分流/多线) | | `novel_polish` | 润色/改写 | | `novel_review` | 一致性审校(检索前文+设定,筛查矛盾) | | `novel_research` | 资料检索/考据,归纳成笔记 | | `novel_status` | 查看项目进度(分卷/章节/字数) | | `novel_export` | 导出全书为单个 Markdown/TXT | | `novel_summarize` | 生成章节情节摘要,写入可检索的情节日志 | | `novel_setting_extract` | 从正文自动抽取人物/世界观/伏笔到 lore/ | | `novel_foreshadow` | 伏笔回收追踪(登记/回收/查未回收) | | `novel_brief` | 模糊需求一键开书(一句话 → 完整方案) | | `novel_distill` | 蒸馏文本为精华 + 保留校验(项目/书库,含全书语义召回) | | `novel_handbook` | 生成给人读的导航手册(含语义召回名场面) | | `novel_simulate` | 深度推演引擎(心理/因果/交汇/反常识意外) | | `novel_semantic` | 混合语义检索(向量召回+字面召回+LLM 重排,按含义而非字面) | | `novel_vsearch` | 纯向量语义检索(cosine 相似度,免 LLM,快速看命中) | | `novel_embed` | 构建/补全语义向量索引(增量、断点续传、内容变更自动重嵌) | | `novel_evolution` | 设定/人物演化追踪(auto 检测 + 手动 + 历史 + 版本 diff 陈旧检测) | | `novel_threads` | 多线叙事与线索图谱(登记/交汇/图谱/停滞提醒) | | `novel_style` | 风格指纹(剖析文风、多风格档案、自动注入所有生成) | | `novel_decision` | 人机共创决断点(选项+利弊,人做美学决断) | | `novel_sync` | 章末自动编排(摘要+抽取+演化+伏笔提醒 一键) |

饲料区 + 扩展检索

| 工具 | 作用 | |---|---| | `novel_library_import` | 导入小说(.txt/.md/.epub,自动识别编码 + 自动分章) | | `novel_library_list` | 列出书库所有小说 | | `novel_library_read` | 读某本小说的某一章 | | `novel_library_delete` | 删除已导入的小说 | | `novel_library_search` | 书库全文检索(SQLite FTS5 trigram + LIKE 混合) | | `novel_search` | 扩展检索:项目 + 书库 联合全文检索 |

语义向量检索使用百炼 `text-embedding-v3`(1024 维,复用 DASHSCOPE_API_KEY,零新增成本):`novel_embed` 建索引(增量可续传,内容变更自动作废重嵌),`novel_semantic` 混合召回,`novel_vsearch` 纯向量;无 key 时自动退化为字面检索。

项目目录约定

``` novel.json # 作品元信息 + 分卷/章节进度 lore/ # characters/ world/ timeline/ foreshadowing/ other/ outline/ # 主线与分卷/章节细纲 chapters/ # 正文(可按分卷建子目录) research/ # 考据与审校笔记 .writing-index.sqlite # 项目全文检索索引(SQLite,自动维护) ```

书库默认位于 `$DSH_HOME/writing-library/`(可配 `libraryRoot`)。

配置

| 字段 | 默认值 | 含义 | |---|---|---| | `apiKeyEnv` | `DSH_WRITING_API_KEY` | 独立 key 的环境变量名/凭证引用 | | `apiKey` | `""` | 内联 key(不建议,避免泄露) | | `baseURL` | `https://api.deepseek.com` | DeepSeek 端点 | | `model` | `deepseek-chat` | 分流用的模型(可用 deepseek-reasoner) | | `maxConcurrency` | `4` | 并发上限 | | `maxTokens` | `4096` | 单次生成最大 token | | `temperature` | `0.8` | 采样温度 | | `projectRoot` | `.` | 小说项目根目录(默认当前工作区) | | `libraryRoot` | `$DSH_HOME/writing-library` | 书库根目录 |

密钥安全

密钥绝不硬编码。优先级:凭证存储(`$DSH_HOME/.credentials.yaml` 的 `DSH_WRITING_API_KEY`)→ 环境变量 → 内联 config。

安装(profile)

``` dsh plugin --profile web add file:<本目录> ```

然后在写作预设的 `agent.cordis.yml` 中挂载:

```yaml

  • id: tool-writing name: 'dsh-tool-writing' config: apiKeyEnv: DSH_WRITING_API_KEY model: deepseek-chat maxConcurrency: 4 ```