/** * Largest Markdown memory document a commit may store, in UTF-8 bytes: half of what a run reads, * so a bot's document and the space's shared one both reach the prompt. */ export const MEMORY_DOCUMENT_MAX_BYTES = 16 * 1024; /** A commit would grow a memory document past MEMORY_DOCUMENT_MAX_BYTES. */ export class MemoryDocumentTooLargeError extends Error { constructor(readonly path: string) { super(`${path} would exceed ${MEMORY_DOCUMENT_MAX_BYTES / 1024} KB`); this.name = "MemoryDocumentTooLargeError"; } }