JohnXu22786/hooks-adapter

Reuses hooks declared in Claude Code, Codex and opencode configs on dsh, executing shell, webhook, oracle and proxy handlers with zero runtime dependencies.

A hooks configuration compatibility layer for DeepSeek Harness: it reads existing hooks config files from mainstream agent harnesses (.claude/settings.json, .codex/hooks.json, the hooks section of opencode.json), maps their lifecycle events to dsh extension points, and executes four kinds of handlers — shell (command execution), webhook (HTTP callbacks), oracle (LLM evaluation) and proxy (subagent delegation). Config is read-only (your existing declarations stay unchanged), with timeout control, failure degradation policy, and a validate subcommand. Three integration modes: dsh plugin, stdio JSON-lines protocol for any host, and one-shot CLI.

Development & Runtime ★ 2 updated 2026-08-17
View on GitHub ↗

Install

dsh plugin --profile demo add github:JohnXu22786/hooks-adapter

dsh plugin --profile demo add github:JohnXu22786/hooks-adapter (dsh bundle with dsh.bundle.patch → cordis.patch.yml; no npm package — npm 404 verified 2026-08-30). Once added it inserts itself into the plugin tree and auto-discovers hooks configs on the next dsh run. Remove: dsh plugin --profile demo remove hooks-adapter. Also usable as a stdio JSON-lines protocol (any host) or one-shot CLI.

Compatibility

DSH bundle (Cordis apply); also stdio protocol + one-shot CLI for any host; zero runtime deps; Node >= 18; pure ESM + JSDoc types; MIT.

Details

Recent updates

Reuses .claude/.codex/opencode hooks configs in DSH; 4 handler kinds (shell/webhook/oracle/proxy); read-only config; timeout + degradation policy; 3 integration modes.

FAQ

Does it modify my existing hooks config?
No — config is read-only, not migrated; your existing hooks declarations stay unchanged.
Which harnesses' hooks can it read?
Claude Code (.claude/settings.json), Codex (.codex/hooks.json) and OpenCode (hooks section of opencode.json), mapping their lifecycle events to dsh extension points.
What handler types are supported?
Four: shell (command execution), webhook (HTTP callbacks), oracle (LLM evaluation) and proxy (subagent delegation).

Alternatives

GanyuanRan/Aegis · MrWeiCodes/dsh-permgate · arrow949/dsh-turn-approval

More plugins in Development & Runtime

Browse more in Development & Runtime

Guides for Development & Runtime plugins