The diagnostic to emit and how to route it.
Whether an emission happened: true when a configured
observer was invoked or the record reached the console, false when the
configuration suppressed the diagnostic. One-shot emitters use this
result instead of reimplementing the routing, avoiding mismatches such as
consuming a silent-mode warning without emitting it.
The single emit path for the library's unsolicited diagnostics: the hook-failure fallback and the
stateOwnerkeying warning. Both produce a structured AniLinkDiagnostic record so platform log collectors get filterablesource/kind/hookName/requestIdfields instead of prose.Emission follows the configured DiagnosticsMode:
"silent"suppresses the unsolicited output entirely;"hook"routes throughonHookErroronly and never touches the console;"warn"routes throughonHookErrorwhen configured, falling back to aconsole.warnof the JSON-serialized record. One exception: a diagnostic carrying arawError(a real hook failure) always reaches a configured observer, in every mode. The modes control only the fallback. Exceptions from an observer are caught so a broken logger cannot break the request pipeline.