Expand description
AgentMux Core: application coordinator for storage + pub/sub. Port of Goβs pkg/wcore/wcore.go + window.go + workspace.go + block.go.
Orchestrates Store mutations with MPS event publishing.
Re-exportsΒ§
ModulesΒ§
- block π
- Block CRUD operations.
- dnd π
- Drag-and-drop operations: moving/promoting/tearing-off blocks and tabs.
- event π
- Pub/sub event publishing for StoreObj updates.
- tab π
- Tab CRUD and reorder operations.
- window π
- Window CRUD, focus, workspace switching, and repair operations.
- workspace π
- Workspace CRUD operations.
ConstantsΒ§
- LAYOUT_
ACTION_ CLEAR_ TREE - LAYOUT_
ACTION_ INSERT - LAYOUT_
ACTION_ INSERT_ AT_ INDEX - LAYOUT_
ACTION_ REMOVE - LAYOUT_
ACTION_ REPLACE - LAYOUT_
ACTION_ SPLIT_ HORIZONTAL - LAYOUT_
ACTION_ SPLIT_ VERTICAL
FunctionsΒ§
- default_
three_ πpane_ tree - Pure builder for the default 3-pane tree (
agent | [sysinfo / swarm]). Returns(rootnode, focused_node_id, leaforder). Shared by the pre-bootstrap store-direct writer above (first launch β reducer not hydrated yet) and the post-bootstrap reducer-routed CreateWindow seed (SPEC_864 Phase 3,seed_layout_via_reducer), so the layout shape can never drift between the two paths. - ensure_
initial_ data - Ensure initial data is present in the store.
Creates a default Client, Window, Workspace, Tab if the store is empty.
Returns
trueif this is a first launch (client was just created). - get_
client - Get the singleton client record.
- seed_
default_ πlayout - Seed a tab with the default 3-pane launch layout (agent + sysinfo + swarm):
- single_
leaf_ πtree - Pure builder for a single-pane tree wrapping exactly one block β no
splits. Used by the post-bootstrap CreateWindow seed
(
handle_create_window) when the caller supplies a specificseed_view(e.g. βOpen in New Windowβ on a widget) instead of wanting the default 3-pane launch layout β the new windowβs sole pane is the requested widget, not that widget plus the default agent/swarm/sysinfo split. - write_
default_ πthree_ pane_ layout - Write the default 3-pane launch layout (
agent | [sysinfo / swarm]) intotab_idβsLayoutState, wrapping three block IDs that the caller has ALREADY created.