Skip to content
Français

defineHarnessPermissions

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

Define ordered allow and deny rules over tool names, command patterns and repository paths. The harness evaluates them before before-tool hooks, and again after a hook rewrites the input; the first matching rule wins. Permissions are not a security boundary: the sandbox isolates.

Complete example and detailed rules.

  • optionsRequired
    HarnessPermissionsOptions
    Ordered rules and the default effect when none applies.
  • options.rulesRequired
    readonly HarnessPermissionRule[]
    Ordered rules; the first one that applies decides.
  • options.defaultOptional
    PermissionEffect | undefined
    Effect when no rule applies; defaults to allow.

HarnessPermissions

export declare function defineHarnessPermissions(
  options: HarnessPermissionsOptions,
): HarnessPermissions;