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

@dcrays/mbh-media

v0.4.1

Published

Mobook image and audio generation tools for DeepSeek Harness

Readme

mbh-media

墨宝 DSH 图片与音频生成 Bundle,注册 generate_image 和 generate_audio 工具。根据 $DSH_HOME/mobook.json#environment 选择网关:production 使用 model-gateway.shuwenda.com,其他环境使用 model-gateway.shuwenda.icu;图片路径为 /v3/images/generations,音频路径为 /v3/tts/create。每次调用通过 DSH 凭据服务读取 MOBOOK_API_KEY,不在插件中保存密钥。

工具接受 prompt、模型根据图片要求拟定的简短名称 name、可选 image(URL、Base64 或最多 10 项数组)、size、response_format 和当前消息的 output_dir。name 必填,插件不会从 prompt 提取名称。每张结果保存为以名称开头、带序号和唯一标识的图片文件;工具返回每张图片的 name 和 file,Agent 再使用 mbhchat_message 的 media 参数交付,附件名取文件名。图片 URL 下载与 Base64 响应都校验实际图片格式和大小;工具不会把图片数据或凭据写入日志。

generate_audio 使用 seed-audio-1.0,接受 text_prompt、简短名称 name、可选音色 ID speaker 和 output_dir。请求中的 audio_config 固定为 MP3、48000 Hz,音调、语速和音量调整均为 0。网关响应同时包含 Base64 audio 和公开 HTTPS url 时,插件优先下载 url;仅在没有 URL 时使用 Base64。插件校验大小及 MP3 格式,保存到当前消息成品目录,返回文件路径供 mbhchat_message 交付。网关请求沿用 MOBOOK_API_KEY 的 Bearer 鉴权;鉴权方式仍需用墨宝网关确认。

音频生成前,工具说明要求 Agent 对照用户原话检查文本与关键要求;插件校验 text_prompt 非空、长度及控制字符。若网关返回 OutputAudioSensitiveContentDetected.PolicyViolation,工具会明确说明没有可交付音频,并要求 Agent 停止自行改写文本或音色后反复重试;是否改用原创方向由用户决定。

开发态通过 pnpm dev 加载源码 Bundle;正式包通过外置插件清单加载。

生成过程在 $DSH_HOME/logs/mbh-media/YYYY-MM-DD.log 记录请求、HTTP 状态与耗时、网关错误码、媒体校验及保存结果。日志不记录提示词正文、凭据、参考图数据、媒体内容、下载 URL 或网关原始错误响应。

若网关返回 OutputImageSensitiveContentDetected.PolicyViolation,工具会明确说明生成结果未通过版权审核、没有可交付图片,并要求 Agent 停止自行删改用户指定的角色后反复重试;是否改为原创方向由用户决定。请求前的提示词检查不能预测这类生成结果审核。

发布时在 pnpm app 的“发布 npm 插件”阶段选择 mbh-media;该阶段运行插件的类型检查、测试和 build:npm,生成 @dcrays/mbh-media 包。首次发布成功后,发布器将正式包来源从 workspace 切换为锁定的 npm 版本。OSS 插件更新阶段也可单独选择 mbh-media。