On this page
Overview
Normalizes message content advisories and contains per-message inspection failures.
- Artifact
MessageAdvisory.js· esm - Classification
public first party - Availability
Cross-host - Normalization
Complete mutable advisory records preserve all supplied text and signals; inspector failures become unavailable results.
Import and lifecycle
import * as module from '/arcane/modules/MessageAdvisory.js';
Pure normalization except for awaiting injected prepare/inspector callbacks. Callback failures are contained as unavailable advisories; inputs are not mutated.
Application-facing behavior: Three advisory/inspection helpers.
Protocol and host implementation
Injected inspector This detail does not widen the application-facing API or grant authority.
Exports, signatures, parameters, and results
| Binding | Form | Declaration or signature | Parameter syntax |
|---|---|---|---|
normalizeContentAdvisory | function | function normalizeContentAdvisory(value) | value |
unavailableMessageInspection | function | function unavailableMessageInspection(messages) | messages |
inspectMessageRecords | function | async function inspectMessageRecords(messages,inspector,{prepare}={}) | messages,inspector,{prepare}={} |
Parameter meanings and results
normalizeContentAdvisory(value) returns a complete mutable advisory or null. unavailableMessageInspection(messages) returns {advisories:Map,failures}. inspectMessageRecords(messages,inspector,{prepare?}) resolves the same shape without clipping text or signals.
Events, side effects, and errors
Source-literal CustomEvent dispatches
No source-literal CustomEvent dispatch is part of this artifact.
Lifecycle and event flow
This artifact has no additional documented lifecycle event flow.
Direct coded failures
This artifact directly assigns no stable coded failure.
Exported Error subclasses
This artifact exports no Error subclass.
Documented failure behavior
- prepare/inspector rejections become unavailable results.
- Iterable/runtime errors outside those callbacks can propagate.
Availability and capabilities
Cross-host. Complete mutable advisory records preserve all supplied text and signals; inspector failures become unavailable results.
None; the injected inspector owns authority.
Contract example
import {inspectMessageRecords} from '/arcane/modules/MessageAdvisory.js';
const messages = [{body:'Please verify independently.'}];
const result = await inspectMessageRecords(messages, async () => ({
level:'low',
title:'Checked',
summary:'No strong signal.'
}));
console.log(result.advisories.get(messages[0]));
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.