src / index.ts
/**
* Unsloth MCP Plugin - Main Entry Point
*
* Plan A: expose the standard members so LM Studio can load the plugin directly.
* - toolsProvider: defines all 36 MCP tools (35 original + plugin_system_info)
* - configSchematics: per-chat configuration UI schema
* - globalConfigSchematics: global configuration UI schema
*/
import { toolsProvider } from './toolsProvider.js';
import { configSchematics, globalConfigSchematics } from './config.js';
import type { PluginContext } from '@lmstudio/sdk';
// Standard exports consumed by LM Studio (manifest main / Hub publish path).
export { toolsProvider, configSchematics, globalConfigSchematics };
/**
* Dev-harness entrypoint.
*
* The `.lmstudio/entry.ts` file generated by `lms dev` imports this module and
* then calls `main(pluginContext)` to register the plugin's features with LM
* Studio's self-registration host. We register the standard exports here so a
* single source of truth is used by both the publish path and the dev harness.
*/
export function main(pluginContext: PluginContext): void {
pluginContext
.withConfigSchematics(configSchematics)
.withGlobalConfigSchematics(globalConfigSchematics)
.withToolsProvider(toolsProvider);
}
src / index.ts
/**
* Unsloth MCP Plugin - Main Entry Point
*
* Plan A: expose the standard members so LM Studio can load the plugin directly.
* - toolsProvider: defines all 36 MCP tools (35 original + plugin_system_info)
* - configSchematics: per-chat configuration UI schema
* - globalConfigSchematics: global configuration UI schema
*/
import { toolsProvider } from './toolsProvider.js';
import { configSchematics, globalConfigSchematics } from './config.js';
import type { PluginContext } from '@lmstudio/sdk';
// Standard exports consumed by LM Studio (manifest main / Hub publish path).
export { toolsProvider, configSchematics, globalConfigSchematics };
/**
* Dev-harness entrypoint.
*
* The `.lmstudio/entry.ts` file generated by `lms dev` imports this module and
* then calls `main(pluginContext)` to register the plugin's features with LM
* Studio's self-registration host. We register the standard exports here so a
* single source of truth is used by both the publish path and the dev harness.
*/
export function main(pluginContext: PluginContext): void {
pluginContext
.withConfigSchematics(configSchematics)
.withGlobalConfigSchematics(globalConfigSchematics)
.withToolsProvider(toolsProvider);
}