NAME

LibTmux::Snapshot - Captured graph with explicit completeness

METHODS

from_records

from_records(server_id => ..., generation => ..., sessions => [...], windows => [...], window_links => [...], panes => [...], clients => [...]) constructs a detached graph. Scalar records and relation IDs are copied. Omitted fields/collections remain unloaded; null is explicit. Invalid identities or inconsistent complete topology throw typed acquisition errors.

server_id

Return the captured server scope. Entity IDs are meaningful only within this scope and "generation".

generation

Return the captured daemon generation. LibTmux::Server checks it before mutations through captured handles; retained snapshots never silently refresh.

complete

Return the capture completeness Boolean. The strict live acquisition path fails on incomplete topology; it does not synthesize empty relations.

metadata

Return a fresh metadata hash with capture start/end, daemon version, and PID where acquired. Several commands observe an interval; the snapshot is not an atomic tmux transaction.

sessions

Return a fresh LibTmux::SessionSelection in captured order. Empty loaded collections yield empty selections; unloaded collections throw.

windows

Return a fresh LibTmux::WindowSelection containing each physical window identity once. Context lives in "window_links".

Return a fresh LibTmux::WindowLinkSelection retaining every session/index association, including repeated links of one physical window.

panes

Return a fresh LibTmux::PaneSelection containing each physical pane identity once. Membership edits cannot change the graph store.

clients

Return a fresh LibTmux::ClientSelection in captured order. A loaded empty client set is valid.

session_by_id

session_by_id('$1') returns a LibTmux::Session or undef. Single quotes preserve the dollar-prefixed ID instead of interpolating a regex capture.

window_by_id

window_by_id('@3') returns one physical LibTmux::Window or undef, independent of session link context.

pane_by_id

pane_by_id('%3') returns a LibTmux::Pane or undef. The returned handle retains the captured graph after this wrapper goes out of scope.

to_records

Return independent scalar records and adjacency IDs for detached use. No handles or live transport are serialized.

EXECUTION

All methods in this module operate on local captured data and perform no tmux I/O. Ordering is deterministic; public query methods do not mutate membership. Typed validation/evaluation errors propagate. See "snapshot" in LibTmux::Server for explicit acquisition and LibTmux::X for machine-readable failures.