miaoda-game-adventure-scenario-bridge-core
v0.3.1
Published
Static and runtime-checked command bindings between scenario scripts and adventure interaction requests.
Maintainers
Readme
miaoda-game-adventure-scenario-bridge-core
An explicit bridge between adventure-interaction-core requests and scenario-core commands. Use it when both systems share command signatures and you want typos and stale bindings diagnosed before play; it is not a general scripting language or UI layer.
pnpm add miaoda-game-adventure-scenario-bridge-coreconst manifest = {
knownHostCommands: ['say'],
bindings: [{id: 'accuse-rinko', command: 'action', args: ['accuse', 'rinko'], request: {verb: 'accuse', target: 'rinko'}}],
} as const;
const request = resolveAdventureCommand(manifest, ctx.name, ctx.args);
if (request) adventure.dispatch(request);Bindings match exact argument arrays. analyzeAdventureScenarioBridge checks Adventure IDs/rule signatures, duplicate or unused bindings, unbound scenario commands, and scenario compilation errors. A request.room value guards the current room; it never changes it. Memory, rendering, and command presentation remain game-owned.
