Back to home@LJH-snow

dsh-tool-sentry

No description

Stars
0
Language
TypeScript
Created
Aug 26, 2026
Updated
Aug 26, 2026

Introduction

dsh-tool-sentry

English | 中文

A Cordis tool plugin that gives DeepSeek Harness (dsh) focused Sentry workflows: project health, unresolved issues, event context, releases, teams, and organization members.

The plugin registers 12 tools with the official ctx.tools.register(defineTool(...)) contract, uses presentCall/presentResult for compact replay-friendly UI cards, and treats authentication, request timeout, and cancellation as first-class concerns.

Install

Install directly from GitHub (no npm publish needed):

npm install github:LJH-snow/dsh-tool-sentry
# or a specific branch/tag
npm install github:LJH-snow/dsh-tool-sentry#main

Or from a local checkout:

git clone https://github.com/LJH-snow/dsh-tool-sentry
cd dsh-tool-sentry
npm install && npm run build   # builds to lib/
npm install /path/to/dsh-tool-sentry

Requires @deepseek-ai/cordis (^4.0.1) and @deepseek-ai/dsh-tools (^0.1.0-rc.6) as peer dependencies, provided by the host dsh runtime.

Configuration

Load the plugin in a dsh composition config (cordis.yml):

- name: 'dsh-tool-sentry'
  config:
    token: 'sntrys_xxx'        # required Sentry API token
    organization: 'acme'       # optional default org slug; tools can still override it
    baseUrl: 'https://sentry.io/api/0'   # optional; use your self-hosted Sentry API root
    timeoutMs: 15000           # optional request timeout in ms (default 15000)

Full example: examples/cordis.yml.

Tools

Read-only

ToolDescriptionOrganization
sentry_get_organizationOrganization metadata, 2FA policy, pending access requests, URLconfig or arg
sentry_list_projectsProjects visible to the token, optionally filtered by queryconfig or arg
sentry_get_projectOne project: team, platform, first event, latest release, featuresconfig or arg
sentry_list_issuesIssues in a project with query/status filtersconfig or arg
sentry_get_issueIssue detail: counts, status, assignee, permalinkconfig or arg
sentry_list_issue_eventsRecent events for an issueconfig or arg
sentry_list_releasesReleases for a projectconfig or arg
sentry_get_releaseOne release with projects and commit/new-group countsconfig or arg
sentry_list_teamsOrganization teams with member/project countsconfig or arg
sentry_get_teamOne team with access and pending stateconfig or arg
sentry_list_membersOrganization members with role and invite stateconfig or arg

Write

ToolDescriptionOrganization
sentry_update_issueUpdate issue status or assigneeconfig or arg

Behavior contract

  • Sentry REST API is auth-first, so every tool requires a plugin token.
  • Missing/invalid calls return canonical business values: missing objects give { found: false }, and sentry_update_issue maps 400/404 to { ok: false, reason }.
  • Infrastructure errors such as 401, 403, 429, timeout, and network failures throw SentryError or the original fetch error.
  • All requests forward exec.signal and use a 15 second timeout by default.
  • Output schemas, render, presentCall, and presentResult stay pure, so tool calls and results are replay-safe.

Development

npm install
npm run typecheck   # type check
npm test            # unit tests (vitest)
npm run build       # build to lib/

See DEVELOPMENT.md for technical notes and decisions.

Publishing

  1. Ensure npm run typecheck, npm test, and npm run build all pass.
  2. Publish with npm publish --access public.
  3. Add the dsh-plugin topic to the GitHub repository for ecosystem discovery.

License

MIT