dshbase

插件目录 / Developer / dsh-ci-doctor

dsh-ci-doctor

已验证 · 实测可装 jkrandom-sudo

✓ 持续维护 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

3Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-14最近推送
跨平台平台

功能简介

CI失败诊断插件:监控GitHub Actions新失败并解析日志

✅
我们的评价
可用 — 实测通过,早期项目

CI失败诊断插件:监控GitHub Actions新失败并解析日志 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-ci-doctor

中文 · npm · DeepSeek Harness

CI failure, diagnosed before you even open the logs. dsh-ci-doctor watches GitHub Actions for new failures, turns raw job logs into structured findings — normalized error signatures, failure categories, suspect files, trimmed log excerpts — and remembers every signature it has ever seen, so repeat failures are called out on sight. All through two agent tools and the gh CLI you already have authenticated.

Usage

Just ask your agent in plain language — it picks the right tool:

  • "Watch CI on this repo and tell me when something fails" → starts a ci_watch background job.
  • "Why did the nightly build fail?" → runs ci_diagnose on the latest failed run and hands you the diagnosis card.
  • "Diagnose run 31782742089 on cli/cli" → targeted diagnosis of one specific run.

You get a markdown diagnosis card straight in the chat:

## CI diagnosis: cli/cli run #31782742089

**Conclusion:** failure · [run](https://github.com/cli/cli/actions/runs/31782742089)

### Job: Issue Triage (skills-driven)

**Failed steps:** triage
**Signatures:**

- `81a0edf32878` (timeout, first time seen) — server:http_server Session timeout configured…
  **Suspect files:** `script/triage.ts`

<details><summary>Log excerpt</summary>
…
</details>

What it does

1. Watch — the ci_watch tool. Starts a background job that polls for new failed runs (the first poll sets a baseline, so historical red runs never fire the alarm):

{ "repo": "owner/name", "branch": "main", "intervalSeconds": 30, "timeoutMinutes": 60 }
  • Streams status lines you can read any time; cancel any time.
  • Backs off exponentially on transient errors, gives up after 5 consecutive failures, fails immediately on auth errors.
  • On detection it settles with a ready-made next step: call ci_diagnose with repo="…" runId=….
  • Watch a repo explicitly, or omit repo to watch the current working directory's repository.

2. Diagnose — the ci_diagnose tool. Point it at a run (or the latest failed run) and it returns the card shown above:

{ "repo": "owner/name", "runId": 31782742089 }
  • Error signatures are normalized (timestamps, hex ids, and numbers masked) so the same failure gets the same id across runs.
  • Each signature is classified: test / build / lint / typecheck / dependency / network / permission / timeout / infra.
  • Suspect files are mined from the log, vendor paths dropped.
  • Log excerpts are trimmed to a budget with honest … (skipped N lines) … markers — content is never invented.

3. The failure-signature ledger. Every diagnosed signature is remembered — how many times seen, first/last sighting, last repo and run URL. Repeat failures surface as seen 3× in the report instead of pretending to be new. The ledger persists as a ci_doctor storage unit in the DSH storage directory when the profile provides a storage domain; it is in-memory otherwise.

Read-only by contract

Both tools only ever read GitHub state (via gh api). They never push, merge, cancel, rerun, or write anything to your repositories. Every result carries a repositoryWrites: false marker, and the package ships an optional invariant companion (dsh-ci-doctor/invariant) that fails loudly if a result ever loses that marker on hosts with an invariants service.

Install

dsh plugin --profile web add dsh-ci-doctor

Prerequisites: the GitHub CLI authenticated (gh auth login) — the plugin reuses that session, there is nothing else to configure.

Configuration

Option Default Meaning
pollIntervalSeconds 30 Seconds between watch polls (min 5).
watchTimeoutMinutes 60 Wall-clock lifetime of one watch (min 1).
maxLogLines 200 Per-job log excerpt budget (min 20).
ghBin gh GitHub CLI executable.
ledgerEnabled true Record signatures into the ledger.

How it works

The plugin speaks to the host only through documented Cordis seams and imports no @deepseek-ai/* package:

  • tools — registers ci_watch / ci_diagnose on the real tool runtime.
  • jobs — ci_watch runs as a first-class streaming background job, owned by the calling agent.
  • shell — every gh call goes through the host's guarded, sandboxed execution pipeline.
  • storageDomain — the signature ledger persists as the ci_doctor storage unit.

Development

pnpm install
pnpm typecheck && pnpm test && pnpm build   # types, unit tests, bundle
pnpm format:check                           # Prettier

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-ci-doctor」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

Web profile:

dsh plugin --profile web add dsh-ci-doctor

Headless(CLI)profile:

dsh plugin --profile headless add dsh-ci-doctor

包信息

npm:dsh-ci-doctor · 版本 — · 实测环境 dsh 0.1.0-rc.6

实测报告

端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。

使用场景

扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。

适合谁

想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。

二次开发建议

工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7797 个插件 →