import type { LoopConfig } from '../types/loop';
import type { PermissionMode } from '../types/permission';
import type { ReadBeforeWriteMode } from '../tools/readBeforeWriteGate';
export interface ConfigProfile {
    /** Unique profile name, e.g. "code_patch" or "safe_readonly". */
    name: string;
    /** Human-readable description shown in the UI / API. */
    description: string;
    /** Override maxTurns. */
    maxTurns?: number;
    /** Override maxTimeMs. */
    maxTimeMs?: number;
    /** Override unproductiveTurnLimit. */
    unproductiveTurnLimit?: number;
    /** Override repeatedToolFailureLimit. */
    repeatedToolFailureLimit?: number;
    /** Override readBeforeWrite. */
    readBeforeWrite?: {
        mode: ReadBeforeWriteMode;
        exemptPaths?: string[];
        allowNewFiles?: boolean;
    };
    /** Override verify. */
    verify?: {
        enabled?: boolean;
        quick?: boolean;
        timeout?: number;
    };
    /** Override autoContinue. */
    autoContinue?: boolean;
    /** Override autoContinueLimit. */
    autoContinueLimit?: number;
    /** Override outputValidation. */
    outputValidation?: {
        enabled?: boolean;
        profile?: string;
    };
    /** Override costTracking. */
    costTracking?: {
        enabled?: boolean;
        budgetUsd?: number;
    };
    /** Override the permission mode for the session. */
    permissionMode?: PermissionMode;
    /**
     * When set, only tools whose name is in this list are available.
     * Everything else is filtered out before being passed to the loop.
     * Use to restrict to read-only or safe tools.
     */
    allowedTools?: string[];
    /**
     * When set, these tool names are removed from the tool pool.
     * Applied after `allowedTools` (if both are set).
     */
    blockedTools?: string[];
    /**
     * When set, override the model used for the run.
     * Set to "local" to tell the router to use Ollama only.
     */
    model?: string;
    /**
     * When true, disable cloud fallback even if configured.
     * Forces local-only execution.
     */
    localOnly?: boolean;
}
export declare const BUILTIN_PROFILES: ReadonlyArray<ConfigProfile>;
/**
 * Apply a profile's overrides onto a base `LoopConfig`.
 * Returns a new config; does not mutate the input.
 *
 * Only fields explicitly set on the profile are applied; `undefined`
 * fields are skipped so the base config's values are preserved.
 */
export declare function applyProfile(base: LoopConfig, profile: ConfigProfile): LoopConfig;
/**
 * Get a profile by name. Checks custom profiles first, then built-ins.
 * Returns `undefined` if no profile with that name exists.
 */
export declare function getProfile(name: string, projectDir?: string): Promise<ConfigProfile | undefined>;
/**
 * List all available profiles (built-in + custom from project dir).
 * Custom profiles with the same name as a built-in shadow the built-in.
 */
export declare function listProfiles(projectDir?: string): Promise<ConfigProfile[]>;
/**
 * Load custom profiles from `<projectDir>/.harness/profiles.json`.
 * Returns [] if the file is absent or corrupt.
 */
export declare function loadCustomProfiles(projectDir: string): Promise<ConfigProfile[]>;
/**
 * Save custom profiles to `<projectDir>/.harness/profiles.json`.
 */
export declare function saveCustomProfiles(projectDir: string, profiles: ConfigProfile[]): Promise<void>;
import type { Tool } from '../types/tool';
/**
 * Filter a tool pool according to a profile's `allowedTools` / `blockedTools`.
 * Returns a new array; does not mutate the input.
 */
export declare function filterToolsByProfile(tools: Tool[], profile: ConfigProfile): Tool[];
/**
 * Returns a list of warnings for a custom profile that grants dangerous tools.
 * Built-in profiles are trusted and exempt.
 */
export declare function auditCustomProfile(profile: ConfigProfile): string[];
//# sourceMappingURL=configProfiles.d.ts.map