Skip to main content

Crate wm_workspace

Crate wm_workspace 

Source
Expand description

WhiteMagic global workspace bus — salience-based multi-objective arbitration.

All cognitive cores publish state events to the workspace. The workspace arbitrates attention: whichever core has the highest salience score wins the “spotlight” for the next decision cycle.

Design:

  • Salience scoring: multiplicative (urgency × novelty × confidence)
  • Spotlight decay: 0.5^(age / half_life), half_life defaults to 5s
  • High-salience events (>0.8 composite) preempt the current spotlight
  • Event bus: tokio::sync::broadcast channel for multiple subscribers
  • Event backlog: ring buffer of last 256 events

Re-exports§

pub use bus::GlobalWorkspace;
pub use bus::WorkspaceError;
pub use bus::WorkspaceStats;
pub use event::CoreId;
pub use event::EventType;
pub use event::WorkspaceEvent;
pub use salience::Salience;
pub use spotlight::Spotlight;
pub use spotlight::SpotlightEntry;

Modules§

bus
Global workspace bus — publish/subscribe event bus with salience arbitration.
event
Workspace event types — published by cognitive cores.
salience
Salience scoring — the core arbitration signal.
spotlight
Spotlight mechanism — time-decayed attention arbitration.