Skip to content

renderAlignmentUserMessages

renderAlignmentUserMessages(userMessages, home?): string[]

Defined in: packages/core/src/core/shell/alignment.ts:381

§5.1’s bounds, applied to the user role: the LAST NEGOTIATION_MAX_USER_MESSAGES non-blank messages, each folded, collapsed to one line, unable to close its own fence, and truncated to NEGOTIATION_USER_MESSAGE_MAX_CHARS including the ellipsis.

The bounds are applied HERE rather than trusted from the caller, so a caller that hands over an entire conversation still cannot put a pasted log into the checker’s context. Blanks are dropped BEFORE the window is taken, so a run of empty turns cannot spend the budget that carries the mandate — and “blank” counts the invisibles, so a value carrying only those cannot occupy a slot a reader would see nothing in.

These are the user’s own words and they are STILL fenced, which is not a contradiction. The role is what says whose words they are; the fence is what stops one of them ending the block and writing our prose. A user can paste anything, including a paragraph shaped like our own headings.

readonly string[]

string

string[]