import { E as Emitter, C as Callback } from '../../../emitter-kHxkUxco.js'; import { B as BaseAgent, a as BaseAgentRunOptions } from '../../../base-BjzyQ8k6.js'; import { GetRunContext } from '../../../context.js'; import { Message } from '../../../backend/message.js'; import { RePlanState } from './prompts.js'; import { BaseMemory } from '../../../memory/base.js'; import { UnconstrainedMemory } from '../../../memory/unconstrainedMemory.js'; import { AnyTool } from '../../../tools/base.js'; import { a as ChatModel } from '../../../chat-CfTNfR60.js'; import '../../../internals/types.js'; import '../../../internals/helpers/guards.js'; import '../../../internals/serializable.js'; import '../../../errors.js'; import '../../../internals/helpers/promise.js'; import 'ai'; import 'ajv'; import 'zod'; import '../../../template.js'; import 'promise-based-task'; import '../../../cache/base.js'; import '../../../internals/helpers/schema.js'; import 'zod-to-json-schema'; import '../../../backend/constants.js'; import '../../../logger/logger.js'; import 'pino'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ interface RePlanRunInput { prompt: string | null; } interface RePlanRunOutput { message: Message; intermediateMemory: BaseMemory; } interface RePlanToolCall { name: string; input: any; } interface RePlanEvents { update: Callback<{ state: RePlanState; }>; tool: Callback<{ type: "start"; tool: AnyTool; input: any; calls: RePlanToolCall[]; } | { type: "success"; tool: AnyTool; input: any; output: any; calls: RePlanToolCall[]; } | { type: "error"; tool: AnyTool; input: any; error: Error; calls: RePlanToolCall[]; }>; } interface Input { memory: BaseMemory; tools: AnyTool[]; llm: ChatModel; } declare class RePlanAgent extends BaseAgent { protected readonly input: Input; emitter: Emitter; constructor(input: Input); protected _run(input: RePlanRunInput, _options: BaseAgentRunOptions, context: GetRunContext): Promise; protected createRunner(context: GetRunContext): Promise<{ memory: UnconstrainedMemory; run: () => Promise; tools: (calls: RePlanToolCall[]) => Promise; }>; get memory(): BaseMemory; set memory(memory: BaseMemory); } export { RePlanAgent, type RePlanEvents, type RePlanRunInput, type RePlanRunOutput, type RePlanToolCall };