Skip to content
Français

HarnessContextStrategyOptions

import type { HarnessContextStrategyOptions } from "@elie-laloum/outpost";
  • nameRequired
    string
    Nonempty name reported in compaction events.
  • compactRequired
    (input: HarnessContextInput) => HarnessContextResult | Promise<HarnessContextResult>
    Called before every model request; returns a rewritten message list, or nothing to keep the history. The list must start and end with a user message and pair each tool call with its result, or the turn fails with code configuration.
export interface HarnessContextStrategyOptions {
  readonly name: string;
  compact(
    input: HarnessContextInput,
  ): HarnessContextResult | Promise<HarnessContextResult>;
}