Skip to main content

Module wcore

Module wcore 

Source
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§

pub use block::*;
pub use event::*;
pub use tab::*;
pub use window::*;
pub use workspace::*;

Modules§

block
Block CRUD operations.
event
Pub/sub event publishing for StoreObj updates.
object_meta
Merge a meta update into a stored object, in one transaction.
tab
Tab CRUD and reorder operations.
window
Window CRUD, focus, workspace switching, and repair operations.
workspace
Workspace CRUD operations.

Functions§

default_three_pane_tree
Pure builder for the default 3-pane tree (agent | [sysinfo / swarm]). Returns (rootnode, focused_node_id). 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 true if this is a first launch (client was just created).
get_client
Get the singleton client record.
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 specific seed_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.