dsh-pkg-info
by ZhijiangTang
DSH 包信息查询工具插件。注册一个 pkg info 工具,查询 npm 与 PyPI 两个 registry 的包元数据,把结果规范化为一个结构化 JSON 对象,供模型与 Code Mode 程序化调用。 零依赖、纯 ESM、无构建 。
DSH plugin: query npm/PyPI package info (version, deps, release dates)
安装
dsh plugin --profile web add github:ZhijiangTang/dsh-pkg-infoGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
DSH 包信息查询工具插件。注册一个 pkg_info 工具,查询 npm 与 PyPI 两个 registry 的包元数据,把结果规范化为一个结构化 JSON 对象,供模型与 Code Mode 程序化调用。零依赖、纯 ESM、无构建。
简介
- 工具名:
pkg_info - 能力:查询 npm 包(
registry.npmjs.org)与 PyPI 包(pypi.org)的名称、版本、描述、许可证、作者、主页、仓库、版本数、依赖等信息。 - 行为:永不抛异常。404、网络错误、超时、JSON 解析失败都折叠为
{ ok: false, error: { stage, message?, status? } };成功返回{ ok: true, registry, name, version, ... }。
安装
dsh plugin --profile <name> add file:./plugins/dsh-pkg-info
# 或发布后:
dsh plugin --profile <name> add dsh-pkg-info
参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
registry |
enum | — | npm |
npm / pypi,选择要查询的 registry |
name |
string | ✅ | — | 包名。npm 作用域包写 @scope/name;PyPI 项目名大小写不敏感 |
version |
string | — | latest | 指定版本(npm 也支持 dist-tag 如 latest/next);缺省查最新版 |
返回字段
npm(registry: "npm")
| 字段 | 类型 | 说明 |
|---|---|---|
ok / registry / name / version |
boolean/string | 状态、registry、规范包名、解析到的版本 |
description |
string | null | 包描述 |
license |
string | null | SPDX 许可证(对象/数组会被规范成字符串) |
author |
string | null | 作者,规范为 "name <email>" |
homepage |
string | null | 主页 URL |
repository |
string | null | 仓库 URL |
distTags |
object | dist-tags 映射(如 { latest: "2.7.0", ... }) |
created / modified |
string | null | time 字段的创建/修改时间(ISO 8601) |
versionsCount |
integer | 已发布版本数 |
dependencies |
object | null | 该版本的 dependencies |
peerDependencies |
object | null | 该版本的 peerDependencies |
PyPI(registry: "pypi")
| 字段 | 类型 | 说明 |
|---|---|---|
ok / registry / name / version |
boolean/string | 状态、registry、规范项目名、解析到的版本 |
summary |
string | null | 项目摘要(info.summary) |
license |
string | null | 许可证(info.license,空串归一为 null) |
author |
string | null | 作者(info.author) |
home_page |
string | null | 主页 URL(info.home_page) |
releasesCount |
integer | 发布版本数(releases 键数) |
requiresDist |
string[] | null | 该版本的 requires_dist 依赖列表 |
失败(ok: false)
{ ok: false, registry, name, error: { stage: 'http'|'request'|'parse', message?, status? } }。
- 404:
{ stage: 'http', status: 404 } - 网络/超时(10s):
{ stage: 'request', message } - JSON 解析失败:
{ stage: 'parse', message }
示例
// 查 npm 最新版
{ "registry": "npm", "name": "yaml" }
// 查 npm 指定版本
{ "registry": "npm", "name": "yaml", "version": "2.5.0" }
// 查 PyPI 最新版
{ "registry": "pypi", "name": "requests" }
// 查 PyPI 指定版本
{ "registry": "pypi", "name": "requests", "version": "2.28.1" }
License
MIT
原始 README: https://github.com/ZhijiangTang/dsh-pkg-info/blob/main/README.md ↗
同类插件
查看全部 →
dsh-anchored-standard
两阶段 DeepSeek Harness 预设:先 Minimal 对齐的 bootstrap,再切完整 Standard 工具(Project2 98/99)

PicGo-Core
极致的图片上传引擎,CLI 与 API 双支持

awesome-deepseek-harness
DeepSeek Harness(DSH)及其优秀社区插件的精选指南。

awesome-deepseek-harness
DeepSeek Harness (DSH)生态系统:来自dsh-external/hub和公共dsh-plugin主题的精选插件、工具和基础设施。

AI-Novel-Writer
本地优先 AI 小说创作工作台,提供 Windows/macOS 桌面版与 DeepSeek Harness 插件开发预览,支持角色、大纲、章节蓝图、审稿修稿和本地模型。

mcp-for-stata
MCP-for-Stata:把 Stata 集成进你的 agent