import type { AgentTool as KoiTool } from "@mariozechner/pi-agent-core";
import type { ImageContent } from "@mariozechner/pi-ai";
import type { ThinkLevel } from "../../auto-reply/thinking.js";
import type { SKYKOIConfig } from "../../config/config.js";
import type { CliBackendConfig } from "../../config/types.js";
import type { EmbeddedContextFile } from "../pi-embedded-helpers.js";
export declare function cleanupResumeProcesses(backend: CliBackendConfig, sessionId: string): Promise<void>;
/**
 * Cleanup suspended SKYKOI CLI processes that have accumulated.
 * Only cleans up if there are more than the threshold (default: 10).
 */
export declare function cleanupSuspendedCliProcesses(backend: CliBackendConfig, threshold?: number): Promise<void>;
export declare function enqueueCliRun<T>(key: string, task: () => Promise<T>): Promise<T>;
type CliUsage = {
    input?: number;
    output?: number;
    cacheRead?: number;
    cacheWrite?: number;
    total?: number;
};
export type CliOutput = {
    text: string;
    sessionId?: string;
    usage?: CliUsage;
};
export declare function buildSystemPrompt(params: {
    workspaceDir: string;
    config?: SKYKOIConfig;
    defaultThinkLevel?: ThinkLevel;
    extraSystemPrompt?: string;
    ownerNumbers?: string[];
    heartbeatPrompt?: string;
    docsPath?: string;
    tools: KoiTool[];
    contextFiles?: EmbeddedContextFile[];
    modelDisplay: string;
    koiId?: string;
}): string;
export declare function normalizeCliModel(modelId: string, backend: CliBackendConfig): string;
export declare function parseCliJson(raw: string, backend: CliBackendConfig): CliOutput | null;
export declare function parseCliJsonl(raw: string, backend: CliBackendConfig): CliOutput | null;
export declare function resolveSystemPromptUsage(params: {
    backend: CliBackendConfig;
    isNewSession: boolean;
    systemPrompt?: string;
}): string | null;
export declare function resolveSessionIdToSend(params: {
    backend: CliBackendConfig;
    cliSessionId?: string;
}): {
    sessionId?: string;
    isNew: boolean;
};
export declare function resolvePromptInput(params: {
    backend: CliBackendConfig;
    prompt: string;
}): {
    argsPrompt?: string;
    stdin?: string;
};
export declare function appendImagePathsToPrompt(prompt: string, paths: string[]): string;
export declare function writeCliImages(images: ImageContent[]): Promise<{
    paths: string[];
    cleanup: () => Promise<void>;
}>;
export declare function buildCliArgs(params: {
    backend: CliBackendConfig;
    baseArgs: string[];
    modelId: string;
    sessionId?: string;
    systemPrompt?: string | null;
    imagePaths?: string[];
    promptArg?: string;
    useResume: boolean;
}): string[];
export {};
