/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import { DirectoryScanner, DirectoryScannerOptions, FileDescriptor } from './scanner'; import { AIManager } from '../ai-manager'; import { LoadAndRegister } from './types'; import { Logger } from '@nocobase/logger'; import { SkillsScope } from '../skills-manager'; export type SkillsLoaderOptions = { pluginName: string; scan: DirectoryScannerOptions; log?: Logger; }; export declare class SkillsLoader extends LoadAndRegister { protected readonly ai: AIManager; protected readonly options: SkillsLoaderOptions; protected readonly scanner: DirectoryScanner; protected files: FileDescriptor[]; protected skillsDescriptors: SkillsDescriptor[]; protected log: Logger; constructor(ai: AIManager, options: SkillsLoaderOptions); protected scan(): Promise; protected import(): Promise; protected register(): Promise; } export type SkillsDescriptor = { scope: SkillsScope; name: string; description: string; content: string; skillsFile: FileDescriptor; skillsDir: FileDescriptor; tools?: string[]; introduction?: { title: string; about?: string; }; };