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

@libai168/dsh-tool-pagerduty

v0.3.0

Published

PagerDuty tools for DeepSeek Harness: services, incidents, on-call schedules, escalation policies, and incident actions

Readme

dsh-tool-pagerduty

English | 中文

为 DeepSeek Harness(dsh)提供 PagerDuty 集成能力的 Cordis 工具插件。Agent 可以验证凭证,查看服务、事件、值班和升级策略,并确认或解决事件。

安装

npm install @libai168/dsh-tool-pagerduty

需要 @deepseek-ai/cordis(^4.0.1)与 @deepseek-ai/dsh-tools(^0.1.0-rc.6)作为 peer 依赖。

配置

- name: 'github:LJH-snow/dsh-tool-pagerduty'
  config:
    token: 'u+...'                    # REST API v2 用户 token
    # baseUrl: 'https://api.pagerduty.com' # 可选 API 地址/路径前缀
    # fromEmail: '[email protected]'         # 写接口使用的身份邮箱
    # timeoutMs: 15000

baseUrl 默认是 https://api.pagerduty.com。它必须是带 hostname 的绝对 http 或 https URL,不能包含用户名、密码、查询参数或 fragment;可以配置路径前缀,末尾斜杠会被规范化。每次请求前都会校验最终主机:localhost、环回、私有、链路本地、CGNAT、组播,以及全部 IANA 特殊用途地址段(保留/文档/基准测试、2001::/23 IETF 协议分配段、已废弃的站点本地、SRv6 SID、AS112,以及 IPv4-mapped/NAT64 形式)都会被拒绝,DNS 结果中包含任一这类地址的域名同样被拒绝;DNS 解析失败也会按失败关闭处理。不要把凭证放进 baseUrl。

在 PagerDuty 的 User Settings > API Access 创建 token。写操作需要具备事件写权限的用户 token,建议使用专用 bot 账号。

工具

| 工具 | 说明 | 写操作 | |---|---|---| | pagerduty_auth_test | 验证 token 并返回当前用户 | 否 | | pagerduty_list_services | 按搜索/状态过滤服务列表 | 否 | | pagerduty_list_incidents | 按状态/服务/紧急度/时间过滤事件列表 | 否 | | pagerduty_get_incident | 查看单个事件详情与指派、升级上下文 | 否 | | pagerduty_list_on_calls | 查看当前值班条目 | 否 | | pagerduty_list_escalation_policies | 查看升级策略与规则摘要 | 否 | | pagerduty_acknowledge_incident | 确认一个事件 | 是 | | pagerduty_resolve_incident | 解决一个事件,可附解决说明 | 是 | | pagerduty_list_incident_notes | 查看一个事件的备注列表 | 否 | | pagerduty_create_incident_note | 为一个事件添加备注(需要配置 fromEmail) | 是 |

错误契约

  • 未配置 token:{ ok: false, reason } 或 { found: false, reason }。
  • PagerDuty 错误抛 PagerDutyError(含状态码与 errors 列表),工具层统一转为规范化失败值。
  • 写工具只做单对象操作(kind: 'edit'),不提供批量或删除。

开发

npm install
npm run typecheck
npm test
npm run build

许可证

MIT