/**
 * Task-agent framework discovery and preference resolution.
 *
 * Detects installed CLIs, available auth, and Eliza subscription preferences so
 * the orchestrator can choose the best framework when the caller does not
 * specify one explicitly.
 *
 * @module services/task-agent-frameworks
 */
import type { IAgentRuntime } from "@elizaos/core";
import type { PreflightResult } from "coding-agent-adapters";
import type { AgentMetrics } from "./agent-metrics.ts";
export type SupportedTaskAgentAdapter = "claude" | "codex" | "gemini" | "aider";
export type TaskAgentFrameworkId = SupportedTaskAgentAdapter | "pi";
export interface TaskAgentFrameworkAvailability {
    id: TaskAgentFrameworkId;
    label: string;
    installed: boolean;
    authReady: boolean;
    subscriptionReady: boolean;
    temporarilyDisabled: boolean;
    temporarilyDisabledUntil?: number;
    temporarilyDisabledReason?: string;
    recommended: boolean;
    reason: string;
    installCommand?: string;
    docsUrl?: string;
    selectionScore?: number;
    selectionSignals?: Record<string, number>;
}
export interface PreferredTaskAgent {
    id: TaskAgentFrameworkId;
    reason: string;
}
export interface TaskAgentFrameworkState {
    configuredSubscriptionProvider?: string;
    frameworks: TaskAgentFrameworkAvailability[];
    preferred: PreferredTaskAgent;
}
export interface TaskAgentFrameworkProbe {
    checkAvailableAgents?: (types?: SupportedTaskAgentAdapter[]) => Promise<PreflightResult[]>;
    getAgentMetrics?: () => Record<string, Omit<AgentMetrics, "totalCompletionMs">>;
}
export type TaskAgentTaskKind = "coding" | "research" | "planning" | "ops" | "mixed";
export interface TaskAgentTaskProfileInput {
    task?: string;
    repo?: string;
    workdir?: string;
    threadKind?: TaskAgentTaskKind;
    subtaskCount?: number;
    acceptanceCriteria?: string[];
}
export interface TaskAgentTaskProfile {
    text: string;
    kind: TaskAgentTaskKind;
    subtaskCount: number;
    repoPresent: boolean;
    signals: {
        implementation: number;
        research: number;
        planning: number;
        ops: number;
        verification: number;
        coordination: number;
        repoWork: number;
        fastIteration: number;
    };
}
declare const FRAMEWORK_LABELS: Record<TaskAgentFrameworkId, string>;
export declare function getTaskAgentFrameworkState(runtime: IAgentRuntime, probe?: TaskAgentFrameworkProbe, profileInput?: TaskAgentTaskProfileInput): Promise<TaskAgentFrameworkState>;
export declare function buildTaskAgentTaskProfile(input?: TaskAgentTaskProfileInput): TaskAgentTaskProfile;
export declare function clearTaskAgentFrameworkStateCache(): void;
export declare function isUsageExhaustedTaskAgentError(text: string): boolean;
export declare function markTaskAgentFrameworkUnavailable(id: SupportedTaskAgentAdapter, reason: string, cooldownMs?: number): void;
export declare function markTaskAgentFrameworkHealthy(id: SupportedTaskAgentAdapter): void;
export declare function formatTaskAgentFrameworkLine(framework: TaskAgentFrameworkAvailability): string;
export declare function looksLikeTaskAgentRequest(text: string): boolean;
export declare function formatTaskAgentStatus(status: string): string;
export declare function truncateTaskAgentText(text: string, max?: number): string;
export declare function rewriteTaskAgentText(text: string): string;
export { FRAMEWORK_LABELS as TASK_AGENT_FRAMEWORK_LABELS };
//# sourceMappingURL=task-agent-frameworks.d.ts.map