Table of Contents

Class ToolLoadoutRegistry

Namespace
JD.AI.Core.Tools
Assembly
JD.AI.Core.dll

Default implementation of IToolLoadoutRegistry. Pre-populated with five built-in loadouts:

  • ToolLoadout.Names.Minimal
  • ToolLoadout.Names.Developer
  • ToolLoadout.Names.DevOps
  • ToolLoadout.Names.Research
  • ToolLoadout.Names.Full
public sealed class ToolLoadoutRegistry : IToolLoadoutRegistry
Inheritance
ToolLoadoutRegistry
Implements
Inherited Members

Constructors

ToolLoadoutRegistry()

Creates a new registry pre-populated with the built-in loadouts.

public ToolLoadoutRegistry()

Fields

PluginCategoryMap

Maps plugin names (as registered via AddFromType / AddFromObject) to their logical ToolCategory. Plugin names are the strings passed as the second argument to those calls and are matched case-insensitively.

public static readonly IReadOnlyDictionary<string, ToolCategory> PluginCategoryMap

Field Value

IReadOnlyDictionary<string, ToolCategory>

Methods

GetAll()

Returns all registered loadouts in registration order.

public IReadOnlyList<ToolLoadout> GetAll()

Returns

IReadOnlyList<ToolLoadout>

GetLoadout(string)

Returns the loadout with the given name, or null if not found.

public ToolLoadout? GetLoadout(string name)

Parameters

name string

Returns

ToolLoadout

Register(ToolLoadout)

Registers a loadout. Overwrites any existing loadout with the same name.

public void Register(ToolLoadout loadout)

Parameters

loadout ToolLoadout

ResolveActivePlugins(string, IEnumerable<KernelPlugin>)

Resolves the set of plugin names that should be actively loaded for the given loadout, drawing from availablePlugins. Respects inheritance, category mapping, and disabled-plugin overrides.

public IReadOnlySet<string> ResolveActivePlugins(string loadoutName, IEnumerable<KernelPlugin> availablePlugins)

Parameters

loadoutName string

Name of the loadout to resolve.

availablePlugins IEnumerable<KernelPlugin>

All plugins registered on the kernel.

Returns

IReadOnlySet<string>

Plugin names that should be loaded for this loadout.

ResolveDiscoverablePlugins(string, IEnumerable<KernelPlugin>)

Resolves the set of plugin names that are discoverable (lazy) for the given loadout. These plugins are not loaded by default but can be enabled on request at runtime. Active and disabled plugins are excluded from the discoverable set.

public IReadOnlySet<string> ResolveDiscoverablePlugins(string loadoutName, IEnumerable<KernelPlugin> availablePlugins)

Parameters

loadoutName string

Name of the loadout to resolve.

availablePlugins IEnumerable<KernelPlugin>

All plugins registered on the kernel.

Returns

IReadOnlySet<string>

Plugin names that are discoverable but not currently active.