libtmux Reference MCP Search
On this page

builder.planWorkspace

View as Markdown

Module
builder
Package
@libtmux/libtmux
Source
packages/workspace/src/builder.ts
planWorkspace ( server : : Server , workspaceInput : : WorkspaceInput , options : : PlanWorkspaceOptions = {} ) Promise<WorkspacePlan>
functionasync [source]
functionasync [source]
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

const plan = await planWorkspace(server, workspace);
if (plan.removesWindows.length > 0) console.log("would remove", plan.removesWindows);
Raises
  • ZodErrorwhen the workspace does not satisfy the strict config schema.

  • TypeErrorwhen planning options are invalid.

0 declared, 0 inherited

Esc

Type to search.