Workspace ManagerAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

LibTmux.Workspace.WorkspaceBuilder

API reference · Markdown

class LibTmux.Workspace.WorkspaceBuilder
class [source]

Plans and applies tmux sessions from tmuxp workspace files.

Description#

The tmux-workspace CLI uses a separate builder with a wider document language.

Discussed in Use the C# workspace builder , C# workspace builder API

Members

ApplyAsync

ApplyAsync ( plan : WorkspacePlan , cancellationToken : CancellationToken ) → Task<WorkspaceResult>
methodasync [source]

Applies the reviewed actions and records their individual outcomes.

Description#

Native defaults and hooks remain runtime dependencies. Input acknowledgement is not program completion. Cleanup uses only returned native identities; unknown creations and irreversible shell effects remain visible in the journal.

Parameters
  • plan ( WorkspacePlan ) – The immutable plan for this builder's resolved endpoint.

  • cancellationToken ( CancellationToken ) – Stops further application and cancels the current operation.

Returns

The materialized session, created windows and complete action journal.

Raises

Discussed in C# workspace builder behavior , C# workspace builder API

Validate

Validate ( workspace : WorkspaceFile , options : WorkspacePlanOptions? ) → void
methodstatic [source]

Checks declaration and policy constraints without reading tmux or executing scripts.

Description#

Reuse defers host-script admission until planning determines whether creation is needed. Layout syntax, checksums and minimum cell counts are checked locally; version-specific layout names are checked during planning. Endpoint identity, conflicts, paths on disk, shell syntax and tmux option support are not checked by local validation.

Parameters
Raises

PlanAsync

PlanAsync ( workspace : WorkspaceFile , options : WorkspacePlanOptions? , cancellationToken : CancellationToken ) → Task<WorkspacePlan>
methodasync [source]

Observes the endpoint and constructs an immutable workspace action plan.

Parameters
  • workspace ( WorkspaceFile ) – The immutable declaration, resolved explicitly when file-relative paths are needed.

  • options ( WorkspacePlanOptions? ) – The conflict, readiness and cleanup policies.

  • cancellationToken ( CancellationToken ) – Cancels read-only endpoint observation.

Returns

The actions and observed identity preconditions; no workspace actions are executed.

Raises

Discussed in C# workspace builder API

WorkspaceBuilder

WorkspaceBuilder ( server : Server )
method [source]

Initializes a builder against one server.

Parameters
  • server ( Server ) – The endpoint inspected by plans and used during application.

BuildAsync

BuildAsync ( workspace : WorkspaceFile , cancellationToken : CancellationToken ) → Task<WorkspaceResult>
methodasync [source]

Plans and applies a workspace with the default policies.

Description#

Uses the same plan and application engine as explicit PlanAsync and ApplyAsync. Input is sent immediately, without claiming shell readiness or command completion. Use an explicit plan to review actions or select readiness, conflict, host-script and compensation policies.

Parameters
Returns

The materialized result and complete action journal.

Raises

Discussed in C# workspace internals , C# workspace builder examples , Use the C# workspace builder , C# workspace builder API

In other ports Build a session from a workspace description
Esc

Type to search.