🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
import type { AgentHookMatcher } from '@lobechat/types';
import { isRecord } from '@lobechat/utils/object';
/** Match the combined tool name; registration/restoration validates the regex first. */
export function matchesHook(matcher: AgentHookMatcher | undefined, event: unknown): boolean {
if (!matcher || matcher === '*') return true;
if (!isRecord(event) || typeof event.identifier !== 'string' || typeof event.apiName !== 'string')
return false;
return new RegExp(matcher).test(`${event.identifier}/${event.apiName}`);
}