/**
 * 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 '<cmd>' failed: <truncated stderr>"
 */
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[];
/**
 * 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