/**
 * Persistence layer for per-user learnings.
 * Stored as JSONL at ~/.blockrun/learnings.jsonl.
 */
import type { Learning, LearningCategory, Skill } from './types.js';
export declare function loadLearnings(): Learning[];
export declare function saveLearnings(learnings: Learning[]): void;
export declare function mergeLearning(existing: Learning[], newEntry: {
    learning: string;
    category: LearningCategory;
    confidence: number;
    source_session: string;
}): Learning[];
export declare function decayLearnings(learnings: Learning[]): Learning[];
export declare function formatForPrompt(learnings: Learning[]): string;
/**
 * One-time migration of legacy auto-extracted skills.
 *
 * Before the unified registry, learned skills were flat markdown files at
 * `~/.blockrun/skills/<name>.md`. The new layout expects
 * `~/.blockrun/skills/learned/<name>/SKILL.md`, and the user-source loader
 * only reads `<dir>/SKILL.md` — so the old flat files would be silently
 * orphaned on upgrade. This moves each one into the new layout (normalizing
 * it through `saveSkill`, which adds `hidden`/`auto-generated`) and deletes
 * the old file. Idempotent and cheap: returns immediately when there are no
 * flat `.md` files left to migrate.
 */
export declare function migrateLegacyLearnedSkills(): number;
/** Load all learned skills from `~/.blockrun/skills/learned/`. */
export declare function loadSkills(): Skill[];
/** Save a new auto-extracted skill to disk in unified SKILL.md format. */
export declare function saveSkill(skill: Skill): void;
/** Bump use count for a skill. */
export declare function bumpSkillUse(skill: Skill): void;
/**
 * Compat shim retained so older callers keep working while the rest of the
 * codebase migrates to `src/skills/triggers.ts`. New code should NOT depend
 * on this — it ignores `hidden` and `disableModelInvocation` flags.
 */
export declare function matchSkills(input: string, skills: Skill[]): Skill[];
/**
 * Compat shim. The new code path injects skills per-turn via
 * `formatSkillHints` rather than baking them into the boot-time system
 * prompt, so callers should not need this any more.
 */
export declare function formatSkillsForPrompt(skills: Skill[]): string;
