export declare const ENTERPRISE_FEATURE_FLAG_ENV = "SMARTPERFETTO_ENTERPRISE";
export declare const SMARTPERFETTO_BACKEND_PORT_ENV = "SMARTPERFETTO_BACKEND_PORT";
export declare const SMARTPERFETTO_FRONTEND_PORT_ENV = "SMARTPERFETTO_FRONTEND_PORT";
export declare const SMARTPERFETTO_BACKEND_PUBLIC_PORT_ENV = "SMARTPERFETTO_BACKEND_PUBLIC_PORT";
export declare const SMARTPERFETTO_BACKEND_PUBLIC_URL_ENV = "SMARTPERFETTO_BACKEND_PUBLIC_URL";
export declare const DEFAULT_BACKEND_PORT = 3000;
export declare const DEFAULT_FRONTEND_PORT = 10000;
export interface FeatureConfig {
    /**
     * Enables enterprise multi-tenant code paths.
     *
     * Keep this default-off until RequestContext, lease proxy, and DB-authoritative
     * paths are fully covered by the enterprise regression matrix.
     */
    enterprise: boolean;
}
export declare function resolveFeatureConfig(env?: NodeJS.ProcessEnv): FeatureConfig;
export declare const featureConfig: FeatureConfig;
export declare function resolveServerConfig(env?: NodeJS.ProcessEnv): {
    /** Server port */
    readonly port: number;
    /** Perfetto UI/static frontend port */
    readonly frontendPort: number;
    /** Browser-visible backend port for generated runtime config. */
    readonly backendPublicPort: number;
    /** Browser-visible backend URL for reverse proxy / HTTPS deployments. */
    readonly backendPublicUrl: string;
    /** Node environment */
    readonly nodeEnv: string;
    /** CORS allowed origins */
    readonly corsOrigins: string[];
    /** Request body size limit */
    readonly bodyLimit: string;
};
export declare const serverConfig: {
    /** Server port */
    readonly port: number;
    /** Perfetto UI/static frontend port */
    readonly frontendPort: number;
    /** Browser-visible backend port for generated runtime config. */
    readonly backendPublicPort: number;
    /** Browser-visible backend URL for reverse proxy / HTTPS deployments. */
    readonly backendPublicUrl: string;
    /** Node environment */
    readonly nodeEnv: string;
    /** CORS allowed origins */
    readonly corsOrigins: string[];
    /** Request body size limit */
    readonly bodyLimit: string;
};
export declare const traceProcessorConfig: {
    /** Port pool range for trace processors */
    readonly portRange: {
        readonly min: number;
        readonly max: number;
    };
    /** Perfetto UI origin for CORS */
    readonly perfettoUiOrigin: string;
    /** Server startup timeout (ms) */
    readonly startupTimeoutMs: number;
    /** Query execution timeout (ms). Enterprise v1 requires 24h by default. */
    readonly queryTimeoutMs: number;
    /** Dedicated health-query timeout (ms); independent from the main SQL queue. */
    readonly healthQueryTimeoutMs: number;
    /** TCP accept probe timeout (ms) for trace_processor HTTP RPC health checks. */
    readonly healthRpcAcceptTimeoutMs: number;
    /** Process kill timeout (ms) */
    readonly killTimeoutMs: number;
    /** Stale allocation cleanup age (ms) - default 30 minutes */
    readonly staleAllocationMaxAgeMs: number;
    /**
     * Preload a small critical subset of stdlib modules during processor startup.
     * Keeps key Android views available without blocking startup on full stdlib preload.
     */
    readonly preloadCriticalStdlibModules: boolean;
    /**
     * Preload all stdlib modules in the background after processor is marked ready.
     * Disabled by default to reduce upload-to-ready latency.
     */
    readonly preloadAllStdlibModules: boolean;
};
export declare const DEFAULT_AGENT_MAX_TURNS = 60;
export declare const DEFAULT_AGENT_QUICK_MAX_TURNS = 10;
export declare const DEFAULT_AGENT_SESSION_MAX_IDLE_MS: number;
export declare const DEFAULT_AGENT_SESSION_CLEANUP_INTERVAL_MS: number;
export interface AgentRuntimeBudgetConfig {
    /** Shared full-analysis turn budget fallback for all agent runtimes. */
    maxTurns: number;
    /** Shared quick-analysis turn budget fallback for all agent runtimes. */
    quickMaxTurns: number;
}
export declare function resolveAgentRuntimeBudgetConfig(env?: NodeJS.ProcessEnv): AgentRuntimeBudgetConfig;
export interface AgentSessionConfig {
    /** Idle retention for completed/failed assistant sessions. */
    terminalMaxIdleMs: number;
    /** Idle retention for abandoned pending/running sessions without SSE clients. */
    nonTerminalMaxIdleMs: number;
    /** In-memory multi-turn context TTL. Keep this >= nonTerminalMaxIdleMs unless intentionally pruning context. */
    contextMaxAgeMs: number;
    /** Background cleanup cadence for session and scene-report sweeps. */
    cleanupIntervalMs: number;
}
export declare function resolveAgentSessionConfig(env?: NodeJS.ProcessEnv): AgentSessionConfig;
export declare const agentRuntimeBudgetConfig: AgentRuntimeBudgetConfig;
export declare const agentSessionConfig: AgentSessionConfig;
export declare const agentConfig: {
    /** Maximum total iterations for analysis */
    readonly maxTotalIterations: number;
    /** Shared runtime turn budgets; runtime-specific env vars still take precedence. */
    readonly runtimeBudget: AgentRuntimeBudgetConfig;
    /** Assistant session retention and cleanup settings. */
    readonly sessions: AgentSessionConfig;
    /** Enable trace recording */
    readonly enableTraceRecording: boolean;
    /** Evaluation criteria */
    readonly evaluation: {
        /** Minimum quality score to pass (0-1) */
        readonly minQualityScore: number;
        /** Minimum completeness score to pass (0-1) */
        readonly minCompletenessScore: number;
        /** Maximum allowed contradictions */
        readonly maxContradictions: number;
    };
};
export declare const circuitBreakerConfig: {
    /** Maximum retries per agent */
    readonly maxRetriesPerAgent: number;
    /** Maximum iterations per stage */
    readonly maxIterationsPerStage: number;
    /** Cooldown period after tripping (ms) */
    readonly cooldownMs: number;
    /** Number of attempts in half-open state */
    readonly halfOpenAttempts: number;
    /** Number of failures before tripping */
    readonly failureThreshold: number;
    /** Number of successes to close circuit */
    readonly successThreshold: number;
    /** Base delay for exponential backoff (ms) */
    readonly backoffBaseDelayMs: number;
    /** Maximum delay for exponential backoff (ms) */
    readonly backoffMaxDelayMs: number;
    /** Timeout waiting for user response (ms) - default 5 minutes */
    readonly userResponseTimeoutMs: number;
    /** Cooldown period between forceClose calls (ms) - default 30 seconds */
    readonly forceCloseCooldownMs: number;
    /** Maximum forceClose calls per session */
    readonly maxForceCloseCount: number;
    /** Successes needed in half-open state to fully close */
    readonly halfOpenSuccessThreshold: number;
};
export declare const pipelineConfig: {
    /** Maximum total duration for entire pipeline (ms) */
    readonly maxTotalDurationMs: number;
    /** Enable parallel execution of stages */
    readonly enableParallelization: boolean;
    /** Stage timeouts (ms) */
    readonly stageTimeouts: {
        readonly planner: number;
        readonly analysis: number;
        readonly evaluation: number;
        readonly synthesis: number;
        readonly decision: number;
    };
    /** Stage max retries */
    readonly stageMaxRetries: {
        readonly planner: number;
        readonly analysis: number;
        readonly evaluation: number;
        readonly synthesis: number;
        readonly decision: number;
    };
    /** Auto-save interval for state machine (ms) */
    readonly autoSaveIntervalMs: number;
};
export declare const modelRouterConfig: {
    /** Default model to use */
    readonly defaultModel: string;
    /** Fallback chain for model failures */
    readonly fallbackChain: string[];
    /** Enable ensemble mode */
    readonly enableEnsemble: boolean;
    /** Ensemble confidence threshold (0-1) */
    readonly ensembleThreshold: number;
};
export declare const forkConfig: {
    /** Fork expiration time (ms) - default 24 hours */
    readonly expirationMs: number;
};
export declare const analysisConfig: {
    /** SQL query result limits */
    readonly queryLimits: {
        /** VSYNC interval query limit */
        readonly vsyncInterval: number;
        /** Frame data query limit */
        readonly frameData: number;
        /** Jank details query limit */
        readonly jankDetails: number;
        /** Slice details query limit */
        readonly sliceDetails: number;
    };
    /** Frame analysis thresholds (nanoseconds) */
    readonly frameThresholds: {
        /** Default VSYNC period for 60Hz (16.67ms in ns) */
        readonly defaultVsyncPeriodNs: number;
        /** Minimum VSYNC interval to consider valid (ns) */
        readonly minVsyncIntervalNs: number;
        /** Maximum VSYNC interval to consider valid (ns) */
        readonly maxVsyncIntervalNs: number;
        /** Minimum frame duration to consider (ns) */
        readonly minFrameDurationNs: number;
        /** Maximum frame duration to consider (ns) */
        readonly maxFrameDurationNs: number;
        /** Minimum slice duration for analysis (ns) */
        readonly minSliceDurationNs: number;
        /** Frame analyzer minimum duration threshold (ms) */
        readonly minDurationThresholdMs: number;
    };
    /** Time windows for analysis (ns) */
    readonly timeWindows: {
        /** Time window around events (ns) - 50ms */
        readonly eventContextNs: number;
    };
    /** Minimum counts for statistical validity */
    readonly minCounts: {
        /** Minimum count for slice grouping */
        readonly sliceGrouping: number;
    };
};
export declare const contextConfig: {
    /** Maximum tokens for prompt context */
    readonly maxPromptTokens: number;
};
export declare const featureFlagsConfig: {
    /** Toggle scene reconstruction endpoints without redeploying code paths */
    readonly enableAgentSceneReconstruct: boolean;
    /** Toggle debug log endpoints */
    readonly enableAgentLogsApi: boolean;
};
export declare const sceneStoryConfig: {
    /** JobRunner concurrent analysis jobs */
    readonly analysisConcurrency: number;
    /** Max retries per job after initial failure */
    readonly jobMaxRetries: number;
    /** Disk cache TTL for file-backed trace reports */
    readonly reportTtlMs: number;
    /** Disk store directory for SceneReport JSON (relative to backend cwd) */
    readonly reportDir: string;
    /** Disk store directory for out-of-band Smart job artifacts */
    readonly jobArtifactDir: string;
    /** Process-memory LRU size for external RPC trace reports where no content hash is available */
    readonly memoryCacheMaxSize: number;
    /** Optional lightweight LLM double-check for ambiguous Smart scene reconstruction */
    readonly llmVerify: boolean;
    /** Timeout for optional scene reconstruction LLM verifier */
    readonly llmVerifyTimeoutMs: number;
};
export declare const frontendConfig: {
    /** Default backend URL */
    readonly backendUrl: string;
    /** Default Ollama URL */
    readonly ollamaUrl: string;
};
export * from './thresholds';
export declare const config: {
    readonly server: {
        /** Server port */
        readonly port: number;
        /** Perfetto UI/static frontend port */
        readonly frontendPort: number;
        /** Browser-visible backend port for generated runtime config. */
        readonly backendPublicPort: number;
        /** Browser-visible backend URL for reverse proxy / HTTPS deployments. */
        readonly backendPublicUrl: string;
        /** Node environment */
        readonly nodeEnv: string;
        /** CORS allowed origins */
        readonly corsOrigins: string[];
        /** Request body size limit */
        readonly bodyLimit: string;
    };
    readonly traceProcessor: {
        /** Port pool range for trace processors */
        readonly portRange: {
            readonly min: number;
            readonly max: number;
        };
        /** Perfetto UI origin for CORS */
        readonly perfettoUiOrigin: string;
        /** Server startup timeout (ms) */
        readonly startupTimeoutMs: number;
        /** Query execution timeout (ms). Enterprise v1 requires 24h by default. */
        readonly queryTimeoutMs: number;
        /** Dedicated health-query timeout (ms); independent from the main SQL queue. */
        readonly healthQueryTimeoutMs: number;
        /** TCP accept probe timeout (ms) for trace_processor HTTP RPC health checks. */
        readonly healthRpcAcceptTimeoutMs: number;
        /** Process kill timeout (ms) */
        readonly killTimeoutMs: number;
        /** Stale allocation cleanup age (ms) - default 30 minutes */
        readonly staleAllocationMaxAgeMs: number;
        /**
         * Preload a small critical subset of stdlib modules during processor startup.
         * Keeps key Android views available without blocking startup on full stdlib preload.
         */
        readonly preloadCriticalStdlibModules: boolean;
        /**
         * Preload all stdlib modules in the background after processor is marked ready.
         * Disabled by default to reduce upload-to-ready latency.
         */
        readonly preloadAllStdlibModules: boolean;
    };
    readonly agent: {
        /** Maximum total iterations for analysis */
        readonly maxTotalIterations: number;
        /** Shared runtime turn budgets; runtime-specific env vars still take precedence. */
        readonly runtimeBudget: AgentRuntimeBudgetConfig;
        /** Assistant session retention and cleanup settings. */
        readonly sessions: AgentSessionConfig;
        /** Enable trace recording */
        readonly enableTraceRecording: boolean;
        /** Evaluation criteria */
        readonly evaluation: {
            /** Minimum quality score to pass (0-1) */
            readonly minQualityScore: number;
            /** Minimum completeness score to pass (0-1) */
            readonly minCompletenessScore: number;
            /** Maximum allowed contradictions */
            readonly maxContradictions: number;
        };
    };
    readonly circuitBreaker: {
        /** Maximum retries per agent */
        readonly maxRetriesPerAgent: number;
        /** Maximum iterations per stage */
        readonly maxIterationsPerStage: number;
        /** Cooldown period after tripping (ms) */
        readonly cooldownMs: number;
        /** Number of attempts in half-open state */
        readonly halfOpenAttempts: number;
        /** Number of failures before tripping */
        readonly failureThreshold: number;
        /** Number of successes to close circuit */
        readonly successThreshold: number;
        /** Base delay for exponential backoff (ms) */
        readonly backoffBaseDelayMs: number;
        /** Maximum delay for exponential backoff (ms) */
        readonly backoffMaxDelayMs: number;
        /** Timeout waiting for user response (ms) - default 5 minutes */
        readonly userResponseTimeoutMs: number;
        /** Cooldown period between forceClose calls (ms) - default 30 seconds */
        readonly forceCloseCooldownMs: number;
        /** Maximum forceClose calls per session */
        readonly maxForceCloseCount: number;
        /** Successes needed in half-open state to fully close */
        readonly halfOpenSuccessThreshold: number;
    };
    readonly pipeline: {
        /** Maximum total duration for entire pipeline (ms) */
        readonly maxTotalDurationMs: number;
        /** Enable parallel execution of stages */
        readonly enableParallelization: boolean;
        /** Stage timeouts (ms) */
        readonly stageTimeouts: {
            readonly planner: number;
            readonly analysis: number;
            readonly evaluation: number;
            readonly synthesis: number;
            readonly decision: number;
        };
        /** Stage max retries */
        readonly stageMaxRetries: {
            readonly planner: number;
            readonly analysis: number;
            readonly evaluation: number;
            readonly synthesis: number;
            readonly decision: number;
        };
        /** Auto-save interval for state machine (ms) */
        readonly autoSaveIntervalMs: number;
    };
    readonly modelRouter: {
        /** Default model to use */
        readonly defaultModel: string;
        /** Fallback chain for model failures */
        readonly fallbackChain: string[];
        /** Enable ensemble mode */
        readonly enableEnsemble: boolean;
        /** Ensemble confidence threshold (0-1) */
        readonly ensembleThreshold: number;
    };
    readonly fork: {
        /** Fork expiration time (ms) - default 24 hours */
        readonly expirationMs: number;
    };
    readonly analysis: {
        /** SQL query result limits */
        readonly queryLimits: {
            /** VSYNC interval query limit */
            readonly vsyncInterval: number;
            /** Frame data query limit */
            readonly frameData: number;
            /** Jank details query limit */
            readonly jankDetails: number;
            /** Slice details query limit */
            readonly sliceDetails: number;
        };
        /** Frame analysis thresholds (nanoseconds) */
        readonly frameThresholds: {
            /** Default VSYNC period for 60Hz (16.67ms in ns) */
            readonly defaultVsyncPeriodNs: number;
            /** Minimum VSYNC interval to consider valid (ns) */
            readonly minVsyncIntervalNs: number;
            /** Maximum VSYNC interval to consider valid (ns) */
            readonly maxVsyncIntervalNs: number;
            /** Minimum frame duration to consider (ns) */
            readonly minFrameDurationNs: number;
            /** Maximum frame duration to consider (ns) */
            readonly maxFrameDurationNs: number;
            /** Minimum slice duration for analysis (ns) */
            readonly minSliceDurationNs: number;
            /** Frame analyzer minimum duration threshold (ms) */
            readonly minDurationThresholdMs: number;
        };
        /** Time windows for analysis (ns) */
        readonly timeWindows: {
            /** Time window around events (ns) - 50ms */
            readonly eventContextNs: number;
        };
        /** Minimum counts for statistical validity */
        readonly minCounts: {
            /** Minimum count for slice grouping */
            readonly sliceGrouping: number;
        };
    };
    readonly context: {
        /** Maximum tokens for prompt context */
        readonly maxPromptTokens: number;
    };
    readonly featureFlags: {
        /** Toggle scene reconstruction endpoints without redeploying code paths */
        readonly enableAgentSceneReconstruct: boolean;
        /** Toggle debug log endpoints */
        readonly enableAgentLogsApi: boolean;
    };
    readonly sceneStory: {
        /** JobRunner concurrent analysis jobs */
        readonly analysisConcurrency: number;
        /** Max retries per job after initial failure */
        readonly jobMaxRetries: number;
        /** Disk cache TTL for file-backed trace reports */
        readonly reportTtlMs: number;
        /** Disk store directory for SceneReport JSON (relative to backend cwd) */
        readonly reportDir: string;
        /** Disk store directory for out-of-band Smart job artifacts */
        readonly jobArtifactDir: string;
        /** Process-memory LRU size for external RPC trace reports where no content hash is available */
        readonly memoryCacheMaxSize: number;
        /** Optional lightweight LLM double-check for ambiguous Smart scene reconstruction */
        readonly llmVerify: boolean;
        /** Timeout for optional scene reconstruction LLM verifier */
        readonly llmVerifyTimeoutMs: number;
    };
    readonly frontend: {
        /** Default backend URL */
        readonly backendUrl: string;
        /** Default Ollama URL */
        readonly ollamaUrl: string;
    };
};
export default config;
//# sourceMappingURL=index.d.ts.map