/**
 * Adapt the legacy `AgentSession` to the embedded-runtime contract
 * (`EmbeddedAgentRuntime`) so the CLI app can be driven through the
 * same RuntimeApi surface as web/worker hosts. This is the integration
 * seam between `app/` (legacy stack) and `core/` + `contracts/` (the new
 * embedded runtime). All state remains owned by `AgentSession`; this file
 * only exposes a subset of methods and resolves model/thinking-level
 * defaults consistently with how the CLI bootstrapped sessions previously.
 */
import type { Api, Model } from '../ai/types.js';
import { type EmbeddedAgentRuntime } from '../contracts/agent-api.js';
import type { AgentApprovalState } from '../contracts/agent-approval.js';
import type { AgentModelRegistry } from '../contracts/agent-model.js';
import type { RuntimeObservability } from '../contracts/agent-observability.js';
import type { ToolRegistry } from '../contracts/host-tool-registry.js';
import { type ThinkingLevel, type ToolDefinition } from '../core/index.js';
import type { RuntimePermissionPolicy } from '../core/permission-policy.js';
import type { AgentSessionSettingsStore } from './agent-session.js';
import { AgentSession, type FastModeDisabledReason } from './agent-session.js';
import type { ResourceLoader } from './resources/resource-loader.js';
import type { ProductSessionStore } from './session/session-store-types.js';
/** Per-kind LLM-tool options for the CLI app path. See CLI composition root. */
export type AppPerKindLlmOptions = Readonly<Record<string, Record<string, unknown>>>;
export interface RuntimeBudgetLimits {
    maxTokens?: number;
    maxToolUses?: number;
    maxTurns?: number;
}
export interface CreateAgentSessionRuntimeAdapterOptions {
    cwd: string;
    modelRegistry: AgentModelRegistry;
    resourceLoader: ResourceLoader;
    sessionManager: ProductSessionStore;
    settingsManager: AgentSessionSettingsStore;
    hostToolRegistry?: ToolRegistry;
    hostToolKinds?: readonly string[];
    hostToolLlmOptions?: AppPerKindLlmOptions;
    approvalState?: AgentApprovalState;
    budgetLimits?: RuntimeBudgetLimits;
    enableToolSummaries?: boolean;
    fastModeAllowed?: boolean;
    fastModeDisabledReason?: FastModeDisabledReason;
    modeName?: string;
    model?: Model<Api>;
    observability?: RuntimeObservability;
    permissionPolicy?: RuntimePermissionPolicy;
    prePromptContext?: () => Promise<{
        text: string;
        details?: unknown;
    } | null>;
    reloadTools?: () => Promise<{
        tools: ToolDefinition[];
        warnings: string[];
    }>;
    thinkingLevel?: ThinkingLevel;
    toolNames?: string[];
    tools?: ToolDefinition[];
}
export interface CreateAgentSessionRuntimeAdapterRuntimeResult {
    runtime: EmbeddedAgentRuntime;
}
export interface CreateAgentSessionRuntimeAdapterResult extends CreateAgentSessionRuntimeAdapterRuntimeResult {
    extensionsResult: ReturnType<ResourceLoader['getExtensions']>;
    modelFallbackMessage?: string;
    session: AgentSession;
}
export declare function createAgentSessionRuntimeAdapter(options: CreateAgentSessionRuntimeAdapterOptions): Promise<CreateAgentSessionRuntimeAdapterResult>;
//# sourceMappingURL=agent-session-runtime-adapter.d.ts.map