import type { LanguageCode } from '@longrun-ai/kernel/types/language';
import { Dialog } from '../../dialog';
import type { Team } from '../../team';
import type { Tool } from '../../tool';
import type { ChatMessage } from '../client';
export type KernelDriverTellaskPolicy = 'allow_any' | 'deny_all';
export type KernelDriverPolicyMode = 'default' | 'fbr_toolless' | 'fbr_conclusion_only';
export type KernelDriverPolicyState = Readonly<{
    mode: KernelDriverPolicyMode;
    effectiveAgent: Team.Member;
    effectiveSystemPrompt: string;
    effectiveAgentTools: readonly Tool[];
    prependedContextMessages: readonly ChatMessage[];
    tellaskPolicy: KernelDriverTellaskPolicy;
    allowTellaskFunctions: boolean;
    allowFunctionCalls: boolean;
}>;
export type KernelDriverPolicyViolationKind = 'tellask' | 'tool' | 'tellask_and_tool';
export declare function mergeModelParams(base: Team.ModelParams | undefined, overlay: Team.ModelParams | undefined): Team.ModelParams | undefined;
export declare function buildKernelDriverPolicy(args: {
    dlg: Dialog;
    agent: Team.Member;
    systemPrompt: string;
    agentTools: readonly Tool[];
    language: LanguageCode;
}): KernelDriverPolicyState;
export declare function validateKernelDriverPolicyInvariants(policy: KernelDriverPolicyState, language: LanguageCode): {
    ok: true;
} | {
    ok: false;
    detail: string;
};
export declare function resolveKernelDriverPolicyViolationKind(args: {
    policy: KernelDriverPolicyState;
    tellaskCallCount: number;
    functionCallCount: number;
}): KernelDriverPolicyViolationKind | null;
