UNPKG

packfs-core

Version:

Semantic filesystem operations for LLM agent frameworks with natural language understanding. See LLM_AGENT_GUIDE.md for copy-paste examples.

67 lines 1.99 kB
"use strict"; /** * AutoGPT plugin implementation for PackFS */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PackFSAutoGPTPlugin = void 0; class PackFSAutoGPTPlugin { constructor(config = {}) { this.config = { pluginName: 'PackFS', version: '0.1.0', ...config }; } /** * Get plugin manifest */ getManifest() { return { name: this.config.pluginName, version: this.config.version, description: 'Secure filesystem access for AutoGPT', commands: [ { name: 'read_file', description: 'Read file contents', parameters: { path: 'string' } }, { name: 'write_file', description: 'Write file contents', parameters: { path: 'string', content: 'string' } }, { name: 'list_files', description: 'List directory contents', parameters: { path: 'string' } } ] }; } /** * Execute plugin command */ async executeCommand(command, parameters) { // Stub implementation switch (command) { case 'read_file': return `Reading file: ${parameters['path']}`; case 'write_file': return `Writing to file: ${parameters['path']}`; case 'list_files': return `Listing directory: ${parameters['path']}`; default: throw new Error(`Unknown command: ${command}`); } } } exports.PackFSAutoGPTPlugin = PackFSAutoGPTPlugin; //# sourceMappingURL=plugin.js.map