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 { type TrackedState } from '../tracked-state.js';
import { type TrackedTags } from '../tracked-tags.js';
import { RegisteredIntegration, RegisteredInterface } from '../../types.js';
import type { WorkflowStepContext } from '../../primitives/workflow-instance.js';
import { PromiseTracker } from './promises.js';
import { BotTags } from '../../_types/tags.js';
export type WorkflowControlContext = {
    workflow: Workflow;
    signal: AbortSignal;
    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> = {
    executionId: string;
    executionFinished: boolean;
    request: HttpRequest;
    botId: string;
    bot: {
        id: string;
        tags: BotTags;
        userId: string;
        configuration: Config;
    };
    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[];
    tags: TrackedTags[];
    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