/** * Sources the evaluator may gate. New sources land in AGIM_NOTIFICATION_EVALUATOR_SOURCES * comma-list (precedence: env > built-in default below). */ export type NotificationSource = 'push' | 'notify' | 'reminder' | 'heartbeat'; export interface EvaluationInput { /** Where this outbound originated. Required — drives the * gating-source decision. */ source: NotificationSource; /** Text body about to be delivered. Card payloads should NOT call * this gate at all (see design constraint #5). */ text: string; /** Target IM thread string `platform:channelId:threadId` — used only * for audit row context, not the verdict prompt. */ targetThread: string; /** Optional caller context for push_message — propagates into the * audit row so operators can trace "which agent kept spamming". */ caller?: { platform: string; userId: string; agent?: string; }; /** Trace id to thread the audit row to the originating request. */ traceId?: string; } export interface EvaluationDecision { /** true = let the message through; false = silently drop. */ shouldDeliver: boolean; /** One-line operator-facing reason. Surfaces in audit_events.details * for every suppression and in the structured log for every call. */ reason: string; /** Which code path produced the decision. * - 'disabled' — AGIM_NOTIFICATION_EVALUATOR not 'on' * - 'source-excluded' — gate on, but this source isn't in the * gated-sources set * - 'no-backend' — gate on, source gated, but no 'evaluator' role * in the LLM registry * - 'fail-open' — gate ran, LLM call / parse failed; deliver anyway * - 'evaluator' — gate ran, LLM returned a definitive verdict */ via: 'disabled' | 'source-excluded' | 'no-backend' | 'fail-open' | 'evaluator'; } /** * Decide whether `input.text` is worth delivering. Always returns a * decision — never throws. Callers that get `shouldDeliver: false` * MUST silently drop the message; the audit row + log line already * recorded the suppression. */ export declare function evaluateNotification(input: EvaluationInput): Promise; //# sourceMappingURL=notification-evaluator.d.ts.map