import type { ToolContext } from "@opencode-ai/plugin";
import { type SeedModelRoute } from "../../features/model-routing/index.js";
import { type SeedSkillRecommendation } from "../../features/skill-loader/index.js";
import type { AgentModelAttempt, RunStore } from "../../features/run-state/index.js";
import { type SeedTeamMember } from "../../features/team-mode/index.js";
export type DelegationMode = "sync" | "background" | "followup";
export type DelegateArgs = {
    run_id?: string;
    target_agent: string;
    task_id?: string;
    prompt: string;
    prompt_summary?: string;
    idempotency_key?: string;
    skills?: string[];
    auto_skills?: boolean;
};
export type DelegationLaunchInput = {
    parentSessionId: string;
    targetAgent: string;
    openCodeAgent?: string;
    prompt: string;
    promptSummary: string;
    mode: DelegationMode;
    modelRoute: SeedModelRoute;
    sessionTools?: Record<string, boolean>;
};
export type DelegationLaunchResult = {
    sessionId: string;
    output?: string;
    tokenUsage?: Record<string, unknown>;
    resolvedModel?: string;
    modelAttempts: AgentModelAttempt[];
};
export type RegisterBackgroundDelegationInput = {
    runId: string;
    backgroundId: string;
    startedAt: string;
    sessionId: string;
    parentSessionId: string;
    agentCallId: string;
    targetAgent: string;
    taskId?: string;
    title: string;
    ownerThreadId?: string;
    helperId?: string;
};
export type DelegationRuntime = {
    launchOpenCodeDelegation(input: DelegationLaunchInput): Promise<DelegationLaunchResult>;
    registerBackgroundDelegation(input: RegisterBackgroundDelegationInput): Promise<void>;
};
export declare function executeDelegate(store: RunStore, args: DelegateArgs, context: ToolContext, mode: "sync" | "background", runtime: DelegationRuntime): Promise<{
    title: string;
    output: string;
    metadata: Record<string, unknown>;
}>;
export declare function sessionToolsForTeamMember(member: SeedTeamMember): Record<string, boolean>;
export declare function compactSkillRecommendation(recommendation: SeedSkillRecommendation): Record<string, unknown>;
