import type { ExecutionProps as LlmzExecutionProps } from 'llmz/dist/llmz';
import { type ValueOrGetter, type Context as LlmzContext } from 'llmz';
import { Iteration as LlmzIteration, Tool as LlmzTool, Traces as _Traces, ThinkSignal as _ThinkSignal, SnapshotSignal as _SnapshotSignal, Citation as _Citation, CitationsManager as _CitationsManager, Component as LlmzComponent } from 'llmz';
import { Exit as LlmzExit, type ExitResult as LlmzExitResult } from 'llmz';
import { ObjectInstance as LlmzObject } from 'llmz';
import { CognitiveBeta } from '@botpress/cognitive';
import type { BaseKnowledge } from '../primitives/knowledge';
type Execute = typeof import('llmz').execute;
/**
 * Autonomous execution namespace for llmz-powered AI agents.
 * Provides type-safe, context-aware execution with OpenTelemetry instrumentation.
 */
export declare namespace Autonomous {
    type Model = Extract<Parameters<CognitiveBeta['generateText']>['0']['model'], string>;
    type Iteration = InstanceType<typeof LlmzIteration>;
    type ExecuteResult = Awaited<ReturnType<Execute>>;
    type Trace = _Traces.AbortTrace | _Traces.YieldTrace | _Traces.Comment | _Traces.Log | _Traces.ToolCall | _Traces.ToolSlow | _Traces.ThinkSignal | _Traces.PropertyMutation | _Traces.CodeExecution | _Traces.CodeExecutionException | _Traces.LLMCallStart | _Traces.LLMCallSuccess | _Traces.InvalidCodeExceptionTrace;
    type IterationController = Parameters<NonNullable<LlmzExecutionProps['onIterationEnd']>>[1];
    const Tool: typeof LlmzTool;
    type Tool = InstanceType<typeof Tool>;
    const Component: typeof LlmzComponent;
    type Component = InstanceType<typeof Component>;
    type Exit<T = unknown> = InstanceType<typeof LlmzExit<T>>;
    const Exit: typeof LlmzExit;
    type Object = InstanceType<typeof LlmzObject>;
    const Object: typeof LlmzObject;
    type Citation = _Citation;
    const ThinkSignal: typeof _ThinkSignal;
    const SnapshotSignal: typeof _SnapshotSignal;
    const CitationsManager: typeof _CitationsManager;
    const ListenExit: LlmzExit<unknown>;
    const ThinkExit: LlmzExit<unknown>;
    const DefaultExit: LlmzExit<{
        success: true;
        result?: any;
    } | {
        success: false;
        error: string;
    }>;
    type Hooks = {
        onBeforeTool?: (event: {
            iteration: Iteration;
            tool: InstanceType<typeof Autonomous.Tool>;
            input: any;
            controller: AbortController;
        }) => Promise<{
            input?: any;
        } | void>;
        onAfterTool?: (event: {
            iteration: Iteration;
            tool: InstanceType<typeof Autonomous.Tool>;
            input: any;
            output: any;
            controller: AbortController;
        }) => Promise<{
            output?: any;
        } | void>;
        onBeforeExecution?: (iteration: Iteration, controller: AbortController) => Promise<{
            code?: string;
        } | void>;
        onExit?: <T = unknown>(result: LlmzExitResult<T>) => Promise<void> | void;
        onTrace?: (props: {
            trace: Trace;
            iteration: number;
        }) => void;
        onIterationStart?: (iteration: Iteration, controller: AbortController, context: LlmzContext) => Promise<void | Partial<LlmzIteration>> | void | Partial<LlmzIteration>;
        onIterationEnd?: (iteration: Iteration, controller: IterationController) => void | Promise<void>;
    };
    type Props = {
        instructions: ValueOrGetter<string, LlmzContext>;
        tools?: ValueOrGetter<Autonomous.Tool[], LlmzContext>;
        objects?: ValueOrGetter<Autonomous.Object[], LlmzContext>;
        exits?: ValueOrGetter<Autonomous.Exit[], LlmzContext>;
        signal?: AbortSignal;
        hooks?: Hooks;
        temperature?: ValueOrGetter<number, LlmzContext>;
        model?: ValueOrGetter<Model | Model[], LlmzContext>;
        /**
         * The reasoning effort to use for models that support reasoning.
         * - "none": Disable reasoning (for models with optional reasoning)
         * - "low" | "medium" | "high": Fixed reasoning effort levels
         * - "dynamic": Let the provider automatically determine the reasoning effort
         * If not provided, the model will not use reasoning for models with optional reasoning.
         */
        reasoningEffort?: ValueOrGetter<'low' | 'medium' | 'high' | 'dynamic' | 'none', LlmzContext>;
        knowledge?: BaseKnowledge[];
        /** Maximum number of iterations (loops). Defaults to 10. */
        iterations?: number;
    };
    type PropsWithMode = Props & {
        mode?: 'chat' | 'worker';
    };
    type WorkerExecuteFn = (props: Autonomous.Props) => Promise<Autonomous.ExecuteResult>;
    type ConvoExecuteFn = (props: Autonomous.PropsWithMode) => Promise<Autonomous.ExecuteResult>;
    type FactoryOptions = {
        mode: 'chat' | 'worker';
        interruption?: AbortSignal;
        defaultModel: Model | Model[];
    };
    /**
     * Creates a knowledge base search tool for the given knowledge bases.
     */
    function createKnowledgeSearchTool(knowledgeBases: BaseKnowledge[]): InstanceType<typeof LlmzTool>;
}
export {};
//# sourceMappingURL=autonomous.d.ts.map