export declare const PROJECT_MEMORY_TYPES: readonly ["fact", "decision", "pattern", "procedure", "constraint", "failure-resolution"]; export type ProjectMemoryType = (typeof PROJECT_MEMORY_TYPES)[number]; export declare const PROJECT_MEMORY_INDEX_FILE = "MEMORY.md"; export declare const PROJECT_MEMORY_EXPANSION_PREFIX = "project-memory:"; /** Context candidate id of the always-injected MEMORY.md index. */ export declare const PROJECT_MEMORY_INDEX_CANDIDATE_ID = "project-memory-index"; export interface ProjectMemoryEntry { readonly slug: string; readonly title: string; readonly description: string; readonly type: ProjectMemoryType; readonly created: string; readonly updated: string; readonly paths: readonly string[]; readonly source?: string; readonly body: string; } export interface ProjectMemoryIndexEntry { readonly slug: string; readonly title: string; readonly description: string; } export interface WriteProjectMemoryInput { readonly title: string; readonly text: string; readonly type?: ProjectMemoryType; readonly description?: string; readonly slug?: string; readonly paths?: readonly string[]; readonly source?: string; } export interface WriteProjectMemoryResult { readonly action: 'created' | 'updated'; readonly slug: string; readonly file: string; readonly entry: ProjectMemoryEntry; readonly total: number; } export interface ProjectMemoryStoreOptions { readonly cacheRoot?: string; readonly now?: () => Date; } export declare function isProjectMemoryType(value: unknown): value is ProjectMemoryType; export declare function resolveProjectMemoryDirectory(projectRoot: string, cacheRoot?: string): string; export declare function readProjectMemoryIndex(projectRoot: string, cacheRoot?: string): Promise; export declare function readProjectMemory(projectRoot: string, slug: string, cacheRoot?: string): Promise; export interface ProjectMemoryEntrySummary { readonly slug: string; readonly title: string; readonly description: string; readonly type: ProjectMemoryType; readonly created: string; readonly updated: string; readonly paths: readonly string[]; readonly source?: string; } export declare function readProjectMemoryEntries(projectRoot: string, cacheRoot?: string): Promise; export declare function writeProjectMemory(projectRoot: string, input: WriteProjectMemoryInput, options?: ProjectMemoryStoreOptions): Promise; export declare function removeProjectMemory(projectRoot: string, slug: string, cacheRoot?: string): Promise; export interface ProjectMemoryCompletionStatus { readonly count: number; readonly lastWriteAt?: string; readonly reminder: string; } /** * Structural task-end nudge surfaced by `comet task --complete`: the tool * response itself reminds the agent to record reusable lessons, so writing * does not depend on rule compliance alone. */ export declare function renderProjectMemoryCompletionReminder(entries: readonly { readonly updated: string; }[]): ProjectMemoryCompletionStatus; export declare function renderProjectMemoryIndexContext(entries: readonly ProjectMemoryIndexEntry[], language?: 'zh-CN' | 'en'): string | null; //# sourceMappingURL=project-memory.d.ts.map