@prismshadow/penguin-library-agent · library/agent/src/ports.ts:49

AgentPluginLibrary

interface

The built-in plugin library, as AgentService reads it: the seed list, a lookup and the default-install plugins (the server's PluginLibrary satisfies it structurally; the assembly binds it).

API

@Interface()
export abstract class AgentPluginLibrary {
  abstract list(): LibraryPlugin[];
  abstract get(name: string): LibraryPlugin | undefined;
  abstract defaultInstalled(): LibraryPlugin[];
  abstract resolve(names: readonly string[]): LibraryPlugin[];
  abstract seed(
      picked: readonly string[],
      defaults: readonly Pick<LibraryPlugin, "name">[],
    ): string[];
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use
@Useconsumed by (1)

Members (5)

list

list(): LibraryPlugin[]
@returnsLibraryPlugin[]

get

get(name: string): LibraryPlugin | undefined
@paramnamestring
@returnsLibraryPlugin | undefined

defaultInstalled

defaultInstalled(): LibraryPlugin[]
@returnsLibraryPlugin[]

resolve

resolve(names: readonly string[]): LibraryPlugin[]

Resolves plugin names to their entries, in the order given; 404 unknown_plugin on the first name the library does not carry (the server's resolveLibraryPlugins).

@paramnamesreadonly string[]
@returnsLibraryPlugin[]

seed

seed(picked: readonly string[], defaults: readonly Pick<LibraryPlugin, "name">[]): string[]

The picked names in pick order, then each default-install plugin's name not among them (the server's seedPluginNames).

@parampickedreadonly string[]
@paramdefaultsreadonly Pick<LibraryPlugin, "name">[]
@returnsstring[]