Skip to content

🤯 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.

506 B
Raw Blame
import { GoalSupervisorIdentifier } from '@lobechat/builtin-tool-goal';

import { GoalSupervisorTools } from '@/server/services/goal/supervisor/tools';

import type { ServerRuntimeRegistration } from './types';

export const goalSupervisorRuntime: ServerRuntimeRegistration = {
  identifier: GoalSupervisorIdentifier,
  factory: (context) => {
    if (!context.serverDB || !context.userId)
      throw new Error('Supervisor database context required');
    return new GoalSupervisorTools(context);
  },
};