import type { WorkflowExecution } from '@hotmeshio/hotmesh/build/types/exporter'; import type { StreamMessage } from '../controlplane/types'; export interface Finding { condition: string; confidence: number; severity: 'critical' | 'warning' | 'info'; evidence: string[]; /** * Read-only diagnostic guidance: what the condition means and where a human * should look next. This is NOT recovery — HotMesh state only moves forward * and cannot be unwound, so guidance never prescribes mutating job state. */ guidance: Guidance[]; } export interface Guidance { action: string; note: string; [key: string]: unknown; } /** * Match event stream + stream messages against known workflow conditions. * Returns findings ordered by severity (critical first). * * Healthy long-waits are a first-class outcome here, not an omission: a * workflow suspended at `condition()`/`waitFor()`/`sleepFor()` can sit for days * legitimately, so we classify those explicitly rather than treating a frozen * job as broken. */ export declare function matchPatterns(execution: WorkflowExecution, workerMessages: StreamMessage[], engineMessages: StreamMessage[], escalationRow: Record | null): Finding[];