@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
39 lines • 1.34 kB
TypeScript
import { MastraCompositeStore } from './base.js';
export interface FilesystemStoreConfig {
/**
* Directory to store JSON files in.
* Defaults to `.mastra-storage/` relative to `process.cwd()`.
*/
dir?: string;
}
/**
* Filesystem-based storage adapter for the Mastra Editor.
*
* Stores editor primitives (agents, prompt blocks, scorer definitions,
* MCP clients, MCP servers, workspaces, skills) as JSON files on disk.
* This enables Git-based version tracking instead of database-based versioning.
*
* Only implements the 7 editor domains — other domains (memory, workflows, scores,
* observability, datasets, experiments, blobs) are left undefined and should be
* provided by a separate store via the `editor` shorthand on `MastraCompositeStore`.
*
* @example
* ```typescript
* import { FilesystemStore, MastraCompositeStore } from '@mastra/core/storage';
*
* const storage = new MastraCompositeStore({
* id: 'my-storage',
* default: postgresStore,
* editor: new FilesystemStore({ dir: '.mastra-storage' }),
* });
* ```
*/
export declare class FilesystemStore extends MastraCompositeStore {
#private;
constructor(config?: FilesystemStoreConfig);
/**
* The absolute path to the storage directory.
*/
get dir(): string;
}
//# sourceMappingURL=filesystem.d.ts.map