@idosgames/module-sdk
v0.1.9
Published
The composable-module contract for the iDosGames host shell: Module / ModuleContext types plus tiny authoring helpers. Framework-neutral at runtime — a module can be a game (Three/Phaser), a plain app, or an AI app.
Maintainers
Readme
@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); // mount/activate/suspend/destroy
ctx.registerPanel(panel); // React UI in a host slot
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).
