src / pluginTypes.ts
/**
* @file pluginTypes.ts
* Type definitions for the LM Studio plugin controller.
*/
import type { ConfigSchematics } from "@lmstudio/sdk";
import type { configSchematics } from "./config";
export type PluginConfigSchematics = typeof configSchematics;
export interface PluginController {
getPluginConfig(schematics: ConfigSchematics): {
get(key: string): unknown;
};
}
export interface PluginContext {
withConfigSchematics(schematics: ConfigSchematics): void;
withToolsProvider(
provider: (ctl: PluginController) => Promise<unknown[]>,
): void;
withPromptPreprocessor(
preprocessor: (ctl: PluginController, message: string) => Promise<string>,
): void;
}