Skip to content

Function: causalRequestHeaders()

@kortexya/reasoninglayer


@kortexya/reasoninglayer / causalRequestHeaders

causalRequestHeaders(causal): Record<string, string>

Defined in: src/utils/audit-headers.ts:75

Build the request headers for a set of causal assertions.

AuditCausalHeaders

The assertions to send.

Record<string, string>

One header per field set; informedBy is comma-joined and omitted when empty.

The values go out verbatim. The engine validates them (a UUID, a 64-hex commitment, a signer/signature pair) and answers 400 for a malformed one, so the SDK does not duplicate that check.

causalRequestHeaders({ causedBy: id, informedBy: [a, b] });
// { 'x-osfkb-caused-by': id, 'x-osfkb-informed-by': `${a},${b}` }