src / index.ts
import { type PluginContext } from "@lmstudio/sdk";
import { notificationConfigSchematics, toolsProvider } from "./toolsProvider";
/**
* LM Studio plugin entry point.
* Exposes user-controllable global settings (sound, default wait timeout) in
* the LM Studio plugin UI and registers the
* send_notification tool provider so that local LLM models can create native
* macOS system notifications via node-notifier, honoring the configured defaults.
*/
export async function main(context: PluginContext): Promise<void> {
// Expose user-configurable settings in the LM Studio plugins UI. The values
// are read inside the tool via ctl.getGlobalPluginConfig().
context.withGlobalConfigSchematics(notificationConfigSchematics);
// Register the tools provider which exposes send_notification to the model.
// toolsProvider is async — withToolsProvider accepts both sync and async providers.
context.withToolsProvider(toolsProvider);
}
src / index.ts
import { type PluginContext } from "@lmstudio/sdk";
import { notificationConfigSchematics, toolsProvider } from "./toolsProvider";
/**
* LM Studio plugin entry point.
* Exposes user-controllable global settings (sound, default wait timeout) in
* the LM Studio plugin UI and registers the
* send_notification tool provider so that local LLM models can create native
* macOS system notifications via node-notifier, honoring the configured defaults.
*/
export async function main(context: PluginContext): Promise<void> {
// Expose user-configurable settings in the LM Studio plugins UI. The values
// are read inside the tool via ctl.getGlobalPluginConfig().
context.withGlobalConfigSchematics(notificationConfigSchematics);
// Register the tools provider which exposes send_notification to the model.
// toolsProvider is async — withToolsProvider accepts both sync and async providers.
context.withToolsProvider(toolsProvider);
}