import { DestroyRef, InjectionToken } from '@angular/core';
import { ChatOpenAI, ChatOpenAICallOptions } from '@langchain/openai';
import { AnnotatedFunction, CopilotCommand, CopilotContext, CopilotContextParam } from '@metad/copilot';
import { ISelectOption } from '@metad/ocap-angular/core';
import { AgentExecutor } from 'langchain/agents';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
export declare const NgmCopilotContextToken: InjectionToken<NgmCopilotContextService>;
export declare class NgmCopilotContextService implements CopilotContext {
    #private;
    readonly destroyRef: DestroyRef;
    readonly parentContext?: NgmCopilotContextService;
    readonly children: import("@angular/core").WritableSignal<Set<NgmCopilotContextService>>;
    readonly commands: import("@angular/core").Signal<(CopilotCommand<any[]> & {
        llm?: ChatOpenAI<ChatOpenAICallOptions>;
        agentExecutor?: AgentExecutor;
    })[]>;
    /**
     * @deprecated use tools instead
     */
    readonly getFunctionCallHandler: import("@angular/core").Signal<import("@metad/copilot").FunctionCallHandler>;
    /**
     * @deprecated use tools instead
     */
    readonly getChatCompletionFunctionDescriptions: import("@angular/core").Signal<import("openai/resources").ChatCompletionCreateParams.Function[]>;
    /**
     * @deprecated use tools instead
     */
    readonly getGlobalFunctionDescriptions: import("@angular/core").Signal<import("openai/resources").ChatCompletionCreateParams.Function[]>;
    readonly cubes: import("@angular/core").WritableSignal<Observable<ISelectOption<{
        dataSource: string;
        serizalize: () => Promise<string>;
    }>[]>>;
    readonly items: import("@angular/core").Signal<Observable<{
        key: string;
        caption: string;
        uKey: string;
        serizalize: () => Promise<string>;
        value: {
            dataSource: string;
            serizalize: () => Promise<string>;
        };
    }[]>>;
    constructor();
    registerChild(child: NgmCopilotContextService): void;
    unregisterChild(child: NgmCopilotContextService): void;
    registerCommand(name: string, command: CopilotCommand | Promise<CopilotCommand>): Promise<void>;
    unregisterCommand(name: string): void;
    setEntryPoint(id: string, entryPoint: AnnotatedFunction<any[]>): void;
    removeEntryPoint(id: string): void;
    getEntryPoint(id: string): AnnotatedFunction<any[]>;
    /**
     * Find command by name or alias
     *
     * @param name Name or alias of command
     * @returns AI Command
     */
    getCommand(name: string): CopilotCommand<any[]>;
    getCommandWithContext(name: string): {
        command: CopilotCommand;
        context: CopilotContext;
    } | null;
    getContextItem(uKey: string): Promise<{
        key: string;
        caption: string;
        uKey: string;
        serizalize: () => Promise<string>;
        value: {
            dataSource: string;
            serizalize: () => Promise<string>;
        };
    }>;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgmCopilotContextService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<NgmCopilotContextService>;
}
export declare function recognizeContext(prompt: string, context: CopilotContext): Promise<string>;
export declare function recognizeContextParams(prompt: string, context: CopilotContext): Promise<CopilotContextParam[]>;
