Module layout_types

Module layout_types 

Source
Expand description

Shared layout tree types used in both the srv wire protocol (ipc.rs Command/Event variants) and the srv object store (obj.rs LayoutState).

Living in agentmux-common so agentmux-srv, agentmux-cef, and agentmux- launcher can all reference the same type definitions without circular dependencies or duplication.

Part of srv Phase E.4.B (Phase 3 — wire types). See docs/specs/srv-phase-e4b-formal-spec-2026-05-03.md §4.1, §5, §6.

Structs§

LayoutNode
One node in the layout tree. Stable UUID-keyed; size is a relative flex unit; children form the recursive structure (empty for leaves).
LayoutNodeData
Leaf-only payload — references the block this layout leaf renders. Group nodes (those with children) carry no data.
ResizeOp
A single resize operation: target node + new flex size (0–100 relative units).

Enums§

FlexDirection
Direction children flow within a layout node (row = horizontal split, column = vertical split). Defaults to Row when absent in JSON for tolerance of older blobs.
SplitPosition
Position for split commands: where to insert the new node relative to the target.