import type { TaskRunner } from "../contracts/orchestration.js";
import { type OmkRuntimeScope } from "../util/resource-profile.js";
export declare function isSecretLikeKimiEnvKey(key: string): boolean;
export interface KimiChildEnvOptions {
    warnExplicitSecrets?: boolean;
    explicitEnvContext?: string;
    onWarning?: (message: string) => void;
}
export declare function buildSafeKimiChildEnv(inheritedEnv?: Record<string, string | undefined>, explicitEnv?: Record<string, string | undefined>, forcedEnv?: Record<string, string | undefined>, options?: KimiChildEnvOptions): Record<string, string>;
export declare function parseKimiLaunchMeta(args: readonly string[], env?: Record<string, string | undefined>, cwd?: string): {
    directory: string;
    session?: string;
    model?: string;
};
export type KimiProviderFailureKind = "monthly-quota" | "rate-limit" | "provider";
export interface KimiProviderFailureDiagnosis {
    kind: KimiProviderFailureKind;
    title: string;
    remediation: string[];
}
export declare function classifyKimiProviderFailure(output: string): KimiProviderFailureDiagnosis | null;
export declare function formatKimiProviderFailureHint(output: string): string | null;
export type KimiMcpFailurePolicy = "required-only" | "strict";
export declare function shouldFailOnMcpError(input: {
    readonly serverName: string;
    readonly requiredServers: readonly string[];
    readonly failurePolicy: KimiMcpFailurePolicy;
}): boolean;
export declare function extractKimiMcpConnectionFailureNames(output: string): string[];
export interface KimiStartupExitDiagnosis {
    elapsedMs: number;
    thresholdMs: number;
    message: string;
}
export declare function resolveKimiStartupTimeoutMs(env: Record<string, string | undefined>): number;
export declare function isKimiStartupReadyData(data: string): boolean;
export declare function classifyKimiStartupExit(exitCode: number, elapsedMs: number, env?: Record<string, string | undefined>): KimiStartupExitDiagnosis | null;
export declare function runKimiInteractive(args: string[], options?: {
    cwd?: string;
    env?: Record<string, string>;
    onMeta?: (meta: {
        directory?: string;
        session?: string;
        model?: string;
    }) => void;
    onKimiMeta?: (meta: {
        directory?: string;
        session?: string;
        model?: string;
    }) => void;
    onData?: (data: string) => void;
}): Promise<number>;
export interface KimiTaskRunnerOptions {
    cwd?: string;
    timeout?: number;
    env?: Record<string, string>;
    agentFile?: string;
    promptPrefix?: string;
    mcpScope?: OmkRuntimeScope;
    skillsScope?: OmkRuntimeScope;
    hooksScope?: OmkRuntimeScope;
    mcpNames?: string[];
    skillNames?: string[];
    hookNames?: string[];
    toolNames?: string[];
    onThinking?: (thinking: string) => void;
    /** If true, automatically pick .omk/agents/{role}.yaml per node role */
    roleAgentFiles?: boolean;
    contextWindow?: number;
    reservedOutputTokens?: number;
    safetyMarginTokens?: number;
}
export declare function resolveAgentFileForRole(role: string, fallback?: string): Promise<string | undefined>;
export declare function createKimiTaskRunner(options?: KimiTaskRunnerOptions): TaskRunner;
