// src/framework/IStateStore.ts
//
// Abstraction for persisted component state reads/writes.
// Registered as context service 'state-store' — implementations vary by environment:
//   - Daemon: direct KV access (NatsKvStateStore)
//   - Browser: RequestReply to BlackboardActor (RemoteStateStore)
//
// Components call context.getService<IStateStore>('state-store') — no hardcoded paths.

export const STATE_STORE_KEY = 'state-store';

export interface IStateStore {
  /**
   * Read persisted state for a component mount path.
   * Returns the state object, or null if not found.
   */
  read(mount: string, sessionId?: string): Promise<Record<string, unknown> | null>;
}
