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

@liaozhi/dsh-qw-tool

v0.5.1

Published

DeepSeek Harness plugin: 依赖千问AI平台的生图 / 编辑图 / 多模态对话工具。

Readme

dsh-qw-tool

DeepSeek Harness 插件:为会话注入 依赖千问AI平台的三个图像原语工具。

功能

| 工具 | 说明 | |---|---| | qw_gen_image | 纯文生图(qwen-image-3.0-pro,多模态同步,403 回退异步任务 + 轮询) | | qw_edit_image | 以参考图为底图生成/修改(底图取会话附件,省略 = 最近用户图片) | | qw_multimodal_chat | 多模态模型读图/分析(kimi-k3,OpenAI 兼容 chat/completions) |

这三个工具从 dsh-post-gen(海报工作室)移植而来,工具名改为 qw_gen_image / qw_edit_image / qw_multimodal_chat,保留 生图/编辑/多模态的调用链路(DashScope 原生 + 同步/异步回退、账户 403 自适应), 去掉了风格库与 skill 库管理。

  • 插件自更新:设置面板标题行右侧「检查更新 / 立即更新」——host 半读自身版本 对比 npm registry latest,经官方 dsh plugin --profile <name> add <pkg>@<ver> 通道安装最新版(重启 DeepSeek Harness 后生效;link 开发副本先清残留 junction 再换装,见 self-update.ts)。

使用

  1. 配置:设置面板 → “千问图像工具” → 填入千问AI平台 API Key → 点“确认” (浏览器直连平台兼容模式 GET /models 校验)→ 打开“启用”开关。
  2. 对话:门控打开后,模型即可调用三个工具(生图/编辑图/多模态看图)。

开发(HMR)

一次安装进 profile(client half 的发现依赖包名解析,必须安装而非 --patch 插路径):

dsh plugin --profile web add <本目录的绝对路径>

每个开发会话两个终端:

# 终端 1:构建监视器(tsc --watch + tsdown --watch,持续重写 lib/)
pnpm dev

# 终端 2:harness(叠加开发 overlay,重新启用 HMR 并监听 lib/)
dsh web --patch <本目录>/cordis.dev.yml --no-open

改源码保存后:host 半经 lib/index.js 变更热重载;client 半经 lib/client.js 变更 SSE 广播,浏览器不刷新页面就地更新。

构建 / 发布

pnpm typecheck && pnpm build

files 白名单只带运行必需的产物(lib/index.js、lib/invariant.js、 lib/client.js、cordis.patch.yml),发布前建议 pnpm pack 检查内容。 用户安装:dsh plugin --profile web add dsh-qw-tool。

文件清单

├── src/index.ts                  # host half 入口(版本门禁 + 设置 + 后端 + 门控组装)
├── src/gate.ts                   # 业务门控(enabled + apiKey 配齐才注册工具/引导)
├── src/qwen-service.ts         # 后端服务(配置读写 + 千问API 调用;wire namespace qwen)
├── src/spec.ts                   # 设置 schema(dsh-qw-tool 命名空间)
├── src/typert.ts                 # qwen/* 端点描述符(手写,跨模块实例安全)
├── src/trace-hub.ts              # 工具运行中 trace(渲染节点轮询)
├── src/tools/image-gen.ts        # qw_gen_image
├── src/tools/image-edit.ts       # qw_edit_image
├── src/tools/multimodal-chat.ts  # qw_multimodal_chat
├── src/tools/session-images.ts   # 会话图片解析(附件 → data URL)
├── src/shared/model-combos.ts    # 模型组合注册表(多模态 + 生图)
├── src/shared/qwen-contract.ts # host/client 共享 RPC 契约
├── src/shared/qwen-trace.ts    # 步骤 trace 类型 + 宽容解析
├── src/client/index.ts           # client half 入口(设置面板 + 工具渲染节点)
├── src/client/QwenSection.tsx  # 设置面板(API Key + 模型组合 + 开关)
├── src/client/QwenImageGenNode.tsx # image_gen/image_edit 渲染节点
├── src/client/QwenChatNode.tsx     # multimodal_chat 渲染节点
├── src/version-gate.ts           # harness 版本门禁(软禁用语义)
├── tsdown.config.ts              # client bundle 构建(CJS 工厂 + CSS Modules 内联)
├── tsconfig.json                 # 全量类型检查(pnpm typecheck)
├── tsconfig.build.json           # host 半构建
├── cordis.patch.yml              # bundle 层:安装时插入插件行
├── cordis.dev.yml                # 开发 overlay:重启用 HMR 并监听 lib/
└── package.json                  # dsh.bundle + dsh.client 双清单