import type { KnowledgeManager } from "../../../knowledge/knowledge-manager.js";
import { SkillLayer, type VirtualSkillFile, type WriteResult } from "../../../skills/index.js";
import type { FileMetadata, VirtualFileHandler, VirtualPathInfo, VirtualReadOptions, VirtualWriteOptions, VirtualDeleteOptions } from "../virtual-fs-types.js";
export declare class SkillFileHandler implements VirtualFileHandler {
    readonly type = "skill";
    private readonly logger;
    private readonly knowledgeManager?;
    private currentAppRootDirPath?;
    private systemSkillsDirPath?;
    private systemSkillsMaterializationPromise?;
    constructor(knowledgeManager?: KnowledgeManager, appRootDirPath?: string);
    /**
     * Check if path is a system skill path.
     */
    isSkillPathForLayer(layer: SkillLayer, virtualPath: string): boolean;
    /**
     * Check if this handler manages the given virtual path.
     */
    matches(virtualPath: string): boolean;
    /**
     * Check if a physical path belongs to this handler's domain.
     * App skills are stored at their virtual path (.superblocks/skills/app/).
     */
    matchesPhysical(physicalPath: string): boolean;
    /**
     * Parse a virtual path to extract skill info.
     */
    parse(virtualPath: string): VirtualPathInfo | undefined;
    /**
     * Convert physical path to virtual path.
     * App skills use their physical path as their virtual path.
     */
    toVirtualPath(physicalPath: string): string | undefined;
    /**
     * Read a skill file.
     * Used by Clark's readFile tool for progressive loading.
     */
    read(virtualPath: string, options: VirtualReadOptions): Promise<string | undefined>;
    /**
     * Write a skill file.
     * Only allowed for app skills; org/user skills go through Learning API.
     */
    write(virtualPath: string, content: string, options: VirtualWriteOptions): Promise<void>;
    /**
     * Write a skill file with result object.
     * This is the preferred method for Track 2 integration.
     */
    writeSkillFile(virtualPath: string, _content: string, _options: VirtualWriteOptions): Promise<WriteResult>;
    /**
     * Delete a skill file.
     * System skills cannot be deleted.
     */
    delete(virtualPath: string, _options: VirtualDeleteOptions): Promise<string[]>;
    /**
     * Get metadata for a skill file.
     */
    getMetadata(virtualPath: string, options: VirtualReadOptions): Promise<FileMetadata | undefined>;
    /**
     * List files in a skill directory.
     * Used by Clark's listFiles tool for discovery.
     */
    listFiles(virtualPath: string, options: VirtualReadOptions): Promise<VirtualSkillFile[]>;
    /**
     * List skill files for AppShell compatibility.
     * Returns FileMetadata[] for integration with existing listing code.
     */
    listSkillFilesAsMetadata(virtualPath: string, options: VirtualReadOptions): Promise<FileMetadata[]>;
    private ensureSystemSkillsMaterialized;
    private prewarmSystemSkillsMaterialization;
    private readSystemSkill;
    private getSystemSkillMetadata;
    private listSystemSkills;
    private listSystemSkillsFromDisk;
    private listSystemSkillsFromRegistry;
    /**
     * Format a fact as markdown content for Clark to read.
     */
    private formatFactAsKnowledge;
    /**
     * Read an org fact.
     * Path format: skills/org/{factId}/KNOWLEDGE.md
     */
    private readOrgFact;
    /**
     * Read a user fact.
     * Path format: skills/user/{factId}/KNOWLEDGE.md
     */
    private readUserFact;
    /**
     * Read an integration fact.
     * Path format: skills/integrations/{integrationId}/{factId}/KNOWLEDGE.md
     */
    private readIntegrationFact;
}
//# sourceMappingURL=skill-handler.d.ts.map