Skip to content
Français

createHarnessShellTools

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

Create the shell toolset: shell runs sh -c in the repository root with empty input and a deadline, 120000 ms by default, and returns the exit status, stdout and stderr; a nonzero status is an error result. It declares the command for permission rules and needs a POSIX shell in the sandbox.

Complete example and detailed rules.

  • optionsOptional
    ShellToolsOptions | undefined
    Shell settings: the deadline of each command.
  • options.deadlineMsOptional
    number | undefined
    Deadline of each shell command, default 120000 (2 minutes). toolExecution.deadlineMs still bounds the whole call.

HarnessToolset

export declare function createHarnessShellTools(
  options?: ShellToolsOptions,
): HarnessToolset;