import type { Check } from '../types.js'; /** * Visibility row for the hook-tap auto-capture trigger. `ok: true` covers * both "off" (default) and "on, working" — unlike `checkServicePointer`'s * dev-pinned row (an always-unintended misconfiguration, hence `ok: false`), * auto-capture being ON is a deliberate, disclosed, opt-in user choice * (ADR-012 decision 4's whole point), so merely being ON is never itself a * warning. Mirrors `checkDurabilityGateMode`'s informational-row precedent * for that half. * * `ok: false` (WARN) is reserved for one specific, previously-silent failure * mode found live in production 2026-07-12: the hook is turned ON, the * daemon has real content in it (>= MEANINGFUL_USAGE_THRESHOLD active * memories from ANY source), and yet 0 of them ever came through capture — * the trigger is wired but never actually fires. A brand-new install below * that floor stays silent (`ok: true`) so day-one users never see a false * alarm before they've had a chance to accumulate any activity. * * 2026-07-12 provenance-mismatch fix: the count below now includes BOTH * `capture_source = 'auto_capture'` (the denser-sampling trigger this row is * nominally about) AND `'hook_close'` (the ordinary astramem-plugin * close-capture hook — the only capture path that actually fires today; see * src/cli/capture.ts). Before this fix, a user who enabled auto-capture but * never got the (still-unbuilt) denser-sampling trigger would see a * permanent false-positive WARN here even though ordinary close-capture was * working perfectly — the canary was checking the wrong provenance value, * not detecting a real wiring failure. * * issue #217 (2026-07-13): the count above used to be ALL-TIME (no * created_at bound at all) — the third instance of the ADR-015 "measures * existence, not rate" bug class (#200, #190 were the first two). Once * capture had EVER succeeded even a single time, `count > 0` forever: this * row would stay green for the rest of the install's life even if the hook * broke completely the next day (stale global CLI shadowing `capture`, a * hook config regression, a daemon upgrade). Fix: both queries are now * bound to the trailing `SEVEN_DAYS_MS` window (the same recency-window * constant `checkRedaction`/`checkAtomValidityExtraction`/etc. already use, * chosen over `checkEntityLinkRate`'s COUNT-tail because `capture_source` * is legitimately NULL on most non-capture memories — a memory-count tail * would put unrelated `/remember` volume in the denominator and dilute a * real capture outage). REAL-zero (a quiet week — `totalRecent` below the * floor) and BROKEN-zero (real recent activity, but none of it arrived via * capture) are kept distinguishable exactly as `MEANINGFUL_USAGE_THRESHOLD` * already does for the sibling "Usefulness feedback loop" canary. */ export declare function checkAutoCapture(dataDir: string, autoCaptureEnabled: boolean, encryptionEnabled: boolean): Check;