/** * ObservationExtractor — derives a semantic `category` from (source, payload). * * Ported fresh (NOT copied) from context-mode's extract.ts approach: a set of * pure, side-effect-free classifier functions dispatched off the lifecycle * `source` + the payload shape. Each classifier inspects the payload for * tool-name / field-shape signals and returns an `ObservationCategory`. * * Design: * - Pure: (source, payload) → category. No IO, no state, never throws. * - Graceful: unknown payloads fall back to "lifecycle-raw". * - Backward-compatible: the 6 lifecycle `source` kinds are unchanged; the * category is an additive derived field. * - The category drives the compaction snapshot's table-of-contents sections. */ import type { LifecycleEventKind } from "../../data/memory/observation-repository.js"; import type { ObservationCategory } from "../../data/memory/observation-repository.js"; /** * Derive an `ObservationCategory` from (source, payload). * * Pure, never throws. Returns "lifecycle-raw" when no classifier matches * (backward-compatible fallback for legacy/unknown payloads). */ export declare function extractCategory(source: LifecycleEventKind, payload: Record): ObservationCategory; /** * Human-readable label for a category (ported from context-mode analytics.ts). * Used by the compaction snapshot's section headers. */ export declare const CATEGORY_LABELS: Record; //# sourceMappingURL=observation-extractor.d.ts.map