Files
deepseek-harness/packages/experimental/hook-protocol/src/errors.ts
T
sjw1231 98e08f2fa2 feat(hooks): record HookError codes on hook denials and blocks
A PreToolUse deny now records HookError / HOOK_DENIED and a PostToolUse
block records HookError / HOOK_BLOCKED through the guard and
post-execute info contract. Model-facing reasons are unchanged.

Refs #7869
2026-11-09 14:50:04 +08:00

11 lines
518 B
TypeScript

/** Structured error identity that hook-backed tool policies record on denied and blocked calls. @module */
/** Error name shared by every hook policy failure. */
export const HOOK_ERROR_NAME = 'HookError'
/** Code for a call a `PreToolUse` hook denied before dispatch; the model should not retry the call unchanged. */
export const HOOK_DENIED = 'HOOK_DENIED'
/** Code for a result a `PostToolUse` hook blocked after dispatch; the hook's feedback replaces the result. */
export const HOOK_BLOCKED = 'HOOK_BLOCKED'