Actor-scoped read-model redaction helpers.
Visibility is a host-owned authorization boundary. Squidie keeps durable history immutable and returns factual read models; host applications can call this module at their HTTP, LiveView, CLI, or dashboard boundary to derive a less-sensitive view for a specific actor.
Summary
Functions
Applies a host-owned visibility policy to a read-model view.
Types
@type scope() :: :external | :operator | :auditor
Functions
@spec redact(term(), term(), policy()) :: {:ok, term()} | {:error, visibility_error()}
Applies a host-owned visibility policy to a read-model view.
Supported policy forms:
:external,:operator, or:auditora two-arity function
(actor, view -> scope | {:ok, scope})- a module exporting
visibility_scope/2 {module, opts}for modules exportingvisibility_scope/3
:auditor returns the original view. :external and :operator preserve
high-level status and current/manual task shape while removing payloads,
command history, claim metadata, attempt inputs/results/errors, and other
nested runtime evidence.