Graphorin API reference v0.8.0
Graphorin API reference / @graphorin/tools / outbound
outbound
@graphorin/tools/outbound - single-source outbound commentary pattern catalogue + envelope helpers shared by the server delivery layer, the session-output boundary and the channel gateway.
Interfaces
| Interface | Description |
|---|---|
| OutboundCommentaryPattern | Single pattern entry in the OUTBOUND_COMMENTARY_PATTERNS catalogue. |
Type Aliases
| Type Alias | Description |
|---|---|
| OutboundCommentaryPolicy | Operator-facing policy shared by all outbound commentary sanitizers. |
| OutboundCommentaryReason | Stable label for each detection pattern. Surfaced in audit rows; the counter label cardinality is bounded. |
Variables
| Variable | Description |
|---|---|
| COMMENTARY_WRAP_CLOSE | Default wrap-envelope close delimiter. See COMMENTARY_WRAP_OPEN. |
| COMMENTARY_WRAP_OPEN | Default wrap-envelope open delimiter shared by all outbound sanitizers, so a fragment wrapped at one boundary is recognized (and never re-wrapped) at every other boundary. |
| OUTBOUND_COMMENTARY_PATTERNS | The framework-shipped catalogue: the seven event-shape signatures the agent runtime can emit which, if leaked into user-visible text, disclose internal tool execution detail. Bytes-equal across every boundary that consumes it; idempotent on a single payload (the wrap envelope itself is not matched by any pattern, so a second pass over previously-sanitized output is a no-op). |
Functions
| Function | Description |
|---|---|
| freshRegex | Clone a regex before every scan. RegExp instances with the g flag carry a mutable lastIndex; cloning keeps sanitizers built over the shared catalogue stateless. |
| sha256Hex | Hex-encoded SHA-256 of a UTF-8 string. Used for the before/after digests on sanitization audit rows (raw payloads never reach the audit log). |
| splitByWrapEnvelope | Split a body into already-wrapped + plain segments so a sanitizer never re-scans inside an existing wrap envelope. This is the idempotency primitive that makes layered outbound sanitization (storage-write, wire-emission, channel delivery) composable: a second pass over previously-sanitized output is bytes-equal. |