JohnXu22786/ci-runner
dsh-ci-runner
Trigger GitHub Actions workflow runs and local test pipelines, stream their logs back, and on failure hand the tail of the log to DeepSeek f
Install
npx @deepseek-ai/dsh plugin --profile demo add ./path/to/ci-runnerRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/ci-runner)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from JohnXu22786/ci-runner, cleaned of badges and images.
ci-runner
Trigger your CI and get it fixed — a dsh plugin bundle that runs GitHub Actions workflows and local test pipelines, streams their logs back, tracks their status, and when something fails hands the tail of the log to DeepSeek for a Markdown root-cause report with fix steps.
- Two sources, one interface: GitHub Actions via
workflow_dispatch(+ check-run APIs) and local command pipelines (npm test,pytest, …) through the platform shell. - Bounded log reading: GitHub job logs streamed back per job and tail-truncated; local output captured with a per-stream cap so a runaway process can't blow up the agent context.
- DeepSeek diagnosis: on failure, the tail log plus a heuristic error
classification is sent to the harness
ctx.llm(or any configured OpenAI-compatible endpoint) to produce a report covering failure stage, error classification, most likely root cause, suggested fix steps and related files. - Status tracking: poll runs to completion (
queued/in_progress/completed) with configurable interval and a hard timeout. - Credentials by environment only: the GitHub token is read from an environment variable at call time, never logged and never persisted; every returned log and report is masked against known secrets.
- Zero runtime dependencies:
fetch+node:child_process, plain Node.js ESM, ships with five tools (ci_trigger,ci_status,ci_logs,ci_watch,ci_diagnose) and a matching CLI.
How it works
your repo / your machine
│ workflow_dispatch + check-run APIs shell (npm test, pytest, …)
▼ ▼
GitHubApi (fetch) LocalRunner (child_process)
│ │
└──────────────► CiService ◄────────────────┘
│ trigger · status · logs · watch · diagnose
├─► dsh adapter: five ci_* tools on ctx.tools (ctx.llm for analysis)
├─► CLI: ci-runner trigger|status|logs|watch|diagnose
└─► report: Markdown with the five canonical sections
All state (stored local runs, config, secret-masking) lives in one
CiService instance, so tools and CLI behave identically. The dsh adapter
and the CLI are two thin entry points over it.
Requirements
- Node.js >= 18.17 (global
fetch) - For the dsh integration: a working DeepSeek Harness install providing the
toolsservice (and, for model-powered diagnosis, thellmservice). - A GitHub token in the environment (
GITHUB_TOKENby default) withactions:writescope for dispatch andactions:readfor status/logs.
Installation into dsh
As a dsh bundle (recommended)
A bundle is an npm package that contributes a configuration layer. From the profile you want to use:
dsh plugin --profile demo add ./path/to/ci-runner
This links the checkout and appends dsh-ci-runner to the profile's bundle
list because package.json declares dsh.bundle. Verify and boot:
dsh --profile demo --dump-config # shows the "# == dsh-ci-runner" layer
dsh --profile demo
The contributed patch layer (cordis.patch.yml) inserts one plugin row
mounting the adapter entry (a package subpath resolved through the package's
exports map):
- insert:
- id: ci-runner
name: dsh-ci-runner/adapter
As a patch overlay (no packaging)
…
