Provides hooks for various user-triggered events.
Currently, all API methods on the server take a userId argument.
Hooks.onLoggedIn = function ([server: userId]) { ... } ( anywhere ) - Provide a callback to run when a user has logged inHooks.onLoggedOut = function (userId) { ... } ( anywhere ) - Provide a callback to run when a user has logged outHooks.onCreateUser = function (userId) { ... } ( server ) - Provide a callback to run when a user is createdHooks.onDeleteUser = function (userId) { ... } ( server ) - Provide a callback to run when a user is deletedHooks.onLoseFocus = function ([server: userId]) { ... } ( anywhere )* - Provide a callback to run when the window loses focus. * Opt-in through the updateFocus optionHooks.onGainFocus = function ([server: userId]) { ... } ( anywhere )* - Provide a callback to run when the window gains focus * Opt-in through the updateFocus optionHooks.onCloseSession = function ([server: userId]) { ... } ( server ) - Provide a callback to run when the window/tab is closedHooks.init([options]) ( client ) - Initialize the event system. Optionally provide an Object to set the options. Put this in your Meteor.startupOptions are specified on the client side as an argument (object) in the init method.
updateFocus ( Integer ) - Number of milliseconds to wait before checking whether the window is focused. Default is 0, meaning unless you change this, the onLoseFocus and onGainFocus methods won't be availabletreatCloseAsLogout ( Boolean ) - If true, treat closing the browser window as logging off (meaning that the onLoggedOut callback is triggered in addition to the onCloseSession). Default is falsemrt add event-hooksHooks.init() to your Meteor.startup inside of a file inside your client/ directory or inside of an if(Meteor.isClient) block.if(Meteor.isClient){
Meteor.startup({
Hooks.init();
});
}
That's it!
—
$ claude mcp add meteor-event-hooks \
-- python -m otcore.mcp_server <graph>