/** * Local agent helpers — plain functions, no class. * * Three responsibilities extracted from PSAgent so the class stays lean: * 1. buildLocalAgent — construct an agent-core Agent from PSAgentLocalConfig * 2. convertTools — map PSAgentTool[] → agent-core tool descriptors * 3. executeLocalAgent — bridge a local Agent run into an A2A event bus * * Nothing here is exported from the public barrel. Consumers interact with * local mode exclusively through PSAgent's public API. */ import type { ExecutionEventBus, RequestContext } from '@a2a-js/sdk/server'; import type { PSAgentLocalConfig } from './PSAgentConfig'; import type { IStreamLogger } from './PSAgentLogger'; import type { IPSAgentToolRunOptions, PSAgentTool } from './PSAgentTool'; import { Agent } from './agent-core/src/agent.js'; /** * Maps PSAgentTool[] into the tool descriptor shape expected by agent-core. */ export declare function convertTools(tools: PSAgentTool[], log?: IStreamLogger, options?: IPSAgentToolRunOptions): any[]; export declare function buildLocalAgent(config: PSAgentLocalConfig, getBaseUrl: (service?: 'agents' | 'events' | 'llmtrack' | 'llm') => string, getTools: () => PSAgentTool[], log?: IStreamLogger): Agent; /** * Bridges a local Agent run into an A2A ExecutionEventBus. * Called from PSAgent.execute() when local: true. */ export declare function executeLocalAgent(agent: Agent, requestContext: RequestContext, eventBus: ExecutionEventBus, cancelledTasks: Set, agentName: string, log?: IStreamLogger): Promise;