Repository navigation
Description
Summary
A caller of libtmux-lua cannot ask the library, in code, which tmux release a named feature needs or whether it is available on the connected tmux. The feature-to-release map exists only as an internal registry, the generated capabilities.json and a docs table. Expose it through the public API so a caller can query it.
Motivation
To decide whether a call will work, a caller has the snapshot's capabilities field, which holds the observed version string and, per entity kind, a table of format field names to booleans. That answers which fields this tmux reports. It does not answer whether a library feature such as Server:observe or JSON layouts is available. A refusal does carry the release it needed (required), but only after the call fails. Server has no version accessor of its own.
The registry already holds the answer: each entry has a stable id, the first release that has the feature (since), what the library does below it, and the public APIs and tmux commands involved. Its lookups, since(id) and workaround(id), sit in libtmux._internal, so a caller has no supported way to reach them.
Current state on trunk:
- The registry:
M.capabilitiesand its lookupsM.sinceandM.workaround, in the internallibtmux._internal.support.capabilitiesmodule. - The generated manifest, kept equal to the registry by a unit test:
capabilities.json. - The docs table: "Optional features" in
docs/compatibility.md. - The partial public surface:
snapshot.capabilities, documented ascapabilities.fields.
References
-
libtmux-raku and libtmux-erlang already expose their maps.
LibTmux::Capabilitiesanswersstatusandsupportsfor one feature and lists them all withfeatures, for an observed daemon version.tmux_capabilityexportsdescribe/1andrequire/2.method supports(Str:D $id --> Bool:D) { self.status($id).supported }
-
The same request is tracked in libtmux-ts#209, libtmux-go#170 and libtmux-java#164.
-
tmux records what each release changed in
CHANGES, whose newest section is 3.8.
Public capability lookup on PR 114
With Lua 5.5.1 on the tested head of PR 114 (96ff603c0), server:capabilities():await().features["control-mode"] reported the minimum release as 3.7 in all three runs. The reported support flag was false on tmux 3.3a and true on 3.7 and 3.8. A real server:observe(session):await() on each private server agreed with its flag. This gives the PR a public caller and a below-floor control. Control-mode registry entry on master
Activity
tony commentedon Dec 5, 2026
The updated capability PR reports the tmux generation verified at connection, using the same Request API in standalone Lua and Neovim. For explicit socket paths the program checks the pinned socket identity. For named and default endpoints, the report describes the generation the runtime last verified. The local outer suite passed on tmux 3.8, with focused checks on tmux 3.3a. Updated capability PR.