Libtmux
Native captured values, typed queries and explicit command descriptions.
Source and package
- Qualified name
-
Libtmux - Package
- libtmux
- Source
- lib/libtmux.mli
-
Description#
A
Snapshot.towns immutable observations. Entity accessors and query evaluation perform no I/O, preserve captured order and remain usable after client closure. UseLibtmux_unix.ClientorLibtmux_eio.Clientto acquire or mutate state.Retaining any entity retains its complete snapshot graph. Copy scalar summaries when captured relationships are no longer needed. Targets omit the graph but remain restricted to their original
Source.t.Typical flow
Capture explicitly, traverse
Session.window_linksandWindow.panes, filter withSeq.filterorQuery.matching, establish cardinality withQuery.exactly_one, then submit a command with a bound target.The core depends only on the standard library. Its abstract observations are safe to share; live clients and subscriptions belong to their backend.
See the graph guide for window links and the query guide for native predicates and typed expressions.
Members32#
- Captured_text module
- Cardinality module
- Client_name module
- Client_observation module
- Command module Typed descriptions of explicit acquisition and mutation operations. Construction performs no I/O; a backend validates and admits the command.
- Created module IDs reported by a successful creation reply. Only the requested kind is newly created; the other fields can describe existing containers.
- Endpoint module An explicit socket description. Constructing an endpoint neither reads the environment nor starts a daemon.
Source.tadds the observed daemon and connection generation. - Environment module
- Error module Expected input, capture, capability and transport failures. Cancellation belongs to the chosen backend and is not converted into an ordinary error.
- Expr module Inspectable predicates whose entity and operand types are checked by the compiler. Combine native closures separately with
Seq.filter. Evaluation follows captured relationships without acquisition or hidden caches. - Field module Sealed scalar descriptors carrying entity and value types. Descriptors read captured data and provide trusted identities for
Exprvalues. UseRelationfor graph edges. - Formats module
- Generation module A random connection-generation identifier. Reconnecting creates a new generation even when the socket and server PID are unchanged.
- Geometry module
- Hook module
- ID interface
- Key module
- Layout module
- Model module Built-in model witnesses and canonical field lookup for typed codecs. Untrusted field names must resolve against the selected model.
- Operations module Construct typed tmux operations for a backend client. Observations are immutable, mutations use explicit targets, and no command retries a mutation against another connection generation. Construction performs no I/O; the descriptions below state what execution does.
- Options module Version-aware option descriptors and captured scoped values. Sparse array indexes and inherited entries retain their tmux meaning.
- Output module Future observed pane bytes, local cursors and explicit continuity loss. Output cursors are unrelated to snapshot times or server-side history.
- Pane module A captured pane with local geometry, process metadata and a window relationship. Use
Pane.targetfor explicit actions; reading the observation never refreshes it. - Plan module Explicit source-filter planning for a new acquisition. A plan separates supported tmux predicates from residual local evaluation; it never changes the I/O-free contract of
Query.matching. Backend capture operations acquire a complete graph and do not consume these plans. - Query module Sequence adapters and bounded cardinality checks over captured values. Matching preserves order and duplicates. Expected absence and ambiguity remain ordinary result values.
- Relation module Typed edges in a captured graph. Many, one and optional relations are distinct; an unacquired relationship is never represented as an empty one.
- Session module A captured session and its ordered window-link contexts. A session can contain repeated links to the same global window.
- Snapshot module A complete immutable graph captured over an acquisition interval. Collections are replayable immutable arrays. Capturing several tmux commands does not establish an atomic transaction.
- Source module Endpoint and observed daemon identity for one connection generation. Constructing metadata alone does not establish a live binding.
- Spawn module A process description with explicit argv or shell semantics, working directory and environment. Describing a process performs no I/O.
- Window module A global window shared by its session links. Window index and current state belong to a link, while panes and geometry belong to the window.
- Window_link module One captured session/index/window context. It is not a stable link incarnation across unlinking, movement or reindexing.