# TypeScript API reference

Source: https://libtmux.org/en/ts/latest/reference/

> Types, methods, and functions in libtmux for TypeScript.

TypeScript API

925 symbols, extracted from source. Every type name in a signature links to its own entry; every cross-reference in a doc comment resolves against the same table.

Server 2 types, 2 functions and constants

[Server 55 members](https://libtmux.org/en/ts/latest/reference/server-server/)

One tmux server, addressed by the socket it listens on.

[ConnectedServer 6 members](https://libtmux.org/en/ts/latest/reference/types-connectedserver/)

A server with a persistent observation connection and daemon-lifetime tracking.

* DaemonEpoch

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L73)] [¶](#common.DaemonEpoch "Permalink to DaemonEpoch")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L73)] [¶](#common.DaemonEpoch "Permalink to DaemonEpoch")

  DaemonEpoch

  Which run of the daemon a handle came from, counted from zero.

  A restarted tmux on the same socket issues `%0` again to a different pane, so an id from the previous run names nothing. Comparing epochs is what catches that, and it is why [`SessionRef` ](https://libtmux.org/en/ts/latest/reference/common-sessionref/)and friends carry one.

- DaemonIdentity

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/server.ts#L94)] [¶](#server.DaemonIdentity "Permalink to DaemonIdentity")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/server.ts#L94)] [¶](#server.DaemonIdentity "Permalink to DaemonIdentity")

  DaemonIdentity

  Which tmux daemon answered, as tmux itself reports it.

  A socket path names a place, not a process: `kill-server` and a restart give a new daemon the same path, and that daemon numbers its panes from `%0` again. The pid alone is not enough — pids are reused — so the start time goes with it.

Session 2 types, 5 functions and constants

[SessionWhere 35 members](https://libtmux.org/en/ts/latest/reference/selection-sessionwhere/)

Criteria matching a session, evaluated against one snapshot.

[Session 32 members](https://libtmux.org/en/ts/latest/reference/session-session/)

One session on one tmux server, as a handle rather than a copy of it.

* SessionAliasMap

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L401)] [¶](#field_types.SessionAliasMap "Permalink to SessionAliasMap")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L401)] [¶](#field_types.SessionAliasMap "Permalink to SessionAliasMap")

  SessionAliasMap

  The readable name this library gives each session format field.

  A handle exposes both spellings: the alias, and tmux's own token through `format`. The alias is this library's, so a field with no entry here is reachable only by its tmux name.

- SessionId

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L16)] [¶](#common.SessionId "Permalink to SessionId")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L16)] [¶](#common.SessionId "Permalink to SessionId")

  SessionId

  A session ID in tmux's `$n` form.

* SessionIdInput

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L26)] [¶](#common.SessionIdInput "Permalink to SessionIdInput")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L26)] [¶](#common.SessionIdInput "Permalink to SessionIdInput")

  SessionIdInput

  Raw session-ID text or an authenticated session ID.

- SessionRef

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L165)] [¶](#common.SessionRef "Permalink to SessionRef")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L165)] [¶](#common.SessionRef "Permalink to SessionRef")

  SessionRef

  One session, named unambiguously across servers and daemon restarts.

* SessionRow

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/session.ts#L453)] [¶](#session.SessionRow "Permalink to SessionRow")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/session.ts#L453)] [¶](#session.SessionRow "Permalink to SessionRow")

  SessionRow

  The tmux format fields a session handle is built from, by tmux's own names.

  Read through [`format` ](https://libtmux.org/en/ts/latest/reference/session-session-format/)when the aliased property names on the handle are not what a caller wants — a field tmux added in a later version has a token here whether or not this library has given it a name.

Window 3 types, 7 functions and constants

[WindowWhere 41 members](https://libtmux.org/en/ts/latest/reference/selection-windowwhere/)

Criteria matching a window, evaluated against one snapshot.

[Window 37 members](https://libtmux.org/en/ts/latest/reference/window-window/)

One window on one tmux server, as a handle rather than a copy of it.

[ApplyWindowContext 3 members](https://libtmux.org/en/ts/latest/reference/builder-applywindowcontext/)

What applying one window needs to know beyond the window itself.

* WindowAliasMap

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L441)] [¶](#field_types.WindowAliasMap "Permalink to WindowAliasMap")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L441)] [¶](#field_types.WindowAliasMap "Permalink to WindowAliasMap")

  WindowAliasMap

  The readable name this library gives each window format field.

  A handle exposes both spellings: the alias, and tmux's own token through `format`. The alias is this library's, so a field with no entry here is reachable only by its tmux name.

- WindowDirection

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L23)] [¶](#constants.WindowDirection "Permalink to WindowDirection")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L23)] [¶](#constants.WindowDirection "Permalink to WindowDirection")

  WindowDirection

  Where a new window lands relative to the one it was created from.

  tmux inserts at the next index before or after the target and moves the windows above it up to make room, so indices a caller is holding can shift. Without either direction the target index \*is\* the new window's place.

* WindowId

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L18)] [¶](#common.WindowId "Permalink to WindowId")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L18)] [¶](#common.WindowId "Permalink to WindowId")

  WindowId

  A window ID in tmux's `@n` form.

- WindowIdInput

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L28)] [¶](#common.WindowIdInput "Permalink to WindowIdInput")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L28)] [¶](#common.WindowIdInput "Permalink to WindowIdInput")

  WindowIdInput

  Raw window-ID text or an authenticated window ID.

* WindowRef

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L166)] [¶](#common.WindowRef "Permalink to WindowRef")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L166)] [¶](#common.WindowRef "Permalink to WindowRef")

  WindowRef

  One window, named unambiguously across servers and daemon restarts.

- WindowRow

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/window.ts#L584)] [¶](#window.WindowRow "Permalink to WindowRow")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/window.ts#L584)] [¶](#window.WindowRow "Permalink to WindowRow")

  WindowRow

  The tmux format fields a window handle is built from, by tmux's own names.

  Read through [`format` ](https://libtmux.org/en/ts/latest/reference/window-window-format/)when the aliased property names on the handle are not what a caller wants — a field tmux added in a later version has a token here whether or not this library has given it a name.

* WindowTarget

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L522)] [¶](#types.WindowTarget "Permalink to WindowTarget")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L522)] [¶](#types.WindowTarget "Permalink to WindowTarget")

  WindowTarget

  A relative direction, or any window target tmux accepts.

  The intersection keeps the three literals in autocomplete instead of letting the bare `string` swallow them.

Pane 2 types, 6 functions and constants

[Pane 46 members](https://libtmux.org/en/ts/latest/reference/pane-pane/)

One pane on one tmux server, as a handle rather than a copy of it.

[PaneWhere 83 members](https://libtmux.org/en/ts/latest/reference/selection-panewhere/)

Criteria matching a pane, evaluated against one snapshot.

* PaneAliasMap

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L487)] [¶](#field_types.PaneAliasMap "Permalink to PaneAliasMap")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L487)] [¶](#field_types.PaneAliasMap "Permalink to PaneAliasMap")

  PaneAliasMap

  The readable name this library gives each pane format field.

  A handle exposes both spellings: the alias, and tmux's own token through `format`. The alias is this library's, so a field with no entry here is reachable only by its tmux name.

- PaneDirection

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L36)] [¶](#constants.PaneDirection "Permalink to PaneDirection")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L36)] [¶](#constants.PaneDirection "Permalink to PaneDirection")

  PaneDirection

  Which side of the current pane a split puts the new one on.

  `Above` and `Left` are the same split as `Below` and `Right` with tmux's `-b` flag, so the geometry is identical and only the occupant differs.

* PaneId

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L20)] [¶](#common.PaneId "Permalink to PaneId")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L20)] [¶](#common.PaneId "Permalink to PaneId")

  PaneId

  A pane ID in tmux's `%n` form.

- PaneIdInput

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L30)] [¶](#common.PaneIdInput "Permalink to PaneIdInput")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L30)] [¶](#common.PaneIdInput "Permalink to PaneIdInput")

  PaneIdInput

  Raw pane-ID text or an authenticated pane ID.

* PaneRef

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L167)] [¶](#common.PaneRef "Permalink to PaneRef")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L167)] [¶](#common.PaneRef "Permalink to PaneRef")

  PaneRef

  One pane, named unambiguously across servers and daemon restarts.

- PaneRow

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/pane.ts#L647)] [¶](#pane.PaneRow "Permalink to PaneRow")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/pane.ts#L647)] [¶](#pane.PaneRow "Permalink to PaneRow")

  PaneRow

  The tmux format fields a pane handle is built from, by tmux's own names.

  Read through [`format` ](https://libtmux.org/en/ts/latest/reference/pane-pane-format/)when the aliased property names on the handle are not what a caller wants — a field tmux added in a later version has a token here whether or not this library has given it a name.

Client 2 types, 2 functions and constants

[Client 12 members](https://libtmux.org/en/ts/latest/reference/client-client/)

One client attached to a tmux server, as a handle rather than a copy of it.

[ClientWhere 31 members](https://libtmux.org/en/ts/latest/reference/selection-clientwhere/)

Criteria matching a client, evaluated against one snapshot.

* ClientAliasMap

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L577)] [¶](#field_types.ClientAliasMap "Permalink to ClientAliasMap")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L577)] [¶](#field_types.ClientAliasMap "Permalink to ClientAliasMap")

  ClientAliasMap

  The readable name this library gives each client format field.

  A handle exposes both spellings: the alias, and tmux's own token through `format`. The alias is this library's, so a field with no entry here is reachable only by its tmux name.

- ClientRow

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/client.ts#L107)] [¶](#client.ClientRow "Permalink to ClientRow")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/client.ts#L107)] [¶](#client.ClientRow "Permalink to ClientRow")

  ClientRow

  The tmux format fields a client handle is built from, by tmux's own names.

  Read through [`format` ](https://libtmux.org/en/ts/latest/reference/client-client-format/)when the aliased property names on the handle are not what a caller wants — a field tmux added in a later version has a token here whether or not this library has given it a name.

Hooks 1 function or constant

* HookScope

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L481)] [¶](#types.HookScope "Permalink to HookScope")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L481)] [¶](#types.HookScope "Permalink to HookScope")

  HookScope

  The server, session, window, or pane table that holds a hook.

Options 2 functions and constants

* DefaultOptionScope

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L46)] [¶](#constants.DefaultOptionScope "Permalink to DefaultOptionScope")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L46)] [¶](#constants.DefaultOptionScope "Permalink to DefaultOptionScope")

  DefaultOptionScope

  "Whatever scope tmux would use", as a value rather than an absent argument.

  Branded so it cannot be confused with an [`OptionScope` ](https://libtmux.org/en/ts/latest/reference/constants-optionscope/): passing this means the call sends no scope flag, which is not the same as sending the session one.

- OptionScope

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L55)] [¶](#constants.OptionScope "Permalink to OptionScope")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L55)] [¶](#constants.OptionScope "Permalink to OptionScope")

  OptionScope

  Which table an option is read from or written to.

  The scopes are not one chain. A pane option falls back to the window's, and an unset window or pane option falls back to the global window options; a session option falls back to the global session options, and server options belong to no session, window or pane at all. So setting something at window scope reaches every pane in it that has not set its own, and setting it at session scope does not.

Layout and geometry 6 functions and constants

* ResizeAdjustmentDirection

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L7)] [¶](#constants.ResizeAdjustmentDirection "Permalink to ResizeAdjustmentDirection")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/constants.ts#L7)] [¶](#constants.ResizeAdjustmentDirection "Permalink to ResizeAdjustmentDirection")

  ResizeAdjustmentDirection

  Which edge a resize moves, in tmux's own terms.

  The direction is where the boundary travels, not which pane grows: `Up` on a pane with a neighbour above it takes space from that neighbour.

- SplitCellSize

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L166)] [¶](#types.SplitCellSize "Permalink to SplitCellSize")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L166)] [¶](#types.SplitCellSize "Permalink to SplitCellSize")

  SplitCellSize

  A nonnegative cell count within tmux's signed 32-bit geometry range.

  Examples

  ```ts
  import { splitSize } from "libtmux";
  import type { SplitCellSize } from "libtmux";
  const size: SplitCellSize = splitSize(20);
  ```

* SplitPercentage

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L179)] [¶](#types.SplitPercentage "Permalink to SplitPercentage")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L179)] [¶](#types.SplitPercentage "Permalink to SplitPercentage")

  SplitPercentage

  A canonical whole percentage from `0%` through `100%`.

  Examples

  ```ts
  import type { SplitPercentage } from "libtmux";
  const size: SplitPercentage = "30%";
  void size;
  ```

- SplitSize

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L190)] [¶](#types.SplitSize "Permalink to SplitSize")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L190)] [¶](#types.SplitSize "Permalink to SplitSize")

  SplitSize

  An authenticated cell count or canonical percentage for a pane split.

  Examples

  ```ts
  import type { SplitSize } from "libtmux";
  const size: SplitSize = "30%";
  void size;
  ```

* isSplitSize ( *value : : [unknown](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#unknown "unknown (external)")&#x20;*) → [value](https://libtmux.org/en/ts/latest/reference/types-tmuxsubscriptionevent-value/ "types.TmuxSubscriptionEvent.value") is [SplitSize](https://libtmux.org/en/ts/latest/reference/types-splitsize-1i84/ "types.SplitSize")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L218)] [¶](#types.isSplitSize "Permalink to isSplitSize")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L218)] [¶](#types.isSplitSize "Permalink to isSplitSize")

  isSplitSize

  Test whether a value is valid tmux split geometry.

  Examples

  ```ts
  import { isSplitSize } from "libtmux";
  const value: unknown = "30%";
  const size = isSplitSize(value) ? value : undefined;
  ```

- splitSize ( *value : : [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number "number (external)")&#x20;*) → [SplitCellSize](https://libtmux.org/en/ts/latest/reference/types-splitcellsize/ "types.SplitCellSize") ( *value : : [SplitPercentage](https://libtmux.org/en/ts/latest/reference/types-splitpercentage/ "types.SplitPercentage")&#x20;*) → [SplitPercentage](https://libtmux.org/en/ts/latest/reference/types-splitpercentage/ "types.SplitPercentage") ( *value : : [SplitSize](https://libtmux.org/en/ts/latest/reference/types-splitsize-1i84/ "types.SplitSize")&#x20;*) → [SplitSize](https://libtmux.org/en/ts/latest/reference/types-splitsize-1i84/ "types.SplitSize") ( *value : : [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number "number (external)") | [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")&#x20;*) → [SplitSize](https://libtmux.org/en/ts/latest/reference/types-splitsize-1i84/ "types.SplitSize")

  functionoverload4 overloads \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L236)] [¶](#types.splitSize "Permalink to splitSize")

  functionoverload4 overloads \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L236)] [¶](#types.splitSize "Permalink to splitSize")

  splitSize

  Authenticate tmux split geometry or throw.

  Examples

  ```ts
  import { splitSize } from "libtmux";
  const size = splitSize(20);
  ```

Environment 2 functions and constants

* EnvironmentScope

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L497)] [¶](#types.EnvironmentScope "Permalink to EnvironmentScope")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L497)] [¶](#types.EnvironmentScope "Permalink to EnvironmentScope")

  EnvironmentScope

  Environments live at server (global) or session scope, as hooks do.

- EnvironmentValue

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L506)] [¶](#types.EnvironmentValue "Permalink to EnvironmentValue")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L506)] [¶](#types.EnvironmentValue "Permalink to EnvironmentValue")

  EnvironmentValue

  A variable's state in a tmux environment.

  `null` is tmux's `-NAME`: the variable is present and marked for removal from the environment of any process tmux starts. Absent from the map is the third state, and means tmux carries no entry at all.

Versions 1 type

[TmuxVersion 4 members](https://libtmux.org/en/ts/latest/reference/types-tmuxversion/)

The tmux version a server is running.

Commands 1 type, 4 functions and constants

[CommandOutcome 3 members](https://libtmux.org/en/ts/latest/reference/common-commandoutcome/)

One command's result together with how far it got.

* ConnectionAlias

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L72)] [¶](#common.ConnectionAlias "Permalink to ConnectionAlias")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L72)] [¶](#common.ConnectionAlias "Permalink to ConnectionAlias")

  ConnectionAlias

  Which connection a handle came through.

  Two servers on different sockets number their objects from the same place, so an id alone does not identify anything. This is the other half.

- DaemonGuard

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L55)] [¶](#engine.DaemonGuard "Permalink to DaemonGuard")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L55)] [¶](#engine.DaemonGuard "Permalink to DaemonGuard")

  DaemonGuard

  Making a command refuse to run on a daemon that is not the one it was read from.

  A tmux id is unique within one daemon and reissued by the next: `kill-server` and a restart give a new daemon the same socket, and it numbers its panes from `%0` again. A handle captured before the restart therefore names something that exists, belongs to somebody else, and answers to the same command.

  Checking first and sending second does not close that: the daemon can change between the two. `if-shell -F` does, because it is not a shell — tmux expands the format inside its command queue and `cmdq_insert_after`s the guarded command into the same queue, so nothing runs in between. The condition is `pid` and `start_time` together, since pids are reused.

  The refusal has to be visible. tmux answers a false condition with no output and status 0, which is indistinguishable from a command that printed nothing, so the else branch is a freshly named unknown command. A 128-bit suffix makes matching a pre-existing command alias a guess, and the exact diagnostic distinguishes the refusal from the guarded command failing. The guarded command keeps its own stdout and stderr either way.

* TmuxCommand

  typealiasreadonly \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L61)] [¶](#engine.TmuxCommand "Permalink to TmuxCommand")

  typealiasreadonly \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L61)] [¶](#engine.TmuxCommand "Permalink to TmuxCommand")

  TmuxCommand

  One nonempty tmux command, before command-list separators are inserted.

- TmuxEngine

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L133)] [¶](#engine.TmuxEngine "Permalink to TmuxEngine")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L133)] [¶](#engine.TmuxEngine "Permalink to TmuxEngine")

  TmuxEngine

  What runs a tmux command for a server.

  Two obligations beyond returning bytes, and both are what the layers above assume rather than check:

  Every request is one tmux invocation and carries its ordered command list. Keeping that structure at the seam prevents an engine from splitting a snapshot into several clients or guessing where global flags end. Environment, stdin, signal, and timeout apply once to the whole invocation.

  `daemonGuard`, when a request carries one, must reach tmux — or the engine must be bound to one daemon for its lifetime, the way a control connection is. Ignoring it on a reconnecting engine means a handle read before a restart addressing whatever now holds its id. `guardRequest` is what the built-in engine calls to honour it, published so an implementer does not reproduce the wrapper, its else branch, and the stderr that tells refusal from failure.

Formats 1 type, 7 functions and constants

[FormatSubscription 3 members](https://libtmux.org/en/ts/latest/reference/types-formatsubscription/)

A format tmux expands and reports whenever its value changes.

* DecodedFormatValue

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L371)] [¶](#field_types.DecodedFormatValue "Permalink to DecodedFormatValue")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L371)] [¶](#field_types.DecodedFormatValue "Permalink to DecodedFormatValue")

  DecodedFormatValue

  What a caller reads for one field, once the text has been decoded.

- FormatFieldName

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L15)] [¶](#field_types.FormatFieldName "Permalink to FormatFieldName")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L15)] [¶](#field_types.FormatFieldName "Permalink to FormatFieldName")

  FormatFieldName

  Every format field this tmux vocabulary knows, by tmux's own token.

  Read from tmux's `format.c` rather than written by hand, so a field a newer tmux added is here as soon as the vocabulary is regenerated.

* FormatIdentityType

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L216)] [¶](#field_types.FormatIdentityType "Permalink to FormatIdentityType")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L216)] [¶](#field_types.FormatIdentityType "Permalink to FormatIdentityType")

  FormatIdentityType

  The three shapes that name a tmux object rather than describe one.

  A field of one of these types carries an id a handle can be rebuilt from, which is why the row types refuse to report them as empty.

- FormatScope

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L5)] [¶](#field_types.FormatScope "Permalink to FormatScope")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L5)] [¶](#field_types.FormatScope "Permalink to FormatScope")

  FormatScope

  Which kind of object a format field describes.

  A field belongs to exactly one scope, and asking a pane for a session's field is what `#{}` silently answers as empty rather than as an error.

* FormatValueType

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L209)] [¶](#field_types.FormatValueType "Permalink to FormatValueType")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L209)] [¶](#field_types.FormatValueType "Permalink to FormatValueType")

  FormatValueType

  The shapes tmux writes that are not simply text.

- FormatValueTypes

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L226)] [¶](#field_types.FormatValueTypes "Permalink to FormatValueTypes")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L226)] [¶](#field_types.FormatValueTypes "Permalink to FormatValueTypes")

  FormatValueTypes

  Which fields carry which shape.

  Derived from tmux's own format.c and held to a live server by tests/integration/format\_types.test.ts on every version CI runs.

  Local: [`DecodedFormatValue` ](https://libtmux.org/en/ts/latest/reference/field_types-decodedformatvalue/)is what a caller needs.

* RawFormatValue

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L360)] [¶](#field_types.RawFormatValue "Permalink to RawFormatValue")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L360)] [¶](#field_types.RawFormatValue "Permalink to RawFormatValue")

  RawFormatValue

  The raw text tmux writes, authenticated where it carries an identity.

Queries 1 type, 14 functions and constants

[RegexCriteriaData 2 members](https://libtmux.org/en/ts/latest/reference/selection-regexcriteriadata/)

A pattern and its flags, kept apart from any regular-expression object.

* ManyRelation

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L96)] [¶](#selection.ManyRelation "Permalink to ManyRelation")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L96)] [¶](#selection.ManyRelation "Permalink to ManyRelation")

  ManyRelation

  How criteria apply to a collection: to any of it, all of it, or none.

  At least one of the three must be given. `every` and `none` both hold vacuously for an empty collection, which is set theory rather than a bug, and `some` is what a caller usually wants instead.

- ModelKindOf

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L19)] [¶](#selection.ModelKindOf "Permalink to ModelKindOf")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L19)] [¶](#selection.ModelKindOf "Permalink to ModelKindOf")

  ModelKindOf

  Which of the four criteria shapes a handle type is matched with.

* NonZeroDigit

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L79)] [¶](#selection.NonZeroDigit "Permalink to NonZeroDigit")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L79)] [¶](#selection.NonZeroDigit "Permalink to NonZeroDigit")

  NonZeroDigit

  A leading digit, which tmux never writes as `0` in a multi-digit number.

- OneRelation

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L101)] [¶](#selection.OneRelation "Permalink to OneRelation")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L101)] [¶](#selection.OneRelation "Permalink to OneRelation")

  OneRelation

  How criteria apply to a single related object, which may be absent.

  `null` matches the absence itself — a pane whose window is no longer in the snapshot — rather than matching anything.

* RawFlag

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L88)] [¶](#selection.RawFlag "Permalink to RawFlag")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L88)] [¶](#selection.RawFlag "Permalink to RawFlag")

  RawFlag

  The text tmux sends for a flag: it writes these two and nothing else.

- RawNumber

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L82)] [¶](#selection.RawNumber "Permalink to RawNumber")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L82)] [¶](#selection.RawNumber "Permalink to RawNumber")

  RawNumber

  The decimal text tmux sends for a field it reports as a number or timestamp.

* ScalarCriteria

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L90)] [¶](#selection.ScalarCriteria "Permalink to ScalarCriteria")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L90)] [¶](#selection.ScalarCriteria "Permalink to ScalarCriteria")

  ScalarCriteria

  One field's criteria: a value to equal, or a filter describing how to compare.

  The bare value is shorthand for `{ equals: value }`, and `null` matches a field tmux reports as unset rather than empty.

- StringFilter

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L68)] [¶](#selection.StringFilter "Permalink to StringFilter")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L68)] [¶](#selection.StringFilter "Permalink to StringFilter")

  StringFilter

  A text comparison, of which exactly one form must be given.

  Written as a union so the type rejects `{}` — criteria that constrain nothing would match everything, which is never what a caller meant.

* WhereDocumentV1

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L505)] [¶](#selection.WhereDocumentV1 "Permalink to WhereDocumentV1")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L505)] [¶](#selection.WhereDocumentV1 "Permalink to WhereDocumentV1")

  WhereDocumentV1

  Criteria as a portable document: which model, which version, and the criteria themselves.

  The version is in the payload because these cross a process boundary — an MCP client, a config file — where the reader's library may be older than the writer's. Nothing widens `1` in place; a new shape gets a new number.

- WhereOf

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L325)] [¶](#selection.WhereOf "Permalink to WhereOf")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L325)] [¶](#selection.WhereOf "Permalink to WhereOf")

  WhereOf

  The criteria a selection of this handle type accepts.

  Written in terms of the handle rather than the kind so a caller holding a \`Selection\<Pane>\` gets pane criteria without naming the kind twice.

* compileBoundedRegex ( *pattern : : [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")&#x20;*) → [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp "RegExp (MDN Web Docs)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L15)] [¶](#selection.compileBoundedRegex "Permalink to compileBoundedRegex")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L15)] [¶](#selection.compileBoundedRegex "Permalink to compileBoundedRegex")

  compileBoundedRegex

  Compile a regex under the deterministic selection-query work budget.

- decodeWhereDocument ( *input : : [unknown](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#unknown "unknown (external)")&#x20;*) → [WhereDocumentV1](https://libtmux.org/en/ts/latest/reference/selection-wheredocumentv1/ "selection.WhereDocumentV1")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L547)] [¶](#selection.decodeWhereDocument "Permalink to decodeWhereDocument")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L547)] [¶](#selection.decodeWhereDocument "Permalink to decodeWhereDocument")

  decodeWhereDocument

  Validate a WHERE document and restore camelCase criteria names.

  The returned document is canonical and deeply frozen.

  Examples

  ```ts
  import { decodeWhereDocument } from "libtmux/selection";
  const document = decodeWhereDocument(
    JSON.parse('{"model":"pane","version":1,"where":{"pane_title":"logs"}}'),
  );
  if (document.model === "pane") snapshot.panes.where(document.where);
  ```

  * Raises

    * [QueryValidationError](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationerror/ "errors.QueryValidationError") – when the document or its criteria are invalid.

  Discussed in [Filtering and queries](https://libtmux.org/en/concepts/queries/)

* encodeWhereDocument ( *document : : [WhereDocumentV1](https://libtmux.org/en/ts/latest/reference/selection-wheredocumentv1/ "selection.WhereDocumentV1")&#x20;*) → [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L528)] [¶](#selection.encodeWhereDocument "Permalink to encodeWhereDocument")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L528)] [¶](#selection.encodeWhereDocument "Permalink to encodeWhereDocument")

  encodeWhereDocument

  Serialize a WHERE document as canonical JSON.

  Field names and values use tmux's stable wire spellings. The input is validated without invoking accessors or conversion hooks.

  Examples

  ```ts
  import { encodeWhereDocument } from "libtmux";
  const encoded = encodeWhereDocument({
    model: "pane",
    version: 1,
    where: { title: { contains: "log" } },
  });
  ```

  * Raises

    * [QueryValidationError](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationerror/ "errors.QueryValidationError") – when the document or its criteria are invalid.

  Discussed in [Filtering and queries](https://libtmux.org/en/concepts/queries/)

- parseLegacyWhere ( *model : : Model&#x20;*, *input : : [unknown](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#unknown "unknown (external)")&#x20;*) → [Extract](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Extract "Extract (MDN Web Docs)")<[WhereDocumentV1](https://libtmux.org/en/ts/latest/reference/selection-wheredocumentv1/ "selection.WhereDocumentV1"), { [readonly](https://libtmux.org/en/ts/latest/reference/selection-clientwhere-readonly/ "selection.ClientWhere.readonly") model: Model }>

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L566)] [¶](#selection.parseLegacyWhere "Permalink to parseLegacyWhere")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L566)] [¶](#selection.parseLegacyWhere "Permalink to parseLegacyWhere")

  parseLegacyWhere

  Convert the Python port's `name__contains` spelling to canonical criteria.

  Accepts one own data property on a plain object and never invokes accessors or conversion hooks. The returned document and its criteria are frozen.

  Examples

  ```ts
  import { parseLegacyWhere } from "libtmux/selection";
  const document = parseLegacyWhere("window", { name__contains: "log" });
  snapshot.windows.where(document.where);
  ```

  * Raises

    * [QueryValidationError](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationerror/ "errors.QueryValidationError") – when the model is not `session` or `window`, or the input is not exactly one string-valued `name__contains` property.

Queries — Fields 2 functions and constants

* AliasedFields

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L386)] [¶](#field_types.AliasedFields "Permalink to AliasedFields")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L386)] [¶](#field_types.AliasedFields "Permalink to AliasedFields")

  AliasedFields

  Idiomatic property names layered over a row, carrying decoded values.

- StringFilterFields

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L57)] [¶](#selection.StringFilterFields "Permalink to StringFilterFields")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L57)] [¶](#selection.StringFilterFields "Permalink to StringFilterFields")

  StringFilterFields

  A field's criteria accept its decoded shape as well as the text tmux sends: `where({ active: true })` and `where({ active: "1" })` are the same query, and serialize identically. A `null` criterion matches any wire value that the field decoder treats as absent or invalid, rather than one particular wire spelling.

  The text side exists because the wire does. `encodeFormatValue` lowers every criterion to tmux's text before a query is serialized, and [`WhereDocumentV1` ](https://libtmux.org/en/ts/latest/reference/selection-wheredocumentv1/)types both what a caller writes and what [`decodeWhereDocument` ](https://libtmux.org/en/ts/latest/reference/selection-decodewheredocument/)gives back — so a type that refused text would be lying about the documents this library's own encoder produces. That is the difference from an ORM, whose query AST never round-trips through a type the caller also authors.

  `Raw` is therefore not a taste. `"0" | "1"` is the exact wire domain for a flag, while an integer uses `${bigint}` intersected with a decimal prefix. That rules out fractions, exponents, radix prefixes, leading zeroes, `-0`, [`NaN` ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN), and prose. TypeScript cannot bound an integer's magnitude, so the query validator also requires safe range at runtime. `format_values.test.ts` holds the layers in step.

  The substring operations stay `string` deliberately: `contains` asks about the characters tmux sent, and a numeric field's text has characters like any other.

Snapshots 1 type

[ServerSnapshot 4 members](https://libtmux.org/en/ts/latest/reference/types-serversnapshot/)

An immutable view of the server at one instant.

Workspaces 2 functions and constants

* CommandPolicy

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/operation_options.ts#L9)] [¶](#operation_options.CommandPolicy "Permalink to CommandPolicy")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/operation_options.ts#L9)] [¶](#operation_options.CommandPolicy "Permalink to CommandPolicy")

  CommandPolicy

  When a pane's `shell_command` entries are sent to it.

  `create-only`, the default, sends them only to panes this apply created. `always` sends them to every pane on every apply.

- PrunePolicy

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L21)] [¶](#ownership.PrunePolicy "Permalink to PrunePolicy")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L21)] [¶](#ownership.PrunePolicy "Permalink to PrunePolicy")

  PrunePolicy

  What to do with windows and panes the workspace does not describe.

Workspaces — Plans 11 types, 17 functions and constants

[PanePlans 3 members](https://libtmux.org/en/ts/latest/reference/pane-paneplans/)

What [`Pane.plan` ](https://libtmux.org/en/ts/latest/reference/pane-pane-plan/)offers, one entry per mutation it can describe.

[SessionPlans 2 members](https://libtmux.org/en/ts/latest/reference/session-sessionplans/)

What [`Session.plan` ](https://libtmux.org/en/ts/latest/reference/session-session-plan/)offers, one entry per mutation it can describe.

[PlannedOperation 2 members](https://libtmux.org/en/ts/latest/reference/types-plannedoperation/)

A tmux command that has been described but not run.

[WindowPlans 3 members](https://libtmux.org/en/ts/latest/reference/window-windowplans/)

What [`Window.plan` ](https://libtmux.org/en/ts/latest/reference/window-window-plan/)offers, one entry per mutation it can describe.

[WorkspaceWindowPlacement 5 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowplacement/)

One existing window placement named by a workspace plan.

[WorkspaceWindowCreation 2 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowcreation/)

A window that applying would create.

[WorkspacePaneCreation 2 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacepanecreation/)

Panes that applying would create in one window position.

[WorkspacePaneRemoval 2 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacepaneremoval/)

Existing panes that applying would destroy.

[WorkspaceWindowRemoval 2 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowremoval/)

How applying would remove an existing window placement.

[WorkspaceWindowRename 3 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowrename/)

One existing window rename, identified independently of its current name.

[WorkspacePlan 8 members](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspaceplan/)

Session, window, and pane membership changes an apply would make.

* Workspace

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L38)] [¶](#config.Workspace "Permalink to Workspace")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L38)] [¶](#config.Workspace "Permalink to Workspace")

  Workspace

  A validated workspace with every schema default and transform applied.

  In other ports Describe a workspace as data

  * Python tmuxp uses configuration dictionaries rather than a dedicated workspace value type
  * Ruby [`LibTmux::Workspace`](https://libtmux.org/en/ruby/latest/workspace/reference/libtmux-workspace/)
  * Lua No source-verified Lua equivalent is recorded for this operation.
  * Rust [`config.Workspace`](https://libtmux.org/en/rs/latest/workspace/reference/config-workspace/)
  * Go [`workspace.Workspace`](https://libtmux.org/en/go/latest/workspace/reference/workspace-workspace/)
  * Java [`io.github.libtmux.workspace.Workspace.Workspace`](https://libtmux.org/en/java/latest/workspace/reference/io-github-libtmux-workspace-workspace-workspace/)
  * .NET [`LibTmux.Workspace.WorkspaceFile`](https://libtmux.org/en/dotnet/latest/workspace/reference/libtmux-workspace-workspacefile/)
  * C++ [`libtmux::workspace::Workspace`](https://libtmux.org/en/cxx/latest/workspace/reference/libtmux-workspace-workspace/)
  * Swift [`Workspace`](https://libtmux.org/en/swift/latest/workspace/reference/workspace/)

- WorkspaceApplyMilestone

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L48)] [¶](#builder.WorkspaceApplyMilestone "Permalink to WorkspaceApplyMilestone")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L48)] [¶](#builder.WorkspaceApplyMilestone "Permalink to WorkspaceApplyMilestone")

  WorkspaceApplyMilestone

  A high-level apply operation that finished before a later one failed.

* WorkspaceApplyStage

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L56)] [¶](#builder.WorkspaceApplyStage "Permalink to WorkspaceApplyStage")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L56)] [¶](#builder.WorkspaceApplyStage "Permalink to WorkspaceApplyStage")

  WorkspaceApplyStage

  The high-level operation an apply was attempting when it failed.

- WorkspaceInput

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L46)] [¶](#config.WorkspaceInput "Permalink to WorkspaceInput")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L46)] [¶](#config.WorkspaceInput "Permalink to WorkspaceInput")

  WorkspaceInput

  Workspace data before schema defaults and transforms are applied.

* WorkspaceOptionValue

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L4)] [¶](#config.WorkspaceOptionValue "Permalink to WorkspaceOptionValue")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L4)] [¶](#config.WorkspaceOptionValue "Permalink to WorkspaceOptionValue")

  WorkspaceOptionValue

  A value tmux stores for a session or window option.

- WorkspacePane

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L7)] [¶](#config.WorkspacePane "Permalink to WorkspacePane")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L7)] [¶](#config.WorkspacePane "Permalink to WorkspacePane")

  WorkspacePane

  A pane: a bare command string, or the settings the pane is created with.

* WorkspaceRetention

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L49)] [¶](#planning.WorkspaceRetention "Permalink to WorkspaceRetention")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L49)] [¶](#planning.WorkspaceRetention "Permalink to WorkspaceRetention")

  WorkspaceRetention

  Surplus topology retained because removing it would exceed the policy.

- WorkspaceWindow

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L16)] [¶](#config.WorkspaceWindow "Permalink to WorkspaceWindow")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L16)] [¶](#config.WorkspaceWindow "Permalink to WorkspaceWindow")

  WorkspaceWindow

  A window with every schema default applied.

* WorkspaceWindowInput

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L27)] [¶](#config.WorkspaceWindowInput "Permalink to WorkspaceWindowInput")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L27)] [¶](#config.WorkspaceWindowInput "Permalink to WorkspaceWindowInput")

  WorkspaceWindowInput

  A window as written, before `panes` defaults to one implicit pane.

- applyWorkspace ( *server : : [Server](https://libtmux.org/en/ts/latest/reference/server-server/ "server.Server")&#x20;*, *workspaceInput : : [WorkspaceInput](https://libtmux.org/en/ts/latest/workspace/reference/config-workspaceinput/ "config.WorkspaceInput")&#x20;*, *options : : [ApplyWorkspaceOptions](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-applyworkspaceoptions/ "operation_options.ApplyWorkspaceOptions") = {}&#x20;*) → [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise (MDN Web Docs)")<[Session](https://libtmux.org/en/ts/latest/reference/session-session/ "session.Session")>

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L113)] [¶](#builder.applyWorkspace "Permalink to applyWorkspace")

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L113)] [¶](#builder.applyWorkspace "Permalink to applyWorkspace")

  applyWorkspace

  Build a workspace into a real tmux session, or reconcile one that exists.

  tmux gives every new session a window and every new window a pane, so the first window and first pane of each level are adopted rather than created. Creating them anyway is the classic workspace-builder bug that leaves an empty leading window behind.

  What this reconciles is \*topology\*: which windows exist, in what order, under what names, with how many panes, under which layout. It is safe to apply twice and the second run does not duplicate anything. It is deliberately not a process supervisor — see [`CommandPolicy` ](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-commandpolicy/)— and it does not unset options a previous version of the file had set, because tmux cannot say which of an option's current values this file is responsible for.

  * Raises

    * ZodError – when the workspace does not satisfy the strict config schema.

    * [TypeError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError "TypeError (MDN Web Docs)") – when the operation options are invalid.

    * [WorkspaceApplyError](https://libtmux.org/en/ts/latest/workspace/reference/builder-workspaceapplyerror/ "builder.WorkspaceApplyError") – when tmux fails after applying may have started.

  Discussed in [Workspaces](https://libtmux.org/en/concepts/workspaces/) · [Build a workspace from a file](https://libtmux.org/en/examples/workspace-from-file/) · [TypeScript workspace internals](https://libtmux.org/en/ts/latest/workspace/internals/) , [TypeScript workspace builder API](https://libtmux.org/en/ts/latest/workspace/reference/)

  In other ports Build a session from a workspace description

  * Python [`tmuxp.workspace.builder.ClassicWorkspaceBuilder.build`](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-classicworkspacebuilder-build/)
  * Ruby [`LibTmux::Workspace::Plan#apply`](https://libtmux.org/en/ruby/latest/workspace/reference/libtmux-workspace-plan-apply/)
  * Lua No source-verified Lua equivalent is recorded for this operation.
  * Rust [`src.WorkspaceBuilder.build`](https://libtmux.org/en/rs/latest/workspace/reference/src-workspacebuilder-build/)
  * Go [`workspace.Build`](https://libtmux.org/en/go/latest/workspace/reference/workspace-build/)
  * Java [`io.github.libtmux.workspace.WorkspaceBuilder.WorkspaceBuilder.build`](https://libtmux.org/en/java/latest/workspace/reference/io-github-libtmux-workspace-workspacebuilder-workspacebuilder-build/)
  * .NET [`LibTmux.Workspace.WorkspaceBuilder.BuildAsync`](https://libtmux.org/en/dotnet/latest/workspace/reference/libtmux-workspace-workspacebuilder-buildasync/)
  * C++ [`libtmux::workspace::build`](https://libtmux.org/en/cxx/latest/workspace/reference/libtmux-workspace-build/)
  * Swift [`WorkspaceBuilder.build(_:on:)`](https://libtmux.org/en/swift/latest/workspace/reference/workspacebuilder-build\(_-on-\)/)

* normalizeApplyWorkspaceOptions ( *options : : [ApplyWorkspaceOptions](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-applyworkspaceoptions/ "operation_options.ApplyWorkspaceOptions")&#x20;*) → { [readonly](https://libtmux.org/en/ts/latest/reference/selection-clientwhere-readonly/ "selection.ClientWhere.readonly") [commands](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-applyworkspaceoptions-commands/ "operation_options.ApplyWorkspaceOptions.commands"): [CommandPolicy](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-commandpolicy/ "operation_options.CommandPolicy"); [readonly](https://libtmux.org/en/ts/latest/reference/selection-clientwhere-readonly/ "selection.ClientWhere.readonly") prune: [PrunePolicy](https://libtmux.org/en/ts/latest/workspace/reference/ownership-prunepolicy/ "ownership.PrunePolicy"); }

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/operation_options.ts#L25)] [¶](#operation_options.normalizeApplyWorkspaceOptions "Permalink to normalizeApplyWorkspaceOptions")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/operation_options.ts#L25)] [¶](#operation_options.normalizeApplyWorkspaceOptions "Permalink to normalizeApplyWorkspaceOptions")

  normalizeApplyWorkspaceOptions

  Validate and snapshot apply options before server access.

- normalizePlanWorkspaceOptions ( *options : : [PlanWorkspaceOptions](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-planworkspaceoptions/ "operation_options.PlanWorkspaceOptions")&#x20;*) → [PrunePolicy](https://libtmux.org/en/ts/latest/workspace/reference/ownership-prunepolicy/ "ownership.PrunePolicy")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/operation_options.ts#L41)] [¶](#operation_options.normalizePlanWorkspaceOptions "Permalink to normalizePlanWorkspaceOptions")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/operation_options.ts#L41)] [¶](#operation_options.normalizePlanWorkspaceOptions "Permalink to normalizePlanWorkspaceOptions")

  normalizePlanWorkspaceOptions

  Validate and snapshot planning options before server access.

* ownedByWorkspace ( *session : : [Session](https://libtmux.org/en/ts/latest/reference/session-session/ "session.Session")&#x20;*, *name : : [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")&#x20;*) → [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise (MDN Web Docs)")<[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean "boolean (external)")>

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L24)] [¶](#ownership.ownedByWorkspace "Permalink to ownedByWorkspace")

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L24)] [¶](#ownership.ownedByWorkspace "Permalink to ownedByWorkspace")

  ownedByWorkspace

  Whether this session carries the mark for `name`.

- parseWorkspace ( *value : : [unknown](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#unknown "unknown (external)")&#x20;*) → [Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-workspace/ "config.Workspace")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L54)] [¶](#config.parseWorkspace "Permalink to parseWorkspace")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L54)] [¶](#config.parseWorkspace "Permalink to parseWorkspace")

  parseWorkspace

  Validate a parsed workspace, rejecting anything the schema does not allow.

  Discussed in [TypeScript workspace internals](https://libtmux.org/en/ts/latest/workspace/internals/) , [Use the TypeScript workspace builder](https://libtmux.org/en/ts/latest/workspace/internals/guides/) , [TypeScript workspace builder API](https://libtmux.org/en/ts/latest/workspace/reference/)

* parseWorkspaceYaml ( *source : : [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")&#x20;*) → [Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-workspace/ "config.Workspace")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L66)] [¶](#config.parseWorkspaceYaml "Permalink to parseWorkspaceYaml")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L66)] [¶](#config.parseWorkspaceYaml "Permalink to parseWorkspaceYaml")

  parseWorkspaceYaml

  Parse a YAML or JSON workspace, then validate it.

  YAML parsing is Bun's, and this package otherwise runs anywhere — so this is the one function that does not. Reached from Node it says so, rather than failing on an undefined global; parse the document yourself and hand the result to [`parseWorkspace` ](https://libtmux.org/en/ts/latest/workspace/reference/config-parseworkspace/).

  Discussed in [Use the TypeScript workspace builder](https://libtmux.org/en/ts/latest/workspace/internals/guides/) , [TypeScript workspace builder API](https://libtmux.org/en/ts/latest/workspace/reference/)

- planWorkspace ( *server : : [Server](https://libtmux.org/en/ts/latest/reference/server-server/ "server.Server")&#x20;*, *workspaceInput : : [WorkspaceInput](https://libtmux.org/en/ts/latest/workspace/reference/config-workspaceinput/ "config.WorkspaceInput")&#x20;*, *options : : [PlanWorkspaceOptions](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-planworkspaceoptions/ "operation_options.PlanWorkspaceOptions") = {}&#x20;*) → [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise (MDN Web Docs)")<[WorkspacePlan](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspaceplan/ "planning.WorkspacePlan")>

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L199)] [¶](#builder.planWorkspace "Permalink to planWorkspace")

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/builder.ts#L199)] [¶](#builder.planWorkspace "Permalink to planWorkspace")

  planWorkspace

  Plan session, window, and pane membership without changing tmux.

  Reads the server once and answers from that capture, so it costs one snapshot and changes nothing. It reports structural creation, removal, retention, and window renames. It does not predict options, layouts, focus, or pane command effects.

  Examples

  ```ts
  const plan = await planWorkspace(server, workspace);
  if (plan.removesWindows.length > 0) console.log("would remove", plan.removesWindows);
  ```

  * Raises

    * ZodError – when the workspace does not satisfy the strict config schema.

    * [TypeError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError "TypeError (MDN Web Docs)") – when planning options are invalid.

  Discussed in [TypeScript workspace internals](https://libtmux.org/en/ts/latest/workspace/internals/) , [Use the TypeScript workspace builder](https://libtmux.org/en/ts/latest/workspace/internals/guides/) , [TypeScript workspace builder behavior](https://libtmux.org/en/ts/latest/workspace/internals/topics/) , [TypeScript workspace builder API](https://libtmux.org/en/ts/latest/workspace/reference/)

* planWorkspace ( *server : : [Server](https://libtmux.org/en/ts/latest/reference/server-server/ "server.Server")&#x20;*, *workspace : : [Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-workspace/ "config.Workspace")&#x20;*, *prune : : [PrunePolicy](https://libtmux.org/en/ts/latest/workspace/reference/ownership-prunepolicy/ "ownership.PrunePolicy")&#x20;*) → [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise (MDN Web Docs)")<[WorkspacePlan](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspaceplan/ "planning.WorkspacePlan")>

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L103)] [¶](#planning.planWorkspace "Permalink to planWorkspace")

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L103)] [¶](#planning.planWorkspace "Permalink to planWorkspace")

  planWorkspace

Workspaces — Session 2 functions and constants

* claimSession ( *session : : [Session](https://libtmux.org/en/ts/latest/reference/session-session/ "session.Session")&#x20;*, *name : : [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")&#x20;*) → [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise (MDN Web Docs)")<[void](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#void "void (external)")>

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L30)] [¶](#ownership.claimSession "Permalink to claimSession")

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L30)] [¶](#ownership.claimSession "Permalink to claimSession")

  claimSession

  Claim a session this apply created.

- runningSession ( *server : : [Server](https://libtmux.org/en/ts/latest/reference/server-server/ "server.Server")&#x20;*, *name : : [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")&#x20;*) → [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise (MDN Web Docs)")<[Session](https://libtmux.org/en/ts/latest/reference/session-session/ "session.Session") | [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined "undefined (external)")>

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L98)] [¶](#planning.runningSession "Permalink to runningSession")

  functionasync \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L98)] [¶](#planning.runningSession "Permalink to runningSession")

  runningSession

  The session this workspace names, on a server that may not be running yet.

  Acquisition raises on an unreachable server rather than reading as empty, which is the answer a caller asking what is there needs. Building from nothing is the ordinary starting point here, though, and a socket with no daemon behind it is holding this session in the way an empty server is: not at all.

Workspaces — Functions 7 functions and constants

* mayPrune ( *policy : : [PrunePolicy](https://libtmux.org/en/ts/latest/workspace/reference/ownership-prunepolicy/ "ownership.PrunePolicy")&#x20;*, *owned : : [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean "boolean (external)")&#x20;*) → [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean "boolean (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L42)] [¶](#ownership.mayPrune "Permalink to mayPrune")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/ownership.ts#L42)] [¶](#ownership.mayPrune "Permalink to mayPrune")

  mayPrune

  Whether surplus topology may be removed.

  [`owned` ](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspaceplan-owned/)is the default because it is the only one that is safe without knowing where the session came from: a workspace prunes what it built and leaves alone what it merely found. `always` authorizes pruning for one operation; it does not stamp or otherwise adopt the session.

- optionValue ( *value : : [WorkspaceOptionValue](https://libtmux.org/en/ts/latest/workspace/reference/config-workspaceoptionvalue/ "config.WorkspaceOptionValue")&#x20;*) → [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L129)] [¶](#config.optionValue "Permalink to optionValue")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L129)] [¶](#config.optionValue "Permalink to optionValue")

  optionValue

  Convert a YAML scalar to the string tmux accepts for an option value.

* paneCommands ( *pane : : [WorkspacePane](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacepane/ "config.WorkspacePane")&#x20;*, *window : : [WorkspaceWindow](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacewindow/ "config.WorkspaceWindow")&#x20;*) → [readonly](https://libtmux.org/en/ts/latest/reference/selection-clientwhere-readonly/ "selection.ClientWhere.readonly") [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")\[]

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L88)] [¶](#config.paneCommands "Permalink to paneCommands")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L88)] [¶](#config.paneCommands "Permalink to paneCommands")

  paneCommands

  Normalize a pane entry to the commands it should run, in order.

  A window's `shell_command_before` runs in every one of its panes, ahead of that pane's own commands, which is how tmuxp seeds a common environment.

- paneStartDirectory ( *pane : : [WorkspacePane](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacepane/ "config.WorkspacePane")&#x20;*, *window : : [WorkspaceWindow](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacewindow/ "config.WorkspaceWindow")&#x20;*, *workspace : : [Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-workspace/ "config.Workspace")&#x20;*) → [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)") | [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined "undefined (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L101)] [¶](#config.paneStartDirectory "Permalink to paneStartDirectory")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L101)] [¶](#config.paneStartDirectory "Permalink to paneStartDirectory")

  paneStartDirectory

  A pane's start directory, falling back to its window's and then the session's.

* paneWantsFocus ( *pane : : [WorkspacePane](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacepane/ "config.WorkspacePane")&#x20;*) → [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean "boolean (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L96)] [¶](#config.paneWantsFocus "Permalink to paneWantsFocus")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L96)] [¶](#config.paneWantsFocus "Permalink to paneWantsFocus")

  paneWantsFocus

  Whether a pane entry asked to be the focused one.

- windowIsShared ( *window : : [Window](https://libtmux.org/en/ts/latest/reference/window-window/ "window.Window")&#x20;*) → [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean "boolean (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L223)] [¶](#planning.windowIsShared "Permalink to windowIsShared")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/planning.ts#L223)] [¶](#planning.windowIsShared "Permalink to windowIsShared")

  windowIsShared

* windowStartDirectory ( *window : : [WorkspaceWindow](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacewindow/ "config.WorkspaceWindow")&#x20;*, *workspace : : [Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-workspace/ "config.Workspace")&#x20;*) → [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)") | [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined "undefined (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L111)] [¶](#config.windowStartDirectory "Permalink to windowStartDirectory")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/workspace/src/config.ts#L111)] [¶](#config.windowStartDirectory "Permalink to windowStartDirectory")

  windowStartDirectory

  A window's directory, inherited from its workspace when it has none.

Requests 2 functions and constants

* GuardedTmuxRequest

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L96)] [¶](#engine.GuardedTmuxRequest "Permalink to GuardedTmuxRequest")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L96)] [¶](#engine.GuardedTmuxRequest "Permalink to GuardedTmuxRequest")

  GuardedTmuxRequest

  A daemon-guarded request paired with its exact refusal detector.

- TmuxInvocationRequest

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L63)] [¶](#engine.TmuxInvocationRequest "Permalink to TmuxInvocationRequest")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L63)] [¶](#engine.TmuxInvocationRequest "Permalink to TmuxInvocationRequest")

  TmuxInvocationRequest

  What an engine is asked to run: one ordered command list, and the daemon it must still be talking to.

  tmux runs a command list until one fails and discards the rest, so the list is the unit of atomicity a caller gets. The daemon guard is what stops a raw tmux id being applied to whatever a restarted server reissued it to.

Errors 17 types, 5 functions and constants

[ExceptionOptions 2 members](https://libtmux.org/en/ts/latest/reference/errors-exceptionoptions/)

What any of these errors accepts: the cause, and the tmux command that ran.

[ObjectNotFoundOptions 2 members](https://libtmux.org/en/ts/latest/reference/errors-objectnotfoundoptions/)

The criteria that found nothing, and an optional message replacing the built one.

[MultipleObjectsErrorOptions 1 members](https://libtmux.org/en/ts/latest/reference/errors-multipleobjectserroroptions/)

The criteria that matched too much, with how many it matched when known.

[TmuxCommandFailureOptions 5 members](https://libtmux.org/en/ts/latest/reference/errors-tmuxcommandfailureoptions/)

What a failed `tmux` invocation reported, before it is turned into a message.

[LibTmuxError 4 members](https://libtmux.org/en/ts/latest/reference/errors-libtmuxerror/)

The base of every error this library raises.

[TmuxTransportError 9 members](https://libtmux.org/en/ts/latest/reference/errors-tmuxtransporterror/)

A command did not complete, and this is how far it got.

[TmuxTransportErrorOptions 5 members](https://libtmux.org/en/ts/latest/reference/errors-tmuxtransporterroroptions/)

What the transport observed when a command did not come back.

[ObjectNotFoundError 3 members](https://libtmux.org/en/ts/latest/reference/errors-objectnotfounderror/)

A lookup that required one object found none.

[MultipleObjectsError 4 members](https://libtmux.org/en/ts/latest/reference/errors-multipleobjectserror/)

A lookup that required one object found several.

[TmuxObjectNotFoundError 2 members](https://libtmux.org/en/ts/latest/reference/errors-tmuxobjectnotfounderror/)

A tmux object named by id was not in the list tmux returned.

[VersionTooLowError 5 members](https://libtmux.org/en/ts/latest/reference/errors-versiontoolowerror/)

A field the server is too old to have.

[WaitTimeoutError 1 members](https://libtmux.org/en/ts/latest/reference/errors-waittimeouterror/)

A wait reached its deadline with the condition still unmet.

[NoMatchError 1 members](https://libtmux.org/en/ts/latest/reference/errors-nomatcherror/)

A selection that required exactly one match found none.

[MultipleMatchesError 1 members](https://libtmux.org/en/ts/latest/reference/errors-multiplematcheserror/)

A selection that required exactly one match found several.

[QueryValidationError 4 members](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationerror/)

Criteria that could not be evaluated, rejected before any command ran.

[TmuxCommandError 8 members](https://libtmux.org/en/ts/latest/reference/errors-tmuxcommanderror/)

A tmux command that exited non-zero.

[WorkspaceApplyError 4 members](https://libtmux.org/en/ts/latest/workspace/reference/builder-workspaceapplyerror/)

Applying stopped after tmux may already have changed.

* LibTmuxErrorCode

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L135)] [¶](#errors.LibTmuxErrorCode "Permalink to LibTmuxErrorCode")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L135)] [¶](#errors.LibTmuxErrorCode "Permalink to LibTmuxErrorCode")

  LibTmuxErrorCode

  Every value [`LibTmuxError.code` ](https://libtmux.org/en/ts/latest/reference/errors-libtmuxerror-code/)can hold.

  A union rather than `string` so a comparison against a name this package does not have is a type error rather than a branch that never runs.

  Each class declares this type rather than its own literal because the hierarchy is three deep in places — [`NoMatchError` ](https://libtmux.org/en/ts/latest/reference/errors-nomatcherror/)extends [`ObjectNotFoundError` ](https://libtmux.org/en/ts/latest/reference/errors-objectnotfounderror/)— and a literal on the parent makes the child's declaration an illegal override. `instanceof` is the narrowing tool; this is the one that survives a bundler and a serialization round trip.

- Query

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L5)] [¶](#errors.Query "Permalink to Query")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L5)] [¶](#errors.Query "Permalink to Query")

  Query

  The criteria a lookup was given, carried on the error it raised.

  Kept as the caller wrote it rather than as a formatted sentence, so a caller that built the criteria from a form or a config file can point at the field that was wrong. The message renders it; this is the source.

* QueryValidationErrorCode

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L357)] [¶](#errors.QueryValidationErrorCode "Permalink to QueryValidationErrorCode")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L357)] [¶](#errors.QueryValidationErrorCode "Permalink to QueryValidationErrorCode")

  QueryValidationErrorCode

- QueryValidationReason

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L359)] [¶](#errors.QueryValidationReason "Permalink to QueryValidationReason")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L359)] [¶](#errors.QueryValidationReason "Permalink to QueryValidationReason")

  QueryValidationReason

  Which half of a lookup was malformed: the id, or the criteria around it.

* TmuxTransportErrorKind

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L187)] [¶](#errors.TmuxTransportErrorKind "Permalink to TmuxTransportErrorKind")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L187)] [¶](#errors.TmuxTransportErrorKind "Permalink to TmuxTransportErrorKind")

  TmuxTransportErrorKind

  What went wrong between this process and tmux, as opposed to inside tmux.

Errors — Server 1 type

[TmuxServerRestartedError 3 members](https://libtmux.org/en/ts/latest/reference/errors-tmuxserverrestartederror/)

A handle outlived the daemon that issued its id.

Constants and enums 32 types, 5 functions and constants

[CommandOptions 3 members](https://libtmux.org/en/ts/latest/reference/common-commandoptions/)

What every command accepts, whichever handle it is called on.

[CommandResult 4 members](https://libtmux.org/en/ts/latest/reference/common-commandresult/)

A finished `tmux` invocation, as the process left it.

[SnapshotOptions 1 members](https://libtmux.org/en/ts/latest/reference/types-snapshotoptions/)

Options for [`Server.snapshot` ](https://libtmux.org/en/ts/latest/reference/server-server-snapshot/).

[SplitOptions 6 members](https://libtmux.org/en/ts/latest/reference/types-splitoptions/)

Which side the new pane takes, how big it is, and what runs in it.

[SendKeysOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-sendkeysoptions/)

How the keys are interpreted before tmux delivers them.

[CmdOptions 1 members](https://libtmux.org/en/ts/latest/reference/types-cmdoptions/)

Options for [`Server.cmd` ](https://libtmux.org/en/ts/latest/reference/server-server-cmd/)and the handle-level `cmd`.

[JoinOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-joinoptions/)

Options for joining a pane into another window.

[SetOptionOptions 1 members](https://libtmux.org/en/ts/latest/reference/types-setoptionoptions/)

Options for writing a tmux option.

[CaptureOptions 5 members](https://libtmux.org/en/ts/latest/reference/types-captureoptions/)

Which part of a pane is read, and in what form.

[SaveBufferOptions 1 members](https://libtmux.org/en/ts/latest/reference/types-savebufferoptions/)

[SetHookOptions 1 members](https://libtmux.org/en/ts/latest/reference/types-sethookoptions/)

Which hook table the binding is written to, and whether it replaces or adds.

[ResizeOptions 4 members](https://libtmux.org/en/ts/latest/reference/types-resizeoptions/)

How far a pane boundary moves, and in which direction.

[RunShellOptions 1 members](https://libtmux.org/en/ts/latest/reference/types-runshelloptions/)

Where the shell command runs, and whether the call waits for it.

[IfShellOptions 3 members](https://libtmux.org/en/ts/latest/reference/types-ifshelloptions/)

How the condition is decided: by running it, or by expanding it.

[RespawnOptions 3 members](https://libtmux.org/en/ts/latest/reference/types-respawnoptions/)

Whether a pane whose process is still alive may be restarted.

[PopupOptions 4 members](https://libtmux.org/en/ts/latest/reference/types-popupoptions/)

Size, placement and lifetime of a popup, which floats over the window rather than taking space from it.

[ChooseTreeOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-choosetreeoptions/)

What the interactive chooser shows and what selecting a row runs.

[SetEnvironmentOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-setenvironmentoptions/)

Options for writing a tmux environment variable.

[TmuxOutputEvent 4 members](https://libtmux.org/en/ts/latest/reference/types-tmuxoutputevent/)

A pane produced output.

[TmuxSubscriptionEvent 7 members](https://libtmux.org/en/ts/latest/reference/types-tmuxsubscriptionevent/)

A subscribed format expanded to a new value.

[TmuxLayoutChangeEvent 5 members](https://libtmux.org/en/ts/latest/reference/types-tmuxlayoutchangeevent/)

A window's layout changed.

[TmuxPasteBufferEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxpastebufferevent/)

A paste buffer was written or deleted.

[TmuxMessageEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxmessageevent/)

tmux reported a message, or an error in its configuration.

[TmuxExitEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxexitevent/)

The control-mode connection is ending.

[TmuxUnknownEvent 3 members](https://libtmux.org/en/ts/latest/reference/types-tmuxunknownevent/)

A notification this version of the package does not model.

[TmuxReconnectedEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxreconnectedevent/)

The connection dropped and was reopened.

[TmuxReconnectingEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxreconnectingevent/)

The connection dropped and a replacement is being opened.

[ConnectionOptions 4 members](https://libtmux.org/en/ts/latest/reference/types-connectionoptions/)

Options shared by connected servers and event observers.

[WaitForOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-waitforoptions/)

Timing for a whole-server state wait.

[WatchOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-watchoptions/)

Options for [`Server.watch` ](https://libtmux.org/en/ts/latest/reference/server-server-watch/), a notification-only observer.

[ApplyWorkspaceOptions 2 members](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-applyworkspaceoptions/)

How [`applyWorkspace` ](https://libtmux.org/en/ts/latest/workspace/reference/builder-applyworkspace/)should treat a workspace that is already running.

[PlanWorkspaceOptions 1 members](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-planworkspaceoptions/)

Structural planning options; pane command delivery is apply-only.

* ConnectOptions

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L840)] [¶](#types.ConnectOptions "Permalink to ConnectOptions")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L840)] [¶](#types.ConnectOptions "Permalink to ConnectOptions")

  ConnectOptions

  Options for [`Server.connect` ](https://libtmux.org/en/ts/latest/reference/server-server-connect/).

- TmuxCommandResult

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L101)] [¶](#engine.TmuxCommandResult "Permalink to TmuxCommandResult")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/engine.ts#L101)] [¶](#engine.TmuxCommandResult "Permalink to TmuxCommandResult")

  TmuxCommandResult

  What an engine reports back: the process's own exit, not tmux's opinion of it.

  A `returncode` of zero and a `signal` of `null` together mean tmux ran and answered; either one set means it did not finish, and [`stderr` ](https://libtmux.org/en/ts/latest/reference/errors-tmuxtransporterror-stderr-1umi/)says why.

* TmuxEvent

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L765)] [¶](#types.TmuxEvent "Permalink to TmuxEvent")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L765)] [¶](#types.TmuxEvent "Permalink to TmuxEvent")

  TmuxEvent

  Anything a control-mode connection can deliver, as one discriminated union.

  tmux pushes these; nothing here asked for them, and they arrive interleaved with command replies. The union is open in practice — an unrecognised notification arrives as [`TmuxUnknownEvent` ](https://libtmux.org/en/ts/latest/reference/types-tmuxunknownevent/)rather than being dropped, so a `switch` should still have a default.

- TmuxIdKind

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L8)] [¶](#common.TmuxIdKind "Permalink to TmuxIdKind")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L8)] [¶](#common.TmuxIdKind "Permalink to TmuxIdKind")

  TmuxIdKind

  Which of tmux's three id spaces an id belongs to.

  The three are numbered independently, so `$1`, `@1` and `%1` can all exist at once and name unrelated objects. The kind is what keeps a pane id from being passed where a window id belongs.

* WhereForKind

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L315)] [¶](#selection.WhereForKind "Permalink to WhereForKind")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/selection.ts#L315)] [¶](#selection.WhereForKind "Permalink to WhereForKind")

  WhereForKind

  The criteria shape belonging to one model kind.

Constants and enums — Server 1 type

[ServerOptions 10 members](https://libtmux.org/en/ts/latest/reference/server-serveroptions/)

How to reach a tmux server, and what to assume when it is quiet.

Constants and enums — Session 5 types

[NewSessionOptions 8 members](https://libtmux.org/en/ts/latest/reference/types-newsessionoptions/)

What a new session starts as, and what it is grouped with.

[TmuxSessionEvent 3 members](https://libtmux.org/en/ts/latest/reference/types-tmuxsessionevent/)

The attached session changed, or a session was renamed.

[TmuxSessionsChangedEvent 1 members](https://libtmux.org/en/ts/latest/reference/types-tmuxsessionschangedevent/)

The set of sessions changed. Carries no payload; re-read the server.

[TmuxSessionWindowChangedEvent 3 members](https://libtmux.org/en/ts/latest/reference/types-tmuxsessionwindowchangedevent/)

A session's active window changed.

[TmuxClientSessionChangedEvent 4 members](https://libtmux.org/en/ts/latest/reference/types-tmuxclientsessionchangedevent/)

Another client switched sessions.

Constants and enums — Window 6 types

[NewWindowOptions 5 members](https://libtmux.org/en/ts/latest/reference/types-newwindowoptions/)

Where a new window lands, and what runs in it.

[MoveWindowOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-movewindowoptions/)

Where a window is moved to, and what happens if something is already there.

[ResizeWindowOptions 2 members](https://libtmux.org/en/ts/latest/reference/types-resizewindowoptions/)

How far a window's own size moves, or what it is set to outright.

[TmuxWindowLifecycleEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxwindowlifecycleevent/)

A window was added, closed, or linked into or out of a session.

[TmuxWindowRenamedEvent 3 members](https://libtmux.org/en/ts/latest/reference/types-tmuxwindowrenamedevent/)

A window was renamed.

[TmuxWindowPaneChangedEvent 3 members](https://libtmux.org/en/ts/latest/reference/types-tmuxwindowpanechangedevent/)

The active pane of a window changed.

Constants and enums — Pane 2 types

[TmuxPaneModeChangedEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxpanemodechangedevent/)

A pane entered or left a mode such as copy mode.

[TmuxPaneFlowEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxpaneflowevent/)

tmux paused or resumed output for a pane that fell behind.

Constants and enums — Client 1 type

[TmuxClientDetachedEvent 2 members](https://libtmux.org/en/ts/latest/reference/types-tmuxclientdetachedevent/)

Another client detached.

Testing utilities 5 types, 3 functions and constants

[RecordedCall 2 members](https://libtmux.org/en/ts/latest/reference/testing-recordedcall/)

What every recorded entry carries, answered or not.

[RecordedAnswer 3 members](https://libtmux.org/en/ts/latest/reference/testing-recordedanswer/)

One invocation and what tmux answered, as JSON.

[RecordedError 8 members](https://libtmux.org/en/ts/latest/reference/testing-recordederror/)

One invocation that raised instead of answering.

[RecordedFailure 1 members](https://libtmux.org/en/ts/latest/reference/testing-recordedfailure/)

One invocation that failed, and how.

[TmuxRecording 2 members](https://libtmux.org/en/ts/latest/reference/testing-tmuxrecording/)

Every invocation one run made, in order.

* RecordedInvocation

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/testing.ts#L104)] [¶](#testing.RecordedInvocation "Permalink to RecordedInvocation")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/testing.ts#L104)] [¶](#testing.RecordedInvocation "Permalink to RecordedInvocation")

  RecordedInvocation

  One entry: either an answer or a failure, never both.

  A failure is written down rather than dropped because the queue is positional. An omitted failure does not merely lose itself — it hands the next call the answer belonging to the one after it, so a recorded failure replays as a pass and everything past it is off by one.

- recordInvocations ( *inner : : [TmuxEngine](https://libtmux.org/en/ts/latest/reference/engine-tmuxengine/ "engine.TmuxEngine") = new NodeSpawnTransport()&#x20;*) → { [readonly](https://libtmux.org/en/ts/latest/reference/selection-clientwhere-readonly/ "selection.ClientWhere.readonly") [engine](https://libtmux.org/en/ts/latest/reference/server-serveroptions-engine/ "server.ServerOptions.engine"): [TmuxEngine](https://libtmux.org/en/ts/latest/reference/engine-tmuxengine/ "engine.TmuxEngine"); /\*\* The recording so far, safe to serialize at any point. \*/ [readonly](https://libtmux.org/en/ts/latest/reference/selection-clientwhere-readonly/ "selection.ClientWhere.readonly") recording: () => [TmuxRecording](https://libtmux.org/en/ts/latest/reference/testing-tmuxrecording/ "testing.TmuxRecording"); }

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/testing.ts#L218)] [¶](#testing.recordInvocations "Permalink to recordInvocations")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/testing.ts#L218)] [¶](#testing.recordInvocations "Permalink to recordInvocations")

  recordInvocations

  Wrap an engine so every invocation it runs is written down.

  The wrapper is transparent: it answers exactly what the inner engine answered, so a suite can record while it runs against real tmux and keep asserting on the real results. Called with nothing it wraps the engine a [`Server` ](https://libtmux.org/en/ts/latest/reference/server-server/)builds for itself, which is what recording against a local tmux means and saves reaching for an internal class to say so.

* replayInvocations ( *recording : : [TmuxRecording](https://libtmux.org/en/ts/latest/reference/testing-tmuxrecording/ "testing.TmuxRecording")&#x20;*) → [TmuxEngine](https://libtmux.org/en/ts/latest/reference/engine-tmuxengine/ "engine.TmuxEngine")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/testing.ts#L265)] [¶](#testing.replayInvocations "Permalink to replayInvocations")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/testing.ts#L265)] [¶](#testing.replayInvocations "Permalink to replayInvocations")

  replayInvocations

  An engine that answers from a recording and never starts a process.

  Repeated identical commands answer in the order they were recorded, because two snapshots of a changing server are the same argv and different answers. An argv the recording does not hold raises rather than inventing a result: a test whose code took a path the recording never saw should say so, not quietly pass against an empty server.

Other 6 types, 15 functions and constants

[TmuxInvocationReport 6 members](https://libtmux.org/en/ts/latest/reference/common-tmuxinvocationreport/)

What one tmux invocation cost and how it ended.

[LogicalRefBase 4 members](https://libtmux.org/en/ts/latest/reference/common-logicalrefbase/)

The three parts that together name one tmux object for certain.

[Selection 12 members](https://libtmux.org/en/ts/latest/reference/selection-selection/)

An immutable, ordered set of tmux objects read at one instant.

[MenuEntry 3 members](https://libtmux.org/en/ts/latest/reference/types-menuentry/)

One selectable line of a menu: its label, its shortcut, and what it runs.

[AbortLike 4 members](https://libtmux.org/en/ts/latest/reference/types-abortlike/)

The part of [`AbortSignal` ](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)this package uses.

[TmuxEventStream 5 members](https://libtmux.org/en/ts/latest/reference/types-tmuxeventstream/)

A live stream of tmux control-mode events.

* DeliveryStatus

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L111)] [¶](#common.DeliveryStatus "Permalink to DeliveryStatus")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L111)] [¶](#common.DeliveryStatus "Permalink to DeliveryStatus")

  DeliveryStatus

  How far a command got before something interrupted it.

  This is what a caller needs to decide whether retrying is safe: a command that was never written changed nothing, and one that was written but not answered may have done its work already. `indeterminate` is the honest answer, not a missing one.

- Digit

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L153)] [¶](#types.Digit "Permalink to Digit")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L153)] [¶](#types.Digit "Permalink to Digit")

  Digit

  One decimal character, for building a percentage's shape in the type system.

  These three exist so `"101%"` is a compile error rather than a runtime one.

* LogicalRef

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L168)] [¶](#common.LogicalRef "Permalink to LogicalRef")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L168)] [¶](#common.LogicalRef "Permalink to LogicalRef")

  LogicalRef

  Any of the three, discriminated by [`kind` ](https://libtmux.org/en/ts/latest/reference/common-logicalrefbase-kind/).

  Clients are absent on purpose: a client has a name rather than an id, and nothing numbers it.

- MenuItem

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L471)] [¶](#types.MenuItem "Permalink to MenuItem")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L471)] [¶](#types.MenuItem "Permalink to MenuItem")

  MenuItem

  A menu entry, or a horizontal rule.

  tmux spells a separator as one empty argument rather than a name/key/command triple, so modelling it as a distinct value keeps callers from fabricating empty fields that tmux would reject.

* NonZeroDigit

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L154)] [¶](#types.NonZeroDigit "Permalink to NonZeroDigit")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L154)] [¶](#types.NonZeroDigit "Permalink to NonZeroDigit")

  NonZeroDigit

  A leading digit, so `"07%"` is not a percentage.

- OperationStatus

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L112)] [¶](#common.OperationStatus "Permalink to OperationStatus")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L112)] [¶](#common.OperationStatus "Permalink to OperationStatus")

  OperationStatus

  What became of one step of a multi-step operation.

  `skipped` is not a failure: a step whose precondition no longer holds is reported rather than retried, so the caller sees why the whole did less than it asked for.

* RowWithIdentities

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L395)] [¶](#field_types.RowWithIdentities "Permalink to RowWithIdentities")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/field_types.ts#L395)] [¶](#field_types.RowWithIdentities "Permalink to RowWithIdentities")

  RowWithIdentities

  A raw format row whose listed identity fields are present.

- SafeInteger

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L41)] [¶](#common.SafeInteger "Permalink to SafeInteger")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L41)] [¶](#common.SafeInteger "Permalink to SafeInteger")

  SafeInteger

  A finite whole number within JavaScript's safe integer range.

  Examples

  ```ts
  import { safeInteger } from "libtmux";
  import type { SafeInteger } from "libtmux";
  const count: SafeInteger = safeInteger(3);
  ```

* TmuxId

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L11)] [¶](#common.TmuxId "Permalink to TmuxId")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L11)] [¶](#common.TmuxId "Permalink to TmuxId")

  TmuxId

  A tmux object ID authenticated for one object kind.

- TmuxIdInput

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L22)] [¶](#common.TmuxIdInput "Permalink to TmuxIdInput")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L22)] [¶](#common.TmuxIdInput "Permalink to TmuxIdInput")

  TmuxIdInput

  Raw text or an already-authenticated ID of the expected kind.

* TmuxInvocationObserver

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L156)] [¶](#common.TmuxInvocationObserver "Permalink to TmuxInvocationObserver")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L156)] [¶](#common.TmuxInvocationObserver "Permalink to TmuxInvocationObserver")

  TmuxInvocationObserver

  Called once per tmux invocation, after it answers or fails.

  This is the seam for logs, traces and metrics: a caller that wants to see what the library is doing has otherwise to supply a whole engine. It runs after the invocation is decided and cannot change its outcome — anything it throws is swallowed, because a command must not fail on account of the code watching it.

  Returning a promise is allowed and never awaited: the invocation has already been decided, so waiting would only delay it. A rejection is swallowed on the same grounds as a throw, rather than left to the host's unhandled rejection policy.

- ZeroToNinetyNine

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L155)] [¶](#types.ZeroToNinetyNine "Permalink to ZeroToNinetyNine")

  typealias \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L155)] [¶](#types.ZeroToNinetyNine "Permalink to ZeroToNinetyNine")

  ZeroToNinetyNine

  Every whole number a percentage may start with, short of one hundred.

* isSafeInteger ( *value : : [unknown](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#unknown "unknown (external)")&#x20;*) → [value](https://libtmux.org/en/ts/latest/reference/types-tmuxsubscriptionevent-value/ "types.TmuxSubscriptionEvent.value") is [SafeInteger](https://libtmux.org/en/ts/latest/reference/common-safeinteger-1ul1/ "common.SafeInteger")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L52)] [¶](#common.isSafeInteger "Permalink to isSafeInteger")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L52)] [¶](#common.isSafeInteger "Permalink to isSafeInteger")

  isSafeInteger

  Test whether a value is an exact JavaScript integer.

  Examples

  ```ts
  import { isSafeInteger } from "libtmux";
  const value: unknown = 3;
  if (isSafeInteger(value)) snapshot.sessions.where({ attached: value });
  ```

- isTmuxName ( *value : : [unknown](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#unknown "unknown (external)")&#x20;*) → [value](https://libtmux.org/en/ts/latest/reference/types-tmuxsubscriptionevent-value/ "types.TmuxSubscriptionEvent.value") is [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String "string (external)")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L205)] [¶](#types.isTmuxName "Permalink to isTmuxName")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/types.ts#L205)] [¶](#types.isTmuxName "Permalink to isTmuxName")

  isTmuxName

  Test whether a value is a name every supported tmux stores unchanged.

  The refusal the mutating calls apply, offered ahead of them so a caller validating configuration can report the bad field rather than catching a [`TypeError` ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)from the call it fed.

  Examples

  ```ts
  import { isTmuxName } from "libtmux";
  const value: unknown = "work";
  const name = isTmuxName(value) ? value : undefined;
  ```

* safeInteger ( *value : : [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number "number (external)")&#x20;*) → [SafeInteger](https://libtmux.org/en/ts/latest/reference/common-safeinteger-1ul1/ "common.SafeInteger")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L67)] [¶](#common.safeInteger "Permalink to safeInteger")

  function \[[source](https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/common.ts#L67)] [¶](#common.safeInteger "Permalink to safeInteger")

  safeInteger

  Authenticate an exact JavaScript integer or throw.

  Examples

  ```ts
  import { safeInteger } from "libtmux";
  const pid = safeInteger(42);
  ```

  * Raises

    * [TypeError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError "TypeError (MDN Web Docs)") – when [`value` ](https://libtmux.org/en/ts/latest/reference/types-tmuxsubscriptionevent-value/)is fractional, infinite, [`NaN` ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN), or outside JavaScript's safe integer range.

## By module 21 modules

* builder 6

  * [Workspace​Apply​Error](https://libtmux.org/en/ts/latest/workspace/reference/builder-workspaceapplyerror/)
  * [Apply​Window​Context](https://libtmux.org/en/ts/latest/reference/builder-applywindowcontext/)
  * [apply​Workspace](https://libtmux.org/en/ts/latest/workspace/reference/builder-applyworkspace/)
  * [plan​Workspace](https://libtmux.org/en/ts/latest/workspace/reference/builder-planworkspace/)
  * [Workspace​Apply​Milestone](https://libtmux.org/en/ts/latest/workspace/reference/builder-workspaceapplymilestone/)
  * [Workspace​Apply​Stage](https://libtmux.org/en/ts/latest/workspace/reference/builder-workspaceapplystage/)

* client 2

  * [Client](https://libtmux.org/en/ts/latest/reference/client-client/)
  * [Client​Row](https://libtmux.org/en/ts/latest/reference/client-clientrow/)

* common 26

  * [Command​Options](https://libtmux.org/en/ts/latest/reference/common-commandoptions/)
  * [Command​Outcome](https://libtmux.org/en/ts/latest/reference/common-commandoutcome/)
  * [Command​Result](https://libtmux.org/en/ts/latest/reference/common-commandresult/)
  * [Logical​Ref​Base](https://libtmux.org/en/ts/latest/reference/common-logicalrefbase/)
  * [Tmux​Invocation​Report](https://libtmux.org/en/ts/latest/reference/common-tmuxinvocationreport/)
  * [is​Safe​Integer](https://libtmux.org/en/ts/latest/reference/common-issafeinteger/)
  * [safe​Integer](https://libtmux.org/en/ts/latest/reference/common-safeinteger-solv/)
  * [Connection​Alias](https://libtmux.org/en/ts/latest/reference/common-connectionalias/)
  * [Daemon​Epoch](https://libtmux.org/en/ts/latest/reference/common-daemonepoch/)
  * [Delivery​Status](https://libtmux.org/en/ts/latest/reference/common-deliverystatus/)
  * [Logical​Ref](https://libtmux.org/en/ts/latest/reference/common-logicalref/)
  * [Operation​Status](https://libtmux.org/en/ts/latest/reference/common-operationstatus/)
  * [Pane​Id](https://libtmux.org/en/ts/latest/reference/common-paneid/)
  * [Pane​Id​Input](https://libtmux.org/en/ts/latest/reference/common-paneidinput/)
  * [Pane​Ref](https://libtmux.org/en/ts/latest/reference/common-paneref/)
  * [Safe​Integer](https://libtmux.org/en/ts/latest/reference/common-safeinteger-1ul1/)
  * [Session​Id](https://libtmux.org/en/ts/latest/reference/common-sessionid/)
  * [Session​Id​Input](https://libtmux.org/en/ts/latest/reference/common-sessionidinput/)
  * [Session​Ref](https://libtmux.org/en/ts/latest/reference/common-sessionref/)
  * [Tmux​Id](https://libtmux.org/en/ts/latest/reference/common-tmuxid/)
  * [Tmux​Id​Input](https://libtmux.org/en/ts/latest/reference/common-tmuxidinput/)
  * [Tmux​Id​Kind](https://libtmux.org/en/ts/latest/reference/common-tmuxidkind/)
  * [Tmux​Invocation​Observer](https://libtmux.org/en/ts/latest/reference/common-tmuxinvocationobserver/)
  * [Window​Id](https://libtmux.org/en/ts/latest/reference/common-windowid/)
  * [Window​Id​Input](https://libtmux.org/en/ts/latest/reference/common-windowidinput/)
  * [Window​Ref](https://libtmux.org/en/ts/latest/reference/common-windowref/)

* config 14

  * [initial​Pane​Start​Directory](https://libtmux.org/en/ts/latest/workspace/reference/config-initialpanestartdirectory/)
  * [option​Value](https://libtmux.org/en/ts/latest/workspace/reference/config-optionvalue/)
  * [pane​Commands](https://libtmux.org/en/ts/latest/workspace/reference/config-panecommands/)
  * [pane​Start​Directory](https://libtmux.org/en/ts/latest/workspace/reference/config-panestartdirectory/)
  * [pane​Wants​Focus](https://libtmux.org/en/ts/latest/workspace/reference/config-panewantsfocus/)
  * [parse​Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-parseworkspace/)
  * [parse​Workspace​Yaml](https://libtmux.org/en/ts/latest/workspace/reference/config-parseworkspaceyaml/)
  * [window​Start​Directory](https://libtmux.org/en/ts/latest/workspace/reference/config-windowstartdirectory/)
  * [Workspace](https://libtmux.org/en/ts/latest/workspace/reference/config-workspace/)
  * [Workspace​Input](https://libtmux.org/en/ts/latest/workspace/reference/config-workspaceinput/)
  * [Workspace​Option​Value](https://libtmux.org/en/ts/latest/workspace/reference/config-workspaceoptionvalue/)
  * [Workspace​Pane](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacepane/)
  * [Workspace​Window](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacewindow/)
  * [Workspace​Window​Input](https://libtmux.org/en/ts/latest/workspace/reference/config-workspacewindowinput/)

* constants 5

  * [Default​Option​Scope](https://libtmux.org/en/ts/latest/reference/constants-defaultoptionscope/)
  * [Option​Scope](https://libtmux.org/en/ts/latest/reference/constants-optionscope/)
  * [Pane​Direction](https://libtmux.org/en/ts/latest/reference/constants-panedirection/)
  * [Resize​Adjustment​Direction](https://libtmux.org/en/ts/latest/reference/constants-resizeadjustmentdirection/)
  * [Window​Direction](https://libtmux.org/en/ts/latest/reference/constants-windowdirection/)

* engine 6

  * [Daemon​Guard](https://libtmux.org/en/ts/latest/reference/engine-daemonguard/)
  * [Guarded​Tmux​Request](https://libtmux.org/en/ts/latest/reference/engine-guardedtmuxrequest/)
  * [Tmux​Command](https://libtmux.org/en/ts/latest/reference/engine-tmuxcommand/)
  * [Tmux​Command​Result](https://libtmux.org/en/ts/latest/reference/engine-tmuxcommandresult/)
  * [Tmux​Engine](https://libtmux.org/en/ts/latest/reference/engine-tmuxengine/)
  * [Tmux​Invocation​Request](https://libtmux.org/en/ts/latest/reference/engine-tmuxinvocationrequest/)

* errors 22

  * [Lib​Tmux​Error](https://libtmux.org/en/ts/latest/reference/errors-libtmuxerror/)
  * [Multiple​Matches​Error](https://libtmux.org/en/ts/latest/reference/errors-multiplematcheserror/)
  * [Multiple​Objects​Error](https://libtmux.org/en/ts/latest/reference/errors-multipleobjectserror/)
  * [No​Match​Error](https://libtmux.org/en/ts/latest/reference/errors-nomatcherror/)
  * [Object​Not​Found​Error](https://libtmux.org/en/ts/latest/reference/errors-objectnotfounderror/)
  * [Query​Validation​Error](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationerror/)
  * [Tmux​Command​Error](https://libtmux.org/en/ts/latest/reference/errors-tmuxcommanderror/)
  * [Tmux​Object​Not​Found​Error](https://libtmux.org/en/ts/latest/reference/errors-tmuxobjectnotfounderror/)
  * [Tmux​Server​Restarted​Error](https://libtmux.org/en/ts/latest/reference/errors-tmuxserverrestartederror/)
  * [Tmux​Transport​Error](https://libtmux.org/en/ts/latest/reference/errors-tmuxtransporterror/)
  * [Version​Too​Low​Error](https://libtmux.org/en/ts/latest/reference/errors-versiontoolowerror/)
  * [Wait​Timeout​Error](https://libtmux.org/en/ts/latest/reference/errors-waittimeouterror/)
  * [Exception​Options](https://libtmux.org/en/ts/latest/reference/errors-exceptionoptions/)
  * [Multiple​Objects​Error​Options](https://libtmux.org/en/ts/latest/reference/errors-multipleobjectserroroptions/)
  * [Object​Not​Found​Options](https://libtmux.org/en/ts/latest/reference/errors-objectnotfoundoptions/)
  * [Tmux​Command​Failure​Options](https://libtmux.org/en/ts/latest/reference/errors-tmuxcommandfailureoptions/)
  * [Tmux​Transport​Error​Options](https://libtmux.org/en/ts/latest/reference/errors-tmuxtransporterroroptions/)
  * [Lib​Tmux​Error​Code](https://libtmux.org/en/ts/latest/reference/errors-libtmuxerrorcode/)
  * [Query](https://libtmux.org/en/ts/latest/reference/errors-query/)
  * [Query​Validation​Error​Code](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationerrorcode/)
  * [Query​Validation​Reason](https://libtmux.org/en/ts/latest/reference/errors-queryvalidationreason/)
  * [Tmux​Transport​Error​Kind](https://libtmux.org/en/ts/latest/reference/errors-tmuxtransporterrorkind/)

* field\_types 13

  * [Aliased​Fields](https://libtmux.org/en/ts/latest/reference/field_types-aliasedfields/)
  * [Client​Alias​Map](https://libtmux.org/en/ts/latest/reference/field_types-clientaliasmap/)
  * [Decoded​Format​Value](https://libtmux.org/en/ts/latest/reference/field_types-decodedformatvalue/)
  * [Format​Field​Name](https://libtmux.org/en/ts/latest/reference/field_types-formatfieldname/)
  * [Format​Identity​Type](https://libtmux.org/en/ts/latest/reference/field_types-formatidentitytype/)
  * [Format​Scope](https://libtmux.org/en/ts/latest/reference/field_types-formatscope/)
  * [Format​Value​Type](https://libtmux.org/en/ts/latest/reference/field_types-formatvaluetype/)
  * [Format​Value​Types](https://libtmux.org/en/ts/latest/reference/field_types-formatvaluetypes/)
  * [Pane​Alias​Map](https://libtmux.org/en/ts/latest/reference/field_types-panealiasmap/)
  * [Raw​Format​Value](https://libtmux.org/en/ts/latest/reference/field_types-rawformatvalue/)
  * [Row​With​Identities](https://libtmux.org/en/ts/latest/reference/field_types-rowwithidentities/)
  * [Session​Alias​Map](https://libtmux.org/en/ts/latest/reference/field_types-sessionaliasmap/)
  * [Window​Alias​Map](https://libtmux.org/en/ts/latest/reference/field_types-windowaliasmap/)

* operation\_options 5

  * [Apply​Workspace​Options](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-applyworkspaceoptions/)
  * [Plan​Workspace​Options](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-planworkspaceoptions/)
  * [normalize​Apply​Workspace​Options](https://libtmux.org/en/ts/latest/reference/operation_options-normalizeapplyworkspaceoptions/)
  * [normalize​Plan​Workspace​Options](https://libtmux.org/en/ts/latest/reference/operation_options-normalizeplanworkspaceoptions/)
  * [Command​Policy](https://libtmux.org/en/ts/latest/workspace/reference/operation_options-commandpolicy/)

* ownership 4

  * [claim​Session](https://libtmux.org/en/ts/latest/workspace/reference/ownership-claimsession/)
  * [may​Prune](https://libtmux.org/en/ts/latest/workspace/reference/ownership-mayprune/)
  * [owned​By​Workspace](https://libtmux.org/en/ts/latest/workspace/reference/ownership-ownedbyworkspace/)
  * [Prune​Policy](https://libtmux.org/en/ts/latest/workspace/reference/ownership-prunepolicy/)

* pane 3

  * [Pane](https://libtmux.org/en/ts/latest/reference/pane-pane/)
  * [Pane​Plans](https://libtmux.org/en/ts/latest/reference/pane-paneplans/)
  * [Pane​Row](https://libtmux.org/en/ts/latest/reference/pane-panerow/)

* planning 11

  * [Workspace​Pane​Creation](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacepanecreation/)
  * [Workspace​Pane​Removal](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacepaneremoval/)
  * [Workspace​Plan](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspaceplan/)
  * [Workspace​Window​Creation](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowcreation/)
  * [Workspace​Window​Placement](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowplacement/)
  * [Workspace​Window​Removal](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowremoval/)
  * [Workspace​Window​Rename](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspacewindowrename/)
  * [plan​Workspace](https://libtmux.org/en/ts/latest/reference/planning-planworkspace/)
  * [running​Session](https://libtmux.org/en/ts/latest/reference/planning-runningsession/)
  * [window​Is​Shared](https://libtmux.org/en/ts/latest/reference/planning-windowisshared/)
  * [Workspace​Retention](https://libtmux.org/en/ts/latest/workspace/reference/planning-workspaceretention/)

* selection 22

  * [Client​Where](https://libtmux.org/en/ts/latest/reference/selection-clientwhere/)
  * [Pane​Where](https://libtmux.org/en/ts/latest/reference/selection-panewhere/)
  * [Regex​Criteria​Data](https://libtmux.org/en/ts/latest/reference/selection-regexcriteriadata/)
  * [Selection](https://libtmux.org/en/ts/latest/reference/selection-selection/)
  * [Session​Where](https://libtmux.org/en/ts/latest/reference/selection-sessionwhere/)
  * [Window​Where](https://libtmux.org/en/ts/latest/reference/selection-windowwhere/)
  * [compile​Bounded​Regex](https://libtmux.org/en/ts/latest/reference/selection-compileboundedregex/)
  * [decode​Where​Document](https://libtmux.org/en/ts/latest/reference/selection-decodewheredocument/)
  * [encode​Where​Document](https://libtmux.org/en/ts/latest/reference/selection-encodewheredocument/)
  * [parse​Legacy​Where](https://libtmux.org/en/ts/latest/reference/selection-parselegacywhere/)
  * [Many​Relation](https://libtmux.org/en/ts/latest/reference/selection-manyrelation/)
  * [Model​Kind​Of](https://libtmux.org/en/ts/latest/reference/selection-modelkindof/)
  * [Non​Zero​Digit](https://libtmux.org/en/ts/latest/reference/selection-nonzerodigit/)
  * [One​Relation](https://libtmux.org/en/ts/latest/reference/selection-onerelation/)
  * [Raw​Flag](https://libtmux.org/en/ts/latest/reference/selection-rawflag/)
  * [Raw​Number](https://libtmux.org/en/ts/latest/reference/selection-rawnumber/)
  * [Scalar​Criteria](https://libtmux.org/en/ts/latest/reference/selection-scalarcriteria/)
  * [String​Filter](https://libtmux.org/en/ts/latest/reference/selection-stringfilter/)
  * [String​Filter​Fields](https://libtmux.org/en/ts/latest/reference/selection-stringfilterfields/)
  * [Where​Document​V1](https://libtmux.org/en/ts/latest/reference/selection-wheredocumentv1/)
  * [Where​For​Kind](https://libtmux.org/en/ts/latest/reference/selection-whereforkind/)
  * [Where​Of](https://libtmux.org/en/ts/latest/reference/selection-whereof/)

* server 3

  * [Server](https://libtmux.org/en/ts/latest/reference/server-server/)
  * [Server​Options](https://libtmux.org/en/ts/latest/reference/server-serveroptions/)
  * [Daemon​Identity](https://libtmux.org/en/ts/latest/reference/server-daemonidentity/)

* session 3

  * [Session](https://libtmux.org/en/ts/latest/reference/session-session/)
  * [Session​Plans](https://libtmux.org/en/ts/latest/reference/session-sessionplans/)
  * [Session​Row](https://libtmux.org/en/ts/latest/reference/session-sessionrow/)

* testing 8

  * [Recorded​Answer](https://libtmux.org/en/ts/latest/reference/testing-recordedanswer/)
  * [Recorded​Call](https://libtmux.org/en/ts/latest/reference/testing-recordedcall/)
  * [Recorded​Error](https://libtmux.org/en/ts/latest/reference/testing-recordederror/)
  * [Recorded​Failure](https://libtmux.org/en/ts/latest/reference/testing-recordedfailure/)
  * [Tmux​Recording](https://libtmux.org/en/ts/latest/reference/testing-tmuxrecording/)
  * [record​Invocations](https://libtmux.org/en/ts/latest/reference/testing-recordinvocations/)
  * [replay​Invocations](https://libtmux.org/en/ts/latest/reference/testing-replayinvocations/)
  * [Recorded​Invocation](https://libtmux.org/en/ts/latest/reference/testing-recordedinvocation/)

* types 66

  * [Abort​Like](https://libtmux.org/en/ts/latest/reference/types-abortlike/)
  * [Capture​Options](https://libtmux.org/en/ts/latest/reference/types-captureoptions/)
  * [Choose​Tree​Options](https://libtmux.org/en/ts/latest/reference/types-choosetreeoptions/)
  * [Cmd​Options](https://libtmux.org/en/ts/latest/reference/types-cmdoptions/)
  * [Connected​Server](https://libtmux.org/en/ts/latest/reference/types-connectedserver/)
  * [Connection​Options](https://libtmux.org/en/ts/latest/reference/types-connectionoptions/)
  * [Format​Subscription](https://libtmux.org/en/ts/latest/reference/types-formatsubscription/)
  * [If​Shell​Options](https://libtmux.org/en/ts/latest/reference/types-ifshelloptions/)
  * [Join​Options](https://libtmux.org/en/ts/latest/reference/types-joinoptions/)
  * [Menu​Entry](https://libtmux.org/en/ts/latest/reference/types-menuentry/)
  * [Move​Window​Options](https://libtmux.org/en/ts/latest/reference/types-movewindowoptions/)
  * [New​Session​Options](https://libtmux.org/en/ts/latest/reference/types-newsessionoptions/)
  * [New​Window​Options](https://libtmux.org/en/ts/latest/reference/types-newwindowoptions/)
  * [Planned​Operation](https://libtmux.org/en/ts/latest/reference/types-plannedoperation/)
  * [Popup​Options](https://libtmux.org/en/ts/latest/reference/types-popupoptions/)
  * [Resize​Options](https://libtmux.org/en/ts/latest/reference/types-resizeoptions/)
  * [Resize​Window​Options](https://libtmux.org/en/ts/latest/reference/types-resizewindowoptions/)
  * [Respawn​Options](https://libtmux.org/en/ts/latest/reference/types-respawnoptions/)
  * [Run​Shell​Options](https://libtmux.org/en/ts/latest/reference/types-runshelloptions/)
  * [Save​Buffer​Options](https://libtmux.org/en/ts/latest/reference/types-savebufferoptions/)
  * [Send​Keys​Options](https://libtmux.org/en/ts/latest/reference/types-sendkeysoptions/)
  * [Server​Snapshot](https://libtmux.org/en/ts/latest/reference/types-serversnapshot/)
  * [Set​Environment​Options](https://libtmux.org/en/ts/latest/reference/types-setenvironmentoptions/)
  * [Set​Hook​Options](https://libtmux.org/en/ts/latest/reference/types-sethookoptions/)
  * [Set​Option​Options](https://libtmux.org/en/ts/latest/reference/types-setoptionoptions/)
  * [Snapshot​Options](https://libtmux.org/en/ts/latest/reference/types-snapshotoptions/)
  * [Split​Options](https://libtmux.org/en/ts/latest/reference/types-splitoptions/)
  * [Tmux​Client​Detached​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxclientdetachedevent/)
  * [Tmux​Client​Session​Changed​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxclientsessionchangedevent/)
  * [Tmux​Event​Stream](https://libtmux.org/en/ts/latest/reference/types-tmuxeventstream/)
  * [Tmux​Exit​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxexitevent/)
  * [Tmux​Layout​Change​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxlayoutchangeevent/)
  * [Tmux​Message​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxmessageevent/)
  * [Tmux​Output​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxoutputevent/)
  * [Tmux​Pane​Flow​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxpaneflowevent/)
  * [Tmux​Pane​Mode​Changed​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxpanemodechangedevent/)
  * [Tmux​Paste​Buffer​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxpastebufferevent/)
  * [Tmux​Reconnected​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxreconnectedevent/)
  * [Tmux​Reconnecting​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxreconnectingevent/)
  * [Tmux​Session​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxsessionevent/)
  * [Tmux​Sessions​Changed​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxsessionschangedevent/)
  * [Tmux​Session​Window​Changed​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxsessionwindowchangedevent/)
  * [Tmux​Subscription​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxsubscriptionevent/)
  * [Tmux​Unknown​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxunknownevent/)
  * [Tmux​Version](https://libtmux.org/en/ts/latest/reference/types-tmuxversion/)
  * [Tmux​Window​Lifecycle​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxwindowlifecycleevent/)
  * [Tmux​Window​Pane​Changed​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxwindowpanechangedevent/)
  * [Tmux​Window​Renamed​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxwindowrenamedevent/)
  * [Wait​For​Options](https://libtmux.org/en/ts/latest/reference/types-waitforoptions/)
  * [Watch​Options](https://libtmux.org/en/ts/latest/reference/types-watchoptions/)
  * [is​Split​Size](https://libtmux.org/en/ts/latest/reference/types-issplitsize/)
  * [is​Tmux​Name](https://libtmux.org/en/ts/latest/reference/types-istmuxname/)
  * [split​Size](https://libtmux.org/en/ts/latest/reference/types-splitsize-1ync/)
  * [Connect​Options](https://libtmux.org/en/ts/latest/reference/types-connectoptions/)
  * [Digit](https://libtmux.org/en/ts/latest/reference/types-digit/)
  * [Environment​Scope](https://libtmux.org/en/ts/latest/reference/types-environmentscope/)
  * [Environment​Value](https://libtmux.org/en/ts/latest/reference/types-environmentvalue/)
  * [Hook​Scope](https://libtmux.org/en/ts/latest/reference/types-hookscope/)
  * [Menu​Item](https://libtmux.org/en/ts/latest/reference/types-menuitem/)
  * [Non​Zero​Digit](https://libtmux.org/en/ts/latest/reference/types-nonzerodigit/)
  * [Split​Cell​Size](https://libtmux.org/en/ts/latest/reference/types-splitcellsize/)
  * [Split​Percentage](https://libtmux.org/en/ts/latest/reference/types-splitpercentage/)
  * [Split​Size](https://libtmux.org/en/ts/latest/reference/types-splitsize-1i84/)
  * [Tmux​Event](https://libtmux.org/en/ts/latest/reference/types-tmuxevent/)
  * [Window​Target](https://libtmux.org/en/ts/latest/reference/types-windowtarget/)
  * [Zero​To​Ninety​Nine](https://libtmux.org/en/ts/latest/reference/types-zerotoninetynine/)

* window 3

  * [Window](https://libtmux.org/en/ts/latest/reference/window-window/)
  * [Window​Plans](https://libtmux.org/en/ts/latest/reference/window-windowplans/)
  * [Window​Row](https://libtmux.org/en/ts/latest/reference/window-windowrow/)

* mcp.policy 2

  * [Policy](https://libtmux.org/en/ts/latest/mcp/reference/mcp-policy-policy/)
  * [Toolset](https://libtmux.org/en/ts/latest/mcp/reference/mcp-policy-toolset/)

* mcp.server 4

  * [create​Tmux​Mcp​Server](https://libtmux.org/en/ts/latest/mcp/reference/mcp-server-createtmuxmcpserver/)
  * [describe​Startup​Failure](https://libtmux.org/en/ts/latest/mcp/reference/mcp-server-describestartupfailure/)
  * [main](https://libtmux.org/en/ts/latest/mcp/reference/mcp-server-main/)
  * [server​From​Environment](https://libtmux.org/en/ts/latest/mcp/reference/mcp-server-serverfromenvironment/)

* mcp.startup 3

  * [Server​Startup](https://libtmux.org/en/ts/latest/mcp/reference/mcp-startup-serverstartup/)
  * [Configuration​Provenance](https://libtmux.org/en/ts/latest/mcp/reference/mcp-startup-configurationprovenance/)
  * [Server​State](https://libtmux.org/en/ts/latest/mcp/reference/mcp-startup-serverstate/)
