ASM.Execution.Environment (ASM v0.9.2)

Copy Markdown View Source

Normalized runtime environment and policy context for ASM execution.

Summary

Types

t()

@type t() :: %ASM.Execution.Environment{
  allowed_tools: [String.t()],
  approval_posture: :manual | :auto | :none | nil,
  permission_mode: ASM.Permission.normalized_mode() | nil,
  workspace_root: String.t() | nil
}

validation_error()

@type validation_error() ::
  {:unknown_execution_environment_fields, [term()]}
  | {:invalid_workspace_root, term()}
  | {:invalid_allowed_tools, term()}
  | {:invalid_approval_posture, term()}
  | {:invalid_permission_mode, term()}
  | {:invalid_execution_environment, term()}

Functions

keys()

@spec keys() :: [atom(), ...]

new(attrs \\ nil)

@spec new(t() | keyword() | map() | nil) :: {:ok, t()} | {:error, validation_error()}

normalize_attrs(environment)

@spec normalize_attrs(t() | keyword() | map() | nil) ::
  {:ok, keyword()} | {:error, validation_error()}

to_attrs(environment)

@spec to_attrs(t()) :: keyword()