export interface DetectRule {
    file?: string;
    file_pattern?: string;
    dependency?: string;
    devDependency?: string;
    mcp_server?: string;
}
export interface HealthCheck {
    name: string;
    command: string;
}
export interface VerificationEntry {
    name: string;
    command: string;
    detect?: DetectRule;
}
export interface ExtensionManifest {
    name: string;
    description: string;
    version?: string;
    _source?: string;
    /**
     * `required: true` means the extension is enabled-by-default on every
     * project unless listed in `.indusk/config.json`'s `disabled_extensions`
     * array. Required-by-default extensions ship as essential substrate
     * (e.g., local-telemetry) that the rest of the dev system assumes.
     * Opt-out is explicit; opt-in is implicit.
     */
    required?: boolean;
    provides: {
        skill?: boolean;
        networking?: {
            env_file?: string;
            command?: string;
            description?: string;
        };
        services?: {
            command?: string;
            description?: string;
        };
        health_checks?: HealthCheck[];
        verification?: VerificationEntry[];
        env_vars?: Record<string, string> | {
            source: string;
            files?: string[];
        };
    };
    hooks?: {
        on_init?: string;
        on_enable?: string;
        on_disable?: string;
        on_update?: string;
        on_post_update?: string;
        on_health_check?: string;
        on_onboard?: string;
    };
    detect?: DetectRule;
    mcp_server?: {
        type?: string;
        url?: string;
        command?: string;
        args?: string[];
        headers?: Record<string, string>;
        env?: Record<string, string>;
        env_from_shell?: string[];
        add_command?: string;
        setup_instructions?: string[];
    };
}
export interface LoadedExtension {
    manifest: ExtensionManifest;
    path: string;
    enabled: boolean;
}
export declare function extensionsDir(projectRoot: string): string;
export declare function disabledDir(projectRoot: string): string;
export declare function ensureExtensionsDirs(projectRoot: string): void;
export declare function loadExtension(manifestPath: string): ExtensionManifest | null;
/**
 * Resolve the manifest path for an extension.
 * Supports both directory format ({name}/manifest.json) and legacy flat format ({name}.json).
 * Returns the path if found, null otherwise.
 */
export declare function resolveManifestPath(baseDir: string, name: string): string | null;
/**
 * Get the directory path for an extension (creates if needed).
 * This is where manifest.json, .env, and other extension files live.
 */
export declare function extensionConfigDir(projectRoot: string, name: string): string;
/**
 * Migrate a flat file extension to directory format.
 * Moves {name}.json → {name}/manifest.json
 */
export declare function migrateToDirectory(baseDir: string, name: string): void;
export declare function loadExtensions(projectRoot: string): LoadedExtension[];
export declare function getEnabledExtensions(projectRoot: string): LoadedExtension[];
export declare function enableExtension(projectRoot: string, name: string): boolean;
export declare function disableExtension(projectRoot: string, name: string): boolean;
export declare function isEnabled(projectRoot: string, name: string): boolean;
export declare function getExtension(projectRoot: string, name: string): LoadedExtension | null;
