import type { Skill } from "./skill-contract.js";
export type 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;
    integrity?: string;
    sha256?: string;
    shasum?: string;
    extract?: boolean;
    stripComponents?: number;
    targetDir?: string;
};
export type SkillConfigFieldSpec = {
    key?: string;
    path?: string;
    label?: string;
    type?: "string" | "secret" | "number" | "boolean" | "textarea";
    placeholder?: string;
    required?: boolean;
};
export type FasedAgentSkillMetadata = {
    always?: boolean;
    skillKey?: string;
    primaryEnv?: string;
    emoji?: string;
    homepage?: string;
    os?: string[];
    requires?: {
        bins?: string[];
        anyBins?: string[];
        env?: string[];
        config?: string[];
    };
    configFields?: SkillConfigFieldSpec[];
    install?: SkillInstallSpec[];
};
export type SkillInvocationPolicy = {
    userInvocable: boolean;
    disableModelInvocation: boolean;
};
export type SkillCommandDispatchSpec = {
    kind: "tool";
    /** Name of the tool to invoke (AnyAgentTool.name). */
    toolName: string;
    /**
     * How to forward user-provided args to the tool.
     * - raw: forward the raw args string (no core parsing).
     */
    argMode?: "raw";
};
export type SkillCommandSpec = {
    name: string;
    skillName: string;
    description: string;
    /** Optional deterministic dispatch behavior for this command. */
    dispatch?: SkillCommandDispatchSpec;
    /** Native prompt template used by Claude-bundle command markdown files. */
    promptTemplate?: string;
    /** Source markdown path for bundle-backed commands. */
    sourceFilePath?: string;
};
export type SkillsInstallPreferences = {
    preferBrew: boolean;
    nodeManager: "npm" | "pnpm" | "yarn" | "bun";
};
export type ParsedSkillFrontmatter = Record<string, string>;
export type SkillExposure = {
    includeInRuntimeRegistry: boolean;
    includeInAvailableSkillsPrompt: boolean;
    userInvocable: boolean;
};
export type SkillEntry = {
    skill: Skill;
    frontmatter: ParsedSkillFrontmatter;
    metadata?: FasedAgentSkillMetadata;
    invocation?: SkillInvocationPolicy;
    exposure?: SkillExposure;
};
export type SkillEligibilityContext = {
    remote?: {
        platforms: string[];
        hasBin: (bin: string) => boolean;
        hasAnyBin: (bins: string[]) => boolean;
        note?: string;
    };
};
export type SkillSnapshot = {
    prompt: string;
    skills: Array<{
        name: string;
        primaryEnv?: string;
        requiredEnv?: string[];
    }>;
    /** Normalized agent-level filter used to build this snapshot; undefined means unrestricted. */
    skillFilter?: string[];
    resolvedSkills?: Skill[];
    version?: number;
};
