/** * Pure bounding/formatting for the local-memory prompt-inclusion pilot (see * memory-retrieval.ts for the observe-only retrieval this consumes). This module only ever * builds bounded, plain text; it does not know about messages, the transcript, the * untrusted-content boundary, or AgentSession -- all of that wiring lives in * agent-session.ts, which wraps this module's output with `wrapUntrustedText` before * appending it to the provider-visible prompt. * * These caps are the ONLY budget protection for the injected block: it is appended AFTER * context-gc and prompt-policy enforcement have already run, so nothing downstream trims * it. Treat `MAX_CHARS_PER_ITEM`/`MAX_TOTAL_CHARS` as load-bearing, not merely defensive. */ import { type ContextItem } from "./context-item.ts"; import type { MemoryPromptBudget } from "./memory-prompt-budget.ts"; export declare const MEMORY_PROMPT_BLOCK_MAX_CHARS_PER_ITEM = 300; export declare const MEMORY_PROMPT_BLOCK_MAX_TOTAL_CHARS = 2000; export interface MemoryPromptBlockOptions { maxCharsPerItem?: number; maxTotalChars?: number; budget?: MemoryPromptBudget; } export interface MemoryPromptBlockResult { /** undefined when there is nothing to include (no items, or all summaries empty). */ text: string | undefined; includedCount: number; omittedCount: number; } /** * Builds a numbered, per-item-truncated list of memory item summaries, bounded to a hard * total character budget. Always includes at least the first non-empty item (truncated to * `maxCharsPerItem`, which is expected to be well under `maxTotalChars`), even if that item * alone would otherwise exceed the total budget -- callers should never see a report with * results but an empty block. */ export declare function buildMemoryPromptBlock(contextItems: readonly ContextItem[], options?: MemoryPromptBlockOptions): MemoryPromptBlockResult; //# sourceMappingURL=memory-prompt-block.d.ts.map