/** * Centralized accessors for pool-question environment variables (IND-416). * * POOL_QUESTIONS_MINING off | shadow — P1 shadow axis mining on * discovery-run completion. `shadow` mines and * scores axes and logs them; no questions are * generated and no user-facing behavior changes. * Any value other than "shadow" (including unset) * means off. * * All reads go through this module — do not read these variables via * `process.env` elsewhere. Values are read on every call (no caching) so * tests and long-lived processes observe changes. */ /** Mining mode for pool discriminator axes. */ export type PoolQuestionsMiningMode = "off" | "shadow"; /** Current POOL_QUESTIONS_MINING mode (default off). */ export declare function poolQuestionsMiningMode(): PoolQuestionsMiningMode; /** Question mode for pool discriminators (IND-418). */ export type PoolQuestionsMode = "off" | "on"; /** * Current POOL_QUESTIONS_MODE (default off). When "on", the mining hook also * enqueues a pool_discovery question for the top eligible discriminator * (still subject to the QUESTIONER_ENABLED master gate and per-intent budget). * "on" implies mining runs even when POOL_QUESTIONS_MINING is off. */ export declare function poolQuestionsMode(): PoolQuestionsMode; /** Push delivery mode for high-VoI pool questions (IND-421). */ export type PoolQuestionsPushMode = "off" | "on"; /** * Current POOL_QUESTIONS_PUSH mode (default off). Callers must additionally * require pool-question mode and negotiator availability before delivery. */ export declare function poolQuestionsPushMode(): PoolQuestionsPushMode; /** Visit-triggered pool-mining mode (IND-439 visibility-audit slice). */ export type PoolQuestionsVisitTriggerMode = "off" | "on"; /** * Current POOL_QUESTIONS_VISIT_TRIGGER mode (default off). When "on", an * intent owner's intent-page pending-questions fetch may enqueue a debounced * pool-mining pass for that intent when no live pending pool_discovery * question exists. The trigger only adds a *when* — every existing mining * gate (POOL_QUESTIONS_MODE, k-anonymity floor, VoI threshold, per-intent * budgets, fingerprint freshness, push budgets) applies unchanged, so this * is a no-op unless {@link poolQuestionsMode} is also "on". */ export declare function poolQuestionsVisitTrigger(): PoolQuestionsVisitTriggerMode; /** * Debounce window for visit-triggered pool mining, per intent (IND-439). * At most one visit-triggered mining run per intent per window, enforced via * BullMQ deduplication — no new tables. */ export declare const POOL_VISIT_MINING_DEBOUNCE_MS: number; /** Newborn-opportunity stamping mode (IND-420 P4b). */ export type PoolQuestionsStampNewbornMode = "off" | "on"; /** * Current POOL_QUESTIONS_STAMP_NEWBORN mode (default off). Effective callers * additionally require {@link poolQuestionsMode} to be on. */ export declare function poolQuestionsStampNewborn(): PoolQuestionsStampNewbornMode; /** Minimum VoI for a discriminator to become (or chain) a question. */ export declare const POOL_QUESTION_MIN_VOI = 0.2; /** Minimum evidence-verification rate for a discriminator to become a question. */ export declare const POOL_QUESTION_MIN_EVIDENCE_RATE = 0.6; /** Max eligible discriminators carried per mining pass (asked + alternates). */ export declare const POOL_QUESTION_MAX_DISCRIMINATORS = 3; /** Unattended budget: max pending questions of ANY mode per intent. */ export declare const POOL_QUESTION_MAX_PENDING_PER_INTENT = 3; /** Initial internal VoI threshold for proactive push delivery. */ export declare const POOL_QUESTION_PUSH_BASE_VOI = 0.6; /** Multiplicative VoI threshold increase per consecutive dismissal. */ export declare const POOL_QUESTION_PUSH_DISMISSAL_DECAY = 1.15; /** Minimum pool size for proactive delivery (stricter than mining). */ export declare const POOL_QUESTION_PUSH_MIN_POOL_SIZE = 8; /** Maximum claimed proactive pool pushes per recipient per UTC day. */ export declare const POOL_QUESTION_PUSH_DAILY_CAP = 2; /** Ranking mode for pool adjustments (IND-419). */ export type PoolQuestionsRankingMode = "off" | "on"; /** * Current POOL_QUESTIONS_RANKING (default off). When "on", the radar view * orders by adjusted confidence (confidence × Π poolAdjustments.factor, * floor {@link POOL_ADJUSTMENT_FLOOR}). Adjustments are WRITTEN regardless of * this flag — it only gates whether ordering reads them, so the apply path * can ship first. */ export declare function poolQuestionsRanking(): PoolQuestionsRankingMode; /** Adjustment factor for candidates on the side the user did NOT choose. */ export declare const POOL_ADJUSTMENT_FACTOR_OTHER = 0.6; /** Adjustment factor for candidates the miner could not assign (unknown). */ export declare const POOL_ADJUSTMENT_FACTOR_UNKNOWN = 0.9; /** Floor for the cumulative adjustment multiplier — demoted, never hidden. */ export declare const POOL_ADJUSTMENT_FLOOR = 0.3; /** Debounce window for answer-triggered re-discovery (Tier 1), per intent. */ export declare const POOL_RERUN_DEBOUNCE_MS = 60000; /** * k-anonymity floor: axes are only mined when the pool has at least this many * candidates, so no axis (or later, question option) can be traced back to a * specific individual. */ export declare const POOL_DISCRIMINATOR_MIN_POOL_SIZE = 5; /** Max candidates sent to the miner LLM (top-N by score). */ export declare const POOL_DISCRIMINATOR_MAX_CANDIDATES = 24; /** Max chars of public context per candidate in the miner prompt. */ export declare const POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS = 400;