/** * Pure mapping from raw PostHog events to ObservationEvents. * * One function: matchEvent(raw, opts) → ObservationEvent | null. Null means * "drop, not significant." This module is the single source of truth for what * the chat agent sees on the in-session timeline; the SDK observer never * forwards anything matchEvent returns null for. * * Kept dependency-free (no DOM access, no PostHog SDK imports) so the * Vitest unit tests run without any browser shim. */ import type { ObservationEvent as ObservationEventContract } from '@syntrologie/runtime-contracts'; /** The templated event kinds (nav/click/form/rage/…) — the backend enum. */ export type ObservationKind = ObservationEventContract['kind']; /** One templated host-page event — the SDK↔backend wire contract. */ export type ObservationEvent = ObservationEventContract; /** Shape of a raw event reaching matchEvent. Loose by design — PostHog's * event shape evolves, and we want matchEvent to be resilient to extra * properties. */ export interface RawEvent { event: string; timestamp: number; properties: Record; } export interface MatchOptions { /** Workspace-configured custom event names to forward as kind="custom". */ observableEvents?: readonly string[]; } /** Test-only: clear the drift-warn dedup so each test observes its own warn. */ export declare function resetCanonicalDriftWarnDedupForTest(): void; export declare function matchEvent(raw: RawEvent, opts?: MatchOptions): ObservationEvent | null; //# sourceMappingURL=allowlist.d.ts.map