import { UserInfo } from '@memberjunction/core';
import { PubSubEngine } from 'type-graphql';
import { UserPayload } from '../types.js';
export interface TaskDefinition {
    tempId: string;
    name: string;
    description: string;
    agentName: string;
    dependsOn: string[];
    inputPayload?: any;
}
export interface TaskGraphResponse {
    workflowName: string;
    tasks: TaskDefinition[];
    reasoning?: string;
}
export interface TaskExecutionResult {
    taskId: string;
    success: boolean;
    output?: any;
    error?: string;
}
export declare class TaskOrchestrator {
    private contextUser;
    private pubSub?;
    private sessionId?;
    private userPayload?;
    private createNotifications;
    private conversationDetailId?;
    private readonly JSON_ARTIFACT_TYPE_ID;
    private taskTypeId;
    constructor(contextUser: UserInfo, pubSub?: PubSubEngine, sessionId?: string, userPayload?: UserPayload, createNotifications?: boolean, conversationDetailId?: string);
    private ensureTaskType;
    createTasksFromGraph(taskGraph: TaskGraphResponse, conversationDetailId: string, environmentId: string): Promise<{
        parentTaskId: string;
        taskIdMap: Map<string, string>;
    }>;
    private publishTaskProgress;
    private publishAgentProgress;
    private findAgentByName;
    executeTasksForParent(parentTaskId: string): Promise<TaskExecutionResult[]>;
    private findEligibleTasks;
    private updateParentTaskProgress;
    private completeParentTask;
    private hasIncompleteDependencies;
    private loadTask;
    private executeTask;
    private extractInputPayload;
    private getDependentTaskOutputs;
    private buildConversationMessages;
    private extractAgentOutput;
    private createArtifactFromOutput;
    private createTaskGraphCompletionNotification;
}
//# sourceMappingURL=TaskOrchestrator.d.ts.map