import { CitationsManager } from 'llmz';
import { Conversation, User, Workflow } from '@botpress/client';
import { AnyIncomingEvent, AnyIncomingMessage, BaseBot, BotSpecificClient, BotLogger, BotOperation } from '@botpress/sdk/dist/bot';
import { Cognitive } from '@botpress/cognitive';
import { BotpressChat } from '../chat/chat.js';
import { HttpRequest } from './http.js';
import { TrackedState } from '../tracked-state.js';
import { RegisteredIntegration, RegisteredInterface } from '../../types.js';
import type { WorkflowStepContext } from '../../primitives/workflow-instance.js';
import { PromiseTracker } from './promises.js';
export type WorkflowControlContext = {
    workflow: Workflow;
    abort: () => void;
    fail: (reason: string) => void;
    aborted: boolean;
    failed: boolean;
    failedReason?: string;
    acked: boolean;
    ack: () => Promise<void>;
    restart: () => void;
    restarted: boolean;
};
export type BotContext<TBot extends BaseBot = BaseBot, Config = any> = {
    request: HttpRequest;
    botId: string;
    client: BotSpecificClient<TBot>;
    cognitive: Cognitive;
    logger: BotLogger;
    operation: BotOperation;
    configuration: Config;
    conversation?: Conversation;
    citations: CitationsManager;
    user?: User;
    event?: AnyIncomingEvent<TBot>;
    message?: AnyIncomingMessage<TBot>;
    workflow?: Workflow;
    workflowControlContext?: WorkflowControlContext;
    workflowStep?: WorkflowStepContext;
    interfaces?: RegisteredInterface[];
    integrations?: RegisteredIntegration[];
    chat?: BotpressChat;
    states: TrackedState[];
    runtime: {
        sandboxName: string;
        memoryInMb: number;
        getRemainingExecutionTimeInMs: () => number;
    };
    scheduledHeavyImports: Set<string>;
    promiseTracker: PromiseTracker;
};
export declare const context: {
    enterWith: (data: BotContext) => void;
    run: <TReturn>(data: BotContext, callback: () => TReturn) => TReturn;
    getAll: () => BotContext;
    get: <T extends keyof BotContext = keyof BotContext<BaseBot, any>>(key: T, opts?: {
        optional?: boolean;
    }) => Required<BotContext>[T];
    set: (key: keyof BotContext, value: any) => void;
};
//# sourceMappingURL=context.d.ts.map