@idosgames/module-sdk
The composable-module contract for the iDosGames host shell. A module is a self-contained
feature — a game (Three/Phaser), a plain app, or an AI app — that plugs into the host: it declares a
Module manifest and, in setup(ctx), registers what it contributes (a rendered EngineScene,
React UiPanels, a nav route). Framework-neutral at runtime — React and @idosgames/core are
referenced as types only, so a renderer-less module pulls in neither.
import { defineModule } from "@idosgames/module-sdk";
export const myModule = defineModule({
id: "my-game",
meta: { name: "My Game", type: "game", genre: "arcade", engine: "three" },
setup(ctx) {
ctx.registerScene(scene);
ctx.registerPanel(panel);
ctx.registerRoute({ id: "my-game", label: "Play", icon: "🎮" });
},
});
Key types: Module, ModuleContext, EngineScene, SceneMountContext, UiPanel, SurfaceAllocator,
RouteEntry, SharedEventBus. The host runtime is @idosgames/app-shell;
shared React glue is @idosgames/react.
See the full design in docs/composable-modules-architecture.md, or load the idosgames-module-contract
skill (via the @idosgames/mcp server).