/** * Shared base for the "flat name→def, no active slot" registries (agents, * channels, surfaces). A `Map` exposing register (throws on * duplicate), replace (overwrite), unregister, list, get and has. The three * registries differ only in their noun and key field (`name` vs `kind`), * supplied via {@link DefMapRegistryOptions}. * * `ChannelRegistryImpl` extends this and adds `listWithAvailability`; * `SurfaceRegistryImpl` keys on `kind` rather than `name`. */ export interface DefMapRegistryOptions { /** Capitalised singular noun for error messages, e.g. `'Agent'`. */ readonly noun: string; /** Extract the map key from a def, e.g. `(d) => d.name` or `(d) => d.kind`. */ readonly keyOf: (def: TDef) => K; } export declare class DefMapRegistry { protected readonly defs: Map; private readonly noun; private readonly keyOf; constructor(opts: DefMapRegistryOptions); /** * Register a definition. Throws on duplicate so two plugins can't silently * shadow each other — use `replace()` when you really want to override. */ register(def: TDef): void; replace(def: TDef): void; unregister(key: K): void; list(): ReadonlyArray; get(key: K): TDef | undefined; has(key: K): boolean; } //# sourceMappingURL=def-map-registry.d.ts.map