import { Requirement, Rule } from './requirement.js'; import { TargetType, MultiTargetType } from './utils.js'; import { AnyTool } from '../../../tools/base.js'; import { RunContext } from '../../../context.js'; import { R as RequirementAgentRunState } from '../../../types-DYtzF6ya.js'; import '../../../emitter-kHxkUxco.js'; import '../../../internals/types.js'; import '../../../internals/helpers/guards.js'; import '../../../internals/serializable.js'; import '../../../errors.js'; import '../../../internals/helpers/promise.js'; import 'ajv'; import 'promise-based-task'; import '../../../cache/base.js'; import '../../../internals/helpers/schema.js'; import 'zod'; import 'zod-to-json-schema'; import '../../../memory/base.js'; import '../../../backend/message.js'; import 'ai'; import '../../../template.js'; import '../../../chat-CfTNfR60.js'; import '../../../backend/constants.js'; import '../../../logger/logger.js'; import 'pino'; import '../../../base-BjzyQ8k6.js'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ interface ConditionalRequirementOptions { name?: string; forceAtStep?: number; onlyBefore?: MultiTargetType; onlyAfter?: MultiTargetType; forceAfter?: MultiTargetType; forcePreventStop?: boolean; minInvocations?: number; maxInvocations?: number; onlySuccessInvocations?: boolean; consecutiveAllowed?: boolean; priority?: number; customChecks?: ((state: RequirementAgentRunState) => boolean)[]; enabled?: boolean; reason?: string; } declare class ConditionalRequirement extends Requirement { protected source: TargetType; protected sourceTool?: AnyTool; protected before: Set; protected after: Set; protected forceAfterSet: Set; protected minInvocations: number; protected maxInvocations: number; protected forceAtStepValue?: number; protected onlySuccessInvocations: boolean; protected consecutiveAllowedValue: boolean; protected customChecks: ((state: RequirementAgentRunState) => boolean)[]; protected forcePreventStop: boolean; protected reason?: string; constructor(target: TargetType, options?: ConditionalRequirementOptions); protected checkInvariant(): void; init(tools: AnyTool[], ctx: RunContext): Promise; reset(): this; _run(state: RequirementAgentRunState, _: RunContext): Promise; clone(): Promise; } export { ConditionalRequirement, type ConditionalRequirementOptions };