src / pluginTypes.ts

/**
 * @file pluginTypes.ts
 * Type definitions for the LM Studio plugin controller.
 * These are inferred from the SDK patterns used in your research plugin.
 */

import type { configSchematics } from "./config";

export interface PluginController {
  getPluginConfig(schematics: typeof configSchematics): {
    get(key: string): any;
  };
}

export interface PluginContext {
  withConfigSchematics(schematics: typeof configSchematics): void;
  withToolsProvider(provider: (ctl: PluginController) => Promise<any[]>): void;
  withPromptPreprocessor(
    preprocessor: (ctl: PluginController, message: string) => Promise<string>,
  ): void;
}