Initial commit: 2125_GCE project

This commit is contained in:
GlyphRunner System
2026-07-09 12:54:44 -04:00
parent c3a826b65c
commit ae13f78c22
299 changed files with 124289 additions and 1031 deletions
Regular → Executable
+5 -4
View File
@@ -6,8 +6,11 @@ Exposes glyph activation and resonance changes as first-class events.
"""
import time
import logging
from typing import Callable, Dict, List, Optional, TypedDict, Literal, Any
logger = logging.getLogger(__name__)
# Event type definitions
EventType = Literal[
"cognition.started",
@@ -61,7 +64,7 @@ class EventBus:
try:
self._subscribers[event_type].remove(handler)
except ValueError:
pass
logger.debug(f"Handler not found for {event_type} during unsubscribe")
def publish(self, event_type: EventType, payload: Dict[str, Any]) -> Event:
"""Create an Event, append to history, and invoke all handlers.
@@ -88,9 +91,7 @@ class EventBus:
try:
handler(event)
except Exception as e:
# Silently catch handler errors to prevent cascade failures
# In production, could log to a logger
pass
logger.warning(f"Event handler error for {event_type}: {e}")
return event