import type { PortableTool } from "../portable-tool.js";
import type { WorkspaceSkill } from "../skill-system/skill-types.js";
export declare const SKILL_TOOL_NAME: "skill";
export type SkillAction = "invoke" | "list" | "view" | "create" | "edit" | "patch" | "delete" | "promote";
export interface SkillToolParams {
    action: SkillAction;
    name?: string;
    args?: string;
    category?: string;
    content?: string;
    filePath?: string;
    fileContent?: string;
    oldString?: string;
    newString?: string;
}
export declare const SKILL_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly action: {
            readonly type: "string";
            readonly enum: readonly ["invoke", "list", "view", "create", "edit", "patch", "delete", "promote"];
            readonly description: string;
        };
        readonly name: {
            readonly type: "string";
            readonly description: "Skill name (required for invoke/view/create/edit/patch/delete/promote).";
        };
        readonly args: {
            readonly type: "string";
            readonly description: "Arguments or context to pass when invoking a skill.";
        };
        readonly category: {
            readonly type: "string";
            readonly description: "Filter skills by category (for 'list' action).";
        };
        readonly content: {
            readonly type: "string";
            readonly description: "Full SKILL.md content for create/edit actions.";
        };
        readonly filePath: {
            readonly type: "string";
            readonly description: "Path of a file inside the skill folder: read it (view) or write it with fileContent (create/edit). SKILL.md itself always goes through 'content'.";
        };
        readonly fileContent: {
            readonly type: "string";
            readonly description: "Supporting file content. With filePath, writes that file inside the skill folder (create: alongside SKILL.md; edit: file-only update).";
        };
        readonly oldString: {
            readonly type: "string";
            readonly description: "Text to find for patch action.";
        };
        readonly newString: {
            readonly type: "string";
            readonly description: "Replacement text for patch action.";
        };
    };
    readonly required: readonly ["action"];
};
export interface SkillListItem {
    name: string;
    description: string;
    version?: string;
    category?: string;
    /** Where the skill lives: "global" (user-level) or "project" (cwd-level). */
    scope?: "global" | "project" | "plugin" | "config";
}
export interface SkillListOutput {
    skills: SkillListItem[];
    categories: string[];
}
export interface SkillViewOutput {
    name: string;
    content: string;
    referenceFiles?: string[];
}
export interface SkillManageResult {
    success: boolean;
    message: string;
    path?: string;
}
export interface SkillToolDeps {
    /** List all available skills (Layer 0 metadata). */
    listSkills(): WorkspaceSkill[];
    /** List skills with full detail (for list action). */
    listSkillsFull(category?: string): Promise<SkillListOutput>;
    /** Read skill content (Layer 1 instructions). */
    readSkillContent(name: string): Promise<string | null>;
    /** View skill with optional file path. */
    viewSkill(name: string, filePath?: string): Promise<SkillViewOutput | null>;
    /** Execute skill as sub-turn. */
    executeSkillSubturn?(skillName: string, skillContent: string, userArgs: string | undefined, signal?: AbortSignal): Promise<string>;
    /** Manage skill (create/edit/patch/delete). */
    manageSkill(params: {
        action: string;
        name: string;
        category?: string;
        content?: string;
        filePath?: string;
        fileContent?: string;
        oldString?: string;
        newString?: string;
    }): Promise<SkillManageResult>;
    /** Promote a project-level skill to user/global level. Returns success message. */
    promoteSkill?(name: string): Promise<SkillManageResult>;
}
export declare function createSkillMetaTool(deps: SkillToolDeps): PortableTool<SkillToolParams>;
