@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
46 lines • 1.48 kB
TypeScript
/**
* LocalSkillSource - Read-only skill source backed by local filesystem.
*
* Uses Node.js fs/promises to read skills directly from disk.
* This allows skills to be loaded without requiring a full WorkspaceFilesystem.
*
* @example
* ```typescript
* const source = new LocalSkillSource({
* basePath: process.cwd(),
* });
*
* // skills paths are relative to basePath
* const skillsImpl = new WorkspaceSkillsImpl({
* source,
* skills: ['./skills', './node_modules/@company/skills'],
* });
* ```
*/
import type { SkillSource, SkillSourceEntry, SkillSourceStat } from './skill-source.js';
/**
* Configuration for LocalSkillSource.
*/
export interface LocalSkillSourceOptions {
/**
* Base path for resolving relative skill paths.
* Defaults to process.cwd().
*/
basePath?: string;
}
/**
* Read-only skill source that loads skills from the local filesystem.
*
* Unlike WorkspaceFilesystem, this doesn't provide write operations.
* Skills loaded from this source are read-only.
*/
export declare class LocalSkillSource implements SkillSource {
#private;
constructor(options?: LocalSkillSourceOptions);
exists(skillPath: string): Promise<boolean>;
stat(skillPath: string): Promise<SkillSourceStat>;
readFile(skillPath: string): Promise<string | Buffer>;
readdir(skillPath: string): Promise<SkillSourceEntry[]>;
realpath(skillPath: string): Promise<string>;
}
//# sourceMappingURL=local-skill-source.d.ts.map