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

Function hookDedupKey

src/utils/hooks.ts:1457–1459  ·  view source on GitHub ↗

* Build a dedup key for a matched hook, namespaced by source context. * * Settings-file hooks (no pluginRoot/skillRoot) share the '' prefix so the * same command defined in user/project/local still collapses to one — the * original intent of the dedup. Plugin/skill hooks get their root as the *

(m: MatchedHook, payload: string)

Source from the content-addressed store, hash-verified

1455 * template don't collapse: after expansion they point to different files.
1456 */
1457function hookDedupKey(m: MatchedHook, payload: string): string {
1458 return `${m.pluginRoot ?? m.skillRoot ?? ''}\0${payload}`
1459}
1460
1461/**
1462 * Build a map of {sanitizedPluginName: hookCount} from matched hooks.

Callers 1

getMatchingHooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected