import type { AgentDefinition } from "../agents/agents-registry.js";
interface MarketplaceDetectionResult {
    isMarketplace: boolean;
    manifestContent?: string;
}
/**
 * Check if a GitHub repo contains `.claude-plugin/marketplace.json`.
 *
 * Strategy: Contents API → retry once (1s) → raw fallback → give up.
 * On 404, returns immediately (not a marketplace repo — no retry needed).
 * On 403 rate limit, warns once and falls through to raw fallback.
 */
export declare function detectMarketplaceRepo(owner: string, repo: string): Promise<MarketplaceDetectionResult>;
import { copyPluginFiltered, isSkillMdCandidate, shouldSkipFromCommands } from "../shared/copy-plugin-filtered.js";
export { copyPluginFiltered, isSkillMdCandidate, shouldSkipFromCommands };
interface AddOptions {
    skill?: string;
    plugin?: string;
    pluginDir?: string;
    repo?: string;
    all?: boolean;
    global?: boolean;
    force?: boolean;
    agent?: string | string[];
    cwd?: boolean;
    yes?: boolean;
    copy?: boolean;
    select?: boolean;
    /** @internal Registry target skill name — auto-select from discovery */
    _targetSkill?: string;
    /** Filter which skills to install from a plugin (comma-separated names) */
    onlySkills?: string;
    /** When false (--no-enable), skip the post-install `claude plugin install` step. */
    enable?: boolean;
    /** Explicit settings.json scope for the enable step. Falls back to `global ? "user" : "project"`. */
    scope?: "user" | "project";
    /** Print what enable / lockfile mutations would happen, no side effects. */
    dryRun?: boolean;
    /**
     * 0839 T-010 / ADR-002 — explicit tenant slug for private-skill resolution.
     * Highest priority in the resolution chain (flag > env > config > auto).
     * When set, the value is propagated to the API client via the
     * `X-Vskill-Tenant` header on every outbound request in this run.
     */
    tenant?: string;
}
/**
 * 0724 T-006: post-install claude-plugin enable hook.
 *
 * @internal exported for unit tests in __tests__/add-no-enable.test.ts —
 * driving the helper directly is much cheaper than threading the entire
 * addCommand() through fake GitHub fetches and tarball extraction.
 *
 * Called once per just-installed marketplace plugin entry, after the
 * lockfile has been written. Honours `opts.enable === false` (--no-enable)
 * and `opts.dryRun`. Resolves the plugin id via shared helper. Throws on
 * failure so the caller can roll back the filesystem extraction
 * (AC-US1-05).
 */
export declare function enableAfterInstall(skillName: string, entry: {
    marketplace?: string;
}, opts: AddOptions): {
    invoked: boolean;
    pluginId: string | null;
    scope: "user" | "project";
};
/**
 * 0724 T-006: rollback the on-disk extraction + lockfile entry when
 * `claudePluginInstall` throws (AC-US1-05). Best-effort — wraps each rm in
 * try/catch so a partial filesystem state doesn't suppress the underlying
 * diagnostic.
 *
 * @internal exported for unit tests; see `enableAfterInstall` note above.
 */
export declare function rollbackInstall(skillName: string, agents: AgentDefinition[], opts: AddOptions): void;
export declare function addCommand(source: string | undefined, opts: AddOptions): Promise<void>;
