import { PromptModule, ModuleConfig } from './prompt-module.interface.js'; import { StandingAnswersService, type StandingPageStatus } from '../../memory/standing-answers.service.js'; /** Heading of the section this module emits. */ export declare const STANDING_ANSWERS_HEADING = "## Standing Answers"; /** * Render the Standing Answers section from page statuses, under the prompt cap. * * Pages with no sections are skipped. The agent page comes first (what I * owe), then project pages. A stale page is labelled with how many newer * memories it has not absorbed, and a section whose cited entries were * deleted or are no longer in force is marked **BASIS INVALIDATED** with * those citations named (#914). Each page body is capped at * `PROMPT_PAGE_MAX_CHARS`; pages that would push the section past * `PROMPT_MAX_CHARS` are named in a "not shown" line instead. The result is * never longer than `PROMPT_MAX_CHARS`. Secrets are masked on the way out * even though writes already mask them (a page can be hand-edited). * * @param statuses - Page statuses from {@link StandingAnswersService} * @param maxChars - Section cap (default `PROMPT_MAX_CHARS`) * @returns Section markdown, or '' when no page has content * * @example * ```typescript * const md = renderStandingAnswers(await service.listPageStatuses({ projectPath, sessionName })); * ``` */ export declare function renderStandingAnswers(statuses: readonly StandingPageStatus[], maxChars?: number): string; /** * Standing Answers module — boot-time settled knowledge (#816). * * Reads the project's standing pages and the agent's own page as plain * files (no retrieval, no LLM), marks a page STALE when newer in-scope * memories exist, and renders them under a hard character cap so an agent * can answer "what decisions are in force / what's unfinished" without * calling recall. * * Priority 1.7: after Active Work (1.5) and the session briefing (1.6), * before the recovery protocol (2). Compactable — it is reference material, * and the assembler may trim it under budget pressure; its own cap * (`PROMPT_MAX_CHARS` ≈ 2 000 tokens) keeps it well inside `maxTokens`. * Fail-soft: any read error yields '' rather than breaking assembly. */ export declare class StandingAnswersModule implements PromptModule { private readonly service; name: string; priority: number; maxTokens: number; compactable: boolean; private readonly logger; /** * @param service - Page reader (injectable for tests) */ constructor(service?: StandingAnswersService); /** * Included when there is a project or a session to read pages for. * * @param config - Module configuration * @returns true when `projectPath` or `sessionName` is set */ shouldInclude(config: ModuleConfig): boolean; /** * Read the pages and render the section. * * @param config - Module configuration (`projectPath`, `sessionName`) * @returns Section markdown, or '' when no page has content or reading fails */ build(config: ModuleConfig): Promise; } //# sourceMappingURL=standing-answers.module.d.ts.map