The two bridge plugins that run a user's existing Claude Code / Codex hook
config on the harness's typed interception seams, built on the shared
dsh-hook-protocol library. A bridge is a faithfulness adapter, not a power
tool: anything it does a native cordis plugin does more powerfully — the
bridge exists only to run UNMODIFIED external hooks.
- dsh-hooks-claude: CC dialect. Seven hook points (SessionStart,
UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStart,
SubagentStop), CC per-event stdin payloads, env + ${CLAUDE_PLUGIN_ROOT}/
${CLAUDE_PROJECT_DIR} substitution, literal-or-regex matcher.
- dsh-hooks-codex: Codex dialect — a deliberate subset. Five hook points,
always-regex matcher, snake_case payloads (turn_id/model, no trailing
newline), no env/substitution, block-only decisions.
Both map the neutral merged outcome onto the seam's typed Decision and stamp
an explicit {kind:'plugin'} source on injected context (so it is never
mislabeled as a user prompt). Config parse-failure is contained; only command
hooks run. updatedInput is logged+warned (input rewrite deferred); the Stop
loop-guard is deferred (TODO).
Tests: per-file 100% — config-parse unit branches + per-seam mappings
end-to-end through the REAL loop + REAL bash + REAL shell scripts (scripted
mock model only) + a real-Loader export-shape guard. A keyless ACP snapshot
scenario (hook-prompt-block) proves a UserPromptSubmit hook blocks a prompt
end-to-end (rejected turn -> ACP cancelled, hook/* events in the log); a
with-key e2e (hooks.e2e.ts) proves a PreToolUse hook blocks real bash
(verified on disk). The snapshot normalizer now scrubs hook/result.durationMs.
RFC: docs/rfc/implemented/feature/2026-06-30-hook-bridges.md
48 lines
1.4 KiB
JSON
48 lines
1.4 KiB
JSON
{
|
|
"name": "@deepseek-ai/dsh-hooks-codex",
|
|
"description": "Bridge plugin: run a Codex hooks.json hook config on the DeepSeek Harness interception seams",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"types": "lib/types/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./lib/types/index.d.ts",
|
|
"default": "./lib/index.js"
|
|
},
|
|
"./src/*": "./src/*",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"lib/index.js",
|
|
"lib/types/**/*.d.ts",
|
|
"lib/types/**/*.d.ts.map",
|
|
"src"
|
|
],
|
|
"license": "BSD-3-Clause",
|
|
"dependencies": {
|
|
"schemastery": "^3.18.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@deepseek-ai/dsh-agent": "^0.0.1",
|
|
"@deepseek-ai/dsh-hook-protocol": "^0.0.1",
|
|
"@deepseek-ai/dsh-llm": "^0.0.1",
|
|
"@deepseek-ai/dsh-session": "^0.0.1",
|
|
"@deepseek-ai/dsh-tools": "^0.0.1",
|
|
"cordis": "^4.0.0-rc.6"
|
|
},
|
|
"devDependencies": {
|
|
"@deepseek-ai/dsh-agent": "workspace:^",
|
|
"@deepseek-ai/dsh-agent-loop": "workspace:^",
|
|
"@deepseek-ai/dsh-bash": "workspace:^",
|
|
"@deepseek-ai/dsh-bash-local": "workspace:^",
|
|
"@deepseek-ai/dsh-hook-protocol": "workspace:^",
|
|
"@deepseek-ai/dsh-llm": "workspace:^",
|
|
"@deepseek-ai/dsh-session": "workspace:^",
|
|
"@deepseek-ai/dsh-system-prompt": "workspace:^",
|
|
"@deepseek-ai/dsh-tools": "workspace:^",
|
|
"cordis": "^4.0.0-rc.6"
|
|
}
|
|
}
|