MCPcopy Create free account
hub / github.com/Noumena-Network/code / clearRegisteredPluginHooks

Function clearRegisteredPluginHooks

src/bootstrap/state.ts:1462–1477  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1460}
1461
1462export function clearRegisteredPluginHooks(): void {
1463 if (!STATE.registeredHooks) {
1464 return
1465 }
1466
1467 const filtered: Partial<Record<HookEvent, RegisteredHookMatcher[]>> = {}
1468 for (const [event, matchers] of Object.entries(STATE.registeredHooks)) {
1469 // Keep only callback hooks (those without pluginRoot)
1470 const callbackHooks = matchers.filter(m => !('pluginRoot' in m))
1471 if (callbackHooks.length > 0) {
1472 filtered[event as HookEvent] = callbackHooks
1473 }
1474 }
1475
1476 STATE.registeredHooks = Object.keys(filtered).length > 0 ? filtered : null
1477}
1478
1479export function resetSdkInitState(): void {
1480 STATE.initJsonSchema = null

Callers 2

loadPluginHooks.tsFile · 0.85
pruneRemovedPluginHooksFunction · 0.85

Calls 2

entriesMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected