Skip to content
Français

HarnessHookResult

import type { HarnessHookResult } from "@elie-laloum/outpost";

What a harness hook’s run() returns for its phase: a decision, or undefined to change nothing. session-start: { instructions } adds instructions; before-tool: { deny } refuses the call with that reason, { input } replaces its input; after-tool: { result } replaces the tool result; stop: { continue } sends that text and keeps the loop running; before-model and after-model only observe. Any other shape fails with code configuration.

Complete example and detailed rules.

export type HarnessHookResult<Phase extends HarnessHookPhase> =
  HarnessHookDecisions[Phase] | undefined | void;