

// ── inlined from @weft/skills/browser ──
// -- @weft/skills/browser/browser.d.ts --
/**
 * Skills Types
 *
 * Type definitions for workspace skills.
 * Skills are specialized instructions that extend Claude's capabilities.
 */
/**
 * Skill metadata from SKILL.md YAML frontmatter
 */
interface SkillMetadata {
    /** Display name for the skill */
    name: string;
    /** Brief description shown in skill list */
    description: string;
    /** Optional file patterns that trigger this skill */
    globs?: string[];
    /** Optional tools to always allow when skill is active */
    alwaysAllow?: string[];
    /**
     * Optional icon - emoji or URL only.
     * - Emoji: rendered directly in UI (e.g., "🔧")
     * - URL: auto-downloaded to icon.{ext} file
     * Note: Relative paths and inline SVG are NOT supported.
     */
    icon?: string;
    /** Optional source slugs to auto-enable when this skill is invoked */
    requiredSources?: string[];
}
/** Source of a loaded skill */
type SkillSource = 'global' | 'workspace' | 'project';
/**
 * Plugin name for project-level and global skills.
 *
 * The SDK derives plugin names from `path.basename()` of the registered plugin
 * directory. Both `{project}/.agents/` and `~/.agents/` share the basename
 * `.agents`, so skills from either tier resolve to `.agents:skillSlug`.
 */
declare const AGENTS_PLUGIN_NAME = ".agents";
/**
 * A loaded skill with parsed content
 */
interface LoadedSkill {
    /** Directory name (slug) */
    slug: string;
    /** Parsed metadata from YAML frontmatter */
    metadata: SkillMetadata;
    /** Full SKILL.md content (without frontmatter) */
    content: string;
    /** Absolute path to icon file if exists */
    iconPath?: string;
    /** Absolute path to skill directory */
    path: string;
    /** Where this skill was loaded from */
    source: SkillSource;
}

type SkillActivationReason = 'prompt-mention' | 'file-glob' | 'host-selection';
interface SkillActivation {
    skill: LoadedSkill;
    reason: SkillActivationReason;
}
interface CreateSkillActivationPlanOptions {
    skills: LoadedSkill[];
    prompt?: string;
    filePaths?: string[];
    selectedSkillSlugs?: string[];
    enabledSourceSlugs?: string[];
    prerequisiteFileExists?: (path: string) => boolean;
}
interface SkillPolicyExtension {
    toolName: string;
    scope: {
        type: 'skill';
        skillSlug: string;
    };
}
interface SkillActivationPlan {
    activeSkillSlugs: string[];
    activations: SkillActivation[];
    requiredSourceSlugs: string[];
    missingRequiredSourceSlugs: string[];
    policyExtensions: SkillPolicyExtension[];
    providerInstructions: string;
    prerequisiteFiles: string[];
}
declare function createSkillActivationPlan(options: CreateSkillActivationPlanOptions): SkillActivationPlan;

/**
 * Format a skill prerequisite directive that instructs the agent to read
 * SKILL.md files before taking any other action.
 *
 * Returns undefined if no prerequisite files are specified.
 */
declare function formatSkillDirective(prerequisiteFiles: string[]): string | undefined;
/**
 * Prepend a skill directive to a user message if prerequisite files exist.
 * Returns the original message if no prerequisites.
 */
declare function prependSkillDirective(message: string, prerequisiteFiles: string[]): string;

export { AGENTS_PLUGIN_NAME, type CreateSkillActivationPlanOptions, type LoadedSkill, type SkillActivation, type SkillActivationPlan, type SkillActivationReason, type SkillMetadata, type SkillPolicyExtension, type SkillSource, createSkillActivationPlan, formatSkillDirective, prependSkillDirective };
