src / index.ts

import { type PluginContext, LMStudioClient } from "@lmstudio/sdk";
import { toolsProvider } from "./toolsProvider";
import { promptPreprocessor } from "./promptPreprocessor";
import { pluginConfigSchematics } from "./config";

export async function main(context: PluginContext) {
  // Register the configuration schematics.
  context.withConfigSchematics(pluginConfigSchematics);

  // Register the tools provider.
  context.withToolsProvider(toolsProvider);
  
  // Register the prompt preprocessor to inject documentation on startup.
  context.withPromptPreprocessor(promptPreprocessor);
}