Skip to content
Français

HarnessToolContext

import type { HarnessToolContext } from "@elie-laloum/outpost";
  • sandboxRequired
    SandboxLease
    Borrowed sandbox for commands and transfers. Operations follow the call deadline and turn cancellation; release() rejects with code configuration.
  • signalRequired
    AbortSignal
    Aborted when the call deadline expires or the turn is cancelled. JavaScript that ignores it keeps running detached.
  • callIdRequired
    string
    Identifier of the model tool call being executed.
  • modelRequired
    AgentModel
    Normalized model of the agent running the tool.
  • observeRequired
    (event: HarnessToolEvent) => void
    Reports a text, warning or raw event to dispatch observers; any other kind throws code configuration.
export interface HarnessToolContext {
  readonly sandbox: SandboxLease;
  readonly signal: AbortSignal;
  readonly callId: string;
  readonly model: AgentModel;
  observe(event: HarnessToolEvent): void;
}