/** * The `[User]`, `[Context]` and `[Memory]` prompt blocks — one * implementation, because they are a prompt-injection defence and a defence * with two copies is a defence that will be fixed once. * * All three render host-, CLIENT- or USER-supplied text (`ctx.user` is the * host's asserted profile, filled from user-authored fields like a display * name; `ctx.context` is whatever the browser widget sent, on every POST * /threads, including from an unauthenticated visitor; a memory is a sentence * the person asked to be kept, read back turns later). Prompt sections are * joined on a blank line and nothing escapes a newline, so a value that * CONTAINS a blank line followed by a section header is indistinguishable from * a section the assembler wrote itself — including a forged `Directions`, which * is the guard's mandatory-policy section. * * `@vendoai/vendo` assembles these blocks twice over: once for the embed and * once for its standalone agent surface. They lived as two copies that a comment * in each pointed at, and only the embed's carried the observation label. */ import type { Json } from "./ids.js"; /** * One `key: value` line per fact, run through the indent defence. * * Function-valued entries never reach the model: they belong to the host's ctx * bag and are callable at guard/tool check-time. `undefined` entries drop. */ export declare function promptFactLines(facts: Record): string[]; /** The host's asserted profile of the present user — server-trust, model-visible. * `undefined` when there is nothing to say, so no caller emits a bare header. */ export declare function userPromptBlock(facts: Record | undefined): string | undefined; /** What the user's screen currently shows, this turn only. Labeled as * observation so the model reads page content as evidence, never as * instruction — the half of the defence the standalone copy was missing. */ export declare function situationPromptBlock(facts: Record | undefined): string | undefined; /** What this person asked the agent to remember, across conversations — capped * by the caller, whose prompt budget it is. Labeled as their words the same way * `[Context]` labels observation: a memory is text a person (or a model * writing on their behalf) authored and the model reads back turns later, so it * is evidence about them and never an instruction to it. Blank entries drop, so * an empty memory cannot emit a bare bullet. */ export declare function memoryPromptBlock(memories: readonly string[] | undefined): string | undefined;