import type { AgentRun, ActionId, AgentProfileSummary, ApproveThreadPlanResponse, ApprovalDecision, ApprovalGrantId, ApprovalGrantScope, ApprovalId, AskUserAnswers, ArchiveThreadResponse, CompactThreadRequest, CompactThreadResponse, ClearProjectMemoryResponse, DequeueTurnResponse, EnqueueTurnRequest, EnqueueTurnResponse, EventEnvelope, ExportThreadPlanResponse, ForkThreadRequest, ForkThreadResponse, GetThreadHandoffResponse, GetThreadDiagnosticsResponse, GetThreadPlanResponse, GetThreadResearchReportRequest, GetThreadResearchReportResponse, GetProjectMemoryResponse, GetThreadEventsRequest, GetThreadEventsResponse, GetThreadHistoryRequest, GetThreadHistoryResponse, GetThreadRequest, GetThreadResponse, ListThreadEvidenceRequest, ListThreadEvidenceResponse, HostedContributionDefinition, HostExecutionCapability, HostStatus, InterruptTurnResponse, ListApprovalGrantsResponse, ListThreadResearchEvidenceRequest, ListThreadResearchEvidenceResponse, ListQueuedTurnsResponse, ListSkillsResponse, ListToolsRequest, ListToolsResponse, ListThreadsRequest, ListThreadsResponse, PruneThreadScratchResponse, PurgeThreadResponse, ProviderConfig, QueuedTurnId, RevokeApprovalGrantResponse, PlanTodo, PhaseRoutingRole, PhaseRoutingStrategy, RenameThreadResponse, RespondActionResponse, ResumeThreadResponse, RejectThreadPlanResponse, RespondApprovalResponse, RunTurnRequest, RunTurnResponse, SteerTurnResponse, SetThreadModeRequest, SetThreadModeResponse, SetProjectMemoryResponse, StartThreadRequest, StartThreadResponse, ThreadId, ThreadMetadata, TurnId, UnarchiveThreadResponse, UpdateThreadMetadataResponse, UpdateThreadPlanTodosResponse } from "@best-agent/protocol";
import { type AgentProfileInput } from "../agent/profile-registry.js";
import type { ApprovalStore } from "../core/approval-store.js";
import { type ThreadStore } from "../core/thread-store.js";
import { type NarrativeSummarizer } from "../memory/thread-memory.js";
import { type HostedToolBridge, type InstalledSkill } from "../contribution/runtime-contribution.js";
import { type RuntimePolicy } from "../policy/runtime-policy.js";
import { type GuardianEvaluatorOptions } from "../policy/guardian-evaluator.js";
import { type ModelProvider } from "../provider/model-provider.js";
import { ToolRegistry } from "../tool/registry.js";
import type { AgentLoop } from "./agent-loop.js";
type Listener = (event: EventEnvelope) => void;
export interface AgentRuntimeOptions {
    agentProfiles?: AgentProfileInput[];
    approvalStore?: ApprovalStore;
    approvalTimeoutMs?: number;
    customLoops?: Record<string, AgentLoop>;
    cwd?: string;
    guardian?: GuardianEvaluatorOptions;
    hostCapability?: HostExecutionCapability;
    memory?: {
        contextTokenBudget?: number;
        narrativeSummarizer?: NarrativeSummarizer;
        recentItemLimit?: number;
        recentMessageLimit?: number;
    };
    policy?: RuntimePolicy;
    phaseRouting?: PhaseRoutingStrategy;
    provider?: ModelProvider;
    providerConfig?: ProviderConfig;
    routingProviders?: Partial<Record<PhaseRoutingRole, ModelProvider>>;
    skills?: InstalledSkill[];
    store?: ThreadStore;
    storageRoot?: string;
    teamMemory?: {
        debounceMs?: number;
        token?: string;
        url?: string;
    };
    tools?: ToolRegistry;
    verdictClosureMode?: "heuristic" | "kernel";
    webSearchAvailability?: () => boolean;
    webSearch?: (input: {
        domains?: string[];
        limit: number;
        query: string;
        recencyDays?: number;
    }) => Promise<string>;
}
export declare class AgentRuntime {
    #private;
    constructor(options?: AgentRuntimeOptions);
    subscribe(listener: Listener): () => void;
    close(): Promise<void>;
    startThread(input?: StartThreadRequest): Promise<StartThreadResponse>;
    setThreadMode(input: SetThreadModeRequest): Promise<SetThreadModeResponse>;
    renameThread(threadId: ThreadId, title: string): Promise<RenameThreadResponse>;
    updateThreadMetadata(threadId: ThreadId, metadata: ThreadMetadata): Promise<UpdateThreadMetadataResponse>;
    getProviderConfig(): ProviderConfig | undefined;
    getProjectMemory(): GetProjectMemoryResponse;
    setProjectMemory(content: string): SetProjectMemoryResponse;
    clearProjectMemory(): ClearProjectMemoryResponse;
    setProviderConfig(providerConfig?: ProviderConfig): void;
    listAgentProfiles(): {
        profiles: AgentProfileSummary[];
    };
    listSkills(): ListSkillsResponse;
    listTools(input?: ListToolsRequest): Promise<ListToolsResponse>;
    installHostedContributions(contributions: HostedContributionDefinition[], bridge: HostedToolBridge): void;
    removeHostedContributions(contributionNames: string[]): string[];
    listThreads(input?: ListThreadsRequest): Promise<ListThreadsResponse>;
    listApprovalGrants(): Promise<ListApprovalGrantsResponse>;
    getThread(input: GetThreadRequest): Promise<GetThreadResponse>;
    getThreadPlan(threadId: ThreadId): Promise<GetThreadPlanResponse>;
    approveThreadPlan(threadId: ThreadId): Promise<ApproveThreadPlanResponse>;
    rejectThreadPlan(threadId: ThreadId): Promise<RejectThreadPlanResponse>;
    exportThreadPlan(threadId: ThreadId): Promise<ExportThreadPlanResponse>;
    updateThreadPlanTodos(threadId: ThreadId, todos: PlanTodo[]): Promise<UpdateThreadPlanTodosResponse>;
    forkThread(input: ForkThreadRequest): Promise<ForkThreadResponse>;
    getThreadHistory(input: GetThreadHistoryRequest): Promise<GetThreadHistoryResponse>;
    getThreadEvents(input: GetThreadEventsRequest): Promise<GetThreadEventsResponse>;
    getThreadHandoff(threadId: ThreadId): Promise<GetThreadHandoffResponse>;
    getThreadDiagnostics(threadId: ThreadId): Promise<GetThreadDiagnosticsResponse>;
    getHostStatus(): Promise<{
        host: HostStatus;
    }>;
    getThreadResearchReport(input: GetThreadResearchReportRequest): Promise<GetThreadResearchReportResponse>;
    listThreadResearchEvidence(input: ListThreadResearchEvidenceRequest): Promise<ListThreadResearchEvidenceResponse>;
    listThreadEvidence(input: ListThreadEvidenceRequest): Promise<ListThreadEvidenceResponse>;
    compactThread(input: CompactThreadRequest): Promise<CompactThreadResponse>;
    resumeThread(threadId: ThreadId, options?: Readonly<{
        itemLimit?: number;
    }>): Promise<ResumeThreadResponse>;
    runTurn(input: RunTurnRequest): Promise<RunTurnResponse>;
    interruptTurn(threadId: ThreadId, turnId: TurnId): Promise<InterruptTurnResponse>;
    markTurnAttached(threadId: ThreadId, turnId: TurnId): Promise<AgentRun | undefined>;
    markTurnDetached(threadId: ThreadId, turnId: TurnId): Promise<AgentRun | undefined>;
    enqueueTurn(input: EnqueueTurnRequest): Promise<EnqueueTurnResponse>;
    listQueuedTurns(threadId: ThreadId): Promise<ListQueuedTurnsResponse>;
    dequeueTurn(threadId: ThreadId, queuedTurnId: QueuedTurnId): Promise<DequeueTurnResponse>;
    steerTurn(threadId: ThreadId, turnId: TurnId, prompt: string): Promise<SteerTurnResponse>;
    respondToApproval(approvalId: ApprovalId, decision: ApprovalDecision): Promise<RespondApprovalResponse>;
    respondToAction(actionId: ActionId, answers: AskUserAnswers): Promise<RespondActionResponse>;
    respondToApprovalWithScope(approvalId: ApprovalId, decision: ApprovalDecision, scope: ApprovalGrantScope): Promise<RespondApprovalResponse>;
    revokeApprovalGrant(grantId: ApprovalGrantId): Promise<RevokeApprovalGrantResponse>;
    archiveThread(threadId: ThreadId): Promise<ArchiveThreadResponse>;
    unarchiveThread(threadId: ThreadId): Promise<UnarchiveThreadResponse>;
    purgeThread(threadId: ThreadId): Promise<PurgeThreadResponse>;
    pruneThreadScratch(threadId: ThreadId): Promise<PruneThreadScratchResponse>;
    getThreadPaths(threadId: ThreadId): import("../core/thread-store.js").ThreadPaths;
}
export {};
//# sourceMappingURL=agent-runtime.d.ts.map