Packages

Smoothie worker policy and capability guard hooks

Current section

Files

Jump to
smoothie_worker_policy lib smoothie_worker_policy execution_budget.ex
Raw

lib/smoothie_worker_policy/execution_budget.ex

defmodule Smoothie.Worker.Policy.ExecutionBudget do
@moduledoc """
Execution budget constraints for worker runs.
Defines time, memory, and tool access limits that policy guards enforce
before and during command execution.
"""
@type t :: %__MODULE__{
max_duration_ms: non_neg_integer() | nil,
max_memory_bytes: non_neg_integer() | nil,
allowed_tools: [String.t()] | nil,
denied_tools: [String.t()] | nil,
max_tool_calls: non_neg_integer() | nil
}
defstruct [
:max_duration_ms,
:max_memory_bytes,
:allowed_tools,
:denied_tools,
:max_tool_calls
]
end