UNPKG

hataraku

Version:

An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.

64 lines (63 loc) 2.24 kB
import { AgentConfig } from './agent-config'; /** * Manager for agent configurations * Handles CRUD operations for agent configurations stored in the agents directory */ export declare class AgentManager { private agentsDir; private toolManager; constructor(); /** * List all available agent configurations * @returns Array of agent configuration names */ listAgents(): Promise<string[]>; /** * Get a specific agent configuration * @param name Agent configuration name * @returns Agent configuration object * @throws Error if agent configuration not found or invalid */ getAgent(name: string): Promise<AgentConfig>; /** * Create a new agent configuration * @param name Agent configuration name * @param config Agent configuration object * @throws Error if agent configuration already exists or is invalid */ createAgent(name: string, config: AgentConfig): Promise<void>; /** * Update an existing agent configuration * @param name Agent configuration name * @param updates Agent configuration updates * @throws Error if agent configuration not found or is invalid */ updateAgent(name: string, updates: Partial<AgentConfig>): Promise<void>; /** * Delete an agent configuration * @param name Agent configuration name * @throws Error if agent configuration not found */ deleteAgent(name: string): Promise<void>; /** * Validate tool references in an agent configuration * @param tools Array of tool names * @throws Error if a referenced tool doesn't exist (except for 'hataraku') */ private validateToolReferences; /** * Initialize default agent configurations * Creates default agent configurations if they don't exist */ initializeDefaults(): Promise<void>; /** * Resolve tool references for an agent * Converts tool references to actual tool configurations * @param name Agent name * @returns Agent with resolved tool configurations * @throws Error if agent configuration not found */ resolveAgentTools(name: string): Promise<AgentConfig & { resolvedTools: string[]; }>; }