mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
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
49 lines
2.0 KiB
JSON
49 lines
2.0 KiB
JSON
{
|
|
"files": [],
|
|
"references": [
|
|
{ "path": "./vendor/cosmokit" },
|
|
{ "path": "./vendor/schemastery" },
|
|
{ "path": "./vendor/cordis" },
|
|
{ "path": "./vendor/loader" },
|
|
{ "path": "./vendor/include" },
|
|
{ "path": "./vendor/group" },
|
|
{ "path": "./vendor/timer" },
|
|
{ "path": "./vendor/hmr" },
|
|
{ "path": "./vendor/logger-console" },
|
|
{ "path": "./packages/util/brand" },
|
|
{ "path": "./packages/llm/llm" },
|
|
{ "path": "./packages/core/session" },
|
|
{ "path": "./packages/session-persistence/session-persistence" },
|
|
{ "path": "./packages/session-persistence/session-persistence-jsonl" },
|
|
{ "path": "./packages/session-persistence/session-persistence-sqlite" },
|
|
{ "path": "./packages/core/system-prompt" },
|
|
{ "path": "./packages/core/agent" },
|
|
{ "path": "./packages/core/tools" },
|
|
{ "path": "./packages/core/agent-loop" },
|
|
{ "path": "./packages/core/agent-core" },
|
|
{ "path": "./packages/bash/bash" },
|
|
{ "path": "./packages/compact/compact" },
|
|
{ "path": "./packages/llm/llm-deepseek" },
|
|
{ "path": "./packages/llm/llm-pi-ai" },
|
|
{ "path": "./packages/bash/bash-local" },
|
|
{ "path": "./packages/bash/tool-bash" },
|
|
{ "path": "./packages/support/invariants" },
|
|
{ "path": "./packages/ui/acp" },
|
|
{ "path": "./packages/ui/acp-agent" },
|
|
{ "path": "./packages/ui/stdio-agent" },
|
|
{ "path": "./packages/support/ui-stdio" },
|
|
{ "path": "./packages/support/llm-replay" },
|
|
{ "path": "./packages/subagent/subagent" },
|
|
{ "path": "./packages/support/subagent-mock" },
|
|
{ "path": "./packages/subagent/tool-subagent" },
|
|
{ "path": "./packages/subagent/subagent-inprocess" },
|
|
{ "path": "./packages/subagent/subagent-spawn" },
|
|
{ "path": "./packages/subagent/subagent-fork" },
|
|
{ "path": "./packages/subagent/subagent-acp" },
|
|
{ "path": "./packages/todo/tool-todo" },
|
|
{ "path": "./packages/hooks/hook-protocol" },
|
|
{ "path": "./packages/hooks/hooks-claude" },
|
|
{ "path": "./packages/hooks/hooks-codex" }
|
|
]
|
|
}
|