/**
 * Centralized tunable defaults — single source of truth.
 *
 * ALL configurable constants that external apps (Electron UI, CLI config)
 * may want to read or override are defined here. This enables:
 *
 * 1. A future `config.tunables` RPC endpoint for visual editing
 * 2. Serialization to JSON for persistence (settings.json)
 * 3. Environment variable overrides via QLOGICAGENT_* prefix
 *
 * Consumers import individual constants from this module.
 * The full shape is exported as `TunableDefaults` interface for RPC typing.
 *
 * Grouping follows subsystem boundaries.
 */
/** Absolute max rounds any agent can run (hard cap). */
export declare const MAX_ROUNDS_LIMIT = 100;
/** Default rounds for a top-level agent turn. */
export declare const DEFAULT_MAX_ROUNDS = 25;
/** Default temperature for LLM calls (0 = deterministic). */
export declare const DEFAULT_TEMPERATURE = 0;
/** Hard cap on tool calls per round (prevents runaway). */
export declare const MAX_TOOL_BUDGET_CAP = 100;
/** Default tool budget per round. Overridable via TOOL_LOOP_DEFAULT_BUDGET env. */
export declare const DEFAULT_TOOL_BUDGET: number;
/** Foreground tool execution deadline in ms. Long jobs should use background tasks. */
export declare const DEFAULT_TOOL_EXECUTION_TIMEOUT_MS: number;
/** Max consecutive tool call failures before early exit. */
export declare const MAX_CONSECUTIVE_FAILURES = 3;
/** Max times the exact same (tool_name, arguments) pair can repeat. */
export declare const MAX_IDENTICAL_CALL_REPEATS = 2;
/** Max times the same tool can fail with different args before blocking (variant-loop detection).
 *  Includes both hard failures (ok=false) and soft empty results (e.g. "No matches found").
 *  Note: blocked calls still emit tool_call events, so effective max attempts visible to
 *  client = MAX + 1 (the blocked attempt) + possible 1 alternative tool = MAX + 2. */
export declare const MAX_TOOL_VARIANT_FAILURES = 2;
/** Default context window size (tokens). */
export declare const DEFAULT_CONTEXT_WINDOW_TOKENS = 128000;
/** Reserved tokens for model response output. */
export declare const RESPONSE_BUFFER_TOKENS = 13000;
/** Default max output tokens per LLM API call. */
export declare const DEFAULT_MAX_OUTPUT_TOKENS = 16384;
/** Model's absolute max output tokens (escalation ceiling). */
export declare const DEFAULT_MODEL_MAX_OUTPUT_TOKENS = 65536;
/** Max max_output_tokens recovery attempts (CC: 3). */
export declare const MAX_OUTPUT_TOKENS_RECOVERY_LIMIT = 3;
/** Escalated max output tokens during recovery (CC: 64k). */
export declare const ESCALATED_MAX_OUTPUT_TOKENS = 65536;
/** Delta threshold for "diminishing returns" detection (CC: 500). */
export declare const DIMINISHING_RETURNS_THRESHOLD = 500;
/** Min consecutive continuations before diminishing returns kicks in. */
export declare const DIMINISHING_RETURNS_MIN_CONTINUATIONS = 3;
/** Per-tool result size threshold (chars) for disk persistence. */
export declare const DEFAULT_MAX_RESULT_SIZE_CHARS = 50000;
/** Per-message aggregate tool result budget (chars). */
export declare const MAX_TOOL_RESULTS_PER_MESSAGE_CHARS = 200000;
/** Preview size for persisted tool result references (bytes). */
export declare const TOOL_RESULT_PREVIEW_BYTES = 2000;
/** Heartbeat interval during persistent retry waits (ms). */
export declare const HEARTBEAT_INTERVAL_MS = 30000;
/** Max 529 errors before fallback model switch. */
export declare const MAX_529_RETRIES = 3;
/** Max consecutive API error retries before aborting. */
export declare const MAX_API_RETRIES = 2;
/** Max backoff interval for persistent retry (ms). */
export declare const PERSISTENT_RETRY_MAX_BACKOFF_MS = 300000;
/** Total retry time cap for persistent retry (ms). */
export declare const PERSISTENT_RETRY_RESET_CAP_MS = 21600000;
/** Target usage ratio after compression (0-1). */
export declare const COMPRESSION_TARGET_USAGE_RATIO = 0.75;
/** Min token budget floor after compression. */
export declare const COMPRESSION_MIN_BUDGET = 16000;
/** Max token budget ceiling. */
export declare const COMPRESSION_MAX_BUDGET = 120000;
/** Max consecutive reactive compaction failures. */
export declare const REACTIVE_COMPACT_MAX_FAILURES = 3;
/** Min messages to keep after reactive compaction. */
export declare const REACTIVE_COMPACT_MIN_MESSAGES = 4;
/** Target usage percentage for reactive compaction. */
export declare const REACTIVE_COMPACT_TARGET_PERCENT = 50;
/** Max auto-learned skills per project. */
export declare const MAX_SKILLS_PER_PROJECT = 20;
/** Max global (user-level) skills. */
export declare const MAX_SKILLS_GLOBAL = 50;
/** Min tool calls to consider a turn "complex enough" for skill creation. */
export declare const MIN_TOOL_CALLS_FOR_SKILL = 3;
/** Min distinct tools to suggest a new skill. */
export declare const MIN_DISTINCT_TOOLS_FOR_SKILL = 2;
/** Cooldown between skill creation suggestions (ms). */
export declare const SKILL_CREATION_COOLDOWN_MS: number;
/**
 * Project-level pattern repetition threshold.
 * The same workflow signature must appear this many times across turns/sessions
 * before a skill creation is triggered. Prevents one-off complex turns from
 * immediately producing skills.
 */
export declare const SKILL_PATTERN_REPETITION_THRESHOLD = 3;
/**
 * Max age (ms) for pattern entries. Patterns older than this are pruned.
 * Default: 30 days.
 */
export declare const SKILL_PATTERN_MAX_AGE_MS: number;
/** Max chars of skill content injected into system prompt. */
export declare const SKILL_INJECTION_MAX_CHARS = 4000;
/** Max skills injected into a single prompt. */
export declare const SKILL_INJECTION_MAX_COUNT = 5;
/** Max skills recalled from other projects per turn. */
export declare const SKILL_RECALL_MAX_SKILLS = 3;
/** Max chars per recalled skill content. */
export declare const SKILL_RECALL_MAX_CONTENT_CHARS = 800;
/** Skill recall index cache TTL (ms). */
export declare const SKILL_RECALL_CACHE_TTL_MS: number;
/** Max nested fork depth for sub-agents. */
export declare const MAX_FORK_DEPTH = 4;
/** Team aggregate budget (total tokens across all forked sub-agents). 0 = unlimited. */
export declare const TEAM_BUDGET_TOKENS = 0;
/** Max historical sessions retained on disk. */
export declare const MAX_SESSIONS = 50;
/** Turn count threshold for triggering task summary. */
export declare const TASK_SUMMARY_TURN_THRESHOLD = 50;
/** Interval (turns) between summary regeneration. */
export declare const TASK_SUMMARY_REGEN_INTERVAL = 30;
/** Idle duration (ms) before a group session is auto-split into a new session. Default: 1 hour. */
export declare const GROUP_SESSION_IDLE_THRESHOLD_MS: number;
/** Hard limit: max turns in a single group session before soft-split. Default: 200 turns. */
export declare const GROUP_SESSION_MAX_TURNS = 200;
/** Max include nesting depth in instruction files. */
export declare const MAX_INCLUDE_DEPTH = 5;
/** Max total chars loaded from instruction files. */
export declare const MAX_INSTRUCTION_CHARS = 40000;
/** Max single instruction file size (bytes). */
export declare const INSTRUCTIONS_MAX_FILE_SIZE: number;
/** Max total instruction directory size (bytes). */
export declare const INSTRUCTIONS_MAX_DIR_SIZE: number;
/** Max single media file download size (bytes, 500 MB). */
export declare const MEDIA_MAX_DOWNLOAD_SIZE: number;
/** Max file size for direct LLM upload (bytes, 50 MB).
 *  Files larger than this should be chunked or summarized before sending to LLM. */
export declare const MEDIA_MAX_UPLOAD_SIZE: number;
/** Media download timeout (ms). */
export declare const MEDIA_DOWNLOAD_TIMEOUT_MS = 300000;
/** Max retries when spawning an ACP agent process. */
export declare const ACP_MAX_SPAWN_RETRIES = 2;
/** Backoff base for agent spawn retries (ms). */
export declare const ACP_RETRY_BACKOFF_BASE = 3000;
/** Max automatic restarts after agent process crash. */
export declare const ACP_RUNTIME_RESTART_MAX = 3;
/** Backoff base for crash restarts (ms). */
export declare const ACP_RUNTIME_RESTART_BACKOFF_BASE = 5000;
/** Running task poll interval (ms). */
export declare const TASK_POLL_INTERVAL_MS = 1000;
/** How long to display stopped tasks before removal (ms). */
export declare const TASK_STOPPED_DISPLAY_MS = 3000;
/** Terminal task cleanup grace period (ms). */
export declare const TASK_PANEL_GRACE_MS = 30000;
/** Max bytes injected for session memory prefetch. */
export declare const MEMORY_PREFETCH_MAX_SESSION_BYTES: number;
/** Max results per memory recall query. */
export declare const MEMORY_PREFETCH_LIMIT_PER_RECALL = 10;
/** LRU dedup set size for surfaced memory entries. */
export declare const MEMORY_MAX_SURFACED_ENTRIES = 100;
/** Min hours between dream consolidation runs. */
export declare const DREAM_MIN_INTERVAL_HOURS = 24;
/** Min sessions before dream triggers. */
export declare const DREAM_MIN_SESSIONS = 5;
/** Dream scan throttle interval (ms). */
export declare const DREAM_SCAN_INTERVAL_MS = 600000;
/** Idle dream timer (minutes). */
export declare const IDLE_DREAM_MINUTES = 30;
/** Dream cooldown between runs (ms, 4 hours). */
export declare const DREAM_COOLDOWN_MS = 14400000;
/** Max dream run duration (ms). */
export declare const DREAM_MAX_DURATION_MS = 300000;
/**
 * Full typed shape of all tunable defaults.
 * Used by `config.tunables` RPC for external app visualization.
 */
export interface TunableDefaults {
    maxRoundsLimit: number;
    defaultMaxRounds: number;
    defaultTemperature: number;
    maxToolBudgetCap: number;
    defaultToolBudget: number;
    defaultToolExecutionTimeoutMs: number;
    maxConsecutiveFailures: number;
    maxIdenticalCallRepeats: number;
    defaultContextWindowTokens: number;
    responseBufferTokens: number;
    defaultMaxOutputTokens: number;
    defaultModelMaxOutputTokens: number;
    maxOutputTokensRecoveryLimit: number;
    escalatedMaxOutputTokens: number;
    diminishingReturnsThreshold: number;
    diminishingReturnsMinContinuations: number;
    defaultMaxResultSizeChars: number;
    maxToolResultsPerMessageChars: number;
    toolResultPreviewBytes: number;
    heartbeatIntervalMs: number;
    max529Retries: number;
    maxApiRetries: number;
    persistentRetryMaxBackoffMs: number;
    persistentRetryResetCapMs: number;
    compressionTargetUsageRatio: number;
    compressionMinBudget: number;
    compressionMaxBudget: number;
    reactiveCompactMaxFailures: number;
    reactiveCompactMinMessages: number;
    reactiveCompactTargetPercent: number;
    maxSkillsPerProject: number;
    maxSkillsGlobal: number;
    minToolCallsForSkill: number;
    minDistinctToolsForSkill: number;
    skillCreationCooldownMs: number;
    skillInjectionMaxChars: number;
    skillInjectionMaxCount: number;
    skillRecallMaxSkills: number;
    skillRecallMaxContentChars: number;
    skillRecallCacheTtlMs: number;
    maxForkDepth: number;
    maxSessions: number;
    taskSummaryTurnThreshold: number;
    taskSummaryRegenInterval: number;
    maxIncludeDepth: number;
    maxInstructionChars: number;
    instructionsMaxFileSize: number;
    instructionsMaxDirSize: number;
    mediaMaxDownloadSize: number;
    mediaMaxUploadSize: number;
    mediaDownloadTimeoutMs: number;
    acpMaxSpawnRetries: number;
    acpRetryBackoffBase: number;
    acpRuntimeRestartMax: number;
    acpRuntimeRestartBackoffBase: number;
    taskPollIntervalMs: number;
    taskStoppedDisplayMs: number;
    taskPanelGraceMs: number;
    memoryPrefetchMaxSessionBytes: number;
    memoryPrefetchLimitPerRecall: number;
    memoryMaxSurfacedEntries: number;
    dreamMinIntervalHours: number;
    dreamMinSessions: number;
    dreamScanIntervalMs: number;
    idleDreamMinutes: number;
    dreamCooldownMs: number;
    dreamMaxDurationMs: number;
    teamBudgetTokens: number;
    braveApiKey: string;
    exaApiKey: string;
    serperApiKey: string;
    searxngBaseUrl: string;
    crawl4aiBaseUrl: string;
    searchSvcBaseUrl: string;
}
/**
 * Snapshot of all current tunable values.
 * Use this for RPC serialization and external app display.
 */
export declare function getTunableDefaults(): TunableDefaults;
