/**
 * Parsed YAML frontmatter from a SKILL.md file.
 * Keys are lowercased header names; values are always coerced to strings.
 */
export type ParsedSkillFrontmatter = Record<string, string>;
/**
 * A discovered skill on the filesystem.
 */
export interface WorkspaceSkill {
    /** Display name (directory name by default). */
    name: string;
    /** One-line description extracted from frontmatter. */
    description?: string;
    /** Source tag for precedence/debugging, e.g. "bundled", "user", "project". */
    source: string;
    /** Absolute path to the SKILL.md file. */
    filePath: string;
    /** Absolute path to the skill directory (parent of SKILL.md). */
    baseDir: string;
    /** Primary runtime environment hint, e.g. "node", "python". */
    primaryEnv?: string;
    /** Environment variables the skill requires. */
    requiredEnv?: string[];
}
/**
 * Package-manager install specification for a skill dependency.
 */
export interface SkillInstallSpec {
    id?: string;
    kind: "brew" | "node" | "go" | "uv" | "download";
    label?: string;
    bins?: string[];
    os?: string[];
    formula?: string;
    package?: string;
    module?: string;
    url?: string;
    archive?: string;
    extract?: boolean;
    stripComponents?: number;
    targetDir?: string;
}
/**
 * Structured metadata from the `openclaw:` block inside SKILL.md frontmatter.
 */
export interface SkillMetadata {
    /** If true, always include in prompt regardless of filter. */
    always?: boolean;
    /** Override key for deduplication / user-facing identification. */
    skillKey?: string;
    primaryEnv?: string;
    emoji?: string;
    homepage?: string;
    /** Platform restriction: "win32", "darwin", "linux". */
    os?: string[];
    /** Use-case category for UI grouping. */
    category?: string;
    requires?: {
        bins?: string[];
        anyBins?: string[];
        env?: string[];
        config?: string[];
    };
    install?: SkillInstallSpec[];
}
/**
 * Controls how a skill may be activated by user commands or model tool calls.
 */
export interface SkillInvocationPolicy {
    /** Whether users can directly invoke this skill via slash-command. */
    userInvocable: boolean;
    /** If true, the model cannot trigger this skill autonomously. */
    disableModelInvocation: boolean;
}
/**
 * Slash-command dispatch specification for a skill.
 */
export interface SkillCommandDispatchSpec {
    kind: "tool";
    toolName: string;
    argMode?: "raw";
}
/**
 * A skill-derived slash-command for IM platforms.
 */
export interface SkillCommandSpec {
    name: string;
    skillName: string;
    description: string;
    dispatch?: SkillCommandDispatchSpec;
}
export type SkillScanSeverity = "info" | "warn" | "critical";
export interface SkillScanFinding {
    ruleId: string;
    severity: SkillScanSeverity;
    file: string;
    line: number;
    message: string;
    evidence: string;
}
export interface SkillScanSummary {
    scannedFiles: number;
    critical: number;
    warn: number;
    info: number;
    findings: SkillScanFinding[];
}
export interface SkillScanOptions {
    includeFiles?: string[];
    maxFiles?: number;
    maxFileBytes?: number;
}
/**
 * Filesystem dependencies injected by the host runtime.
 * Keeps the skill system decoupled from Node.js `fs` / `path`.
 */
export interface SkillFsDeps {
    readFileSync(path: string, encoding: "utf-8"): string;
    readFile(path: string, encoding: "utf-8"): Promise<string>;
    existsSync(path: string): boolean;
    statSync(path: string): {
        size: number;
        mtimeMs: number;
        isDirectory(): boolean;
    };
    readdirSync(path: string, opts: {
        withFileTypes: true;
    }): Array<{
        name: string;
        isDirectory(): boolean;
        isSymbolicLink(): boolean;
    }>;
    realpathSync(path: string): string;
}
export interface SkillPathDeps {
    join(...segments: string[]): string;
    resolve(...segments: string[]): string;
    extname(p: string): string;
    sep: string;
}
