/** * RuvBot - Self-learning AI Assistant with RuVector Backend * * Main entry point for the RuvBot framework. * Combines Clawdbot-style personal AI with RuVector's WASM vector operations. */ import { EventEmitter } from 'eventemitter3'; import { type BotConfig } from './core/BotConfig.js'; import { type BotStatus } from './core/BotState.js'; import type { Agent, AgentConfig, Session, Message } from './core/types.js'; type BotState = BotStatus; export interface RuvBotOptions { config?: Partial; configPath?: string; autoStart?: boolean; } export interface RuvBotEvents { ready: () => void; shutdown: () => void; error: (error: Error) => void; message: (message: Message, session: Session) => void; 'agent:spawn': (agent: Agent) => void; 'agent:stop': (agentId: string) => void; 'session:create': (session: Session) => void; 'session:end': (sessionId: string) => void; 'memory:store': (entryId: string) => void; 'skill:invoke': (skillName: string, params: Record) => void; } export declare class RuvBot extends EventEmitter { private readonly id; private readonly configManager; private readonly stateManager; private readonly logger; private agents; private sessions; private isRunning; private startTime?; private llmProvider; private httpServer; constructor(options?: RuvBotOptions); /** * Start the bot and all configured services */ start(): Promise; /** * Stop the bot and cleanup resources */ stop(): Promise; /** * Spawn a new agent with the given configuration */ spawnAgent(config: AgentConfig): Promise; /** * Stop an agent by ID */ stopAgent(agentId: string): Promise; /** * Get an agent by ID */ getAgent(agentId: string): Agent | undefined; /** * List all active agents */ listAgents(): Agent[]; /** * Create a new session for an agent */ createSession(agentId: string, options?: { userId?: string; channelId?: string; platform?: Session['platform']; metadata?: Record; }): Promise; /** * End a session by ID */ endSession(sessionId: string): Promise; /** * Get a session by ID */ getSession(sessionId: string): Session | undefined; /** * List all active sessions */ listSessions(): Session[]; /** * Send a message to an agent in a session */ chat(sessionId: string, content: string, options?: { userId?: string; attachments?: Message['attachments']; metadata?: Message['metadata']; }): Promise; /** * Get the current bot status */ getStatus(): { id: string; name: string; state: BotState; isRunning: boolean; uptime?: number; agents: number; sessions: number; }; /** * Get the current configuration */ getConfig(): Readonly; private initializeServices; private startIntegrations; private stopIntegrations; private startApiServer; private stopApiServer; private handleApiRequest; private parseRequestBody; private generateResponse; } /** * Create a new RuvBot instance */ export declare function createRuvBot(options?: RuvBotOptions): RuvBot; /** * Create a RuvBot instance from environment variables */ export declare function createRuvBotFromEnv(): RuvBot; export default RuvBot; //# sourceMappingURL=RuvBot.d.ts.map