import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
/**
 * addons — system-scoped singleton capability for addon package
 * management (install, update, configure, restart) and per-addon log
 * streaming.
 *
 * Implementation lives in the server's `AddonRegistryService`,
 * `AddonPackageService`, and `LoggingService`. The provider is
 * registered from `trpc.router.ts` against those services — no addon
 * owns this surface end-to-end (it manages addons themselves).
 *
 * Phase E of the API consolidation: previously a hand-written core
 * router. Cap conversion lets `useAddonsList`, `useAddonsInstallPackage`,
 * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
 * as every other cap.
 */
declare const LogLevelSchema: z.ZodEnum<{
    info: "info";
    error: "error";
    debug: "debug";
    warn: "warn";
}>;
declare const ChannelSchema: z.ZodEnum<{
    off: "off";
    latest: "latest";
    beta: "beta";
}>;
declare const ChannelWithInheritSchema: z.ZodEnum<{
    off: "off";
    latest: "latest";
    beta: "beta";
    inherit: "inherit";
}>;
declare const AddonListItemSchema: z.ZodObject<{
    manifest: z.ZodObject<{
        id: z.ZodString;
        name: z.ZodOptional<z.ZodString>;
        version: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodString>;
        icon: z.ZodOptional<z.ZodString>;
        color: z.ZodOptional<z.ZodString>;
        capabilities: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodUnknown>>>;
        packageName: z.ZodString;
        packageVersion: z.ZodString;
        packageDisplayName: z.ZodOptional<z.ZodString>;
        bundle: z.ZodOptional<z.ZodObject<{
            displayName: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            icon: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        protected: z.ZodOptional<z.ZodBoolean>;
        removable: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>;
    declaration: z.ZodOptional<z.ZodUnknown>;
    source: z.ZodString;
    installSource: z.ZodOptional<z.ZodString>;
    process: z.ZodOptional<z.ZodObject<{
        pid: z.ZodOptional<z.ZodNumber>;
        mode: z.ZodString;
        state: z.ZodString;
    }, z.core.$strip>>;
    hasBackup: z.ZodOptional<z.ZodBoolean>;
    health: z.ZodOptional<z.ZodNullable<z.ZodObject<{
        phase: z.ZodEnum<{
            pending: "pending";
            healthy: "healthy";
            failed: "failed";
        }>;
        retryCount: z.ZodNumber;
        firstFailureAt: z.ZodNullable<z.ZodNumber>;
        lastAttemptAt: z.ZodNullable<z.ZodNumber>;
        lastError: z.ZodNullable<z.ZodObject<{
            message: z.ZodString;
            stack: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        nextRetryAt: z.ZodNullable<z.ZodNumber>;
        alertEmitted: z.ZodBoolean;
        retrying: z.ZodBoolean;
        inGracePeriod: z.ZodBoolean;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const InstalledPackageSchema: z.ZodObject<{
    name: z.ZodString;
    version: z.ZodString;
    dir: z.ZodString;
    installSource: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const PackageUpdateSchema: z.ZodObject<{
    name: z.ZodString;
    currentVersion: z.ZodString;
    latestVersion: z.ZodString;
    category: z.ZodEnum<{
        addon: "addon";
        core: "core";
    }>;
    requiresRestart: z.ZodBoolean;
}, z.core.$strip>;
declare const PackageVersionInfoSchema: z.ZodObject<{
    version: z.ZodString;
    publishedAt: z.ZodString;
    deprecated: z.ZodOptional<z.ZodString>;
    distTags: z.ZodReadonly<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
declare const SearchResultSchema: z.ZodObject<{
    name: z.ZodString;
    version: z.ZodString;
    description: z.ZodString;
    keywords: z.ZodReadonly<z.ZodArray<z.ZodString>>;
    publishedAt: z.ZodString;
    author: z.ZodString;
    installed: z.ZodBoolean;
    installedVersion: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const AutoUpdateSettingsSchema: z.ZodObject<{
    channel: z.ZodEnum<{
        off: "off";
        latest: "latest";
        beta: "beta";
    }>;
    intervalSeconds: z.ZodNumber;
}, z.core.$strip>;
declare const AddonAutoUpdateSchema: z.ZodEnum<{
    off: "off";
    latest: "latest";
    beta: "beta";
    inherit: "inherit";
}>;
declare const LogStreamEntrySchema: z.ZodObject<{
    timestamp: z.ZodString;
    level: z.ZodString;
    message: z.ZodString;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const CustomActionInputSchema: z.ZodObject<{
    addonId: z.ZodString;
    action: z.ZodString;
    input: z.ZodUnknown;
}, z.core.$strip>;
export declare const addonsCapability: {
    readonly name: "addons";
    readonly scope: "system";
    readonly mode: "singleton";
    readonly methods: {
        readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            manifest: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
                description: z.ZodOptional<z.ZodString>;
                icon: z.ZodOptional<z.ZodString>;
                color: z.ZodOptional<z.ZodString>;
                capabilities: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodUnknown>>>;
                packageName: z.ZodString;
                packageVersion: z.ZodString;
                packageDisplayName: z.ZodOptional<z.ZodString>;
                bundle: z.ZodOptional<z.ZodObject<{
                    displayName: z.ZodString;
                    description: z.ZodOptional<z.ZodString>;
                    icon: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                protected: z.ZodOptional<z.ZodBoolean>;
                removable: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strip>;
            declaration: z.ZodOptional<z.ZodUnknown>;
            source: z.ZodString;
            installSource: z.ZodOptional<z.ZodString>;
            process: z.ZodOptional<z.ZodObject<{
                pid: z.ZodOptional<z.ZodNumber>;
                mode: z.ZodString;
                state: z.ZodString;
            }, z.core.$strip>>;
            hasBackup: z.ZodOptional<z.ZodBoolean>;
            health: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                phase: z.ZodEnum<{
                    pending: "pending";
                    healthy: "healthy";
                    failed: "failed";
                }>;
                retryCount: z.ZodNumber;
                firstFailureAt: z.ZodNullable<z.ZodNumber>;
                lastAttemptAt: z.ZodNullable<z.ZodNumber>;
                lastError: z.ZodNullable<z.ZodObject<{
                    message: z.ZodString;
                    stack: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                nextRetryAt: z.ZodNullable<z.ZodNumber>;
                alertEmitted: z.ZodBoolean;
                retrying: z.ZodBoolean;
                inGracePeriod: z.ZodBoolean;
            }, z.core.$strip>>>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly getLogs: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            limit: z.ZodDefault<z.ZodNumber>;
            level: z.ZodOptional<z.ZodEnum<{
                info: "info";
                error: "error";
                debug: "debug";
                warn: "warn";
            }>>;
        }, z.core.$strip>, z.ZodArray<z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly listPackages: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            version: z.ZodString;
            dir: z.ZodString;
            installSource: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly installPackage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            packageName: z.ZodString;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly installFromWorkspace: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            packageName: z.ZodString;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly isWorkspaceAvailable: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodBoolean, import("./capability-definition.js").CapabilityMethodKind>;
        readonly listWorkspacePackages: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodUnknown>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly uninstallPackage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            packageName: z.ZodString;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly reloadPackages: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodUnknown, "mutation">;
        readonly searchAvailable: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            query: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            version: z.ZodString;
            description: z.ZodString;
            keywords: z.ZodReadonly<z.ZodArray<z.ZodString>>;
            publishedAt: z.ZodString;
            author: z.ZodString;
            installed: z.ZodBoolean;
            installedVersion: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly listUpdates: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            currentVersion: z.ZodString;
            latestVersion: z.ZodString;
            category: z.ZodEnum<{
                addon: "addon";
                core: "core";
            }>;
            requiresRestart: z.ZodBoolean;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly updatePackage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            name: z.ZodString;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        /**
         * Roll back an addon to the version it had before the most recent
         * `updatePackage` call. The backup directory pointer is kept in the
         * central addon manifest until the post-update health-check
         * confirms the new install works (then it's cleared automatically),
         * so this only succeeds when the most recent update either failed
         * its restart or the user explicitly wants to revert.
         *
         * Returns `{ rolledBackTo: <version> }` on success, or
         * `{ rolledBackTo: null }` when there's no backup to roll back to
         * (caller can show a "no backup available" UI).
         */
        readonly rollbackPackage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            name: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            rolledBackTo: z.ZodNullable<z.ZodString>;
        }, z.core.$strip>, "mutation">;
        readonly forceRefresh: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodUnknown, "mutation">;
        readonly restartServer: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            confirm: z.ZodLiteral<true>;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly getVersions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            name: z.ZodString;
        }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            version: z.ZodString;
            publishedAt: z.ZodString;
            deprecated: z.ZodOptional<z.ZodString>;
            distTags: z.ZodReadonly<z.ZodArray<z.ZodString>>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly restartAddon: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        /**
         * Force-retry a failed addon NOW. Resets the retry counter so the
         * next failure starts from the 60s interval again. Used by the
         * "Retry now" button in the Addons admin page row + AlertCenter
         * alert action. Idempotent on healthy addons (no-op).
         */
        readonly retryLoad: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            packageName: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        readonly getAutoUpdateSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
            channel: z.ZodEnum<{
                off: "off";
                latest: "latest";
                beta: "beta";
            }>;
            intervalSeconds: z.ZodNumber;
        }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly setAutoUpdateSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            channel: z.ZodEnum<{
                off: "off";
                latest: "latest";
                beta: "beta";
            }>;
            intervalSeconds: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly getAddonAutoUpdate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
        }, z.core.$strip>, z.ZodEnum<{
            off: "off";
            latest: "latest";
            beta: "beta";
            inherit: "inherit";
        }>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly setAddonAutoUpdate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            channel: z.ZodEnum<{
                off: "off";
                latest: "latest";
                beta: "beta";
                inherit: "inherit";
            }>;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly applyAutoUpdateToAll: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            channel: z.ZodEnum<{
                off: "off";
                latest: "latest";
                beta: "beta";
            }>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        readonly custom: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            action: z.ZodString;
            input: z.ZodUnknown;
        }, z.core.$strip>, z.ZodUnknown, "mutation">;
        readonly onAddonLogs: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            level: z.ZodOptional<z.ZodEnum<{
                info: "info";
                error: "error";
                debug: "debug";
                warn: "warn";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            timestamp: z.ZodString;
            level: z.ZodString;
            message: z.ZodString;
            scope: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, "subscription">;
    };
};
export type IAddonsProvider = InferProvider<typeof addonsCapability>;
export { AddonListItemSchema, InstalledPackageSchema, PackageUpdateSchema, PackageVersionInfoSchema, SearchResultSchema, AutoUpdateSettingsSchema, AddonAutoUpdateSchema, LogStreamEntrySchema, CustomActionInputSchema, LogLevelSchema, ChannelSchema, ChannelWithInheritSchema, };
//# sourceMappingURL=addons.cap.d.ts.map