/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { BaseDeclarativeTool, BaseToolInvocation, type ToolResult } from './tools.js';
import type { Config } from '../config/config.js';
import { SubagentOrchestrator } from '../core/subagentOrchestrator.js';
import type { SubagentSchedulerFactory } from '../core/subagentScheduler.js';
import type { SubagentManager } from '../config/subagentManager.js';
import type { ProfileManager } from '../config/profileManager.js';
import type { ToolRegistry } from './tool-registry.js';
export interface TaskToolParams {
    subagent_name?: string;
    subagentName?: string;
    goal_prompt?: string;
    goalPrompt?: string;
    behaviour_prompts?: string[];
    behavior_prompts?: string[];
    behaviourPrompts?: string[];
    behaviorPrompts?: string[];
    tool_whitelist?: string[];
    toolWhitelist?: string[];
    output_spec?: Record<string, string>;
    outputSpec?: Record<string, string>;
    context?: Record<string, unknown>;
    context_vars?: Record<string, unknown>;
    contextVars?: Record<string, unknown>;
}
interface TaskToolInvocationParams {
    subagentName: string;
    goalPrompt: string;
    behaviourPrompts: string[];
    toolWhitelist?: string[];
    outputSpec?: Record<string, string>;
    context: Record<string, unknown>;
}
export interface TaskToolDependencies {
    orchestratorFactory?: () => SubagentOrchestrator;
    profileManager?: ProfileManager;
    subagentManager?: SubagentManager;
    schedulerFactoryProvider?: () => SubagentSchedulerFactory | undefined;
    isInteractiveEnvironment?: () => boolean;
}
interface TaskToolInvocationDeps {
    createOrchestrator: () => SubagentOrchestrator;
    getToolRegistry?: () => ToolRegistry | undefined;
    getSchedulerFactory?: () => SubagentSchedulerFactory | undefined;
    isInteractiveEnvironment?: () => boolean;
}
declare class TaskToolInvocation extends BaseToolInvocation<TaskToolParams, ToolResult> {
    private readonly normalized;
    private readonly deps;
    constructor(params: TaskToolParams, normalized: TaskToolInvocationParams, deps: TaskToolInvocationDeps);
    getDescription(): string;
    private createLaunchRequest;
    execute(signal: AbortSignal, updateOutput?: (output: string) => void): Promise<ToolResult>;
    private isAbortError;
    private buildContextState;
    private createErrorResult;
    private createCancelledResult;
}
/**
 * Task tool that launches subagents via SubagentOrchestrator.
 *
 * @plan PLAN-20251029-SUBAGENTIC
 * @requirement REQ-SUBAGENTIC-001, REQ-SUBAGENTIC-002
 */
export declare class TaskTool extends BaseDeclarativeTool<TaskToolParams, ToolResult> {
    private readonly config;
    private readonly dependencies;
    static readonly Name = "task";
    constructor(config: Config, dependencies?: TaskToolDependencies);
    protected validateToolParamValues(params: TaskToolParams): string | null;
    protected createInvocation(params: TaskToolParams): TaskToolInvocation;
    private normalizeParams;
    private ensureOrchestrator;
}
export {};
