This is a rebuilt LM Studio plugin scaffold that fixes the missing main(context) export and adds a real autonomous builder loop.
What it includes
src/index.ts exports main(context) for LM Studio's plugin loader.
toolsProvider registers file, patch, memory, and autobuild tools.
promptPreprocessor adds a small opt-in forge instruction block when a prompt contains @forge.
AutoBuilder coordinates planner, coder, reviewer, tester, and optimizer agents.
Memory is stored in .forge-memory/memory.jsonl inside the workspace.
File editing is diff-based instead of full overwrite-only behavior.
Usage
Run the plugin in LM Studio development mode with lms dev.
Use the tools from an agentic chat, or trigger the helper prompt with @forge.
Call forge_autobuild to generate or repair a plugin scaffold in .forge-generated/<name>.
Notes
This version is focused on being loadable and safer to iterate on. It still keeps the workspace sandboxed and refuses path traversal outside the plugin workspace.