Skip to content
Français

createHarnessFileTools

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

Create the files toolset. read_file returns up to 2000 numbered lines of a UTF-8 file and refuses symbolic links, binary files and files over 4 MiB; list_files lists up to 1000 files that Git tracks or does not ignore. Both are read-only and declare their paths for permission rules.

Complete example and detailed rules.

  • optionsOptional
    FileSelectionOptions | undefined
    Choose Git-aware or plain-filesystem selection for file listing.
  • options.selectionOptional
    "git" | "filesystem" | undefined
    Defaults to git for legacy calls; filesystem performs bounded sandbox traversal without Git or .gitignore filtering.

HarnessToolset

export declare function createHarnessFileTools(
  options?: FileSelectionOptions,
): HarnessToolset;