gaunt-sloth-assistant
Version:
[](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [ • 760 B
TypeScript
import { BaseToolkit, StructuredToolInterface } from '@langchain/core/tools';
export default class GthFileSystemToolkit extends BaseToolkit {
tools: StructuredToolInterface[];
private allowedDirectories;
constructor(allowedDirectories?: string[]);
/**
* Get tools filtered by operation type
*/
getFilteredTools(allowedOperations: ('read' | 'write')[]): StructuredToolInterface[];
private normalizePath;
private isProtectedDirectory;
private expandHome;
private validatePath;
private getFileStats;
private searchFiles;
private normalizeLineEndings;
private createUnifiedDiff;
private applyFileEdits;
private formatSize;
private tailFile;
private headFile;
private createTools;
}