Workspace ManagerconceptAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

Workspace Manager: API reference

Edit this page on GitHub

C# workspace builder API

LibTmux.Workspace 0.1.1 · Source

The LibTmux.Workspace namespace provides configuration objects and a builder that uses a caller-supplied LibTmux Server.

Configuration

WorkspaceFile parses YAML and holds the session description. WorkspaceWindow and WorkspacePane hold nested configuration. WorkspaceFormatException identifies unsupported or invalid configuration.

Builder options

WorkspaceBuilder accepts the server to use. PlanAsync validates the declaration and observes that endpoint; its returned WorkspacePlan lists the actions to review before ApplyAsync executes them. Enumerating those actions performs no I/O. Application rechecks the observed daemon and session.

WorkspacePlanOptions controls existing-session conflicts, readiness, host scripts, and cleanup. The defaults refuse an existing session and send pane input immediately. BuildAsync combines planning and application with those defaults.

Choose WorkspaceReadiness.Cooperative when pane startup can signal its assigned channel. Configure a positive ReadinessTimeout; a timeout prevents command delivery to that pane. Topics explains the startup contract and its limits.

Results and failures

WorkspaceResult contains the session, created windows, rejected final layouts, and action journals. Reusing an existing session creates no windows. A rejected final layout does not discard its window.

WorkspaceBuildException keeps a PartialResult when state could be materialized before failure. It can be null when no such result could be read. Journal records action outcomes; CompensationJournal records attempted cleanup. Inspect live tmux state before retrying; a missing result does not prove that no command reached tmux.

Cancellation during application raises WorkspaceOperationCanceledException with the caller’s token, partial state, and journals. Cancellation does not imply rollback. CompensateOnFailure requests bounded cleanup only of resources proven to belong to that application.

Result contract; Failure contract.

API declarations

Follow a declaration for its signature, members, documentation, and source.

Workspace files

LibTmux.Workspace.WorkspaceCommand
Describes one literal pane command and an optional Enter override.
LibTmux.Workspace.WorkspaceFile
Describes the supported subset of one tmuxp workspace.
LibTmux.Workspace.WorkspacePane
Describes one pane in a supported tmuxp workspace.
LibTmux.Workspace.WorkspaceWindow
Describes one window in a supported tmuxp workspace.

Building and freezing

LibTmux.Workspace.WorkspaceAction
Describes one immutable operation over plan-local targets.
LibTmux.Workspace.WorkspaceActionKind
Names one ordered workspace operation.
LibTmux.Workspace.WorkspaceActionOutcome
Records one plan action, its dispatch and any materialized result or failure.
LibTmux.Workspace.WorkspaceActionState
Describes how one reviewed workspace operation ended.
LibTmux.Workspace.WorkspaceBuilder
Plans and applies tmux sessions from tmuxp workspace files.
LibTmux.Workspace.WorkspaceExistingSession
Controls what planning does when the requested session already exists.
LibTmux.Workspace.WorkspaceHostCommand
Describes one explicitly enabled host shell command.
LibTmux.Workspace.WorkspaceHostResult
Describes captured output and the observed exit of a host command.
LibTmux.Workspace.WorkspacePlan
Contains the reviewed actions and observed preconditions for one workspace application.
LibTmux.Workspace.WorkspacePlanOptions
Provides explicit policies copied into a workspace plan.
LibTmux.Workspace.WorkspaceReadiness
Controls whether pane startup must acknowledge readiness.
LibTmux.Workspace.WorkspaceResult
Describes workspace state materialized by a build.
LibTmux.Workspace.WorkspaceServerStartup
Controls application when planning observed no daemon.

Errors

LibTmux.Workspace.WorkspaceBuildException
Reports a workspace failure and the tmux state created before it.
LibTmux.Workspace.WorkspaceFormatException
Thrown when a workspace file cannot be read.
LibTmux.Workspace.WorkspaceOperationCanceledException
Reports workspace cancellation and the tmux state materialized before it.
Esc
Search in

Type to search.

Reference previewOpen reference