logical.redactValuefunctionno test imports itfunction redactValue(value: unknown, redact: Redactor): unknownA value with every string in it redacted, whatever it is made of (arrays and plain objects are walked; other values are kept as they are).
The redaction policy of an outcome (commons headless 0003-headless-output FR-011): before anything is drawn, logged or returned, every text of the outcome (messages, fixes, raw errors, outcome lines, steps, hints, the report's text, and every string of its data, however deep) passes through the program's redactor, so that no surface has to remember to. The mask is the governance's; the policy is where it is applied.
import { redactOutcome } from "./redaction.ts";
import { outcomeOf } from "./outcome.ts";
import { redactor } from "@intellectual-frontiers/headless/governance";
redactOutcome(outcomeOf({ url: "postgres://a:hunter22@h/x" }), redactor([])).data; // { url: "postgres://a:***@h/x" }logical.redactValuefunctionno test imports itfunction redactValue(value: unknown, redact: Redactor): unknownA value with every string in it redacted, whatever it is made of (arrays and plain objects are walked; other values are kept as they are).
logical.redactOutcomefunctionno test imports itfunction redactOutcome<D>(o: Outcome<D>, redact: Redactor): Outcome<D>The outcome with every text redacted. Redacting twice is redacting once.
logical.redactEventfunctionno test imports itfunction redactEvent(event: ProgressEvent, redact: Redactor): ProgressEventA progress event with every text redacted: what a command tells while it runs is held to the policy as much as what it returns.
redactValuefunctionfunction redactValue(value: unknown, redact: Redactor): unknownA value with every string in it redacted, whatever it is made of (arrays and plain objects are walked; other values are kept as they are).
redactOutcomefunctionfunction redactOutcome<D>(o: Outcome<D>, redact: Redactor): Outcome<D>The outcome with every text redacted. Redacting twice is redacting once.
redactEventfunctionfunction redactEvent(event: ProgressEvent, redact: Redactor): ProgressEventA progress event with every text redacted: what a command tells while it runs is held to the policy as much as what it returns.