import type { IncomingMessage as HttpRequest, ServerResponse } from "node:http"; import { type ParsedRoute } from "./route-helpers.js"; import type { ApiContext } from "./api.js"; /** * What each plugin-admin route is called in api.ts's operator-authority table, * or null when this is not one of them. * * Exported so that table holds one line for the whole module: a route added * here cannot be added without its authority, which is the failure mode a * per-route line in a table of eighty invites. */ export declare function pluginAdminAction(method: string, pathname: string): string | null; /** * The operator's two lists after one decision about one plugin. * * Enabling adds the id to `enabled` AND removes it from `disabled`, because * `disabled` wins (plugins/enablement.ts): leaving a stale entry there would * make an enable that appears to have worked do nothing at all. Disabling is the * inverse, and for the same reason — absence is not enabled, but an explicit * `disabled` entry is what survives a plugin being re-listed by something else. */ export declare function decidedLists(plugins: { enabled?: unknown; disabled?: unknown; } | undefined, id: string, enabled: boolean): { enabled: string[]; disabled: string[]; }; /** * The work a change to the operator's lists or to the plugins directory implies, * which is exactly what the file watcher already does (gateway/watch-callbacks.ts): * a plugin that stopped being servable loses its loaded backend, and the running * watchers come back in line with what config now says. * * Awaited, unlike in the watcher, because a request that answers "rescanned" has * to have finished rescanning before it says so. */ export declare function reconcilePluginRuntime(context: ApiContext): Promise; /** * `POST /api/plugins//{enabled,reveal}`. See route-helpers.ts for the * domain-module contract; api.ts gates both operator-only before delegating. * * An id of the wrong shape is a 404, the same answer an id naming no installed * plugin gets, so neither response confirms what is on disk. */ export declare function handlePluginAdminApi(req: HttpRequest, res: ServerResponse, route: ParsedRoute, context: ApiContext): Promise; //# sourceMappingURL=plugins-admin-api.d.ts.map