@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
36 lines • 1.12 kB
TypeScript
import { MastraCompositeStore } from './base.js';
import type { StorageDomains } from './base.js';
/**
* In-memory storage implementation for testing and development.
*
* All data is stored in memory and will be lost when the process ends.
* Access domain-specific storage via `getStore()`:
*
* @example
* ```typescript
* const storage = new InMemoryStore();
*
* // Access memory domain
* const memory = await storage.getStore('memory');
* await memory?.saveThread({ thread });
*
* // Access workflows domain
* const workflows = await storage.getStore('workflows');
* await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
* ```
*/
export declare class InMemoryStore extends MastraCompositeStore {
#private;
stores: StorageDomains;
constructor({ id }?: {
id?: string;
});
/**
* Clears all data from the in-memory database.
* Useful for testing.
* @deprecated Use dangerouslyClearAll() on individual domains instead.
*/
clear(): void;
}
export declare const MockStore: typeof InMemoryStore;
//# sourceMappingURL=mock.d.ts.map