import type { Observation } from "../types"; export interface FolderContextOptions { mode: "dispersed" | "single"; filename: string; maxDepth: number; } /** * Update AGENTS.md files for folders referenced by observations. * * Groups observations by the folders their files belong to, generates * a context block for each folder, and writes it into the managed * section of each folder's AGENTS.md. * * @param projectPath - Absolute path to the project root * @param observations - Observations from the current session * @param options - Configuration options (mode, filename, maxDepth) */ export declare function updateFolderContext(projectPath: string, observations: Observation[], options: FolderContextOptions): Promise; /** * Quality filter: excludes noise observations like "bash execution", "read execution". * Matches titles like "[word] execution" or "[word-word] execution". */ export declare function isHighQualityObservation(obs: Observation): boolean; /** * Generate a markdown context block for a folder's recent activity. * * @param folderPath - Absolute path to the folder * @param observations - Observations relevant to this folder * @param projectPath - Absolute path to the project root * @returns Markdown string for the managed section */ export declare function generateFolderContext(folderPath: string, observations: Observation[], projectPath: string): string; /** * Update the managed section of an AGENTS.md file in the given folder. * * - Reads existing AGENTS.md if present * - Replaces content between managed tags (or appends if no tags exist) * - Preserves user content outside the tags * - Writes atomically via temp file + rename * * @param folderPath - Absolute path to the folder (must exist) * @param contextBlock - New content for the managed section */ export declare function updateAgentsMd(folderPath: string, contextBlock: string, filename: string): Promise; /** * Replace content between managed tags, preserving everything else. * * Three cases: * 1. No existing content → wrap new content in tags * 2. Has existing tags → replace only tagged section * 3. No tags in existing content → append tagged content at end */ export declare function replaceTaggedContent(existingContent: string, newContent: string): string; //# sourceMappingURL=agents-md.d.ts.map