Interface FileSystemPersonaLoaderConfig

Configuration specific to the FileSystemPersonaLoader.

Interface

FileSystemPersonaLoaderConfig

interface FileSystemPersonaLoaderConfig {
    personaSource: string;
    loaderType?: string;
    options?: Record<string, any>;
    personaDefinitionPath: string;
    recursiveSearch?: boolean;
    fileExtension?: string;
}

Hierarchy (view full)

Properties

personaSource: string

The source from which to load persona definitions. This could be a file system path, a database connection string, an API endpoint, etc. The interpretation of this field is up to the implementing class.

Example

"./personas" (for file system loading)

Example

"mongodb://localhost:27017/personas" (for database loading)
loaderType?: string

Optional: Specifies the type of loader to use, if multiple strategies are supported by a factory or a more complex loader implementation.

Example

"file_system", "database", "http_endpoint"
options?: Record<string, any>

Optional: Additional configuration parameters specific to the loader type.

personaDefinitionPath: string

The file system path to the directory containing persona definition JSON files. This overrides the generic personaSource from PersonaLoaderConfig.

recursiveSearch?: boolean

If true, recursively search for .json files in subdirectories.

Default

false
fileExtension?: string

File extension to look for (e.g., ".persona.json", ".json"). Must include the leading dot.

Default

".json"