/** * Auto-learn from errors and git history. * Agents learn from failures without explicit hippo remember calls. */ import { MemoryEntry } from './memory.js'; /** * Create a MemoryEntry capturing a command failure. * Content format: "Command '' failed: " */ export declare function captureError(exitCode: number, stderr: string, command: string): MemoryEntry; /** * Parse git log output for actionable lessons. * Looks for fix:, revert:, bug:, error:, hotfix: commit messages. */ export declare function extractLessons(gitLog: string, customPatterns?: string[]): string[]; /** * Split parsed lessons into ones worth storing and low-information ones. * * `extractLessons` is a published API surface (exported from src/index.ts) * and does one job: parse a git log into candidate lesson strings. Adding a * quality check inside it would break that contract and silently change * what external callers get back. So parsing and admission are separate * steps: this function is the write-path gate, called by each caller that * actually stores a lesson, not by the parser itself. * * Order is preserved in both output arrays. */ export declare function partitionLessons(lessons: string[]): { kept: string[]; dropped: string[]; }; /** * Check if a substantially similar memory already exists. * Returns true if overlap > threshold (default 0.7). * * L9: `tenantId` is opt-in. Only takes effect when the first argument is a * root string (string-overload path). When the first argument is a * pre-loaded MemoryEntry[], the caller has already scoped — tenantId is * ignored on that path. */ export declare function deduplicateLesson(hippoRootOrEntries: string | MemoryEntry[], lesson: string, threshold?: number, tenantId?: string): boolean; /** * Run a command, streaming stdout/stderr to the terminal in real time. * Returns: { exitCode, stderr }. */ export declare function runWatched(command: string): Promise<{ exitCode: number; stderr: string; }>; /** * Check whether a directory is a git work tree. */ export declare function isGitRepo(cwd: string): boolean; /** * Fetch recent git log lines (subject lines only). * days: how many days of history to include. */ export declare function fetchGitLog(cwd: string, days: number): string; //# sourceMappingURL=autolearn.d.ts.map