JSPM

  • Created
  • Published
  • Downloads 114
  • Score
    100M100P100Q71761F
  • License MIT

Event processor for applying semantic events to the world model

Package Exports

  • @sharpee/event-processor

Readme

@sharpee/event-processor

Event processing and state application for the Sharpee Interactive Fiction platform.

Installation

npm install @sharpee/event-processor

Overview

Applies semantic events to the world model:

  • Event Application - Updates world state based on events
  • Event Ordering - Ensures consistent state transitions
  • Side Effects - Triggers handlers for event types

Usage

import { EventProcessor } from '@sharpee/event-processor';

const processor = new EventProcessor(world);

// Apply events from action execution
const updatedWorld = processor.apply(events);

Event Flow

Player Input → Parser → Action → Events → EventProcessor → Updated World

License

MIT