Expand description
Plugin-owned key/value storage — the extracted storage primitive crate.
Each plugin gets an isolated, namespaced KV space exposed only through the
plugin-host storage capability (gated by the storage:kv grant). This is
where a plugin keeps durable state instead of Core growing bespoke columns for
it — e.g. the goal plugin’s per-conversation completion condition + turn count
live here (key = conversation id), not on the conversations table.
Placement (Core vs Gateway): this stores what a plugin is tracking — it
decides what runs, not what is allowed — so it is Core-tier. Rows are
namespaced by (plugin_id, namespace, key) so one plugin can never read
another’s state.
This crate is a pure primitive: PluginStorage::open takes an explicit
db path, so the crate has ZERO dependency on apps/core. The single kernel
coupling — choosing the default ~/.ryu/plugin-storage.db path — and the
process-global handle stay Core-side as wiring (apps/core/src/plugin_storage).
Structs§
- Plugin
Storage - SQLite-backed per-plugin KV store. Cheap to clone (wraps an
Arc).