Forked from dirty-data/computer
Forked from dirty-data/computer
src / pluginTypes.ts
/**
* @file pluginTypes.ts
* Type definitions for the LM Studio plugin controller.
* Inferred from SDK patterns.
*/
import type { configSchematics, globalConfigSchematics } from "./config";
export interface PluginController {
getPluginConfig(schematics: typeof configSchematics): {
get(key: string): any;
};
getGlobalPluginConfig(schematics: typeof globalConfigSchematics): {
get(key: string): any;
};
}
export interface PluginContext {
withConfigSchematics(schematics: typeof configSchematics): void;
withGlobalConfigSchematics(schematics: typeof globalConfigSchematics): void;
withToolsProvider(provider: (ctl: PluginController) => Promise<any[]>): void;
withPromptPreprocessor(
preprocessor: (ctl: PluginController, message: string) => Promise<string>,
): void;
}
src / pluginTypes.ts
/**
* @file pluginTypes.ts
* Type definitions for the LM Studio plugin controller.
* Inferred from SDK patterns.
*/
import type { configSchematics, globalConfigSchematics } from "./config";
export interface PluginController {
getPluginConfig(schematics: typeof configSchematics): {
get(key: string): any;
};
getGlobalPluginConfig(schematics: typeof globalConfigSchematics): {
get(key: string): any;
};
}
export interface PluginContext {
withConfigSchematics(schematics: typeof configSchematics): void;
withGlobalConfigSchematics(schematics: typeof globalConfigSchematics): void;
withToolsProvider(provider: (ctl: PluginController) => Promise<any[]>): void;
withPromptPreprocessor(
preprocessor: (ctl: PluginController, message: string) => Promise<string>,
): void;
}