Update tools to allow reading any VFS path, writing to /tmp

This commit is contained in:
Alex Gleason committed 2025-09-14 12:31:23 -05:00
1 parent f23b92c79f
commit be8309b503
17 files changed
+356 -60

No files matched your search

+15 -1
View File
@@ -134,7 +134,21 @@ describe('TextEditorStrReplaceTool', () => {
path: '/absolute/path/test.ts',
old_str: 'old',
new_str: 'new'
})).rejects.toThrow('❌ Absolute paths are not supported');
})).rejects.toThrow('Write access denied');
});
it('should allow writes to /tmp/ directory', async () => {
// First create the file in /tmp/
await mockFS.writeFile('/tmp/temp-file.txt', 'original content');
const result = await tool.execute({
path: '/tmp/temp-file.txt',
old_str: 'original',
new_str: 'modified'
});
expect(result).toContain('String successfully replaced');
expect(mockFS.getFileContent('/tmp/temp-file.txt')).toBe('modified content');
});
it('should handle whitespace normalization', async () => {