diff --git a/services/minecraft/src/cognitive/perception/event-manager.ts b/services/minecraft/src/cognitive/perception/event-manager.ts index a3378903d..a963fd0cc 100644 --- a/services/minecraft/src/cognitive/perception/event-manager.ts +++ b/services/minecraft/src/cognitive/perception/event-manager.ts @@ -1,4 +1,4 @@ -import type { BotEvent, EventType } from '../types' +import type { BotEvent, EventCategory } from '../types' import EventEmitter from 'eventemitter3' @@ -8,7 +8,7 @@ export class EventManager { public emit(event: BotEvent): void { // TODO: Temporal Context tracking // TODO: Salience Detection / Filtering noise - + // Sort/Filter logic could go here in the future if (!event.priority) { event.priority = 0 // Default priority @@ -18,15 +18,15 @@ export class EventManager { this.emitter.emit('*', event) } - public on(type: EventType | '*', handler: (event: BotEvent) => void): void { + public on(type: EventCategory | '*', handler: (event: BotEvent) => void): void { this.emitter.on(type, handler) } - public off(type: EventType | '*', handler: (event: BotEvent) => void): void { + public off(type: EventCategory | '*', handler: (event: BotEvent) => void): void { this.emitter.off(type, handler) } - public once(type: EventType | '*', handler: (event: BotEvent) => void): void { + public once(type: EventCategory | '*', handler: (event: BotEvent) => void): void { this.emitter.once(type, handler) } } diff --git a/services/minecraft/src/cognitive/types.ts b/services/minecraft/src/cognitive/types.ts index bb4fb66bf..8bf373c64 100644 --- a/services/minecraft/src/cognitive/types.ts +++ b/services/minecraft/src/cognitive/types.ts @@ -29,7 +29,7 @@ export interface CognitiveEngineOptions { } // TODO: currently stimulus is just chat events, consider renaming to 'input' or 'user_interaction' -export type EventType = 'stimulus' | 'perception' | 'feedback' | 'world_update' | 'system_alert' +export type EventCategory = 'stimulus' | 'perception' | 'feedback' | 'world_update' | 'system_alert' export interface BotEventSource { type: 'minecraft' | 'airi' | 'system' @@ -38,7 +38,7 @@ export interface BotEventSource { } export interface BotEvent { - type: EventType + type: EventCategory payload: T source: BotEventSource timestamp: number