Registry class final

Holds the actions, plugins, and named values of a Genkit instance.

Reach it through ai.registry. Plugins and middleware use it to look up actions (lookupAction, listActions), register their own (register), and keep plugin-scoped values (registerValue, lookupValue, listValues).

A child registry (Registry.childOf) sees everything in its parent and shadows it with its own entries; generate uses one to scope inline tools to a single call.

Constructors

Registry({Registry? parent})
Registry.childOf(Registry parent)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
parent → Registry?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

listActions() → Future<List<ActionMetadata>>
listValues<T>(String type) → Map<String, T>
Returns every value in the type namespace, keyed by registry path (/<type>/<name>), with this registry's entries shadowing the parent's.
lookupAction(ActionType actionType, String name) → Future<Action?>
lookupValue<T>(String type, String name) → T?
Returns the value registered under name in the type namespace, here or in a parent registry, or null when there is none.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(Action action) → void
registerValue(String type, String name, dynamic value) → void
Stores value under name in the type namespace, replacing any previous value with the same key.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited