Anvia
Studio

Studio Stores

Store bundle types and SQLite session/trace store.

Import from @anvia/studio.

Store Bundle Types

type StudioMemoryStore = {
  readonly kind?: string;
};

type StudioKnowledgeStore = {
  readonly kind?: string;
};

type StudioStores = {
  sessions?: StudioSessionStore | false;
  traces?: StudioTraceStore;
  memory?: StudioMemoryStore;
  knowledge?: StudioKnowledgeStore;
};

Purpose: store capabilities exposed by Studio runtime configuration.

Return behavior: false disables sessions; omitted stores disable associated capabilities.

Notable errors: none directly.

SQLite Store

type SqliteSessionStoreOptions = {
  path?: string;
};

function createSqliteSessionStore(
  options?: SqliteSessionStoreOptions,
): StudioSessionStore & StudioTraceStore;

Purpose: create a SQLite-backed session and trace store.

Return behavior: defaults to in-memory SQLite when path is omitted.

Notable errors: throws when node:sqlite is unavailable, the database cannot open, or SQLite operations fail.