src / index.ts
import { type PluginContext } from "@lmstudio/sdk";
import { toolsProvider } from "./toolsProvider.js";
import { configSchematics, globalConfigSchematics } from "./config.js";
export { toolsProvider, configSchematics, globalConfigSchematics };
/**
* Main entry point for the LM Studio plugin.
*
* LM Studio's runtime loads this function via `lms dev` / `lms push`. It
* receives a `PluginContext` that is used to register the plugin's tools and
* configuration schematics with the host.
*/
export async function main(ctx: PluginContext): Promise<void> {
ctx.withToolsProvider(toolsProvider).withGlobalConfigSchematics(globalConfigSchematics);
}
src / index.ts
import { type PluginContext } from "@lmstudio/sdk";
import { toolsProvider } from "./toolsProvider.js";
import { configSchematics, globalConfigSchematics } from "./config.js";
export { toolsProvider, configSchematics, globalConfigSchematics };
/**
* Main entry point for the LM Studio plugin.
*
* LM Studio's runtime loads this function via `lms dev` / `lms push`. It
* receives a `PluginContext` that is used to register the plugin's tools and
* configuration schematics with the host.
*/
export async function main(ctx: PluginContext): Promise<void> {
ctx.withToolsProvider(toolsProvider).withGlobalConfigSchematics(globalConfigSchematics);
}