import type { ActionSchema } from './action-schema.js'; import type { PersonaSpec } from './persona.js'; export interface CharacterMemoryConfig { /** * Maximum number of prior (user, assistant) turn pairs to retain in the * sliding window. Older turns are dropped. */ readonly maxTurns?: number; } export interface CharacterConfig { /** * Stable identifier. Used as the engine prefix-cache context key so the * immutable system prompt stays resident across turns. */ readonly id: string; readonly persona: PersonaSpec; readonly actions: ActionSchema; readonly memory?: CharacterMemoryConfig; } export declare class CharacterConfigError extends Error { constructor(message: string); } /** * Parses and validates a CharacterConfig object (e.g. the result of * `JSON.parse(readFileSync('character.json'))`). Throws CharacterConfigError * with a human-readable message on any problem. */ export declare function parseCharacterConfig(raw: unknown): CharacterConfig; /** * Default memory window. Chosen to keep prompt size bounded while still * providing enough recency for conversational coherence. */ export declare const DEFAULT_MEMORY_MAX_TURNS = 8; export declare function resolveMaxMemoryTurns(config: CharacterConfig): number;