← Back to home@LJH-snow

dsh-tool-pagerduty

No description

Stars
0
Language
TypeScript
Created
Oct 4, 2026
Updated
Oct 6, 2026

Introduction

dsh-tool-pagerduty

English | 中文

PagerDuty integration for DeepSeek Harness (dsh) as a Cordis plugin. The agent can verify credentials, inspect services, incidents, on-call schedules, and escalation policies, and acknowledge or resolve incidents.

Install

npm install @libai168/dsh-tool-pagerduty

Requires @deepseek-ai/cordis (^4.0.1) and @deepseek-ai/dsh-tools (^0.1.0-rc.6) as peer dependencies.

Configuration

- name: 'github:LJH-snow/dsh-tool-pagerduty'
  config:
    token: 'u+...'                    # REST API v2 user token
    # baseUrl: 'https://api.pagerduty.com' # optional API origin/path prefix
    # fromEmail: 'bot@example.com'         # identity used by write endpoints
    # timeoutMs: 15000

baseUrl defaults to https://api.pagerduty.com. It must be an absolute http or https URL with a hostname and no username, password, query, or fragment; a path prefix is allowed and trailing slashes are normalized. Before every request, the resolved host is checked and localhost, loopback, private, link-local, CGNAT, multicast, and every IANA special-purpose block (reserved/documentation/benchmark ranges, the 2001::/23 IETF protocol assignments prefix, deprecated site-local, SRv6 SIDs, AS112, and IPv4-mapped/NAT64 forms) are rejected, along with DNS results that include any such address. DNS failures are rejected closed. Keep credentials out of baseUrl.

Create the token under User Settings > API Access. Write actions require a user token with incident write permission; prefer a dedicated bot account.

Tools

ToolDescriptionWrite
pagerduty_auth_testVerify the token and return the current userNo
pagerduty_list_servicesList services with search/status filtersNo
pagerduty_list_incidentsList incidents with status/service/urgency/time filtersNo
pagerduty_get_incidentGet one incident with assignments and escalation contextNo
pagerduty_list_on_callsList current on-call entriesNo
pagerduty_list_escalation_policiesList escalation policies with rule summariesNo
pagerduty_acknowledge_incidentAcknowledge one incidentYes
pagerduty_resolve_incidentResolve one incident, optionally with a resolution noteYes
pagerduty_list_incident_notesList notes on one incidentNo
pagerduty_create_incident_noteAdd a note to one incident (requires fromEmail)Yes

Error contract

  • Missing token: { ok: false, reason } or { found: false, reason }.
  • PagerDuty errors throw PagerDutyError (status + errors list); tools surface them as normalized failure values.
  • Write tools are single-object operations only (kind: 'edit'); no bulk or delete actions.

Development

npm install
npm run typecheck
npm test
npm run build

License

MIT