An indexed immutable graph observed over a capture interval.
Construction and traversal perform no I/O. fields declares loaded fields
over the supplied entity IDs; complete declares complete server entity
sets. Missing declarations remain unloaded, including on empty sets.
Unavailable capabilities use a separate declaration. Relations require
complete join domains. A snapshot reserves no tmux objects.
Summary
Types
Declared entity sets and field availability; completeness is separate from an empty captured set.
Coverage of one captured entity domain; missing field entries are unloaded.
Construction metadata: one server instance, ordered millisecond timestamps and explicit coverage declarations.
Observed rows grouped by canonical entity; construction validates and deduplicates their identities.
An immutable observation interval with indexed entities and explicit coverage.
Functions
Returns a materialized attached-client selection without I/O.
Looks up one exact observed ID without I/O.
Returns plain observed items in stable identity order without loading data.
Validates observed rows, rejecting conflicts, invalid fields and dangling covered references.
Returns a materialized physical pane selection without I/O.
Resolves a covered relation through captured indexes; never refreshes.
Requires a declared complete entity set, even when it has no rows.
Requires a loaded field over the captured entity domain before evaluation.
Requires a complete relation domain, including known-empty domains.
Returns a materialized session selection without I/O.
Returns a materialized membership selection without I/O.
Returns a materialized physical window selection without I/O.
Types
@type coverage() :: %{ entities: %{required(LibTmux.Schema.entity()) => entity_coverage()} }
Declared entity sets and field availability; completeness is separate from an empty captured set.
@type entity_coverage() :: %{ ids: MapSet.t(LibTmux.Ref.id()), complete: boolean(), fields: %{optional(atom()) => :loaded | :unavailable} }
Coverage of one captured entity domain; missing field entries are unloaded.
@type option() :: {:server_instance, String.t()} | {:captured_from, integer()} | {:captured_until, integer()} | {:fields, %{optional(LibTmux.Schema.entity()) => [atom()]}} | {:complete, [LibTmux.Schema.entity()]} | {:unavailable, %{optional(LibTmux.Schema.entity()) => [atom()]}}
Construction metadata: one server instance, ordered millisecond timestamps and explicit coverage declarations.
@type rows() :: %{ optional(LibTmux.Schema.entity()) => [map() | LibTmux.Schema.observation()] }
Observed rows grouped by canonical entity; construction validates and deduplicates their identities.
@type t() :: %LibTmux.Snapshot{ captured_from: integer(), captured_until: integer(), clients: %{optional(String.t()) => LibTmux.Client.t()}, coverage: coverage(), id: pos_integer(), indexes: indexes(), order: %{required(LibTmux.Schema.entity()) => [LibTmux.Ref.id()]}, panes: %{optional(String.t()) => LibTmux.Pane.t()}, schema_version: 1, server_instance: String.t(), sessions: %{optional(String.t()) => LibTmux.Session.t()}, window_links: %{optional(LibTmux.Ref.id()) => LibTmux.WindowLink.t()}, windows: %{optional(String.t()) => LibTmux.Window.t()} }
An immutable observation interval with indexed entities and explicit coverage.
Functions
@spec clients(t()) :: LibTmux.Selection.t(LibTmux.Client.t())
Returns a materialized attached-client selection without I/O.
@spec fetch(t(), LibTmux.Schema.entity_selector(), LibTmux.Ref.id()) :: {:ok, LibTmux.Schema.observation()} | {:error, LibTmux.Error.t()}
Looks up one exact observed ID without I/O.
@spec items(t(), LibTmux.Schema.entity_selector()) :: [LibTmux.Schema.observation()]
Returns plain observed items in stable identity order without loading data.
@spec new(rows(), [option()]) :: {:ok, t()} | {:error, LibTmux.Error.t()}
Validates observed rows, rejecting conflicts, invalid fields and dangling covered references.
@spec panes(t()) :: LibTmux.Selection.t(LibTmux.Pane.t())
Returns a materialized physical pane selection without I/O.
@spec require_complete!(t(), LibTmux.Schema.entity_selector()) :: :ok
Requires a declared complete entity set, even when it has no rows.
@spec require_field!(t(), LibTmux.Schema.entity_selector(), atom()) :: :ok
Requires a loaded field over the captured entity domain before evaluation.
@spec require_relation!( t(), LibTmux.Schema.entity_selector(), atom(), :all | [LibTmux.Ref.id()] ) :: :ok
Requires a complete relation domain, including known-empty domains.
@spec sessions(t()) :: LibTmux.Selection.t(LibTmux.Session.t())
Returns a materialized session selection without I/O.
@spec window_links(t()) :: LibTmux.Selection.t(LibTmux.WindowLink.t())
Returns a materialized membership selection without I/O.
@spec windows(t()) :: LibTmux.Selection.t(LibTmux.Window.t())
Returns a materialized physical window selection without I/O.