UNPKG

echonodesync

Version:

Autonomous, pluggable, secure memory bridge for agent/human/ritual ecosystems (DreamWeaver, EchoThreads, etc.)

24 lines (19 loc) 532 B
// 🧠🌸 EchoNodeSync: Event Hooks for Agent Rituals // This module allows registration of pre/post memory sync hooks for agent/human rituals. const hooks = { preGet: [], postGet: [], prePost: [], postPost: [] }; function registerHook(type, fn) { if (!hooks[type]) throw new Error(`Unknown hook type: ${type}`); hooks[type].push(fn); } async function runHooks(type, ...args) { if (!hooks[type]) return; for (const fn of hooks[type]) { await fn(...args); } } module.exports = { registerHook, runHooks };