import type { Isolator } from '@moxxy/sdk'; import type { Logger } from '../logger.js'; export interface IsolatorRegisterOptions { /** * True when the isolator comes from a statically-registered (trusted) * builtin, false for a discovered (untrusted) plugin. A discovered isolator * is never allowed to shadow a name already claimed by a trusted one. */ readonly trusted?: boolean; readonly logger?: Logger; } /** * Collection of capability isolators contributed by plugins via * `PluginSpec.isolators`. Unlike the single-active registries, this is just the * set of AVAILABLE isolators — selection (and ownership of the security * boundary) stays with the active security layer (`@moxxy/plugin-security`), * which reads these and picks one by `security.isolator` config. * * A contributed isolator is therefore NEVER auto-activated: registration only * makes it available; the user must opt in by name, so a rogue plugin can't * silently weaken isolation just by being installed. * * This is the one registry where "last wins" crosses a trust boundary: a * discovered plugin contributing an isolator whose name matches a trusted * builtin would silently swap the implementation the security layer resolves by * `security.isolator`. So a discovered registration may NEVER overwrite a name * a trusted registration already claimed; it's refused with a warning. */ export declare class IsolatorRegistry { private readonly impls; /** Names registered by a trusted (static) source — these are never shadowed. */ private readonly trustedNames; /** * Register an isolator by name. Returns `true` when the impl was stored, * `false` when the registration was REFUSED (a discovered plugin trying to * shadow a trusted name). The boolean lets the PluginHost avoid tracking a * refused registration for rollback — otherwise a later mid-`applyPlugin` * failure would `unregister(name)` and delete the very trusted isolator the * refusal protected. */ register(iso: Isolator, opts?: IsolatorRegisterOptions): boolean; unregister(name: string): void; get(name: string): Isolator | undefined; has(name: string): boolean; list(): ReadonlyArray; } //# sourceMappingURL=isolators.d.ts.map