export type SkillLifecycleState = "active" | "stale" | "archived";
export interface SkillLifecycleRecord {
    name: string;
    state: SkillLifecycleState;
    createdAt: string;
    lastUsedAt?: string;
    lastViewedAt?: string;
    lastPatchedAt?: string;
    staleAt?: string;
    archivedAt?: string;
    pinned: boolean;
    useCount: number;
    source: "learned" | "created" | "installed" | "promoted";
    resourceType?: string;
    launcherRequired?: boolean;
    manualReviewRequired?: boolean;
    sourceTier?: "official" | "community";
    riskTier?: "R0" | "R1" | "R2" | "R3";
    artifactDigest?: string;
    registryResourceId?: string;
    registryVersion?: string;
    registrySourceTier?: "official" | "community";
    registryRiskTier?: "R0" | "R1" | "R2" | "R3";
    registryEffectiveRiskTier?: "R0" | "R1" | "R2" | "R3";
    registryKeptSignalAt?: string;
}
export interface SkillLifecycleStore {
    version: 1;
    records: Record<string, SkillLifecycleRecord>;
}
export interface CuratorResult {
    transitioned: Array<{
        name: string;
        from: SkillLifecycleState;
        to: SkillLifecycleState;
    }>;
    skippedPinned: string[];
}
export declare function loadLifecycleStore(agentHome: string): SkillLifecycleStore;
export declare function saveLifecycleStore(agentHome: string, store: SkillLifecycleStore): void;
/**
 * Ensure a lifecycle record exists for a skill. Creates one if missing.
 */
export declare function ensureRecord(store: SkillLifecycleStore, name: string, source?: SkillLifecycleRecord["source"]): SkillLifecycleRecord;
/**
 * Record a skill invocation — resets to active if stale.
 */
export declare function recordInvocation(store: SkillLifecycleStore, name: string): void;
/**
 * Record that a skill was viewed/listed.
 */
export declare function recordView(store: SkillLifecycleStore, name: string): void;
/**
 * Record that a skill was edited/patched.
 */
export declare function recordPatch(store: SkillLifecycleStore, name: string): void;
export declare function pinSkill(store: SkillLifecycleStore, name: string): boolean;
export declare function unpinSkill(store: SkillLifecycleStore, name: string): boolean;
export declare function isPinned(store: SkillLifecycleStore, name: string): boolean;
/**
 * Run curator evaluation on all skills. Transitions states based on inactivity.
 * Pinned skills are never transitioned.
 *
 * Call this on agent idle, periodic timer, or explicit RPC.
 */
export declare function runCurator(store: SkillLifecycleStore): CuratorResult;
/**
 * Archive a skill on disk: move its directory to `.archive/` subfolder.
 * Returns true if archival succeeded.
 */
export declare function archiveSkillOnDisk(skillsDir: string, skillName: string): boolean;
/**
 * Unarchive a skill: move from `.archive/` back to main skills dir.
 * Resets state to active.
 */
export declare function unarchiveSkillOnDisk(skillsDir: string, skillName: string): boolean;
/**
 * Execute full curator cycle: evaluate state transitions + archive on disk.
 * Returns curator result with all transitions made.
 */
export declare function executeCuratorCycle(agentHome: string, skillsDir: string): CuratorResult;
/**
 * Get all skills in a given state.
 */
export declare function getSkillsByState(store: SkillLifecycleStore, state: SkillLifecycleState): SkillLifecycleRecord[];
/**
 * Get lifecycle record for a skill. Returns undefined if not tracked.
 */
export declare function getLifecycleRecord(store: SkillLifecycleStore, name: string): SkillLifecycleRecord | undefined;
/**
 * Remove a lifecycle record (e.g., when skill is deleted).
 */
export declare function removeRecord(store: SkillLifecycleStore, name: string): void;
