Optional erasure contract for data owned by Stack packages.
A package that persists Instance-scoped data implements erasure_plan/2 and
erase_instance/2 on its installable module. Core discovers those callbacks
from the immutable Stack bound to the Agent; runtime handles remain call-local
options and are never copied into a Run, checkpoint, or erasure proof.
Summary
Functions
Erases every installed package-data adapter in Stack order.
Builds a read-only capability component for installed package data.
Types
@type outcome() :: :erased | :already_erased
@type plan_component() :: %{ configured: boolean(), status: :ready | :not_configured | :unsupported | :unavailable, package_count: non_neg_integer(), adapters: [map()] }
Callbacks
@callback erase_instance( Spectre.Instance.Ref.t(), keyword() ) :: {:ok, term()} | {:error, term()}
@callback erasure_plan( Spectre.Instance.Ref.t(), keyword() ) :: {:ok, map()} | {:error, term()}
Functions
@spec erase_instance(Spectre.Instance.Ref.t(), keyword(), (-> :ok | {:error, term()})) :: {:ok, map()} | {:error, term()}
Erases every installed package-data adapter in Stack order.
@spec erasure_plan( Spectre.Instance.Ref.t(), keyword() ) :: {:ok, plan_component()} | {:error, term()}
Builds a read-only capability component for installed package data.