Skip to content
1 min read · 187 words

Interface: TrustedContentAttrs

Defined in: src/batteries/llm/chat_common/types.ts:125

Attribute bag rendered onto the trust envelope that wraps trusted (first-party) content.

Properties

PropertyTypeDescriptionDefined in
kindstringContent classifier rendered on the envelope.src/batteries/llm/chat_common/types.ts:137
modality?"opaque" | "inert" | "extractable"Same semantics as UntrustedContentAttrs.modality.src/batteries/llm/chat_common/types.ts:143
noncestringNonce binding the envelope's open and close markers together — it becomes part of the tag NAME (<..._<nonce>>) so a model mirroring the fence cannot forge a sibling's closer. FOOTGUN: this nonce MUST be unguessable AND non-path-shaped. It is typically the source record's id; a path-shaped id (e.g. chunk-assembly-events-9) is copied by small models as a CITATION (/assembly/events-9), which a doc-path validator then rejects → re-cite loop. Mint record ids with crypto.randomUUID(); carry page/human provenance in source= (rendered before nonce=), never in the id.src/batteries/llm/chat_common/types.ts:135
tool?stringName of the tool that produced the content, when applicable.src/batteries/llm/chat_common/types.ts:139