import { MiddlewareType, Run, GetRunContext } from './context.js'; import { FrameworkError } from './errors.js'; import { Serializable } from './internals/serializable.js'; import { E as Emitter } from './emitter-kHxkUxco.js'; import { BaseMemory } from './memory/base.js'; import { OmitEmpty } from './internals/types.js'; import { AnyTool } from './tools/base.js'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ interface AgentMeta { name: string; description: string; extraDescription?: string; tools: AnyTool[]; } type AgentCallbackValue = { data?: never; error: Error; } | { data: unknown; error?: never; } | object; type InternalAgentCallbackValue> = OmitEmpty & E; type PublicAgentCallbackValue = OmitEmpty; type AgentCallback = (value: T) => void; type GetAgentInput = T extends BaseAgent ? X : never; type GetAgentOutput = T extends BaseAgent ? X : never; type AnyAgent = BaseAgent; declare class AgentError extends FrameworkError { } interface BaseAgentRunOptions { signal?: AbortSignal; } declare abstract class BaseAgent extends Serializable { protected isRunning: boolean; abstract readonly emitter: Emitter; readonly middlewares: MiddlewareType[]; run(...[input, options]: Partial extends TOptions ? [input: TInput, options?: TOptions] : [input: TInput, options: TOptions]): Run; protected abstract _run(input: TInput, options: TOptions, run: GetRunContext): Promise; destroy(): void; abstract set memory(memory: BaseMemory); abstract get memory(): BaseMemory; get meta(): AgentMeta; createSnapshot(): { isRunning: boolean; emitter: Emitter; middlewares: MiddlewareType[]; }; loadSnapshot(snapshot: ReturnType): void; } export { AgentError as A, BaseAgent as B, type GetAgentInput as G, type InternalAgentCallbackValue as I, type PublicAgentCallbackValue as P, type BaseAgentRunOptions as a, type AnyAgent as b, type AgentMeta as c, type AgentCallback as d, type AgentCallbackValue as e, type GetAgentOutput as f };