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

@dingpenghui/agnes-image

v1.5.0

Published

DSH plugin for Agnes AI text-to-image generation

Readme

@dingpenghui/agnes-image

DSH 插件:Agnes AI 文生图,注册 generate_image 工具。

能力

  • 调用 POST /v1/images/generations(默认模型 agnes-image-2.5-flash
  • 结果持久化为 DSH 附件,并在对话中内联渲染图片
  • 支持 1K/2K/3K/4K 分辨率档位与 8 种宽高比
  • 声明了 presentCall / presentResult 卡片投影

配置

- id: tool-agnes-image
  name: '@dingpenghui/agnes-image'
  config:
    model: agnes-image-2.5-flash   # 或 agnes-image-2.1-flash / agnes-image-2.0-flash
    defaultSize: 1K                # 1K | 2K | 3K | 4K
    defaultRatio: 1:1              # 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 3:2 | 2:3 | 21:9
    persistAttachment: true        # 持久化到附件存储并内联渲染
    ferryContext: true             # PTC 子派发时把图片渡回外层结果
    timeoutMs: 240000              # 单次请求预算

凭据:AGNES_AI_API_KEY(回退 AGNES_API_KEY),位于 $DSH_HOME/.credentials.yamlrefs 下或同名环境变量。

工具参数

| 参数 | 类型 | 必填 | 默认 | |------|------|------|------| | prompt | string | ✅ | - | | size | string | ❌ | 配置值(1K) | | ratio | string | ❌ | 配置值(1:1) |

开发

pnpm install
pnpm build                              # -> lib/
npx tsc -p tsconfig.json --noEmit

协议实现位于上层的 _core/,构建时内联进 lib/

注意

Agnes 的文本图像队列拒绝 streamformatimages,且 n 必须为 1 (HTTP 400 ... is not supported by text image queue / n must be 1)。 本插件只发送 model / prompt / size / ratio,请不要重新加回这些字段。 也正因如此,图生图/图像编辑在本网关不可用

完整说明见 上级 README;优化记录见 OPTIMIZATION.md

MIT