dshbase

插件目录 / Developer / dsh-onfail

dsh-onfail

已验证 · 实测可装 ZZZjf13960

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-28最近推送
跨平台平台

功能简介

轮询一个 GitHub 仓库的 Actions,把失败的 CI 检查做成 DSH 侧栏卡片(job / SHA / 日志尾部),点卡片可打开带失败上下文的修复会话;v0 仅轮询,支持夹具模式零 token 使用

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

轮询一个 GitHub 仓库的 Actions,把失败的 CI 检查做成 DSH 侧栏卡片(job / SHA / 日志尾部),点卡片可打开带失败上下文的修复会话;v0 仅轮询,支持夹具模式零 token 使用 实测能干净安装、正常启动。早期项目,但功能可用。

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

README

dsh-onfail

CI failed. Stay in DSH. Click the card, start the fix.
CI 挂了也别离开 DSH:侧栏一张失败卡,点一下带 log 开修。

DeepSeek Harness plugin: poll one GitHub repository's Actions, surface failed checks as sidebar cards (job name, SHA, log tail), and open a repair session preloaded with that failure context.

v0 is polling only. No webhooks.

Install

Requires a DSH web profile. From any directory:

dsh plugin --profile web add github:ZZZjf13960/dsh-onfail

This package ships committed JavaScript (dsh/index.js + dsh/client.js) on main, so the GitHub specifier is loadable without a prepare build or pnpm allowBuilds gate.

Then start (or restart) the web UI:

dsh --profile web

The plugin mounts as package name dsh-onfail via cordis.patch.yml. Settings, then Plugins, should show an Onfail (GitHub Actions) card. A CI control appears in the sidebar footer; failed checks also render as overlay cards.

Remove

Either form drops the profile dependency and the bundle layer:

dsh plugin --profile web remove github:ZZZjf13960/dsh-onfail
dsh plugin --profile web remove dsh-onfail

Restart the web UI so the host process unloads the routes and the browser half.

Configure

Field Default Where
repo empty Plugin settings card, or config.repo on the dsh-onfail loader row (owner/name)
token empty Plugin settings card (never echoed back). Also DSH_ONFAIL_TOKEN then GITHUB_TOKEN
pollIntervalMs 60000 Settings card or loader config (~60s)
fixture false Settings checkbox, loader config, or DSH_ONFAIL_FIXTURE=1
logTailChars 4000 Loader config

Token resolution order: plugin config, then DSH_ONFAIL_TOKEN, then GITHUB_TOKEN. Nothing is hardcoded. A teammate supplies a live token and CI later.

A classic repo PAT (or GitHub App installation token) needs Actions read on that repository. Fine-grained PATs need Actions: Read.

Loader override example ($DSH_HOME/profiles/web/cordis.patch.yml):

- id: dsh-onfail
  config:
    repo: your-org/your-repo
    pollIntervalMs: 60000
    fixture: false

Polling

Every pollIntervalMs the host half calls:

  1. GET /repos/{owner}/{repo}/actions/runs?status=completed
  2. For failed / timed-out runs, GET .../actions/runs/{id}/jobs
  3. For failed jobs, GET .../actions/jobs/{id}/logs (log tail cached per job id)

There are no webhooks. The browser half polls GET /dsh-onfail/state every few seconds and renders cards.

Fixture mode

Tests and a live UI walkthrough can produce a card without a GitHub token:

  • Settings, Onfail, enable Fixture mode, or
  • DSH_ONFAIL_FIXTURE=1, or
  • loader config.fixture: true

This loads fixtures/failed-run.json (acme/widget, job unit-tests, SHA aaaabbb, a failing test log tail).

node --test

Acceptance checks

  1. Install from GitHub on main. Manifest tests assert dsh.bundle.patch points at cordis.patch.yml that inserts package dsh-onfail, plus exports["./client"] and dsh.client. JS is committed on main. Verifier still runs dsh plugin --profile web add github:ZZZjf13960/dsh-onfail.

  2. Failed Actions checks become sidebar cards (job, SHA, log tail). Fixture and the poll mapper produce that card shape. The client registers sidebar.footer.action and shell.overlay. Verifier still confirms the CI footer / overlay cards in DSH Web.

  3. Clicking a card opens a repair session with repo, job, SHA, and log tail. The click path is sessions.createsessions.opensession.prompt(..., 'queue'). A rejected prompt or failed create shows a role=status error on the card. Composer paste is not a session. Verifier still clicks a card in the live UI.

  4. Missing token: readable error, harness does not crash or hang. apply() with no token sets error and still registers routes; it never throws. Verifier still opens the plugin UI with empty token/repo.

  5. Remove drops the profile entry. Documented; dsh plugin remove reconciles bundles by installed state. Verifier still runs remove and checks dsh.profile.bundles.

Layout

dsh-onfail/
  package.json           # dsh.bundle + dsh.client + exports
  cordis.patch.yml       # insert id/name: dsh-onfail
  fixtures/failed-run.json
  dsh/index.js           # host apply (imports @deepseek-ai/cordis + schemastery)
  dsh/plugin.js          # poll loop + /dsh-onfail/* routes
  dsh/client.js          # lazy CJS browser half
  dsh/config.js poll.js cards.js http.js
  test/*.test.js

License

MIT

安装

🧩 让 Agent 自动装(推荐)

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

dsh plugin add dshbase-catalog

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

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:ZZZjf13960/dsh-onfail

Headless(CLI)profile:

dsh plugin --profile headless add github:ZZZjf13960/dsh-onfail

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

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

分享徽章

Developer 里更多

浏览全部 7795 个插件 →