import { type EphemeralProcedurePlan } from "./ephemeralProcedure.js";
import { type ProviderToolNameMapping, type ProviderToolSchemaFamily } from "../../agent_modelAdapter/bridgingLayer/toolSchemaCompatibilityLayer.js";
export type ModelDecisionKind = "finalOutput" | "toolCall" | "ephemeralProcedurePlan" | "requestApproval" | "continue" | "fail";
export type ModelDecisionToolCall = {
    callId: string;
    toolId: string;
    providerToolName?: string;
    arguments: Readonly<Record<string, unknown>>;
};
export type ModelDecisionToolContextExpansion = {
    targetKind: "family" | "group" | "tool";
    family?: string;
    group?: string;
    toolId?: string;
    reason?: string;
};
export type ModelDecisionFailure = {
    code: string;
    message: string;
    publicSafe: true;
};
export type ModelDecision = {
    decisionId: string;
    kind: ModelDecisionKind;
    finalOutput?: string;
    preambleText?: string;
    toolCall?: ModelDecisionToolCall;
    ephemeralProcedurePlan?: EphemeralProcedurePlan;
    toolContextExpansion?: ModelDecisionToolContextExpansion;
    approvalRequest?: {
        reason: string;
        requestedScopes: readonly string[];
        riskLevel?: string;
    };
    failure?: ModelDecisionFailure;
    providerRawRef?: string;
    observationRefs: readonly string[];
    metadata: Readonly<Record<string, unknown>>;
};
export type ProviderToolMapping = ProviderToolNameMapping;
export type ModelDecisionInterpretRequest = {
    raw: unknown;
    sessionId: string;
    turnIndex: number;
    providerToolMappings?: readonly ProviderToolMapping[];
    providerFamily?: ProviderToolSchemaFamily;
    providerRawRef?: string;
};
export type ModelDecisionInterpretResult = {
    ok: true;
    decisions: readonly ModelDecision[];
    events: readonly string[];
} | {
    ok: false;
    error: {
        code: "MISSING_SESSION_ID" | "MISSING_RAW" | "INVALID_EPHEMERAL_PROCEDURE";
        message: string;
        publicSafe: true;
    };
    events: readonly string[];
};
export declare function interpretModelDecision(request: ModelDecisionInterpretRequest): ModelDecisionInterpretResult;
