UNPKG

@hashgraphonline/standards-agent-kit

Version:

A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication.

39 lines (38 loc) 1.41 kB
import { PluginContext, IPlugin } from './PluginInterface'; /** * Configuration for loading a plugin */ export interface PluginLoadOptions { /** * Whether to initialize the plugin after loading * @default true */ initialize?: boolean; } /** * Utility for loading plugins from different sources */ export declare class PluginLoader { /** * Load a plugin from a directory * @param directory Path to the directory containing the plugin * @param context Context to provide to the plugin during initialization * @param options Options for loading the plugin * @returns The loaded plugin instance */ static loadFromDirectory(directory: string, context: PluginContext, options?: PluginLoadOptions): Promise<IPlugin>; /** * Load a plugin from an npm package * @param packageName Name of the npm package containing the plugin * @param context Context to provide to the plugin during initialization * @param options Options for loading the plugin * @returns The loaded plugin instance */ static loadFromPackage(packageName: string, context: PluginContext, options?: PluginLoadOptions): Promise<IPlugin>; /** * Check if an object implements the IPlugin interface * @param obj Object to check * @returns true if the object implements IPlugin, false otherwise */ private static isValidPlugin; }