Optional Readonlycapabilities?: EventCapabilityTableThe harness's event capability table — what each event HONOURS — used to
compute HookRunResult.delivery. Defaults to the table of the
registered adapter whose hookProtocol IS protocol (so the default
protocol gets its own harness's table, and no other). A harness with no
table is judged only where the protocol's own injectableEvents proves
delivery, and is unknown elsewhere.
Optional Readonlycondition?: stringThe hook's CONDITION as the harness config writes it — Claude Code's if,
e.g. "Bash(git push *--force*)". When the condition does not match the
event, the harness never spawns the hook, so neither do we: the result comes
back ran: false, blocked: false.
🔴 PASS IT WHENEVER THE HOOK YOU ARE TESTING DECLARES ONE. A conditional hook
tested without its condition is tested as an unconditional one, and since the
bodies of real conditional guards are unconditional denies, that reports the
guard as blocking everything you feed it. See core/hook-condition.ts.
Optional Readonlyprotocol?: HookProtocolThe harness whose wire protocol + condition grammar to use. Defaults to Claude Code, so every existing caller is unaffected.
Options for runHook — every RunScriptOptions knob except
stdin, which the hook layer owns (it serializes the event there).