feat(gateway): integrate pairing store and event hook system

This update introduces a pairing store for code-based user authorization and an event hook system within the GatewayRunner class. These enhancements aim to improve user authorization processes and facilitate event-driven functionalities in the gateway.
This commit is contained in:
teknium1 2026-02-27 00:23:26 -08:00
parent 2ff54ae6b3
commit fec5d59fb3

View file

@ -157,6 +157,14 @@ class GatewayRunner:
except Exception as e:
logger.debug("SQLite session store not available: %s", e)
# DM pairing store for code-based user authorization
from gateway.pairing import PairingStore
self.pairing_store = PairingStore()
# Event hook system
from gateway.hooks import HookRegistry
self.hooks = HookRegistry()
def _flush_memories_before_reset(self, old_entry):
"""Prompt the agent to save memories/skills before an auto-reset.
@ -216,14 +224,6 @@ class GatewayRunner:
logger.info("Pre-reset save completed for session %s", old_entry.session_id)
except Exception as e:
logger.debug("Pre-reset save failed for session %s: %s", old_entry.session_id, e)
# DM pairing store for code-based user authorization
from gateway.pairing import PairingStore
self.pairing_store = PairingStore()
# Event hook system
from gateway.hooks import HookRegistry
self.hooks = HookRegistry()
@staticmethod
def _load_prefill_messages() -> List[Dict[str, Any]]: