import type { IChatClient } from '../core/chatClient';
import { type QueryLoopDeps } from '../core/queryLoop';
import { PermissionEngine } from '../permissions/engine';
import { SessionStorage } from '../persistence/sessionStorage';
import type { LoopConfig, LoopEvent, PermissionMode, Tool } from '../types';
import type { Message } from 'ollama';
declare const app: import("express-serve-static-core").Express;
type QueryLoopRunner = (config: LoopConfig, deps: QueryLoopDeps, initialMessages: Message[]) => AsyncGenerator<LoopEvent>;
interface WebRuntimeDeps {
    createClient(model: string, host: string, numCtx?: number): IChatClient;
    getModelContextWindow(model: string, host: string): Promise<number | null>;
    listModels(host: string): Promise<string[]>;
    getTools(): Tool[];
    createPermissionEngine(mode: PermissionMode): PermissionEngine;
    createSession(projectDir: string, model: string): SessionStorage;
    startNewSession(): void;
    getEvolvedPrompt(basePrompt: string): Promise<string>;
    assembleSystemContext(input: {
        systemPrompt: string;
        projectDir: string;
        skillsDir: string;
        recallProjectDir?: string;
        recallQuery?: string;
        ragProjectDir?: string;
        ragQuery?: string;
        ragOllamaHost?: string;
        palaceProjectDir?: string;
        sessionSearchProjectDir?: string;
        sessionSearchQuery?: string;
    }): Promise<string>;
    runQueryLoop: QueryLoopRunner;
    onSessionEnd(): Promise<{
        reflection: {
            insights: string[];
        };
        newPatterns: unknown[];
    }>;
    rebuildSemanticMemory(projectDir: string): Promise<unknown[]>;
}
export declare function parseExplicitSkillInvocation(messageText: string): {
    name: string;
    input: string;
} | null;
export declare function stopUploadsAutoPrune(): void;
export declare function stopCuratorScheduler(): void;
export declare function stopSelfLearningHeartbeat(): void;
export declare function stopTriggerScheduler(): void;
export declare function stopOtlpExporter(): Promise<void>;
export declare function stopAutomationScheduler(): void;
export declare function stopTeammateScheduler(): void;
/**
 * Stop every registered scheduler in reverse-registration order. Intended
 * for shutdown / test teardown — callers that only need to stop one
 * subsystem should keep using the individual `stopX` exports.
 */
export declare function stopAllSchedulers(): Promise<Array<{
    name: string;
    ok: boolean;
    error?: string;
}>>;
/** Diagnostic snapshot of currently-registered scheduler liveness. */
export declare function getSchedulerStatuses(): Array<{
    name: string;
    running: boolean;
}>;
interface ChatModelRoutingDecision {
    model: string;
    routed: boolean;
    from?: string;
    reason?: string;
}
export declare function resolveChatModelForRequest(requestedModel: string, messageText: string): Promise<ChatModelRoutingDecision>;
/**
 * Classify a model's text/image/audio/tool-use capabilities from its name plus
 * any details surfaced by the backend (`OllamaModel.details`, `ListModel.details`).
 *
 * The classification drives UI hints, the agentic auto-routing fallback list,
 * and the `weak`/`strong` toolUse warning in the model picker. It is a best-
 * effort heuristic, not an authoritative capability registry.
 *
 * Tool-use tiers and their evidence sources:
 *
 * 1. Backend prefix ("provider/model") wins when the provider's preset declares
 *    `supportsTools`. Drives Groq/Mistral/OpenAI = strong, Cerebras/Cloudflare/
 *    DeepInfra = weak. See OPENAI_COMPATIBLE_PRESETS and REPLICATE_PRESET.
 * 2. `weakGemma4LocalToolModel` — pinned to gemma4:e4b/26b based on live probes
 *    that show full Harness tool turns are unreliable even though tiny one-tool
 *    loops succeed. See user-memory llm-backends.md.
 * 3. `weakToolModels` — small base models that historically misfire on tool
 *    calls (phi-3-mini, tinyllama, smollm, qwen2.5-3b and below).
 * 4. `strongToolModels` — families with confirmed reliable tool calling. The
 *    regex covers kimi, qwen-coder 14B/32B/72B/480B, gpt-oss :cloud variants,
 *    deepseek-v3/coder, the GLM 4/5 family (including :cloud variants), the
 *    mistral-medium/large families, command-r, gpt-4*, claude*, llama 70b.
 * 5. Falls back to `unknown` when nothing matches; the UI surfaces no warning
 *    for unknown so we err on the side of letting the user try.
 *
 * To extend: add the model family to `strongToolModels` or `weakToolModels`,
 * then add a test in src/web/server.test.ts under "classifies known :cloud
 * Ollama models" or its sibling tests.
 */
export declare function inferModelCapabilities(name: string, details?: Record<string, unknown>): {
    text: boolean;
    image: boolean;
    audio: boolean;
    toolUse: 'strong' | 'weak' | 'unknown';
    notes: string[];
};
export declare function resetSettingsLoadedForTest(): void;
export declare function startServer(): Promise<void>;
export { app };
export declare function startupConnectorsEnabled(): boolean;
export declare function setWebRuntimeOverrides(overrides: Partial<WebRuntimeDeps>): () => void;
//# sourceMappingURL=server.d.ts.map