/** * EventPipeline — Reactive automation for the Mémoire daemon. * * Subscribes to engine events and file system changes, then drives * the pull → diff → auto-spec → generate pipeline automatically. */ import { EventEmitter } from "events"; import type { MemoireEngine } from "./core.js"; export interface PipelineConfig { figmaDebounceMs: number; specDebounceMs: number; autoPull: boolean; autoSpec: boolean; autoGenerate: boolean; } export interface PipelineStats { startedAt: string; pullCount: number; specCount: number; generateCount: number; syncCount: number; errorCount: number; lastPullAt: string | null; lastGenerateAt: string | null; lastError: string | null; queueDepth: number; } export interface PipelineEvent { type: PipelineEventType; timestamp: string; detail: string; data?: unknown; } export type PipelineEventType = "pull-started" | "pull-completed" | "pull-failed" | "spec-created" | "spec-updated" | "generate-started" | "generate-completed" | "generate-failed" | "generate-blocked" | "token-diff-detected" | "component-diff-detected" | "pipeline-error"; export declare class EventPipeline extends EventEmitter { private engine; private config; private stats; private queue; private processing; private specWatchers; private debounceTimers; private recentEvents; private static readonly MAX_RECENT_EVENTS; private lastSnapshot; private taskCounter; private engineEventHandler; constructor(engine: MemoireEngine, config?: Partial); start(): void; stop(): void; getStats(): PipelineStats; getRecentEvents(): PipelineEvent[]; private onEngineEvent; private onPullCompleted; private onSpecFileChanged; private enqueueTask; private processQueue; private executeTask; private startSpecWatchers; private snapshotDesignSystem; private diffTokenCount; private diffComponentCount; private emitPipelineEvent; }