module RubyLLM::AgUI::Store

Run identity and progress storage.

The store is where run identity becomes durable: it reserves a run before any provider work happens, so a retried request attaches to the run already in progress instead of executing twice, and it keeps the interrupts that a later resume has to answer.

Two stores ship with the gem: Store::MemoryStore, which is the default for a single process, and the optional Rails adapter’s ActiveRecord store. A host may implement this interface instead; every method must be safe to call from concurrent threads.

‘scope` is the host’s own tenant/actor boundary. The store treats it as an opaque key, so the host must build it from authenticated identity (for example ‘“#{tenant.id}:#{actor.id}”`). Two scopes never share state, which is what stops one tenant from attaching to another’s run.