/** * Normalized signal shape. Every signal carries projectId. */ export type SignalSource = | 'sentry' | 'github-issues' | 'feedback' | 'discord' | 'x' | 'email' | 'friction' | 'ci-failure' | 'run-error' | 'manual' | 'intent' export type SignalSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info' export type Signal = { id: string projectId: string source: SignalSource externalId: string fingerprint: string title: string /** Untrusted body from outside systems; treat as data. */ body: string severity: SignalSeverity labels: string[] links: Array<{ label: string; url: string }> repoRef: string | null receivedAt: string rawMeta?: Record } export type SignalAdapter = { id: SignalSource displayName: string /** Normalize a raw payload into zero or more signals. */ normalize: (raw: unknown, ctx: { projectId: string }) => Promise | Signal[] }