Persist the current graph snapshot then unsubscribe all event listeners. Call during app shutdown / component unmount.
Initialise the plugin: subscribe to all events and optionally restore the persisted snapshot. Must be awaited before calling commands.
High-level Tauri graph plugin that manages lifecycle: init, event wiring, snapshot restore, and graceful dispose.