/**
* RolePlay Master — LM Studio plugin entry point.
*
* The plugin is a **prediction loop handler**: when enabled, it drives the
* generation cycle itself. Each turn it assembles the role-play context into a
* real system prompt, manages the chat it sends, and generates with the user's
* selected model. This gives full control over the system prompt and the
* context window (which a prompt preprocessor cannot do). State (world +
* game-master direction) is persisted per universe, outside the chat history.
*
* `main` is the registration hook LM Studio calls when loading the plugin.
*/
import { type PluginContext } from "@lmstudio/sdk";
import { configSchematics, globalConfigSchematics } from "./config.js";
import { predict } from "./predictionLoopHandler.js";
export async function main(context: PluginContext): Promise<void> {
context.withConfigSchematics(configSchematics);
context.withGlobalConfigSchematics(globalConfigSchematics);
context.withPredictionLoopHandler(predict);
}