/**
 * Create and register a skill.
 *
 * Function skill:  skill(id, { description, input, handler })
 * MCP skill:       skill(id, { resolve(), serverName?, ... })
 *
 * @param {string} id — Unique skill identifier
 * @param {SkillConfig} config — Skill definition
 * @returns {Skill} A registered skill object
 */
export function skill(id: string, config: SkillConfig): Skill;
/**
 * Create and register a skill.
 *
 * Function skill:  skill(id, { description, input, handler })
 * MCP skill:       skill(id, { resolve(), serverName?, ... })
 *
 * @param {string} id — Unique skill identifier
 * @param {SkillConfig} config — Skill definition
 * @returns {Skill} A registered skill object
 */
export function functionSkill(id: string, config: SkillConfig): Skill;
/**
 * A tool exposed by a skill (Anthropic tool-definition shape).
 */
export type SkillTool = {
    /**
     * — Tool name.
     */
    name: string;
    /**
     * — Human-readable description.
     */
    description?: string;
    /**
     * — JSON Schema for the tool input.
     */
    input_schema?: any;
};
/**
 * A registered skill object. Returned by {@link skill} and consumed by
 * `registerSkill` / the workflow runtime.
 */
export type Skill = {
    /**
     * — Unique skill identifier.
     */
    id: string;
    /**
     * — Skill kind.
     */
    type: "function" | "mcp";
    /**
     * — MCP server name this skill registers under.
     */
    serverName: string;
    /**
     * — Glob patterns of tools this skill grants.
     */
    allowedTools: string[];
    /**
     * — Human-readable description.
     */
    description: string;
    /**
     * — Env var names the skill reads at resolve time.
     */
    envKeys: string[];
    /**
     * — Tool definitions exposed by the skill.
     */
    tools: SkillTool[];
    /**
     *   — Returns the MCP server launch config, or null when unavailable.
     */
    resolve: () => ({
        command: string;
        args: string[];
        env?: Record<string, string>;
    } | null);
    /**
     * — Optional Cursor MCP registry key.
     */
    cursorKey?: string;
    /**
     * — Optional env key carrying session info.
     */
    sessionEnvKey?: string;
};
/**
 * Function-skill input field: either a JSON-Schema type string
 * (e.g. `'number'`) or a partial JSON-Schema object with an optional
 * `required` flag (defaults to required).
 */
export type SkillInputField = string | (any & {
    required?: boolean;
});
/**
 * Configuration passed to {@link skill}.
 *
 * Provide `handler` for a function skill (one skill = one tool), or
 * `resolve` for an MCP skill.
 */
export type SkillConfig = {
    /**
     * — Human-readable description.
     */
    description?: string;
    /**
     * — Function-skill input schema.
     */
    input?: Record<string, SkillInputField>;
    /**
     * — Function-skill handler (makes it a function skill).
     */
    handler?: (args: any) => any;
    /**
     * — MCP-skill resolver (makes it an MCP skill).
     */
    resolve?: () => ({
        command: string;
        args: string[];
        env?: Record<string, string>;
    } | null);
    /**
     * — MCP server name (defaults to `id`).
     */
    serverName?: string;
    /**
     * — Allowed tool globs.
     */
    allowedTools?: string[];
    /**
     * — Env var names the skill reads.
     */
    envKeys?: string[];
    /**
     * — Tool definitions (MCP skills).
     */
    tools?: SkillTool[];
    /**
     * — Optional Cursor MCP registry key.
     */
    cursorKey?: string;
    /**
     * — Optional session env key.
     */
    sessionEnvKey?: string;
};
