聚合本人创建的 PR 反馈,分页采集 GitHub 评论与审查,支持重点标记和 DSH 面板、CLI 共用的版本化本地处理进度。
安装
# Release 预构建包
dsh plugin --profile web add "https://github.com/Harzva/dsh-pr-guardian/releases/download/v0.2.0-alpha.1/dsh-pr-guardian-0.2.0-alpha.1.tgz"
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Harzva/dsh-pr-guardian
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
A DSH management inbox for feedback on your own pull requests, maintained by Harzva. Version 0.2.0-alpha.1 targets DSH 0.1.1-rc.2, Cordis 4.0.1, React 18.2.0 and Node 24+. Tested on macOS.
The sidebar opens a searchable feedback panel. It discovers the active gh account's authored open PRs, paginates ordinary comments, formal reviews and review threads (including nested comments), and prioritizes human feedback, favorites, CI failures and conflicts. GitHub text is data, never executable instructions.
Local progress is version-bound: edited feedback becomes pending again. Favorites and pending / investigated / awaiting_user states survive restarts; resolved threads and superseded reviews are distinguished. Raw comment bodies are hashed within the adapter and are not persisted. The management API has no GitHub write operations.
Install the release artifact
Requirements: an authenticated GitHub CLI (gh auth status), Git, Node 24+, and the exact DSH compatibility tuple above. No model API key is needed for the inbox.
dsh plugin --profile web add https://github.com/Harzva/dsh-pr-guardian/releases/download/v0.2.0-alpha.1/dsh-pr-guardian-0.2.0-alpha.1.tgz
dsh --profile web
Open PR Guardian in the sidebar, then 刷新 GitHub. The release tarball contains compiled Host, Client and Typert exports. GitHub source-shortcut installation is a separate, unverified delivery path.
Shared Codex / DSH workflow
# From this source checkout after npm ci && npm run build:
node bin/guardian-management.mjs sync
node bin/guardian-management.mjs list
# Or use guardian-management from the installed package's bin directory.
Default state: $DSH_HOME/dsh-pr-guardian/management (DSH_HOME defaults to ~/.dsh). The CLI accepts --state-dir DIR; the plugin's stateDirectory setting can point to the same directory. Use identical directories to share progress between Codex and DSH.
The CLI action command accepts one JSON argument. Favorite example:
node bin/guardian-management.mjs action '{"kind":"favorite","caseId":"owner/repo#123","favorite":true}'
Feedback progress actions require kind=progress, caseId, eventId, the exact collected version, and status=pending|investigated|awaiting_user. A stale version is rejected. Local investigated status does not resolve a GitHub discussion. Feedback read failures preserve prior evidence; PRs leaving the authored-open queue require verification before being treated as closed.
For Codex scheduling, configure an hourly local automation to run the CLI, inspect pending feedback in priority order, prepare isolated candidate fixes and record version-bound progress after diagnosis. Notify only on meaningful changes or required decisions. Scheduling is owned by Codex; the DSH panel refreshes on request and does not install a hidden timer. The development workstation's private adapter and automation are not shipped in this public package.
State files use owner-only permissions, atomic replacement and an exclusive writer lock. WRITER_BUSY means another process owns the directory. If a process crashes, verify the PID in writer.lock is no longer running before removing only that lock. Never clear management.json to resolve contention. Search is bounded to 1,000 authored open PRs and feedback pagination is bounded; exceeding limits reports failure instead of silently treating partial discovery as complete.
Verification and scope
npm ci
npm run check
npm run pack:dsh
npm run verify:dsh-offline
The offline verifier packs fresh code, installs that exact tarball in a temporary DSH_HOME, cold-starts the real Web runtime, exercises strict management RPC and version conflict rejection, checks restart persistence, removes the plugin and verifies the remaining Web profile starts. It uses synthetic metadata without calling GitHub. A separate real UI smoke test exercises authenticated feedback sync and local panel actions.
This management preview is not completion of the full repair/publish plan. Two-stage approval, general candidate execution and post-push orchestration remain planned. The legacy generated-file CLI below remains separately gated with push disabled by default. See docs/release-0.2/PLAN.md and the original development plan for the distinction.
Legacy generated-file dry-run CLI
- Discover open PRs with
gh search prs. - Optionally consume the existing Codex
gh_pr_watch.pysnapshot adapter. - Dry-run rebase in a temporary clone only when GitHub reports a conflict.
- For
awesome-dsh-plugin, resolve onlyREADME.mdandREADME.zh.mdby restoring the current upstream version and regenerating them. - Record JSONL observations and produce a seven-day report.
- Ask a read-only, ephemeral Codex Agent for suggestions when deterministic policy refuses a conflict.
- Require global and repository opt-in plus an exact observed head lease before any push.
Setup
Requirements: macOS, Node.js 24+, Git, GitHub CLI, and an authenticated gh session.
gh auth login -h github.com --git-protocol ssh
npm test
node bin/dsh-pr-guardian.mjs doctor
node bin/dsh-pr-guardian.mjs monitor --once
node bin/dsh-pr-guardian.mjs report --days 7
Copy guardian.local.example.json to guardian.local.json only when a machine-local state directory, opaque localRef → absolute clone path repoMap, or external watcher command is needed. The local file is ignored by Git and must not be committed; public repository rules may contain only the opaque localRef, never the machine path.
Commands
doctor
discover
status --pr URL
analyze --pr URL
monitor --once [--pr URL] [--no-agent]
report --days 7
install-launchd
uninstall-launchd
--push exists for the later gated phase, but the shipped global and repository switches are both false. Passing the flag cannot bypass either policy gate.
Seven-day gate
Keep push disabled for at least seven natural days. Review every auto_fixable_generated observation. Enable pushing only after the report contains no misclassification, all generated candidates passed their configured checks, and a human accepts the sampled diffs.
See docs/01-需求分析.md, docs/02-架构设计.md, and docs/03-开发计划.md for the complete contract.
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-git-graph★ 7488
输入框上方提供 Git 分支选择器,并把分支泳道与提交历史画成图谱,沿着时间线找到任意变更。
Akimiya-z/codex-guard#dsh★ 141
在 DeepSeek Harness 内做提交前的 Pull Request 卫生检查:扫描当前改动中的 TODO 残留、硬编码密钥与非规范提交信息。
lehhair/dsh-diff-viewer★ 28
PiUI 风格 diff 查看器,替换 write/edit 工具调用的默认 DiffBlock。
DietCokewithSugar/dsh-user-experience★ 19
帮你发现项目中可能存在的用户体验问题:自动走查 React/TypeScript 源码,定位问题并给出具体优化建议。
DamonKoy/dsh-web-ui#dsh-git-graph★ 16
dsh web GUI 会话头部栏的 Git 分支选择器与提交图。
zoahdev/dsh-github-intelligence★ 14
目前最完整的 dsh GitHub 整合:仓库概览、Release、Issue、PR、贡献者、搜索与一键深度报告,内置 TTL 缓存,无需 API Key。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。