import { type LocalExtensionManifest, type LocalExtensionRecord } from "./config.js";
import { type RunnerSandboxCheck } from "./runner-sandbox.js";
export interface ExtensionSourceInspection {
    source: string;
    source_type: "manifest" | "directory" | "bundle";
    manifest_path: string;
    manifest: LocalExtensionManifest;
    checksum: string;
    validation: ExtensionValidationResult;
    bundle: boolean;
}
export interface ExtensionValidationResult {
    ok: boolean;
    errors: string[];
    warnings: string[];
    compatible: boolean;
    todos_version: string;
    compatibility_range: string | null;
    permission_declarations: string[];
    cli_mcp_checks: ExtensionCompatibilityCheck[];
    sandbox_checks: ExtensionSandboxCheck[];
}
export interface ExtensionCompatibilityCheck {
    surface: "cli" | "mcp" | "hook" | "template" | "renderer" | "permissions";
    name: string;
    ok: boolean;
    errors: string[];
    warnings: string[];
}
export interface ExtensionSandboxCheck {
    command_name: string;
    command: string;
    allowed: boolean;
    requires_approval: boolean;
    reasons: string[];
    audit_evidence: RunnerSandboxCheck["audit_evidence"];
}
export interface ExtensionCompatibilityReport {
    source: string | null;
    manifest: LocalExtensionManifest;
    validation: ExtensionValidationResult;
    ok: boolean;
    summary: {
        commands: number;
        mcp_tools: number;
        templates: number;
        renderers: number;
        hooks: number;
        permissions: number;
        sandbox_checks: number;
        failed_sandbox_checks: number;
    };
    errors: string[];
    warnings: string[];
}
export interface LocalExtensionDiscoveryReport {
    schema_version: 1;
    local_only: true;
    no_network: true;
    project_path: string | null;
    config_sources: string[];
    discovered: ExtensionSourceInspection[];
    installed: LocalExtensionRecord[];
    warnings: string[];
}
export interface DiscoverLocalExtensionsOptions {
    project_path?: string;
    include_installed?: boolean;
}
export interface InstallLocalExtensionInput {
    source: string;
    trust?: boolean;
    checksum?: string;
    signature?: string;
    public_key?: string;
}
export interface VerifyExtensionSignatureInput {
    checksum: string;
    signature?: string;
    public_key?: string;
}
export declare function verifyExtensionSignature(input: VerifyExtensionSignatureInput): boolean;
export declare function inspectExtensionSource(source: string): ExtensionSourceInspection;
export declare function validateExtensionManifest(manifest: LocalExtensionManifest): ExtensionValidationResult;
export declare function testExtensionCompatibility(sourceOrManifest: string | LocalExtensionManifest): ExtensionCompatibilityReport;
export declare function discoverLocalExtensions(options?: DiscoverLocalExtensionsOptions): LocalExtensionDiscoveryReport;
export declare function installLocalExtension(input: InstallLocalExtensionInput): LocalExtensionRecord;
export declare function listLocalExtensions(): LocalExtensionRecord[];
export declare function getLocalExtension(name: string): LocalExtensionRecord | null;
export declare function removeLocalExtension(name: string): boolean;
export declare function renderExtensionSummary(record: LocalExtensionRecord): string;
//# sourceMappingURL=local-extensions.d.ts.map