Current section
Files
Jump to
Current section
Files
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