AgentToolPolicy.ActionPolicy (AgentToolPolicy v0.1.0)

Copy Markdown View Source

This module provides deterministic pre-dispatch policy for caller-classified agent tool actions.

The caller supplies the action class, autonomy posture, allowlist result, and optional guard result. This module returns :allow for internal work. It returns :act or :gate for outward work.

Summary

Functions

Decides the pre-dispatch verdict for a classified action.

Types

action_class()

@type action_class() :: %{
  surface: :internal | :outward,
  reversible: boolean(),
  time_sensitive: boolean()
}

guard()

@type guard() :: :allow | :block

input()

@type input() :: %{
  :class => action_class(),
  :posture => posture(),
  :allowlisted? => boolean(),
  optional(:guard) => guard()
}

posture()

@type posture() :: :safe | :auto

verdict()

@type verdict() :: :allow | :act | :gate

Functions

decide(input)

@spec decide(input()) :: verdict()

Decides the pre-dispatch verdict for a classified action.