/** * Injection telemetry: scope-qualified usage keys and in-memory aggregation * over `usage.events.jsonl`. Approximate telemetry only — never proof that the * model read or cited an entry. MVP: no snapshot/compact/lock; the active log * rotates by size threshold into epoch-stamped archives (see storage.ts). * @module dsh-continual-harness */ import type { RefinementKind } from './types.ts'; /** One injection event line. */ export interface UsageEvent { key: string; at: string; } /** Aggregated stats for one scope-qualified key. */ export interface UsageStats { injectionCount: number; lastInjectedAt?: string; } /** Build the scope-qualified usage key for an entry. */ export declare function usageKey(scope: 'local' | 'global', kind: RefinementKind, id: string, sessionId?: string): string; /** Aggregate events in file order; later `at` wins as lastInjectedAt. */ export declare function aggregateUsage(events: UsageEvent[]): Record; //# sourceMappingURL=usage.d.ts.map