Skip to main content

encloseUntrusted

@forge/monorepo


@forge/monorepo / backend/src / encloseUntrusted

Function: encloseUntrusted()

encloseUntrusted(input): string

Defined in: backend/src/security/prompt-safety.ts:92

Wrap untrusted content in a delimited, labelled envelope.

The nonce is injected rather than generated here, so a test can assert the exact bytes. A caller passes a random one per assembly — per assembly, not per section, so one preamble can cover several sections and the prompt does not repeat itself once per retrieved document.

Parameters

input

body

string

nonce

string

provenance

string

title

string

Returns

string