import { GetRunContext, RunContext } from './context.cjs'; import { b as AgentMeta, a as BaseAgent } from './base-CMzON_2C.cjs'; import { AnyTool } from './tools/base.cjs'; import { BaseMemory } from './memory/base.cjs'; import { ChatLLM, ChatLLMOutput } from './llms/chat.cjs'; import { E as Emitter } from './emitter-BWtGHYn0.cjs'; import { BeeRunOptions, BeeAgentRunIteration, BeeCallbacks, BeeParserInput, BeeMeta, BeeRunInput, BeeIterationToolResult, BeeAgentTemplates, BeeAgentExecutionConfig, BeeRunOutput } from './agents/bee/types.cjs'; import { LinePrefixParser } from './agents/parsers/linePrefix.cjs'; import { Serializable } from './internals/serializable.cjs'; import { RetryCounter } from './internals/helpers/counter.cjs'; interface BeeRunnerLLMInput { meta: BeeMeta; signal: AbortSignal; emitter: Emitter; } interface BeeRunnerToolInput { state: BeeIterationToolResult; meta: BeeMeta; signal: AbortSignal; emitter: Emitter; } declare abstract class BaseRunner extends Serializable { protected readonly input: BeeInput; protected readonly options: BeeRunOptions; protected readonly run: GetRunContext; memory: BaseMemory; readonly iterations: BeeAgentRunIteration[]; protected readonly failedAttemptsCounter: RetryCounter; constructor(input: BeeInput, options: BeeRunOptions, run: GetRunContext); createIteration(): Promise<{ emitter: Emitter; state: LinePrefixParser.infer; meta: BeeMeta; signal: AbortSignal; }>; init(input: BeeRunInput): Promise; abstract llm(input: BeeRunnerLLMInput): Promise; abstract tool(input: BeeRunnerToolInput): Promise<{ output: string; success: boolean; }>; abstract get defaultTemplates(): BeeAgentTemplates; get templates(): BeeAgentTemplates; protected abstract initMemory(input: BeeRunInput): Promise; createSnapshot(): { input: BeeInput; options: BeeRunOptions; memory: BaseMemory; failedAttemptsCounter: RetryCounter; }; loadSnapshot(snapshot: ReturnType): void; } type BeeTemplateFactory = (template: BeeAgentTemplates[K]) => BeeAgentTemplates[K]; interface BeeInput { llm: ChatLLM; tools: AnyTool[]; memory: BaseMemory; meta?: Omit; templates?: Partial<{ [K in keyof BeeAgentTemplates]: BeeAgentTemplates[K] | BeeTemplateFactory; }>; execution?: BeeAgentExecutionConfig; } declare class BeeAgent extends BaseAgent { protected readonly input: BeeInput; readonly emitter: Emitter; protected runner: new (...args: ConstructorParameters) => BaseRunner; constructor(input: BeeInput); set memory(memory: BaseMemory); get memory(): BaseMemory; get meta(): AgentMeta; protected _run(input: BeeRunInput, options: BeeRunOptions | undefined, run: GetRunContext): Promise; createSnapshot(): { input: BeeInput; emitter: Emitter; runner: new (input: BeeInput, options: BeeRunOptions, run: RunContext) => BaseRunner; isRunning: boolean; }; } export { type BeeInput as B, BeeAgent as a, BaseRunner as b, type BeeRunnerLLMInput as c, type BeeRunnerToolInput as d, type BeeTemplateFactory as e };